# HG changeset patch
# User nadvornik
# Date 1233606779 0
# Node ID fa0e7b8e785ea418a2b0d2c2885ca5ef9fef892e
# Parent 8fcdfacce91d52c351756c89dd0a5866132ff3f6
improved placing of external commands in menu
small menu improvements
diff -r 8fcdfacce91d -r fa0e7b8e785e plugins/symlink/symlink.desktop
--- a/plugins/symlink/symlink.desktop Sun Feb 01 22:35:40 2009 +0000
+++ b/plugins/symlink/symlink.desktop Mon Feb 02 20:32:59 2009 +0000
@@ -15,7 +15,7 @@
OnlyShowIn=X-Geeqie;
# Show in menu "File"
-X-Geeqie-Menu-Path=FileMenu
+X-Geeqie-Menu-Path=FileMenu/FileOpsSection
# This is a filter - $GEEQIE_DESTINATION is required
X-Geeqie-Filter=true
diff -r 8fcdfacce91d -r fa0e7b8e785e src/layout_util.c
--- a/src/layout_util.c Sun Feb 01 22:35:40 2009 +0000
+++ b/src/layout_util.c Mon Feb 02 20:32:59 2009 +0000
@@ -1254,20 +1254,24 @@
" "
" "
" "
+" "
" "
" "
" "
" "
+" "
" "
" "
+" "
+" "
" "
-" "
" "
" "
" "
" "
-" "
+" "
" "
+" "
" "
" "
" "
@@ -1283,11 +1287,20 @@
" "
" "
" "
+" "
+" "
+" "
+" "
" "
" "
+" "
" "
" "
"
"
" "
" "
+" "
" "
" "
" "
@@ -1338,6 +1352,7 @@
" "
" "
" "
+" "
" "
" "
" "
@@ -1346,31 +1361,37 @@
" "
" "
" "
-" "
" "
" "
+" "
+" "
" "
" "
" "
" "
" "
+" "
" "
" "
" "
" "
" "
+" "
" "
" "
" "
" "
+" "
" "
" "
" "
" "
+" "
" "
" "
" "
" "
+" "
" "
" "
" "
@@ -1378,6 +1399,7 @@
" "
" "
" "
+" "
" "
" "
" "
@@ -1538,14 +1560,45 @@
to_open = g_list_length(path) - 1;
to_close = g_list_length(old_path) - 1;
+ if (to_close > 0)
+ {
+ old_path = g_list_last(old_path);
+ old_path = old_path->prev;
+ }
+
for (i = 0; i < to_close; i++)
{
- g_string_append(desc, " ");
+ gchar *name = old_path->data;
+ if (g_str_has_suffix(name, "Section"))
+ {
+ g_string_append(desc, " ");
+ }
+ else if (g_str_has_suffix(name, "Menu"))
+ {
+ g_string_append(desc, " ");
+ }
+ else
+ {
+ g_warning("invalid menu path item %s", name);
+ }
+ old_path = old_path->prev;
}
for (i = 0; i < to_open; i++)
{
- g_string_append_printf(desc, " ", (gchar *)path->data);
+ gchar *name = path->data;
+ if (g_str_has_suffix(name, "Section"))
+ {
+ g_string_append_printf(desc, " ", name);
+ }
+ else if (g_str_has_suffix(name, "Menu"))
+ {
+ g_string_append_printf(desc, " ", name);
+ }
+ else
+ {
+ g_warning("invalid menu path item %s", name);
+ }
path = path->next;
}