mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-16 14:25:12 +00:00
get compact_mode per torrent_state, not prefs
This commit is contained in:
parent
903a8da7a5
commit
cb0b5c3e1c
@ -38,11 +38,9 @@ import gtk.glade
|
|||||||
|
|
||||||
import common
|
import common
|
||||||
import dgtk
|
import dgtk
|
||||||
import pref
|
|
||||||
|
|
||||||
class FilesBaseManager(object):
|
class FilesBaseManager(object):
|
||||||
def __init__(self, file_store):
|
def __init__(self, file_store):
|
||||||
self.config = pref.Preferences()
|
|
||||||
file_glade = gtk.glade.XML(common.get_glade_file("file_tab_menu.glade"),
|
file_glade = gtk.glade.XML(common.get_glade_file("file_tab_menu.glade"),
|
||||||
domain='deluge')
|
domain='deluge')
|
||||||
self.file_menu = file_glade.get_widget("file_tab_menu")
|
self.file_menu = file_glade.get_widget("file_tab_menu")
|
||||||
@ -101,7 +99,10 @@ class FilesBaseManager(object):
|
|||||||
msgBox.destroy()
|
msgBox.destroy()
|
||||||
|
|
||||||
def priority_clicked(self, widget):
|
def priority_clicked(self, widget):
|
||||||
if self.config.get("use_compact_storage"):
|
import deluge_core
|
||||||
|
state = deluge_core.get_torrent_state(self.file_unique_id)
|
||||||
|
print state["compact_mode"]
|
||||||
|
if state["compact_mode"]:
|
||||||
self.compact_warning(widget)
|
self.compact_warning(widget)
|
||||||
else:
|
else:
|
||||||
widget_name = widget.get_name()
|
widget_name = widget.get_name()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user