gimp r25060 - in branches/weskaggs: . app/actions app/display app/menus menus



Author: weskaggs
Date: Fri Mar  7 17:26:04 2008
New Revision: 25060
URL: http://svn.gnome.org/viewvc/gimp?rev=25060&view=rev

Log:
Bill Skaggs  <weskaggs primate ucdavis edu>

	Several small changes to make toolbars work better.
	Added entries, added icons, tweaked layout.

	* app/actions/image-actions.c
	* app/actions/view-actions.c
	* app/actions/view-commands.[ch]
	* app/actions/file-actions.c
	* app/actions/dialogs-actions.c
	* app/display/gimpdisplayshell.c
	* app/display/gimpdisplay.c
	* menus/image-toolbar.xml
	* menus/scratch-toolbar.xml

	* app/menus/menus.c
	* app/actions/tools-actions.c
	* menus/Makefile.am
	* menus/tools-toolbar.xml: added actions for tool
	categories, and made a start toward setting up a 
	Tools toolbar, not yet functional.


Modified:
   branches/weskaggs/ChangeLog
   branches/weskaggs/app/actions/dialogs-actions.c
   branches/weskaggs/app/actions/file-actions.c
   branches/weskaggs/app/actions/image-actions.c
   branches/weskaggs/app/actions/tools-actions.c
   branches/weskaggs/app/actions/view-actions.c
   branches/weskaggs/app/actions/view-commands.c
   branches/weskaggs/app/actions/view-commands.h
   branches/weskaggs/app/display/gimpdisplay.c
   branches/weskaggs/app/display/gimpdisplayshell.c
   branches/weskaggs/app/menus/menus.c
   branches/weskaggs/menus/Makefile.am
   branches/weskaggs/menus/image-toolbar.xml
   branches/weskaggs/menus/scratch-toolbar.xml

Modified: branches/weskaggs/app/actions/dialogs-actions.c
==============================================================================
--- branches/weskaggs/app/actions/dialogs-actions.c	(original)
+++ branches/weskaggs/app/actions/dialogs-actions.c	Fri Mar  7 17:26:04 2008
@@ -238,7 +238,7 @@
     "gimp-tips-dialog",
     GIMP_HELP_TIPS_DIALOG },
 
