Re: [Gimp-developer] Image Info Dialog

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 




Hi,

Dave Neary wrote:
the menu entries are all defined in app/gui/image-menu.c

In 2.1, there is a file menu/image-menu.xml which defines the menu structure, which makes it even easier to change menu locations than before.


Here's a quick, untested patch against the 2.0 branch that changes the placement of that menu.

I should have at least *compiled* with the patch, I missed a line and this patch has a syntax error - updated patch applied.


Cheers,
Dave.

--
Dave Neary
bolsh@xxxxxxxx

? menu_change.patch
Index: app/gui/image-commands.c
===================================================================
RCS file: /cvs/gnome/gimp/app/gui/Attic/image-commands.c,v
retrieving revision 1.51
diff -u -r1.51 image-commands.c
--- app/gui/image-commands.c	31 Jan 2004 20:23:52 -0000	1.51
+++ app/gui/image-commands.c	27 Apr 2004 12:19:59 -0000
@@ -339,6 +339,34 @@
 }
 
 
+void
+image_info_window_cmd_callback (GtkWidget *widget,
+                                gpointer   data)
+{
+  GimpDisplay      *gdisp;
+  GimpDisplayShell *shell;
+  return_if_no_display (gdisp, data);
+
+  shell = GIMP_DISPLAY_SHELL (gdisp->shell);
+
+  if (GIMP_GUI_CONFIG (gdisp->gimage->gimp->config)->info_window_per_display)
+    {
+      if (! shell->info_dialog)
+	shell->info_dialog = info_window_create (gdisp);
+
+      /* To update the fields of the info window for the first time. *
+       * It's no use updating it in info_window_create() because the *
+       * pointer of the info window is not present in the shell yet. */
+      info_window_update (gdisp);
+
+      info_dialog_present (shell->info_dialog);
+    }
+  else
+    {
+      info_window_follow_auto (gdisp->gimage->gimp);
+    }
+}
+
 /****************************/
 /*  The layer merge dialog  */
 /****************************/
Index: app/gui/image-commands.h
===================================================================
RCS file: /cvs/gnome/gimp/app/gui/Attic/image-commands.h,v
retrieving revision 1.8
diff -u -r1.8 image-commands.h
--- app/gui/image-commands.h	8 Nov 2003 15:29:47 -0000	1.8
+++ app/gui/image-commands.h	27 Apr 2004 12:19:59 -0000
@@ -54,5 +54,7 @@
 
 void   image_configure_grid_cmd_callback    (GtkWidget *widget,
                                              gpointer   data);
+void   image_info_window_cmd_callback       (GtkWidget *widget,
+                                             gpointer   data);
 
 #endif /* __IMAGE_COMMANDS_H__ */
Index: app/gui/image-menu.c
===================================================================
RCS file: /cvs/gnome/gimp/app/gui/image-menu.c,v
retrieving revision 1.103
diff -u -r1.103 image-menu.c
--- app/gui/image-menu.c	20 Mar 2004 16:14:48 -0000	1.103
+++ app/gui/image-menu.c	27 Apr 2004 12:19:59 -0000
@@ -431,11 +431,6 @@
 
   MENU_SEPARATOR ("/View/---"),
 
-  { { N_("/View/_Info Window"), "<control><shift>I",
-      view_info_window_cmd_callback, 0,
-      "<StockItem>", GIMP_STOCK_INFO },
-    NULL,
-    GIMP_HELP_INFO_DIALOG, NULL },
   { { N_("/View/Na_vigation Window"), "<control><shift>N",
       view_navigation_window_cmd_callback, 0,
       "<StockItem>", GIMP_STOCK_NAVIGATION },
@@ -612,6 +607,12 @@
       "<StockItem>", GIMP_STOCK_GRID },
     NULL,
     GIMP_HELP_IMAGE_GRID, NULL },
+  
+  { { N_("/Image/_Info Window"), "<control><shift>I",
+      image_info_window_cmd_callback, 0,
+      "<StockItem>", GIMP_STOCK_INFO },
+    NULL,
+    GIMP_HELP_INFO_DIALOG, NULL },
 
   /*  <Image>/Layer  */
 
Index: app/gui/view-commands.c
===================================================================
RCS file: /cvs/gnome/gimp/app/gui/Attic/view-commands.c,v
retrieving revision 1.42
diff -u -r1.42 view-commands.c
--- app/gui/view-commands.c	31 Jan 2004 20:23:53 -0000	1.42
+++ app/gui/view-commands.c	27 Apr 2004 12:20:03 -0000
@@ -159,34 +159,6 @@
 }
 
 void
