1
0
mirror of https://github.com/gryf/wicd.git synced 2026-03-08 10:35:47 +01:00

Disable the enable notification option if pynotify isn't installed

This commit is contained in:
Adam Blackburn
2009-05-02 14:01:30 +08:00
parent d46d182257
commit 0563b9b4b2

View File

@@ -149,6 +149,13 @@ class PreferencesDialog(object):
os.path.join(USER_SETTINGS_DIR, 'USE_NOTIFICATIONS') os.path.join(USER_SETTINGS_DIR, 'USE_NOTIFICATIONS')
)) ))
# if pynotify isn't installed disable the option
try:
import pynotify
except ImportError:
self.notificationscheckbox.set_active(False)
self.notificationscheckbox.set_sensitive(False)
self.wTree.get_widget("notebook2").set_current_page(0) self.wTree.get_widget("notebook2").set_current_page(0)
def run(self): def run(self):