Rework zeroconf menu.
This commit is contained in:
parent
003fc8fd24
commit
86177e8536
|
@ -9,7 +9,7 @@
|
||||||
<property name="label" translatable="yes">Start _Chat</property>
|
<property name="label" translatable="yes">Start _Chat</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<child internal-child="image">
|
<child internal-child="image">
|
||||||
<widget class="GtkImage" id="image1534">
|
<widget class="GtkImage" id="image1701">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-jump-to</property>
|
<property name="stock">gtk-jump-to</property>
|
||||||
<property name="icon_size">1</property>
|
<property name="icon_size">1</property>
|
||||||
|
@ -18,38 +18,56 @@
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkImageMenuItem" id="rename_menuitem">
|
<widget class="GtkImageMenuItem" id="send_file_menuitem">
|
||||||
<property name="label" translatable="yes">_Rename</property>
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">Send _File</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<child internal-child="image">
|
<child internal-child="image">
|
||||||
<widget class="GtkImage" id="image1535">
|
<widget class="GtkImage" id="image1706">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-refresh</property>
|
<property name="stock">gtk-save</property>
|
||||||
<property name="icon_size">1</property>
|
<property name="icon_size">1</property>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<widget class="GtkMenuItem" id="edit_groups_menuitem">
|
|
||||||
<property name="label" translatable="yes">Edit _Groups</property>
|
|
||||||
<property name="use_underline">True</property>
|
|
||||||
</widget>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkSeparatorMenuItem" id="above_send_file_separator">
|
<widget class="GtkSeparatorMenuItem" id="above_send_file_separator">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkImageMenuItem" id="send_file_menuitem">
|
<widget class="GtkImageMenuItem" id="manage_contact">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="label" translatable="yes">Send _File</property>
|
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||||
|
<property name="label" translatable="yes">_Manage Contact</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkMenu" id="menu2">
|
||||||
|
<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>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkImageMenuItem" id="rename_menuitem">
|
||||||
|
<property name="label" translatable="yes">_Rename</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<child internal-child="image">
|
<child internal-child="image">
|
||||||
<widget class="GtkImage" id="image1536">
|
<widget class="GtkImage" id="image1705">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-missing-image</property>
|
<property name="stock">gtk-refresh</property>
|
||||||
|
<property name="icon_size">1</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkImageMenuItem" id="edit_groups_menuitem">
|
||||||
|
<property name="label" translatable="yes">Edit _Groups</property>
|
||||||
|
<property name="use_underline">True</property>
|
||||||
|
<child internal-child="image">
|
||||||
|
<widget class="GtkImage" id="menu-item-image21">
|
||||||
|
<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="stock">gtk-edit</property>
|
||||||
<property name="icon_size">1</property>
|
<property name="icon_size">1</property>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
|
@ -61,9 +79,9 @@
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<signal name="activate" handler="on_assign_openpgp_key_menuitem_activate"/>
|
<signal name="activate" handler="on_assign_openpgp_key_menuitem_activate"/>
|
||||||
<child internal-child="image">
|
<child internal-child="image">
|
||||||
<widget class="GtkImage" id="image1537">
|
<widget class="GtkImage" id="image1707">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-missing-image</property>
|
<property name="stock">gtk-dialog-authentication</property>
|
||||||
<property name="icon_size">1</property>
|
<property name="icon_size">1</property>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
|
@ -71,12 +89,11 @@
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkImageMenuItem" id="add_special_notification_menuitem">
|
<widget class="GtkImageMenuItem" id="add_special_notification_menuitem">
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="no_show_all">True</property>
|
<property name="no_show_all">True</property>
|
||||||
<property name="label" translatable="yes">Add Special _Notification</property>
|
<property name="label" translatable="yes">Add Special _Notification</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<child internal-child="image">
|
<child internal-child="image">
|
||||||
<widget class="GtkImage" id="image1538">
|
<widget class="GtkImage" id="image1708">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-info</property>
|
<property name="stock">gtk-info</property>
|
||||||
<property name="icon_size">1</property>
|
<property name="icon_size">1</property>
|
||||||
|
@ -84,8 +101,20 @@
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
<child internal-child="image">
|
||||||
|
<widget class="GtkImage" id="menu-item-image19">
|
||||||
|
<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="stock">gtk-properties</property>
|
||||||
|
<property name="icon_size">1</property>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
|
</widget>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkSeparatorMenuItem" id="above_information_separator">
|
<widget class="GtkSeparatorMenuItem" id="separator6">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
|
@ -101,7 +130,7 @@
|
||||||
<property name="label" translatable="yes">_History</property>
|
<property name="label" translatable="yes">_History</property>
|
||||||
<property name="use_underline">True</property>
|
<property name="use_underline">True</property>
|
||||||
<child internal-child="image">
|
<child internal-child="image">
|
||||||
<widget class="GtkImage" id="image1539">
|
<widget class="GtkImage" id="image1718">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
<property name="stock">gtk-justify-fill</property>
|
<property name="stock">gtk-justify-fill</property>
|
||||||
<property name="icon_size">1</property>
|
<property name="icon_size">1</property>
|
||||||
|
|
|
@ -1984,7 +1984,6 @@ class RosterWindow:
|
||||||
above_information_separator = xml.get_widget(
|
above_information_separator = xml.get_widget(
|
||||||
'above_information_separator')
|
'above_information_separator')
|
||||||
|
|
||||||
# skip a separator
|
|
||||||
information_menuitem = xml.get_widget('information_menuitem')
|
information_menuitem = xml.get_widget('information_menuitem')
|
||||||
history_menuitem = xml.get_widget('history_menuitem')
|
history_menuitem = xml.get_widget('history_menuitem')
|
||||||
|
|
||||||
|
@ -2014,7 +2013,7 @@ class RosterWindow:
|
||||||
if contact.resource:
|
if contact.resource:
|
||||||
send_file_menuitem.connect('activate',
|
send_file_menuitem.connect('activate',
|
||||||
self.on_send_file_menuitem_activate, account, contact)
|
self.on_send_file_menuitem_activate, account, contact)
|
||||||
else: # if we do not have resource we cannot send file
|
else: # if we do no have resource we cannot do much
|
||||||
send_file_menuitem.set_sensitive(False)
|
send_file_menuitem.set_sensitive(False)
|
||||||
|
|
||||||
rename_menuitem.connect('activate', self.on_rename, iter, tree_path)
|
rename_menuitem.connect('activate', self.on_rename, iter, tree_path)
|
||||||
|
@ -2676,6 +2675,11 @@ class RosterWindow:
|
||||||
status_menuitems.append(status_menuitem)
|
status_menuitems.append(status_menuitem)
|
||||||
menu.append(send_custom_status_menuitem)
|
menu.append(send_custom_status_menuitem)
|
||||||
|
|
||||||
|
# there is no singlemessage and custom status for zeroconf
|
||||||
|
if gajim.config.get_per('accounts', account, 'is_zeroconf'):
|
||||||
|
send_custom_status_menuitem.set_sensitive(False)
|
||||||
|
send_group_message_item.set_sensitive(False)
|
||||||
|
|
||||||
if not group in helpers.special_groups:
|
if not group in helpers.special_groups:
|
||||||
item = gtk.SeparatorMenuItem() # separator
|
item = gtk.SeparatorMenuItem() # separator
|
||||||
menu.append(item)
|
menu.append(item)
|
||||||
|
|
Loading…
Reference in New Issue