From 936a0fceab7bc5f5bacc399e85cd4f7dbf1bef73 Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Mon, 25 Jun 2007 23:31:26 +0000 Subject: [PATCH] add a small count of blocks in the status bar - tarka --- plugins/BlocklistImport/__init__.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/BlocklistImport/__init__.py b/plugins/BlocklistImport/__init__.py index c9e6a2de0..09f647cab 100644 --- a/plugins/BlocklistImport/__init__.py +++ b/plugins/BlocklistImport/__init__.py @@ -47,6 +47,7 @@ class BlocklistImport: self.gtkconf = GTKConfig(self) self.gtkprog = GTKProgress(self) self.cancelled = False + self.nimported = 0 self.blockfile = deluge.common.CONFIG_DIR + "/blocklist.cache" @@ -115,6 +116,7 @@ class BlocklistImport: reader.close() + self.nimported = curr self.gtkprog.end_import() print "Import complete" @@ -138,4 +140,6 @@ class BlocklistImport: self.core.reset_ip_filter() def update(self): - pass + msg = "[Blocklist: %s entries]" % self.nimported + self.core.statusbar_temp_msg += ' ' + msg +