diff --git a/ChangeLog b/ChangeLog index bf00c80a8..ab04c27ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,4 +1,10 @@ Deluge 1.0.5 (In Development) + GtkUI: + * Increase the per-torrent stop share ratio max to 99999.0 + + WebUi: + * Javascript auto refresh for both templates. + Windows: * Fix #577 adding torrents by drag n' drop @@ -17,9 +23,6 @@ Deluge 1.0.4 (31 October 2008) Windows: * Fix starting on non-English versions of Windows -WebUi: - * Javascript auto refresh for both templates. - Deluge 1.0.3 (18 October 2008) Core: * Fix upnp - it should work on more routers now too diff --git a/deluge/ui/gtkui/glade/main_window.glade b/deluge/ui/gtkui/glade/main_window.glade index 9418975ae..4c7e8ee56 100644 --- a/deluge/ui/gtkui/glade/main_window.glade +++ b/deluge/ui/gtkui/glade/main_window.glade @@ -270,10 +270,6 @@ gtk-add - - False - False - @@ -284,19 +280,11 @@ gtk-remove - - False - False - True - - False - False - @@ -308,10 +296,6 @@ gtk-media-pause - - False - False - @@ -323,19 +307,11 @@ gtk-media-play - - False - False - True - - False - False - @@ -347,10 +323,6 @@ gtk-go-up - - False - False - @@ -362,20 +334,12 @@ gtk-go-down - - False - False - True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - - False - False - @@ -386,10 +350,6 @@ gtk-preferences - - False - False - @@ -400,10 +360,6 @@ gtk-network - - False - False - @@ -460,7 +416,6 @@ True True - True True True False @@ -659,191 +614,279 @@ - + True - 0 - - - 1 - 2 - GTK_FILL - - - - - True - 0 - - - 3 - 4 - GTK_FILL - - - - - True - 0 - - - 1 - 2 - 1 - 2 - GTK_FILL - - - - - True - 0 - - - 3 - 4 - 1 - 2 - GTK_FILL - - - - - True - 5 - - - True - 0 - <b>Downloaded:</b> - True - - - - - GTK_FILL - - - - - True - 5 - - - True - 0 - <b>Uploaded:</b> - True - - - - - 1 - 2 - GTK_FILL - - - - - True - 5 - - - True - 0 - <b>Share Ratio:</b> - True - - - - - 2 - 3 - GTK_FILL - - - - - True - 5 - - - True - 0 - <b>Next Announce:</b> - True - - + 5 + 6 3 4 GTK_FILL - + True - 15 - 5 - - - True - 0 - <b>Speed:</b> - True - - + 0 + <b>Auto Managed:</b> + True - 2 - 3 + 4 + 5 + 3 + 4 GTK_FILL - + True - 15 - 5 - - - True - 0 - <b>Speed:</b> - True - - - 2 - 3 + 7 + 8 + 2 + 3 + GTK_FILL + + + + + True + + + 7 + 8 1 2 GTK_FILL - + True - 15 - 5 - - - True - 0 - <b>ETA:</b> - True - - + 0 + <b>Seed Rank:</b> + True - 2 - 3 + 6 + 7 2 3 GTK_FILL + + + True + 0 + <b>Seeding Time:</b> + True + + + 6 + 7 + 1 + 2 + GTK_FILL + + + + + True + + + 7 + 8 + GTK_FILL + + + + + True + 0 + <b>Active Time:</b> + True + + + 6 + 7 + GTK_FILL + + + + + True + 0 + True + True + + + 1 + 2 + 3 + 4 + GTK_FILL + + + + + True + 0 + + + 3 + 4 + 3 + 4 + GTK_FILL + + + + + True + 0 + True + PANGO_WRAP_CHAR + True + + + 1 + 8 + 4 + 5 + GTK_FILL + GTK_FILL + + + + + True + 0 + 0 + <b>Tracker Status:</b> + True + + + 4 + 5 + GTK_FILL + + + + + + True + 0 + True + PANGO_WRAP_WORD_CHAR + + + 5 + 6 + 2 + 3 + GTK_FILL + + + + + + True + 0 + 1 + <b>Availability:</b> + True + + + 4 + 5 + 2 + 3 + GTK_FILL + + + + + True + 0 + + + 3 + 4 + 2 + 3 + GTK_FILL + + + + + True + 0 + + + 1 + 2 + 2 + 3 + GTK_FILL + + + + + True + 0 + + + 5 + 6 + 1 + 2 + GTK_FILL + + + + + True + 0 + <b>Peers:</b> + True + + + 4 + 5 + 1 + 2 + GTK_FILL + + + + + True + 0 + + + 5 + 6 + GTK_FILL + + + + + True + 0 + <b>Seeders:</b> + True + + + 4 + 5 + GTK_FILL + + True @@ -867,276 +910,188 @@ - + True - 0 - <b>Seeders:</b> - True + 15 + 5 + + + True + 0 + <b>ETA:</b> + True + + - 4 - 5 - GTK_FILL - - - - - True - 0 - - - 5 - 6 - GTK_FILL - - - - - True - 0 - <b>Peers:</b> - True - - - 4 - 5 - 1 - 2 - GTK_FILL - - - - - True - 0 - - - 5 - 6 - 1 - 2 - GTK_FILL - - - - - True - 0 - - - 1 - 2 + 2 + 3 2 3 GTK_FILL - + + True + 15 + 5 + + + True + 0 + <b>Speed:</b> + True + + + + + 2 + 3 + 1 + 2 + GTK_FILL + + + + + True + 15 + 5 + + + True + 0 + <b>Speed:</b> + True + + + + + 2 + 3 + GTK_FILL + + + + + True + 5 + + + True + 0 + <b>Next Announce:</b> + True + + + + + 3 + 4 + GTK_FILL + + + + + True + 5 + + + True + 0 + <b>Share Ratio:</b> + True + + + + + 2 + 3 + GTK_FILL + + + + + True + 5 + + + True + 0 + <b>Uploaded:</b> + True + + + + + 1 + 2 + GTK_FILL + + + + + True + 5 + + + True + 0 + <b>Downloaded:</b> + True + + + + + GTK_FILL + + + + True 0 3 4 - 2 - 3 + 1 + 2 GTK_FILL - + True 0 - 1 - <b>Availability:</b> - True - - - 4 - 5 - 2 - 3 - GTK_FILL - - - - - True - 0 - True - PANGO_WRAP_WORD_CHAR - - - 5 - 6 - 2 - 3 - GTK_FILL - - - - - - True - 0 - 0 - <b>Tracker Status:</b> - True - - - 4 - 5 - GTK_FILL - - - - - - True - 0 - True - PANGO_WRAP_CHAR - True 1 - 8 - 4 - 5 + 2 + 1 + 2 GTK_FILL - GTK_FILL - + True 0 3 4 - 3 - 4 GTK_FILL - + True 0 - True - True 1 2 - 3 - 4 - GTK_FILL - - - - - True - 0 - <b>Active Time:</b> - True - - - 6 - 7 - GTK_FILL - - - - - True - - - 7 - 8 - GTK_FILL - - - - - True - 0 - <b>Seeding Time:</b> - True - - - 6 - 7 - 1 - 2 - GTK_FILL - - - - - True - 0 - <b>Seed Rank:</b> - True - - - 6 - 7 - 2 - 3 - GTK_FILL - - - - - True - - - 7 - 8 - 1 - 2 - GTK_FILL - - - - - True - - - 7 - 8 - 2 - 3 - GTK_FILL - - - - - True - 0 - <b>Auto Managed:</b> - True - - - 4 - 5 - 3 - 4 - GTK_FILL - - - - - True - - - 5 - 6 - 3 - 4 GTK_FILL @@ -1223,7 +1178,7 @@ - + True 0 True @@ -1231,42 +1186,28 @@ 1 2 - 3 - 4 + 4 + 5 - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - - - 1 - 4 - 5 - 6 - - - - - + True 0 1 - <b>Status:</b> + <b># of files:</b> True - 5 - 6 + 4 + 5 GTK_FILL - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 @@ -1277,65 +1218,52 @@ 1 4 - 2 - 3 + 1 + 2 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - <b>Path:</b> - True - - + 0 + <b>Hash:</b> + True - 2 - 3 + 1 + 2 GTK_FILL - - True - GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 5 - - - True - 0 - 0 - 1 - <b>Name:</b> - True - - - - - GTK_FILL - - - - - + True 0 - True - PANGO_WRAP_CHAR True 1 4 + 6 + 7 + + + + + + True + 0 + 1 + <b>Tracker:</b> + True + + + 6 + 7 + GTK_FILL @@ -1362,51 +1290,64 @@ - - True - 0 - 1 - <b>Tracker:</b> - True - - - 6 - 7 - GTK_FILL - - - - - + True 0 + True + PANGO_WRAP_CHAR True 1 4 - 6 - 7 - + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - 0 - <b>Hash:</b> - True + 5 + + + True + 0 + 0 + 1 + <b>Name:</b> + True + + - 1 - 2 GTK_FILL - + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 5 + + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + <b>Path:</b> + True + + + + + 2 + 3 + GTK_FILL + + + + + True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK 0 @@ -1417,28 +1358,42 @@ 1 4 - 1 - 2 + 2 + 3 - + True 0 1 - <b># of files:</b> + <b>Status:</b> True - 4 - 5 + 5 + 6 GTK_FILL - + + True + GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK + 0 + + + 1 + 4 + 5 + 6 + + + + + True 0 True @@ -1446,8 +1401,8 @@ 1 2 - 4 - 5 + 3 + 4 @@ -1504,7 +1459,6 @@ True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True @@ -1554,7 +1508,6 @@ True True GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK - True @@ -1630,7 +1583,7 @@ - + True True 6 @@ -1640,100 +1593,8 @@ 1 2 - 3 - 4 - - - - - - - True - 0 - Max Upload Slots: - - - 3 - 4 - GTK_FILL - - - - - - True - KiB/s - - - 2 - 3 - 1 - 2 - - - - - - - True - KiB/s - - - 2 - 3 - - - - - - - True - 0 - Max Download Speed: - - - GTK_FILL - - - - - - True - 0 - Max Upload Speed: - - - 1 - 2 - GTK_FILL - - - - - - True - 0 - Max Connections: - - 2 3 - GTK_FILL - - - - - - True - True - 6 - 1 - -1 -1 999999 1 10 10 - 1 - - - 1 - 2 @@ -1757,7 +1618,99 @@ - + + True + True + 6 + 1 + -1 -1 999999 1 10 10 + 1 + + + 1 + 2 + + + + + + + True + 0 + Max Connections: + + + 2 + 3 + GTK_FILL + + + + + + True + 0 + Max Upload Speed: + + + 1 + 2 + GTK_FILL + + + + + + True + 0 + Max Download Speed: + + + GTK_FILL + + + + + + True + KiB/s + + + 2 + 3 + + + + + + + True + KiB/s + + + 2 + 3 + 1 + 2 + + + + + + + True + 0 + Max Upload Slots: + + + 3 + 4 + GTK_FILL + + + + + True True 6 @@ -1767,8 +1720,8 @@ 1 2 - 2 - 3 + 3 + 4 @@ -1833,6 +1786,7 @@ Stop seed at ratio: 0 True + False @@ -1844,7 +1798,7 @@ True True 1 - 2 0 999 0.10000000000000001 10 10 + 2 0 99999 0.10000000000000001 10 10 1 True @@ -2351,23 +2305,14 @@ 10 2 - - True - 0 - <i>Current Version:</i> - True - - - GTK_FILL - - - - + True 1 2 + 1 + 2 @@ -2385,17 +2330,26 @@ - + True 1 2 - 1 - 2 + + + True + 0 + <i>Current Version:</i> + True + + + GTK_FILL + + diff --git a/deluge/ui/gtkui/options_tab.py b/deluge/ui/gtkui/options_tab.py index df958ff3d..9c7e62130 100644 --- a/deluge/ui/gtkui/options_tab.py +++ b/deluge/ui/gtkui/options_tab.py @@ -2,19 +2,19 @@ # options_tab.py # # Copyright (C) 2008 Andrew Resch ('andar') -# +# # Deluge is free software. -# +# # You may redistribute it and/or modify it under the terms of the # GNU General Public License, as published by the Free Software # Foundation; either version 3 of the License, or (at your option) # any later version. -# +# # deluge is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # See the GNU General Public License for more details. -# +# # You should have received a copy of the GNU General Public License # along with deluge. If not, write to: # The Free Software Foundation, Inc., @@ -39,11 +39,11 @@ class OptionsTab(Tab): def __init__(self): Tab.__init__(self) glade = component.get("MainWindow").get_glade() - + self._name = "Options" self._child_widget = glade.get_widget("options_tab") self._tab_label = glade.get_widget("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") @@ -54,15 +54,16 @@ class OptionsTab(Tab): 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.prev_torrent_id = None self.prev_status = None - + glade.signal_autoconnect({ "on_button_apply_clicked": self._on_button_apply_clicked, - "on_button_edit_trackers_clicked": self._on_button_edit_trackers_clicked + "on_button_edit_trackers_clicked": self._on_button_edit_trackers_clicked, + "on_chk_stop_at_ratio_toggled": self._on_chk_stop_at_ratio_toggled }) - + def update(self): # Get the first selected torrent torrent_id = component.get("TorrentView").get_selected_torrents() @@ -75,7 +76,7 @@ class OptionsTab(Tab): # No torrent is selected in the torrentview self._child_widget.set_sensitive(False) return - + if torrent_id != self.prev_torrent_id: self.prev_status = None @@ -95,13 +96,13 @@ class OptionsTab(Tab): def clear(self): self.prev_torrent_id = None self.prev_status = None - + def _on_get_torrent_status(self, status): # We only want to update values that have been applied in the core. This # is so we don't overwrite the user changes that haven't been applied yet. if self.prev_status == None: self.prev_status = {}.fromkeys(status.keys(), None) - + if status != self.prev_status: if status["max_download_speed"] != self.prev_status["max_download_speed"]: self.spin_max_download.set_value(status["max_download_speed"]) @@ -119,13 +120,15 @@ class OptionsTab(Tab): self.chk_auto_managed.set_active(status["is_auto_managed"]) if status["stop_at_ratio"] != self.prev_status["stop_at_ratio"]: self.chk_stop_at_ratio.set_active(status["stop_at_ratio"]) + self.spin_stop_ratio.set_sensitive(status["stop_at_ratio"]) + self.chk_remove_at_ratio.set_sensitive(status["stop_at_ratio"]) if status["stop_ratio"] != self.prev_status["stop_ratio"]: self.spin_stop_ratio.set_value(status["stop_ratio"]) if status["remove_at_ratio"] != self.prev_status["remove_at_ratio"]: self.chk_remove_at_ratio.set_active(status["remove_at_ratio"]) - + self.prev_status = status - + def _on_button_apply_clicked(self, button): if self.spin_max_download.get_value() != self.prev_status["max_download_speed"]: client.set_torrent_max_download_speed(self.prev_torrent_id, self.spin_max_download.get_value()) @@ -145,11 +148,17 @@ class OptionsTab(Tab): client.set_torrent_stop_ratio(self.prev_torrent_id, self.spin_stop_ratio.get_value()) if self.chk_remove_at_ratio.get_active() != self.prev_status["remove_at_ratio"]: client.set_torrent_remove_at_ratio(self.prev_torrent_id, self.chk_remove_at_ratio.get_active()) - - + + def _on_button_edit_trackers_clicked(self, button): from edittrackersdialog import EditTrackersDialog dialog = EditTrackersDialog( self.prev_torrent_id, component.get("MainWindow").window) dialog.run() + + def _on_chk_stop_at_ratio_toggled(self, widget): + value = widget.get_active() + + self.spin_stop_ratio.set_sensitive(value) + self.chk_remove_at_ratio.set_sensitive(value)