connected a few toolbar buttons, started tinkering with preference dialog

This commit is contained in:
Zach Tibbitts 2007-02-07 23:49:31 +00:00
commit ee60730dae
5 changed files with 1094 additions and 1004 deletions

View file

@ -18,7 +18,7 @@
# 51 Franklin Street, Fifth Floor # 51 Franklin Street, Fifth Floor
# Boston, MA 02110-1301, USA. # Boston, MA 02110-1301, USA.
import sys, os, webbrowser import sys, os, os.path, webbrowser
PROGRAM_NAME = "Deluge" PROGRAM_NAME = "Deluge"
PROGRAM_VERSION = "0.4.9.0" PROGRAM_VERSION = "0.4.9.0"
@ -36,6 +36,9 @@ class DelugePreferences:
def get(self, key): def get(self, key):
return self.pref[key] return self.pref[key]
def keys(self):
return self.pref.keys()
def load_from_file(self, filename): def load_from_file(self, filename):
f = open(filename, mode='r') f = open(filename, mode='r')
for line in f: for line in f:

View file

@ -37,10 +37,20 @@ class DelugeGTK(dbus.service.Object):
dbus.service.Object.__init__(self, bus_name, object_path) dbus.service.Object.__init__(self, bus_name, object_path)
self.is_running = False self.is_running = False
self.torrent_file_queue = [] self.torrent_file_queue = []
#Load up a config file:
self.conf_file = xdg.BaseDirectory.save_config_path("deluge-svn") + '/deluge.conf'
if os.path.isdir(self.conf_file):
print 'Weird, the file I was trying to write to, %s, is an existing directory'%(self.conf_file)
sys.exit(0)
if not os.path.isfile(self.conf_file):
f = open(self.conf_file, mode='w')
f.flush()
f.close()
self.pref = dcommon.DelugePreferences()
self.pref.load_from_file(self.conf_file)
#Start the Deluge Manager: #Start the Deluge Manager:
self.manager = deluge.Manager("DE", "0500", "Deluge 0.5.0", self.manager = deluge.Manager("DE", "0490", "Deluge 0.4.9",
os.path.expanduser("~") + "/Temp") xdg.BaseDirectory.save_config_path("deluge-svn"))
#xdg.BaseDirectory.save_config_path("deluge-svn"))
#Set up the interface: #Set up the interface:
self.gladefile = dcommon.get_glade_file("delugegtk.glade") self.gladefile = dcommon.get_glade_file("delugegtk.glade")
self.wtree = gtk.glade.XML(self.gladefile) self.wtree = gtk.glade.XML(self.gladefile)
@ -68,8 +78,8 @@ class DelugeGTK(dbus.service.Object):
"remove_torrent" : self.remove_torrent_clicked, "remove_torrent" : self.remove_torrent_clicked,
"menu_quit": self.quit, "menu_quit": self.quit,
## Edit Menu ## Edit Menu
"pref_clicked": self.prf.show_pref, "pref_clicked": self.show_pref,
"plugins_clicked": self.prf.show_plugins, "plugins_clicked": self.show_plugins,
## View Menu ## View Menu
"infopane_toggle": self.infopane_toggle, "infopane_toggle": self.infopane_toggle,
"size_toggle": self.size_toggle, "size_toggle": self.size_toggle,
@ -83,7 +93,11 @@ class DelugeGTK(dbus.service.Object):
## Help Menu ## Help Menu
"show_about_dialog": self.abt.show, "show_about_dialog": self.abt.show,
## Toolbar ## Toolbar
"recheck_files": self.recheck_files,
"update_tracker": self.update_tracker, "update_tracker": self.update_tracker,
"clear_finished": self.clear_finished,
"queue_up": self.q_torrent_up,
"queue_down": self.q_torrent_down,
## Other events ## Other events
"torrentrow_click": self.torrentview_clicked, "torrentrow_click": self.torrentview_clicked,
}) })
@ -91,7 +105,7 @@ class DelugeGTK(dbus.service.Object):
## Create the torrent listview ## Create the torrent listview
self.view = self.wtree.get_widget("torrent_view") self.view = self.wtree.get_widget("torrent_view")
# UID, Q#, Name, Size, Progress, Message, Seeders, Peers, DL, UL, ETA, Share # UID, Q#, Name, Size, Progress, Message, Seeders, Peers, DL, UL, ETA, Share
self.store = gtk.ListStore(int, int, str, str, int, str, str, str, str, str, str, str) self.store = gtk.ListStore(int, int, str, str, float, str, str, str, str, str, str, str)
self.view.set_model(self.store) self.view.set_model(self.store)
self.view.set_rules_hint(True) self.view.set_rules_hint(True)
@ -157,6 +171,7 @@ class DelugeGTK(dbus.service.Object):
self.text_summary_eta = self.wtree.get_widget("summary_eta") self.text_summary_eta = self.wtree.get_widget("summary_eta")
## Interface created ## Interface created
self.apply_prefs()
## external_add_torrent should only be called from outside the class ## external_add_torrent should only be called from outside the class
@dbus.service.method('org.deluge_torrent.DelugeInterface') @dbus.service.method('org.deluge_torrent.DelugeInterface')
@ -197,7 +212,33 @@ class DelugeGTK(dbus.service.Object):
except KeyboardInterrupt: except KeyboardInterrupt:
self.manager.quit() self.manager.quit()
def show_pref(self, o=None):
self.pref = self.prf.show_dlg(self.pref)
def show_plugins(self, o=None):
pass
def apply_prefs(self):
for k in self.pref.keys():
print k, self.pref.get(k)
# UID, Q#, Name, Size, Progress, Message, Seeders, Peers, DL, UL, ETA, Share
def get_list_from_unique_id(self, unique_id):
state = self.manager.get_torrent_state(unique_id)
queue = int(state['queue_pos']) + 1
name = state['name']
size = dcommon.fsize(state['total_size'])
progress = float(state['progress'] * 100)
message = deluge.STATE_MESSAGES[state['state']]
seeds = dcommon.fseed(state)
peers = dcommon.fpeer(state)
dlrate = dcommon.frate(state['download_rate'])
ulrate = dcommon.frate(state['upload_rate'])
eta = "NULL"
share = self.calc_share_ratio(unique_id, state)
return [unique_id, queue, name, size, progress, message,
seeds, peers, dlrate, ulrate, eta, share]
## Call via a timer to update the interface ## Call via a timer to update the interface
def update(self): def update(self):
@ -239,7 +280,7 @@ class DelugeGTK(dbus.service.Object):
self.text_summary_seeders.set_text(dcommon.fseed(state)) self.text_summary_seeders.set_text(dcommon.fseed(state))
self.text_summary_peers.set_text(dcommon.fpeer(state)) self.text_summary_peers.set_text(dcommon.fpeer(state))
self.text_summary_percentage_done.set_text(dcommon.fpcnt(state["progress"])) self.text_summary_percentage_done.set_text(dcommon.fpcnt(state["progress"]))
self.text_summary_share_ratio.set_text(self.calc_share_ratio(state)) self.text_summary_share_ratio.set_text(self.calc_share_ratio(self.get_selected_torrent(), state))
#self.text_summary_downloaded_this_session.set_text(str(state[""])) #self.text_summary_downloaded_this_session.set_text(str(state[""]))
#self.text_summary_uplodaded_this_session.set_text(str(state[""])) #self.text_summary_uplodaded_this_session.set_text(str(state[""]))
self.text_summary_tracker.set_text(str(state["tracker"])) self.text_summary_tracker.set_text(str(state["tracker"]))
@ -263,34 +304,16 @@ class DelugeGTK(dbus.service.Object):
return True return True
def calc_share_ratio(self, torrent_state): def calc_share_ratio(self, unique_id, torrent_state):
if torrent_state["total_upload"] == 0: r = self.manager.calc_ratio(unique_id, torrent_state)
return "0" return '%.2f'%(r)
elif torrent_state["total_download"] == 0:
return "Undefined"
else:
ratio = float(torrent_state["total_upload"]) / float(torrent_state["total_download"])
return dcommon.fpcnt(ratio)
def get_selected_torrent(self): def get_selected_torrent(self):
return self.store.get_value(self.view.get_selection().get_selected()[1], 0) try:
return self.store.get_value(self.view.get_selection().get_selected()[1], 0)
except TypeError:
return None
# UID, Q#, Name, Size, Progress, Message, Seeders, Peers, DL, UL, ETA, Share
def get_list_from_unique_id(self, unique_id):
state = self.manager.get_torrent_state(unique_id)
queue = int(state['queue_pos']) + 1
name = state['name']
size = dcommon.fsize(state['total_size'])
progress =state['progress']
message = deluge.STATE_MESSAGES[state['state']]
seeds = dcommon.fseed(state)
peers = dcommon.fpeer(state)
dlrate = dcommon.frate(state['download_rate'])
ulrate = dcommon.frate(state['upload_rate'])
eta = "NULL"
share = self.calc_share_ratio(state)
return [unique_id, queue, name, size, progress, message,
seeds, peers, dlrate, ulrate, eta, share]
def new_torrent_clicked(self, obj=None): def new_torrent_clicked(self, obj=None):
pass pass
@ -302,10 +325,30 @@ class DelugeGTK(dbus.service.Object):
self.store.append(self.get_list_from_unique_id(uid)) self.store.append(self.get_list_from_unique_id(uid))
def remove_torrent_clicked(self, obj=None): def remove_torrent_clicked(self, obj=None):
self.manager.remove_torrent(self.get_selected_torrent(), False) torrent = self.get_selected_torrent()
if torrent is not None:
self.manager.remove_torrent(torrent, False)
def recheck_files(self, obj=None):
pass
def update_tracker(self, obj=None): def update_tracker(self, obj=None):
self.manager.update_tracker(get_selected_torrent()) torrent = self.get_selected_torrent()
if torrent is not None:
self.manager.update_tracker(torrent)
def clear_finished(self, obj=None):
self.manager.clear_completed()
def q_torrent_up(self, obj=None):
torrent = self.get_selected_torrent()
if torrent is not None:
self.manager.queue_up(torrent)
def q_torrent_down(self, obj=None):
torrent = self.get_selected_torrent()
if torrent is not None:
self.manager.queue_up(torrent)
def torrentview_clicked(self, widget, event): def torrentview_clicked(self, widget, event):
pass pass

