[alacarte] ItemEditor: Fix validity check



commit ccf5b18a16216bbc807d8eb1f425aa632fc76e1b
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Dec 12 13:46:10 2013 -0500

    ItemEditor: Fix validity check

 Alacarte/ItemEditor.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/Alacarte/ItemEditor.py b/Alacarte/ItemEditor.py
index 64d713f..c6b9fba 100644
--- a/Alacarte/ItemEditor.py
+++ b/Alacarte/ItemEditor.py
@@ -182,7 +182,7 @@ class LauncherEditor(ItemEditor):
     def resync_validity(self, *args):
         name_text = self.builder.get_object('name-entry').get_text()
         exec_text = self.builder.get_object('exec-entry').get_text()
-        valid = (name_text is not None and exec_text is not None)
+        valid = (name_text != "" and exec_text != "")
         self.builder.get_object('ok').set_sensitive(valid)
 
     def load(self):
@@ -223,7 +223,7 @@ class DirectoryEditor(ItemEditor):
 
     def resync_validity(self, *args):
         name_text = self.builder.get_object('name-entry').get_text()
-        valid = (name_text is not None)
+        valid = (name_text != "")
         self.builder.get_object('ok').set_sensitive(valid)
 
     def load(self):


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]