diff --git a/plugins/EventLogging/__init__.py b/plugins/EventLogging/__init__.py index 0a4991498..b9da26445 100644 --- a/plugins/EventLogging/__init__.py +++ b/plugins/EventLogging/__init__.py @@ -202,9 +202,9 @@ class EventLogging: self.manager.disconnect_event(self.manager.constants['EVENT_FASTRESUME_REJECTED_ERROR'], self.tab_log.handle_event) if widget == self.glade.get_widget("chk_tracker_announce"): if value: - self.manager.disconnect_event(self.manager.constants['EVENT_TRACKER_ANNOUNCE'], self.tab_log.handle_event) - else: self.manager.connect_event(self.manager.constants['EVENT_TRACKER_ANNOUNCE'], self.tab_log.handle_event) + else: + self.manager.disconnect_event(self.manager.constants['EVENT_TRACKER_ANNOUNCE'], self.tab_log.handle_event) if widget == self.glade.get_widget("chk_tracker_reply"): if value: self.manager.connect_event(self.manager.constants['EVENT_TRACKER_REPLY'], self.tab_log.handle_event) @@ -237,14 +237,14 @@ class EventLogging: self.manager.disconnect_event(self.manager.constants['EVENT_BLOCK_DOWNLOADING'], self.tab_log.handle_event) if widget == self.glade.get_widget("chk_block_finished"): if value: - self.manager.disconnect_event(self.manager.constants['EVENT_BLOCK_FINISHED'], self.tab_log.handle_event) - else: self.manager.connect_event(self.manager.constants['EVENT_BLOCK_FINISHED'], self.tab_log.handle_event) + else: + self.manager.disconnect_event(self.manager.constants['EVENT_BLOCK_FINISHED'], self.tab_log.handle_event) if widget == self.glade.get_widget("chk_other"): if value: - self.manager.disconnect_event(self.manager.constants['EVENT_OTHER'], self.tab_log.handle_event) - else: self.manager.connect_event(self.manager.constants['EVENT_OTHER'], self.tab_log.handle_event) + else: + self.manager.disconnect_event(self.manager.constants['EVENT_OTHER'], self.tab_log.handle_event) if widget == self.glade.get_widget("chk_log_files"): if value: self.tab_log.enable_log_files() diff --git a/plugins/EventLogging/tab_log.py b/plugins/EventLogging/tab_log.py index 42bb90d0e..1a829198b 100644 --- a/plugins/EventLogging/tab_log.py +++ b/plugins/EventLogging/tab_log.py @@ -181,6 +181,8 @@ class LogManager(object): logfile = open(log, "a") logfile.write(time.asctime(time.localtime()) + ", " +event_message + '\n') logfile.close() + if self.vbox is None: + self.prepare_log_store() if not event_message is None: label = gtk.Label() label.set_text(event_message)