say hi to View menu and GNOME HIG. partially fixes #2150 [code is needed for show/hide transports]

This commit is contained in:
Nikos Kouremenos 2006-09-29 15:13:10 +00:00
parent 091504b40c
commit d72a1ef9b1
2 changed files with 84 additions and 46 deletions

View File

@ -10,7 +10,7 @@
<property name="type">GTK_WINDOW_TOPLEVEL</property>
<property name="window_position">GTK_WIN_POS_NONE</property>
<property name="modal">False</property>
<property name="default_width">150</property>
<property name="default_width">200</property>
<property name="default_height">400</property>
<property name="resizable">True</property>
<property name="destroy_with_parent">False</property>
@ -56,7 +56,7 @@
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1444">
<widget class="GtkImage" id="image1578">
<property name="visible">True</property>
<property name="stock">gtk-jump-to</property>
<property name="icon_size">1</property>
@ -76,7 +76,7 @@
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1445">
<widget class="GtkImage" id="image1579">
<property name="visible">True</property>
<property name="stock">gtk-connect</property>
<property name="icon_size">1</property>
@ -102,7 +102,7 @@
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1446">
<widget class="GtkImage" id="image1580">
<property name="visible">True</property>
<property name="stock">gtk-add</property>
<property name="icon_size">1</property>
@ -122,7 +122,7 @@
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1447">
<widget class="GtkImage" id="image1581">
<property name="visible">True</property>
<property name="stock">gtk-find</property>
<property name="icon_size">1</property>
@ -143,17 +143,6 @@
</widget>
</child>
<child>
<widget class="GtkCheckMenuItem" id="show_offline_contacts_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Show _Offline Contacts</property>
<property name="use_underline">True</property>
<property name="active">False</property>
<signal name="activate" handler="on_show_offline_contacts_menuitem_activate" last_modification_time="Tue, 01 Mar 2005 23:29:52 GMT"/>
<accelerator key="O" modifiers="GDK_CONTROL_MASK" signal="activate"/>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator1">
<property name="visible">True</property>
@ -169,7 +158,7 @@
<accelerator key="Q" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1448">
<widget class="GtkImage" id="image1582">
<property name="visible">True</property>
<property name="stock">gtk-quit</property>
<property name="icon_size">1</property>
@ -205,7 +194,7 @@
<accelerator key="A" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1449">
<widget class="GtkImage" id="image1583">
<property name="visible">True</property>
<property name="stock">gtk-network</property>
<property name="icon_size">1</property>
@ -218,36 +207,14 @@
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="file_transfers_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">File _Transfers</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_file_transfers_menuitem_activate" last_modification_time="Wed, 03 Aug 2005 15:44:28 GMT"/>
<accelerator key="T" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1450">
<property name="visible">True</property>
<property name="stock">gtk-file</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="profile_avatar_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Profile, Avatar</property>
<property name="label" translatable="yes">Profile, A_vatar</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="image1305">
<widget class="GtkImage" id="image1584">
<property name="visible">True</property>
<property name="stock">gtk-properties</property>
<property name="icon_size">1</property>
@ -275,7 +242,7 @@
<accelerator key="P" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1451">
<widget class="GtkImage" id="image1585">
<property name="visible">True</property>
<property name="stock">gtk-preferences</property>
<property name="icon_size">1</property>
@ -292,6 +259,69 @@
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="view_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">_View</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_view_menu_activate" last_modification_time="Fri, 29 Sep 2006 14:56:42 GMT"/>
<child>
<widget class="GtkMenu" id="view_menu_menu">
<child>
<widget class="GtkCheckMenuItem" id="show_offline_contacts_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">Show _Offline Contacts</property>
<property name="use_underline">True</property>
<property name="active">False</property>
<signal name="activate" handler="on_show_offline_contacts_menuitem_activate" last_modification_time="Tue, 01 Mar 2005 23:29:52 GMT"/>
<accelerator key="O" modifiers="GDK_CONTROL_MASK" signal="activate"/>
</widget>
</child>
<child>
<widget class="GtkCheckMenuItem" id="show_transports_menu">
<property name="visible">True</property>
<property name="label" translatable="yes">Show Trans_ports</property>
<property name="use_underline">True</property>
<property name="active">False</property>
<signal name="activate" handler="on_show_transports_menu_activate" last_modification_time="Fri, 29 Sep 2006 15:04:53 GMT"/>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator3">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="file_transfers_menuitem">
<property name="visible">True</property>
<property name="label" translatable="yes">File _Transfers</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_file_transfers_menuitem_activate" last_modification_time="Wed, 03 Aug 2005 15:44:28 GMT"/>
<accelerator key="T" modifiers="GDK_CONTROL_MASK" signal="activate"/>
<child internal-child="image">
<widget class="GtkImage" id="image1586">
<property name="visible">True</property>
<property name="stock">gtk-file</property>
<property name="icon_size">1</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<property name="ypad">0</property>
</widget>
</child>
</widget>
</child>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="help_menu">
<property name="visible">True</property>
@ -310,7 +340,7 @@
<signal name="activate" handler="on_contents_menuitem_activate" last_modification_time="Thu, 06 Oct 2005 23:29:10 GMT"/>
<child internal-child="image">
<widget class="GtkImage" id="image1452">
<widget class="GtkImage" id="image1587">
<property name="visible">True</property>
<property name="stock">gtk-help</property>
<property name="icon_size">1</property>

View File

@ -904,11 +904,12 @@ class RosterWindow:
else:
profile_avatar_menuitem.set_sensitive(True)
newitem = gtk.ImageMenuItem(_('Manage Bookmarks...'))
newitem = gtk.ImageMenuItem(_('_Manage Bookmarks...'))
img = gtk.image_new_from_stock(gtk.STOCK_PREFERENCES,
gtk.ICON_SIZE_MENU)
newitem.set_image(img)
newitem.connect('activate', self.on_manage_bookmarks_menuitem_activate)
newitem.connect('activate',
self.on_manage_bookmarks_menuitem_activate)
gc_sub_menu.append(newitem)
gc_sub_menu.show_all()
@ -2698,6 +2699,13 @@ _('If "%s" accepts this request you will know his or her status.') % jid)
else:
gajim.interface.instances['file_transfers'].window.show_all()
def on_show_transports_menu_activate(self, widget):
#FIXME: implement me
if widget.get_active():
print 'show transports group IF NEEDED'
else:
print 'hide transports group IF NEEDED'
def on_manage_bookmarks_menuitem_activate(self, widget):
config.ManageBookmarksWindow()