[alacarte] ItemEditor: Make sure that we have a valid Exec line



commit 666d843940b9020c3ffb94e29b306ddcbc566ddf
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Thu Dec 12 13:47:01 2013 -0500

    ItemEditor: Make sure that we have a valid Exec line
    
    Otherwise, gnome-menus / gio will ignore it.

 Alacarte/ItemEditor.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/Alacarte/ItemEditor.py b/Alacarte/ItemEditor.py
index c6b9fba..3b48324 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 != "" and exec_text != "")
+        valid = (name_text != "" and GLib.find_program_in_path(exec_text) is not None)
         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]