Moved the menubar to GtkBuilder.

This commit is contained in:
Pedro Algarvio 2011-07-06 19:29:27 +01:00
parent 367631c9aa
commit 90fb40b741
4 changed files with 425 additions and 469 deletions

View File

@ -1,151 +1,185 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?> <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd"> <interface>
<!--Generated with glade3 3.4.5 on Mon Aug 4 18:09:16 2008 --> <requires lib="gtk+" version="2.16"/>
<glade-interface> <!-- interface-naming-policy toplevel-contextual -->
<widget class="GtkDialog" id="move_storage_dialog"> <object class="GtkDialog" id="move_storage_dialog">
<property name="width_request">500</property> <property name="width_request">500</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="border_width">5</property> <property name="border_width">5</property>
<property name="title" translatable="yes">Move Storage</property> <property name="title" translatable="yes">Move Storage</property>
<property name="window_position">GTK_WIN_POS_CENTER_ON_PARENT</property> <property name="window_position">center-on-parent</property>
<property name="destroy_with_parent">True</property> <property name="destroy_with_parent">True</property>
<property name="type_hint">GDK_WINDOW_TYPE_HINT_DIALOG</property> <property name="type_hint">dialog</property>
<property name="has_separator">False</property>
<child internal-child="vbox"> <child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox4"> <object class="GtkVBox" id="dialog-vbox4">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="spacing">2</property> <property name="spacing">2</property>
<child>
<widget class="GtkVBox" id="vbox1">
<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="spacing">5</property>
<child>
<widget class="GtkHBox" id="hbox1">
<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="spacing">5</property>
<child>
<widget class="GtkImage" id="image1">
<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-save-as</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label1">
<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">&lt;b&gt;Move Storage&lt;/b&gt;</property>
<property name="use_markup">True</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkHSeparator" id="hseparator1">
<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>
<packing>
<property name="expand">False</property>
<property name="position">1</property>
</packing>
</child>
<child>
<widget class="GtkHBox" id="hbox2">
<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="spacing">5</property>
<child>
<widget class="GtkLabel" id="label2">
<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">Destination:</property>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
</packing>
</child>
<child>
<widget class="GtkEntry" id="entry_destination">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
<property name="is_focus">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="activates_default">True</property>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
<child internal-child="action_area"> <child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area4"> <object class="GtkHButtonBox" id="dialog-action_area4">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property> <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="layout_style">GTK_BUTTONBOX_END</property> <property name="layout_style">end</property>
<child> <child>
<widget class="GtkButton" id="button_cancel"> <object class="GtkButton" id="button_cancel">
<property name="label">gtk-cancel</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="receives_default">True</property> <property name="receives_default">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="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="no">gtk-cancel</property> <property name="use_action_appearance">False</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>
<property name="response_id">-6</property> </object>
</widget> <packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child> </child>
<child> <child>
<widget class="GtkButton" id="button_ok"> <object class="GtkButton" id="button_ok">
<property name="label">gtk-ok</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="can_default">True</property> <property name="can_default">True</property>
<property name="has_default">True</property> <property name="has_default">True</property>
<property name="receives_default">True</property> <property name="receives_default">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="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="label" translatable="no">gtk-ok</property> <property name="use_action_appearance">False</property>
<property name="use_stock">True</property> <property name="use_stock">True</property>
<property name="response_id">-5</property> </object>
</widget>
<packing> <packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property> <property name="position">1</property>
</packing> </packing>
</child> </child>
</widget> </object>
<packing> <packing>
<property name="expand">False</property> <property name="expand">False</property>
<property name="pack_type">GTK_PACK_END</property> <property name="fill">True</property>
<property name="pack_type">end</property>
<property name="position">0</property>
</packing> </packing>
</child> </child>
</widget> <child>
<object class="GtkVBox" id="vbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="spacing">5</property>
<child>
<object class="GtkHBox" id="hbox1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="spacing">5</property>
<child>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can_focus">False</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-save-as</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="label1">
<property name="visible">True</property>
<property name="can_focus">False</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">&lt;b&gt;Move Storage&lt;/b&gt;</property>
<property name="use_markup">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkHSeparator" id="hseparator1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkHBox" id="hbox2">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="spacing">5</property>
<child>
<object class="GtkLabel" id="label2">
<property name="visible">True</property>
<property name="can_focus">False</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">Destination:</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="entry_destination">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="has_focus">True</property>
<property name="is_focus">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="activates_default">True</property>
<property name="primary_icon_activatable">False</property>
<property name="secondary_icon_activatable">False</property>
<property name="primary_icon_sensitive">True</property>
<property name="secondary_icon_sensitive">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">False</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child> </child>
</widget> <action-widgets>
</glade-interface> <action-widget response="-6">button_cancel</action-widget>
<action-widget response="-5">button_ok</action-widget>
</action-widgets>
</object>
</interface>

