Cleanup for chat_control_popup. Rename 'Show Frieds' to 'Show Contacts'. Show icon and disable invite functionality for zeroconf contacts.
This commit is contained in:
parent
1682a68e95
commit
3f06402f3d
|
@ -4,28 +4,20 @@
|
|||
<glade-interface>
|
||||
<widget class="GtkMenu" id="chat_control_popup_menu">
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="history_menuitem">
|
||||
<widget class="GtkImageMenuItem" id="add_to_roster_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="tooltip" translatable="yes">Click to see past conversations with this contact</property>
|
||||
<property name="label" translatable="yes">_History</property>
|
||||
<property name="label" translatable="yes">_Add to Roster</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="_on_add_to_roster_menuitem_activate"/>
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1370">
|
||||
<widget class="GtkImage" id="image1372">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-justify-fill</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
<property name="icon_size">1</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="information_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">gtk-info</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="send_file_menuitem">
|
||||
<property name="visible">True</property>
|
||||
|
@ -35,12 +27,33 @@
|
|||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1371">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-file</property>
|
||||
<property name="stock">gtk-save</property>
|
||||
<property name="icon_size">1</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</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="label" translatable="yes">Invite _Contacts</property>
|
||||
<property name="use_underline">True</property>
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="menu-item-image4">
|
||||
<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-missing-image</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</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>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkCheckMenuItem" id="toggle_gpg_menuitem">
|
||||
<property name="visible">True</property>
|
||||
|
@ -59,27 +72,33 @@
|
|||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="add_to_roster_menuitem">
|
||||
<widget class="GtkSeparatorMenuItem" id="separatormenuitem1">
|
||||
<property name="visible">True</property>
|
||||
<property name="label" translatable="yes">_Add to Roster</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkImageMenuItem" id="information_menuitem">
|
||||
<property name="visible">True</property>
|
||||
<property name="label">gtk-info</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</widget>
|
||||
</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="label" translatable="yes">_History</property>
|
||||
<property name="use_underline">True</property>
|
||||
<signal name="activate" handler="_on_add_to_roster_menuitem_activate"/>
|
||||
<child internal-child="image">
|
||||
<widget class="GtkImage" id="image1372">
|
||||
<widget class="GtkImage" id="image1370">
|
||||
<property name="visible">True</property>
|
||||
<property name="stock">gtk-add</property>
|
||||
<property name="stock">gtk-justify-fill</property>
|
||||
<property name="icon_size">1</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</child>
|
||||
<child>
|
||||
<widget class="GtkMenuItem" 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="label" translatable="yes">Invite _Friends</property>
|
||||
<property name="use_underline">True</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
</glade-interface>
|
||||
|
|
|
@ -1583,6 +1583,9 @@ 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')
|
||||
muc_icon = gajim.interface.roster.load_icon('muc_active')
|
||||
if muc_icon:
|
||||
convert_to_gc_menuitem.set_image(muc_icon)
|
||||
|
||||
ag = gtk.accel_groups_from_object(self.parent_win.window)[0]
|
||||
history_menuitem.add_accelerator('activate', ag, gtk.keysyms.h, gtk.gdk.CONTROL_MASK,
|
||||
|
@ -1618,7 +1621,8 @@ class ChatControl(ChatControlBase):
|
|||
send_file_menuitem.set_sensitive(False)
|
||||
|
||||
# check if it's possible to convert to groupchat
|
||||
if gajim.get_transport_name_from_jid(jid):
|
||||
if gajim.get_transport_name_from_jid(jid) or gajim.connections[self.account].\
|
||||
is_zeroconf:
|
||||
convert_to_gc_menuitem.set_sensitive(False)
|
||||
|
||||
# add_to_roster_menuitem
|
||||
|
|
Loading…
Reference in New Issue