gimp r28154 - in trunk: . app/dialogs



Author: neo
Date: Fri Mar 13 12:10:13 2009
New Revision: 28154
URL: http://svn.gnome.org/viewvc/gimp?rev=28154&view=rev

Log:
2009-03-13  Sven Neumann  <sven gimp org>

	Bug 574427 â Stroke path with paint tool error

	* app/dialogs/stroke-dialog.c: construct the combo-box that
	selects the paint-info object with the GimpStrokeOptions as
	context. Makes the code much easier and fixes bug #574427.



Modified:
   trunk/ChangeLog
   trunk/app/dialogs/stroke-dialog.c

Modified: trunk/app/dialogs/stroke-dialog.c
==============================================================================
--- trunk/app/dialogs/stroke-dialog.c	(original)
+++ trunk/app/dialogs/stroke-dialog.c	Fri Mar 13 12:10:13 2009
@@ -49,13 +49,9 @@
 
 /*  local functions  */
 
-static void  stroke_dialog_response            (GtkWidget         *widget,
-                                                gint               response_id,
-                                                GtkWidget         *dialog);
-static void  stroke_dialog_paint_info_selected (GimpContainerView *view,
-                                                GimpViewable      *viewable,
-                                                gpointer           insert_data,
-                                                GimpStrokeOptions *options);
+static void  stroke_dialog_response (GtkWidget *widget,
+                                     gint       response_id,
+                                     GtkWidget *dialog);
 
 
 /*  public function  */
@@ -227,17 +223,11 @@
     gtk_widget_show (label);
 
     combo = gimp_container_combo_box_new (image->gimp->paint_info_list,
-                                          context,
+                                          GIMP_CONTEXT (options),
                                           16, 0);
-    gimp_container_view_select_item (GIMP_CONTAINER_VIEW (combo),
-                                     GIMP_VIEWABLE (GIMP_CONTEXT (options)->paint_info));
     gtk_box_pack_start (GTK_BOX (hbox), combo, TRUE, TRUE, 0);
     gtk_widget_show (combo);
 
-    g_signal_connect (combo, "select-item",
-                      G_CALLBACK (stroke_dialog_paint_info_selected),
-                      options);
-
     g_object_set_data (G_OBJECT (dialog), "gimp-tool-menu", combo);
 
     button = gimp_prop_check_button_new (G_OBJECT (options),
@@ -271,7 +261,6 @@
   image   = gimp_item_get_image (item);
   context = GIMP_VIEWABLE_DIALOG (dialog)->context;
 
-
   switch (response_id)
     {
     case RESPONSE_RESET:
@@ -332,20 +321,7 @@
       /* fallthrough */
 
     default:
-      g_signal_handlers_disconnect_by_func (combo,
-                                            G_CALLBACK (stroke_dialog_paint_info_selected),
-                                            options);
-
       gtk_widget_destroy (dialog);
       break;
     }
 }
-
-static void
-stroke_dialog_paint_info_selected (GimpContainerView *view,
-                                   GimpViewable      *viewable,
-                                   gpointer           insert_data,
-                                   GimpStrokeOptions *options)
-{
-  g_object_set (options, "paint-info", viewable, NULL);
-}



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