comparison browser_side/base_widget.py @ 254:28d3315a8003

browser_side: isolate the basic stuff of RecipientManager in a new class ListManager: - renamed most occurences of "recipient" to "contact" and "recipient type" to "contact key" or "list" - data to represent the lists and autocomplete values are parametrized - UI elements styles are set by default but can be ovewritten by a sub-class - popup menu for the list Button element has to be set with registerPopupMenuPanel - richtext UI uses the definitions from sat.tool.frontends.composition Know issues: - drag and drop AutoCompleteTextBox corrupts the list of remaining autocomplete values - selecting an autocomplete value with the mouse and not keybord is not working properly
author souliane <souliane@mailoo.org>
date Sat, 09 Nov 2013 09:38:17 +0100
parents 63e9b680d3e7
children a6b3715f0bd6
comparison
equal deleted inserted replaced
253:19153af4f327 254:28d3315a8003
109 self.removeStyleName('dragover') 109 self.removeStyleName('dragover')
110 return 110 return
111 widgets_panel.removeWidget(_new_panel) 111 widgets_panel.removeWidget(_new_panel)
112 elif item_type in self.drop_keys: 112 elif item_type in self.drop_keys:
113 _new_panel = self.drop_keys[item_type](self.host, item) 113 _new_panel = self.drop_keys[item_type](self.host, item)
114 elif item_type == "RECIPIENT_TEXTBOX": 114 elif item_type == "CONTACT_TEXTBOX":
115 # eventually open a window? 115 # eventually open a window?
116 pass 116 pass
117 else: 117 else:
118 print "WARNING: unmanaged item type" 118 print "WARNING: unmanaged item type"
119 return 119 return
621 return 621 return
622 _new_panel = LiberviaDragWidget.current 622 _new_panel = LiberviaDragWidget.current
623 _new_panel.getWidgetsPanel().removeWidget(_new_panel) 623 _new_panel.getWidgetsPanel().removeWidget(_new_panel)
624 elif item_type in DropCell.drop_keys: 624 elif item_type in DropCell.drop_keys:
625 _new_panel = DropCell.drop_keys[item_type](self.tab_panel.host, item) 625 _new_panel = DropCell.drop_keys[item_type](self.tab_panel.host, item)
626 elif item_type == "RECIPIENT_TEXTBOX": 626 elif item_type == "CONTACT_TEXTBOX":
627 # eventually open a window? 627 # eventually open a window?
628 pass 628 pass
629 else: 629 else:
630 print "WARNING: unmanaged item type" 630 print "WARNING: unmanaged item type"
631 return 631 return