Don't show events from buttons in advanced menu, only show them when
triggered via the banner right-click menu.
This commit is contained in:
parent
517d962221
commit
edf8738a39
|
@ -20,7 +20,7 @@
|
|||
</child>
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="send_file_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="label" translatable="yes">Send _File</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="_on_send_file_menuitem_activate"/>
|
||||
|
@ -35,8 +35,8 @@
|
|||
</child>
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="convert_to_groupchat">
|
||||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="label" translatable="yes">Invite _Contacts</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child internal-child="image">
|
||||
|
@ -50,8 +50,8 @@
|
|||
</child>
|
||||
<child>
|
||||
<widget class="GtkSeparatorMenuItem" id="separatormenuitem2">
|
||||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="no_show_all">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
|
@ -118,13 +118,13 @@
|
|||
</child>
|
||||
<child>
|
||||
<widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
|
||||
<property name="visible">True</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="no_show_all">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="information_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="label">gtk-info</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
|
@ -132,8 +132,7 @@
|
|||
</child>
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="history_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Click to see past conversations with this contact</property>
|
||||
<property name="no_show_all">True</property>
|
||||
<property name="label" translatable="yes">_History</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child internal-child="image">
|
||||
|
|
|
@ -755,7 +755,7 @@ class ChatControlBase(MessageControl):
|
|||
|
||||
def on_actions_button_clicked(self, widget):
|
||||
'''popup action menu'''
|
||||
menu = self.prepare_context_menu()
|
||||
menu = self.prepare_context_menu(True)
|
||||
menu.show_all()
|
||||
gtkgui_helpers.popup_emoticons_under_button(menu, widget,
|
||||
self.parent_win)
|
||||
|
@ -1735,7 +1735,7 @@ class ChatControl(ChatControlBase):
|
|||
|
||||
return tab_img
|
||||
|
||||
def prepare_context_menu(self):
|
||||
def prepare_context_menu(self, hide_buttonbar_entries = False):
|
||||
'''sets compact view menuitem active state
|
||||
sets active and sensitivity state for toggle_gpg_menuitem
|
||||
sets sensitivity for history_menuitem (False for tranasports)
|
||||
|
@ -1757,10 +1757,21 @@ class ChatControl(ChatControlBase):
|
|||
send_file_menuitem = xml.get_widget('send_file_menuitem')
|
||||
information_menuitem = xml.get_widget('information_menuitem')
|
||||
convert_to_gc_menuitem = xml.get_widget('convert_to_groupchat')
|
||||
separatormenuitem1 = xml.get_widget('separatormenuitem1')
|
||||
separatormenuitem2 = xml.get_widget('separatormenuitem2')
|
||||
|
||||
muc_icon = gtkgui_helpers.load_icon('muc_active')
|
||||
if muc_icon:
|
||||
convert_to_gc_menuitem.set_image(muc_icon)
|
||||
|
||||
if not hide_buttonbar_entries:
|
||||
history_menuitem.show()
|
||||
send_file_menuitem.show()
|
||||
information_menuitem.show()
|
||||
convert_to_gc_menuitem.show()
|
||||
separatormenuitem1.show()
|
||||
separatormenuitem2.show()
|
||||
|
||||
ag = gtk.accel_groups_from_object(self.parent_win.window)[0]
|
||||
send_file_menuitem.add_accelerator('activate', ag, gtk.keysyms.f, gtk.gdk.CONTROL_MASK,
|
||||
gtk.ACCEL_VISIBLE)
|
||||
|
@ -1794,7 +1805,7 @@ class ChatControl(ChatControlBase):
|
|||
toggle_e2e_menuitem.set_sensitive(not self.gpg_is_active)
|
||||
|
||||
# add_to_roster_menuitem
|
||||
if _('Not in Roster') in contact.groups:
|
||||
if not hide_buttonbar_entries and _('Not in Roster') in contact.groups:
|
||||
add_to_roster_menuitem.show()
|
||||
|
||||
# If we don't have resource, we can't do file transfer
|
||||
|
|
Loading…
Reference in New Issue