From 4dc4049851b51ad3ffd3ec8f9c62016a58221d87 Mon Sep 17 00:00:00 2001 From: Pedro Algarvio Date: Wed, 6 Jul 2011 11:33:31 +0100 Subject: [PATCH] Migrated the connection manager to GtkBuilder. --- deluge/ui/gtkui/connectionmanager.py | 120 +-- .../gtkui/glade/connection_manager.addhost.ui | 266 +++++++ .../glade/connection_manager.askpassword.ui | 96 +++ .../ui/gtkui/glade/connection_manager.glade | 745 ------------------ deluge/ui/gtkui/glade/connection_manager.ui | 402 ++++++++++ 5 files changed, 829 insertions(+), 800 deletions(-) create mode 100644 deluge/ui/gtkui/glade/connection_manager.addhost.ui create mode 100644 deluge/ui/gtkui/glade/connection_manager.askpassword.ui delete mode 100644 deluge/ui/gtkui/glade/connection_manager.glade create mode 100644 deluge/ui/gtkui/glade/connection_manager.ui diff --git a/deluge/ui/gtkui/connectionmanager.py b/deluge/ui/gtkui/connectionmanager.py index 83e78e759..fe7e44934 100644 --- a/deluge/ui/gtkui/connectionmanager.py +++ b/deluge/ui/gtkui/connectionmanager.py @@ -136,25 +136,35 @@ class ConnectionManager(component.Component): """ self.config = self.__load_config() # Get the glade file for the connection manager - self.glade = gtk.glade.XML(deluge.common.resource_filename( - "deluge.ui.gtkui", os.path.join("glade", "connection_manager.glade")) - ) + self.builder = gtk.Builder() + # The main dialog + self.builder.add_from_file(deluge.common.resource_filename( + "deluge.ui.gtkui", os.path.join("glade", "connection_manager.ui") + )) + # The add host dialog + self.builder.add_from_file(deluge.common.resource_filename( + "deluge.ui.gtkui", os.path.join("glade", "connection_manager.addhost.ui") + )) + # The ask password dialog + self.builder.add_from_file(deluge.common.resource_filename( + "deluge.ui.gtkui", os.path.join("glade", "connection_manager.askpassword.ui") + )) self.window = component.get("MainWindow") # Setup the ConnectionManager dialog - self.connection_manager = self.glade.get_widget("connection_manager") + self.connection_manager = self.builder.get_object("connection_manager") self.connection_manager.set_transient_for(self.window.window) self.connection_manager.set_icon(common.get_deluge_icon()) - self.glade.get_widget("image1").set_from_pixbuf(common.get_logo(32)) + self.builder.get_object("image1").set_from_pixbuf(common.get_logo(32)) - self.askpassword_dialog = self.glade.get_widget("askpassword_dialog") + self.askpassword_dialog = self.builder.get_object("askpassword_dialog") self.askpassword_dialog.set_transient_for(self.connection_manager) self.askpassword_dialog.set_icon(common.get_deluge_icon()) - self.askpassword_dialog_entry = self.glade.get_widget("askpassword_dialog_entry") + self.askpassword_dialog_entry = self.builder.get_object("askpassword_dialog_entry") - self.hostlist = self.glade.get_widget("hostlist") + self.hostlist = self.builder.get_object("hostlist") # Create status pixbufs if not HOSTLIST_PIXBUFS: @@ -185,7 +195,7 @@ class ConnectionManager(component.Component): self.hostlist.append_column(column) # Connect the signals to the handlers - self.glade.signal_autoconnect(self) + self.builder.connect_signals(self) self.hostlist.get_selection().connect( "changed", self.on_hostlist_selection_changed ) @@ -211,7 +221,7 @@ class ConnectionManager(component.Component): self.__save_hostlist() self.connection_manager.destroy() - del self.glade + del self.builder del self.window del self.connection_manager del self.liststore @@ -363,13 +373,13 @@ class ConnectionManager(component.Component): """ Set the widgets to show the correct options from the config. """ - self.glade.get_widget("chk_autoconnect").set_active( + self.builder.get_object("chk_autoconnect").set_active( self.gtkui_config["autoconnect"] ) - self.glade.get_widget("chk_autostart").set_active( + self.builder.get_object("chk_autostart").set_active( self.gtkui_config["autostart_localhost"] ) - self.glade.get_widget("chk_donotshow").set_active( + self.builder.get_object("chk_donotshow").set_active( not self.gtkui_config["show_connection_manager_on_start"] ) @@ -377,9 +387,9 @@ class ConnectionManager(component.Component): """ Set options in gtkui config from the toggle buttons. """ - self.gtkui_config["autoconnect"] = self.glade.get_widget("chk_autoconnect").get_active() - self.gtkui_config["autostart_localhost"] = self.glade.get_widget("chk_autostart").get_active() - self.gtkui_config["show_connection_manager_on_start"] = not self.glade.get_widget("chk_donotshow").get_active() + self.gtkui_config["autoconnect"] = self.builder.get_object("chk_autoconnect").get_active() + self.gtkui_config["autostart_localhost"] = self.builder.get_object("chk_autostart").get_active() + self.gtkui_config["show_connection_manager_on_start"] = not self.builder.get_object("chk_donotshow").get_active() def __update_buttons(self): """ @@ -387,19 +397,19 @@ class ConnectionManager(component.Component): """ if len(self.liststore) == 0: # There is nothing in the list - self.glade.get_widget("button_startdaemon").set_sensitive(True) - self.glade.get_widget("button_connect").set_sensitive(False) - self.glade.get_widget("button_removehost").set_sensitive(False) - self.glade.get_widget("image_startdaemon").set_from_stock( + self.builder.get_object("button_startdaemon").set_sensitive(True) + self.builder.get_object("button_connect").set_sensitive(False) + self.builder.get_object("button_removehost").set_sensitive(False) + self.builder.get_object("image_startdaemon").set_from_stock( gtk.STOCK_EXECUTE, gtk.ICON_SIZE_MENU) - self.glade.get_widget("label_startdaemon").set_text("_Start Daemon") + self.builder.get_object("label_startdaemon").set_text("_Start Daemon") model, row = self.hostlist.get_selection().get_selected() if not row: - self.glade.get_widget("button_edithost").set_sensitive(False) + self.builder.get_object("button_edithost").set_sensitive(False) return - self.glade.get_widget("button_edithost").set_sensitive(True) + self.builder.get_object("button_edithost").set_sensitive(True) # Get some values about the selected host status = model[row][HOSTLIST_COL_STATUS] @@ -415,47 +425,47 @@ class ConnectionManager(component.Component): localhost = True # Make sure buttons are sensitive at start - self.glade.get_widget("button_startdaemon").set_sensitive(True) - self.glade.get_widget("button_connect").set_sensitive(True) - self.glade.get_widget("button_removehost").set_sensitive(True) + self.builder.get_object("button_startdaemon").set_sensitive(True) + self.builder.get_object("button_connect").set_sensitive(True) + self.builder.get_object("button_removehost").set_sensitive(True) # See if this is the currently connected host if status == _("Connected"): # Display a disconnect button if we're connected to this host - self.glade.get_widget("button_connect").set_label("gtk-disconnect") - self.glade.get_widget("button_removehost").set_sensitive(False) + self.builder.get_object("button_connect").set_label("gtk-disconnect") + self.builder.get_object("button_removehost").set_sensitive(False) else: - self.glade.get_widget("button_connect").set_label("gtk-connect") + self.builder.get_object("button_connect").set_label("gtk-connect") if status == _("Offline") and not localhost: - self.glade.get_widget("button_connect").set_sensitive(False) + self.builder.get_object("button_connect").set_sensitive(False) # Check to see if the host is online if status == _("Connected") or status == _("Online"): - self.glade.get_widget("image_startdaemon").set_from_stock( + self.builder.get_object("image_startdaemon").set_from_stock( gtk.STOCK_STOP, gtk.ICON_SIZE_MENU) - self.glade.get_widget("label_startdaemon").set_text( + self.builder.get_object("label_startdaemon").set_text( _("_Stop Daemon")) # Update the start daemon button if the selected host is localhost if localhost and status == _("Offline"): # The localhost is not online - self.glade.get_widget("image_startdaemon").set_from_stock( + self.builder.get_object("image_startdaemon").set_from_stock( gtk.STOCK_EXECUTE, gtk.ICON_SIZE_MENU) - self.glade.get_widget("label_startdaemon").set_text( + self.builder.get_object("label_startdaemon").set_text( _("_Start Daemon")) if client.connected() and (host, port, user) == client.connection_info(): # If we're connected, we can stop the dameon - self.glade.get_widget("button_startdaemon").set_sensitive(True) + self.builder.get_object("button_startdaemon").set_sensitive(True) elif user and passwd: # In this case we also have all the info to shutdown the dameon - self.glade.get_widget("button_startdaemon").set_sensitive(True) + self.builder.get_object("button_startdaemon").set_sensitive(True) else: # Can't stop non localhost daemons, specially without the necessary info - self.glade.get_widget("button_startdaemon").set_sensitive(False) + self.builder.get_object("button_startdaemon").set_sensitive(False) # Make sure label is displayed correctly using mnemonics - self.glade.get_widget("label_startdaemon").set_use_underline(True) + self.builder.get_object("label_startdaemon").set_use_underline(True) def start_daemon(self, port, config): """ @@ -541,8 +551,8 @@ class ConnectionManager(component.Component): ) msg = str(reason.value) - if not self.glade.get_widget("chk_autostart").get_active(): - msg += '\n' + _("Auto-starting the daemon localy is not enabled. " + if not self.builder.get_object("chk_autostart").get_active(): + msg += '\n' + _("Auto-starting the daemon locally is not enabled. " "See \"Options\" on the \"Connection Manager\".") dialogs.ErrorDialog(_("Failed To Connect"), msg).run() @@ -564,7 +574,7 @@ class ConnectionManager(component.Component): password = model[row][HOSTLIST_COL_PASS] if status == _("Offline") and \ - self.glade.get_widget("chk_autostart").get_active() and \ + self.builder.get_object("chk_autostart").get_active() and \ host in ("127.0.0.1", "localhost"): if not self.start_daemon(port, deluge.configmanager.get_config_dir()): log.debug("Failed to auto-start daemon") @@ -579,16 +589,16 @@ class ConnectionManager(component.Component): def on_button_addhost_clicked(self, widget): log.debug("on_button_addhost_clicked") - dialog = self.glade.get_widget("addhost_dialog") + dialog = self.builder.get_object("addhost_dialog") dialog.set_transient_for(self.connection_manager) dialog.set_position(gtk.WIN_POS_CENTER_ON_PARENT) - hostname_entry = self.glade.get_widget("entry_hostname") - port_spinbutton = self.glade.get_widget("spinbutton_port") - username_entry = self.glade.get_widget("entry_username") - password_entry = self.glade.get_widget("entry_password") - button_addhost_save = self.glade.get_widget("button_addhost_save") + hostname_entry = self.builder.get_object("entry_hostname") + port_spinbutton = self.builder.get_object("spinbutton_port") + username_entry = self.builder.get_object("entry_username") + password_entry = self.builder.get_object("entry_password") + button_addhost_save = self.builder.get_object("button_addhost_save") button_addhost_save.hide() - button_addhost_add = self.glade.get_widget("button_addhost_add") + button_addhost_add = self.builder.get_object("button_addhost_add") button_addhost_add.show() response = dialog.run() if response == 1: @@ -620,16 +630,16 @@ class ConnectionManager(component.Component): client.disconnect().addCallback(on_disconnect) return - dialog = self.glade.get_widget("addhost_dialog") + dialog = self.builder.get_object("addhost_dialog") dialog.set_transient_for(self.connection_manager) dialog.set_position(gtk.WIN_POS_CENTER_ON_PARENT) - hostname_entry = self.glade.get_widget("entry_hostname") - port_spinbutton = self.glade.get_widget("spinbutton_port") - username_entry = self.glade.get_widget("entry_username") - password_entry = self.glade.get_widget("entry_password") - button_addhost_save = self.glade.get_widget("button_addhost_save") + hostname_entry = self.builder.get_object("entry_hostname") + port_spinbutton = self.builder.get_object("spinbutton_port") + username_entry = self.builder.get_object("entry_username") + password_entry = self.builder.get_object("entry_password") + button_addhost_save = self.builder.get_object("button_addhost_save") button_addhost_save.show() - button_addhost_add = self.glade.get_widget("button_addhost_add") + button_addhost_add = self.builder.get_object("button_addhost_add") button_addhost_add.hide() username_entry.set_text(self.liststore[row][HOSTLIST_COL_USER]) diff --git a/deluge/ui/gtkui/glade/connection_manager.addhost.ui b/deluge/ui/gtkui/glade/connection_manager.addhost.ui new file mode 100644 index 000000000..fd50c52e2 --- /dev/null +++ b/deluge/ui/gtkui/glade/connection_manager.addhost.ui @@ -0,0 +1,266 @@ + + + + + + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + Add Host + True + center + True + 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 + end + + + 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 + + + + + gtk-add + True + True + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + True + + + False + False + 1 + + + + + gtk-save + True + True + False + True + + + False + False + 2 + + + + + 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 + Hostname: + + + False + False + 0 + + + + + True + False + 1 + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + True + True + False + False + True + True + + + + + True + True + 1 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Port: + + + False + False + 2 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + 5 + 1 + True + False + False + True + True + + 1 + True + + + False + False + 3 + + + + + False + False + 1 + + + + + True + False + 2 + 2 + + + True + False + 5 + + + True + True + False + + True + False + False + True + True + + + + + 1 + 2 + 1 + 2 + + + + + True + False + 5 + + + True + True + + True + False + False + True + True + + + + + 1 + 2 + + + + + True + False + Password: + + + 1 + 2 + GTK_FILL + + + + + True + False + Username: + + + GTK_FILL + + + + + False + True + 2 + + + + + + + + + button_addhost_cancel + button_addhost_add + button_addhost_save + + + diff --git a/deluge/ui/gtkui/glade/connection_manager.askpassword.ui b/deluge/ui/gtkui/glade/connection_manager.askpassword.ui new file mode 100644 index 000000000..fdc79ec77 --- /dev/null +++ b/deluge/ui/gtkui/glade/connection_manager.askpassword.ui @@ -0,0 +1,96 @@ + + + + + + False + 5 + Password Required + True + center-on-parent + 320 + True + dialog + True + + + True + False + 2 + + + True + False + end + + + gtk-connect + True + True + True + False + True + + + False + False + 0 + + + + + False + True + end + 0 + + + + + True + False + + + True + False + gtk-dialog-authentication + 6 + + + True + True + 0 + + + + + True + True + False + + True + False + False + True + True + + + True + True + 1 + + + + + True + True + 1 + + + + + + askpassword_dialog_connect_button + + + diff --git a/deluge/ui/gtkui/glade/connection_manager.glade b/deluge/ui/gtkui/glade/connection_manager.glade deleted file mode 100644 index cd343c81e..000000000 --- a/deluge/ui/gtkui/glade/connection_manager.glade +++ /dev/null @@ -1,745 +0,0 @@ - - - - - - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - Add Host - True - center - True - 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 - end - - - 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 - - - - - gtk-add - 1 - True - True - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - True - - - False - False - 1 - - - - - gtk-save - 2 - True - True - False - True - - - False - False - 2 - - - - - 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 - Hostname: - - - False - False - 0 - - - - - True - False - 1 - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True - False - False - True - True - - - - - True - True - 1 - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Port: - - - False - False - 2 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - 5 - 1 - False - False - True - True - 58846 0 65535 1 10 0 - 1 - True - - - False - False - 3 - - - - - False - False - 1 - - - - - True - False - 2 - 2 - - - True - False - 5 - - - True - True - False - False - False - True - True - - - - - 1 - 2 - 1 - 2 - - - - - True - False - 5 - - - True - True - False - False - True - True - - - - - 1 - 2 - - - - - True - False - Password: - - - 1 - 2 - GTK_FILL - - - - - True - False - Username: - - - GTK_FILL - - - - - False - True - 2 - - - - - - - - - - False - 5 - Password Required - True - center-on-parent - 320 - True - dialog - True - - - True - False - 2 - - - True - False - end - - - gtk-connect - 1 - True - True - True - False - True - - - - False - False - 0 - - - - - False - True - end - 0 - - - - - True - False - - - True - False - gtk-dialog-authentication - 6 - - - True - True - 0 - - - - - True - True - False - - False - False - True - True - - - - True - True - 1 - - - - - True - True - 1 - - - - - - - False - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - Connection Manager - True - center-on-parent - 350 - 300 - True - dialog - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 2 - - - False - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - end - - - False - False - 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 - gtk-missing-image - - - False - False - 0 - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - <big><b>Connection Manager</b></big> - True - - - False - True - 1 - - - - - False - True - 5 - 1 - - - - - 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 - queue - - - 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 - - - - - - - - True - True - 0 - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - start - - - gtk-add - 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 - - - - - gtk-edit - True - True - True - False - True - - - - False - False - 1 - - - - - gtk-remove - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - True - - - - False - False - 2 - - - - - False - False - 0 - - - - - True - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - - - - 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-execute - - - True - True - 0 - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - _Start local daemon - True - - - True - True - 1 - - - - - - - False - False - end - 1 - - - - - gtk-refresh - True - True - True - False - True - - - - False - False - 2 - - - - - False - False - 1 - - - - - True - True - 10 - 2 - - - - - True - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - 5 - 5 - 5 - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - - Automatically connect to selected host on start-up - True - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - True - - - - True - True - 0 - - - - - Automatically start localhost if needed - True - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - True - - - - True - True - 1 - - - - - Do not show this dialog on start-up - True - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - False - True - - - - True - True - 2 - - - - - - - - - True - False - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - Options - - - label_item - - - - - False - True - 3 - - - - - True - False - end - - - gtk-close - 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 - - - - - gtk-connect - True - True - True - False - True - - - - False - False - 1 - - - - - False - False - 4 - - - - - - diff --git a/deluge/ui/gtkui/glade/connection_manager.ui b/deluge/ui/gtkui/glade/connection_manager.ui new file mode 100644 index 000000000..c403d3d09 --- /dev/null +++ b/deluge/ui/gtkui/glade/connection_manager.ui @@ -0,0 +1,402 @@ + + + + + + False + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + Connection Manager + True + center-on-parent + 350 + 300 + True + dialog + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 2 + + + False + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + end + + + False + False + 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 + gtk-missing-image + + + False + False + 0 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + <big><b>Connection Manager</b></big> + True + + + False + True + 1 + + + + + False + True + 5 + 1 + + + + + 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 + queue + + + 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 + + + + + + + + True + True + 0 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + start + + + gtk-add + 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 + + + + + gtk-edit + True + True + True + False + True + + + + False + False + 1 + + + + + gtk-remove + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + True + + + + False + False + 2 + + + + + False + False + 0 + + + + + True + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + + + + 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-execute + + + True + True + 0 + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + _Start local daemon + True + + + True + True + 1 + + + + + + + False + False + end + 1 + + + + + gtk-refresh + True + True + True + False + True + + + + False + False + 2 + + + + + False + False + 1 + + + + + True + True + 10 + 2 + + + + + True + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + 5 + 5 + 5 + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + + + Automatically connect to selected host on start-up + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + True + + + + True + True + 0 + + + + + Automatically start localhost if needed + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + True + + + + True + True + 1 + + + + + Do not show this dialog on start-up + True + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + False + True + + + + True + True + 2 + + + + + + + + + True + False + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + Options + + + + + False + True + 3 + + + + + True + False + end + + + gtk-close + 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 + + + + + gtk-connect + True + True + True + False + True + + + + False + False + 1 + + + + + False + False + 4 + + + + + +