Revision: 1853
          http://geeqie.svn.sourceforge.net/geeqie/?rev=1853&view=rev
Author:   nadvornik
Date:     2009-09-13 21:08:40 +0000 (Sun, 13 Sep 2009)

Log Message:
-----------
fixed editor list in popup menu

- show an editor if any of selected files matches
- added debug messages

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

Modified: trunk/src/editors.c
===================================================================
--- trunk/src/editors.c 2009-09-13 21:03:17 UTC (rev 1852)
+++ trunk/src/editors.c 2009-09-13 21:08:40 UTC (rev 1853)
@@ -645,6 +645,8 @@
        gchar *pathl;
        const gchar *p = NULL;
 
+       DEBUG_2("editor_command_path_parse: %s %d %d %s", fd->path, 
consider_sidecars, type, editor->key);
+
        string = g_string_new("");
 
        if (type == PATH_FILE || type == PATH_FILE_URL)
@@ -705,7 +707,8 @@
                g_free(pathl);
                pathl = NULL;
                }
-
+       
+       DEBUG_2("editor_command_path_parse: return %s", pathl);
        return pathl;
 }
 
@@ -750,6 +753,8 @@
        gboolean single_quotes = FALSE;
        gboolean double_quotes = FALSE;
 
+       DEBUG_2("editor_command_parse: %s %d %d", editor->key, 
consider_sidecars, !!output);
+
        if (output)
                result = g_string_new("");
 
@@ -821,6 +826,23 @@
                                                                                
  consider_sidecars,
                                                                                
  (*p == 'f') ? PATH_FILE : PATH_FILE_URL,
                                                                                
  editor);
+                                               if (!output)
+                                                       {
+                                                       /* just testing, check 
also the rest of the list (like with F and U)
+                                                          any matching file is 
OK */
+                                                       GList *work = 
list->next;
+                                                       
+                                                       while (!pathl && work)
+                                                               {
+                                                               FileData *fd = 
work->data;
+                                                               pathl = 
editor_command_path_parse(fd,
+                                                                               
                  consider_sidecars,
+                                                                               
                  (*p == 'f') ? PATH_FILE : PATH_FILE_URL,
+                                                                               
                  editor);
+                                                               work = 
work->next;
+                                                               }
+                                                       }
+                                                       
                                                if (!pathl)
                                                        {
                                                        flags |= 
EDITOR_ERROR_NO_FILE;


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

------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn

Reply via email to