tweak preferences dialog
This commit is contained in:
parent
9d143dbe14
commit
d849960463
|
@ -340,7 +340,6 @@ their share ratio reaches:</property>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkButton" id="btn_test_port">
|
<widget class="GtkButton" id="btn_test_port">
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">Test Port</property>
|
<property name="label" translatable="yes">Test Port</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
|
@ -398,59 +397,6 @@ their share ratio reaches:</property>
|
||||||
<property name="x_options"></property>
|
<property name="x_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label7">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">2</property>
|
|
||||||
<property name="right_attach">3</property>
|
|
||||||
<property name="top_attach">2</property>
|
|
||||||
<property name="bottom_attach">3</property>
|
|
||||||
<property name="x_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label6">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="label" translatable="yes">KB/s</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">2</property>
|
|
||||||
<property name="right_attach">3</property>
|
|
||||||
<property name="top_attach">1</property>
|
|
||||||
<property name="bottom_attach">2</property>
|
|
||||||
<property name="x_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label5">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">2</property>
|
|
||||||
<property name="right_attach">3</property>
|
|
||||||
<property name="top_attach">4</property>
|
|
||||||
<property name="bottom_attach">5</property>
|
|
||||||
<property name="x_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkSpinButton" id="spin_num_download">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="width_chars">10</property>
|
|
||||||
<property name="xalign">1</property>
|
|
||||||
<property name="adjustment">0 -1 100 1 10 10</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="left_attach">1</property>
|
|
||||||
<property name="right_attach">2</property>
|
|
||||||
<property name="top_attach">4</property>
|
|
||||||
<property name="bottom_attach">5</property>
|
|
||||||
<property name="x_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkSpinButton" id="spin_max_download">
|
<widget class="GtkSpinButton" id="spin_max_download">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -483,33 +429,6 @@ their share ratio reaches:</property>
|
||||||
<property name="x_options"></property>
|
<property name="x_options"></property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
|
||||||
<widget class="GtkSpinButton" id="spin_max_upload">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="can_focus">True</property>
|
|
||||||
<property name="width_chars">10</property>
|
|
||||||
<property name="xalign">1</property>
|
|
||||||
<property name="adjustment">0 -1 1024 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>
|
|
||||||
<property name="x_options"></property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
|
||||||
<widget class="GtkLabel" id="label1">
|
|
||||||
<property name="visible">True</property>
|
|
||||||
<property name="xalign">0</property>
|
|
||||||
<property name="label" translatable="yes">Maximum number of Downloads:</property>
|
|
||||||
</widget>
|
|
||||||
<packing>
|
|
||||||
<property name="top_attach">4</property>
|
|
||||||
<property name="bottom_attach">5</property>
|
|
||||||
</packing>
|
|
||||||
</child>
|
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label2">
|
<widget class="GtkLabel" id="label2">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -532,6 +451,33 @@ their share ratio reaches:</property>
|
||||||
<property name="bottom_attach">3</property>
|
<property name="bottom_attach">3</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label1">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="xalign">0</property>
|
||||||
|
<property name="label" translatable="yes">Maximum Connections</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="top_attach">1</property>
|
||||||
|
<property name="bottom_attach">2</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkSpinButton" id="spin_num_download">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="width_chars">10</property>
|
||||||
|
<property name="xalign">1</property>
|
||||||
|
<property name="adjustment">0 -1 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>
|
||||||
|
<property name="x_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
<child>
|
<child>
|
||||||
<widget class="GtkLabel" id="label4">
|
<widget class="GtkLabel" id="label4">
|
||||||
<property name="visible">True</property>
|
<property name="visible">True</property>
|
||||||
|
@ -539,10 +485,61 @@ their share ratio reaches:</property>
|
||||||
<property name="label" translatable="yes">Maximum Upload Rate:</property>
|
<property name="label" translatable="yes">Maximum Upload Rate:</property>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
|
<property name="top_attach">4</property>
|
||||||
|
<property name="bottom_attach">5</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkSpinButton" id="spin_max_upload">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="can_focus">True</property>
|
||||||
|
<property name="width_chars">10</property>
|
||||||
|
<property name="xalign">1</property>
|
||||||
|
<property name="adjustment">0 -1 1024 1 10 10</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">1</property>
|
||||||
|
<property name="right_attach">2</property>
|
||||||
|
<property name="top_attach">4</property>
|
||||||
|
<property name="bottom_attach">5</property>
|
||||||
|
<property name="x_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label5">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
<property name="label" translatable="yes">KB/s</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="right_attach">3</property>
|
||||||
|
<property name="top_attach">4</property>
|
||||||
|
<property name="bottom_attach">5</property>
|
||||||
|
<property name="x_options"></property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
|
<child>
|
||||||
|
<widget class="GtkLabel" id="label6">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="right_attach">3</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>
|
||||||
|
<widget class="GtkLabel" id="label7">
|
||||||
|
<property name="visible">True</property>
|
||||||
|
</widget>
|
||||||
|
<packing>
|
||||||
|
<property name="left_attach">2</property>
|
||||||
|
<property name="right_attach">3</property>
|
||||||
|
<property name="top_attach">2</property>
|
||||||
|
<property name="bottom_attach">3</property>
|
||||||
|
</packing>
|
||||||
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
</child>
|
</child>
|
||||||
<child>
|
<child>
|
||||||
|
|
|
@ -554,12 +554,17 @@ class DelugeGTK:
|
||||||
dlrate *= 1024
|
dlrate *= 1024
|
||||||
ports = [self.config.get("tcp_port_range_lower", int, default=6881),
|
ports = [self.config.get("tcp_port_range_lower", int, default=6881),
|
||||||
self.config.get("tcp_port_range_upper", int, default=6889)]
|
self.config.get("tcp_port_range_upper", int, default=6889)]
|
||||||
|
if self.config.get("auto_end_seeding", bool, default=False):
|
||||||
|
auto_seed_ratio = self.config.get("end_seed_ratio", float, default=1.0)
|
||||||
|
else:
|
||||||
|
auto_seed_ratio = -1
|
||||||
self.tray_icon.set_visible(self.config.get("enable_system_tray", bool, default=True))
|
self.tray_icon.set_visible(self.config.get("enable_system_tray", bool, default=True))
|
||||||
self.manager.set_pref("listen_on", ports)
|
self.manager.set_pref("listen_on", ports)
|
||||||
self.manager.set_pref("max_upload_rate", ulrate)
|
self.manager.set_pref("max_upload_rate", ulrate)
|
||||||
self.manager.set_pref("max_download_rate", dlrate)
|
self.manager.set_pref("max_download_rate", dlrate)
|
||||||
self.manager.set_pref("max_uploads", self.config.get("max_number_uploads", int, default=-1))
|
self.manager.set_pref("max_uploads", self.config.get("max_number_uploads", int, default=-1))
|
||||||
self.manager.set_pref("max_connections", self.config.get("max_number_downloads", int, default=-1))
|
self.manager.set_pref("max_connections", self.config.get("max_number_downloads", int, default=-1))
|
||||||
|
self.manager.set_pref("auto_seed_ratio", auto_seed_ratio)
|
||||||
|
|
||||||
|
|
||||||
# UID, Q#, Name, Size, Progress, Message, Seeders, Peers, DL, UL, ETA, Share
|
# UID, Q#, Name, Size, Progress, Message, Seeders, Peers, DL, UL, ETA, Share
|
||||||
|
|
Loading…
Reference in New Issue