diff --git a/deluge/ui/console/commands/manage.py b/deluge/ui/console/commands/manage.py
index a026c76..803a157 100644
a
|
b
|
|
53 | 53 | "max_upload_slots": int, |
54 | 54 | "private": bool, |
55 | 55 | "prioritize_first_last": bool, |
| 56 | "super_seeding": bool, |
56 | 57 | "is_auto_managed": bool, |
57 | 58 | "stop_at_ratio": bool, |
58 | 59 | "stop_ratio": float, |
diff --git a/deluge/ui/console/modes/torrent_actions.py b/deluge/ui/console/modes/torrent_actions.py
index 96416b9..2ae34fc 100644
a
|
b
|
|
50 | 50 | ("max_connections", int), |
51 | 51 | ("max_upload_slots", int), |
52 | 52 | ("prioritize_first_last", bool), |
| 53 | ("super_seeding", bool), |
53 | 54 | ("sequential_download", bool), |
54 | 55 | ("is_auto_managed", bool), |
55 | 56 | ("stop_at_ratio", bool), |
… |
… |
|
65 | 66 | "max_connections": "Max connections", |
66 | 67 | "max_upload_slots": "Max upload slots", |
67 | 68 | "prioritize_first_last": "Prioritize first/last pieces", |
| 69 | "super_seeding": "Super Seeding", |
68 | 70 | "sequential_download": "Sequential download", |
69 | 71 | "is_auto_managed": "Is auto managed?", |
70 | 72 | "stop_at_ratio": "Stop at ratio", |
diff --git a/deluge/ui/gtkui/glade/main_window.tabs.ui b/deluge/ui/gtkui/glade/main_window.tabs.ui
index 5451340..2d75bff 100644
a
|
b
|
|
1516 | 1516 | </packing> |
1517 | 1517 | </child> |
1518 | 1518 | <child> |
| 1519 | <object class="GtkCheckButton" id="chk_super_seeding"> |
| 1520 | <property name="label" translatable="yes">Super Seeding</property> |
| 1521 | <property name="use_action_appearance">False</property> |
| 1522 | <property name="visible">True</property> |
| 1523 | <property name="can_focus">True</property> |
| 1524 | <property name="receives_default">False</property> |
| 1525 | <property name="draw_indicator">True</property> |
| 1526 | <signal name="toggled" handler="on_chk_toggled" swapped="no"/> |
| 1527 | </object> |
| 1528 | <packing> |
| 1529 | <property name="expand">False</property> |
| 1530 | <property name="fill">True</property> |
| 1531 | <property name="position">3</property> |
| 1532 | </packing> |
| 1533 | </child> |
| 1534 | <child> |
1519 | 1535 | <object class="GtkCheckButton" id="chk_move_completed"> |
1520 | 1536 | <property name="label" translatable="yes">Move completed:</property> |
1521 | 1537 | <property name="use_action_appearance">False</property> |
… |
… |
|
1528 | 1544 | <packing> |
1529 | 1545 | <property name="expand">False</property> |
1530 | 1546 | <property name="fill">False</property> |
1531 | | <property name="position">3</property> |
| 1547 | <property name="position">4</property> |
1532 | 1548 | </packing> |
1533 | 1549 | </child> |
1534 | 1550 | <child> |
… |
… |
|
1542 | 1558 | <packing> |
1543 | 1559 | <property name="expand">False</property> |
1544 | 1560 | <property name="fill">True</property> |
1545 | | <property name="position">4</property> |
| 1561 | <property name="position">5</property> |
1546 | 1562 | </packing> |
1547 | 1563 | </child> |
1548 | 1564 | </object> |
diff --git a/deluge/ui/gtkui/glade/torrent_menu.options.ui b/deluge/ui/gtkui/glade/torrent_menu.options.ui
index 2044679..4cefb8c 100644
a
|
b
|
|
79 | 79 | </object> |
80 | 80 | </child> |
81 | 81 | <child> |
| 82 | <object class="GtkMenuItem" id="menuitem_super_seeding"> |
| 83 | <property name="visible">True</property> |
| 84 | <property name="can_focus">False</property> |
| 85 | <property name="use_action_appearance">False</property> |
| 86 | <property name="label" translatable="yes">_Super Seeding</property> |
| 87 | <property name="use_underline">True</property> |
| 88 | </object> |
| 89 | </child> |
| 90 | <child> |
82 | 91 | <object class="GtkMenuItem" id="menuitem_change_owner"> |
83 | 92 | <property name="visible">True</property> |
84 | 93 | <property name="can_focus">False</property> |
diff --git a/deluge/ui/gtkui/menubar.py b/deluge/ui/gtkui/menubar.py
index 0c40ee6..fddf5de 100644
a
|
b
|
def __init__(self):
|
85 | 85 | submenu.append(item) |
86 | 86 | submenu.show_all() |
87 | 87 | self.builder.get_object("menuitem_auto_managed").set_submenu(submenu) |
| 88 | |
| 89 | submenu = gtk.Menu() |
| 90 | item = gtk.MenuItem(_("On")) |
| 91 | item.connect("activate", self.on_menuitem_set_super_seeding_on) |
| 92 | submenu.append(item) |
| 93 | item = gtk.MenuItem(_("Off")) |
| 94 | item.set_name("menuitem_super_seeding") |
| 95 | item.connect("activate", self.on_menuitem_set_super_seeding_off) |
| 96 | submenu.append(item) |
| 97 | submenu.show_all() |
| 98 | self.builder.get_object("menuitem_super_seeding").set_submenu(submenu) |
88 | 99 | |
89 | 100 | submenu = gtk.Menu() |
90 | 101 | item = gtk.MenuItem(_("Disable")) |
… |
… |
def on_menuitem_set_stop_seed_at_ratio_disable(self, widget):
|
471 | 482 | client.core.set_torrent_options(component.get("TorrentView").get_selected_torrents(), |
472 | 483 | {"stop_at_ratio": False}) |
473 | 484 | |
| 485 | def on_menuitem_set_super_seeding_off(self, widget): |
| 486 | client.core.set_torrent_options(component.get("TorrentView").get_selected_torrents(), |
| 487 | {"super_seeding": False}) |
| 488 | |
| 489 | def on_menuitem_set_super_seeding_on(self, widget): |
| 490 | client.core.set_torrent_options(component.get("TorrentView").get_selected_torrents(), |
| 491 | {"super_seeding": True}) |
| 492 | |
474 | 493 | def on_menuitem_sidebar_zero_toggled(self, widget): |
475 | 494 | self.config["sidebar_show_zero"] = widget.get_active() |
476 | 495 | component.get("FilterTreeView").update() |
diff --git a/deluge/ui/gtkui/options_tab.py b/deluge/ui/gtkui/options_tab.py
index 806d5f0..c05167a 100644
a
|
b
|
def __init__(self):
|
34 | 34 | self.chk_stop_at_ratio = builder.get_object("chk_stop_at_ratio") |
35 | 35 | self.chk_remove_at_ratio = builder.get_object("chk_remove_at_ratio") |
36 | 36 | self.spin_stop_ratio = builder.get_object("spin_stop_ratio") |
| 37 | self.chk_super_seeding = builder.get_object("chk_super_seeding") |
37 | 38 | self.chk_move_completed = builder.get_object("chk_move_completed") |
38 | 39 | self.entry_move_completed = builder.get_object("entry_move_completed") |
39 | 40 | self.chk_shared = builder.get_object("chk_shared") |
… |
… |
def __init__(self):
|
53 | 54 | "on_button_apply_clicked": self._on_button_apply_clicked, |
54 | 55 | "on_chk_move_completed_toggled": self._on_chk_move_completed_toggled, |
55 | 56 | "on_chk_stop_at_ratio_toggled": self._on_chk_stop_at_ratio_toggled, |
| 57 | "on_chk_super_seeding_toggled" : self._on_chk_super_seeding_toggled, |
56 | 58 | "on_chk_toggled": self._on_chk_toggled, |
57 | 59 | "on_spin_value_changed": self._on_spin_value_changed, |
58 | 60 | "on_move_completed_file_set": self._on_move_completed_file_set |
… |
… |
def update(self):
|
96 | 98 | "stop_at_ratio", |
97 | 99 | "stop_ratio", |
98 | 100 | "remove_at_ratio", |
| 101 | "super_seeding", |
99 | 102 | "storage_mode", |
100 | 103 | "sequential_download", |
101 | 104 | "move_on_completed", |
… |
… |
def _on_get_torrent_status(self, status):
|
135 | 138 | self.spin_stop_ratio.set_value(status["stop_ratio"]) |
136 | 139 | if status["remove_at_ratio"] != self.prev_status["remove_at_ratio"]: |
137 | 140 | self.chk_remove_at_ratio.set_active(status["remove_at_ratio"]) |
| 141 | if status["super_seeding"] != self.prev_status["super_seeding"]: |
| 142 | self.chk_super_seeding.set_active(status["super_seeding"]) |
138 | 143 | if status["move_on_completed"] != self.prev_status["move_on_completed"]: |
139 | 144 | self.chk_move_completed.set_active(status["move_on_completed"]) |
140 | 145 | if status["move_on_completed_path"] != self.prev_status["move_on_completed_path"]: |
… |
… |
def _on_button_apply_clicked(self, button):
|
210 | 215 | client.core.set_torrent_remove_at_ratio( |
211 | 216 | self.prev_torrent_id, self.chk_remove_at_ratio.get_active() |
212 | 217 | ) |
| 218 | if self.chk_super_seeding.get_active () != self.prev_status["super_seeding"]: |
| 219 | client.core.set_super_seeding( |
| 220 | self.prev_torrent_id, self.chk_super_seeding.get_active() |
| 221 | ) |
213 | 222 | if self.chk_move_completed.get_active() != self.prev_status["move_on_completed"]: |
214 | 223 | client.core.set_torrent_move_completed( |
215 | 224 | self.prev_torrent_id, self.chk_move_completed.get_active() |
… |
… |
def _on_chk_stop_at_ratio_toggled(self, widget):
|
238 | 247 | if not self.button_apply.is_sensitive(): |
239 | 248 | self.button_apply.set_sensitive(True) |
240 | 249 | |
| 250 | def _on_chk_super_seeding_toggled(self, widget): |
| 251 | value = widget.get_active() |
| 252 | |
| 253 | self.chk_super_seeding.set_sensitive(value) |
| 254 | |
| 255 | if not self.button_apply.is_sensitive(): |
| 256 | self.button_apply.set_sensitive(True) |
| 257 | |
241 | 258 | def _on_chk_toggled(self, widget): |
242 | 259 | if not self.button_apply.is_sensitive(): |
243 | 260 | self.button_apply.set_sensitive(True) |
diff --git a/deluge/ui/web/js/deluge-all/Keys.js b/deluge/ui/web/js/deluge-all/Keys.js
index 2653295..d58f866 100644
a
|
b
|
Deluge.Keys = {
|
104 | 104 | 'max_download_speed', 'max_upload_speed', 'max_connections', |
105 | 105 | 'max_upload_slots','is_auto_managed', 'stop_at_ratio', 'stop_ratio', |
106 | 106 | 'remove_at_ratio', 'private', 'prioritize_first_last', |
107 | | 'move_completed', 'move_completed_path' |
| 107 | 'move_completed', 'move_completed_path', 'super_seeding' |
108 | 108 | ] |
109 | 109 | }; |
110 | 110 | |
diff --git a/deluge/ui/web/js/deluge-all/details/OptionsTab.js b/deluge/ui/web/js/deluge-all/details/OptionsTab.js
index 4a6294f..b0a9886 100644
a
|
b
|
Deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
68 | 68 | 'move_completed': false, |
69 | 69 | 'move_completed_path': '', |
70 | 70 | 'private': false, |
71 | | 'prioritize_first_last': false |
| 71 | 'prioritize_first_last': false, |
| 72 | 'super_seeding': false |
72 | 73 | } |
73 | 74 | }); |
74 | 75 | |
… |
… |
Deluge.details.OptionsTab = Ext.extend(Ext.form.FormPanel, {
|
309 | 310 | id: 'prioritize_first_last' |
310 | 311 | }); |
311 | 312 | |
| 313 | this.fields.super_seeding = this.fieldsets.general.add({ |
| 314 | fieldLabel: '', |
| 315 | labelSeparator: '', |
| 316 | boxLabel: _('Super Seeding'), |
| 317 | id: 'super_seeding' |
| 318 | }); |
| 319 | |
312 | 320 | // Bind the fields so the options manager can manage them. |
313 | 321 | for (var id in this.fields) { |
314 | 322 | this.optionsManager.bind(id, this.fields[id]); |
diff --git a/deluge/ui/web/js/gettext.js b/deluge/ui/web/js/gettext.js
index 04547a3..f16d6b7 100644
a
|
b
|
GetText.add('Stop seed at ratio', '${escape(_("Stop seed at ratio"))}')
|
746 | 746 | // QueuePage.js:175 |
747 | 747 | GetText.add('Stop seeding when share ratio reaches:', '${escape(_("Stop seeding when share ratio reaches:"))}') |
748 | 748 | |
| 749 | // OptionsTab.js:316 |
| 750 | GetText.add('Super Seeding', '${escape(_("Super Seeding"))}') |
| 751 | |
749 | 752 | // OtherPage.js:72 |
750 | 753 | GetText.add('System Information', '${escape(_("System Information"))}') |
751 | 754 | |