Use GdkPoint in PAN_ITEM_TRIANGLE coord
[geeqie.git] / scripts / template-desktop.sh
index 02132fb..60a22c9 100755 (executable)
@@ -9,8 +9,8 @@
 
 tmp_file=$(mktemp "${TMPDIR:-/tmp}/geeqie.XXXXXXXXXX")
 path=$(dirname "$(realpath "$0")")
-srcpath=$(dirname "$path")/src/layout-util.c
-templatepath=$(dirname "$path")/plugins/template.desktop.in
+srcpath=$(dirname "$path")/src/ui/menu-classic.ui
+templatepath=$(dirname "$path")/plugins/org.geeqie.template.desktop.in
 
 awk -v src_path="$srcpath" 'BEGIN {
 menu_flag = 0
@@ -22,11 +22,11 @@ function get_menus()
 {
        {while ((getline line < src_path) > 0 )
                {
-               if (line == "\"<ui>\"")
+               if (line == "<ui>")
                        {
                        menu_flag = 1
                        }
-               if (line == "\"<\057ui>\";")
+               if (line == "<\047ui>")
                        {
                        menu_flag = 0
                        }
@@ -68,20 +68,24 @@ function get_menus()
                                {
                                i = i - 1
                                }
+                       if (lineArr[2] == "PluginsMenu")
+                               {
+                               i = i - 1
+                               }
                        }
                }
        }
 }
 
 /Valid sections/ {template_flag = 1; print; get_menus()}
-/This is a filter/ {template_flag = 0; print ""}
+/For other keys/ {template_flag = 0; print ""}
 (template_flag == 0) {print}
 '  "$templatepath" > "$tmp_file"
 
 cat "$tmp_file"
 printf '%s\n' "$PWD"
 
-if diff --unified=0 "./plugins/template.desktop.in" "$tmp_file" | zenity --title="Plugin template update" --text-info --width=700 --height=400
+if diff --unified=0 "./plugins/org.geeqie.template.desktop.in" "$tmp_file" | zenity --title="Plugin template update" --text-info --width=700 --height=400
 then
        mv "$tmp_file" "$templatepath"
 else