Author: johnnyg
Revision: 5451
Log:
Updated config values names in gtkui.
Diff:
Modified: trunk/deluge/plugins/blocklist/blocklist/core.py
===================================================================
--- trunk/deluge/plugins/blocklist/blocklist/core.py 2009-07-05 01:17:38 UTC
(rev 5450)
+++ trunk/deluge/plugins/blocklist/blocklist/core.py 2009-07-05 06:20:19 UTC
(rev 5451)
@@ -151,6 +151,7 @@
else:
status["state"] = "Idle"
+ status["up_to_date"] = False
status["num_blocked"] = self.num_blocked
status["file_progress"] = self.file_progress
status["file_type"] = self.config["list_type"]
@@ -233,25 +234,11 @@
log.debug("Latest blocklist is already imported")
return True
- self.is_importing = True
- log.debug("Reset IP Filter..")
- # Does this return a deferred?
- self.core.reset_ip_filter()
-
self.num_blocked = 0
- # TODO: Make non-blocking (use deferToThread)
+ # TODO: Open blocklist with appropriate reader
+ # TODO: Import ranges
- # Open the file for reading
- read_list = FORMATS[self.config["listtype"]][1](bl_file)
- log.debug("Blocklist import starting..")
- ips = read_list.next()
- while ips:
- self.core.block_ip_range(ips)
- self.num_blocked += 1
- ips = read_list.next()
- read_list.close()
-
def on_import_complete(self, result):
"""Runs any import clean up functions"""
d = None
Modified: trunk/deluge/plugins/blocklist/blocklist/gtkui.py
===================================================================
--- trunk/deluge/plugins/blocklist/blocklist/gtkui.py 2009-07-05 01:17:38 UTC
(rev 5450)
+++ trunk/deluge/plugins/blocklist/blocklist/gtkui.py 2009-07-05 06:20:19 UTC
(rev 5451)
@@ -134,7 +134,7 @@
# Update the combo box. It's ugly, get over it.
self.glade.get_widget("combobox_types").set_active_iter(
self.glade.get_widget("combobox_types").get_model().\
- get_iter(FORMATS[config["listtype"]][1]))
+ get_iter(FORMATS[config["list_type"]][1]))
self.glade.get_widget("entry_url").set_text(
config["url"])
@@ -149,7 +149,7 @@
def _on_apply_prefs(self):
config = {}
- config["listtype"] = self.glade.get_widget("combobox_types").\
+ config["list_type"] = self.glade.get_widget("combobox_types").\
get_model()[self.glade.get_widget("combobox_types").get_active()][1]
config["url"] = self.glade.get_widget("entry_url").get_text()
config["check_after_days"] =
self.glade.get_widget("spin_check_days").get_value_as_int()
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"deluge-commit" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/deluge-commit?hl=en
-~----------~----~----~----~------~----~------~--~---