diff --git a/deluge/ui/gtkui/aboutdialog.py b/deluge/ui/gtkui/aboutdialog.py index 5c0c0be74..36bb331ac 100644 --- a/deluge/ui/gtkui/aboutdialog.py +++ b/deluge/ui/gtkui/aboutdialog.py @@ -44,7 +44,6 @@ import common class AboutDialog: def __init__(self): - # Get the glade file for the about dialog def url_hook(dialog, url): deluge.common.open_url_in_browser(url) gtk.about_dialog_set_url_hook(url_hook) diff --git a/deluge/ui/gtkui/common.py b/deluge/ui/gtkui/common.py index 1bd5a903e..6ad0ff70e 100644 --- a/deluge/ui/gtkui/common.py +++ b/deluge/ui/gtkui/common.py @@ -40,10 +40,8 @@ import os import pygtk pygtk.require('2.0') import gtk -import gtk.glade import logging -from deluge.ui.client import client import deluge.component as component import deluge.common diff --git a/deluge/ui/gtkui/connectionmanager.py b/deluge/ui/gtkui/connectionmanager.py index fe7e44934..c613a6579 100644 --- a/deluge/ui/gtkui/connectionmanager.py +++ b/deluge/ui/gtkui/connectionmanager.py @@ -135,7 +135,7 @@ class ConnectionManager(component.Component): Show the ConnectionManager dialog. """ self.config = self.__load_config() - # Get the glade file for the connection manager + # Get the gtk builder file for the connection manager self.builder = gtk.Builder() # The main dialog self.builder.add_from_file(deluge.common.resource_filename( @@ -514,7 +514,7 @@ class ConnectionManager(component.Component): if self.running: # When connected to a client, and then trying to connect to another, # this component will be stopped(while the connect deferred is - # runing), so, self.connection_manager will be deleted. + # running), so, self.connection_manager will be deleted. # If that's not the case, close the dialog. self.connection_manager.response(gtk.RESPONSE_OK) component.start() @@ -755,3 +755,10 @@ class ConnectionManager(component.Component): config["hosts"][idx][4] = localclient_password return config + +# # These handlers are defined on the GTK builder file but they were not used on this code. +# # Let's just stop the RuntimeWarning's until we find out if we really needed these handlers. +# def __dummy_gtkbuilder_handler(self, *a, **k): pass +# on_chk_donotshow_toggled = __dummy_gtkbuilder_handler +# on_chk_autostart_toggled = __dummy_gtkbuilder_handler +# on_chk_autoconnect_toggled = __dummy_gtkbuilder_handler diff --git a/deluge/ui/gtkui/details_tab.py b/deluge/ui/gtkui/details_tab.py index 4a79f21fc..ffdeadf27 100644 --- a/deluge/ui/gtkui/details_tab.py +++ b/deluge/ui/gtkui/details_tab.py @@ -33,12 +33,8 @@ # # - -import gtk -import gtk.glade import logging -from deluge.ui.client import client import deluge.component as component from deluge.common import fsize, is_url from deluge.ui.gtkui.torrentdetails import Tab @@ -49,24 +45,24 @@ class DetailsTab(Tab): def __init__(self): Tab.__init__(self) # Get the labels we need to update. - # widgetname, modifier function, status keys - glade = component.get("MainWindow").main_glade + # widget name, modifier function, status keys + builder = component.get("MainWindow").get_builder() self._name = "Details" - self._child_widget = glade.get_widget("details_tab") - self._tab_label = glade.get_widget("details_tab_label") + self._child_widget = builder.get_object("details_tab") + self._tab_label = builder.get_object("details_tab_label") self.label_widgets = [ - (glade.get_widget("summary_name"), None, ("name",)), - (glade.get_widget("summary_total_size"), fsize, ("total_size",)), - (glade.get_widget("summary_num_files"), str, ("num_files",)), - (glade.get_widget("summary_tracker"), None, ("tracker",)), - (glade.get_widget("summary_torrent_path"), None, ("save_path",)), - (glade.get_widget("summary_message"), str, ("message",)), - (glade.get_widget("summary_hash"), str, ("hash",)), - (glade.get_widget("summary_comments"), str, ("comment",)), - (glade.get_widget("summary_owner"), str, ("owner",)), - (glade.get_widget("summary_shared"), str, ("shared",)) + (builder.get_object("summary_name"), None, ("name",)), + (builder.get_object("summary_total_size"), fsize, ("total_size",)), + (builder.get_object("summary_num_files"), str, ("num_files",)), + (builder.get_object("summary_tracker"), None, ("tracker",)), + (builder.get_object("summary_torrent_path"), None, ("save_path",)), + (builder.get_object("summary_message"), str, ("message",)), + (builder.get_object("summary_hash"), str, ("hash",)), + (builder.get_object("summary_comments"), str, ("comment",)), + (builder.get_object("summary_owner"), str, ("owner",)), + (builder.get_object("summary_shared"), str, ("shared",)) ] def update(self): diff --git a/deluge/ui/gtkui/files_tab.py b/deluge/ui/gtkui/files_tab.py index d0a783aaf..265367595 100644 --- a/deluge/ui/gtkui/files_tab.py +++ b/deluge/ui/gtkui/files_tab.py @@ -36,16 +36,13 @@ import gtk import gtk.gdk -import gtk.glade import gobject -import gettext import os.path import cPickle import logging from deluge.ui.gtkui.torrentdetails import Tab from deluge.ui.client import client -from deluge.configmanager import ConfigManager import deluge.configmanager import deluge.component as component import deluge.common @@ -107,13 +104,13 @@ def cell_progress(column, cell, model, row, data): class FilesTab(Tab): def __init__(self): Tab.__init__(self) - glade = component.get("MainWindow").get_glade() + builder = component.get("MainWindow").get_builder() self._name = "Files" - self._child_widget = glade.get_widget("files_tab") - self._tab_label = glade.get_widget("files_tab_label") + self._child_widget = builder.get_object("files_tab") + self._tab_label = builder.get_object("files_tab_label") - self.listview = glade.get_widget("files_listview") + self.listview = builder.get_object("files_listview") # filename, size, progress string, progress value, priority, file index, icon id self.treestore = gtk.TreeStore(str, gobject.TYPE_UINT64, str, float, int, int, str) @@ -190,18 +187,18 @@ class FilesTab(Tab): self.listview.get_selection().set_mode(gtk.SELECTION_MULTIPLE) - self.file_menu = glade.get_widget("menu_file_tab") + self.file_menu = builder.get_object("menu_file_tab") self.file_menu_priority_items = [ - glade.get_widget("menuitem_donotdownload"), - glade.get_widget("menuitem_normal"), - glade.get_widget("menuitem_high"), - glade.get_widget("menuitem_highest"), - glade.get_widget("menuitem_priority_sep") + builder.get_object("menuitem_donotdownload"), + builder.get_object("menuitem_normal"), + builder.get_object("menuitem_high"), + builder.get_object("menuitem_highest"), + builder.get_object("menuitem_priority_sep") ] self.localhost_widgets = [ - glade.get_widget("menuitem_open_file"), - glade.get_widget("menuitem3") + builder.get_object("menuitem_open_file"), + builder.get_object("menuitem3") ] self.listview.connect("row-activated", self._on_row_activated) @@ -217,7 +214,7 @@ class FilesTab(Tab): self.listview.connect("drag_data_get", self._on_drag_data_get_data) self.listview.connect("drag_data_received", self._on_drag_data_received_data) - glade.signal_autoconnect({ + component.get("MainWindow").connect_signals({ "on_menuitem_open_file_activate": self._on_menuitem_open_file_activate, "on_menuitem_donotdownload_activate": self._on_menuitem_donotdownload_activate, "on_menuitem_normal_activate": self._on_menuitem_normal_activate, diff --git a/deluge/ui/gtkui/filtertreeview.py b/deluge/ui/gtkui/filtertreeview.py index 6b886d996..330347096 100644 --- a/deluge/ui/gtkui/filtertreeview.py +++ b/deluge/ui/gtkui/filtertreeview.py @@ -96,9 +96,9 @@ class FilterTreeView(component.Component): def __init__(self): component.Component.__init__(self, "FilterTreeView", interval=2) self.window = component.get("MainWindow") - glade = self.window.main_glade - self.hpaned = glade.get_widget("hpaned") - self.scrolled = glade.get_widget("scrolledwindow_sidebar") + main_builder = self.window.get_builder() + self.hpaned = main_builder.get_object("main_window_hpaned") + self.scrolled = main_builder.get_object("scrolledwindow_sidebar") self.sidebar = component.get("SideBar") self.config = ConfigManager("gtkui.conf") self.tracker_icons = component.get("TrackerIcons") diff --git a/deluge/ui/gtkui/glade/connection_manager.ui b/deluge/ui/gtkui/glade/connection_manager.ui index c10c3acd8..e1b1c36b6 100644 --- a/deluge/ui/gtkui/glade/connection_manager.ui +++ b/deluge/ui/gtkui/glade/connection_manager.ui @@ -290,7 +290,6 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False True - True @@ -307,7 +306,6 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False True - True @@ -324,7 +322,6 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False True - True diff --git a/deluge/ui/gtkui/glade/edit_trackers.ui b/deluge/ui/gtkui/glade/edit_trackers.ui index 817e0b16c..4cd5ab70c 100644 --- a/deluge/ui/gtkui/glade/edit_trackers.ui +++ b/deluge/ui/gtkui/glade/edit_trackers.ui @@ -33,7 +33,6 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False True - False @@ -50,7 +49,6 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False True - False diff --git a/deluge/ui/gtkui/glade/main_window.move_storage.ui b/deluge/ui/gtkui/glade/main_window.move_storage.ui new file mode 100644 index 000000000..d53ad3b59 --- /dev/null +++ b/deluge/ui/gtkui/glade/main_window.move_storage.ui @@ -0,0 +1,234 @@ + + + + + + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + Remove Torrent? + False + center-on-parent + dialog + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + center + + + gtk-cancel + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + True + + + False + False + 0 + + + + + Remove Selected Torrent + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + False + False + 1 + + + + + False + True + end + 0 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 10 + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-dialog-warning + 6 + + + False + False + 0 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <big><b>Are you sure you want to remove the selected torrent?</b></big> + True + True + + + False + False + 1 + + + + + False + False + 0 + + + + + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + False + True + 1 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 15 + + + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-dialog-warning + + + False + False + 1 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + <i>The associated .torrent will be deleted!</i> + True + + + True + True + 1 + + + + + + + True + True + 2 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 15 + + + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + gtk-dialog-warning + + + False + False + 0 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + <i>The downloaded data will be deleted!</i> + True + + + True + True + 1 + + + + + + + True + True + 3 + + + + + False + False + 5 + 1 + + + + + + button_cancel + button_ok + + + diff --git a/deluge/ui/gtkui/glade/main_window.new_release.ui b/deluge/ui/gtkui/glade/main_window.new_release.ui new file mode 100644 index 000000000..0de1ab3f0 --- /dev/null +++ b/deluge/ui/gtkui/glade/main_window.new_release.ui @@ -0,0 +1,246 @@ + + + + + + False + 5 + New Release + center-on-parent + deluge + dialog + + + True + False + 2 + + + True + False + end + + + gtk-close + True + True + True + False + True + + + False + False + 0 + + + + + _Goto Website + True + True + True + False + True + + + False + False + 1 + + + + + False + False + end + 0 + + + + + True + False + 10 + 5 + + + True + False + 5 + + + True + False + gtk-missing-image + + + False + False + 0 + + + + + True + False + <b><big>New Release Available!</big></b> + True + + + False + False + 1 + + + + + False + False + 0 + + + + + True + False + + + False + True + 1 + + + + + True + False + 5 + + + True + False + 3 + 2 + 10 + 2 + + + True + False + + + 1 + 2 + 2 + 3 + + + + + + True + False + 0 + <i>Available Version:</i> + True + + + 2 + 3 + GTK_FILL + + + + + True + False + + + 1 + 2 + + + + + + True + False + 0 + <i>Current Version:</i> + True + + + GTK_FILL + + + + + False + 0 + <i>Server Version</i> + True + + + 1 + 2 + + + + + False + + + 1 + 2 + 1 + 2 + + + + + + + + True + True + 2 + + + + + True + False + 5 + + + Do not show this dialog in the future + True + True + False + False + True + + + + + True + True + 3 + + + + + False + False + 1 + + + + + + button_close_new_release + button_goto_downloads + + + diff --git a/deluge/ui/gtkui/glade/main_window.tabs.menu_file.ui b/deluge/ui/gtkui/glade/main_window.tabs.menu_file.ui new file mode 100644 index 000000000..a926dc2aa --- /dev/null +++ b/deluge/ui/gtkui/glade/main_window.tabs.menu_file.ui @@ -0,0 +1,107 @@ + + + + + + True + False + gtk-zoom-fit + 1 + + + True + False + gtk-no + 1 + + + True + False + gtk-yes + 1 + + + True + False + gtk-go-up + 1 + + + True + False + gtk-goto-top + 1 + + + True + False + + + gtk-open + True + False + False + True + True + accelgroup1 + + + + + True + False + + + + + True + False + False + image1 + False + + + + + True + False + + + + + True + False + False + image2 + False + + + + + True + False + False + image3 + False + + + + + True + False + False + image4 + False + + + + + True + False + False + image5 + False + + + + diff --git a/deluge/ui/gtkui/glade/main_window.tabs.menu_peer.ui b/deluge/ui/gtkui/glade/main_window.tabs.menu_peer.ui new file mode 100644 index 000000000..cf737d50e --- /dev/null +++ b/deluge/ui/gtkui/glade/main_window.tabs.menu_peer.ui @@ -0,0 +1,24 @@ + + + + + + True + False + gtk-add + 1 + + + True + False + + + True + False + False + image1 + False + + + + diff --git a/deluge/ui/gtkui/glade/main_window.glade b/deluge/ui/gtkui/glade/main_window.tabs.ui similarity index 53% rename from deluge/ui/gtkui/glade/main_window.glade rename to deluge/ui/gtkui/glade/main_window.tabs.ui index 829d240d0..9c9495339 100644 --- a/deluge/ui/gtkui/glade/main_window.glade +++ b/deluge/ui/gtkui/glade/main_window.tabs.ui @@ -1,1365 +1,29 @@ - - - - - False - Deluge - - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - False - - - True - False - False - _File - True - - - False - - - _Add Torrent - True - False - False - False - True - False - - - - - - - _Create Torrent - True - False - False - True - False - - - - - - - False - - - - - Quit & _Shutdown Daemon - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - True - False - - - - - - - True - False - - - - - gtk-quit - True - False - False - True - True - - - - - - - - - - True - False - False - _Edit - True - - - True - False - - - gtk-preferences - True - False - False - True - True - - - - - - - _Connection Manager - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - True - False - - - - - - - - - - - False - False - _Torrent - True - - - - - True - False - False - _View - True - - - True - False - - - True - False - False - _Toolbar - True - True - - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - _Sidebar - True - True - - - - - - True - False - False - Status_bar - True - True - - - - - - True - False - - - - - True - False - False - T_abs - True - - - - - True - False - False - _Columns - True - - - - - True - False - False - False - _Find ... - True - - - - - - - True - False - True - False - S_idebar - True - - - True - False - True - - - True - False - False - Show _Zero Hits - True - True - - - - - - True - False - False - Show _Trackers - True - True - - - - - - - - - - - - - - True - False - False - _Help - True - - - False - - - _Homepage - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - True - False - - - - - - _FAQ - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Frequently Asked Questions - False - True - False - - - - - - - _Community - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - True - False - - - - - - True - False - - - - - gtk-about - True - False - False - True - True - - - - - - - - - - False - True - 0 - - - - - True - False - - - True - False - False - True - Add torrent - False - Add Torrent - True - gtk-add - - - - False - True - - - - - True - False - False - True - Remove torrent - False - Remove Torrent - gtk-remove - - - - False - True - - - - - True - False - False - Filter torrents by name. -This will filter torrents for the current selection on the sidebar. - False - _Filter - True - gtk-find - - - - - False - True - - - - - True - False - - - False - - - - - True - False - False - True - Pause the selected torrents - False - Pause - True - gtk-media-pause - - - - False - True - - - - - True - False - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - Resume the selected torrents - False - Resume - gtk-media-play - - - - False - True - - - - - True - False - - - False - - - - - True - False - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - Queue Torrent Up - False - Queue Up - gtk-go-up - - - - False - True - - - - - True - False - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - Queue Torrent Down - False - Queue Down - gtk-go-down - - - - False - True - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - False - - - - - True - False - True - Preferences - False - Preferences - True - gtk-preferences - - - - False - True - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - Connection Manager - False - Connection Manager - gtk-network - - - - False - True - - - - - False - True - 1 - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 2 - - - True - False - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - True - - - False - True - - - - - True - False - - - False - - - True - True - True - True - Close - False - none - - - - True - False - gtk-close - 2 - - - - - False - False - 0 - - - - - True - False - Filter: - - - False - False - 1 - 1 - - - - - 350 - True - True - True - Filter torrents by name. -This will filter torrents for the current selection on the sidebar. - - True - True - False - gtk-clear - True - True - False - True - Clear the search - Clear the search - - - - - False - False - 1 - 2 - - - - - _Match Case - True - True - False - False - True - True - - - - True - True - 1 - 3 - - - - - False - True - 0 - - - - - True - True - automatic - automatic - out - - - True - True - True - False - - - - - True - True - 1 - - - - - True - True - - - - - True - False - - - - - True - False - False - - - False - False - - - - - - - True - True - 2 - - - - - True - False - - - False - False - 3 - - - - - - - True + + + + False - - gtk-open - True - False - False - True - True - - - - - - True - False - - - - - _Expand All - True - False - False - True - False - - - - True - False - gtk-zoom-fit - 1 - - - - - - - True - False - - - - - _Do Not Download - True - False - False - True - False - - - - True - False - gtk-no - 1 - - - - - - - _Normal Priority - True - False - False - True - False - - - - True - False - gtk-yes - 1 - - - - - - - _High Priority - True - False - False - True - False - - - - True - False - gtk-go-up - 1 - - - - - - - Hi_ghest Priority - True - False - False - True - False - - - - True - False - gtk-goto-top - 1 - - - - - - - True - False - - - _Add Peer - True - False - Add a peer by its IP - False - True - False - - - - True - False - gtk-add - 1 - - - - - - - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - Remove Torrent? - False - center-on-parent - dialog - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 2 - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - center - - - gtk-cancel - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - True - - - False - False - 0 - - - - - Remove Selected Torrent - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - - - False - False - 1 - - - - - False - True - end - 0 - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 10 - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-dialog-warning - 6 - - - False - False - 0 - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - <big><b>Are you sure you want to remove the selected torrent?</b></big> - True - True - - - False - False - 1 - - - - - False - False - 0 - - - - - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - False - True - 1 - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 15 - - - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-dialog-warning - - - False - False - 1 - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - <i>The associated .torrent will be deleted!</i> - True - - - True - True - 1 - - - - - - - True - True - 2 - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 15 - - - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-dialog-warning - - - False - False - 0 - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - <i>The downloaded data will be deleted!</i> - True - - - True - True - 1 - - - - - - - True - True - 3 - - - - - False - False - 5 - 1 - - - - - - - False - 5 - New Release - center-on-parent - deluge - dialog - - - True - False - 2 - - - True - False - end - - - gtk-close - True - True - True - False - True - - - False - False - 0 - - - - - _Goto Website - True - True - True - False - True - - - - False - False - 1 - - - - - False - False - end - 0 - - - - - True - False - 10 - 5 - - - True - False - 5 - - - True - False - gtk-missing-image - - - False - False - 0 - - - - - True - False - <b><big>New Release Available!</big></b> - True - - - False - False - 1 - - - - - False - False - 0 - - - - - True - False - - - False - True - 1 - - - - - True - False - 5 - - - True - False - 2 - 2 - 10 - 2 - - - True - False - - - 1 - 2 - 2 - 3 - - - - - - True - False - 0 - <i>Available Version:</i> - True - - - 2 - 3 - GTK_FILL - - - - - True - False - - - 1 - 2 - - - - - - True - False - 0 - <i>Current Version:</i> - True - - - GTK_FILL - - - - - False - 0 - <i>Server Version</i> - True - - - 1 - 2 - - - - - False - - - 1 - 2 - 1 - 2 - - - - - - - - True - True - 2 - - - - - True - False - 5 - - - Do not show this dialog in the future - True - True - False - False - True - - - - - True - True - 3 - - - - - False - False - 1 - - - - - - - False - - + True True - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK automatic never - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK queue none - + True False 10 @@ -1367,22 +31,22 @@ This will filter torrents for the current selection on the sidebar. 15 15 - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 - + True False - + True False True 0.10000000149 - + False False @@ -1392,7 +56,7 @@ This will filter torrents for the current selection on the sidebar. - + False True @@ -1400,7 +64,7 @@ This will filter torrents for the current selection on the sidebar. - + True False 5 @@ -1408,11 +72,11 @@ This will filter torrents for the current selection on the sidebar. 10 5 - + True False 0 - + 5 6 @@ -1422,13 +86,13 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 <b>Auto Managed:</b> True - + 4 5 @@ -1438,11 +102,11 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 - + 7 8 @@ -1452,11 +116,11 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 - + 7 8 @@ -1466,13 +130,13 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 <b>Seed Rank:</b> True - + 6 7 @@ -1482,13 +146,13 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 <b>Seeding Time:</b> True - + 6 7 @@ -1498,11 +162,11 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 - + 7 8 @@ -1510,13 +174,13 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 <b>Active Time:</b> True - + 6 7 @@ -1524,12 +188,12 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 True - + 1 2 @@ -1539,11 +203,11 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 - + 3 4 @@ -1553,14 +217,14 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 True char True - + 1 4 @@ -1570,14 +234,14 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 0 <b>Tracker Status:</b> True - + 4 5 @@ -1586,14 +250,14 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 True char True - + 5 8 @@ -1603,14 +267,14 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 0 <b>Last Seen Complete:</b> True - + 4 5 @@ -1621,13 +285,13 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 True word-char - + 5 6 @@ -1637,14 +301,14 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 1 <b>Availability:</b> True - + 4 5 @@ -1654,11 +318,11 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 - + 3 4 @@ -1668,11 +332,11 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 - + 1 2 @@ -1682,11 +346,11 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 - + 5 6 @@ -1696,13 +360,13 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 <b>Peers:</b> True - + 4 5 @@ -1712,11 +376,11 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 - + 5 6 @@ -1724,13 +388,13 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 <b>Seeders:</b> True - + 4 5 @@ -1738,21 +402,21 @@ This will filter torrents for the current selection on the sidebar. - + True False 15 5 - + True False 0 <b>Pieces:</b> True - + - + 2 3 @@ -1762,21 +426,21 @@ This will filter torrents for the current selection on the sidebar. - + True False 15 5 - + True False 0 <b>ETA:</b> True - + - + 2 3 @@ -1786,21 +450,21 @@ This will filter torrents for the current selection on the sidebar. - + True False 15 5 - + True False 0 <b>Up Speed:</b> True - + - + 2 3 @@ -1810,21 +474,21 @@ This will filter torrents for the current selection on the sidebar. - + True False 15 5 - + True False 0 <b>Down Speed:</b> True - + - + 2 3 @@ -1832,20 +496,20 @@ This will filter torrents for the current selection on the sidebar. - + True False 5 - + True False 0 <b>Next Announce:</b> True - + - + 3 4 @@ -1853,20 +517,20 @@ This will filter torrents for the current selection on the sidebar. - + True False 5 - + True False 0 <b>Share Ratio:</b> True - + - + 2 3 @@ -1874,20 +538,20 @@ This will filter torrents for the current selection on the sidebar. - + True False 5 - + True False 0 <b>Uploaded:</b> True - + - + 1 2 @@ -1895,30 +559,30 @@ This will filter torrents for the current selection on the sidebar. - + True False 5 - + True False 0 <b>Downloaded:</b> True - + - + GTK_FILL - + True False 0 - + 3 4 @@ -1928,11 +592,11 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 - + 1 2 @@ -1942,11 +606,11 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 - + 3 4 @@ -1954,11 +618,11 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 - + 1 2 @@ -1966,13 +630,13 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 <b>Date Added:</b> True - + 6 7 @@ -1982,11 +646,11 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 - + 7 8 @@ -1995,34 +659,34 @@ This will filter torrents for the current selection on the sidebar. GTK_FILL - + False False 1 - + - + - + - + - - + + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 2 - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-dialog-info - + True True @@ -2030,41 +694,40 @@ This will filter torrents for the current selection on the sidebar. - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Status True - + True True 1 - + False - tab - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK automatic automatic - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK queue none - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -2073,7 +736,7 @@ This will filter torrents for the current selection on the sidebar. 15 15 - + True False 10 @@ -2081,13 +744,13 @@ This will filter torrents for the current selection on the sidebar. 5 2 - + True False 0 char True - + 1 4 @@ -2097,14 +760,14 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 1 <b>Comments:</b> True - + 5 6 @@ -2113,12 +776,12 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 True - + 1 2 @@ -2128,14 +791,14 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 1 <b># of files:</b> True - + 4 5 @@ -2144,7 +807,7 @@ This will filter torrents for the current selection on the sidebar. - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -2152,7 +815,7 @@ This will filter torrents for the current selection on the sidebar. True char True - + 1 4 @@ -2162,14 +825,14 @@ This will filter torrents for the current selection on the sidebar. - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 <b>Hash:</b> True - + 1 2 @@ -2178,13 +841,13 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 char True - + 1 4 @@ -2194,14 +857,14 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 1 <b>Tracker:</b> True - + 7 8 @@ -2210,22 +873,22 @@ This will filter torrents for the current selection on the sidebar. - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 - + True False 0 1 <b>Total Size:</b> True - + - + 3 4 @@ -2234,7 +897,7 @@ This will filter torrents for the current selection on the sidebar. - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_STRUCTURE_MASK @@ -2242,7 +905,7 @@ This will filter torrents for the current selection on the sidebar. True char True - + 1 4 @@ -2250,13 +913,13 @@ This will filter torrents for the current selection on the sidebar. - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 - + True False 0 @@ -2264,31 +927,31 @@ This will filter torrents for the current selection on the sidebar. 1 <b>Name:</b> True - + - + GTK_FILL - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 5 - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 <b>Path:</b> True - + - + 2 3 @@ -2297,7 +960,7 @@ This will filter torrents for the current selection on the sidebar. - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK @@ -2305,7 +968,7 @@ This will filter torrents for the current selection on the sidebar. True char True - + 1 4 @@ -2315,14 +978,14 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 1 <b>Status:</b> True - + 6 7 @@ -2331,13 +994,13 @@ This will filter torrents for the current selection on the sidebar. - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 True - + 1 4 @@ -2347,12 +1010,12 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 True - + 1 2 @@ -2362,14 +1025,14 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 1 <b>Owner:</b> True - + 8 9 @@ -2378,15 +1041,14 @@ This will filter torrents for the current selection on the sidebar. - + True False - Torrent is shared between other Deluge users or not. 0 1 <b>Shared:</b> True - + 9 10 @@ -2395,13 +1057,13 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 char True - + 1 2 @@ -2411,14 +1073,13 @@ This will filter torrents for the current selection on the sidebar. - + True False - Torrent is shared between other Deluge users or not. 0 char True - + 1 2 @@ -2451,30 +1112,30 @@ This will filter torrents for the current selection on the sidebar. - + - + - + - + 1 - - + + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 2 - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-properties - + True True @@ -2482,58 +1143,57 @@ This will filter torrents for the current selection on the sidebar. - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Details True - + True True 1 - + 1 False - tab - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK automatic automatic - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + - + 2 - - + + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 2 - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-copy - + True True @@ -2541,58 +1201,57 @@ This will filter torrents for the current selection on the sidebar. - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Files True - + True True 1 - + 2 False - tab - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK automatic automatic - + True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - + - + 3 - - + + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 2 - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-network - + True True @@ -2600,56 +1259,55 @@ This will filter torrents for the current selection on the sidebar. - + True False GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK _Peers True - + True True 1 - + 3 False - tab - + True True automatic automatic - + True False 5 queue none - + True False - + True False 0 none - + True False 12 - + True False 5 @@ -2657,18 +1315,19 @@ This will filter torrents for the current selection on the sidebar. 3 5 - + True True + 6 1 + True False False True True - 0 -1 999999 1 10 0 - - + adjustment1 + 1 2 @@ -2679,19 +1338,20 @@ This will filter torrents for the current selection on the sidebar. - + True True + 6 1 + True False False True True - 0 -1 99999 1 10 0 + adjustment2 1 - - + 1 2 @@ -2702,19 +1362,20 @@ This will filter torrents for the current selection on the sidebar. - + True True + 6 1 + True False False True True - 0 -1 999999 1 10 0 + adjustment3 1 - - + 1 2 @@ -2723,12 +1384,12 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 Max Connections: - + 2 3 @@ -2737,12 +1398,12 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 Max Upload Speed: - + 1 2 @@ -2751,23 +1412,23 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 Max Download Speed: - + GTK_FILL - + True False KiB/s - + 2 3 @@ -2776,11 +1437,11 @@ This will filter torrents for the current selection on the sidebar. - + True False KiB/s - + 2 3 @@ -2791,12 +1452,12 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 Max Upload Slots: - + 3 4 @@ -2805,18 +1466,19 @@ This will filter torrents for the current selection on the sidebar. - + True True + 6 1 + True False False True True - 0 -1 999999 1 10 0 - - + adjustment4 + 1 2 @@ -2832,22 +1494,19 @@ This will filter torrents for the current selection on the sidebar. - + - + - - + + True False <b>Bandwidth</b> True - - - label_item - + - + False False @@ -2855,31 +1514,30 @@ This will filter torrents for the current selection on the sidebar. - + True False 0 none - + True False 5 12 - + True False - + Auto Managed True True False False True - - + False False @@ -2887,24 +1545,23 @@ This will filter torrents for the current selection on the sidebar. - + True False - + True False 5 - + Stop seed at ratio: True True False False True - - + False False @@ -2912,26 +1569,27 @@ This will filter torrents for the current selection on the sidebar. - + True True + 1 + True False False True True - 2 0 99999 0.10000000000000001 10 0 + adjustment5 1 True - - + False False 1 - + False False @@ -2939,22 +1597,21 @@ This will filter torrents for the current selection on the sidebar. - + True False 10 - + Remove at ratio True True False False True - - + - + False False @@ -2962,15 +1619,14 @@ This will filter torrents for the current selection on the sidebar. - + Move completed: True True False False True - - + False False @@ -2978,19 +1634,19 @@ This will filter torrents for the current selection on the sidebar. - + True False - + True False False select-folder False + True Select A Folder - - + False False @@ -2998,50 +1654,49 @@ This will filter torrents for the current selection on the sidebar. - + False True + + True False False True True - + False False 1 - + False False 3 - + True True 1 - + - + - - + + True False <b>Queue</b> True - - - label_item - + - + False False @@ -3049,17 +1704,17 @@ This will filter torrents for the current selection on the sidebar. - + True False - + True False 0 none - + True False 0 @@ -3067,21 +1722,19 @@ This will filter torrents for the current selection on the sidebar. 5 12 - + True False - + Private True False True False - If checked this torrent won't be shared among trackers, DHT nodes, etc... False True - - + False False @@ -3089,15 +1742,14 @@ This will filter torrents for the current selection on the sidebar. - + Prioritize First/Last True True False False True - - + False False @@ -3105,22 +1757,14 @@ This will filter torrents for the current selection on the sidebar. - + Sequential Download True True False - True - When enabled, the piece picker will pick pieces in -sequence instead of rarest first. - -Enabling sequential download will affect the piece -distribution negatively in the swarm. It should be -used sparingly. False True - - + True True @@ -3128,16 +1772,14 @@ used sparingly. - + Shared True True False - Torrent is shared between other Deluge users or not. False True - - + True True @@ -3145,25 +1787,24 @@ used sparingly. - + True True True False 0 0 - - + True False 5 - + True False gtk-edit - + False False @@ -3171,43 +1812,40 @@ used sparingly. - + True False _Edit Trackers True - + False False 1 - + - + False False 4 - + - + - - + + True False <b>General</b> True - - - label_item - + - + False False @@ -3215,20 +1853,20 @@ used sparingly. - + True False 0 none - + True False 0 0 12 - + gtk-apply True False @@ -3236,51 +1874,47 @@ used sparingly. True False True - - + - + - + - - label_item - - + False False 1 - + False False 2 - + - + - + 4 - - + + True False 2 - + True False gtk-preferences - + True True @@ -3288,26 +1922,25 @@ used sparingly. - + True False _Options True - + True True 1 - + 4 False - tab - + - - + + diff --git a/deluge/ui/gtkui/glade/main_window.ui b/deluge/ui/gtkui/glade/main_window.ui new file mode 100644 index 000000000..f06018eb8 --- /dev/null +++ b/deluge/ui/gtkui/glade/main_window.ui @@ -0,0 +1,802 @@ + + + + + + + -1 + 999999 + 1 + 10 + + + -1 + 99999 + 1 + 10 + + + -1 + 999999 + 1 + 10 + + + -1 + 999999 + 1 + 10 + + + 99999 + 2 + 0.10000000000000001 + 10 + + + True + False + gtk-add + 1 + + + True + False + gtk-no + 1 + + + True + False + gtk-yes + 1 + + + True + False + gtk-go-up + 1 + + + True + False + gtk-goto-top + 1 + + + True + False + gtk-zoom-fit + 1 + + + False + Deluge + + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + False + + + True + False + False + _File + True + + + False + + + _Add Torrent + True + False + False + False + True + False + + + + + + + _Create Torrent + True + False + False + True + False + + + + + + + False + + + + + Quit & _Shutdown Daemon + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + True + False + + + + + + + True + False + + + + + gtk-quit + True + False + False + True + True + accelgroup1 + + + + + + + + + + True + False + False + _Edit + True + + + True + False + + + gtk-preferences + True + False + False + True + True + accelgroup1 + + + + + + + _Connection Manager + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + True + False + + + + + + + + + + + False + False + _Torrent + True + + + + + True + False + False + _View + True + + + True + False + + + True + False + False + _Toolbar + True + True + + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + _Sidebar + True + True + + + + + + True + False + False + Status_bar + True + True + + + + + + True + False + + + + + True + False + False + T_abs + True + + + + + True + False + False + _Columns + True + + + + + True + False + False + False + _Find ... + True + + + + + + + True + False + True + False + S_idebar + True + + + True + False + True + + + True + False + False + Show _Zero Hits + True + True + + + + + + True + False + False + Show _Trackers + True + True + + + + + + + + + + + + + + True + False + False + _Help + True + + + False + + + _Homepage + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + True + False + + + + + + _FAQ + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Frequently Asked Questions + False + True + False + + + + + + + _Community + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + True + False + + + + + + True + False + + + + + gtk-about + True + False + False + True + True + accelgroup1 + + + + + + + + + + False + True + 0 + + + + + True + False + + + True + False + False + True + Add torrent + False + Add Torrent + True + gtk-add + + + + False + True + + + + + True + False + False + True + Remove torrent + False + Remove Torrent + gtk-remove + + + + False + True + + + + + True + False + False + Filter torrents by name. +This will filter torrents for the current selection on the sidebar. + False + _Filter + True + gtk-find + + + + + False + True + + + + + True + False + + + False + + + + + True + False + False + True + Pause the selected torrents + False + Pause + True + gtk-media-pause + + + + False + True + + + + + True + False + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + Resume the selected torrents + False + Resume + gtk-media-play + + + + False + True + + + + + True + False + + + False + + + + + True + False + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + Queue Torrent Up + False + Queue Up + gtk-go-up + + + + False + True + + + + + True + False + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + Queue Torrent Down + False + Queue Down + gtk-go-down + + + + False + True + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + False + + + + + True + False + True + Preferences + False + Preferences + True + gtk-preferences + + + + False + True + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + True + Connection Manager + False + Connection Manager + gtk-network + + + + False + True + + + + + False + True + 1 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + + + True + False + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + True + + + False + True + + + + + True + False + + + False + + + True + True + True + True + Close + False + none + + + + True + False + gtk-close + 2 + + + + + False + False + 0 + + + + + True + False + Filter: + + + False + False + 1 + 1 + + + + + 350 + True + True + True + Filter torrents by name. +This will filter torrents for the current selection on the sidebar. + + True + True + False + gtk-clear + True + True + False + True + Clear the search + Clear the search + + + + + False + False + 1 + 2 + + + + + _Match Case + True + True + False + False + True + True + + + + True + True + 1 + 3 + + + + + False + True + 0 + + + + + True + True + automatic + automatic + out + + + True + True + True + False + + + + + True + True + 1 + + + + + True + True + + + + + True + False + + + + + True + False + False + + + False + False + + + + + + + True + True + 2 + + + + + True + False + + + False + False + 3 + + + + + + diff --git a/deluge/ui/gtkui/glade/torrent_menu.options.ui b/deluge/ui/gtkui/glade/torrent_menu.options.ui index b0ec36a8a..20d800098 100644 --- a/deluge/ui/gtkui/glade/torrent_menu.options.ui +++ b/deluge/ui/gtkui/glade/torrent_menu.options.ui @@ -5,64 +5,58 @@ True False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-missing-image - + True False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-network 1 - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-sort-ascending - 1 - True False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + _Download Speed Limit True False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False + True download-limit-image False + _Upload Speed Limit True False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False + True upload-limit-image False + _Connection Limit True False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False - menu-item-image16 + True + max-connections-image False + Upload _Slot Limit True False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False - menu-item-image17 + True + upload-slots-image False @@ -71,19 +65,29 @@ True False False + _Auto Managed + True + True False False + _Change Ownership + True True False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK gtk-missing-image + + True + False + gtk-sort-ascending + 1 + diff --git a/deluge/ui/gtkui/glade/torrent_menu.queue.ui b/deluge/ui/gtkui/glade/torrent_menu.queue.ui index bdeae537b..0c47f5ad1 100644 --- a/deluge/ui/gtkui/glade/torrent_menu.queue.ui +++ b/deluge/ui/gtkui/glade/torrent_menu.queue.ui @@ -15,7 +15,7 @@ False True True - accelgroup1 + @@ -27,7 +27,7 @@ False True True - accelgroup1 + @@ -39,7 +39,7 @@ False True True - accelgroup1 + @@ -51,7 +51,7 @@ False True True - accelgroup1 + diff --git a/deluge/ui/gtkui/glade/torrent_menu.ui b/deluge/ui/gtkui/glade/torrent_menu.ui index e169c6c42..c3fcaeb6e 100644 --- a/deluge/ui/gtkui/glade/torrent_menu.ui +++ b/deluge/ui/gtkui/glade/torrent_menu.ui @@ -3,11 +3,11 @@ - + True False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-missing-image + gtk-preferences + 1 True @@ -28,27 +28,6 @@ gtk-media-pause 1 - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-network - 1 - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-sort-ascending - 1 - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-preferences - 1 - True False @@ -154,7 +133,7 @@ GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK False True - menu-item-image18 + image1 False @@ -260,10 +239,4 @@ - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - gtk-missing-image - diff --git a/deluge/ui/gtkui/gtkui.py b/deluge/ui/gtkui/gtkui.py index c0fa4d954..67364fcca 100644 --- a/deluge/ui/gtkui/gtkui.py +++ b/deluge/ui/gtkui/gtkui.py @@ -319,16 +319,12 @@ Please see the details below for more information."), details=traceback.format_e def update_connection_manager(): if not self.connectionmanager.running: return - self.connectionmanager.glade.get_widget( - "button_refresh" - ).emit("clicked") + self.connectionmanager.builder.get_object("button_refresh").emit("clicked") def close_connection_manager(): if not self.connectionmanager.running: return - self.connectionmanager.glade.get_widget( - "button_close" - ).emit("clicked") + self.connectionmanager.builder.get_object("button_close").emit("clicked") for host_config in self.connectionmanager.config["hosts"]: hostid, host, port, user, passwd = host_config diff --git a/deluge/ui/gtkui/mainwindow.py b/deluge/ui/gtkui/mainwindow.py index 464718ee6..182f835f0 100644 --- a/deluge/ui/gtkui/mainwindow.py +++ b/deluge/ui/gtkui/mainwindow.py @@ -34,13 +34,12 @@ # +import copy import os.path import pygtk pygtk.require('2.0') import gtk -import gtk.glade import logging -from urlparse import urlparse import urllib from deluge.ui.client import client @@ -54,20 +53,74 @@ import common log = logging.getLogger(__name__) +class _GtkBuilderSignalsHolder(object): + def connect_signals(self, mapping_or_class): + + if isinstance(mapping_or_class, dict): + for name, handler in mapping_or_class.iteritems(): + if hasattr(self, name): + raise RuntimeError( + "A handler for signal %r has already been registered: %s" % + (name, getattr(self, name)) + ) + setattr(self, name, handler) + else: + for name in dir(mapping_or_class): + if not name.startswith('on_'): + continue + if hasattr(self, name): + raise RuntimeError("A handler for signal %r has already been registered: %s" % + (name, getattr(self, name))) + setattr(self, name, getattr(mapping_or_class, name)) + class MainWindow(component.Component): def __init__(self): component.Component.__init__(self, "MainWindow", interval=2) self.config = ConfigManager("gtkui.conf") - # Get the glade file for the main window - self.main_glade = gtk.glade.XML(deluge.common.resource_filename( - "deluge.ui.gtkui", os.path.join("glade", "main_window.glade")) + self.gtk_builder_signals_holder = _GtkBuilderSignalsHolder() + self.main_builder = gtk.Builder() + # Patch this GtkBuilder to avoid connecting signals from elsewhere + # + # Think about splitting up the main window gtkbuilder file into the necessary parts + # in order not to have to monkey patch GtkBuilder. Those parts would then need to + # be added to the main window "by hand". + self.main_builder.prev_connect_signals = copy.deepcopy(self.main_builder.connect_signals) + def patched_connect_signals(*a, **k): + raise RuntimeError("In order to connect signals to this GtkBuilder instance please use " + "'component.get(\"MainWindow\").connect_signals()'") + self.main_builder.connect_signals = patched_connect_signals + + # Get the gtk builder file for the main window + self.main_builder.add_from_file(deluge.common.resource_filename( + "deluge.ui.gtkui", os.path.join("glade", "main_window.ui")) + ) + # The new release dialog + self.main_builder.add_from_file(deluge.common.resource_filename( + "deluge.ui.gtkui", os.path.join("glade", "main_window.new_release.ui")) + ) + # The move storage dialog + self.main_builder.add_from_file(deluge.common.resource_filename( + "deluge.ui.gtkui", os.path.join("glade", "main_window.move_storage.ui")) + ) + # The tabs + self.main_builder.add_from_file(deluge.common.resource_filename( + "deluge.ui.gtkui", os.path.join("glade", "main_window.tabs.ui")) + ) + # The tabs file menu + self.main_builder.add_from_file(deluge.common.resource_filename( + "deluge.ui.gtkui", os.path.join("glade", "main_window.tabs.menu_file.ui")) + ) + # The tabs peer menu + self.main_builder.add_from_file(deluge.common.resource_filename( + "deluge.ui.gtkui", os.path.join("glade", "main_window.tabs.menu_peer.ui")) ) - self.window = self.main_glade.get_widget("main_window") + + self.window = self.main_builder.get_object("main_window") self.window.set_icon(common.get_deluge_icon()) - self.vpaned = self.main_glade.get_widget("vpaned") + self.vpaned = self.main_builder.get_object("vpaned") self.initial_vpaned_position = self.config["window_pane_position"] # Load the window state @@ -77,8 +130,7 @@ class MainWindow(component.Component): # UI when it is minimized. self.is_minimized = False - self.window.drag_dest_set(gtk.DEST_DEFAULT_ALL, [('text/uri-list', 0, - 80)], gtk.gdk.ACTION_COPY) + self.window.drag_dest_set(gtk.DEST_DEFAULT_ALL, [('text/uri-list', 0, 80)], gtk.gdk.ACTION_COPY) # Connect events self.window.connect("window-state-event", self.on_window_state_event) @@ -93,11 +145,15 @@ class MainWindow(component.Component): client.register_event_handler("NewVersionAvailableEvent", self.on_newversionavailable_event) client.register_event_handler("TorrentFinishedEvent", self.on_torrentfinished_event) + def connect_signals(self, mapping_or_class): + self.gtk_builder_signals_holder.connect_signals(mapping_or_class) + def first_show(self): if not(self.config["start_in_tray"] and \ self.config["enable_system_tray"]) and not \ self.window.get_property("visible"): log.debug("Showing window") + self.main_builder.prev_connect_signals(self.gtk_builder_signals_holder) self.show() while gtk.events_pending(): gtk.main_iteration(False) @@ -149,9 +205,9 @@ class MainWindow(component.Component): """Returns True if window is visible, False if not.""" return self.window.get_property("visible") - def get_glade(self): - """Returns a reference to the main window glade object.""" - return self.main_glade + def get_builder(self): + """Returns a reference to the main window GTK builder object.""" + return self.main_builder def quit(self, shutdown=False): """ diff --git a/deluge/ui/gtkui/menubar.py b/deluge/ui/gtkui/menubar.py index a8fa88319..df5f8fdc7 100644 --- a/deluge/ui/gtkui/menubar.py +++ b/deluge/ui/gtkui/menubar.py @@ -51,36 +51,37 @@ from deluge.configmanager import ConfigManager log = logging.getLogger(__name__) class MenuBar(component.Component): + def __init__(self): log.debug("MenuBar init..") component.Component.__init__(self, "MenuBar") self.window = component.get("MainWindow") + self.main_builder = self.window.get_builder() self.config = ConfigManager("gtkui.conf") self.builder = gtk.Builder() - # Get the torrent menu from the glade file + # Get the torrent menu from the gtk builder file self.builder.add_from_file(deluge.common.resource_filename( "deluge.ui.gtkui", os.path.join("glade", "torrent_menu.ui") )) - # Get the torrent options menu from the glade file + # Get the torrent options menu from the gtk builder 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 + # Get the torrent queue menu from the gtk builder file self.builder.add_from_file(deluge.common.resource_filename( "deluge.ui.gtkui", os.path.join("glade", "torrent_menu.queue.ui") )) - self.builder.get_object("menuitem_queue").set_submenu( - self.builder.get_object("queue_torrent_menu")) - + # Attach queue torrent menu + torrent_queue_menu = self.builder.get_object("queue_torrent_menu") + self.builder.get_object("menuitem_queue").set_submenu(torrent_queue_menu) # Attach options torrent menu - self.builder.get_object("menuitem_options").set_submenu( - self.builder.get_object("options_torrent_menu")) - self.builder.get_object("download-limit-image").set_from_file( - deluge.common.get_pixmap("downloading16.png")) - self.builder.get_object("upload-limit-image").set_from_file( - deluge.common.get_pixmap("seeding16.png")) + torrent_options_menu = self.builder.get_object("options_torrent_menu") + self.builder.get_object("menuitem_options").set_submenu(torrent_options_menu) + + self.builder.get_object("download-limit-image").set_from_file(deluge.common.get_pixmap("downloading16.png")) + self.builder.get_object("upload-limit-image").set_from_file(deluge.common.get_pixmap("seeding16.png")) for menuitem in ("menuitem_down_speed", "menuitem_up_speed", "menuitem_max_connections", "menuitem_upload_slots"): @@ -107,40 +108,30 @@ class MenuBar(component.Component): self.builder.get_object("menuitem_auto_managed").set_submenu(submenu) self.torrentmenu = self.builder.get_object("torrent_menu") - self.menu_torrent = self.window.main_glade.get_widget("menu_torrent") + self.menu_torrent = self.main_builder.get_object("menu_torrent") # Attach the torrent_menu to the Torrent file menu self.menu_torrent.set_submenu(self.torrentmenu) # Make sure the view menuitems are showing the correct active state - self.window.main_glade.get_widget("menuitem_toolbar").set_active( - self.config["show_toolbar"]) - self.window.main_glade.get_widget("menuitem_sidebar").set_active( - self.config["show_sidebar"]) - self.window.main_glade.get_widget("menuitem_statusbar").set_active( - self.config["show_statusbar"]) - self.window.main_glade.get_widget("sidebar_show_zero").set_active( - self.config["sidebar_show_zero"]) - self.window.main_glade.get_widget("sidebar_show_trackers").set_active( - self.config["sidebar_show_trackers"]) + self.main_builder.get_object("menuitem_toolbar").set_active(self.config["show_toolbar"]) + self.main_builder.get_object("menuitem_sidebar").set_active(self.config["show_sidebar"]) + self.main_builder.get_object("menuitem_statusbar").set_active(self.config["show_statusbar"]) + self.main_builder.get_object("sidebar_show_zero").set_active(self.config["sidebar_show_zero"]) + self.main_builder.get_object("sidebar_show_trackers").set_active(self.config["sidebar_show_trackers"]) - ### Connect Signals ### - self.window.main_glade.signal_autoconnect({ + ### Connect main window Signals ### + component.get("MainWindow").connect_signals({ ## File Menu - "on_menuitem_addtorrent_activate": \ - self.on_menuitem_addtorrent_activate, - "on_menuitem_createtorrent_activate": \ - self.on_menuitem_createtorrent_activate, - "on_menuitem_quitdaemon_activate": \ - self.on_menuitem_quitdaemon_activate, + "on_menuitem_addtorrent_activate": self.on_menuitem_addtorrent_activate, + "on_menuitem_createtorrent_activate": self.on_menuitem_createtorrent_activate, + "on_menuitem_quitdaemon_activate": self.on_menuitem_quitdaemon_activate, "on_menuitem_quit_activate": self.on_menuitem_quit_activate, ## Edit Menu - "on_menuitem_preferences_activate": \ - self.on_menuitem_preferences_activate, - "on_menuitem_connectionmanager_activate": \ - self.on_menuitem_connectionmanager_activate, + "on_menuitem_preferences_activate": self.on_menuitem_preferences_activate, + "on_menuitem_connectionmanager_activate": self.on_menuitem_connectionmanager_activate, ## View Menu "on_menuitem_toolbar_toggled": self.on_menuitem_toolbar_toggled, @@ -150,23 +141,20 @@ class MenuBar(component.Component): ## Help Menu "on_menuitem_homepage_activate": self.on_menuitem_homepage_activate, "on_menuitem_faq_activate": self.on_menuitem_faq_activate, - "on_menuitem_community_activate": \ - self.on_menuitem_community_activate, + "on_menuitem_community_activate": self.on_menuitem_community_activate, "on_menuitem_about_activate": self.on_menuitem_about_activate, "on_menuitem_sidebar_zero_toggled":self.on_menuitem_sidebar_zero_toggled, "on_menuitem_sidebar_trackers_toggled":self.on_menuitem_sidebar_trackers_toggled }) + # Connect menubar signals self.builder.connect_signals({ ## Torrent Menu "on_menuitem_pause_activate": self.on_menuitem_pause_activate, "on_menuitem_resume_activate": self.on_menuitem_resume_activate, - "on_menuitem_updatetracker_activate": \ - self.on_menuitem_updatetracker_activate, - "on_menuitem_edittrackers_activate": \ - self.on_menuitem_edittrackers_activate, - "on_menuitem_remove_activate": \ - self.on_menuitem_remove_activate, + "on_menuitem_updatetracker_activate": self.on_menuitem_updatetracker_activate, + "on_menuitem_edittrackers_activate": self.on_menuitem_edittrackers_activate, + "on_menuitem_remove_activate": self.on_menuitem_remove_activate, "on_menuitem_recheck_activate": self.on_menuitem_recheck_activate, "on_menuitem_open_folder_activate": self.on_menuitem_open_folder_activate, "on_menuitem_move_activate": self.on_menuitem_move_activate, @@ -189,7 +177,7 @@ class MenuBar(component.Component): def start(self): for widget in self.change_sensitivity: - self.window.main_glade.get_widget(widget).set_sensitive(True) + self.main_builder.get_object(widget).set_sensitive(True) # Hide the Open Folder menuitem and separator if not connected to a # localhost. @@ -206,8 +194,8 @@ class MenuBar(component.Component): self.builder.get_object(widget).set_no_show_all(False) if not self.config["classic_mode"]: - self.window.main_glade.get_widget("separatormenuitem").show() - self.window.main_glade.get_widget("menuitem_quitdaemon").show() + self.main_builder.get_object("separatormenuitem").show() + self.main_builder.get_object("menuitem_quitdaemon").show() # Show the Torrent menu because we're connected to a host self.menu_torrent.show() @@ -222,13 +210,13 @@ class MenuBar(component.Component): log.debug("MenuBar stopping") for widget in self.change_sensitivity: - self.window.main_glade.get_widget(widget).set_sensitive(False) + self.main_builder.get_object(widget).set_sensitive(False) # Hide the Torrent menu self.menu_torrent.hide() - self.window.main_glade.get_widget("separatormenuitem").hide() - self.window.main_glade.get_widget("menuitem_quitdaemon").hide() + self.main_builder.get_object("separatormenuitem").hide() + self.main_builder.get_object("menuitem_quitdaemon").hide() def update_menu(self): selected = component.get('TorrentView').get_selected_torrents() @@ -392,6 +380,7 @@ class MenuBar(component.Component): self.move_storage_dialog.show() def on_menuitem_queue_top_activate(self, value): + print 1234567, '\n\n\n' log.debug("on_menuitem_queue_top_activate") client.core.queue_top(component.get("TorrentView").get_selected_torrents()) @@ -512,7 +501,7 @@ class MenuBar(component.Component): attr = "show" for item in items: - getattr(self.window.main_glade.get_widget(item), attr)() + getattr(self.main_builder.get_object(item), attr)() def _on_known_accounts(self, known_accounts): known_accounts_to_log = [] @@ -584,4 +573,3 @@ class MenuBar(component.Component): ).run() client.core.set_torrents_owner( update_torrents, username).addErrback(failed_change_owner) - diff --git a/deluge/ui/gtkui/new_release_dialog.py b/deluge/ui/gtkui/new_release_dialog.py index e93ba688b..767b2f50b 100644 --- a/deluge/ui/gtkui/new_release_dialog.py +++ b/deluge/ui/gtkui/new_release_dialog.py @@ -45,31 +45,31 @@ class NewReleaseDialog: def show(self, available_version): self.config = ConfigManager("gtkui.conf") - glade = component.get("MainWindow").main_glade - self.dialog = glade.get_widget("new_release_dialog") + builder = component.get("MainWindow").get_builder() + self.dialog = builder.get_object("new_release_dialog") # Set the version labels if deluge.common.windows_check() or deluge.common.osx_check(): - glade.get_widget("image_new_release").set_from_file( + builder.get_object("image_new_release").set_from_file( deluge.common.get_pixmap("deluge16.png")) else: - glade.get_widget("image_new_release").set_from_icon_name("deluge", 4) - glade.get_widget("label_available_version").set_text(available_version) - glade.get_widget("label_client_version").set_text( + builder.get_object("image_new_release").set_from_icon_name("deluge", 4) + builder.get_object("label_available_version").set_text(available_version) + builder.get_object("label_client_version").set_text( deluge.common.get_version()) - self.chk_not_show_dialog = glade.get_widget("chk_do_not_show_new_release") - glade.get_widget("button_goto_downloads").connect( + self.chk_not_show_dialog = builder.get_object("chk_do_not_show_new_release") + builder.get_object("button_goto_downloads").connect( "clicked", self._on_button_goto_downloads) - glade.get_widget("button_close_new_release").connect( + builder.get_object("button_close_new_release").connect( "clicked", self._on_button_close_new_release) - + if client.connected(): def on_info(version): - glade.get_widget("label_server_version").set_text(version) - glade.get_widget("label_server_version").show() - glade.get_widget("label_server_version_text").show() + builder.get_object("label_server_version").set_text(version) + builder.get_object("label_server_version").show() + builder.get_object("label_server_version_text").show() if not client.is_classicmode(): - glade.get_widget("label_client_version_text").set_label(_("Client Version")) + builder.get_object("label_client_version_text").set_label(_("Client Version")) client.daemon.info().addCallback(on_info) self.dialog.show() diff --git a/deluge/ui/gtkui/options_tab.py b/deluge/ui/gtkui/options_tab.py index 46ba77b11..7106f0bbc 100644 --- a/deluge/ui/gtkui/options_tab.py +++ b/deluge/ui/gtkui/options_tab.py @@ -41,33 +41,33 @@ from deluge.ui.gtkui.torrentdetails import Tab class OptionsTab(Tab): def __init__(self): Tab.__init__(self) - glade = component.get("MainWindow").get_glade() + builder = component.get("MainWindow").get_builder() self._name = "Options" - self._child_widget = glade.get_widget("options_tab") - self._tab_label = glade.get_widget("options_tab_label") + self._child_widget = builder.get_object("options_tab") + self._tab_label = builder.get_object("options_tab_label") - self.spin_max_download = glade.get_widget("spin_max_download") - self.spin_max_upload = glade.get_widget("spin_max_upload") - self.spin_max_connections = glade.get_widget("spin_max_connections") - self.spin_max_upload_slots = glade.get_widget("spin_max_upload_slots") - self.chk_private = glade.get_widget("chk_private") - self.chk_prioritize_first_last = glade.get_widget("chk_prioritize_first_last") - self.chk_sequential_download = glade.get_widget("chk_sequential_download") - self.chk_auto_managed = glade.get_widget("chk_auto_managed") - self.chk_stop_at_ratio = glade.get_widget("chk_stop_at_ratio") - self.chk_remove_at_ratio = glade.get_widget("chk_remove_at_ratio") - self.spin_stop_ratio = glade.get_widget("spin_stop_ratio") - self.chk_move_completed = glade.get_widget("chk_move_completed") - self.filechooser_move_completed = glade.get_widget("filechooser_move_completed") - self.entry_move_completed = glade.get_widget("entry_move_completed") - self.chk_shared = glade.get_widget("chk_shared") - self.button_apply = glade.get_widget("button_apply") + self.spin_max_download = builder.get_object("spin_max_download") + self.spin_max_upload = builder.get_object("spin_max_upload") + self.spin_max_connections = builder.get_object("spin_max_connections") + self.spin_max_upload_slots = builder.get_object("spin_max_upload_slots") + self.chk_private = builder.get_object("chk_private") + self.chk_prioritize_first_last = builder.get_object("chk_prioritize_first_last") + self.chk_sequential_download = builder.get_object("chk_sequential_download") + self.chk_auto_managed = builder.get_object("chk_auto_managed") + self.chk_stop_at_ratio = builder.get_object("chk_stop_at_ratio") + self.chk_remove_at_ratio = builder.get_object("chk_remove_at_ratio") + self.spin_stop_ratio = builder.get_object("spin_stop_ratio") + self.chk_move_completed = builder.get_object("chk_move_completed") + self.filechooser_move_completed = builder.get_object("filechooser_move_completed") + self.entry_move_completed = builder.get_object("entry_move_completed") + self.chk_shared = builder.get_object("chk_shared") + self.button_apply = builder.get_object("button_apply") self.prev_torrent_id = None self.prev_status = None - glade.signal_autoconnect({ + component.get("MainWindow").connect_signals({ "on_button_apply_clicked": self._on_button_apply_clicked, "on_button_edit_trackers_clicked": self._on_button_edit_trackers_clicked, "on_chk_move_completed_toggled": self._on_chk_move_completed_toggled, diff --git a/deluge/ui/gtkui/peers_tab.py b/deluge/ui/gtkui/peers_tab.py index 2a4235a56..387efa053 100644 --- a/deluge/ui/gtkui/peers_tab.py +++ b/deluge/ui/gtkui/peers_tab.py @@ -33,17 +33,13 @@ # # - -import os import gtk -import gtk.glade import logging import os.path import cPickle from itertools import izip from deluge.ui.client import client -from deluge.configmanager import ConfigManager import deluge.configmanager import deluge.component as component import deluge.common @@ -61,17 +57,17 @@ def cell_data_progress(column, cell, model, row, data): class PeersTab(Tab): def __init__(self): Tab.__init__(self) - glade = component.get("MainWindow").get_glade() + builder = component.get("MainWindow").get_builder() self._name = "Peers" - self._child_widget = glade.get_widget("peers_tab") - self._tab_label = glade.get_widget("peers_tab_label") - self.peer_menu = glade.get_widget("menu_peer_tab") - glade.signal_autoconnect({ + self._child_widget = builder.get_object("peers_tab") + self._tab_label = builder.get_object("peers_tab_label") + self.peer_menu = builder.get_object("menu_peer_tab") + component.get("MainWindow").connect_signals({ "on_menuitem_add_peer_activate": self._on_menuitem_add_peer_activate, - }) + }) - self.listview = glade.get_widget("peers_listview") + self.listview = builder.get_object("peers_listview") self.listview.props.has_tooltip = True self.listview.connect("button-press-event", self._on_button_press_event) self.listview.connect("query-tooltip", self._on_query_tooltip) diff --git a/deluge/ui/gtkui/preferences.py b/deluge/ui/gtkui/preferences.py index f95c23892..7ba931a92 100644 --- a/deluge/ui/gtkui/preferences.py +++ b/deluge/ui/gtkui/preferences.py @@ -38,7 +38,6 @@ import os import pygtk pygtk.require('2.0') import gtk -import gtk.glade import logging import deluge.component as component diff --git a/deluge/ui/gtkui/sidebar.py b/deluge/ui/gtkui/sidebar.py index 1b1cca129..d31fefa44 100644 --- a/deluge/ui/gtkui/sidebar.py +++ b/deluge/ui/gtkui/sidebar.py @@ -36,7 +36,6 @@ import gtk -import gtk.glade import logging import deluge.component as component @@ -53,9 +52,9 @@ class SideBar(component.Component): def __init__(self): component.Component.__init__(self, "SideBar") self.window = component.get("MainWindow") - glade = self.window.main_glade - self.notebook = glade.get_widget("sidebar_notebook") - self.hpaned = glade.get_widget("hpaned") + builder = self.window.get_builder() + self.notebook = builder.get_object("sidebar_notebook") + self.hpaned = builder.get_object("main_window_hpaned") self.config = ConfigManager("gtkui.conf") #self.hpaned_position = self.hpaned.get_position() diff --git a/deluge/ui/gtkui/status_tab.py b/deluge/ui/gtkui/status_tab.py index 7fcf3ef74..a5bd5d3e9 100644 --- a/deluge/ui/gtkui/status_tab.py +++ b/deluge/ui/gtkui/status_tab.py @@ -34,12 +34,8 @@ # # - -import gtk -import gtk.glade import logging -from deluge.ui.client import client import deluge.component as component import deluge.common from deluge.configmanager import ConfigManager @@ -80,12 +76,12 @@ class StatusTab(Tab): Tab.__init__(self) # Get the labels we need to update. # widget name, modifier function, status keys - self.glade = glade = component.get("MainWindow").main_glade - self.progressbar = component.get("MainWindow").main_glade.get_widget("progressbar") + self.builder = builder = component.get("MainWindow").get_builder() + self.progressbar = builder.get_object("progressbar") self._name = "Status" - self._child_widget = glade.get_widget("status_tab") - self._tab_label = glade.get_widget("status_tab_label") + self._child_widget = builder.get_object("status_tab") + self._tab_label = builder.get_object("status_tab_label") self.config = ConfigManager("gtkui.conf") self.config.register_set_function( "show_piecesbar", @@ -93,25 +89,25 @@ class StatusTab(Tab): apply_now=True ) self.label_widgets = [ - (glade.get_widget("summary_pieces"), fpeer_size_second, ("num_pieces", "piece_length")), - (glade.get_widget("summary_availability"), fratio, ("distributed_copies",)), - (glade.get_widget("summary_total_downloaded"), fpeer_sized, ("all_time_download", "total_payload_download")), - (glade.get_widget("summary_total_uploaded"), fpeer_sized, ("total_uploaded", "total_payload_upload")), - (glade.get_widget("summary_download_speed"), fspeed, ("download_payload_rate", "max_download_speed")), - (glade.get_widget("summary_upload_speed"), fspeed, ("upload_payload_rate", "max_upload_speed")), - (glade.get_widget("summary_seeders"), deluge.common.fpeer, ("num_seeds", "total_seeds")), - (glade.get_widget("summary_peers"), deluge.common.fpeer, ("num_peers", "total_peers")), - (glade.get_widget("summary_eta"), deluge.common.ftime, ("eta",)), - (glade.get_widget("summary_share_ratio"), fratio, ("ratio",)), - (glade.get_widget("summary_tracker_status"), None, ("tracker_status",)), - (glade.get_widget("summary_next_announce"), deluge.common.ftime, ("next_announce",)), - (glade.get_widget("summary_active_time"), deluge.common.ftime, ("active_time",)), - (glade.get_widget("summary_seed_time"), deluge.common.ftime, ("seeding_time",)), - (glade.get_widget("summary_seed_rank"), str, ("seed_rank",)), - (glade.get_widget("summary_auto_managed"), str, ("is_auto_managed",)), - (glade.get_widget("progressbar"), fpcnt, ("progress",)), - (glade.get_widget("summary_date_added"), deluge.common.fdate, ("time_added",)), - (glade.get_widget("summary_last_seen_complete"), fdate_or_never, ("last_seen_complete",)), + (builder.get_object("summary_pieces"), fpeer_size_second, ("num_pieces", "piece_length")), + (builder.get_object("summary_availability"), fratio, ("distributed_copies",)), + (builder.get_object("summary_total_downloaded"), fpeer_sized, ("all_time_download", "total_payload_download")), + (builder.get_object("summary_total_uploaded"), fpeer_sized, ("total_uploaded", "total_payload_upload")), + (builder.get_object("summary_download_speed"), fspeed, ("download_payload_rate", "max_download_speed")), + (builder.get_object("summary_upload_speed"), fspeed, ("upload_payload_rate", "max_upload_speed")), + (builder.get_object("summary_seeders"), deluge.common.fpeer, ("num_seeds", "total_seeds")), + (builder.get_object("summary_peers"), deluge.common.fpeer, ("num_peers", "total_peers")), + (builder.get_object("summary_eta"), deluge.common.ftime, ("eta",)), + (builder.get_object("summary_share_ratio"), fratio, ("ratio",)), + (builder.get_object("summary_tracker_status"), None, ("tracker_status",)), + (builder.get_object("summary_next_announce"), deluge.common.ftime, ("next_announce",)), + (builder.get_object("summary_active_time"), deluge.common.ftime, ("active_time",)), + (builder.get_object("summary_seed_time"), deluge.common.ftime, ("seeding_time",)), + (builder.get_object("summary_seed_rank"), str, ("seed_rank",)), + (builder.get_object("summary_auto_managed"), str, ("is_auto_managed",)), + (builder.get_object("progressbar"), fpcnt, ("progress",)), + (builder.get_object("summary_date_added"), deluge.common.fdate, ("time_added",)), + (builder.get_object("summary_last_seen_complete"), fdate_or_never, ("last_seen_complete",)), ] def update(self): @@ -191,7 +187,7 @@ class StatusTab(Tab): else: if show: self.piecesbar = PiecesBar() - self.glade.get_widget("status_progress_vbox").pack_start( + self.builder.get_object("status_progress_vbox").pack_start( self.piecesbar, False, False, 5 ) self.progressbar.hide() diff --git a/deluge/ui/gtkui/statusbar.py b/deluge/ui/gtkui/statusbar.py index c1cb56c86..c433b2834 100644 --- a/deluge/ui/gtkui/statusbar.py +++ b/deluge/ui/gtkui/statusbar.py @@ -113,7 +113,7 @@ class StatusBar(component.Component): def __init__(self): component.Component.__init__(self, "StatusBar", interval=3) self.window = component.get("MainWindow") - self.statusbar = self.window.main_glade.get_widget("statusbar") + self.statusbar = self.window.get_builder().get_object("statusbar") self.config = ConfigManager("gtkui.conf") # Status variables that are updated via callback diff --git a/deluge/ui/gtkui/systemtray.py b/deluge/ui/gtkui/systemtray.py index 6d79171f7..3aaf3fcc3 100644 --- a/deluge/ui/gtkui/systemtray.py +++ b/deluge/ui/gtkui/systemtray.py @@ -68,12 +68,10 @@ class SystemTray(component.Component): "separatormenuitem3", "separatormenuitem4" ] - self.config.register_set_function("enable_system_tray", - self.on_enable_system_tray_set) + self.config.register_set_function("enable_system_tray", self.on_enable_system_tray_set) # bit of a hack to prevent function from doing something on startup self.__enabled_set_once = False - self.config.register_set_function("enable_appindicator", - self.on_enable_appindicator_set) + self.config.register_set_function("enable_appindicator", self.on_enable_appindicator_set) self.max_download_speed = -1.0 self.download_rate = 0.0 @@ -93,17 +91,12 @@ class SystemTray(component.Component): ) self.builder.connect_signals({ - "on_menuitem_show_deluge_activate": \ - self.on_menuitem_show_deluge_activate, - "on_menuitem_add_torrent_activate": \ - self.on_menuitem_add_torrent_activate, - "on_menuitem_pause_all_activate": \ - self.on_menuitem_pause_all_activate, - "on_menuitem_resume_all_activate": \ - self.on_menuitem_resume_all_activate, + "on_menuitem_show_deluge_activate": self.on_menuitem_show_deluge_activate, + "on_menuitem_add_torrent_activate": self.on_menuitem_add_torrent_activate, + "on_menuitem_pause_all_activate": self.on_menuitem_pause_all_activate, + "on_menuitem_resume_all_activate": self.on_menuitem_resume_all_activate, "on_menuitem_quit_activate": self.on_menuitem_quit_activate, - "on_menuitem_quitdaemon_activate": \ - self.on_menuitem_quitdaemon_activate + "on_menuitem_quitdaemon_activate": self.on_menuitem_quitdaemon_activate }) self.tray_menu = self.builder.get_object("tray_menu") @@ -129,8 +122,7 @@ class SystemTray(component.Component): else: log.debug("Enabling the system tray icon..") if deluge.common.windows_check() or deluge.common.osx_check(): - self.tray = gtk.status_icon_new_from_pixbuf( - common.get_logo(32)) + self.tray = gtk.status_icon_new_from_pixbuf(common.get_logo(32)) else: try: self.tray = gtk.status_icon_new_from_icon_name("deluge") diff --git a/deluge/ui/gtkui/toolbar.py b/deluge/ui/gtkui/toolbar.py index 858b7e86e..eb96eeafb 100644 --- a/deluge/ui/gtkui/toolbar.py +++ b/deluge/ui/gtkui/toolbar.py @@ -37,7 +37,6 @@ import pygtk pygtk.require('2.0') import gtk -import gtk.glade import gobject import logging @@ -53,18 +52,16 @@ class ToolBar(component.Component): component.Component.__init__(self, "ToolBar") log.debug("ToolBar Init..") self.window = component.get("MainWindow") - self.toolbar = self.window.main_glade.get_widget("toolbar") + self.toolbar = self.window.get_builder().get_object("toolbar") self.config = ConfigManager("gtkui.conf") - ### Connect Signals ### - self.window.main_glade.signal_autoconnect({ + ### Connect main window Signals ### + self.window.connect_signals({ "on_toolbutton_add_clicked": self.on_toolbutton_add_clicked, "on_toolbutton_remove_clicked": self.on_toolbutton_remove_clicked, "on_toolbutton_pause_clicked": self.on_toolbutton_pause_clicked, "on_toolbutton_resume_clicked": self.on_toolbutton_resume_clicked, - "on_toolbutton_preferences_clicked": \ - self.on_toolbutton_preferences_clicked, - "on_toolbutton_connectionmanager_clicked": \ - self.on_toolbutton_connectionmanager_clicked, + "on_toolbutton_preferences_clicked": self.on_toolbutton_preferences_clicked, + "on_toolbutton_connectionmanager_clicked": self.on_toolbutton_connectionmanager_clicked, "on_toolbutton_queue_up_clicked": self.on_toolbutton_queue_up_clicked, "on_toolbutton_queue_down_clicked": self.on_toolbutton_queue_down_clicked }) @@ -86,14 +83,14 @@ class ToolBar(component.Component): def start(self): if not self.config["classic_mode"]: - self.window.main_glade.get_widget("toolbutton_connectionmanager").show() + self.window.get_builder().get_object("toolbutton_connectionmanager").show() for widget in self.change_sensitivity: - self.window.main_glade.get_widget(widget).set_sensitive(True) + self.window.get_builder().get_object(widget).set_sensitive(True) def stop(self): for widget in self.change_sensitivity: - self.window.main_glade.get_widget(widget).set_sensitive(False) + self.window.get_builder().get_object(widget).set_sensitive(False) def visible(self, visible): if visible: @@ -185,7 +182,7 @@ class ToolBar(component.Component): component.get("MenuBar").on_menuitem_queue_down_activate(data) def _on_classic_mode(self, key, value): - w = self.window.main_glade.get_widget("toolbutton_connectionmanager") + w = self.window.get_builder().get_object("toolbutton_connectionmanager") if value: w.hide() else: diff --git a/deluge/ui/gtkui/torrentdetails.py b/deluge/ui/gtkui/torrentdetails.py index 6241a218f..f7e612155 100644 --- a/deluge/ui/gtkui/torrentdetails.py +++ b/deluge/ui/gtkui/torrentdetails.py @@ -37,7 +37,6 @@ """The torrent details component shows info about the selected torrent.""" import gtk -import gtk.glade import os import os.path import cPickle @@ -78,12 +77,12 @@ class TorrentDetails(component.Component): def __init__(self): component.Component.__init__(self, "TorrentDetails", interval=2) self.window = component.get("MainWindow") - glade = self.window.main_glade + builder = self.window.get_builder() - self.notebook = glade.get_widget("torrent_info") + self.notebook = builder.get_object("torrent_info") # This is the menu item we'll attach the tabs checklist menu to - self.menu_tabs = glade.get_widget("menu_tabs") + self.menu_tabs = builder.get_object("menu_tabs") self.notebook.connect("switch-page", self._on_switch_page) diff --git a/deluge/ui/gtkui/torrentview.py b/deluge/ui/gtkui/torrentview.py index d84b2308c..8694d62e2 100644 --- a/deluge/ui/gtkui/torrentview.py +++ b/deluge/ui/gtkui/torrentview.py @@ -39,38 +39,28 @@ import pygtk pygtk.require('2.0') import gtk -import gtk.glade -import gettext import gobject import logging import warnings -from urlparse import urlparse from twisted.internet import reactor +import listview import deluge.common import deluge.component as component from deluge.ui.client import client -import listview -from deluge.ui.tracker_icons import TrackerIcons from removetorrentdialog import RemoveTorrentDialog log = logging.getLogger(__name__) # Status icons.. Create them from file only once to avoid constantly # re-creating them. -icon_downloading = gtk.gdk.pixbuf_new_from_file( - deluge.common.get_pixmap("downloading16.png")) -icon_seeding = gtk.gdk.pixbuf_new_from_file( - deluge.common.get_pixmap("seeding16.png")) -icon_inactive = gtk.gdk.pixbuf_new_from_file( - deluge.common.get_pixmap("inactive16.png")) -icon_alert = gtk.gdk.pixbuf_new_from_file( - deluge.common.get_pixmap("alert16.png")) -icon_queued = gtk.gdk.pixbuf_new_from_file( - deluge.common.get_pixmap("queued16.png")) -icon_checking = gtk.gdk.pixbuf_new_from_file( - deluge.common.get_pixmap("checking16.png")) +icon_downloading = gtk.gdk.pixbuf_new_from_file(deluge.common.get_pixmap("downloading16.png")) +icon_seeding = gtk.gdk.pixbuf_new_from_file(deluge.common.get_pixmap("seeding16.png")) +icon_inactive = gtk.gdk.pixbuf_new_from_file(deluge.common.get_pixmap("inactive16.png")) +icon_alert = gtk.gdk.pixbuf_new_from_file(deluge.common.get_pixmap("alert16.png")) +icon_queued = gtk.gdk.pixbuf_new_from_file(deluge.common.get_pixmap("queued16.png")) +icon_checking = gtk.gdk.pixbuf_new_from_file(deluge.common.get_pixmap("checking16.png")) # Holds the info for which status icon to display based on state ICON_STATE = { @@ -192,11 +182,11 @@ class SearchBox(object): self.visible = False self.search_pending = self.prefiltered = None - self.search_box = self.window.main_glade.get_widget("search_box") - self.search_torrents_entry = self.window.main_glade.get_widget("search_torrents_entry") - self.close_search_button = self.window.main_glade.get_widget("close_search_button") - self.match_search_button = self.window.main_glade.get_widget("search_torrents_match") - self.window.main_glade.signal_autoconnect(self) + self.search_box = self.window.main_builder.get_object("search_box") + self.search_torrents_entry = self.window.main_builder.get_object("search_torrents_entry") + self.close_search_button = self.window.main_builder.get_object("close_search_button") + self.match_search_button = self.window.main_builder.get_object("search_torrents_match") + self.window.connect_signals(self) def show(self): self.visible = True @@ -319,9 +309,7 @@ class TorrentView(listview.ListView, component.Component): component.Component.__init__(self, "TorrentView", interval=2, depend=["SessionProxy"]) self.window = component.get("MainWindow") # Call the ListView constructor - listview.ListView.__init__(self, - self.window.main_glade.get_widget("torrent_view"), - "torrentview.state") + listview.ListView.__init__(self, self.window.main_builder.get_object("torrent_view"), "torrentview.state") log.debug("TorrentView Init..") # If we have gotten the state yet @@ -333,11 +321,8 @@ class TorrentView(listview.ListView, component.Component): # We keep a copy of the previous status to compare for changes self.prev_status = {} - # Register the columns menu with the listview so it gets updated - # accordingly. - self.register_checklist_menu( - self.window.main_glade.get_widget("menu_columns") - ) + # Register the columns menu with the listview so it gets updated accordingly. + self.register_checklist_menu(self.window.main_builder.get_object("menu_columns")) # Add the columns to the listview self.add_text_column("torrent_id", hidden=True)