eventlogging fix, hopefully - micah

This commit is contained in:
Marcos Pinto 2007-08-02 22:47:43 +00:00
parent 5e7f442c8b
commit 6ef4323969
2 changed files with 8 additions and 6 deletions

View File

@ -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()

View File

@ -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)