View File

@ -1,329 +0,0 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE glade-interface SYSTEM "glade-2.0.dtd">
<!--*- mode: xml -*-->
<glade-interface>
<widget class="GtkMenu" id="torrent_menu">
<property name="visible">True</property>
<child>
<widget class="GtkImageMenuItem" id="menuitem_open_folder">
<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">_Open Folder</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_menuitem_open_folder_activate"/>
<child internal-child="image">
<widget class="GtkImage" id="menu-item-image7">
<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-open</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator4">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="menuitem_pause">
<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">_Pause</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_menuitem_pause_activate"/>
<child internal-child="image">
<widget class="GtkImage" id="menu-item-image14">
<property name="stock">gtk-media-pause</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="menuitem_resume">
<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="tooltip" translatable="yes">Resume selected torrents.</property>
<property name="label" translatable="yes">Resu_me</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_menuitem_resume_activate"/>
<child internal-child="image">
<widget class="GtkImage" id="menu-item-image13">
<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-media-play</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator2">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="menuitem_options">
<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">Opt_ions</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="menu-item-image18">
<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-preferences</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator_menuitem16">
<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="GtkImageMenuItem" id="menuitem_queue">
<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">_Queue</property>
<property name="use_underline">True</property>
<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-sort-descending</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="menuitem1">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="menuitem_updatetracker">
<property name="visible">True</property>
<property name="label" translatable="yes">_Update Tracker</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_menuitem_updatetracker_activate"/>
<child internal-child="image">
<widget class="GtkImage" id="menu-item-image5">
<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-refresh</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="menuitem_edittrackers">
<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">_Edit Trackers</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_menuitem_edittrackers_activate"/>
<child internal-child="image">
<widget class="GtkImage" id="menu-item-image12">
<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>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator1">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="menuitem_remove">
<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">_Remove Torrent</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_menuitem_remove_activate"/>
<child internal-child="image">
<widget class="GtkImage" id="menu-item-image9">
<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-remove</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkSeparatorMenuItem" id="separator3">
<property name="visible">True</property>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="menuitem_recheck">
<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">_Force Re-check</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_menuitem_recheck_activate"/>
<child internal-child="image">
<widget class="GtkImage" id="menu-item-image6">
<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-redo</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="menuitem_move">
<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">Move _Storage</property>
<property name="use_underline">True</property>
<signal name="activate" handler="on_menuitem_move_activate"/>
<child internal-child="image">
<widget class="GtkImage" id="menu-item-image8">
<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-save-as</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
</widget>
<widget class="GtkMenu" id="options_torrent_menu">
<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="menuitem_down_speed">
<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">_Download Speed Limit</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="download-limit-image">
<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="GtkImageMenuItem" id="menuitem_up_speed">
<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">_Upload Speed Limit</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="upload-limit-image">
<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="GtkImageMenuItem" id="menuitem_max_connections">
<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">_Connection Limit</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="menu-item-image16">
<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-network</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="menuitem_upload_slots">
<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">Upload _Slot Limit</property>
<property name="use_underline">True</property>
<child internal-child="image">
<widget class="GtkImage" id="menu-item-image17">
<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-sort-ascending</property>
<property name="icon_size">1</property>
</widget>
</child>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="menuitem_auto_managed">
<property name="visible">True</property>
<property name="label" translatable="yes">_Auto Managed</property>
<property name="use_underline">True</property>
</widget>
</child>
<child>
<widget class="GtkMenuItem" id="menuitem_change_owner">
<property name="visible">False</property>
<property name="label" translatable="yes">_Change Ownership</property>
<property name="use_underline">True</property>
</widget>
</child>
</widget>
<widget class="GtkMenu" id="queue_torrent_menu">
<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="menuitem_queue_top">
<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">gtk-goto-top</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_menuitem_queue_top_activate"/>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="menuitem_queue_up">
<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">gtk-go-up</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_menuitem_queue_up_activate"/>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="menuitem_queue_down">
<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">gtk-go-down</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_menuitem_queue_down_activate"/>
</widget>
</child>
<child>
<widget class="GtkImageMenuItem" id="menuitem_queue_bottom">
<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">gtk-goto-bottom</property>
<property name="use_underline">True</property>
<property name="use_stock">True</property>
<signal name="activate" handler="on_menuitem_queue_bottom_activate"/>
</widget>
</child>
</widget>
</glade-interface>

