mirror of
https://github.com/codex-storage/deluge.git
synced 2025-01-11 12:04:10 +00:00
Fix blocklist status icon not opening proper preferences page.
Show blocklist's file date using the locale's date / time representation.
This commit is contained in:
parent
22c9d7c0ee
commit
fad6ba2193
@ -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
|
||||
|
@ -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"""
|
||||
|
Loading…
x
Reference in New Issue
Block a user