1
0
mirror of https://github.com/gryf/wicd.git synced 2026-02-07 08:45:46 +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

@@ -148,6 +148,13 @@ class PreferencesDialog(object):
os.path.exists(
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)