View File

@ -0,0 +1,242 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<requires lib="gtk+" version="2.16"/>
<!-- interface-naming-policy toplevel-contextual -->
<object class="GtkImage" id="menu-item-image12">
<property name="visible">True</property>
<property name="can_focus">False</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>
</object>
<object class="GtkImage" id="menu-item-image13">
<property name="visible">True</property>
<property name="can_focus">False</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-media-play</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="menu-item-image14">
<property name="can_focus">False</property>
<property name="stock">gtk-media-pause</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="menu-item-image18">
<property name="visible">True</property>
<property name="can_focus">False</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-preferences</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="menu-item-image19">
<property name="visible">True</property>
<property name="can_focus">False</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-sort-descending</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="menu-item-image5">
<property name="visible">True</property>
<property name="can_focus">False</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-refresh</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="menu-item-image6">
<property name="visible">True</property>
<property name="can_focus">False</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-redo</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="menu-item-image7">
<property name="visible">True</property>
<property name="can_focus">False</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-open</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="menu-item-image8">
<property name="visible">True</property>
<property name="can_focus">False</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-save-as</property>
<property name="icon-size">1</property>
</object>
<object class="GtkImage" id="menu-item-image9">
<property name="visible">True</property>
<property name="can_focus">False</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-remove</property>
<property name="icon-size">1</property>
</object>
<object class="GtkMenu" id="torrent_menu">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkImageMenuItem" id="menuitem_open_folder">
<property name="label" translatable="yes">_Open Folder</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="image">menu-item-image7</property>
<property name="use_stock">False</property>
<signal name="activate" handler="on_menuitem_open_folder_activate" swapped="no"/>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separator4">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menuitem_pause">
<property name="label">_Pause</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="image">menu-item-image14</property>
<property name="use_stock">False</property>
<signal name="activate" handler="on_menuitem_pause_activate" swapped="no"/>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menuitem_resume">
<property name="label" translatable="yes">Resu_me</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="tooltip_text" translatable="yes">Resume selected torrents.</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="image">menu-item-image13</property>
<property name="use_stock">False</property>
<signal name="activate" handler="on_menuitem_resume_activate" swapped="no"/>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separator2">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menuitem_options">
<property name="label" translatable="yes">Opt_ions</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="image">menu-item-image18</property>
<property name="use_stock">False</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separator_menuitem16">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menuitem_queue">
<property name="label" translatable="yes">_Queue</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="image">menu-item-image19</property>
<property name="use_stock">False</property>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="menuitem1">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menuitem_updatetracker">
<property name="label" translatable="yes">_Update Tracker</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="image">menu-item-image5</property>
<property name="use_stock">False</property>
<signal name="activate" handler="on_menuitem_updatetracker_activate" swapped="no"/>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menuitem_edittrackers">
<property name="label" translatable="yes">_Edit Trackers</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="image">menu-item-image12</property>
<property name="use_stock">False</property>
<signal name="activate" handler="on_menuitem_edittrackers_activate" swapped="no"/>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separator1">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menuitem_remove">
<property name="label" translatable="yes">_Remove Torrent</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="image">menu-item-image9</property>
<property name="use_stock">False</property>
<signal name="activate" handler="on_menuitem_remove_activate" swapped="no"/>
</object>
</child>
<child>
<object class="GtkSeparatorMenuItem" id="separator3">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menuitem_recheck">
<property name="label" translatable="yes">_Force Re-check</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="image">menu-item-image6</property>
<property name="use_stock">False</property>
<signal name="activate" handler="on_menuitem_recheck_activate" swapped="no"/>
</object>
</child>
<child>
<object class="GtkImageMenuItem" id="menuitem_move">
<property name="label" translatable="yes">Move _Storage</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
<property name="use_action_appearance">False</property>
<property name="use_underline">True</property>
<property name="image">menu-item-image8</property>
<property name="use_stock">False</property>
<signal name="activate" handler="on_menuitem_move_activate" swapped="no"/>
</object>
</child>
</object>
</interface>

