Disable the enable notification option if pynotify isn't installed
This commit is contained in:
1 parent
d46d182257
commit
0563b9b4b2
1 file changed
+7
@@ -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):
|
||||||
|
|||||||
Reference in new issue
Block a user