View file

@ -64,32 +64,50 @@ class AboutDialog:
self.abt.run() self.abt.run()
self.abt.hide_all() self.abt.hide_all()
## TODO: Merge this class (and possibly others) into the main interface class
class PreferencesDialog: class PreferencesDialog:
def __init__(self): def __init__(self):
self.gladefile = dcommon.get_glade_file("dgtkpref.glade") self.gladefile = dcommon.get_glade_file("dgtkpref.glade")
self.wtree = gtk.glade.XML(self.gladefile) self.wtree = gtk.glade.XML(self.gladefile)
self.prf = self.wtree.get_widget("pref_dialog") self.dlg = self.wtree.get_widget("pref_dialog")
self.notebook = self.wtree.get_widget("pref_notebook") self.notebook = self.wtree.get_widget("pref_notebook")
self.prf.set_icon_from_file(dcommon.get_pixmap("deluge32.png")) self.dlg.set_icon_from_file(dcommon.get_pixmap("deluge32.png"))
self.plugin_view = self.wtree.get_widget("plugin_view") #self.plugin_view = self.wtree.get_widget("plugin_view")
self.plugin_store = gtk.ListStore(str, 'gboolean') #self.plugin_store = gtk.ListStore(str, 'gboolean')
self.plugin_view.set_model(self.plugin_store) #self.plugin_view.set_model(self.plugin_store)
self.plugin_name_column = add_text_column(self.plugin_view, "Plugin", 0) #self.plugin_name_column = add_text_column(self.plugin_view, "Plugin", 0)
self.plugin_name_column.set_expand(True) #self.plugin_name_column.set_expand(True)
self.plugin_toggle_column = add_toggle_column(self.plugin_view, "Enable", 1) #self.plugin_toggle_column = add_toggle_column(self.plugin_view, "Enable", 1)
def show_pref(self, arg=None): self.wtree.signal_autoconnect({"tray_toggle": self.tray_toggle,
self.prf.show_all() })
self.notebook.set_current_page(0)
self.prf.run()
self.prf.hide_all()
def show_plugins(self, arg=None): def tray_toggle(self, obj):
self.prf.show_all() if obj.get_active():
self.notebook.set_current_page(2) self.wtree.get_widget("chk_min_on_close").set_sensitive(True)
self.prf.run() else:
self.prf.hide_all() self.wtree.get_widget("chk_min_on_close").set_sensitive(False)
def set_pref(self, pref_file):
pass
def get_pref(self, pref_file):
pass
def show_dlg(self, conf=None, page=0):
self.dlg.show_all()
self.notebook.set_current_page(page)
# Set existing options
self.set_pref(conf)
self.dlg.run()
self.dlg.hide_all()
class PluginsDialog:
def __init__(self):
pass
## A simple file open dialog. I'm going to improve it later, ## A simple file open dialog. I'm going to improve it later,

