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:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user