-  { "dialogs-about", GTK_STOCK_ABOUT,
+  { "dialogs-about", GIMP_STOCK_WILBER,
     N_("_About"), NULL,
     N_("About GIMP"),
     "gimp-about-dialog",

Modified: branches/weskaggs/app/actions/file-actions.c
==============================================================================
--- branches/weskaggs/app/actions/file-actions.c	(original)
+++ branches/weskaggs/app/actions/file-actions.c	Fri Mar  7 17:26:04 2008
@@ -66,25 +66,31 @@
   { "file-acquire-menu",     NULL, N_("Acq_uire")     },
 
   { "file-open", GTK_STOCK_OPEN,
-    N_("_Open..."), NULL,
+    N_("_Open"), NULL,
     N_("Open an image file"),
     G_CALLBACK (file_open_cmd_callback),
     GIMP_HELP_FILE_OPEN },
 
   { "file-open-as-layers", GIMP_STOCK_LAYER,
-    N_("Op_en as Layers..."), "<control><alt>O",
+    N_("Op_en as Layers"), "<control><alt>O",
     N_("Open an image file as layers"),
     G_CALLBACK (file_open_as_layers_cmd_callback),
     GIMP_HELP_FILE_OPEN_AS_LAYER },
 
   { "file-open-location", GIMP_STOCK_WEB,
-    N_("Open _Location..."), NULL,
+    N_("_URL"), NULL,
     N_("Open an image file from a specified location"),
     G_CALLBACK (file_open_location_cmd_callback),
     GIMP_HELP_FILE_OPEN_LOCATION },
 
+  { "file-open-recent", GIMP_STOCK_IMAGES,
+    N_("_Recent"), NULL,
+    N_("Open a recently used image file"),
+    NULL,
+    GIMP_HELP_FILE_OPEN },
+
   { "file-save-as-template", NULL,
-    N_("Save as _Template..."), NULL,
+    N_("Save as _Template"), NULL,
     N_("Create a new template from this image"),
     G_CALLBACK (file_save_template_cmd_callback),
     GIMP_HELP_FILE_SAVE_AS_TEMPLATE },
@@ -117,19 +123,19 @@
     GIMP_HELP_FILE_SAVE },
 
   { "file-save-as", GTK_STOCK_SAVE_AS,
-    N_("Save _As..."), "<control><shift>S",
+    N_("Save _As"), "<control><shift>S",
     N_("Save this image with a different name"),
     GIMP_SAVE_MODE_SAVE_AS, FALSE,
     GIMP_HELP_FILE_SAVE_AS },
 
   { "file-save-a-copy", NULL,
-    N_("Save a Cop_y..."), NULL,
+    N_("Save a Cop_y"), NULL,
     N_("Save this image with a different name, but keep its current name"),
     GIMP_SAVE_MODE_SAVE_A_COPY, FALSE,
     GIMP_HELP_FILE_SAVE_A_COPY },
 
   { "file-save-and-close", NULL,
-    N_("Save and Close..."), NULL,
+    N_("Save and Close"), NULL,
     N_("Save this image and close its window"),
     GIMP_SAVE_MODE_SAVE_AND_CLOSE, FALSE,
     GIMP_HELP_FILE_SAVE }

Modified: branches/weskaggs/app/actions/image-actions.c
==============================================================================
--- branches/weskaggs/app/actions/image-actions.c	(original)
+++ branches/weskaggs/app/actions/image-actions.c	Fri Mar  7 17:26:04 2008
@@ -77,19 +77,19 @@
     GIMP_HELP_IMAGE_WINDOW },
 
   { "image-new", GTK_STOCK_NEW,
-    N_("_New..."), "<control>N",
+    N_("_New"), "<control>N",
     N_("Create a new image"),
     G_CALLBACK (image_new_cmd_callback),
     GIMP_HELP_FILE_NEW },
 
   { "image-new-from-image", GTK_STOCK_NEW,
-    N_("_New..."), NULL,
+    N_("_New"), NULL,
     N_("Create a new image"),
     G_CALLBACK (image_new_from_image_cmd_callback),
     GIMP_HELP_FILE_NEW },
 
   { "image-resize", GIMP_STOCK_RESIZE,
-    N_("Can_vas Size..."), NULL,
+    N_("Can_vas Size"), NULL,
     N_("Adjust the image dimensions"),
     G_CALLBACK (image_resize_cmd_callback),
     GIMP_HELP_IMAGE_RESIZE },
@@ -107,13 +107,13 @@
     GIMP_HELP_IMAGE_RESIZE_TO_SELECTION },
 
   { "image-print-size", GIMP_STOCK_PRINT_RESOLUTION,
-    N_("_Print Size..."), NULL,
+    N_("_Print Size"), NULL,
     N_("Adjust the print resolution"),
     G_CALLBACK (image_print_size_cmd_callback),
     GIMP_HELP_IMAGE_PRINT_SIZE },
 
   { "image-scale", GIMP_STOCK_SCALE,
-    N_("_Scale Image..."), NULL,
+    N_("_Scale Image"), NULL,
     N_("Change the size of the image content"),
     G_CALLBACK (image_scale_cmd_callback),
     GIMP_HELP_IMAGE_SCALE },
@@ -131,7 +131,7 @@
     GIMP_HELP_IMAGE_DUPLICATE },
 
   { "image-merge-layers", NULL,
-    N_("Merge Visible _Layers..."), "<control>M",
+    N_("Merge Visible _Layers"), "<control>M",
     N_("Merge all visible layers into one layer"),
     G_CALLBACK (image_merge_layers_cmd_callback),
     GIMP_HELP_IMAGE_MERGE_LAYERS },
@@ -155,7 +155,7 @@
     GIMP_HELP_IMAGE_DISTRIBUTE_ITEMS },
 
   { "image-configure-grid", GIMP_STOCK_GRID,
-    N_("Configure G_rid..."), NULL,
+    N_("Configure G_rid"), NULL,
     N_("Configure the grid for this image"),
     G_CALLBACK (image_configure_grid_cmd_callback),
     GIMP_HELP_IMAGE_GRID },
