The window vpane position is now saved.
Re-ordered default preferences to be alphabetical.
This commit is contained in:
parent
3b9b8beba1
commit
f4cda9baaf
|
@ -32,7 +32,6 @@
|
||||||
</child>
|
</child>
|
||||||
</widget>
|
</widget>
|
||||||
<packing>
|
<packing>
|
||||||
<property name="resize">False</property>
|
|
||||||
<property name="shrink">False</property>
|
<property name="shrink">False</property>
|
||||||
</packing>
|
</packing>
|
||||||
</child>
|
</child>
|
||||||
|
|
|
@ -66,7 +66,7 @@ class DelugeGTK:
|
||||||
self.window.set_icon_from_file(common.get_pixmap("deluge32.png"))
|
self.window.set_icon_from_file(common.get_pixmap("deluge32.png"))
|
||||||
self.notebook = self.wtree.get_widget("torrent_info")
|
self.notebook = self.wtree.get_widget("torrent_info")
|
||||||
self.statusbar = self.wtree.get_widget("statusbar")
|
self.statusbar = self.wtree.get_widget("statusbar")
|
||||||
|
|
||||||
## Construct the Interface
|
## Construct the Interface
|
||||||
try:
|
try:
|
||||||
self.build_tray_icon()
|
self.build_tray_icon()
|
||||||
|
@ -1040,6 +1040,7 @@ class DelugeGTK:
|
||||||
self.wtree.get_widget("chk_upload").set_active(self.config.get("show_ul", bool, default=True))
|
self.wtree.get_widget("chk_upload").set_active(self.config.get("show_ul", bool, default=True))
|
||||||
self.wtree.get_widget("chk_eta").set_active(self.config.get("show_eta", bool, default=True))
|
self.wtree.get_widget("chk_eta").set_active(self.config.get("show_eta", bool, default=True))
|
||||||
self.wtree.get_widget("chk_ratio").set_active(self.config.get("show_share", bool, default=True))
|
self.wtree.get_widget("chk_ratio").set_active(self.config.get("show_share", bool, default=True))
|
||||||
|
self.wtree.get_widget("vpaned1").set_position(self.config.get("window_height") - self.config.get("window_pane_position"))
|
||||||
|
|
||||||
def save_window_settings(self):
|
def save_window_settings(self):
|
||||||
self.config.set("show_infopane", self.wtree.get_widget("chk_infopane").get_active())
|
self.config.set("show_infopane", self.wtree.get_widget("chk_infopane").get_active())
|
||||||
|
@ -1052,6 +1053,7 @@ class DelugeGTK:
|
||||||
self.config.set("show_ul", self.ul_column.get_visible())
|
self.config.set("show_ul", self.ul_column.get_visible())
|
||||||
self.config.set("show_eta", self.eta_column.get_visible())
|
self.config.set("show_eta", self.eta_column.get_visible())
|
||||||
self.config.set("show_share", self.share_column.get_visible())
|
self.config.set("show_share", self.share_column.get_visible())
|
||||||
|
self.config.set("window_pane_position", self.config.get("window_height") - self.vpane.get_position())
|
||||||
|
|
||||||
def window_configure_event(self, widget, event):
|
def window_configure_event(self, widget, event):
|
||||||
if self.config.get("window_maximized") == False:
|
if self.config.get("window_maximized") == False:
|
||||||
|
|
19
src/pref.py
19
src/pref.py
|
@ -27,23 +27,21 @@ import pickle
|
||||||
import common
|
import common
|
||||||
|
|
||||||
DEFAULT_PREFS = {
|
DEFAULT_PREFS = {
|
||||||
"encin_state" : common.EncState.enabled,
|
|
||||||
"encout_state" : common.EncState.enabled,
|
|
||||||
"enclevel_type" : common.EncLevel.both,
|
|
||||||
"pref_rc4" : True,
|
|
||||||
"auto_end_seeding" : False,
|
"auto_end_seeding" : False,
|
||||||
"auto_seed_ratio" : -1,
|
"auto_seed_ratio" : -1,
|
||||||
"close_to_tray" : False,
|
"close_to_tray" : False,
|
||||||
"lock_tray" : False,
|
|
||||||
"tray_passwd" : "",
|
|
||||||
"default_download_path" : "",
|
"default_download_path" : "",
|
||||||
"dht_connections" : 80,
|
"dht_connections" : 80,
|
||||||
"enable_dht" : True,
|
"enable_dht" : True,
|
||||||
"enable_system_tray" : True,
|
"enable_system_tray" : True,
|
||||||
"enabled_plugins" : "",
|
"enabled_plugins" : "",
|
||||||
|
"encin_state" : common.EncState.enabled,
|
||||||
|
"encout_state" : common.EncState.enabled,
|
||||||
|
"enclevel_type" : common.EncLevel.both,
|
||||||
"end_seed_ratio" : 0.0,
|
"end_seed_ratio" : 0.0,
|
||||||
"gui_update_interval" : 1.0,
|
"gui_update_interval" : 1.0,
|
||||||
"listen_on" : [6881,6889],
|
"listen_on" : [6881,6889],
|
||||||
|
"lock_tray" : False,
|
||||||
"max_active_torrents" : -1,
|
"max_active_torrents" : -1,
|
||||||
"max_connections" : 80,
|
"max_connections" : 80,
|
||||||
"max_download_rate" : -1.0,
|
"max_download_rate" : -1.0,
|
||||||
|
@ -53,7 +51,8 @@ DEFAULT_PREFS = {
|
||||||
"max_number_uploads" : -1.0,
|
"max_number_uploads" : -1.0,
|
||||||
"max_upload_rate" : -1.0,
|
"max_upload_rate" : -1.0,
|
||||||
"max_upload_rate_bps" : -1.0,
|
"max_upload_rate_bps" : -1.0,
|
||||||
"max_uploads" : 2,
|
"max_uploads" : 2,
|
||||||
|
"pref_rc4" : True,
|
||||||
"queue_seeds_to_bottom" : False,
|
"queue_seeds_to_bottom" : False,
|
||||||
"show_dl" : True,
|
"show_dl" : True,
|
||||||
"show_eta" : True,
|
"show_eta" : True,
|
||||||
|
@ -65,13 +64,15 @@ DEFAULT_PREFS = {
|
||||||
"show_status" : True,
|
"show_status" : True,
|
||||||
"show_toolbar" : True,
|
"show_toolbar" : True,
|
||||||
"show_ul" : True,
|
"show_ul" : True,
|
||||||
|
"tray_passwd" : "",
|
||||||
"use_compact_storage" : False,
|
"use_compact_storage" : False,
|
||||||
"use_default_dir" : False,
|
"use_default_dir" : False,
|
||||||
"window_height" : 480,
|
"window_height" : 480,
|
||||||
|
"window_maximized" : False,
|
||||||
|
"window_pane_position" : -1,
|
||||||
"window_width" : 640,
|
"window_width" : 640,
|
||||||
"window_x_pos" : 0,
|
"window_x_pos" : 0,
|
||||||
"window_y_pos" : 0,
|
"window_y_pos" : 0
|
||||||
"window_maximized" : False
|
|
||||||
}
|
}
|
||||||
class Preferences:
|
class Preferences:
|
||||||
def __init__(self, filename=None, global_defaults=True, defaults=None):
|
def __init__(self, filename=None, global_defaults=True, defaults=None):
|
||||||
|
|
Loading…
Reference in New Issue