Revision: 1370
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1370&view=rev
Author:   nadvornik
Date:     2009-02-01 22:35:40 +0000 (Sun, 01 Feb 2009)

Log Message:
-----------
test TryExec,
xdg_data_home added to the list of directories

Modified Paths:
--------------
    trunk/src/editors.c

Modified: trunk/src/editors.c
===================================================================
--- trunk/src/editors.c 2009-02-01 18:27:42 UTC (rev 1369)
+++ trunk/src/editors.c 2009-02-01 22:35:40 UTC (rev 1370)
@@ -151,6 +151,7 @@
        gchar *extensions;
        const gchar *key = filename_from_path(path);
        gchar **categories, **only_show_in, **not_show_in;
+       gchar *try_exec;
 
        if (g_hash_table_lookup(editors, key)) return FALSE; /* the file found 
earlier wins */
        
@@ -221,6 +222,16 @@
                g_strfreev(not_show_in);
                }
                
+               
+       try_exec = g_key_file_get_string(key_file, DESKTOP_GROUP, "TryExec", 
NULL);
+       if (try_exec && !editor->hidden)
+               {
+               gchar *try_exec_res = g_find_program_in_path(try_exec);
+               if (!try_exec_res) editor->hidden = TRUE;
+               g_free(try_exec_res);
+               g_free(try_exec);
+               }
+               
        if (editor->hidden) 
                {
                /* hidden editors will be deleted, no need to parse the rest */
@@ -326,7 +337,7 @@
        else
                xdg_data_dirs = g_strdup("/usr/share");
        
-       all_dirs = g_strconcat(get_rc_dir(), ":", GQ_APP_DIR, ":", 
xdg_data_dirs, NULL);
+       all_dirs = g_strconcat(get_rc_dir(), ":", GQ_APP_DIR, ":", 
xdg_data_home_get(), ":", xdg_data_dirs, NULL);
        
        g_free(xdg_data_dirs);
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
This SF.net email is sponsored by:
SourcForge Community
SourceForge wants to tell your story.
http://p.sf.net/sfu/sf-spreadtheword
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn

Reply via email to