changeset 4295a9ff02bb in /home/hg/repos/gajim
details:http://hg.gajim.org/gajim?cmd=changeset;node=4295a9ff02bb description: Backed out changeset: 5bbc88f23675
diffstat:
data/gui/systray_context_menu.ui | 91 ++++++++++++++------------------------- src/roster_window.py | 39 +++++----------- src/statusicon.py | 10 ++-- 3 files changed, 51 insertions(+), 89 deletions(-)
diffs (truncated from 368 to 300 lines):
diff -r 3a0f3f363857 -r 4295a9ff02bb data/gui/systray_context_menu.ui --- a/data/gui/systray_context_menu.ui Tue Jan 08 14:13:52 2013 +0400 +++ b/data/gui/systray_context_menu.ui Tue Jan 08 14:36:10 2013 +0400 @@ -1,45 +1,12 @@ -<?xml version="1.0" encoding="UTF-8"?> +<?xml version="1.0"?> <interface> - <!-- interface-requires gtk+ 3.0 --> - <object class="GtkAccelGroup" id="accelgroup1"/> - <object class="GtkImage" id="image1"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-network</property> - <property name="icon-size">1</property> - </object> - <object class="GtkImage" id="image2"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-jump-to</property> - <property name="icon-size">1</property> - </object> - <object class="GtkImage" id="image3"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-connect</property> - <property name="icon-size">1</property> - </object> - <object class="GtkImage" id="image4"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-new</property> - <property name="icon-size">1</property> - </object> - <object class="GtkImage" id="image5"> - <property name="visible">True</property> - <property name="can_focus">False</property> - <property name="stock">gtk-home</property> - <property name="icon-size">1</property> - </object> + <requires lib="gtk+" version="2.16"/> + <!-- interface-naming-policy toplevel-contextual --> <object class="GtkMenu" id="systray_context_menu"> - <property name="can_focus">False</property> <child> <object class="GtkImageMenuItem" id="status_menu"> <property name="label" translatable="yes">Sta_tus</property> - <property name="use_action_appearance">False</property> <property name="visible">True</property> - <property name="can_focus">False</property> <property name="use_underline">True</property> <property name="image">image1</property> <property name="use_stock">False</property> @@ -49,9 +16,7 @@ <child> <object class="GtkImageMenuItem" id="chat_with_menuitem"> <property name="label" translatable="yes">_Start Chat</property> - <property name="use_action_appearance">False</property> <property name="visible">True</property> - <property name="can_focus">False</property> <property name="use_underline">True</property> <property name="image">image2</property> <property name="use_stock">False</property> @@ -61,9 +26,7 @@ <child> <object class="GtkImageMenuItem" id="join_gc_menuitem"> <property name="label" translatable="yes">_Group Chat</property> - <property name="use_action_appearance">False</property> <property name="visible">True</property> - <property name="can_focus">False</property> <property name="use_underline">True</property> <property name="image">image3</property> <property name="use_stock">False</property> @@ -73,9 +36,7 @@ <child> <object class="GtkImageMenuItem" id="single_message_menuitem"> <property name="label" translatable="yes">Send Single _Message</property> - <property name="use_action_appearance">False</property> <property name="visible">True</property> - <property name="can_focus">False</property> <property name="use_underline">True</property> <property name="image">image4</property> <property name="use_stock">False</property> @@ -85,34 +46,27 @@ <child> <object class="GtkSeparatorMenuItem" id="separator12"> <property name="visible">True</property> - <property name="can_focus">False</property> </object> </child> <child> <object class="GtkMenuItem" id="show_all_events_menuitem"> - <property name="use_action_appearance">False</property> <property name="visible">True</property> - <property name="can_focus">False</property> <property name="label" translatable="yes">Show All Pending _Events</property> <property name="use_underline">True</property> - <signal name="activate" handler="on_show_all_events_menuitem_activate" swapped="no"/> + <signal name="activate" handler="on_show_all_events_menuitem_activate"/> </object> </child> <child> <object class="GtkCheckMenuItem" id="sounds_mute_menuitem"> - <property name="use_action_appearance">False</property> <property name="visible">True</property> - <property name="can_focus">False</property> <property name="label" translatable="yes">Mute Sounds</property> <property name="use_underline">True</property> - <signal name="activate" handler="on_sounds_mute_menuitem_activate" swapped="no"/> + <signal name="activate" handler="on_sounds_mute_menuitem_activate"/> </object> </child> <child> <object class="GtkImageMenuItem" id="show_roster_menuitem"> - <property name="use_action_appearance">False</property> <property name="visible">True</property> - <property name="can_focus">False</property> <property name="use_underline">True</property> <property name="image">image5</property> <property name="use_stock">False</property> @@ -122,32 +76,53 @@ <child> <object class="GtkImageMenuItem" id="preferences_menuitem"> <property name="label">gtk-preferences</property> - <property name="use_action_appearance">False</property> <property name="visible">True</property> - <property name="can_focus">False</property> <property name="use_underline">True</property> <property name="use_stock">True</property> <property name="accel_group">accelgroup1</property> - <signal name="activate" handler="on_preferences_menuitem_activate" swapped="no"/> + <signal name="activate" handler="on_preferences_menuitem_activate"/> </object> </child> <child> <object class="GtkSeparatorMenuItem" id="separator"> <property name="visible">True</property> - <property name="can_focus">False</property> </object> </child> <child> <object class="GtkImageMenuItem" id="quit_menuitem"> <property name="label">gtk-quit</property> - <property name="use_action_appearance">False</property> <property name="visible">True</property> - <property name="can_focus">False</property> <property name="use_underline">True</property> <property name="use_stock">True</property> <property name="accel_group">accelgroup1</property> - <signal name="activate" handler="on_quit_menuitem_activate" swapped="no"/> + <signal name="activate" handler="on_quit_menuitem_activate"/> </object> </child> </object> + <object class="GtkAccelGroup" id="accelgroup1"/> + <object class="GtkImage" id="image1"> + <property name="visible">True</property> + <property name="stock">gtk-network</property> + <property name="icon-size">1</property> + </object> + <object class="GtkImage" id="image2"> + <property name="visible">True</property> + <property name="stock">gtk-jump-to</property> + <property name="icon-size">1</property> + </object> + <object class="GtkImage" id="image3"> + <property name="visible">True</property> + <property name="stock">gtk-connect</property> + <property name="icon-size">1</property> + </object> + <object class="GtkImage" id="image4"> + <property name="visible">True</property> + <property name="stock">gtk-new</property> + <property name="icon-size">1</property> + </object> + <object class="GtkImage" id="image5"> + <property name="visible">True</property> + <property name="stock">gtk-home</property> + <property name="icon-size">1</property> + </object> </interface> diff -r 3a0f3f363857 -r 4295a9ff02bb src/roster_window.py --- a/src/roster_window.py Tue Jan 08 14:13:52 2013 +0400 +++ b/src/roster_window.py Tue Jan 08 14:36:10 2013 +0400 @@ -293,8 +293,8 @@
# Draw all known groups for group in gajim.groups[account]: - self._really_draw_group(group, account) - self._really_draw_account(account) + self.draw_group(group, account) + self.draw_account(account)
self.starting = False
@@ -897,7 +897,7 @@
# update all contacts in the given group if self.regroup: - accounts = list(gajim.connections.keys()) + accounts = gajim.connections.keys() else: accounts = [account, ]
@@ -1122,7 +1122,7 @@ self.model[child_iter][C_NAME] = text
def _really_draw_groups(self): - for ag in list(self.groups_to_draw.values()): + for ag in self.groups_to_draw.values(): acct = ag['account'] grp = ag['group'] self._really_draw_group(grp, acct) @@ -1135,7 +1135,7 @@ return self.groups_to_draw[ag] = {'group': group, 'account': account} if len(self.groups_to_draw) == 1: - GObject.idle_add(self._really_draw_groups) + GObject.timeout_add(200, self._really_draw_groups)
def draw_parent_contact(self, jid, account): child_iters = self._get_contact_iter(jid, account, model=self.model) @@ -1150,13 +1150,7 @@ self.draw_contact(parent_jid, parent_account) return False
- def draw_contact(self, jid, account, selected=False, focus=False, - contact_instances=None, contact=None): - GObject.idle_add(self._really_draw_contact, jid, account, selected, - focus, contact_instances, contact) - - def _really_draw_contact(self, jid, account, selected=False, focus=False, - contact_instances=None, contact=None): + def draw_contact(self, jid, account, selected=False, focus=False, contact_instances=None, contact=None): """ Draw the correct state image, name BUT not avatar """ @@ -1335,10 +1329,6 @@ self.draw_pep(jid, account, pep_type, contact=contact)
def draw_pep(self, jid, account, pep_type, contact=None): - GObject.idle_add(self._really_draw_pep, jid, account, pep_type, - contact) - - def _really_draw_pep(self, jid, account, pep_type, contact=None): if pep_type not in self._pep_type_to_model_column: return if not self._is_pep_shown_in_roster(pep_type): @@ -1358,9 +1348,6 @@ self.model[child_iter][model_column] = pixbuf
def draw_avatar(self, jid, account): - GObject.idle_add(self._really_draw_avatar, jid, account) - - def _really_draw_avatar(self, jid, account): iters = self._get_contact_iter(jid, account, model=self.model) if not iters or not gajim.config.get('show_avatars_in_roster'): return @@ -5611,7 +5598,7 @@ item = Gtk.SeparatorMenuItem.new() sub_menu.append(item)
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('Change Status Message')) + item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Change Status Message')) gtkgui_helpers.add_image_to_menuitem(item, 'gajim-kbd_input') sub_menu.append(item) item.connect('activate', self.on_change_status_message_activate, @@ -5622,7 +5609,7 @@ item = Gtk.SeparatorMenuItem.new() sub_menu.append(item)
- uf_show = helpers.get_uf_show('offline', use_mnemonic=False) + uf_show = helpers.get_uf_show('offline', use_mnemonic=True) item = Gtk.ImageMenuItem(uf_show) icon = state_images['offline'] item.set_image(icon) @@ -5709,7 +5696,7 @@ status_menuitem.set_submenu(sub_menu)
for show in ('online', 'away', 'dnd', 'invisible'): - uf_show = helpers.get_uf_show(show, use_mnemonic=False) + uf_show = helpers.get_uf_show(show, use_mnemonic=True) item = Gtk.ImageMenuItem(uf_show) icon = state_images[show] item.set_image(icon) @@ -5719,7 +5706,7 @@ item = Gtk.SeparatorMenuItem.new() sub_menu.append(item)
- item = Gtk.ImageMenuItem.new_with_mnemonic(_('Change Status Message')) + item = Gtk.ImageMenuItem.new_with_mnemonic(_('_Change Status Message')) gtkgui_helpers.add_image_to_menuitem(item, 'gajim-kbd_input') sub_menu.append(item) item.connect('activate', self.on_change_status_message_activate, @@ -5727,7 +5714,7 @@ if gajim.connections[account].connected < 2: item.set_sensitive(False)
- uf_show = helpers.get_uf_show('offline', use_mnemonic=False) + uf_show = helpers.get_uf_show('offline', use_mnemonic=True) item = Gtk.ImageMenuItem(uf_show)