Revision: 1374
http://geeqie.svn.sourceforge.net/geeqie/?rev=1374&view=rev
Author: zas_
Date: 2009-02-03 13:52:20 +0000 (Tue, 03 Feb 2009)
Log Message:
-----------
Add support for NoDisplay (entry is then hidden) and Type (only Application
type is valid here) keys.
Modified Paths:
--------------
trunk/src/editors.c
Modified: trunk/src/editors.c
===================================================================
--- trunk/src/editors.c 2009-02-03 13:50:10 UTC (rev 1373)
+++ trunk/src/editors.c 2009-02-03 13:52:20 UTC (rev 1374)
@@ -81,11 +81,11 @@
g_free(editor->key);
g_free(editor->name);
+ g_free(editor->icon);
g_free(editor->exec);
g_free(editor->menu_path);
g_free(editor->hotkey);
string_list_free(editor->ext_list);
- g_free(editor->icon);
g_free(editor->file);
g_free(editor);
}
@@ -149,6 +149,7 @@
GKeyFile *key_file;
EditorDescription *editor;
gchar *extensions;
+ gchar *type;
const gchar *key = filename_from_path(path);
gchar **categories, **only_show_in, **not_show_in;
gchar *try_exec;
@@ -161,6 +162,13 @@
g_key_file_free(key_file);
return FALSE;
}
+
+ type = g_key_file_get_string(key_file, DESKTOP_GROUP, "Type", NULL);
+ if (!type || strcmp(type, "Application") != 0)
+ {
+ /* We only consider desktop entries of Application type */
+ return FALSE;
+ }
editor = g_new0(EditorDescription, 1);
@@ -169,7 +177,11 @@
g_hash_table_insert(editors, editor->key, editor);
- if (g_key_file_get_boolean(key_file, DESKTOP_GROUP, "Hidden", NULL))
editor->hidden = TRUE;
+ if (g_key_file_get_boolean(key_file, DESKTOP_GROUP, "Hidden", NULL)
+ || g_key_file_get_boolean(key_file, DESKTOP_GROUP, "NoDisplay",
NULL))
+ {
+ editor->hidden = TRUE;
+ }
categories = g_key_file_get_string_list(key_file, DESKTOP_GROUP,
"Categories", NULL, NULL);
if (categories)
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Geeqie-svn mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geeqie-svn