From 415f614c7b1d8c2d0f4f5b13bdf993a3a5bec742 Mon Sep 17 00:00:00 2001 From: Denis Fomin Date: Mon, 7 Jan 2013 01:07:08 +0400 Subject: [PATCH] fix contact submenu --- data/gui/contact_context_menu.ui | 315 ++++++++++++++++++++----------- src/conversation_textview.py | 6 +- src/gui_menu_builder.py | 2 +- 3 files changed, 204 insertions(+), 119 deletions(-) diff --git a/data/gui/contact_context_menu.ui b/data/gui/contact_context_menu.ui index dfd28cf14..463098316 100644 --- a/data/gui/contact_context_menu.ui +++ b/data/gui/contact_context_menu.ui @@ -1,12 +1,147 @@ - + - - + + + + True + False + gtk-dialog-authentication + 1 + + + True + False + gtk-orientation-portrait + 1 + + + True + False + gtk-info + 1 + + + True + False + gtk-dialog-question + 1 + + + True + False + gtk-go-up + 1 + + + True + False + gtk-go-down + 1 + + + True + False + gtk-stop + 1 + + + True + False + gtk-stop + 1 + + + True + False + gtk-stop + 1 + + + True + False + gtk-jump-to + 1 + + + True + False + gtk-stop + 1 + + + True + False + gtk-stop + 1 + + + True + False + gtk-add + 1 + + + True + False + gtk-remove + 1 + + + True + False + gtk-justify-fill + 1 + + + True + False + gtk-new + 1 + + + True + False + gtk-save + 1 + + + True + False + gtk-missing-image + 1 + + + True + False + gtk-missing-image + 1 + + + True + False + gtk-execute + 1 + + + True + False + gtk-properties + 1 + + + True + False + gtk-refresh + 1 + + False Start _Chat + False True + False True image2 False @@ -15,7 +150,9 @@ Send Single _Message... + False True + False True image3 False @@ -24,7 +161,9 @@ Send _File... + False True + False True image4 False @@ -33,7 +172,9 @@ In_vite to + False True + False True image5 False @@ -42,7 +183,9 @@ Invite _Contacts + False True + False True image1 False @@ -51,18 +194,23 @@ True + False + False True + False Toggle Open_PGP Encryption True + False True + False Toggle End to End Encryption True @@ -70,18 +218,22 @@ True + False Send Cus_tom Status + False True + False True image6 False True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -90,7 +242,9 @@ E_xecute Command... + False True + False True image7 False @@ -99,7 +253,9 @@ M_anage Contact + False True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True image8 @@ -107,10 +263,13 @@ True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Rename... + False + False True image9 False @@ -119,6 +278,8 @@ Edit _Groups... + False + False True image10 False @@ -127,16 +288,20 @@ Assign Open_PGP Key... + False + False True image11 False - + Set Custom _Avatar... + False True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK True image12 @@ -146,6 +311,8 @@ Add Special _Notification... + False + False True True image13 @@ -155,21 +322,27 @@ True + False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Subscription + False + False True image14 False + False _Allow him/her to see my status + False True + False True image15 False @@ -178,7 +351,9 @@ A_sk to see his/her status + False True + False True image16 False @@ -187,7 +362,9 @@ _Forbid him/her to see my status + False True + False True image17 False @@ -200,7 +377,9 @@ _Unblock + False True + False True image18 False @@ -209,7 +388,9 @@ _Block + False True + False True image19 False @@ -218,6 +399,8 @@ _Unignore + False + False True True image20 @@ -227,6 +410,8 @@ _Ignore + False + False True True image21 @@ -236,6 +421,8 @@ _Add to Roster... + False + False True image22 False @@ -244,6 +431,8 @@ Remo_ve + False + False True image23 False @@ -256,11 +445,14 @@ True + False gtk-info + False + False True True accelgroup1 @@ -269,131 +461,24 @@ _History + False + False True image24 False - - True - gtk-jump-to - 1 - - - True - gtk-new - 1 - - - True - gtk-save - 1 - - - True - gtk-missing-image - 1 - True + False gtk-missing-image 1 - - True - gtk-missing-image - 1 - - - True - gtk-execute - 1 - - - True - gtk-refresh - 1 - True + False gtk-edit 1 - - True - gtk-dialog-authentication - 1 - - - True - gtk-orientation-portrait - 1 - - - True - gtk-info - 1 - - - True - gtk-go-up - 1 - - - True - gtk-go-down - 1 - - - True - gtk-stop - 1 - - - True - gtk-dialog-question - 1 - - - True - gtk-stop - 1 - - - True - gtk-stop - 1 - - - True - gtk-stop - 1 - - - True - gtk-stop - 1 - - - True - gtk-add - 1 - - - True - gtk-remove - 1 - - - True - gtk-properties - 1 - - - True - gtk-justify-fill - 1 - - diff --git a/src/conversation_textview.py b/src/conversation_textview.py index de5be4f79..ffef36e7b 100644 --- a/src/conversation_textview.py +++ b/src/conversation_textview.py @@ -734,7 +734,7 @@ class ConversationTextview(GObject.GObject): menu.prepend(item) separator_menuitem_was_added = True - item = Gtk.ImageMenuItem(Gtk.STOCK_CLEAR) + item = Gtk.ImageMenuItem.new_from_stock(Gtk.STOCK_CLEAR, None) menu.prepend(item) id_ = item.connect('activate', self.clear) self.handlers[id_] = item @@ -745,14 +745,14 @@ class ConversationTextview(GObject.GObject): menu.prepend(item) if not self.used_in_history_window: - item = Gtk.MenuItem(_('_Quote')) + item = Gtk.MenuItem(_('Quote')) id_ = item.connect('activate', self.on_quote) self.handlers[id_] = item menu.prepend(item) _selected_phrase = helpers.reduce_chars_newlines( self.selected_phrase, 25, 2) - item = Gtk.MenuItem(_('_Actions for "%s"') % _selected_phrase) + item = Gtk.MenuItem(_('Actions for "%s"') % _selected_phrase) menu.prepend(item) submenu = Gtk.Menu() item.set_submenu(submenu) diff --git a/src/gui_menu_builder.py b/src/gui_menu_builder.py index fabef8dc8..556de66a7 100644 --- a/src/gui_menu_builder.py +++ b/src/gui_menu_builder.py @@ -91,7 +91,7 @@ def build_invite_submenu(invite_menuitem, list_, ignore_rooms=[]): return invite_to_submenu = Gtk.Menu() invite_menuitem.set_submenu(invite_to_submenu) - invite_to_new_room_menuitem = Gtk.ImageMenuItem(_('_New Group Chat')) + invite_to_new_room_menuitem = Gtk.ImageMenuItem(_('New Group Chat')) icon = Gtk.Image.new_from_stock(Gtk.STOCK_NEW, Gtk.IconSize.MENU) invite_to_new_room_menuitem.set_image(icon) if len(contact_list) > 1: # several resources