-view_info_window_cmd_callback (GtkWidget *widget,
-			       gpointer   data)
-{
-  GimpDisplay      *gdisp;
-  GimpDisplayShell *shell;
-  return_if_no_display (gdisp, data);
-
-  shell = GIMP_DISPLAY_SHELL (gdisp->shell);
-
-  if (GIMP_GUI_CONFIG (gdisp->gimage->gimp->config)->info_window_per_display)
-    {
-      if (! shell->info_dialog)
-	shell->info_dialog = info_window_create (gdisp);
-
-      /* To update the fields of the info window for the first time. *
-       * It's no use updating it in info_window_create() because the *
-       * pointer of the info window is not present in the shell yet. */
-      info_window_update (gdisp);
-
-      info_dialog_present (shell->info_dialog);
-    }
-  else
-    {
-      info_window_follow_auto (gdisp->gimage->gimp);
-    }
-}
-
-void
 view_navigation_window_cmd_callback (GtkWidget *widget,
                                      gpointer   data)
 {
Index: app/gui/view-commands.h
===================================================================
RCS file: /cvs/gnome/gimp/app/gui/Attic/view-commands.h,v
retrieving revision 1.13
diff -u -r1.13 view-commands.h
--- app/gui/view-commands.h	29 Jan 2004 22:22:22 -0000	1.13
+++ app/gui/view-commands.h	27 Apr 2004 12:20:03 -0000
@@ -33,8 +33,6 @@
                                                 gpointer   data);
 void   view_dot_for_dot_cmd_callback           (GtkWidget *widget,
                                                 gpointer   data);
-void   view_info_window_cmd_callback           (GtkWidget *widget,
-                                                gpointer   data);
 void   view_navigation_window_cmd_callback     (GtkWidget *widget,
                                                 gpointer   data);
 void   view_display_filters_cmd_callback       (GtkWidget *widget,
Index: po/Makefile.in.in
===================================================================
RCS file: /cvs/gnome/gimp/po/Makefile.in.in,v
retrieving revision 1.28
diff -u -r1.28 Makefile.in.in
--- po/Makefile.in.in	17 Oct 2003 12:21:56 -0000	1.28
+++ po/Makefile.in.in	27 Apr 2004 12:20:04 -0000
@@ -75,7 +75,7 @@
 
 .po.pox:
 	$(MAKE) $(GETTEXT_PACKAGE).pot
-	$(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*pox
+	$(MSGMERGE) $< $(srcdir)/$(GETTEXT_PACKAGE).pot -o $*.pox
 
 .po.mo:
 	$(MSGFMT) -o $@ $<
@@ -179,7 +179,6 @@
 mostlyclean:
 	rm -f core core.* *.pox $(GETTEXT_PACKAGE).po *.old.po cat-id-tbl.tmp
 	rm -fr *.o
-	rm -f .intltool-merge-cache
 
 clean: mostlyclean
 
@@ -208,7 +207,7 @@
 	  cat=`basename $$cat`; \
 	  lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
 	  echo "$$lang:"; \
-	  if $$tmpdir/$(INTLTOOL_UPDATE) --gettext-package $(GETTEXT_PACKAGE) --dist -o $$tmpdir/$$lang.new.po $$lang; then \
+	  if $(MSGMERGE) $$lang.po $(GETTEXT_PACKAGE).pot -o $$tmpdir/$$lang.new.po; then \
 	    if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
 	      rm -f $$tmpdir/$$lang.new.po; \
             else \
@@ -225,6 +224,19 @@
 	    rm -f $$tmpdir/$$lang.new.po; \
 	  fi; \
 	done
+
+.po: Makefile
+	$(MAKE)  $(PACKAGE).pot;
+	PATH=`pwd`/../src:$$PATH; \
+	echo; printf "$*: "; \
+	if $(MSGMERGE) $*; then \
+	  rm -f $*.old.po; \
+	  else \
+	    echo "msgmerge for * failed!"; \
+	    mv $*.old.po $*.po; \
+	fi; \
+	msgfmt --statistics $*.po; echo;
+
 
 # POTFILES is created from POTFILES.in by stripping comments, empty lines
 # and Intltool tags (enclosed in square brackets), and appending a full

[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux