Bug 574427 – Stroke path with paint tool error
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. svn path=/trunk/; revision=28154
This commit is contained in:

committed by
Sven Neumann

parent
12b621726a
commit
1c859ce6cb
@ -1,3 +1,11 @@
|
||||
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.
|
||||
|
||||
2009-03-13 Sven Neumann <sven@gimp.org>
|
||||
|
||||
Bug 571117 – lcms plug-in crashes on broken profile
|
||||
|
@ -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 @@ stroke_dialog_new (GimpItem *item,
|
||||
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 @@ stroke_dialog_response (GtkWidget *widget,
|
||||
image = gimp_item_get_image (item);
|
||||
context = GIMP_VIEWABLE_DIALOG (dialog)->context;
|
||||
|
||||
|
||||
switch (response_id)
|
||||
{
|
||||
case RESPONSE_RESET:
|
||||
@ -332,20 +321,7 @@ stroke_dialog_response (GtkWidget *widget,
|
||||
/* 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);
|
||||
}
|
||||
|
Reference in New Issue
Block a user