41
41
Display the preferences window.
44
def __init__(self, specto):
44
def __init__(self, specto, notifier):
45
45
self.specto = specto
46
self.notifier = notifier
46
47
gladefile= self.specto.PATH + 'glade/preferences.glade'
47
48
windowname= "preferences"
48
49
self.wTree=gtk.glade.XML(gladefile,windowname, self.specto.glade_gettext)
56
57
"on_chkSoundProblem_toggled": self.chkSoundProblem_toggled,
57
58
"on_chk_libnotify_toggled": self.chkLibnotify_toggled,
58
59
"on_button_log_clear_clicked": self.specto.logger.clear_log,
59
"on_button_log_open_clicked": self.specto.show_error_log
60
"on_button_log_open_clicked": self.notifier.show_error_log
71
72
""" Save the preferences. """
72
73
self.preferences.hide()
73
74
self.set_preferences()
75
self.notifier.show_watch_info()
75
77
def chkSoundUpdate_toggled(self, widget):
76
78
""" Make the filechooser sensitive or insensitive. """
121
123
#see if windowlist has to be saved
122
124
if self.wTree.get_widget("chk_windowlist").get_active():
123
125
self.specto.specto_gconf.set_entry("show_in_windowlist", True)
124
self.specto.notifier.notifier.set_skip_taskbar_hint(True)
126
self.notifier.notifier.set_skip_taskbar_hint(False)
126
self.specto.specto_gconf.set_entry("show_in_windowlist", True)
127
self.specto.notifier.notifier.set_skip_taskbar_hint(False)#note, this is set_SKIP! this explains why it's False to skip.
128
self.specto.specto_gconf.set_entry("show_in_windowlist", False)
129
self.notifier.notifier.set_skip_taskbar_hint(True)#note, this is set_SKIP! this explains why it's False to skip.
129
131
#see if tray has to be saved
130
132
if self.wTree.get_widget("chk_tray").get_active():
131
133
self.specto.specto_gconf.set_entry("always_show_icon", True)
133
135
self.specto.specto_gconf.set_entry("always_show_icon", False)
134
self.specto.recreate_tray()
136
self.notifier.recreate_tray()
136
138
#see if debug mode has to be saved
137
139
if self.wTree.get_widget("chk_debug").get_active():
138
140
self.specto.specto_gconf.set_entry("debug_mode", True)
141
self.specto.DEBUG = True
140
143
self.specto.specto_gconf.set_entry("debug_mode", False)
144
self.specto.DEBUG = False
148
146
def get_preferences(self):
149
147
""" Get the preferences from gconf. """