@@ -180,7 +180,7 @@
     GIMP_GRAY, GIMP_HELP_IMAGE_CONVERT_GRAYSCALE },
 
   { "image-convert-indexed", GIMP_STOCK_CONVERT_INDEXED,
-    N_("_Indexed..."), NULL,
+    N_("_Indexed"), NULL,
     N_("Convert the image to indexed colors"),
     GIMP_INDEXED, GIMP_HELP_IMAGE_CONVERT_INDEXED }
 };

Modified: branches/weskaggs/app/actions/tools-actions.c
==============================================================================
--- branches/weskaggs/app/actions/tools-actions.c	(original)
+++ branches/weskaggs/app/actions/tools-actions.c	Fri Mar  7 17:26:04 2008
@@ -81,7 +81,72 @@
     N_("_Reset Order & Visibility"), NULL,
     N_("Reset tool order and visibility"),
     G_CALLBACK (tools_reset_cmd_callback),
-    NULL }
+    NULL },
+
+  { "tool-group-select", GIMP_STOCK_TOOL_RECT_SELECT,
+    N_("Selection tools"), NULL,
+    N_("Select part of an image"),
+    NULL, NULL },
+
+  { "tool-group-paint", GIMP_STOCK_TOOL_PAINTBRUSH,
+    N_("Paint tools"), NULL,
+    N_("Paint on an image"),
+    NULL, NULL },
+
+  { "tool-group-fill", GIMP_STOCK_TOOL_BUCKET_FILL,
+    N_("Fill tools"), NULL,
+    N_("Fill a part of an image"),
+    NULL, NULL },
+
+  { "tool-group-crop", GIMP_STOCK_TOOL_CROP,
+    N_("Crop tool"), NULL,
+    N_("Crop the edges of an image"),
+    NULL, NULL },
+
+  { "tool-group-move", GIMP_STOCK_TOOL_MOVE,
+    N_("Move tool"), NULL,
+    N_("Move layers or other objects"),
+    NULL, NULL },
+
+  { "tool-group-link", GIMP_STOCK_CURSOR,
+    N_("Linking tool"), NULL,
+    N_("Link layers"),
+    NULL, NULL },
+
+  { "tool-group-transform", GIMP_STOCK_TOOL_SCALE,
+    N_("Transform tools"), NULL,
+    N_("Transform layers or other objects"),
+    NULL, NULL },
+
+  { "tool-group-color", GIMP_STOCK_TOOL_COLORIZE,
+    N_("Color tools"), NULL,
+    N_("Alter the colors in an image"),
+    NULL, NULL },
+
+  { "tool-group-vectors", GIMP_STOCK_TOOL_PATH,
+    N_("Path tool"), NULL,
+    N_("Create or edit paths"),
+    NULL, NULL },
+
+  { "tool-group-color-picker", GIMP_STOCK_TOOL_COLOR_PICKER,
+    N_("Color picker tool"), NULL,
+    N_("Set colors from points in an image"),
+    NULL, NULL },
+
+  { "tool-group-zoom", GIMP_STOCK_TOOL_ZOOM,
+    N_("Zoom tool"), NULL,
+    N_("Zoom in on part of an image"),
+    NULL, NULL },
+
+  { "tool-group-measure", GIMP_STOCK_TOOL_MEASURE,
+    N_("Measure tool"), NULL,
+    N_("Measure angles or distances"),
+    NULL, NULL },
+
+  { "tool-group-text", GIMP_STOCK_TOOL_TEXT,
+    N_("Text tool"), NULL,
+    N_("Create or edit text layers"),
+    NULL, NULL }
 };
 
 static const GimpToggleActionEntry tools_toggle_actions[] =

Modified: branches/weskaggs/app/actions/view-actions.c
==============================================================================
--- branches/weskaggs/app/actions/view-actions.c	(original)
+++ branches/weskaggs/app/actions/view-actions.c	Fri Mar  7 17:26:04 2008
@@ -123,7 +123,13 @@
     N_("_Open Display..."), NULL,
     N_("Connect to another display"),
     G_CALLBACK (window_open_display_cmd_callback),
-    NULL }
+    NULL },
+
+  { "view-hide-toolbar", GTK_STOCK_CLOSE,
+    N_("Hide _Toolbar"), NULL,
+    N_("Hide this tool bar"),
+    G_CALLBACK (view_hide_toolbar_cmd_callback),
+    GIMP_HELP_VIEW_SHOW_TOOLBAR }
 };
 
 static const GimpToggleActionEntry view_toggle_actions[] =
