From cb0b5c3e1c18b2835d7680865417dca7361e15b6 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Mon, 23 Jul 2007 06:28:37 +0000 Subject: [PATCH] get compact_mode per torrent_state, not prefs --- src/files.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/files.py b/src/files.py index 6b70ab46a..a40032d4e 100644 --- a/src/files.py +++ b/src/files.py @@ -38,11 +38,9 @@ import gtk.glade import common import dgtk -import pref class FilesBaseManager(object): def __init__(self, file_store): - self.config = pref.Preferences() file_glade = gtk.glade.XML(common.get_glade_file("file_tab_menu.glade"), domain='deluge') self.file_menu = file_glade.get_widget("file_tab_menu") @@ -101,7 +99,10 @@ class FilesBaseManager(object): msgBox.destroy() 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) else: widget_name = widget.get_name()