gimp r25250 - in trunk: . app/widgets



Author: mitch
Date: Wed Mar 26 20:47:45 2008
New Revision: 25250
URL: http://svn.gnome.org/viewvc/gimp?rev=25250&view=rev

Log:
2008-03-26  Michael Natterer  <mitch gimp org>

	* app/widgets/gimptoolbox.[ch]: store the toolbox area's vbox in
	the widget struct.

	* app/widgets/gimptoolbox-dnd.c (gimp_toolbox_dnd_init): use it as
	DND target instead of the wbox with the tool buttons.



Modified:
   trunk/ChangeLog
   trunk/app/widgets/gimptoolbox-dnd.c
   trunk/app/widgets/gimptoolbox.c
   trunk/app/widgets/gimptoolbox.h

Modified: trunk/app/widgets/gimptoolbox-dnd.c
==============================================================================
--- trunk/app/widgets/gimptoolbox-dnd.c	(original)
+++ trunk/app/widgets/gimptoolbox-dnd.c	Wed Mar 26 20:47:45 2008
@@ -93,33 +93,30 @@
 
   dock = GIMP_DOCK (toolbox);
 
-  gimp_dnd_uri_list_dest_add (GTK_WIDGET (toolbox),
-                              gimp_toolbox_drop_uri_list,
-                              dock->context);
-  gimp_dnd_uri_list_dest_add (toolbox->tool_wbox,
+  gimp_dnd_uri_list_dest_add (toolbox->vbox,
                               gimp_toolbox_drop_uri_list,
                               dock->context);
 
-  gimp_dnd_viewable_dest_add (toolbox->tool_wbox, GIMP_TYPE_LAYER,
+  gimp_dnd_viewable_dest_add (toolbox->vbox, GIMP_TYPE_LAYER,
                               gimp_toolbox_drop_drawable,
                               dock->context);
-  gimp_dnd_viewable_dest_add (toolbox->tool_wbox, GIMP_TYPE_LAYER_MASK,
+  gimp_dnd_viewable_dest_add (toolbox->vbox, GIMP_TYPE_LAYER_MASK,
                               gimp_toolbox_drop_drawable,
                               dock->context);
-  gimp_dnd_viewable_dest_add (toolbox->tool_wbox, GIMP_TYPE_CHANNEL,
+  gimp_dnd_viewable_dest_add (toolbox->vbox, GIMP_TYPE_CHANNEL,
                               gimp_toolbox_drop_drawable,
                               dock->context);
-  gimp_dnd_viewable_dest_add (toolbox->tool_wbox, GIMP_TYPE_TOOL_INFO,
+  gimp_dnd_viewable_dest_add (toolbox->vbox, GIMP_TYPE_TOOL_INFO,
                               gimp_toolbox_drop_tool,
                               dock->context);
-  gimp_dnd_viewable_dest_add (toolbox->tool_wbox, GIMP_TYPE_BUFFER,
+  gimp_dnd_viewable_dest_add (toolbox->vbox, GIMP_TYPE_BUFFER,
                               gimp_toolbox_drop_buffer,
                               dock->context);
 
-  gimp_dnd_component_dest_add (toolbox->tool_wbox,
+  gimp_dnd_component_dest_add (toolbox->vbox,
                                gimp_toolbox_drop_component,
                                dock->context);
-  gimp_dnd_pixbuf_dest_add    (toolbox->tool_wbox,
+  gimp_dnd_pixbuf_dest_add    (toolbox->vbox,
                                gimp_toolbox_drop_pixbuf,
                                dock->context);
 }

Modified: trunk/app/widgets/gimptoolbox.c
==============================================================================
--- trunk/app/widgets/gimptoolbox.c	(original)
+++ trunk/app/widgets/gimptoolbox.c	Wed Mar 26 20:47:45 2008
@@ -184,7 +184,6 @@
   GimpContext   *context;
   GimpGuiConfig *config;
   GtkWidget     *main_vbox;
-  GtkWidget     *vbox;
   GdkDisplay    *display;
   GList         *list;
 
@@ -199,23 +198,28 @@
 
   main_vbox = GIMP_DOCK (toolbox)->main_vbox;
 
-  vbox = gtk_vbox_new (FALSE, 2);
-  gtk_box_pack_start (GTK_BOX (main_vbox), vbox, FALSE, FALSE, 0);
-  gtk_box_reorder_child (GTK_BOX (main_vbox), vbox, 0);
-  gtk_widget_show (vbox);
+  toolbox->vbox = gtk_vbox_new (FALSE, 2);
+  gtk_box_pack_start (GTK_BOX (main_vbox), toolbox->vbox, FALSE, FALSE, 0);
+  gtk_box_reorder_child (GTK_BOX (main_vbox), toolbox->vbox, 0);
+  gtk_widget_show (toolbox->vbox);
 
   toolbox->header = gtk_frame_new (NULL);
   gtk_frame_set_shadow_type (GTK_FRAME (toolbox->header), GTK_SHADOW_NONE);
-  gtk_box_pack_start (GTK_BOX (vbox), toolbox->header, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (toolbox->vbox), toolbox->header,
+                      FALSE, FALSE, 0);
   gtk_widget_show (toolbox->header);
 
+  gimp_help_set_help_data (toolbox->header,
+                           _("Drop image files here to open them"), NULL);
+
   toolbox->tool_wbox = gtk_hwrap_box_new (FALSE);
   gtk_wrap_box_set_justify (GTK_WRAP_BOX (toolbox->tool_wbox), GTK_JUSTIFY_TOP);
   gtk_wrap_box_set_line_justify (GTK_WRAP_BOX (toolbox->tool_wbox),
                                  GTK_JUSTIFY_LEFT);
   gtk_wrap_box_set_aspect_ratio (GTK_WRAP_BOX (toolbox->tool_wbox), 5.0 / 6.0);
 
-  gtk_box_pack_start (GTK_BOX (vbox), toolbox->tool_wbox, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (toolbox->vbox), toolbox->tool_wbox,
+                      FALSE, FALSE, 0);
   gtk_widget_show (toolbox->tool_wbox);
 
   toolbox->area_wbox = gtk_hwrap_box_new (FALSE);
@@ -224,7 +228,8 @@
                                  GTK_JUSTIFY_LEFT);
   gtk_wrap_box_set_aspect_ratio (GTK_WRAP_BOX (toolbox->area_wbox), 5.0 / 6.0);
 
-  gtk_box_pack_start (GTK_BOX (vbox), toolbox->area_wbox, FALSE, FALSE, 0);
+  gtk_box_pack_start (GTK_BOX (toolbox->vbox), toolbox->area_wbox,
+                      FALSE, FALSE, 0);
   gtk_widget_show (toolbox->area_wbox);
 
   /* We need to know when the current device changes, so we can update
@@ -288,7 +293,7 @@
 
     button = gimp_prop_check_button_new (G_OBJECT (config), "use-gegl",
                                          "Use GEGL");
-    gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
+    gtk_box_pack_start (GTK_BOX (toolbox->vbox), button, FALSE, FALSE, 0);
     gtk_widget_show (button);
   }
 

Modified: trunk/app/widgets/gimptoolbox.h
==============================================================================
--- trunk/app/widgets/gimptoolbox.h	(original)
+++ trunk/app/widgets/gimptoolbox.h	Wed Mar 26 20:47:45 2008
@@ -37,8 +37,9 @@
 {
   GimpImageDock  parent_instance;
 
-  GtkWidget     *header;
+  GtkWidget     *vbox;
 
+  GtkWidget     *header;
   GtkWidget     *tool_wbox;
 
   GtkWidget     *area_wbox;



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