@@ -135,7 +141,7 @@
     TRUE,
     GIMP_HELP_VIEW_DOT_FOR_DOT },
 
-  { "view-show-selection", NULL,
+  { "view-show-selection", GIMP_STOCK_SELECTION_ALL,
     N_("Show _Selection"), "<control>T",
     N_("Display the selection outline"),
     G_CALLBACK (view_toggle_selection_cmd_callback),
@@ -156,7 +162,7 @@
     TRUE,
     GIMP_HELP_VIEW_SHOW_GUIDES },
 
-  { "view-show-grid", NULL,
+  { "view-show-grid", GIMP_STOCK_GRID,
     N_("S_how Grid"), NULL,
     N_("Display the image's grid"),
     G_CALLBACK (view_toggle_grid_cmd_callback),
@@ -652,6 +658,8 @@
 
   SET_SENSITIVE ("view-show-menubar",    display);
   SET_ACTIVE    ("view-show-menubar",    display && options->show_menubar);
+  SET_SENSITIVE ("view-show-toolbar",    display);
+  SET_ACTIVE    ("view-show-toolbar",    display && options->show_toolbar);
   SET_SENSITIVE ("view-show-rulers",     display);
   SET_ACTIVE    ("view-show-rulers",     display && options->show_rulers);
   SET_SENSITIVE ("view-show-scrollbars", display);

Modified: branches/weskaggs/app/actions/view-commands.c
==============================================================================
--- branches/weskaggs/app/actions/view-commands.c	(original)
+++ branches/weskaggs/app/actions/view-commands.c	Fri Mar  7 17:26:04 2008
@@ -395,6 +395,19 @@
 }
 
 void
+view_hide_toolbar_cmd_callback (GtkAction *action,
+                                gpointer   data)
+{
+  GimpDisplay      *display;
+  GimpDisplayShell *shell;
+  return_if_no_display (display, data);
+
+  shell = GIMP_DISPLAY_SHELL (display->shell);
+
+  gimp_display_shell_set_show_toolbar (shell, FALSE);
+}
+
+void
 view_toggle_rulers_cmd_callback (GtkAction *action,
                                  gpointer   data)
 {

Modified: branches/weskaggs/app/actions/view-commands.h
==============================================================================
--- branches/weskaggs/app/actions/view-commands.h	(original)
+++ branches/weskaggs/app/actions/view-commands.h	Fri Mar  7 17:26:04 2008
@@ -39,6 +39,8 @@
                                                 gpointer   data);
 void   view_dot_for_dot_cmd_callback           (GtkAction *action,
                                                 gpointer   data);
+void   view_hide_toolbar_cmd_callback          (GtkAction *action,
+                                                gpointer   data);
 
 void   view_scroll_horizontal_cmd_callback     (GtkAction *action,
                                                 gint       value,

Modified: branches/weskaggs/app/display/gimpdisplay.c
==============================================================================
--- branches/weskaggs/app/display/gimpdisplay.c	(original)
+++ branches/weskaggs/app/display/gimpdisplay.c	Fri Mar  7 17:26:04 2008
@@ -417,6 +417,8 @@
   gint              ID;
   GimpDisplayShell *shell;
   gint              width, height;
+  gint              toolbar_height = 0;
+  gint              menubar_height = 0;
 
   g_return_val_if_fail (GIMP_IS_IMAGE (image), NULL);
 
@@ -453,12 +455,27 @@
   gimp_display_shell_set_show_scrollbars (shell, FALSE);
   gimp_display_shell_set_show_statusbar  (shell, FALSE);
 
+  if (shell->menubar)
+    {
+      GtkRequisition requisition;
+
+      gtk_widget_size_request (shell->menubar, &requisition);
+      menubar_height = requisition.height;
+    }
+
   if (shell->scratch_toolbar)
-    gtk_widget_show (shell->scratch_toolbar);
+    {
+      GtkRequisition requisition;
+
+      gtk_widget_show (shell->scratch_toolbar);
+      gtk_widget_size_request (shell->scratch_toolbar, &requisition);
+      toolbar_height = requisition.height;
+    }
 
   width  = SCALEX (shell, gimp_image_get_width  (image));
   height = SCALEY (shell, gimp_image_get_height (image));
-  gtk_widget_set_size_request (display->shell, width, height);
+  gtk_widget_set_size_request (display->shell, width,
+                               height + toolbar_height + menubar_height);
 
   gtk_widget_show (display->shell);
 

Modified: branches/weskaggs/app/display/gimpdisplayshell.c
==============================================================================
--- branches/weskaggs/app/display/gimpdisplayshell.c	(original)
+++ branches/weskaggs/app/display/gimpdisplayshell.c	Fri Mar  7 17:26:04 2008
@@ -827,7 +827,7 @@
       gtk_box_pack_start (GTK_BOX (main_vbox), shell->scratch_toolbar, FALSE, FALSE, 0);
       gtk_toolbar_set_icon_size (GTK_TOOLBAR (shell->scratch_toolbar),
                                  GTK_ICON_SIZE_BUTTON);
-      gtk_toolbar_set_style (GTK_TOOLBAR (shell->scratch_toolbar), GTK_TOOLBAR_ICONS);
+/*       gtk_toolbar_set_style (GTK_TOOLBAR (shell->scratch_toolbar), GTK_TOOLBAR_ICONS); */
 /*       gtk_widget_show (shell->scratch_toolbar); */
     }
 

Modified: branches/weskaggs/app/menus/menus.c
==============================================================================
--- branches/weskaggs/app/menus/menus.c	(original)
+++ branches/weskaggs/app/menus/menus.c	Fri Mar  7 17:26:04 2008
@@ -139,6 +139,8 @@
                                       "plug-in",
                                       "quick-mask",
                                       NULL,
+                                      "/tools-toolbar",
+                                      "tools-toolbar.xml", NULL,
                                       "/toolbox-menubar",
                                       "toolbox-menu.xml", toolbox_menu_setup,
                                       NULL);

Modified: branches/weskaggs/menus/Makefile.am
==============================================================================
--- branches/weskaggs/menus/Makefile.am	(original)
+++ branches/weskaggs/menus/Makefile.am	Fri Mar  7 17:26:04 2008
@@ -37,7 +37,8 @@
 	undo-menu.xml			\
 	vectors-menu.xml		\
 	image-toolbar.xml		\
-	scratch-toolbar.xml
+	scratch-toolbar.xml		\
+	tools-toolbar.xml
 
 EXTRA_DIST = \
 	$(menudata_DATA)		\

Modified: branches/weskaggs/menus/image-toolbar.xml
==============================================================================
--- branches/weskaggs/menus/image-toolbar.xml	(original)
+++ branches/weskaggs/menus/image-toolbar.xml	Fri Mar  7 17:26:04 2008
@@ -7,5 +7,17 @@
     <toolitem action="view-zoom-out" />
     <toolitem action="view-zoom-fit-in" />
     <toolitem action="view-fullscreen" />
+    <separator />
+    <toolitem action="view-show-grid" />
+    <toolitem action="view-show-selection" />
+    <toolitem action="quick-mask-toggle" />
+    <separator expand="true"/>
+    <toolitem action="edit-undo" />
+    <toolitem action="edit-redo" />
+    <toolitem action="edit-cut" />
+    <toolitem action="edit-copy" />
+    <toolitem action="edit-paste" />
+    <separator />
+    <toolitem action="view-hide-toolbar" />
   </toolbar>
 </ui>

Modified: branches/weskaggs/menus/scratch-toolbar.xml
==============================================================================
--- branches/weskaggs/menus/scratch-toolbar.xml	(original)
+++ branches/weskaggs/menus/scratch-toolbar.xml	Fri Mar  7 17:26:04 2008
@@ -3,10 +3,10 @@
 
 <ui>
   <toolbar action="scratch-toolbar">
-    <toolitem action="image-new-from-image" />
+    <toolitem action="image-new" />
     <toolitem action="file-open" />
-    <toolitem action="file-open-as-layers" />
     <toolitem action="file-open-location" />
+    <toolitem action="file-open-recent" />
     <separator expand="true" />
     <toolitem action="help-help" />
     <toolitem action="dialogs-about" />



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