mirror of https://github.com/GNOME/gimp.git
added a "Stroke Selection" button to the selection editor as suggested in
2003-05-09 Sven Neumann <sven@gimp.org> * app/widgets/gimpselectioneditor.[ch]: added a "Stroke Selection" button to the selection editor as suggested in bug #112448.
This commit is contained in:
parent
2182fb816a
commit
ebb56bc5f8
|
@ -1,3 +1,8 @@
|
|||
2003-05-09 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/widgets/gimpselectioneditor.[ch]: added a "Stroke Selection"
|
||||
button to the selection editor as suggested in bug #112448.
|
||||
|
||||
2003-05-09 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* app/tools/gimpmagnifytool.c (gimp_magnify_tool_button_release):
|
||||
|
|
|
@ -69,6 +69,8 @@ static void gimp_selection_editor_none_clicked (GtkWidget *widget,
|
|||
GimpImageEditor *editor);
|
||||
static void gimp_selection_editor_save_clicked (GtkWidget *widget,
|
||||
GimpImageEditor *editor);
|
||||
static void gimp_selection_editor_stroke_clicked (GtkWidget *widget,
|
||||
GimpImageEditor *editor);
|
||||
|
||||
static gboolean gimp_selection_preview_button_press(GtkWidget *widget,
|
||||
GdkEventButton *bevent,
|
||||
|
@ -184,6 +186,14 @@ gimp_selection_editor_init (GimpSelectionEditor *selection_editor)
|
|||
NULL,
|
||||
selection_editor);
|
||||
|
||||
selection_editor->stroke_button =
|
||||
gimp_editor_add_button (GIMP_EDITOR (selection_editor),
|
||||
GIMP_STOCK_SELECTION_STROKE,
|
||||
_("Stroke Selection"), NULL,
|
||||
G_CALLBACK (gimp_selection_editor_stroke_clicked),
|
||||
NULL,
|
||||
selection_editor);
|
||||
|
||||
gtk_widget_set_sensitive (GTK_WIDGET (selection_editor), FALSE);
|
||||
}
|
||||
|
||||
|
@ -286,6 +296,21 @@ gimp_selection_editor_save_clicked (GtkWidget *widget,
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
gimp_selection_editor_stroke_clicked (GtkWidget *widget,
|
||||
GimpImageEditor *editor)
|
||||
{
|
||||
if (editor->gimage)
|
||||
{
|
||||
GimpImage *gimage = editor->gimage;
|
||||
|
||||
gimp_image_mask_stroke (gimage,
|
||||
gimp_image_active_drawable (gimage),
|
||||
gimp_get_current_context (gimage->gimp));
|
||||
gimp_image_flush (gimage);
|
||||
}
|
||||
}
|
||||
|
||||
static gboolean
|
||||
gimp_selection_preview_button_press (GtkWidget *widget,
|
||||
GdkEventButton *bevent,
|
||||
|
|
|
@ -43,6 +43,7 @@ struct _GimpSelectionEditor
|
|||
GtkWidget *none_button;
|
||||
GtkWidget *invert_button;
|
||||
GtkWidget *save_button;
|
||||
GtkWidget *stroke_button;
|
||||
};
|
||||
|
||||
struct _GimpSelectionEditorClass
|
||||
|
|
Loading…
Reference in New Issue