View File

@ -38,7 +38,6 @@ import os.path
import pygtk import pygtk
pygtk.require('2.0') pygtk.require('2.0')
import gtk import gtk
import gtk.glade
import logging import logging
import deluge.error import deluge.error
@ -58,20 +57,29 @@ class MenuBar(component.Component):
self.window = component.get("MainWindow") self.window = component.get("MainWindow")
self.config = ConfigManager("gtkui.conf") self.config = ConfigManager("gtkui.conf")
self.builder = gtk.Builder()
# Get the torrent menu from the glade file # Get the torrent menu from the glade file
self.torrentmenu_glade = gtk.glade.XML(deluge.common.resource_filename( self.builder.add_from_file(deluge.common.resource_filename(
"deluge.ui.gtkui", os.path.join("glade", "torrent_menu.glade")) "deluge.ui.gtkui", os.path.join("glade", "torrent_menu.ui")
) ))
# Get the torrent options menu from the glade file
self.builder.add_from_file(deluge.common.resource_filename(
"deluge.ui.gtkui", os.path.join("glade", "torrent_menu.options.ui")
))
# Get the torrent queue menu from the glade file
self.builder.add_from_file(deluge.common.resource_filename(
"deluge.ui.gtkui", os.path.join("glade", "torrent_menu.queue.ui")
))
self.torrentmenu_glade.get_widget("menuitem_queue").set_submenu( self.builder.get_object("menuitem_queue").set_submenu(
self.torrentmenu_glade.get_widget("queue_torrent_menu")) self.builder.get_object("queue_torrent_menu"))
# Attach options torrent menu # Attach options torrent menu
self.torrentmenu_glade.get_widget("menuitem_options").set_submenu( self.builder.get_object("menuitem_options").set_submenu(
self.torrentmenu_glade.get_widget("options_torrent_menu")) self.builder.get_object("options_torrent_menu"))
self.torrentmenu_glade.get_widget("download-limit-image").set_from_file( self.builder.get_object("download-limit-image").set_from_file(
deluge.common.get_pixmap("downloading16.png")) deluge.common.get_pixmap("downloading16.png"))
self.torrentmenu_glade.get_widget("upload-limit-image").set_from_file( self.builder.get_object("upload-limit-image").set_from_file(
deluge.common.get_pixmap("seeding16.png")) deluge.common.get_pixmap("seeding16.png"))
for menuitem in ("menuitem_down_speed", "menuitem_up_speed", for menuitem in ("menuitem_down_speed", "menuitem_up_speed",
@ -86,7 +94,7 @@ class MenuBar(component.Component):
item.connect("activate", self.on_menuitem_set_other) item.connect("activate", self.on_menuitem_set_other)
submenu.append(item) submenu.append(item)
submenu.show_all() submenu.show_all()
self.torrentmenu_glade.get_widget(menuitem).set_submenu(submenu) self.builder.get_object(menuitem).set_submenu(submenu)
submenu = gtk.Menu() submenu = gtk.Menu()
item = gtk.MenuItem(_("On")) item = gtk.MenuItem(_("On"))
@ -96,9 +104,9 @@ class MenuBar(component.Component):
item.connect("activate", self.on_menuitem_set_automanaged_off) item.connect("activate", self.on_menuitem_set_automanaged_off)
submenu.append(item) submenu.append(item)
submenu.show_all() submenu.show_all()
self.torrentmenu_glade.get_widget("menuitem_auto_managed").set_submenu(submenu) self.builder.get_object("menuitem_auto_managed").set_submenu(submenu)
self.torrentmenu = self.torrentmenu_glade.get_widget("torrent_menu") self.torrentmenu = self.builder.get_object("torrent_menu")
self.menu_torrent = self.window.main_glade.get_widget("menu_torrent") self.menu_torrent = self.window.main_glade.get_widget("menu_torrent")
# Attach the torrent_menu to the Torrent file menu # Attach the torrent_menu to the Torrent file menu
@ -149,7 +157,7 @@ class MenuBar(component.Component):
"on_menuitem_sidebar_trackers_toggled":self.on_menuitem_sidebar_trackers_toggled "on_menuitem_sidebar_trackers_toggled":self.on_menuitem_sidebar_trackers_toggled
}) })
self.torrentmenu_glade.signal_autoconnect({ self.builder.connect_signals({
## Torrent Menu ## Torrent Menu
"on_menuitem_pause_activate": self.on_menuitem_pause_activate, "on_menuitem_pause_activate": self.on_menuitem_pause_activate,
"on_menuitem_resume_activate": self.on_menuitem_resume_activate, "on_menuitem_resume_activate": self.on_menuitem_resume_activate,
@ -191,11 +199,11 @@ class MenuBar(component.Component):
] ]
if not client.is_localhost(): if not client.is_localhost():
for widget in non_remote_items: for widget in non_remote_items:
self.torrentmenu_glade.get_widget(widget).hide() self.builder.get_object(widget).hide()
self.torrentmenu_glade.get_widget(widget).set_no_show_all(True) self.builder.get_object(widget).set_no_show_all(True)
else: else:
for widget in non_remote_items: for widget in non_remote_items:
self.torrentmenu_glade.get_widget(widget).set_no_show_all(False) self.builder.get_object(widget).set_no_show_all(False)
if not self.config["classic_mode"]: if not self.config["classic_mode"]:
self.window.main_glade.get_widget("separatormenuitem").show() self.window.main_glade.get_widget("separatormenuitem").show()
@ -354,14 +362,15 @@ class MenuBar(component.Component):
def show_move_storage_dialog(self, status): def show_move_storage_dialog(self, status):
log.debug("show_move_storage_dialog") log.debug("show_move_storage_dialog")
glade = gtk.glade.XML(deluge.common.resource_filename( builder = gtk.Builder()
"deluge.ui.gtkui", os.path.join("glade", "move_storage_dialog.glade") builder.add_from_file(deluge.common.resource_filename(
"deluge.ui.gtkui", os.path.join("glade", "move_storage_dialog.ui")
)) ))
# Keep it referenced: # Keep it referenced:
# https://bugzilla.gnome.org/show_bug.cgi?id=546802 # https://bugzilla.gnome.org/show_bug.cgi?id=546802
self.move_storage_dialog = glade.get_widget("move_storage_dialog") self.move_storage_dialog = builder.get_object("move_storage_dialog")
self.move_storage_dialog.set_transient_for(self.window.window) self.move_storage_dialog.set_transient_for(self.window.window)
self.move_storage_dialog_entry = glade.get_widget("entry_destination") self.move_storage_dialog_entry = builder.get_object("entry_destination")
self.move_storage_dialog_entry.set_text(status["save_path"]) self.move_storage_dialog_entry.set_text(status["save_path"])
def on_dialog_response_event(widget, response_id): def on_dialog_response_event(widget, response_id):
@ -518,7 +527,7 @@ class MenuBar(component.Component):
if len(known_accounts) <= 1: if len(known_accounts) <= 1:
return return
self.torrentmenu_glade.get_widget("menuitem_change_owner").set_visible(True) self.builder.get_object("menuitem_change_owner").set_visible(True)
self.change_owner_submenu = gtk.Menu() self.change_owner_submenu = gtk.Menu()
self.change_owner_submenu_items = {} self.change_owner_submenu_items = {}
@ -536,13 +545,13 @@ class MenuBar(component.Component):
self.change_owner_submenu.show_all() self.change_owner_submenu.show_all()
self.change_owner_submenu_items[None].set_active(True) self.change_owner_submenu_items[None].set_active(True)
self.change_owner_submenu_items[None].hide() self.change_owner_submenu_items[None].hide()
self.torrentmenu_glade.get_widget("menuitem_change_owner").connect( self.builder.get_object("menuitem_change_owner").connect(
"activate", self._on_change_owner_submenu_active "activate", self._on_change_owner_submenu_active
) )
self.torrentmenu_glade.get_widget("menuitem_change_owner").set_submenu(self.change_owner_submenu) self.builder.get_object("menuitem_change_owner").set_submenu(self.change_owner_submenu)
def _on_known_accounts_fail(self, reason): def _on_known_accounts_fail(self, reason):
self.torrentmenu_glade.get_widget("menuitem_change_owner").set_visible(False) self.builder.get_object("menuitem_change_owner").set_visible(False)
def _on_change_owner_submenu_active(self, widget): def _on_change_owner_submenu_active(self, widget):
log.debug("_on_change_owner_submenu_active") log.debug("_on_change_owner_submenu_active")