comparison browser_side/panels.py @ 370:30d03d9f07e4

browser_side: refactorization of the file tools.py: - tools.py renamed to html_tools.py - method setPresenceStyle moved to contact.py - classes DragLabel and LiberviaDragWidget moved to base_widget.py - class FilterFileUpload moved to file_tools.py
author souliane <souliane@mailoo.org>
date Sun, 23 Feb 2014 17:01:03 +0100
parents 39ae5bf92786
children 5e0e2032928c
comparison
equal deleted inserted replaced
369:678d1739bbf2 370:30d03d9f07e4
37 from pyjamas.Timer import Timer 37 from pyjamas.Timer import Timer
38 from pyjamas import DOM 38 from pyjamas import DOM
39 from pyjamas import Window 39 from pyjamas import Window
40 from __pyjamas__ import doc 40 from __pyjamas__ import doc
41 41
42 from tools import html_sanitize, setPresenceStyle
43 from base_panels import ChatText, OccupantsList, PopupMenuPanel, BaseTextEditor, LightTextEditor
44 from datetime import datetime 42 from datetime import datetime
45 from time import time 43 from time import time
44 from jid import JID
45
46 from html_tools import html_sanitize
47 from base_panels import ChatText, OccupantsList, PopupMenuPanel, BaseTextEditor, LightTextEditor
46 from card_game import CardPanel 48 from card_game import CardPanel
47 from radiocol import RadioColPanel 49 from radiocol import RadioColPanel
48 from menu import Menu 50 from menu import Menu
49 from jid import JID
50 import dialog 51 import dialog
51 import base_widget 52 import base_widget
52 import richtext 53 import richtext
54 import contact
53 55
54 from constants import Const 56 from constants import Const
55 from plugin_xep_0085 import ChatStateMachine 57 from plugin_xep_0085 import ChatStateMachine
56 from sat_frontends.tools.strings import addURLToText 58 from sat_frontends.tools.strings import addURLToText
57 from sat_frontends.tools.games import SYMBOLS 59 from sat_frontends.tools.games import SYMBOLS
968 def status(self): 970 def status(self):
969 return self.status_panel._original_content['text'] 971 return self.status_panel._original_content['text']
970 972
971 def setPresence(self, presence): 973 def setPresence(self, presence):
972 self._presence = presence 974 self._presence = presence
973 setPresenceStyle(self.presence_button, self._presence) 975 contact.setPresenceStyle(self.presence_button, self._presence)
974 976
975 def setStatus(self, status): 977 def setStatus(self, status):
976 self.status_panel.setContent({'text': status}) 978 self.status_panel.setContent({'text': status})
977 self.status_panel.setDisplayContent() 979 self.status_panel.setDisplayContent()
978 980