File diff suppressed because it is too large Load diff

View file

@ -32,6 +32,7 @@
<child> <child>
<widget class="GtkExpander" id="expander6"> <widget class="GtkExpander" id="expander6">
<property name="visible">True</property> <property name="visible">True</property>
<property name="expanded">True</property>
<child> <child>
<widget class="GtkTable" id="table5"> <widget class="GtkTable" id="table5">
<property name="visible">True</property> <property name="visible">True</property>
@ -44,10 +45,15 @@
<placeholder/> <placeholder/>
</child> </child>
<child> <child>
<placeholder/> <widget class="GtkCheckButton" id="chk_use_tray">
</child> <property name="visible">True</property>
<child> <property name="label" translatable="yes">Enable system tray icon</property>
<placeholder/> <property name="draw_indicator">True</property>
<signal name="toggled" handler="tray_toggle"/>
</widget>
<packing>
<property name="right_attach">2</property>
</packing>
</child> </child>
<child> <child>
<widget class="GtkCheckButton" id="chk_min_on_close"> <widget class="GtkCheckButton" id="chk_min_on_close">
@ -57,6 +63,9 @@
</widget> </widget>
<packing> <packing>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_padding">12</property>
</packing> </packing>
</child> </child>
</widget> </widget>
@ -78,23 +87,26 @@
<child> <child>
<widget class="GtkExpander" id="expander1"> <widget class="GtkExpander" id="expander1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="expanded">True</property>
<child> <child>
<widget class="GtkTable" id="table3"> <widget class="GtkTable" id="table3">
<property name="visible">True</property> <property name="visible">True</property>
<property name="n_rows">2</property> <property name="n_rows">2</property>
<property name="n_columns">2</property> <property name="n_columns">2</property>
<child> <child>
<widget class="GtkRadioButton" id="radio_ask_save"> <widget class="GtkFileChooserButton" id="filechooserbutton1">
<property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property>
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">Ask me where to save each download</property>
<property name="draw_indicator">True</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkRadioButton" id="radio_save_all_too"> <widget class="GtkRadioButton" id="radio_save_all_to">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">Save all downloads to:</property> <property name="label" translatable="yes">Save all downloads to:</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
@ -106,15 +118,13 @@
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkFileChooserButton" id="filechooserbutton1"> <widget class="GtkRadioButton" id="radio_ask_save">
<property name="visible">True</property> <property name="visible">True</property>
<property name="action">GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER</property> <property name="label" translatable="yes">Ask me where to save each download</property>
<property name="draw_indicator">True</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing> </packing>
</child> </child>
</widget> </widget>
@ -137,25 +147,18 @@
<child> <child>
<widget class="GtkExpander" id="expander2"> <widget class="GtkExpander" id="expander2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="expanded">True</property>
<child> <child>
<widget class="GtkTable" id="table4"> <widget class="GtkTable" id="table4">
<property name="visible">True</property> <property name="visible">True</property>
<property name="n_rows">1</property> <property name="n_rows">1</property>
<property name="n_columns">2</property> <property name="n_columns">2</property>
<child> <child>
<widget class="GtkCheckButton" id="checkbutton1"> <widget class="GtkSpinButton" id="ratio_spinner">
<property name="visible">True</property>
<property name="label" translatable="yes">Stop seeding torrents when
their share ratio reaches:</property>
<property name="draw_indicator">True</property>
</widget>
</child>
<child>
<widget class="GtkSpinButton" id="spinbutton1">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="can_focus">True</property>
<property name="adjustment">0.10000000000000001 0 10 0.10000000000000001 10 10</property> <property name="adjustment">1 0 10 0.10000000000000001 10 10</property>
<property name="climb_rate">0.10000000149011612</property> <property name="climb_rate">0.05000000074505806</property>
<property name="digits">2</property> <property name="digits">2</property>
<property name="snap_to_ticks">True</property> <property name="snap_to_ticks">True</property>
</widget> </widget>
@ -164,6 +167,14 @@ their share ratio reaches:</property>
<property name="right_attach">2</property> <property name="right_attach">2</property>
</packing> </packing>
</child> </child>
<child>
<widget class="GtkCheckButton" id="chk_autoseed">
<property name="visible">True</property>
<property name="label" translatable="yes">Stop seeding torrents when
their share ratio reaches:</property>
<property name="draw_indicator">True</property>
</widget>
</child>
</widget> </widget>
</child> </child>
<child> <child>
@ -184,8 +195,9 @@ their share ratio reaches:</property>
<child> <child>
<widget class="GtkExpander" id="expander3"> <widget class="GtkExpander" id="expander3">
<property name="visible">True</property> <property name="visible">True</property>
<property name="expanded">True</property>
<child> <child>
<widget class="GtkCheckButton" id="checkbutton2"> <widget class="GtkCheckButton" id="chk_compact">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">Use compact storage allocation</property> <property name="label" translatable="yes">Use compact storage allocation</property>
<property name="draw_indicator">True</property> <property name="draw_indicator">True</property>
@ -256,27 +268,41 @@ their share ratio reaches:</property>
<placeholder/> <placeholder/>
</child> </child>
<child> <child>
<widget class="GtkButton" id="button6"> <widget class="GtkLabel" id="label25">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">Test Port</property> <property name="label" translatable="yes">Try from:</property>
</widget> </widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child> </child>
<child> <child>
<widget class="GtkLabel" id="label28"> <widget class="GtkLabel" id="label26">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">label</property> <property name="label" translatable="yes">to:</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">2</property> <property name="left_attach">2</property>
<property name="right_attach">3</property> <property name="right_attach">3</property>
<property name="top_attach">1</property> </packing>
<property name="bottom_attach">2</property> </child>
<child>
<widget class="GtkSpinButton" id="spin_port_min">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">0 0 100 1 10 10</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spin_port_max">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">0 0 100 1 10 10</property>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -292,42 +318,28 @@ their share ratio reaches:</property>
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkSpinButton" id="spinbutton3"> <widget class="GtkLabel" id="active_port_label">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="label" translatable="yes">0000</property>
<property name="adjustment">0 0 100 1 10 10</property>
</widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spinbutton2">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">0 0 100 1 10 10</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label26">
<property name="visible">True</property>
<property name="label" translatable="yes">to:</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">2</property> <property name="left_attach">2</property>
<property name="right_attach">3</property> <property name="right_attach">3</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkLabel" id="label25"> <widget class="GtkButton" id="btn_test_port">
<property name="visible">True</property> <property name="visible">True</property>
<property name="label" translatable="yes">Try from:</property> <property name="label" translatable="yes">Test Port</property>
</widget> </widget>
<packing>
<property name="left_attach">3</property>
<property name="right_attach">4</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child> </child>
</widget> </widget>
</child> </child>
@ -355,32 +367,53 @@ their share ratio reaches:</property>
<property name="n_rows">4</property> <property name="n_rows">4</property>
<property name="n_columns">2</property> <property name="n_columns">2</property>
<child> <child>
<widget class="GtkLabel" id="label4"> <widget class="GtkSpinButton" id="spinbutton4">
<property name="visible">True</property> <property name="visible">True</property>
<property name="xalign">0</property> <property name="can_focus">True</property>
<property name="label" translatable="yes">Maximum Upload Rate:</property> <property name="adjustment">0 0 100 1 10 10</property>
</widget>
</child>
<child>
<widget class="GtkLabel" id="label3">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Maximum number of Uploads:</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spin_num_download">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">0 0 100 1 10 10</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property>
<property name="bottom_attach">3</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spin_num_upload">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">0 0 100 1 10 10</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property> <property name="top_attach">1</property>
<property name="bottom_attach">2</property> <property name="bottom_attach">2</property>
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkLabel" id="label2"> <widget class="GtkSpinButton" id="spin_max_upload">
<property name="visible">True</property> <property name="visible">True</property>
<property name="xalign">0</property> <property name="can_focus">True</property>
<property name="label" translatable="yes">Maximum Download Rate:</property> <property name="adjustment">0 0 100 1 10 10</property>
</widget> </widget>
<packing> <packing>
<property name="top_attach">2</property> <property name="left_attach">1</property>
<property name="bottom_attach">3</property> <property name="right_attach">2</property>
</packing> </packing>
</child> </child>
<child> <child>
@ -395,55 +428,34 @@ their share ratio reaches:</property>
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkSpinButton" id="spinbutton7"> <widget class="GtkLabel" id="label2">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="xalign">0</property>
<property name="adjustment">0 0 100 1 10 10</property> <property name="label" translatable="yes">Maximum Download Rate:</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spinbutton6">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">0 0 100 1 10 10</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
</packing>
</child>
<child>
<widget class="GtkSpinButton" id="spinbutton5">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="adjustment">0 0 100 1 10 10</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">2</property> <property name="top_attach">2</property>
<property name="bottom_attach">3</property> <property name="bottom_attach">3</property>
</packing> </packing>
</child> </child>
<child> <child>
<widget class="GtkSpinButton" id="spinbutton4"> <widget class="GtkLabel" id="label3">
<property name="visible">True</property> <property name="visible">True</property>
<property name="can_focus">True</property> <property name="xalign">0</property>
<property name="adjustment">0 0 100 1 10 10</property> <property name="label" translatable="yes">Maximum number of Uploads:</property>
</widget> </widget>
<packing> <packing>
<property name="left_attach">1</property> <property name="top_attach">1</property>
<property name="right_attach">2</property> <property name="bottom_attach">2</property>
<property name="top_attach">3</property>
<property name="bottom_attach">4</property>
</packing> </packing>
</child> </child>
<child>
<widget class="GtkLabel" id="label4">
<property name="visible">True</property>
<property name="xalign">0</property>
<property name="label" translatable="yes">Maximum Upload Rate:</property>
</widget>
</child>
</widget> </widget>
</child> </child>
<child> <child>
@ -486,81 +498,6 @@ their share ratio reaches:</property>
<property name="tab_fill">False</property> <property name="tab_fill">False</property>
</packing> </packing>
</child> </child>
<child>
<widget class="GtkTable" id="plugins_options">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<child>
<widget class="GtkTextView" id="plugin_text">
<property name="visible">True</property>
<property name="editable">False</property>
<property name="wrap_mode">GTK_WRAP_WORD</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_padding">10</property>
<property name="y_padding">10</property>
</packing>
</child>
<child>
<widget class="GtkHButtonBox" id="hbuttonbox1">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
<child>
<widget class="GtkButton" id="button1">
<property name="visible">True</property>
<property name="label" translatable="yes">gtk-preferences</property>
<property name="use_stock">True</property>
</widget>
</child>
<child>
<widget class="GtkButton" id="button2">
<property name="visible">True</property>
<property name="label" translatable="yes">gtk-apply</property>
<property name="use_stock">True</property>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkTreeView" id="plugin_view">
<property name="visible">True</property>
</widget>
<packing>
<property name="bottom_attach">2</property>
</packing>
</child>
</widget>
<packing>
<property name="position">2</property>
<property name="tab_expand">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label20">
<property name="visible">True</property>
<property name="label" translatable="yes">Plugins</property>
</widget>
<packing>
<property name="type">tab</property>
<property name="position">2</property>
<property name="tab_expand">False</property>
<property name="tab_fill">False</property>
</packing>
</child>
</widget> </widget>
<packing> <packing>
<property name="position">1</property> <property name="position">1</property>
@ -597,4 +534,128 @@ their share ratio reaches:</property>
</widget> </widget>
</child> </child>
</widget> </widget>
<widget class="GtkDialog" id="plugin_dialog">
<property name="width_request">480</property>
<property name="border_width">5</property>
<property name="title" translatable="yes">Preferences Dialog</property>
<property name="default_width">583</property>
<property name="default_height">431</property>
<property name="has_separator">False</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox2">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property>
<property name="spacing">2</property>
<child>
<widget class="GtkNotebook" id="pref_notebook1">
<property name="visible">True</property>
<child>
<widget class="GtkTable" id="plugins_options1">
<property name="visible">True</property>
<property name="n_rows">2</property>
<property name="n_columns">2</property>
<child>
<widget class="GtkTextView" id="plugin_text1">
<property name="visible">True</property>
<property name="editable">False</property>
<property name="wrap_mode">GTK_WRAP_WORD</property>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="x_padding">10</property>
<property name="y_padding">10</property>
</packing>
</child>
<child>
<widget class="GtkHButtonBox" id="hbuttonbox2">
<property name="visible">True</property>
<property name="layout_style">GTK_BUTTONBOX_SPREAD</property>
<child>
<widget class="GtkButton" id="button7">
<property name="visible">True</property>
<property name="label" translatable="yes">gtk-preferences</property>
<property name="use_stock">True</property>
</widget>
</child>
<child>
<widget class="GtkButton" id="button8">
<property name="visible">True</property>
<property name="label" translatable="yes">gtk-apply</property>
<property name="use_stock">True</property>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="left_attach">1</property>
<property name="right_attach">2</property>
<property name="top_attach">1</property>
<property name="bottom_attach">2</property>
<property name="x_options">GTK_FILL</property>
<property name="y_options">GTK_FILL</property>
</packing>
</child>
<child>
<widget class="GtkTreeView" id="plugin_view1">
<property name="visible">True</property>
</widget>
<packing>
<property name="bottom_attach">2</property>
</packing>
</child>
</widget>
<packing>
<property name="tab_expand">False</property>
</packing>
</child>
<child>
<widget class="GtkLabel" id="label34">
<property name="visible">True</property>
<property name="label" translatable="yes">Plugins</property>
</widget>
<packing>
<property name="type">tab</property>
<property name="tab_expand">False</property>
<property name="tab_fill">False</property>
</packing>
</child>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
<child internal-child="action_area">
<widget class="GtkHButtonBox" id="dialog-action_area2">
<property name="visible">True</property>
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_ENTER_NOTIFY_MASK</property>
<property name="layout_style">GTK_BUTTONBOX_END</property>
<child>
<widget class="GtkButton" id="button9">
<property name="visible">True</property>
<property name="label" translatable="yes">gtk-cancel</property>
<property name="use_stock">True</property>
</widget>
</child>
<child>
<widget class="GtkButton" id="button10">
<property name="visible">True</property>
<property name="label" translatable="yes">gtk-ok</property>
<property name="use_stock">True</property>
</widget>
<packing>
<property name="position">1</property>
</packing>
</child>
</widget>
<packing>
<property name="expand">False</property>
<property name="pack_type">GTK_PACK_END</property>
</packing>
</child>
</widget>
</child>
</widget>
</glade-interface> </glade-interface>