summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJohn Garland <johnnyg@gmail.com>2009-12-20 09:01:07 +0000
committerJohn Garland <johnnyg@gmail.com>2009-12-20 09:01:07 +0000
commit7ebe07db15f607d8810dc2a25b9b8c2fd0b84d25 (patch)
tree94e8a013a766c5423496b4883399057dad20b453
parent14eb3b8b333569f7c91e536006de21d443628a28 (diff)
downloaddeluge-7ebe07db15f607d8810dc2a25b9b8c2fd0b84d25.tar.gz
deluge-7ebe07db15f607d8810dc2a25b9b8c2fd0b84d25.tar.bz2
deluge-7ebe07db15f607d8810dc2a25b9b8c2fd0b84d25.zip
Fix blocklist status icon not opening proper preferences page.
Show blocklist's file date using the locale's date / time representation.
-rw-r--r--ChangeLog4
-rw-r--r--deluge/plugins/blocklist/blocklist/core.py4
-rw-r--r--deluge/plugins/blocklist/blocklist/gtkui.py5
3 files changed, 9 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index d0db2c202..70361ad2d 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -8,6 +8,10 @@
==== Windows ====
* Fix displaying folders in the add torrent dialog
+==== Blocklist ====
+ * Fix blocklist status icon not opening the blocklist preference
+ page in certain locales
+
=== Deluge 1.2.0_rc5 (17 December 2009) ===
==== Web ====
* Swap order of buttons in Remove window (Closes #1083)
diff --git a/deluge/plugins/blocklist/blocklist/core.py b/deluge/plugins/blocklist/blocklist/core.py
index 248288d73..7e1e890ff 100644
--- a/deluge/plugins/blocklist/blocklist/core.py
+++ b/deluge/plugins/blocklist/blocklist/core.py
@@ -174,7 +174,7 @@ class Core(CorePluginBase):
status["file_progress"] = self.file_progress
status["file_url"] = self.config["url"]
status["file_size"] = self.config["list_size"]
- status["file_date"] = datetime.fromtimestamp(self.config["last_update"]).strftime("%a, %d %b %Y %H:%M:%S") if self.config["last_update"] else ""
+ status["file_date"] = self.config["last_update"]
status["file_type"] = self.config["list_type"]
if self.config["list_compression"]:
status["file_type"] += " (%s)" % self.config["list_compression"]
@@ -330,7 +330,7 @@ class Core(CorePluginBase):
self.reader = None
try_again = True
elif os.path.exists(blocklist) and not self.use_cache:
- # If we have a backup and we haven't already used it
+ # If we have a backup and we haven't already used it
e = f.trap(Exception)
log.warning("Error reading blocklist: %s", e)
self.use_cache = True
diff --git a/deluge/plugins/blocklist/blocklist/gtkui.py b/deluge/plugins/blocklist/blocklist/gtkui.py
index 7af53cd49..2c2ad0038 100644
--- a/deluge/plugins/blocklist/blocklist/gtkui.py
+++ b/deluge/plugins/blocklist/blocklist/gtkui.py
@@ -33,6 +33,7 @@
#
#
+from datetime import datetime
import gtk
from deluge.log import LOG as log
@@ -115,7 +116,7 @@ class GtkUI(GtkPluginBase):
self.glade.get_widget("label_filesize").set_text(
deluge.common.fsize(status["file_size"]))
self.glade.get_widget("label_modified").set_text(
- str(status["file_date"]))
+ datetime.fromtimestamp(status["file_date"]).strftime("%c"))
self.glade.get_widget("label_type").set_text(status["file_type"])
self.glade.get_widget("label_url").set_text(
status["file_url"])
@@ -151,7 +152,7 @@ class GtkUI(GtkPluginBase):
client.blocklist.check_import(force=True)
def _on_status_item_clicked(self, widget, event):
- component.get("Preferences").show("Blocklist")
+ component.get("Preferences").show(_("Blocklist"))
def load_preferences_page(self):
"""Initializes the preferences page and adds it to the preferences dialog"""