mirror of https://github.com/GNOME/gimp.git
set the width of the scrollbar slider to the same value as our default
2001-07-30 Michael Natterer <mitch@gimp.org> * gtkrc: set the width of the scrollbar slider to the same value as our default font size so the sliders are nicely aligned with their descriptive labels. * libgimpwidgets/gimpdialog.[ch] * libgimpwidgets/gimpquerybox.[ch]: use GLib-isms and create the dialogs' action_area buttons with gtk_dialog_add_button() so we can use the GTK_STOCK_FOO buttons and plug in our own icon factory later. * app/qmask.[ch]: fixed the qmask buttons by applying proper GdkEvent callback conventions. * libgimpwidgets/gimpcolorbutton.c: NULLify all pointers in "destroy". * app/gdisplay_ops.c * app/gimphelp.c * app/interface.c * app/gui/brush-editor.c * app/gui/color-notebook.c * app/gui/convert-dialog.c * app/gui/dialogs-constructors.c * app/gui/file-commands.c * app/gui/file-new-dialog.c * app/gui/file-save-dialog.c * app/gui/gradient-editor.c * app/gui/gui.c * app/gui/image-commands.c * app/gui/layers-commands.c * app/gui/offset-dialog.c * app/gui/palette-editor.c * app/gui/palette-import-dialog.c * app/gui/preferences-dialog.c * app/gui/resize-dialog.c * app/gui/resolution-calibrate-dialog.c * app/gui/tool-options-dialog.c * app/widgets/gimpwidgets-utils.c * libgimpwidgets/gimpunitmenu.c: g_signal_* and GObject stuff, use lots of GTK_STOCK_OK and friends instead of _("OK") etc., misc minor cleanups.
This commit is contained in:
parent
32f7117b34
commit
8fae094e90
44
ChangeLog
44
ChangeLog
|
@ -1,3 +1,47 @@
|
|||
2001-07-30 Michael Natterer <mitch@gimp.org>
|
||||
|
||||
* gtkrc: set the width of the scrollbar slider to the same value
|
||||
as our default font size so the sliders are nicely aligned with
|
||||
their descriptive labels.
|
||||
|
||||
* libgimpwidgets/gimpdialog.[ch]
|
||||
* libgimpwidgets/gimpquerybox.[ch]: use GLib-isms and create the
|
||||
dialogs' action_area buttons with gtk_dialog_add_button() so we
|
||||
can use the GTK_STOCK_FOO buttons and plug in our own icon factory
|
||||
later.
|
||||
|
||||
* app/qmask.[ch]: fixed the qmask buttons by applying proper
|
||||
GdkEvent callback conventions.
|
||||
|
||||
* libgimpwidgets/gimpcolorbutton.c: NULLify all pointers in
|
||||
"destroy".
|
||||
|
||||
* app/gdisplay_ops.c
|
||||
* app/gimphelp.c
|
||||
* app/interface.c
|
||||
* app/gui/brush-editor.c
|
||||
* app/gui/color-notebook.c
|
||||
* app/gui/convert-dialog.c
|
||||
* app/gui/dialogs-constructors.c
|
||||
* app/gui/file-commands.c
|
||||
* app/gui/file-new-dialog.c
|
||||
* app/gui/file-save-dialog.c
|
||||
* app/gui/gradient-editor.c
|
||||
* app/gui/gui.c
|
||||
* app/gui/image-commands.c
|
||||
* app/gui/layers-commands.c
|
||||
* app/gui/offset-dialog.c
|
||||
* app/gui/palette-editor.c
|
||||
* app/gui/palette-import-dialog.c
|
||||
* app/gui/preferences-dialog.c
|
||||
* app/gui/resize-dialog.c
|
||||
* app/gui/resolution-calibrate-dialog.c
|
||||
* app/gui/tool-options-dialog.c
|
||||
* app/widgets/gimpwidgets-utils.c
|
||||
* libgimpwidgets/gimpunitmenu.c: g_signal_* and GObject stuff,
|
||||
use lots of GTK_STOCK_OK and friends instead of _("OK") etc.,
|
||||
misc minor cleanups.
|
||||
|
||||
2001-07-30 Sven Neumann <sven@gimp.org>
|
||||
|
||||
* HACKING
|
||||
|
|
|
@ -233,7 +233,7 @@ file_revert_cmd_callback (GtkWidget *widget,
|
|||
"file/revert.html",
|
||||
FALSE,
|
||||
text,
|
||||
_("Yes"), _("No"),
|
||||
GTK_STOCK_YES, GTK_STOCK_NO,
|
||||
GTK_OBJECT (gdisp->gimage), "destroy",
|
||||
file_revert_confirm_callback,
|
||||
gdisp->gimage);
|
||||
|
|
|
@ -331,8 +331,8 @@ image_scale_callback (GtkWidget *widget,
|
|||
_("The chosen image size will shrink\n"
|
||||
"some layers completely away.\n"
|
||||
"Is this what you want?"),
|
||||
_("OK"), _("Cancel"),
|
||||
GTK_OBJECT (image_scale->resize->resize_shell),
|
||||
GTK_STOCK_OK, GTK_STOCK_CANCEL,
|
||||
G_OBJECT (image_scale->resize->resize_shell),
|
||||
"destroy",
|
||||
image_scale_warn_callback,
|
||||
image_scale);
|
||||
|
|
|
@ -587,9 +587,9 @@ layers_new_layer_query (GimpImage *gimage)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), new_layer_query_ok_callback,
|
||||
GTK_STOCK_OK, new_layer_query_ok_callback,
|
||||
options, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), gtk_widget_destroy,
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
@ -770,9 +770,9 @@ layers_edit_layer_query (GimpLayer *layer)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), edit_layer_query_ok_callback,
|
||||
GTK_STOCK_OK, edit_layer_query_ok_callback,
|
||||
options, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), gtk_widget_destroy,
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
@ -875,9 +875,9 @@ layers_add_mask_query (GimpLayer *layer)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), add_mask_query_ok_callback,
|
||||
GTK_STOCK_OK, add_mask_query_ok_callback,
|
||||
options, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), gtk_widget_destroy,
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
@ -1169,9 +1169,9 @@ layers_layer_merge_query (GimpImage *gimage,
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), layer_merge_query_ok_callback,
|
||||
GTK_STOCK_OK, layer_merge_query_ok_callback,
|
||||
options, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), gtk_widget_destroy,
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -119,12 +119,12 @@ qmask_buttons_update (GDisplay *gdisp)
|
|||
if (gdisp->gimage->qmask_state != GTK_TOGGLE_BUTTON (gdisp->qmaskon)->active)
|
||||
{
|
||||
/* Disable toggle from doing anything */
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (gdisp->qmaskoff),
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (gdisp->qmaskon),
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_handlers_block_by_func (G_OBJECT (gdisp->qmaskoff),
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_handlers_block_by_func (G_OBJECT (gdisp->qmaskon),
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
|
||||
/* Change the state of the buttons */
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gdisp->qmaskon),
|
||||
|
@ -134,16 +134,16 @@ qmask_buttons_update (GDisplay *gdisp)
|
|||
! gdisp->gimage->qmask_state);
|
||||
|
||||
/* Enable toggle again */
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (gdisp->qmaskoff),
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (gdisp->qmaskon),
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (gdisp->qmaskoff),
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (gdisp->qmaskon),
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gboolean
|
||||
qmask_click_handler (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data)
|
||||
|
@ -156,7 +156,11 @@ qmask_click_handler (GtkWidget *widget,
|
|||
(event->button == 1))
|
||||
{
|
||||
edit_qmask_channel_query (gdisp);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -261,9 +265,9 @@ qmask_activate (GtkWidget *widget,
|
|||
gdisplays_flush ();
|
||||
|
||||
/* connect to the removed signal, so the buttons get updated */
|
||||
gtk_signal_connect (GTK_OBJECT (gmask), "removed",
|
||||
GTK_SIGNAL_FUNC (qmask_removed_callback),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gmask), "removed",
|
||||
G_CALLBACK (qmask_removed_callback),
|
||||
gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,7 +278,6 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
GtkWidget *hbox;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
GtkWidget *opacity_scale;
|
||||
GtkObject *opacity_scale_data;
|
||||
|
||||
|
@ -295,56 +298,56 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), edit_qmask_query_ok_callback,
|
||||
GTK_STOCK_OK, edit_qmask_query_ok_callback,
|
||||
options, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), edit_qmask_query_cancel_callback,
|
||||
GTK_STOCK_CANCEL, edit_qmask_query_cancel_callback,
|
||||
options, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
/* The main hbox */
|
||||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (options->query_box)->vbox),
|
||||
hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
/* The vbox */
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
/* The table */
|
||||
table = gtk_table_new (2, 3, FALSE);
|
||||
table = gtk_table_new (1, 2, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
/* The opacity scale */
|
||||
label = gtk_label_new (_("Mask Opacity:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
opacity_scale_data =
|
||||
gtk_adjustment_new (options->gimage->qmask_color.a * 100.0,
|
||||
0.0, 100.0, 1.0, 1.0, 0.0);
|
||||
opacity_scale = gtk_hscale_new (GTK_ADJUSTMENT (opacity_scale_data));
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), opacity_scale, 1, 2, 1, 2);
|
||||
gtk_widget_set_usize (opacity_scale, 100, -1);
|
||||
gtk_scale_set_value_pos (GTK_SCALE (opacity_scale), GTK_POS_TOP);
|
||||
gtk_signal_connect (GTK_OBJECT (opacity_scale_data), "value_changed",
|
||||
GTK_SIGNAL_FUNC (qmask_query_scale_update),
|
||||
options->color_panel);
|
||||
gtk_widget_show (opacity_scale);
|
||||
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Mask Opacity:"), 1.0, 1.0,
|
||||
opacity_scale, 1, FALSE);
|
||||
|
||||
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
|
||||
G_CALLBACK (qmask_query_scale_update),
|
||||
options->color_panel);
|
||||
|
||||
/* The color panel */
|
||||
gtk_signal_connect (GTK_OBJECT (options->color_panel), "color_changed",
|
||||
GTK_SIGNAL_FUNC (qmask_color_changed),
|
||||
opacity_scale_data);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), options->color_panel,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_widget_show (options->color_panel);
|
||||
|
||||
gtk_widget_show (table);
|
||||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (hbox);
|
||||
g_signal_connect (G_OBJECT (options->color_panel), "color_changed",
|
||||
G_CALLBACK (qmask_color_changed),
|
||||
opacity_scale_data);
|
||||
|
||||
gtk_widget_show (options->query_box);
|
||||
}
|
||||
|
||||
|
|
|
@ -119,12 +119,12 @@ qmask_buttons_update (GDisplay *gdisp)
|
|||
if (gdisp->gimage->qmask_state != GTK_TOGGLE_BUTTON (gdisp->qmaskon)->active)
|
||||
{
|
||||
/* Disable toggle from doing anything */
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (gdisp->qmaskoff),
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (gdisp->qmaskon),
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_handlers_block_by_func (G_OBJECT (gdisp->qmaskoff),
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_handlers_block_by_func (G_OBJECT (gdisp->qmaskon),
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
|
||||
/* Change the state of the buttons */
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gdisp->qmaskon),
|
||||
|
@ -134,16 +134,16 @@ qmask_buttons_update (GDisplay *gdisp)
|
|||
! gdisp->gimage->qmask_state);
|
||||
|
||||
/* Enable toggle again */
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (gdisp->qmaskoff),
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (gdisp->qmaskon),
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (gdisp->qmaskoff),
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (gdisp->qmaskon),
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gboolean
|
||||
qmask_click_handler (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data)
|
||||
|
@ -156,7 +156,11 @@ qmask_click_handler (GtkWidget *widget,
|
|||
(event->button == 1))
|
||||
{
|
||||
edit_qmask_channel_query (gdisp);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -261,9 +265,9 @@ qmask_activate (GtkWidget *widget,
|
|||
gdisplays_flush ();
|
||||
|
||||
/* connect to the removed signal, so the buttons get updated */
|
||||
gtk_signal_connect (GTK_OBJECT (gmask), "removed",
|
||||
GTK_SIGNAL_FUNC (qmask_removed_callback),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gmask), "removed",
|
||||
G_CALLBACK (qmask_removed_callback),
|
||||
gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,7 +278,6 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
GtkWidget *hbox;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
GtkWidget *opacity_scale;
|
||||
GtkObject *opacity_scale_data;
|
||||
|
||||
|
@ -295,56 +298,56 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), edit_qmask_query_ok_callback,
|
||||
GTK_STOCK_OK, edit_qmask_query_ok_callback,
|
||||
options, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), edit_qmask_query_cancel_callback,
|
||||
GTK_STOCK_CANCEL, edit_qmask_query_cancel_callback,
|
||||
options, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
/* The main hbox */
|
||||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (options->query_box)->vbox),
|
||||
hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
/* The vbox */
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
/* The table */
|
||||
table = gtk_table_new (2, 3, FALSE);
|
||||
table = gtk_table_new (1, 2, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
/* The opacity scale */
|
||||
label = gtk_label_new (_("Mask Opacity:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
opacity_scale_data =
|
||||
gtk_adjustment_new (options->gimage->qmask_color.a * 100.0,
|
||||
0.0, 100.0, 1.0, 1.0, 0.0);
|
||||
opacity_scale = gtk_hscale_new (GTK_ADJUSTMENT (opacity_scale_data));
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), opacity_scale, 1, 2, 1, 2);
|
||||
gtk_widget_set_usize (opacity_scale, 100, -1);
|
||||
gtk_scale_set_value_pos (GTK_SCALE (opacity_scale), GTK_POS_TOP);
|
||||
gtk_signal_connect (GTK_OBJECT (opacity_scale_data), "value_changed",
|
||||
GTK_SIGNAL_FUNC (qmask_query_scale_update),
|
||||
options->color_panel);
|
||||
gtk_widget_show (opacity_scale);
|
||||
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Mask Opacity:"), 1.0, 1.0,
|
||||
opacity_scale, 1, FALSE);
|
||||
|
||||
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
|
||||
G_CALLBACK (qmask_query_scale_update),
|
||||
options->color_panel);
|
||||
|
||||
/* The color panel */
|
||||
gtk_signal_connect (GTK_OBJECT (options->color_panel), "color_changed",
|
||||
GTK_SIGNAL_FUNC (qmask_color_changed),
|
||||
opacity_scale_data);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), options->color_panel,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_widget_show (options->color_panel);
|
||||
|
||||
gtk_widget_show (table);
|
||||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (hbox);
|
||||
g_signal_connect (G_OBJECT (options->color_panel), "color_changed",
|
||||
G_CALLBACK (qmask_color_changed),
|
||||
opacity_scale_data);
|
||||
|
||||
gtk_widget_show (options->query_box);
|
||||
}
|
||||
|
||||
|
|
|
@ -119,12 +119,12 @@ qmask_buttons_update (GDisplay *gdisp)
|
|||
if (gdisp->gimage->qmask_state != GTK_TOGGLE_BUTTON (gdisp->qmaskon)->active)
|
||||
{
|
||||
/* Disable toggle from doing anything */
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (gdisp->qmaskoff),
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (gdisp->qmaskon),
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_handlers_block_by_func (G_OBJECT (gdisp->qmaskoff),
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_handlers_block_by_func (G_OBJECT (gdisp->qmaskon),
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
|
||||
/* Change the state of the buttons */
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gdisp->qmaskon),
|
||||
|
@ -134,16 +134,16 @@ qmask_buttons_update (GDisplay *gdisp)
|
|||
! gdisp->gimage->qmask_state);
|
||||
|
||||
/* Enable toggle again */
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (gdisp->qmaskoff),
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (gdisp->qmaskon),
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (gdisp->qmaskoff),
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (gdisp->qmaskon),
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gboolean
|
||||
qmask_click_handler (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data)
|
||||
|
@ -156,7 +156,11 @@ qmask_click_handler (GtkWidget *widget,
|
|||
(event->button == 1))
|
||||
{
|
||||
edit_qmask_channel_query (gdisp);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -261,9 +265,9 @@ qmask_activate (GtkWidget *widget,
|
|||
gdisplays_flush ();
|
||||
|
||||
/* connect to the removed signal, so the buttons get updated */
|
||||
gtk_signal_connect (GTK_OBJECT (gmask), "removed",
|
||||
GTK_SIGNAL_FUNC (qmask_removed_callback),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gmask), "removed",
|
||||
G_CALLBACK (qmask_removed_callback),
|
||||
gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,7 +278,6 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
GtkWidget *hbox;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
GtkWidget *opacity_scale;
|
||||
GtkObject *opacity_scale_data;
|
||||
|
||||
|
@ -295,56 +298,56 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), edit_qmask_query_ok_callback,
|
||||
GTK_STOCK_OK, edit_qmask_query_ok_callback,
|
||||
options, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), edit_qmask_query_cancel_callback,
|
||||
GTK_STOCK_CANCEL, edit_qmask_query_cancel_callback,
|
||||
options, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
/* The main hbox */
|
||||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (options->query_box)->vbox),
|
||||
hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
/* The vbox */
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
/* The table */
|
||||
table = gtk_table_new (2, 3, FALSE);
|
||||
table = gtk_table_new (1, 2, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
/* The opacity scale */
|
||||
label = gtk_label_new (_("Mask Opacity:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
opacity_scale_data =
|
||||
gtk_adjustment_new (options->gimage->qmask_color.a * 100.0,
|
||||
0.0, 100.0, 1.0, 1.0, 0.0);
|
||||
opacity_scale = gtk_hscale_new (GTK_ADJUSTMENT (opacity_scale_data));
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), opacity_scale, 1, 2, 1, 2);
|
||||
gtk_widget_set_usize (opacity_scale, 100, -1);
|
||||
gtk_scale_set_value_pos (GTK_SCALE (opacity_scale), GTK_POS_TOP);
|
||||
gtk_signal_connect (GTK_OBJECT (opacity_scale_data), "value_changed",
|
||||
GTK_SIGNAL_FUNC (qmask_query_scale_update),
|
||||
options->color_panel);
|
||||
gtk_widget_show (opacity_scale);
|
||||
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Mask Opacity:"), 1.0, 1.0,
|
||||
opacity_scale, 1, FALSE);
|
||||
|
||||
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
|
||||
G_CALLBACK (qmask_query_scale_update),
|
||||
options->color_panel);
|
||||
|
||||
/* The color panel */
|
||||
gtk_signal_connect (GTK_OBJECT (options->color_panel), "color_changed",
|
||||
GTK_SIGNAL_FUNC (qmask_color_changed),
|
||||
opacity_scale_data);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), options->color_panel,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_widget_show (options->color_panel);
|
||||
|
||||
gtk_widget_show (table);
|
||||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (hbox);
|
||||
g_signal_connect (G_OBJECT (options->color_panel), "color_changed",
|
||||
G_CALLBACK (qmask_color_changed),
|
||||
opacity_scale_data);
|
||||
|
||||
gtk_widget_show (options->query_box);
|
||||
}
|
||||
|
||||
|
|
|
@ -119,12 +119,12 @@ qmask_buttons_update (GDisplay *gdisp)
|
|||
if (gdisp->gimage->qmask_state != GTK_TOGGLE_BUTTON (gdisp->qmaskon)->active)
|
||||
{
|
||||
/* Disable toggle from doing anything */
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (gdisp->qmaskoff),
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (gdisp->qmaskon),
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_handlers_block_by_func (G_OBJECT (gdisp->qmaskoff),
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_handlers_block_by_func (G_OBJECT (gdisp->qmaskon),
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
|
||||
/* Change the state of the buttons */
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gdisp->qmaskon),
|
||||
|
@ -134,16 +134,16 @@ qmask_buttons_update (GDisplay *gdisp)
|
|||
! gdisp->gimage->qmask_state);
|
||||
|
||||
/* Enable toggle again */
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (gdisp->qmaskoff),
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (gdisp->qmaskon),
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (gdisp->qmaskoff),
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (gdisp->qmaskon),
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gboolean
|
||||
qmask_click_handler (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data)
|
||||
|
@ -156,7 +156,11 @@ qmask_click_handler (GtkWidget *widget,
|
|||
(event->button == 1))
|
||||
{
|
||||
edit_qmask_channel_query (gdisp);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -261,9 +265,9 @@ qmask_activate (GtkWidget *widget,
|
|||
gdisplays_flush ();
|
||||
|
||||
/* connect to the removed signal, so the buttons get updated */
|
||||
gtk_signal_connect (GTK_OBJECT (gmask), "removed",
|
||||
GTK_SIGNAL_FUNC (qmask_removed_callback),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gmask), "removed",
|
||||
G_CALLBACK (qmask_removed_callback),
|
||||
gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,7 +278,6 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
GtkWidget *hbox;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
GtkWidget *opacity_scale;
|
||||
GtkObject *opacity_scale_data;
|
||||
|
||||
|
@ -295,56 +298,56 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), edit_qmask_query_ok_callback,
|
||||
GTK_STOCK_OK, edit_qmask_query_ok_callback,
|
||||
options, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), edit_qmask_query_cancel_callback,
|
||||
GTK_STOCK_CANCEL, edit_qmask_query_cancel_callback,
|
||||
options, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
/* The main hbox */
|
||||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (options->query_box)->vbox),
|
||||
hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
/* The vbox */
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
/* The table */
|
||||
table = gtk_table_new (2, 3, FALSE);
|
||||
table = gtk_table_new (1, 2, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
/* The opacity scale */
|
||||
label = gtk_label_new (_("Mask Opacity:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
opacity_scale_data =
|
||||
gtk_adjustment_new (options->gimage->qmask_color.a * 100.0,
|
||||
0.0, 100.0, 1.0, 1.0, 0.0);
|
||||
opacity_scale = gtk_hscale_new (GTK_ADJUSTMENT (opacity_scale_data));
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), opacity_scale, 1, 2, 1, 2);
|
||||
gtk_widget_set_usize (opacity_scale, 100, -1);
|
||||
gtk_scale_set_value_pos (GTK_SCALE (opacity_scale), GTK_POS_TOP);
|
||||
gtk_signal_connect (GTK_OBJECT (opacity_scale_data), "value_changed",
|
||||
GTK_SIGNAL_FUNC (qmask_query_scale_update),
|
||||
options->color_panel);
|
||||
gtk_widget_show (opacity_scale);
|
||||
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Mask Opacity:"), 1.0, 1.0,
|
||||
opacity_scale, 1, FALSE);
|
||||
|
||||
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
|
||||
G_CALLBACK (qmask_query_scale_update),
|
||||
options->color_panel);
|
||||
|
||||
/* The color panel */
|
||||
gtk_signal_connect (GTK_OBJECT (options->color_panel), "color_changed",
|
||||
GTK_SIGNAL_FUNC (qmask_color_changed),
|
||||
opacity_scale_data);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), options->color_panel,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_widget_show (options->color_panel);
|
||||
|
||||
gtk_widget_show (table);
|
||||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (hbox);
|
||||
g_signal_connect (G_OBJECT (options->color_panel), "color_changed",
|
||||
G_CALLBACK (qmask_color_changed),
|
||||
opacity_scale_data);
|
||||
|
||||
gtk_widget_show (options->query_box);
|
||||
}
|
||||
|
||||
|
|
|
@ -278,10 +278,10 @@ color_notebook_new (const gchar *title,
|
|||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, TRUE,
|
||||
|
||||
_("OK"), color_notebook_ok_callback,
|
||||
GTK_STOCK_OK, color_notebook_ok_callback,
|
||||
cnp, NULL, NULL, TRUE, FALSE,
|
||||
|
||||
_("Cancel"), color_notebook_cancel_callback,
|
||||
GTK_STOCK_CANCEL, color_notebook_cancel_callback,
|
||||
cnp, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -151,9 +151,9 @@ convert_to_indexed (GimpImage *gimage)
|
|||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, TRUE,
|
||||
|
||||
_("OK"), indexed_ok_callback,
|
||||
GTK_STOCK_OK, indexed_ok_callback,
|
||||
dialog, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), indexed_cancel_callback,
|
||||
GTK_STOCK_CANCEL, indexed_cancel_callback,
|
||||
dialog, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -757,11 +757,8 @@ dialogs_edit_brush_func (GimpData *data)
|
|||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush))
|
||||
{
|
||||
if (! brush_editor_dialog)
|
||||
{
|
||||
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||
"gimp:brush-editor");
|
||||
}
|
||||
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||
"gimp:brush-editor");
|
||||
|
||||
brush_editor_set_brush (brush_editor_dialog, brush);
|
||||
}
|
||||
|
@ -778,11 +775,8 @@ dialogs_edit_gradient_func (GimpData *data)
|
|||
|
||||
gradient = GIMP_GRADIENT (data);
|
||||
|
||||
if (! gradient_editor_dialog)
|
||||
{
|
||||
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||
"gimp:gradient-editor");
|
||||
}
|
||||
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||
"gimp:gradient-editor");
|
||||
|
||||
gradient_editor_set_gradient (gradient_editor_dialog, gradient);
|
||||
}
|
||||
|
@ -794,11 +788,8 @@ dialogs_edit_palette_func (GimpData *data)
|
|||
|
||||
palette = GIMP_PALETTE (data);
|
||||
|
||||
if (! palette_editor_dialog)
|
||||
{
|
||||
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||
"gimp:palette-editor");
|
||||
}
|
||||
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||
"gimp:palette-editor");
|
||||
|
||||
palette_editor_set_palette (palette_editor_dialog, palette);
|
||||
}
|
||||
|
|
|
@ -426,7 +426,7 @@ file_overwrite (gchar *filename,
|
|||
"save/file_exists.html",
|
||||
FALSE,
|
||||
overwrite_text,
|
||||
_("Yes"), _("No"),
|
||||
GTK_STOCK_YES, GTK_STOCK_NO,
|
||||
NULL, NULL,
|
||||
file_overwrite_callback,
|
||||
overwrite_data);
|
||||
|
|
|
@ -220,7 +220,7 @@ file_new_confirm_dialog (NewImageInfo *info)
|
|||
"dialogs/file_new.html#confirm_size",
|
||||
FALSE,
|
||||
text,
|
||||
_("OK"), _("Cancel"),
|
||||
GTK_STOCK_OK, GTK_STOCK_CANCEL,
|
||||
NULL, NULL,
|
||||
file_new_confirm_dialog_callback,
|
||||
info);
|
||||
|
@ -343,11 +343,11 @@ file_new_dialog_create (GimpImage *gimage)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, TRUE,
|
||||
|
||||
_("OK"), file_new_ok_callback,
|
||||
GTK_STOCK_OK, file_new_ok_callback,
|
||||
info, NULL, NULL, TRUE, FALSE,
|
||||
_("Reset"), file_new_reset_callback,
|
||||
info, NULL, NULL, FALSE, FALSE,
|
||||
_("Cancel"), file_new_cancel_callback,
|
||||
GTK_STOCK_CANCEL, file_new_cancel_callback,
|
||||
info, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -87,9 +87,9 @@ offset_dialog_create (GimpDrawable *drawable)
|
|||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), offset_ok_callback,
|
||||
GTK_STOCK_OK, offset_ok_callback,
|
||||
off_d, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), offset_cancel_callback,
|
||||
GTK_STOCK_CANCEL, offset_cancel_callback,
|
||||
off_d, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -639,7 +639,7 @@ palette_import_dialog_new (void)
|
|||
|
||||
_("Import"), palette_import_import_callback,
|
||||
import_dialog, NULL, NULL, FALSE, FALSE,
|
||||
_("Close"), palette_import_close_callback,
|
||||
GTK_STOCK_CLOSE, palette_import_close_callback,
|
||||
import_dialog, NULL, NULL, TRUE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -391,9 +391,10 @@ prefs_restart_notification (void)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
_("Save"), prefs_restart_notification_save_callback,
|
||||
GTK_STOCK_SAVE,
|
||||
prefs_restart_notification_save_callback,
|
||||
NULL, NULL, NULL, TRUE, FALSE,
|
||||
_("Close"), gtk_widget_destroy,
|
||||
GTK_STOCK_CLOSE, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
@ -1526,12 +1527,12 @@ preferences_dialog_create (void)
|
|||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), prefs_ok_callback,
|
||||
GTK_STOCK_OK, prefs_ok_callback,
|
||||
NULL, NULL, NULL, TRUE, FALSE,
|
||||
GTK_STOCK_SAVE, prefs_save_callback,
|
||||
NULL, NULL, NULL, FALSE, FALSE,
|
||||
_("Save"), prefs_save_callback,
|
||||
NULL, NULL, NULL, FALSE, FALSE,
|
||||
_("Cancel"), prefs_cancel_callback,
|
||||
NULL, NULL, NULL, TRUE, TRUE,
|
||||
GTK_STOCK_CANCEL, prefs_cancel_callback,
|
||||
NULL, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
|
|
|
@ -202,13 +202,13 @@ resize_widget_new (ResizeType type,
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, TRUE,
|
||||
|
||||
_("OK"), ok_cb,
|
||||
GTK_STOCK_OK, ok_cb,
|
||||
user_data, NULL, NULL, TRUE, FALSE,
|
||||
|
||||
_("Reset"), reset_callback,
|
||||
resize, NULL, NULL, FALSE, FALSE,
|
||||
|
||||
_("Cancel"), cancel_cb ? cancel_cb : G_CALLBACK (gtk_widget_destroy),
|
||||
GTK_STOCK_CANCEL, cancel_cb ? cancel_cb : G_CALLBACK (gtk_widget_destroy),
|
||||
cancel_cb ? user_data : NULL,
|
||||
cancel_cb ? NULL : (gpointer) 1,
|
||||
NULL, FALSE, TRUE,
|
||||
|
|
|
@ -110,9 +110,9 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
|
|||
GTK_WIN_POS_CENTER,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
_("OK"), resolution_calibrate_ok,
|
||||
GTK_STOCK_OK, resolution_calibrate_ok,
|
||||
NULL, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), gtk_widget_destroy,
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -305,7 +305,7 @@ gdisplay_close_warning_dialog (const gchar *image_name,
|
|||
"dialogs/really_close.html",
|
||||
FALSE,
|
||||
warning_buf,
|
||||
_("Close"), _("Cancel"),
|
||||
GTK_STOCK_CLOSE, GTK_STOCK_CANCEL,
|
||||
NULL, NULL,
|
||||
gdisplay_close_warning_callback,
|
||||
gdisp);
|
||||
|
|
|
@ -172,20 +172,21 @@ create_display_shell (GDisplay *gdisp,
|
|||
GDK_BUTTON_PRESS_MASK |
|
||||
GDK_KEY_PRESS_MASK |
|
||||
GDK_KEY_RELEASE_MASK));
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "delete_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_delete),
|
||||
gdisp);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "destroy",
|
||||
GTK_SIGNAL_FUNC (gdisplay_destroy),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (gdisp->shell), "delete_event",
|
||||
G_CALLBACK (gdisplay_delete),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->shell), "destroy",
|
||||
G_CALLBACK (gdisplay_destroy),
|
||||
gdisp);
|
||||
|
||||
/* active display callback */
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_shell_events),
|
||||
gdisp);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "key_press_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_shell_events),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->shell), "button_press_event",
|
||||
G_CALLBACK (gdisplay_shell_events),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->shell), "key_press_event",
|
||||
G_CALLBACK (gdisplay_shell_events),
|
||||
gdisp);
|
||||
|
||||
/* dnd stuff */
|
||||
gtk_drag_dest_set (gdisp->shell,
|
||||
|
@ -321,9 +322,10 @@ create_display_shell (GDisplay *gdisp,
|
|||
GTK_WIDGET_UNSET_FLAGS (gdisp->origin, GTK_CAN_FOCUS);
|
||||
gtk_widget_set_events (GTK_WIDGET (gdisp->origin),
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->origin), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_origin_button_press),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (gdisp->origin), "button_press_event",
|
||||
G_CALLBACK (gdisplay_origin_button_press),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (gdisp->origin, NULL, "#origin_button");
|
||||
|
||||
|
@ -336,12 +338,13 @@ create_display_shell (GDisplay *gdisp,
|
|||
gdisp->hrule = gtk_hruler_new ();
|
||||
gtk_widget_set_events (GTK_WIDGET (gdisp->hrule),
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
gtk_signal_connect_object (GTK_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
GTK_SIGNAL_FUNC (GTK_WIDGET_GET_CLASS (gdisp->hrule)->motion_notify_event),
|
||||
GTK_OBJECT (gdisp->hrule));
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->hrule), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_hruler_button_press),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect_swapped (G_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
G_CALLBACK (GTK_WIDGET_GET_CLASS (gdisp->hrule)->motion_notify_event),
|
||||
gdisp->hrule);
|
||||
g_signal_connect (G_OBJECT (gdisp->hrule), "button_press_event",
|
||||
G_CALLBACK (gdisplay_hruler_button_press),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (gdisp->hrule, NULL, "#ruler");
|
||||
|
||||
|
@ -349,12 +352,13 @@ create_display_shell (GDisplay *gdisp,
|
|||
gdisp->vrule = gtk_vruler_new ();
|
||||
gtk_widget_set_events (GTK_WIDGET (gdisp->vrule),
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
gtk_signal_connect_object (GTK_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
GTK_SIGNAL_FUNC (GTK_WIDGET_GET_CLASS (gdisp->vrule)->motion_notify_event),
|
||||
GTK_OBJECT (gdisp->vrule));
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->vrule), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_vruler_button_press),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect_swapped (G_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
G_CALLBACK (GTK_WIDGET_GET_CLASS (gdisp->vrule)->motion_notify_event),
|
||||
gdisp->vrule);
|
||||
g_signal_connect (G_OBJECT (gdisp->vrule), "button_press_event",
|
||||
G_CALLBACK (gdisplay_vruler_button_press),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (gdisp->vrule, NULL, "#ruler");
|
||||
|
||||
|
@ -368,12 +372,12 @@ create_display_shell (GDisplay *gdisp,
|
|||
gtk_object_set_user_data (GTK_OBJECT (gdisp->canvas), (gpointer) gdisp);
|
||||
|
||||
/* set the active display before doing any other canvas event processing */
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->canvas), "event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_shell_events),
|
||||
gdisp);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->canvas), "event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_canvas_events),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->canvas), "event",
|
||||
G_CALLBACK (gdisplay_shell_events),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->canvas), "event",
|
||||
G_CALLBACK (gdisplay_canvas_events),
|
||||
gdisp);
|
||||
|
||||
/* create the contents of the lower_hbox *********************************/
|
||||
|
||||
|
@ -383,12 +387,13 @@ create_display_shell (GDisplay *gdisp,
|
|||
gtk_widget_set_usize (GTK_WIDGET (gdisp->qmaskoff), 15, 15);
|
||||
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (gdisp->qmaskoff), FALSE);
|
||||
GTK_WIDGET_UNSET_FLAGS (gdisp->qmaskoff, GTK_CAN_FOCUS);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskoff), "toggled",
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskoff), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (qmask_click_handler),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (gdisp->qmaskoff), "toggled",
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->qmaskoff), "button_press_event",
|
||||
G_CALLBACK (qmask_click_handler),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (gdisp->qmaskoff, NULL, "#qmask_off_button");
|
||||
|
||||
|
@ -397,12 +402,13 @@ create_display_shell (GDisplay *gdisp,
|
|||
gtk_widget_set_usize (GTK_WIDGET (gdisp->qmaskon), 15, 15);
|
||||
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (gdisp->qmaskon), FALSE);
|
||||
GTK_WIDGET_UNSET_FLAGS (gdisp->qmaskon, GTK_CAN_FOCUS);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskon), "toggled",
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskon), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (qmask_click_handler),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (gdisp->qmaskon), "toggled",
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->qmaskon), "button_press_event",
|
||||
G_CALLBACK (qmask_click_handler),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (gdisp->qmaskon, NULL, "#qmask_on_button");
|
||||
|
||||
|
@ -410,9 +416,10 @@ create_display_shell (GDisplay *gdisp,
|
|||
|
||||
/* the navigation window button */
|
||||
nav_ebox = gtk_event_box_new ();
|
||||
gtk_signal_connect (GTK_OBJECT (nav_ebox), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (nav_popup_click_handler),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (nav_ebox), "button_press_event",
|
||||
G_CALLBACK (nav_popup_click_handler),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (nav_ebox, NULL, "#nav_window_button");
|
||||
|
||||
|
@ -452,9 +459,11 @@ create_display_shell (GDisplay *gdisp,
|
|||
gdisp->icon_needs_update = 0;
|
||||
gdisp->icon_timeout_id = 0;
|
||||
gdisp->icon_idle_id = 0;
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->gimage), "invalidate_preview",
|
||||
GTK_SIGNAL_FUNC (gdisplay_update_icon_scheduler),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (gdisp->gimage), "invalidate_preview",
|
||||
G_CALLBACK (gdisplay_update_icon_scheduler),
|
||||
gdisp);
|
||||
|
||||
gdisplay_update_icon_scheduler (gdisp->gimage, gdisp);
|
||||
|
||||
|
||||
|
|
|
@ -119,12 +119,12 @@ qmask_buttons_update (GDisplay *gdisp)
|
|||
if (gdisp->gimage->qmask_state != GTK_TOGGLE_BUTTON (gdisp->qmaskon)->active)
|
||||
{
|
||||
/* Disable toggle from doing anything */
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (gdisp->qmaskoff),
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (gdisp->qmaskon),
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_handlers_block_by_func (G_OBJECT (gdisp->qmaskoff),
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_handlers_block_by_func (G_OBJECT (gdisp->qmaskon),
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
|
||||
/* Change the state of the buttons */
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gdisp->qmaskon),
|
||||
|
@ -134,16 +134,16 @@ qmask_buttons_update (GDisplay *gdisp)
|
|||
! gdisp->gimage->qmask_state);
|
||||
|
||||
/* Enable toggle again */
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (gdisp->qmaskoff),
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (gdisp->qmaskon),
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (gdisp->qmaskoff),
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (gdisp->qmaskon),
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gboolean
|
||||
qmask_click_handler (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data)
|
||||
|
@ -156,7 +156,11 @@ qmask_click_handler (GtkWidget *widget,
|
|||
(event->button == 1))
|
||||
{
|
||||
edit_qmask_channel_query (gdisp);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -261,9 +265,9 @@ qmask_activate (GtkWidget *widget,
|
|||
gdisplays_flush ();
|
||||
|
||||
/* connect to the removed signal, so the buttons get updated */
|
||||
gtk_signal_connect (GTK_OBJECT (gmask), "removed",
|
||||
GTK_SIGNAL_FUNC (qmask_removed_callback),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gmask), "removed",
|
||||
G_CALLBACK (qmask_removed_callback),
|
||||
gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,7 +278,6 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
GtkWidget *hbox;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
GtkWidget *opacity_scale;
|
||||
GtkObject *opacity_scale_data;
|
||||
|
||||
|
@ -295,56 +298,56 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), edit_qmask_query_ok_callback,
|
||||
GTK_STOCK_OK, edit_qmask_query_ok_callback,
|
||||
options, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), edit_qmask_query_cancel_callback,
|
||||
GTK_STOCK_CANCEL, edit_qmask_query_cancel_callback,
|
||||
options, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
/* The main hbox */
|
||||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (options->query_box)->vbox),
|
||||
hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
/* The vbox */
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
/* The table */
|
||||
table = gtk_table_new (2, 3, FALSE);
|
||||
table = gtk_table_new (1, 2, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
/* The opacity scale */
|
||||
label = gtk_label_new (_("Mask Opacity:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
opacity_scale_data =
|
||||
gtk_adjustment_new (options->gimage->qmask_color.a * 100.0,
|
||||
0.0, 100.0, 1.0, 1.0, 0.0);
|
||||
opacity_scale = gtk_hscale_new (GTK_ADJUSTMENT (opacity_scale_data));
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), opacity_scale, 1, 2, 1, 2);
|
||||
gtk_widget_set_usize (opacity_scale, 100, -1);
|
||||
gtk_scale_set_value_pos (GTK_SCALE (opacity_scale), GTK_POS_TOP);
|
||||
gtk_signal_connect (GTK_OBJECT (opacity_scale_data), "value_changed",
|
||||
GTK_SIGNAL_FUNC (qmask_query_scale_update),
|
||||
options->color_panel);
|
||||
gtk_widget_show (opacity_scale);
|
||||
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Mask Opacity:"), 1.0, 1.0,
|
||||
opacity_scale, 1, FALSE);
|
||||
|
||||
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
|
||||
G_CALLBACK (qmask_query_scale_update),
|
||||
options->color_panel);
|
||||
|
||||
/* The color panel */
|
||||
gtk_signal_connect (GTK_OBJECT (options->color_panel), "color_changed",
|
||||
GTK_SIGNAL_FUNC (qmask_color_changed),
|
||||
opacity_scale_data);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), options->color_panel,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_widget_show (options->color_panel);
|
||||
|
||||
gtk_widget_show (table);
|
||||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (hbox);
|
||||
g_signal_connect (G_OBJECT (options->color_panel), "color_changed",
|
||||
G_CALLBACK (qmask_color_changed),
|
||||
opacity_scale_data);
|
||||
|
||||
gtk_widget_show (options->query_box);
|
||||
}
|
||||
|
||||
|
|
|
@ -20,14 +20,14 @@
|
|||
#define __QMASK_H__
|
||||
|
||||
|
||||
void qmask_click_handler (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data);
|
||||
void qmask_activate (GtkWidget *widget,
|
||||
GDisplay *gdisp);
|
||||
void qmask_deactivate (GtkWidget *widget,
|
||||
GDisplay *gdisp);
|
||||
void qmask_buttons_update (GDisplay *gdisp);
|
||||
gboolean qmask_click_handler (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data);
|
||||
void qmask_activate (GtkWidget *widget,
|
||||
GDisplay *gdisp);
|
||||
void qmask_deactivate (GtkWidget *widget,
|
||||
GDisplay *gdisp);
|
||||
void qmask_buttons_update (GDisplay *gdisp);
|
||||
|
||||
|
||||
#endif /* __QMASK_H__ */
|
||||
|
|
|
@ -172,20 +172,21 @@ create_display_shell (GDisplay *gdisp,
|
|||
GDK_BUTTON_PRESS_MASK |
|
||||
GDK_KEY_PRESS_MASK |
|
||||
GDK_KEY_RELEASE_MASK));
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "delete_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_delete),
|
||||
gdisp);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "destroy",
|
||||
GTK_SIGNAL_FUNC (gdisplay_destroy),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (gdisp->shell), "delete_event",
|
||||
G_CALLBACK (gdisplay_delete),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->shell), "destroy",
|
||||
G_CALLBACK (gdisplay_destroy),
|
||||
gdisp);
|
||||
|
||||
/* active display callback */
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_shell_events),
|
||||
gdisp);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "key_press_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_shell_events),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->shell), "button_press_event",
|
||||
G_CALLBACK (gdisplay_shell_events),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->shell), "key_press_event",
|
||||
G_CALLBACK (gdisplay_shell_events),
|
||||
gdisp);
|
||||
|
||||
/* dnd stuff */
|
||||
gtk_drag_dest_set (gdisp->shell,
|
||||
|
@ -321,9 +322,10 @@ create_display_shell (GDisplay *gdisp,
|
|||
GTK_WIDGET_UNSET_FLAGS (gdisp->origin, GTK_CAN_FOCUS);
|
||||
gtk_widget_set_events (GTK_WIDGET (gdisp->origin),
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->origin), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_origin_button_press),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (gdisp->origin), "button_press_event",
|
||||
G_CALLBACK (gdisplay_origin_button_press),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (gdisp->origin, NULL, "#origin_button");
|
||||
|
||||
|
@ -336,12 +338,13 @@ create_display_shell (GDisplay *gdisp,
|
|||
gdisp->hrule = gtk_hruler_new ();
|
||||
gtk_widget_set_events (GTK_WIDGET (gdisp->hrule),
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
gtk_signal_connect_object (GTK_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
GTK_SIGNAL_FUNC (GTK_WIDGET_GET_CLASS (gdisp->hrule)->motion_notify_event),
|
||||
GTK_OBJECT (gdisp->hrule));
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->hrule), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_hruler_button_press),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect_swapped (G_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
G_CALLBACK (GTK_WIDGET_GET_CLASS (gdisp->hrule)->motion_notify_event),
|
||||
gdisp->hrule);
|
||||
g_signal_connect (G_OBJECT (gdisp->hrule), "button_press_event",
|
||||
G_CALLBACK (gdisplay_hruler_button_press),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (gdisp->hrule, NULL, "#ruler");
|
||||
|
||||
|
@ -349,12 +352,13 @@ create_display_shell (GDisplay *gdisp,
|
|||
gdisp->vrule = gtk_vruler_new ();
|
||||
gtk_widget_set_events (GTK_WIDGET (gdisp->vrule),
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
gtk_signal_connect_object (GTK_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
GTK_SIGNAL_FUNC (GTK_WIDGET_GET_CLASS (gdisp->vrule)->motion_notify_event),
|
||||
GTK_OBJECT (gdisp->vrule));
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->vrule), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_vruler_button_press),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect_swapped (G_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
G_CALLBACK (GTK_WIDGET_GET_CLASS (gdisp->vrule)->motion_notify_event),
|
||||
gdisp->vrule);
|
||||
g_signal_connect (G_OBJECT (gdisp->vrule), "button_press_event",
|
||||
G_CALLBACK (gdisplay_vruler_button_press),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (gdisp->vrule, NULL, "#ruler");
|
||||
|
||||
|
@ -368,12 +372,12 @@ create_display_shell (GDisplay *gdisp,
|
|||
gtk_object_set_user_data (GTK_OBJECT (gdisp->canvas), (gpointer) gdisp);
|
||||
|
||||
/* set the active display before doing any other canvas event processing */
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->canvas), "event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_shell_events),
|
||||
gdisp);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->canvas), "event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_canvas_events),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->canvas), "event",
|
||||
G_CALLBACK (gdisplay_shell_events),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->canvas), "event",
|
||||
G_CALLBACK (gdisplay_canvas_events),
|
||||
gdisp);
|
||||
|
||||
/* create the contents of the lower_hbox *********************************/
|
||||
|
||||
|
@ -383,12 +387,13 @@ create_display_shell (GDisplay *gdisp,
|
|||
gtk_widget_set_usize (GTK_WIDGET (gdisp->qmaskoff), 15, 15);
|
||||
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (gdisp->qmaskoff), FALSE);
|
||||
GTK_WIDGET_UNSET_FLAGS (gdisp->qmaskoff, GTK_CAN_FOCUS);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskoff), "toggled",
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskoff), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (qmask_click_handler),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (gdisp->qmaskoff), "toggled",
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->qmaskoff), "button_press_event",
|
||||
G_CALLBACK (qmask_click_handler),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (gdisp->qmaskoff, NULL, "#qmask_off_button");
|
||||
|
||||
|
@ -397,12 +402,13 @@ create_display_shell (GDisplay *gdisp,
|
|||
gtk_widget_set_usize (GTK_WIDGET (gdisp->qmaskon), 15, 15);
|
||||
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (gdisp->qmaskon), FALSE);
|
||||
GTK_WIDGET_UNSET_FLAGS (gdisp->qmaskon, GTK_CAN_FOCUS);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskon), "toggled",
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskon), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (qmask_click_handler),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (gdisp->qmaskon), "toggled",
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->qmaskon), "button_press_event",
|
||||
G_CALLBACK (qmask_click_handler),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (gdisp->qmaskon, NULL, "#qmask_on_button");
|
||||
|
||||
|
@ -410,9 +416,10 @@ create_display_shell (GDisplay *gdisp,
|
|||
|
||||
/* the navigation window button */
|
||||
nav_ebox = gtk_event_box_new ();
|
||||
gtk_signal_connect (GTK_OBJECT (nav_ebox), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (nav_popup_click_handler),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (nav_ebox), "button_press_event",
|
||||
G_CALLBACK (nav_popup_click_handler),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (nav_ebox, NULL, "#nav_window_button");
|
||||
|
||||
|
@ -452,9 +459,11 @@ create_display_shell (GDisplay *gdisp,
|
|||
gdisp->icon_needs_update = 0;
|
||||
gdisp->icon_timeout_id = 0;
|
||||
gdisp->icon_idle_id = 0;
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->gimage), "invalidate_preview",
|
||||
GTK_SIGNAL_FUNC (gdisplay_update_icon_scheduler),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (gdisp->gimage), "invalidate_preview",
|
||||
G_CALLBACK (gdisplay_update_icon_scheduler),
|
||||
gdisp);
|
||||
|
||||
gdisplay_update_icon_scheduler (gdisp->gimage, gdisp);
|
||||
|
||||
|
||||
|
|
|
@ -305,7 +305,7 @@ gdisplay_close_warning_dialog (const gchar *image_name,
|
|||
"dialogs/really_close.html",
|
||||
FALSE,
|
||||
warning_buf,
|
||||
_("Close"), _("Cancel"),
|
||||
GTK_STOCK_CLOSE, GTK_STOCK_CANCEL,
|
||||
NULL, NULL,
|
||||
gdisplay_close_warning_callback,
|
||||
gdisp);
|
||||
|
|
|
@ -197,7 +197,7 @@ gimp_help_internal (const gchar *help_path,
|
|||
"It probably was not compiled because\n"
|
||||
"you don't have GtkXmHTML installed."),
|
||||
_("Use Netscape instead"),
|
||||
_("Cancel"),
|
||||
GTK_STOCK_CANCEL,
|
||||
NULL, NULL,
|
||||
gimp_help_internal_not_found_callback,
|
||||
NULL);
|
||||
|
|
|
@ -225,9 +225,7 @@ brush_editor_set_brush (BrushEditor *brush_editor,
|
|||
GimpBrushGenerated *brush = NULL;
|
||||
|
||||
g_return_if_fail (brush_editor != NULL);
|
||||
|
||||
if (brush_editor->brush == (GimpBrushGenerated *) gbrush)
|
||||
return;
|
||||
g_return_if_fail (GIMP_IS_BRUSH_GENERATED (gbrush));
|
||||
|
||||
if (brush_editor->brush)
|
||||
{
|
||||
|
@ -237,14 +235,6 @@ brush_editor_set_brush (BrushEditor *brush_editor,
|
|||
brush_editor->brush = NULL;
|
||||
}
|
||||
|
||||
if (!gbrush || !GIMP_IS_BRUSH_GENERATED (gbrush))
|
||||
{
|
||||
if (GTK_WIDGET_VISIBLE (brush_editor->shell))
|
||||
gtk_widget_hide (brush_editor->shell);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
brush = GIMP_BRUSH_GENERATED (gbrush);
|
||||
|
||||
g_signal_connect (G_OBJECT (brush), "invalidate_preview",
|
||||
|
@ -269,11 +259,6 @@ brush_editor_set_brush (BrushEditor *brush_editor,
|
|||
g_object_ref (G_OBJECT (brush_editor->brush));
|
||||
|
||||
brush_editor_brush_dirty (GIMP_BRUSH (brush), brush_editor);
|
||||
|
||||
if (! GTK_WIDGET_VISIBLE (brush_editor->shell))
|
||||
gtk_widget_show (brush_editor->shell);
|
||||
else
|
||||
gdk_window_raise (brush_editor->shell->window);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -278,10 +278,10 @@ color_notebook_new (const gchar *title,
|
|||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, TRUE,
|
||||
|
||||
_("OK"), color_notebook_ok_callback,
|
||||
GTK_STOCK_OK, color_notebook_ok_callback,
|
||||
cnp, NULL, NULL, TRUE, FALSE,
|
||||
|
||||
_("Cancel"), color_notebook_cancel_callback,
|
||||
GTK_STOCK_CANCEL, color_notebook_cancel_callback,
|
||||
cnp, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -151,9 +151,9 @@ convert_to_indexed (GimpImage *gimage)
|
|||
GTK_WIN_POS_NONE,
|
||||
FALSE, FALSE, TRUE,
|
||||
|
||||
_("OK"), indexed_ok_callback,
|
||||
GTK_STOCK_OK, indexed_ok_callback,
|
||||
dialog, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), indexed_cancel_callback,
|
||||
GTK_STOCK_CANCEL, indexed_cancel_callback,
|
||||
dialog, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -757,11 +757,8 @@ dialogs_edit_brush_func (GimpData *data)
|
|||
|
||||
if (GIMP_IS_BRUSH_GENERATED (brush))
|
||||
{
|
||||
if (! brush_editor_dialog)
|
||||
{
|
||||
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||
"gimp:brush-editor");
|
||||
}
|
||||
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||
"gimp:brush-editor");
|
||||
|
||||
brush_editor_set_brush (brush_editor_dialog, brush);
|
||||
}
|
||||
|
@ -778,11 +775,8 @@ dialogs_edit_gradient_func (GimpData *data)
|
|||
|
||||
gradient = GIMP_GRADIENT (data);
|
||||
|
||||
if (! gradient_editor_dialog)
|
||||
{
|
||||
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||
"gimp:gradient-editor");
|
||||
}
|
||||
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||
"gimp:gradient-editor");
|
||||
|
||||
gradient_editor_set_gradient (gradient_editor_dialog, gradient);
|
||||
}
|
||||
|
@ -794,11 +788,8 @@ dialogs_edit_palette_func (GimpData *data)
|
|||
|
||||
palette = GIMP_PALETTE (data);
|
||||
|
||||
if (! palette_editor_dialog)
|
||||
{
|
||||
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||
"gimp:palette-editor");
|
||||
}
|
||||
gimp_dialog_factory_dialog_raise (global_dialog_factory,
|
||||
"gimp:palette-editor");
|
||||
|
||||
palette_editor_set_palette (palette_editor_dialog, palette);
|
||||
}
|
||||
|
|
|
@ -233,7 +233,7 @@ file_revert_cmd_callback (GtkWidget *widget,
|
|||
"file/revert.html",
|
||||
FALSE,
|
||||
text,
|
||||
_("Yes"), _("No"),
|
||||
GTK_STOCK_YES, GTK_STOCK_NO,
|
||||
GTK_OBJECT (gdisp->gimage), "destroy",
|
||||
file_revert_confirm_callback,
|
||||
gdisp->gimage);
|
||||
|
|
|
@ -220,7 +220,7 @@ file_new_confirm_dialog (NewImageInfo *info)
|
|||
"dialogs/file_new.html#confirm_size",
|
||||
FALSE,
|
||||
text,
|
||||
_("OK"), _("Cancel"),
|
||||
GTK_STOCK_OK, GTK_STOCK_CANCEL,
|
||||
NULL, NULL,
|
||||
file_new_confirm_dialog_callback,
|
||||
info);
|
||||
|
@ -343,11 +343,11 @@ file_new_dialog_create (GimpImage *gimage)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, TRUE,
|
||||
|
||||
_("OK"), file_new_ok_callback,
|
||||
GTK_STOCK_OK, file_new_ok_callback,
|
||||
info, NULL, NULL, TRUE, FALSE,
|
||||
_("Reset"), file_new_reset_callback,
|
||||
info, NULL, NULL, FALSE, FALSE,
|
||||
_("Cancel"), file_new_cancel_callback,
|
||||
GTK_STOCK_CANCEL, file_new_cancel_callback,
|
||||
info, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -426,7 +426,7 @@ file_overwrite (gchar *filename,
|
|||
"save/file_exists.html",
|
||||
FALSE,
|
||||
overwrite_text,
|
||||
_("Yes"), _("No"),
|
||||
GTK_STOCK_YES, GTK_STOCK_NO,
|
||||
NULL, NULL,
|
||||
file_overwrite_callback,
|
||||
overwrite_data);
|
||||
|
|
|
@ -792,17 +792,9 @@ gradient_editor_set_gradient (GradientEditor *gradient_editor,
|
|||
GimpGradient *gradient)
|
||||
{
|
||||
g_return_if_fail (gradient_editor != NULL);
|
||||
g_return_if_fail (GIMP_IS_GRADIENT (gradient));
|
||||
|
||||
if (gimp_container_have (gradient_editor->context->gimp->gradient_factory->container,
|
||||
GIMP_OBJECT (gradient)))
|
||||
{
|
||||
gimp_context_set_gradient (gradient_editor->context, gradient);
|
||||
}
|
||||
|
||||
if (! GTK_WIDGET_VISIBLE (gradient_editor->shell))
|
||||
gtk_widget_show (gradient_editor->shell);
|
||||
else
|
||||
gdk_window_raise (gradient_editor->shell->window);
|
||||
gimp_context_set_gradient (gradient_editor->context, gradient);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -309,7 +309,7 @@ gui_really_quit_dialog (void)
|
|||
"dialogs/really_quit.html",
|
||||
TRUE,
|
||||
_("Some files unsaved.\n\nQuit the GIMP?"),
|
||||
_("Quit"), _("Cancel"),
|
||||
GTK_STOCK_QUIT, GTK_STOCK_CANCEL,
|
||||
NULL, NULL,
|
||||
gui_really_quit_callback,
|
||||
NULL);
|
||||
|
|
|
@ -331,8 +331,8 @@ image_scale_callback (GtkWidget *widget,
|
|||
_("The chosen image size will shrink\n"
|
||||
"some layers completely away.\n"
|
||||
"Is this what you want?"),
|
||||
_("OK"), _("Cancel"),
|
||||
GTK_OBJECT (image_scale->resize->resize_shell),
|
||||
GTK_STOCK_OK, GTK_STOCK_CANCEL,
|
||||
G_OBJECT (image_scale->resize->resize_shell),
|
||||
"destroy",
|
||||
image_scale_warn_callback,
|
||||
image_scale);
|
||||
|
|
|
@ -587,9 +587,9 @@ layers_new_layer_query (GimpImage *gimage)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), new_layer_query_ok_callback,
|
||||
GTK_STOCK_OK, new_layer_query_ok_callback,
|
||||
options, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), gtk_widget_destroy,
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
@ -770,9 +770,9 @@ layers_edit_layer_query (GimpLayer *layer)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), edit_layer_query_ok_callback,
|
||||
GTK_STOCK_OK, edit_layer_query_ok_callback,
|
||||
options, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), gtk_widget_destroy,
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
@ -875,9 +875,9 @@ layers_add_mask_query (GimpLayer *layer)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), add_mask_query_ok_callback,
|
||||
GTK_STOCK_OK, add_mask_query_ok_callback,
|
||||
options, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), gtk_widget_destroy,
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
@ -1169,9 +1169,9 @@ layers_layer_merge_query (GimpImage *gimage,
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), layer_merge_query_ok_callback,
|
||||
GTK_STOCK_OK, layer_merge_query_ok_callback,
|
||||
options, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), gtk_widget_destroy,
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -87,9 +87,9 @@ offset_dialog_create (GimpDrawable *drawable)
|
|||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), offset_ok_callback,
|
||||
GTK_STOCK_OK, offset_ok_callback,
|
||||
off_d, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), offset_cancel_callback,
|
||||
GTK_STOCK_CANCEL, offset_cancel_callback,
|
||||
off_d, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -222,10 +222,8 @@ void
|
|||
palette_editor_set_palette (PaletteEditor *palette_editor,
|
||||
GimpPalette *palette)
|
||||
{
|
||||
if (! GTK_WIDGET_VISIBLE (palette_editor->shell))
|
||||
gtk_widget_show (palette_editor->shell);
|
||||
else
|
||||
gdk_window_raise (palette_editor->shell->window);
|
||||
g_return_if_fail (palette_editor != NULL);
|
||||
g_return_if_fail (GIMP_IS_PALETTE (palette));
|
||||
|
||||
gimp_context_set_palette (palette_editor->context, palette);
|
||||
}
|
||||
|
|
|
@ -639,7 +639,7 @@ palette_import_dialog_new (void)
|
|||
|
||||
_("Import"), palette_import_import_callback,
|
||||
import_dialog, NULL, NULL, FALSE, FALSE,
|
||||
_("Close"), palette_import_close_callback,
|
||||
GTK_STOCK_CLOSE, palette_import_close_callback,
|
||||
import_dialog, NULL, NULL, TRUE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -391,9 +391,10 @@ prefs_restart_notification (void)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
_("Save"), prefs_restart_notification_save_callback,
|
||||
GTK_STOCK_SAVE,
|
||||
prefs_restart_notification_save_callback,
|
||||
NULL, NULL, NULL, TRUE, FALSE,
|
||||
_("Close"), gtk_widget_destroy,
|
||||
GTK_STOCK_CLOSE, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
@ -1526,12 +1527,12 @@ preferences_dialog_create (void)
|
|||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), prefs_ok_callback,
|
||||
GTK_STOCK_OK, prefs_ok_callback,
|
||||
NULL, NULL, NULL, TRUE, FALSE,
|
||||
GTK_STOCK_SAVE, prefs_save_callback,
|
||||
NULL, NULL, NULL, FALSE, FALSE,
|
||||
_("Save"), prefs_save_callback,
|
||||
NULL, NULL, NULL, FALSE, FALSE,
|
||||
_("Cancel"), prefs_cancel_callback,
|
||||
NULL, NULL, NULL, TRUE, TRUE,
|
||||
GTK_STOCK_CANCEL, prefs_cancel_callback,
|
||||
NULL, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
|
|
|
@ -119,12 +119,12 @@ qmask_buttons_update (GDisplay *gdisp)
|
|||
if (gdisp->gimage->qmask_state != GTK_TOGGLE_BUTTON (gdisp->qmaskon)->active)
|
||||
{
|
||||
/* Disable toggle from doing anything */
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (gdisp->qmaskoff),
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (gdisp->qmaskon),
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_handlers_block_by_func (G_OBJECT (gdisp->qmaskoff),
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_handlers_block_by_func (G_OBJECT (gdisp->qmaskon),
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
|
||||
/* Change the state of the buttons */
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gdisp->qmaskon),
|
||||
|
@ -134,16 +134,16 @@ qmask_buttons_update (GDisplay *gdisp)
|
|||
! gdisp->gimage->qmask_state);
|
||||
|
||||
/* Enable toggle again */
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (gdisp->qmaskoff),
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (gdisp->qmaskon),
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (gdisp->qmaskoff),
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (gdisp->qmaskon),
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gboolean
|
||||
qmask_click_handler (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data)
|
||||
|
@ -156,7 +156,11 @@ qmask_click_handler (GtkWidget *widget,
|
|||
(event->button == 1))
|
||||
{
|
||||
edit_qmask_channel_query (gdisp);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -261,9 +265,9 @@ qmask_activate (GtkWidget *widget,
|
|||
gdisplays_flush ();
|
||||
|
||||
/* connect to the removed signal, so the buttons get updated */
|
||||
gtk_signal_connect (GTK_OBJECT (gmask), "removed",
|
||||
GTK_SIGNAL_FUNC (qmask_removed_callback),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gmask), "removed",
|
||||
G_CALLBACK (qmask_removed_callback),
|
||||
gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,7 +278,6 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
GtkWidget *hbox;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
GtkWidget *opacity_scale;
|
||||
GtkObject *opacity_scale_data;
|
||||
|
||||
|
@ -295,56 +298,56 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), edit_qmask_query_ok_callback,
|
||||
GTK_STOCK_OK, edit_qmask_query_ok_callback,
|
||||
options, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), edit_qmask_query_cancel_callback,
|
||||
GTK_STOCK_CANCEL, edit_qmask_query_cancel_callback,
|
||||
options, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
/* The main hbox */
|
||||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (options->query_box)->vbox),
|
||||
hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
/* The vbox */
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
/* The table */
|
||||
table = gtk_table_new (2, 3, FALSE);
|
||||
table = gtk_table_new (1, 2, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
/* The opacity scale */
|
||||
label = gtk_label_new (_("Mask Opacity:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
opacity_scale_data =
|
||||
gtk_adjustment_new (options->gimage->qmask_color.a * 100.0,
|
||||
0.0, 100.0, 1.0, 1.0, 0.0);
|
||||
opacity_scale = gtk_hscale_new (GTK_ADJUSTMENT (opacity_scale_data));
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), opacity_scale, 1, 2, 1, 2);
|
||||
gtk_widget_set_usize (opacity_scale, 100, -1);
|
||||
gtk_scale_set_value_pos (GTK_SCALE (opacity_scale), GTK_POS_TOP);
|
||||
gtk_signal_connect (GTK_OBJECT (opacity_scale_data), "value_changed",
|
||||
GTK_SIGNAL_FUNC (qmask_query_scale_update),
|
||||
options->color_panel);
|
||||
gtk_widget_show (opacity_scale);
|
||||
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Mask Opacity:"), 1.0, 1.0,
|
||||
opacity_scale, 1, FALSE);
|
||||
|
||||
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
|
||||
G_CALLBACK (qmask_query_scale_update),
|
||||
options->color_panel);
|
||||
|
||||
/* The color panel */
|
||||
gtk_signal_connect (GTK_OBJECT (options->color_panel), "color_changed",
|
||||
GTK_SIGNAL_FUNC (qmask_color_changed),
|
||||
opacity_scale_data);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), options->color_panel,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_widget_show (options->color_panel);
|
||||
|
||||
gtk_widget_show (table);
|
||||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (hbox);
|
||||
g_signal_connect (G_OBJECT (options->color_panel), "color_changed",
|
||||
G_CALLBACK (qmask_color_changed),
|
||||
opacity_scale_data);
|
||||
|
||||
gtk_widget_show (options->query_box);
|
||||
}
|
||||
|
||||
|
|
|
@ -202,13 +202,13 @@ resize_widget_new (ResizeType type,
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, TRUE,
|
||||
|
||||
_("OK"), ok_cb,
|
||||
GTK_STOCK_OK, ok_cb,
|
||||
user_data, NULL, NULL, TRUE, FALSE,
|
||||
|
||||
_("Reset"), reset_callback,
|
||||
resize, NULL, NULL, FALSE, FALSE,
|
||||
|
||||
_("Cancel"), cancel_cb ? cancel_cb : G_CALLBACK (gtk_widget_destroy),
|
||||
GTK_STOCK_CANCEL, cancel_cb ? cancel_cb : G_CALLBACK (gtk_widget_destroy),
|
||||
cancel_cb ? user_data : NULL,
|
||||
cancel_cb ? NULL : (gpointer) 1,
|
||||
NULL, FALSE, TRUE,
|
||||
|
|
|
@ -110,9 +110,9 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
|
|||
GTK_WIN_POS_CENTER,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
_("OK"), resolution_calibrate_ok,
|
||||
GTK_STOCK_OK, resolution_calibrate_ok,
|
||||
NULL, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), gtk_widget_destroy,
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -104,7 +104,7 @@ tool_options_dialog_create (void)
|
|||
_("Reset"), tool_options_dialog_reset_callback,
|
||||
NULL, NULL, &options_reset_button, FALSE, FALSE,
|
||||
|
||||
_("Close"), tool_options_dialog_close_callback,
|
||||
GTK_STOCK_CLOSE, tool_options_dialog_close_callback,
|
||||
NULL, NULL, NULL, TRUE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
111
app/interface.c
111
app/interface.c
|
@ -172,20 +172,21 @@ create_display_shell (GDisplay *gdisp,
|
|||
GDK_BUTTON_PRESS_MASK |
|
||||
GDK_KEY_PRESS_MASK |
|
||||
GDK_KEY_RELEASE_MASK));
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "delete_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_delete),
|
||||
gdisp);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "destroy",
|
||||
GTK_SIGNAL_FUNC (gdisplay_destroy),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (gdisp->shell), "delete_event",
|
||||
G_CALLBACK (gdisplay_delete),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->shell), "destroy",
|
||||
G_CALLBACK (gdisplay_destroy),
|
||||
gdisp);
|
||||
|
||||
/* active display callback */
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_shell_events),
|
||||
gdisp);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->shell), "key_press_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_shell_events),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->shell), "button_press_event",
|
||||
G_CALLBACK (gdisplay_shell_events),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->shell), "key_press_event",
|
||||
G_CALLBACK (gdisplay_shell_events),
|
||||
gdisp);
|
||||
|
||||
/* dnd stuff */
|
||||
gtk_drag_dest_set (gdisp->shell,
|
||||
|
@ -321,9 +322,10 @@ create_display_shell (GDisplay *gdisp,
|
|||
GTK_WIDGET_UNSET_FLAGS (gdisp->origin, GTK_CAN_FOCUS);
|
||||
gtk_widget_set_events (GTK_WIDGET (gdisp->origin),
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->origin), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_origin_button_press),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (gdisp->origin), "button_press_event",
|
||||
G_CALLBACK (gdisplay_origin_button_press),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (gdisp->origin, NULL, "#origin_button");
|
||||
|
||||
|
@ -336,12 +338,13 @@ create_display_shell (GDisplay *gdisp,
|
|||
gdisp->hrule = gtk_hruler_new ();
|
||||
gtk_widget_set_events (GTK_WIDGET (gdisp->hrule),
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
gtk_signal_connect_object (GTK_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
GTK_SIGNAL_FUNC (GTK_WIDGET_GET_CLASS (gdisp->hrule)->motion_notify_event),
|
||||
GTK_OBJECT (gdisp->hrule));
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->hrule), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_hruler_button_press),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect_swapped (G_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
G_CALLBACK (GTK_WIDGET_GET_CLASS (gdisp->hrule)->motion_notify_event),
|
||||
gdisp->hrule);
|
||||
g_signal_connect (G_OBJECT (gdisp->hrule), "button_press_event",
|
||||
G_CALLBACK (gdisplay_hruler_button_press),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (gdisp->hrule, NULL, "#ruler");
|
||||
|
||||
|
@ -349,12 +352,13 @@ create_display_shell (GDisplay *gdisp,
|
|||
gdisp->vrule = gtk_vruler_new ();
|
||||
gtk_widget_set_events (GTK_WIDGET (gdisp->vrule),
|
||||
GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
|
||||
gtk_signal_connect_object (GTK_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
GTK_SIGNAL_FUNC (GTK_WIDGET_GET_CLASS (gdisp->vrule)->motion_notify_event),
|
||||
GTK_OBJECT (gdisp->vrule));
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->vrule), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_vruler_button_press),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect_swapped (G_OBJECT (gdisp->shell), "motion_notify_event",
|
||||
G_CALLBACK (GTK_WIDGET_GET_CLASS (gdisp->vrule)->motion_notify_event),
|
||||
gdisp->vrule);
|
||||
g_signal_connect (G_OBJECT (gdisp->vrule), "button_press_event",
|
||||
G_CALLBACK (gdisplay_vruler_button_press),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (gdisp->vrule, NULL, "#ruler");
|
||||
|
||||
|
@ -368,12 +372,12 @@ create_display_shell (GDisplay *gdisp,
|
|||
gtk_object_set_user_data (GTK_OBJECT (gdisp->canvas), (gpointer) gdisp);
|
||||
|
||||
/* set the active display before doing any other canvas event processing */
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->canvas), "event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_shell_events),
|
||||
gdisp);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->canvas), "event",
|
||||
GTK_SIGNAL_FUNC (gdisplay_canvas_events),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->canvas), "event",
|
||||
G_CALLBACK (gdisplay_shell_events),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->canvas), "event",
|
||||
G_CALLBACK (gdisplay_canvas_events),
|
||||
gdisp);
|
||||
|
||||
/* create the contents of the lower_hbox *********************************/
|
||||
|
||||
|
@ -383,12 +387,13 @@ create_display_shell (GDisplay *gdisp,
|
|||
gtk_widget_set_usize (GTK_WIDGET (gdisp->qmaskoff), 15, 15);
|
||||
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (gdisp->qmaskoff), FALSE);
|
||||
GTK_WIDGET_UNSET_FLAGS (gdisp->qmaskoff, GTK_CAN_FOCUS);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskoff), "toggled",
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskoff), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (qmask_click_handler),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (gdisp->qmaskoff), "toggled",
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->qmaskoff), "button_press_event",
|
||||
G_CALLBACK (qmask_click_handler),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (gdisp->qmaskoff, NULL, "#qmask_off_button");
|
||||
|
||||
|
@ -397,12 +402,13 @@ create_display_shell (GDisplay *gdisp,
|
|||
gtk_widget_set_usize (GTK_WIDGET (gdisp->qmaskon), 15, 15);
|
||||
gtk_toggle_button_set_mode (GTK_TOGGLE_BUTTON (gdisp->qmaskon), FALSE);
|
||||
GTK_WIDGET_UNSET_FLAGS (gdisp->qmaskon, GTK_CAN_FOCUS);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskon), "toggled",
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->qmaskon), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (qmask_click_handler),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (gdisp->qmaskon), "toggled",
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gdisp->qmaskon), "button_press_event",
|
||||
G_CALLBACK (qmask_click_handler),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (gdisp->qmaskon, NULL, "#qmask_on_button");
|
||||
|
||||
|
@ -410,9 +416,10 @@ create_display_shell (GDisplay *gdisp,
|
|||
|
||||
/* the navigation window button */
|
||||
nav_ebox = gtk_event_box_new ();
|
||||
gtk_signal_connect (GTK_OBJECT (nav_ebox), "button_press_event",
|
||||
GTK_SIGNAL_FUNC (nav_popup_click_handler),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (nav_ebox), "button_press_event",
|
||||
G_CALLBACK (nav_popup_click_handler),
|
||||
gdisp);
|
||||
|
||||
gimp_help_set_help_data (nav_ebox, NULL, "#nav_window_button");
|
||||
|
||||
|
@ -452,9 +459,11 @@ create_display_shell (GDisplay *gdisp,
|
|||
gdisp->icon_needs_update = 0;
|
||||
gdisp->icon_timeout_id = 0;
|
||||
gdisp->icon_idle_id = 0;
|
||||
gtk_signal_connect (GTK_OBJECT (gdisp->gimage), "invalidate_preview",
|
||||
GTK_SIGNAL_FUNC (gdisplay_update_icon_scheduler),
|
||||
gdisp);
|
||||
|
||||
g_signal_connect (G_OBJECT (gdisp->gimage), "invalidate_preview",
|
||||
G_CALLBACK (gdisplay_update_icon_scheduler),
|
||||
gdisp);
|
||||
|
||||
gdisplay_update_icon_scheduler (gdisp->gimage, gdisp);
|
||||
|
||||
|
||||
|
|
79
app/qmask.c
79
app/qmask.c
|
@ -119,12 +119,12 @@ qmask_buttons_update (GDisplay *gdisp)
|
|||
if (gdisp->gimage->qmask_state != GTK_TOGGLE_BUTTON (gdisp->qmaskon)->active)
|
||||
{
|
||||
/* Disable toggle from doing anything */
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (gdisp->qmaskoff),
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_handler_block_by_func (GTK_OBJECT (gdisp->qmaskon),
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_handlers_block_by_func (G_OBJECT (gdisp->qmaskoff),
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_handlers_block_by_func (G_OBJECT (gdisp->qmaskon),
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
|
||||
/* Change the state of the buttons */
|
||||
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (gdisp->qmaskon),
|
||||
|
@ -134,16 +134,16 @@ qmask_buttons_update (GDisplay *gdisp)
|
|||
! gdisp->gimage->qmask_state);
|
||||
|
||||
/* Enable toggle again */
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (gdisp->qmaskoff),
|
||||
GTK_SIGNAL_FUNC (qmask_deactivate),
|
||||
gdisp);
|
||||
gtk_signal_handler_unblock_by_func (GTK_OBJECT (gdisp->qmaskon),
|
||||
GTK_SIGNAL_FUNC (qmask_activate),
|
||||
gdisp);
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (gdisp->qmaskoff),
|
||||
G_CALLBACK (qmask_deactivate),
|
||||
gdisp);
|
||||
g_signal_handlers_unblock_by_func (G_OBJECT (gdisp->qmaskon),
|
||||
G_CALLBACK (qmask_activate),
|
||||
gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
void
|
||||
gboolean
|
||||
qmask_click_handler (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data)
|
||||
|
@ -156,7 +156,11 @@ qmask_click_handler (GtkWidget *widget,
|
|||
(event->button == 1))
|
||||
{
|
||||
edit_qmask_channel_query (gdisp);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
void
|
||||
|
@ -261,9 +265,9 @@ qmask_activate (GtkWidget *widget,
|
|||
gdisplays_flush ();
|
||||
|
||||
/* connect to the removed signal, so the buttons get updated */
|
||||
gtk_signal_connect (GTK_OBJECT (gmask), "removed",
|
||||
GTK_SIGNAL_FUNC (qmask_removed_callback),
|
||||
gdisp);
|
||||
g_signal_connect (G_OBJECT (gmask), "removed",
|
||||
G_CALLBACK (qmask_removed_callback),
|
||||
gdisp);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -274,7 +278,6 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
GtkWidget *hbox;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *table;
|
||||
GtkWidget *label;
|
||||
GtkWidget *opacity_scale;
|
||||
GtkObject *opacity_scale_data;
|
||||
|
||||
|
@ -295,56 +298,56 @@ edit_qmask_channel_query (GDisplay * gdisp)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), edit_qmask_query_ok_callback,
|
||||
GTK_STOCK_OK, edit_qmask_query_ok_callback,
|
||||
options, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), edit_qmask_query_cancel_callback,
|
||||
GTK_STOCK_CANCEL, edit_qmask_query_cancel_callback,
|
||||
options, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
||||
/* The main hbox */
|
||||
hbox = gtk_hbox_new (FALSE, 2);
|
||||
hbox = gtk_hbox_new (FALSE, 4);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
|
||||
gtk_container_add (GTK_CONTAINER (GTK_DIALOG (options->query_box)->vbox),
|
||||
hbox);
|
||||
gtk_widget_show (hbox);
|
||||
|
||||
/* The vbox */
|
||||
vbox = gtk_vbox_new (FALSE, 2);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), vbox, TRUE, TRUE, 0);
|
||||
gtk_widget_show (vbox);
|
||||
|
||||
/* The table */
|
||||
table = gtk_table_new (2, 3, FALSE);
|
||||
table = gtk_table_new (1, 2, FALSE);
|
||||
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
|
||||
gtk_box_pack_start (GTK_BOX (vbox), table, FALSE, FALSE, 0);
|
||||
gtk_widget_show (table);
|
||||
|
||||
/* The opacity scale */
|
||||
label = gtk_label_new (_("Mask Opacity:"));
|
||||
gtk_misc_set_alignment (GTK_MISC (label), 1.0, 1.0);
|
||||
gtk_table_attach (GTK_TABLE (table), label, 0, 1, 1, 2,
|
||||
GTK_EXPAND | GTK_FILL, GTK_EXPAND | GTK_FILL, 0, 0);
|
||||
gtk_widget_show (label);
|
||||
|
||||
opacity_scale_data =
|
||||
gtk_adjustment_new (options->gimage->qmask_color.a * 100.0,
|
||||
0.0, 100.0, 1.0, 1.0, 0.0);
|
||||
opacity_scale = gtk_hscale_new (GTK_ADJUSTMENT (opacity_scale_data));
|
||||
gtk_table_attach_defaults (GTK_TABLE (table), opacity_scale, 1, 2, 1, 2);
|
||||
gtk_widget_set_usize (opacity_scale, 100, -1);
|
||||
gtk_scale_set_value_pos (GTK_SCALE (opacity_scale), GTK_POS_TOP);
|
||||
gtk_signal_connect (GTK_OBJECT (opacity_scale_data), "value_changed",
|
||||
GTK_SIGNAL_FUNC (qmask_query_scale_update),
|
||||
options->color_panel);
|
||||
gtk_widget_show (opacity_scale);
|
||||
|
||||
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
|
||||
_("Mask Opacity:"), 1.0, 1.0,
|
||||
opacity_scale, 1, FALSE);
|
||||
|
||||
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
|
||||
G_CALLBACK (qmask_query_scale_update),
|
||||
options->color_panel);
|
||||
|
||||
/* The color panel */
|
||||
gtk_signal_connect (GTK_OBJECT (options->color_panel), "color_changed",
|
||||
GTK_SIGNAL_FUNC (qmask_color_changed),
|
||||
opacity_scale_data);
|
||||
gtk_box_pack_start (GTK_BOX (hbox), options->color_panel,
|
||||
TRUE, TRUE, 0);
|
||||
gtk_widget_show (options->color_panel);
|
||||
|
||||
gtk_widget_show (table);
|
||||
gtk_widget_show (vbox);
|
||||
gtk_widget_show (hbox);
|
||||
g_signal_connect (G_OBJECT (options->color_panel), "color_changed",
|
||||
G_CALLBACK (qmask_color_changed),
|
||||
opacity_scale_data);
|
||||
|
||||
gtk_widget_show (options->query_box);
|
||||
}
|
||||
|
||||
|
|
16
app/qmask.h
16
app/qmask.h
|
@ -20,14 +20,14 @@
|
|||
#define __QMASK_H__
|
||||
|
||||
|
||||
void qmask_click_handler (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data);
|
||||
void qmask_activate (GtkWidget *widget,
|
||||
GDisplay *gdisp);
|
||||
void qmask_deactivate (GtkWidget *widget,
|
||||
GDisplay *gdisp);
|
||||
void qmask_buttons_update (GDisplay *gdisp);
|
||||
gboolean qmask_click_handler (GtkWidget *widget,
|
||||
GdkEventButton *event,
|
||||
gpointer data);
|
||||
void qmask_activate (GtkWidget *widget,
|
||||
GDisplay *gdisp);
|
||||
void qmask_deactivate (GtkWidget *widget,
|
||||
GDisplay *gdisp);
|
||||
void qmask_buttons_update (GDisplay *gdisp);
|
||||
|
||||
|
||||
#endif /* __QMASK_H__ */
|
||||
|
|
|
@ -225,9 +225,7 @@ brush_editor_set_brush (BrushEditor *brush_editor,
|
|||
GimpBrushGenerated *brush = NULL;
|
||||
|
||||
g_return_if_fail (brush_editor != NULL);
|
||||
|
||||
if (brush_editor->brush == (GimpBrushGenerated *) gbrush)
|
||||
return;
|
||||
g_return_if_fail (GIMP_IS_BRUSH_GENERATED (gbrush));
|
||||
|
||||
if (brush_editor->brush)
|
||||
{
|
||||
|
@ -237,14 +235,6 @@ brush_editor_set_brush (BrushEditor *brush_editor,
|
|||
brush_editor->brush = NULL;
|
||||
}
|
||||
|
||||
if (!gbrush || !GIMP_IS_BRUSH_GENERATED (gbrush))
|
||||
{
|
||||
if (GTK_WIDGET_VISIBLE (brush_editor->shell))
|
||||
gtk_widget_hide (brush_editor->shell);
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
brush = GIMP_BRUSH_GENERATED (gbrush);
|
||||
|
||||
g_signal_connect (G_OBJECT (brush), "invalidate_preview",
|
||||
|
@ -269,11 +259,6 @@ brush_editor_set_brush (BrushEditor *brush_editor,
|
|||
g_object_ref (G_OBJECT (brush_editor->brush));
|
||||
|
||||
brush_editor_brush_dirty (GIMP_BRUSH (brush), brush_editor);
|
||||
|
||||
if (! GTK_WIDGET_VISIBLE (brush_editor->shell))
|
||||
gtk_widget_show (brush_editor->shell);
|
||||
else
|
||||
gdk_window_raise (brush_editor->shell->window);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -278,10 +278,10 @@ color_notebook_new (const gchar *title,
|
|||
GTK_WIN_POS_NONE,
|
||||
FALSE, TRUE, TRUE,
|
||||
|
||||
_("OK"), color_notebook_ok_callback,
|
||||
GTK_STOCK_OK, color_notebook_ok_callback,
|
||||
cnp, NULL, NULL, TRUE, FALSE,
|
||||
|
||||
_("Cancel"), color_notebook_cancel_callback,
|
||||
GTK_STOCK_CANCEL, color_notebook_cancel_callback,
|
||||
cnp, NULL, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -792,17 +792,9 @@ gradient_editor_set_gradient (GradientEditor *gradient_editor,
|
|||
GimpGradient *gradient)
|
||||
{
|
||||
g_return_if_fail (gradient_editor != NULL);
|
||||
g_return_if_fail (GIMP_IS_GRADIENT (gradient));
|
||||
|
||||
if (gimp_container_have (gradient_editor->context->gimp->gradient_factory->container,
|
||||
GIMP_OBJECT (gradient)))
|
||||
{
|
||||
gimp_context_set_gradient (gradient_editor->context, gradient);
|
||||
}
|
||||
|
||||
if (! GTK_WIDGET_VISIBLE (gradient_editor->shell))
|
||||
gtk_widget_show (gradient_editor->shell);
|
||||
else
|
||||
gdk_window_raise (gradient_editor->shell->window);
|
||||
gimp_context_set_gradient (gradient_editor->context, gradient);
|
||||
}
|
||||
|
||||
void
|
||||
|
|
|
@ -197,7 +197,7 @@ gimp_help_internal (const gchar *help_path,
|
|||
"It probably was not compiled because\n"
|
||||
"you don't have GtkXmHTML installed."),
|
||||
_("Use Netscape instead"),
|
||||
_("Cancel"),
|
||||
GTK_STOCK_CANCEL,
|
||||
NULL, NULL,
|
||||
gimp_help_internal_not_found_callback,
|
||||
NULL);
|
||||
|
|
|
@ -222,10 +222,8 @@ void
|
|||
palette_editor_set_palette (PaletteEditor *palette_editor,
|
||||
GimpPalette *palette)
|
||||
{
|
||||
if (! GTK_WIDGET_VISIBLE (palette_editor->shell))
|
||||
gtk_widget_show (palette_editor->shell);
|
||||
else
|
||||
gdk_window_raise (palette_editor->shell->window);
|
||||
g_return_if_fail (palette_editor != NULL);
|
||||
g_return_if_fail (GIMP_IS_PALETTE (palette));
|
||||
|
||||
gimp_context_set_palette (palette_editor->context, palette);
|
||||
}
|
||||
|
|
|
@ -104,7 +104,7 @@ tool_options_dialog_create (void)
|
|||
_("Reset"), tool_options_dialog_reset_callback,
|
||||
NULL, NULL, &options_reset_button, FALSE, FALSE,
|
||||
|
||||
_("Close"), tool_options_dialog_close_callback,
|
||||
GTK_STOCK_CLOSE, tool_options_dialog_close_callback,
|
||||
NULL, NULL, NULL, TRUE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
|
@ -123,12 +123,12 @@ gimp_message_box (gchar *message,
|
|||
|
||||
msg_box = g_new0 (MessageBox, 1);
|
||||
|
||||
mbox = gimp_dialog_new (_("GIMP Message"), "gimp_message",
|
||||
mbox = gimp_dialog_new (_("GIMP Message"), "gimp-message",
|
||||
NULL, NULL,
|
||||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, FALSE, FALSE,
|
||||
|
||||
_("OK"), gimp_message_box_close_callback,
|
||||
GTK_STOCK_OK, gimp_message_box_close_callback,
|
||||
msg_box, NULL, NULL, TRUE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
7
gtkrc
7
gtkrc
|
@ -14,9 +14,16 @@
|
|||
style "gimp-global-style"
|
||||
{
|
||||
GtkDialog::content_area_border = 0
|
||||
GtkDialog::button_spacing = 4
|
||||
GtkDialog::action_area_border = 4
|
||||
|
||||
GtkRange::slider_width = 11
|
||||
|
||||
# GtkSpinButton::shadow_type = none
|
||||
|
||||
# when changing the font size, also change GtkRange::slider_width above
|
||||
# so the labels stay nicely aligned with the horizontzal sliders
|
||||
#
|
||||
font_name = "sans 11"
|
||||
}
|
||||
|
||||
|
|
|
@ -91,14 +91,24 @@ gimp_color_button_destroy (GtkObject *object)
|
|||
GimpColorButton *gcb = GIMP_COLOR_BUTTON (object);
|
||||
|
||||
g_return_if_fail (gcb != NULL);
|
||||
|
||||
g_free (gcb->title);
|
||||
|
||||
if (gcb->title)
|
||||
{
|
||||
g_free (gcb->title);
|
||||
gcb->title = NULL;
|
||||
}
|
||||
|
||||
if (gcb->dialog)
|
||||
gtk_widget_destroy (gcb->dialog);
|
||||
{
|
||||
gtk_widget_destroy (gcb->dialog);
|
||||
gcb->dialog = NULL;
|
||||
}
|
||||
|
||||
if (gcb->color_area)
|
||||
gtk_widget_destroy (gcb->color_area);
|
||||
{
|
||||
gtk_widget_destroy (gcb->color_area);
|
||||
gcb->color_area = NULL;
|
||||
}
|
||||
|
||||
if (GTK_OBJECT_CLASS (parent_class)->destroy)
|
||||
GTK_OBJECT_CLASS (parent_class)->destroy (object);
|
||||
|
|
|
@ -39,7 +39,7 @@ typedef void (* GimpDialogCancelCallback) (GtkWidget *widget,
|
|||
|
||||
|
||||
/* local callbacks of gimp_dialog_new () */
|
||||
static gint
|
||||
static gboolean
|
||||
gimp_dialog_delete_callback (GtkWidget *widget,
|
||||
GdkEvent *event,
|
||||
gpointer data)
|
||||
|
@ -48,12 +48,10 @@ gimp_dialog_delete_callback (GtkWidget *widget,
|
|||
GtkWidget *cancel_widget;
|
||||
|
||||
cancel_callback = (GimpDialogCancelCallback)
|
||||
g_object_get_data (G_OBJECT (widget),
|
||||
"gimp_dialog_cancel_callback");
|
||||
g_object_get_data (G_OBJECT (widget), "gimp_dialog_cancel_callback");
|
||||
|
||||
cancel_widget = (GtkWidget *)
|
||||
g_object_get_data (G_OBJECT (widget),
|
||||
"gimp_dialog_cancel_widget");
|
||||
g_object_get_data (G_OBJECT (widget), "gimp_dialog_cancel_widget");
|
||||
|
||||
/* the cancel callback has to destroy the dialog */
|
||||
if (cancel_callback)
|
||||
|
@ -87,19 +85,21 @@ gimp_dialog_realize_callback (GtkWidget *widget,
|
|||
|
||||
/**
|
||||
* gimp_dialog_new:
|
||||
* @title: The dialog's title which will be set with gtk_window_set_title().
|
||||
* @title: The dialog's title which will be set with
|
||||
* gtk_window_set_title().
|
||||
* @wmclass_name: The dialog's @wmclass_name which will be set with
|
||||
* gtk_window_set_wmclass(). The @wmclass_class will be
|
||||
* automatically set to "Gimp".
|
||||
* @help_func: The function which will be called if the user presses "F1".
|
||||
* @help_data: The data pointer which will be passed to @help_func.
|
||||
* @position: The dialog's initial position which will be set with
|
||||
* gtk_window_set_position().
|
||||
* @help_func: The function which will be called if the user presses "F1".
|
||||
* @help_data: The data pointer which will be passed to @help_func.
|
||||
* @position: The dialog's initial position which will be set with
|
||||
* gtk_window_set_position().
|
||||
* @allow_shrink: The dialog's @allow_shrink flag, ...
|
||||
* @allow_grow: ... it't @allow_grow flag and ...
|
||||
* @auto_shrink: ... it's @auto_shrink flag which will all be set with
|
||||
* gtk_window_set_policy().
|
||||
* @...: A #NULL terminated @va_list destribing the action_area buttons.
|
||||
* @allow_grow: ... it't @allow_grow flag and ...
|
||||
* @auto_shrink: ... it's @auto_shrink flag which will all be set with
|
||||
* gtk_window_set_policy().
|
||||
* @...: A #NULL terminated @va_list destribing the
|
||||
* action_area buttons.
|
||||
*
|
||||
* This function simply packs the action_area arguments passed in "..."
|
||||
* into a @va_list variable and passes everything to gimp_dialog_newv().
|
||||
|
@ -108,8 +108,7 @@ gimp_dialog_realize_callback (GtkWidget *widget,
|
|||
* action_area buttons see gimp_dialog_create_action_areav().
|
||||
*
|
||||
* Returns: A #GtkDialog.
|
||||
*
|
||||
*/
|
||||
**/
|
||||
GtkWidget *
|
||||
gimp_dialog_new (const gchar *title,
|
||||
const gchar *wmclass_name,
|
||||
|
@ -122,9 +121,9 @@ gimp_dialog_new (const gchar *title,
|
|||
|
||||
/* specify action area buttons as va_list:
|
||||
* const gchar *label,
|
||||
* GtkSignalFunc callback,
|
||||
* gpointer data,
|
||||
* GtkObject *slot_object,
|
||||
* GCallback callback,
|
||||
* gpointer callback_data,
|
||||
* GObject *slot_object,
|
||||
* GtkWidget **widget_ptr,
|
||||
* gboolean default_action,
|
||||
* gboolean connect_delete,
|
||||
|
@ -154,20 +153,21 @@ gimp_dialog_new (const gchar *title,
|
|||
|
||||
/**
|
||||
* gimp_dialog_newv:
|
||||
* @title: The dialog's title which will be set with gtk_window_set_title().
|
||||
* @title: The dialog's title which will be set with
|
||||
* gtk_window_set_title().
|
||||
* @wmclass_name: The dialog's @wmclass_name which will be set with
|
||||
* gtk_window_set_wmclass(). The @wmclass_class will be
|
||||
* automatically set to "Gimp".
|
||||
* @help_func: The function which will be called if the user presses "F1".
|
||||
* @help_data: The data pointer which will be passed to @help_func.
|
||||
* @position: The dialog's initial position which will be set with
|
||||
* gtk_window_set_position().
|
||||
* @help_func: The function which will be called if the user presses "F1".
|
||||
* @help_data: The data pointer which will be passed to @help_func.
|
||||
* @position: The dialog's initial position which will be set with
|
||||
* gtk_window_set_position().
|
||||
* @allow_shrink: The dialog's @allow_shrink flag, ...
|
||||
* @allow_grow: ... it't @allow_grow flag and ...
|
||||
* @auto_shrink: ... it's @auto_shrink flag which will all be set with
|
||||
* gtk_window_set_policy().
|
||||
* @args: A @va_list as obtained with va_start() describing the action_area
|
||||
* buttons.
|
||||
* @allow_grow: ... it't @allow_grow flag and ...
|
||||
* @auto_shrink: ... it's @auto_shrink flag which will all be set with
|
||||
* gtk_window_set_policy().
|
||||
* @args: A @va_list as obtained with va_start() describing the
|
||||
* action_area buttons.
|
||||
*
|
||||
* This function performs all neccessary setps to set up a standard GIMP
|
||||
* dialog.
|
||||
|
@ -233,15 +233,15 @@ gimp_dialog_set_icon (GtkWindow *dialog)
|
|||
if (GTK_WIDGET_REALIZED (GTK_WIDGET (dialog)))
|
||||
gimp_dialog_realize_callback (GTK_WIDGET (dialog), NULL);
|
||||
else
|
||||
gtk_signal_connect (GTK_OBJECT (dialog), "realize",
|
||||
GTK_SIGNAL_FUNC (gimp_dialog_realize_callback),
|
||||
NULL);
|
||||
g_signal_connect (G_OBJECT (dialog), "realize",
|
||||
G_CALLBACK (gimp_dialog_realize_callback),
|
||||
NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_dialog_create_action_area:
|
||||
* @dialog: The #GtkDialog you want to create the action_area for.
|
||||
* @...: A #NULL terminated @va_list destribing the action_area buttons.
|
||||
* @...: A #NULL terminated @va_list destribing the action_area buttons.
|
||||
*
|
||||
* This function simply packs the action_area arguments passed in "..."
|
||||
* into a @va_list variable and passes everything to
|
||||
|
@ -253,9 +253,9 @@ gimp_dialog_create_action_area (GtkDialog *dialog,
|
|||
|
||||
/* specify action area buttons as va_list:
|
||||
* const gchar *label,
|
||||
* GtkSignalFunc callback,
|
||||
* gpointer data,
|
||||
* GtkObject *slot_object,
|
||||
* GCallback callback,
|
||||
* gpointer callback_data,
|
||||
* GObject *slot_object,
|
||||
* GtkWidget **widget_ptr,
|
||||
* gboolean default_action,
|
||||
* gboolean connect_delete,
|
||||
|
@ -289,17 +289,16 @@ void
|
|||
gimp_dialog_create_action_areav (GtkDialog *dialog,
|
||||
va_list args)
|
||||
{
|
||||
GtkWidget *hbbox = NULL;
|
||||
GtkWidget *button;
|
||||
GtkWidget *button;
|
||||
|
||||
/* action area variables */
|
||||
const gchar *label;
|
||||
GtkSignalFunc callback;
|
||||
gpointer data;
|
||||
GtkObject *slot_object;
|
||||
GtkWidget **widget_ptr;
|
||||
gboolean default_action;
|
||||
gboolean connect_delete;
|
||||
const gchar *label;
|
||||
GCallback callback;
|
||||
gpointer callback_data;
|
||||
GObject *slot_object;
|
||||
GtkWidget **widget_ptr;
|
||||
gboolean default_action;
|
||||
gboolean connect_delete;
|
||||
|
||||
gboolean delete_connected = FALSE;
|
||||
|
||||
|
@ -311,18 +310,18 @@ gimp_dialog_create_action_areav (GtkDialog *dialog,
|
|||
/* the action_area buttons */
|
||||
while (label)
|
||||
{
|
||||
callback = va_arg (args, GtkSignalFunc);
|
||||
data = va_arg (args, gpointer);
|
||||
slot_object = va_arg (args, GtkObject *);
|
||||
callback = va_arg (args, GCallback);
|
||||
callback_data = va_arg (args, gpointer);
|
||||
slot_object = va_arg (args, GObject *);
|
||||
widget_ptr = va_arg (args, GtkWidget **);
|
||||
default_action = va_arg (args, gboolean);
|
||||
connect_delete = va_arg (args, gboolean);
|
||||
|
||||
if (slot_object == (GtkObject *) 1)
|
||||
slot_object = GTK_OBJECT (dialog);
|
||||
if (slot_object == (GObject *) 1)
|
||||
slot_object = G_OBJECT (dialog);
|
||||
|
||||
if (data == NULL)
|
||||
data = dialog;
|
||||
if (callback_data == NULL)
|
||||
callback_data = dialog;
|
||||
|
||||
/*
|
||||
* Dont create a button if the label is "_delete_event_" --
|
||||
|
@ -331,23 +330,21 @@ gimp_dialog_create_action_areav (GtkDialog *dialog,
|
|||
*/
|
||||
if (connect_delete &&
|
||||
callback &&
|
||||
!delete_connected &&
|
||||
! delete_connected &&
|
||||
strcmp (label, "_delete_event_") == 0)
|
||||
{
|
||||
if (widget_ptr)
|
||||
*widget_ptr = GTK_WIDGET (dialog);
|
||||
|
||||
gtk_object_set_data (GTK_OBJECT (dialog),
|
||||
"gimp_dialog_cancel_callback",
|
||||
callback);
|
||||
gtk_object_set_data (GTK_OBJECT (dialog),
|
||||
"gimp_dialog_cancel_widget",
|
||||
slot_object ? slot_object : GTK_OBJECT (dialog));
|
||||
g_object_set_data (G_OBJECT (dialog), "gimp_dialog_cancel_callback",
|
||||
callback);
|
||||
g_object_set_data (G_OBJECT (dialog), "gimp_dialog_cancel_widget",
|
||||
slot_object ? slot_object : G_OBJECT (dialog));
|
||||
|
||||
/* catch the WM delete event */
|
||||
gtk_signal_connect (GTK_OBJECT (dialog), "delete_event",
|
||||
GTK_SIGNAL_FUNC (gimp_dialog_delete_callback),
|
||||
data);
|
||||
g_signal_connect (G_OBJECT (dialog), "delete_event",
|
||||
G_CALLBACK (gimp_dialog_delete_callback),
|
||||
callback_data);
|
||||
|
||||
delete_connected = TRUE;
|
||||
}
|
||||
|
@ -355,57 +352,44 @@ gimp_dialog_create_action_areav (GtkDialog *dialog,
|
|||
/* otherwise just create the requested button. */
|
||||
else
|
||||
{
|
||||
if (! hbbox)
|
||||
{
|
||||
gtk_box_set_homogeneous (GTK_BOX (dialog->action_area), FALSE);
|
||||
|
||||
hbbox = gtk_hbutton_box_new ();
|
||||
gtk_button_box_set_spacing (GTK_BUTTON_BOX (hbbox), 4);
|
||||
gtk_box_pack_end (GTK_BOX (dialog->action_area), hbbox,
|
||||
FALSE, FALSE, 0);
|
||||
gtk_widget_show (hbbox);
|
||||
}
|
||||
|
||||
button = gtk_button_new_with_label (label);
|
||||
GTK_WIDGET_SET_FLAGS (button, GTK_CAN_DEFAULT);
|
||||
gtk_box_pack_start (GTK_BOX (hbbox), button, FALSE, FALSE, 0);
|
||||
button = gtk_dialog_add_button (dialog, label, GTK_RESPONSE_NONE);
|
||||
|
||||
if (callback)
|
||||
{
|
||||
if (slot_object)
|
||||
gtk_signal_connect_object (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (callback),
|
||||
slot_object);
|
||||
g_signal_connect_swapped (G_OBJECT (button), "clicked",
|
||||
G_CALLBACK (callback),
|
||||
slot_object);
|
||||
else
|
||||
gtk_signal_connect (GTK_OBJECT (button), "clicked",
|
||||
GTK_SIGNAL_FUNC (callback),
|
||||
data);
|
||||
g_signal_connect (G_OBJECT (button), "clicked",
|
||||
G_CALLBACK (callback),
|
||||
callback_data);
|
||||
}
|
||||
|
||||
if (widget_ptr)
|
||||
*widget_ptr = button;
|
||||
|
||||
if (connect_delete && callback && !delete_connected)
|
||||
if (connect_delete && callback && ! delete_connected)
|
||||
{
|
||||
gtk_object_set_data (GTK_OBJECT (dialog),
|
||||
"gimp_dialog_cancel_callback",
|
||||
callback);
|
||||
gtk_object_set_data (GTK_OBJECT (dialog),
|
||||
"gimp_dialog_cancel_widget",
|
||||
slot_object ? slot_object : GTK_OBJECT (button));
|
||||
g_object_set_data (G_OBJECT (dialog),
|
||||
"gimp_dialog_cancel_callback",
|
||||
callback);
|
||||
g_object_set_data (G_OBJECT (dialog),
|
||||
"gimp_dialog_cancel_widget",
|
||||
slot_object ? slot_object : G_OBJECT (button));
|
||||
|
||||
/* catch the WM delete event */
|
||||
gtk_signal_connect (GTK_OBJECT (dialog), "delete_event",
|
||||
GTK_SIGNAL_FUNC (gimp_dialog_delete_callback),
|
||||
data);
|
||||
g_signal_connect (G_OBJECT (dialog), "delete_event",
|
||||
G_CALLBACK (gimp_dialog_delete_callback),
|
||||
callback_data);
|
||||
|
||||
delete_connected = TRUE;
|
||||
}
|
||||
|
||||
if (default_action)
|
||||
gtk_widget_grab_default (button);
|
||||
gtk_widget_show (button);
|
||||
}
|
||||
|
||||
label = va_arg (args, gchar *);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,9 +42,9 @@ GtkWidget * gimp_dialog_new (const gchar *title,
|
|||
/* specify action area buttons
|
||||
* as va_list:
|
||||
* const gchar *label,
|
||||
* GtkSignalFunc callback,
|
||||
* gpointer data,
|
||||
* GtkObject *slot_object,
|
||||
* GCallback callback,
|
||||
* gpointer callback_data,
|
||||
* GObject *slot_object,
|
||||
* GtkWidget **widget_ptr,
|
||||
* gboolean default_action,
|
||||
* gboolean connect_delete,
|
||||
|
@ -69,9 +69,9 @@ void gimp_dialog_create_action_area (GtkDialog *dialog,
|
|||
/* specify action area buttons
|
||||
* as va_list:
|
||||
* const gchar *label,
|
||||
* GtkSignalFunc callback,
|
||||
* gpointer data,
|
||||
* GtkObject *slot_object,
|
||||
* GCallback callback,
|
||||
* gpointer callback_data,
|
||||
* GObject *slot_object,
|
||||
* GtkWidget **widget_ptr,
|
||||
* gboolean default_action,
|
||||
* gboolean connect_delete,
|
||||
|
|
|
@ -50,9 +50,9 @@ struct _QueryBox
|
|||
GtkWidget *qbox;
|
||||
GtkWidget *vbox;
|
||||
GtkWidget *entry;
|
||||
GtkObject *object;
|
||||
GObject *object;
|
||||
GCallback callback;
|
||||
gpointer data;
|
||||
gpointer callback_data;
|
||||
};
|
||||
|
||||
|
||||
|
@ -64,10 +64,10 @@ static QueryBox * create_query_box (const gchar *title,
|
|||
const gchar *message,
|
||||
const gchar *ok_button,
|
||||
const gchar *cancel_button,
|
||||
GtkObject *object,
|
||||
GObject *object,
|
||||
const gchar *signal,
|
||||
GCallback callback,
|
||||
gpointer data);
|
||||
gpointer callback_data);
|
||||
|
||||
static QueryBox * query_box_disconnect (gpointer data);
|
||||
|
||||
|
@ -101,10 +101,10 @@ create_query_box (const gchar *title,
|
|||
const gchar *message,
|
||||
const gchar *ok_button,
|
||||
const gchar *cancel_button,
|
||||
GtkObject *object,
|
||||
GObject *object,
|
||||
const gchar *signal,
|
||||
GCallback callback,
|
||||
gpointer data)
|
||||
gpointer callback_data)
|
||||
{
|
||||
QueryBox *query_box;
|
||||
GtkWidget *qbox;
|
||||
|
@ -113,7 +113,7 @@ create_query_box (const gchar *title,
|
|||
|
||||
/* make sure the object / signal passed are valid
|
||||
*/
|
||||
g_return_val_if_fail (object == NULL || GTK_IS_OBJECT (object), NULL);
|
||||
g_return_val_if_fail (object == NULL || G_IS_OBJECT (object), NULL);
|
||||
g_return_val_if_fail (object == NULL || signal != NULL, NULL);
|
||||
|
||||
query_box = g_new (QueryBox, 1);
|
||||
|
@ -130,21 +130,21 @@ create_query_box (const gchar *title,
|
|||
|
||||
NULL);
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (qbox), "destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroyed),
|
||||
&query_box->qbox);
|
||||
g_signal_connect (G_OBJECT (qbox), "destroy",
|
||||
G_CALLBACK (gtk_widget_destroyed),
|
||||
&query_box->qbox);
|
||||
|
||||
/* if we are associated with an object, connect to the provided signal
|
||||
*/
|
||||
if (object)
|
||||
{
|
||||
gtk_signal_connect (GTK_OBJECT (object), "destroy",
|
||||
GTK_SIGNAL_FUNC (gtk_widget_destroyed),
|
||||
&query_box->object);
|
||||
GClosure *closure;
|
||||
|
||||
gtk_signal_connect (GTK_OBJECT (object), signal,
|
||||
GTK_SIGNAL_FUNC (query_box_cancel_callback),
|
||||
query_box);
|
||||
closure = g_cclosure_new (G_CALLBACK (query_box_cancel_callback),
|
||||
query_box, NULL);
|
||||
g_object_watch_closure (G_OBJECT (query_box->qbox), closure);
|
||||
|
||||
g_signal_connect_closure (G_OBJECT (object), signal, closure, FALSE);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -163,27 +163,27 @@ create_query_box (const gchar *title,
|
|||
gtk_widget_show (label);
|
||||
}
|
||||
|
||||
query_box->qbox = qbox;
|
||||
query_box->vbox = vbox;
|
||||
query_box->entry = NULL;
|
||||
query_box->object = object;
|
||||
query_box->callback = callback;
|
||||
query_box->data = data;
|
||||
query_box->qbox = qbox;
|
||||
query_box->vbox = vbox;
|
||||
query_box->entry = NULL;
|
||||
query_box->object = object;
|
||||
query_box->callback = callback;
|
||||
query_box->callback_data = callback_data;
|
||||
|
||||
return query_box;
|
||||
}
|
||||
|
||||
/**
|
||||
* gimp_query_string_box:
|
||||
* @title: The query box dialog's title.
|
||||
* @title: The query box dialog's title.
|
||||
* @help_func: The help function to show this dialog's help page.
|
||||
* @help_data: A string pointing to this dialog's html help page.
|
||||
* @message: A string which will be shown above the dialog's entry widget.
|
||||
* @initial: The initial value.
|
||||
* @object: The object this query box is associated with.
|
||||
* @signal: The object's signal which will cause the query box to be closed.
|
||||
* @callback: The function which will be called when the user selects "OK".
|
||||
* @data: The callback's user data.
|
||||
* @message: A string which will be shown above the dialog's entry widget.
|
||||
* @initial: The initial value.
|
||||
* @object: The object this query box is associated with.
|
||||
* @signal: The object's signal which will cause the query box to be closed.
|
||||
* @callback: The function which will be called when the user selects "OK".
|
||||
* @data: The callback's user data.
|
||||
*
|
||||
* Returns: A pointer to the new #GtkDialog.
|
||||
**/
|
||||
|
@ -193,7 +193,7 @@ gimp_query_string_box (const gchar *title,
|
|||
const gchar *help_data,
|
||||
const gchar *message,
|
||||
const gchar *initial,
|
||||
GtkObject *object,
|
||||
GObject *object,
|
||||
const gchar *signal,
|
||||
GimpQueryStringCallback callback,
|
||||
gpointer data)
|
||||
|
@ -205,7 +205,7 @@ gimp_query_string_box (const gchar *title,
|
|||
G_CALLBACK (string_query_box_ok_callback),
|
||||
G_CALLBACK (query_box_cancel_callback),
|
||||
message,
|
||||
_("OK"), _("Cancel"),
|
||||
GTK_STOCK_OK, GTK_STOCK_CANCEL,
|
||||
object, signal,
|
||||
G_CALLBACK (callback), data);
|
||||
|
||||
|
@ -226,17 +226,17 @@ gimp_query_string_box (const gchar *title,
|
|||
|
||||
/**
|
||||
* gimp_query_int_box:
|
||||
* @title: The query box dialog's title.
|
||||
* @title: The query box dialog's title.
|
||||
* @help_func: The help function to show this dialog's help page.
|
||||
* @help_data: A string pointing to this dialog's html help page.
|
||||
* @message: A string which will be shown above the dialog's entry widget.
|
||||
* @initial: The initial value.
|
||||
* @lower: The lower boundary of the range of possible values.
|
||||
* @upper: The upper boundray of the range of possible values.
|
||||
* @object: The object this query box is associated with.
|
||||
* @signal: The object's signal which will cause the query box to be closed.
|
||||
* @callback: The function which will be called when the user selects "OK".
|
||||
* @data: The callback's user data.
|
||||
* @message: A string which will be shown above the dialog's entry widget.
|
||||
* @initial: The initial value.
|
||||
* @lower: The lower boundary of the range of possible values.
|
||||
* @upper: The upper boundray of the range of possible values.
|
||||
* @object: The object this query box is associated with.
|
||||
* @signal: The object's signal which will cause the query box to be closed.
|
||||
* @callback: The function which will be called when the user selects "OK".
|
||||
* @data: The callback's user data.
|
||||
*
|
||||
* Returns: A pointer to the new #GtkDialog.
|
||||
**/
|
||||
|
@ -248,7 +248,7 @@ gimp_query_int_box (const gchar *title,
|
|||
gint initial,
|
||||
gint lower,
|
||||
gint upper,
|
||||
GtkObject *object,
|
||||
GObject *object,
|
||||
const gchar *signal,
|
||||
GimpQueryIntCallback callback,
|
||||
gpointer data)
|
||||
|
@ -261,7 +261,7 @@ gimp_query_int_box (const gchar *title,
|
|||
G_CALLBACK (int_query_box_ok_callback),
|
||||
G_CALLBACK (query_box_cancel_callback),
|
||||
message,
|
||||
_("OK"), _("Cancel"),
|
||||
GTK_STOCK_OK, GTK_STOCK_CANCEL,
|
||||
object, signal,
|
||||
G_CALLBACK (callback), data);
|
||||
|
||||
|
@ -282,18 +282,18 @@ gimp_query_int_box (const gchar *title,
|
|||
|
||||
/**
|
||||
* gimp_query_double_box:
|
||||
* @title: The query box dialog's title.
|
||||
* @title: The query box dialog's title.
|
||||
* @help_func: The help function to show this dialog's help page.
|
||||
* @help_data: A string pointing to this dialog's html help page.
|
||||
* @message: A string which will be shown above the dialog's entry widget.
|
||||
* @initial: The initial value.
|
||||
* @lower: The lower boundary of the range of possible values.
|
||||
* @upper: The upper boundray of the range of possible values.
|
||||
* @digits: The number of decimal digits the #GtkSpinButton will provide.
|
||||
* @object: The object this query box is associated with.
|
||||
* @signal: The object's signal which will cause the query box to be closed.
|
||||
* @callback: The function which will be called when the user selects "OK".
|
||||
* @data: The callback's user data.
|
||||
* @message: A string which will be shown above the dialog's entry widget.
|
||||
* @initial: The initial value.
|
||||
* @lower: The lower boundary of the range of possible values.
|
||||
* @upper: The upper boundray of the range of possible values.
|
||||
* @digits: The number of decimal digits the #GtkSpinButton will provide.
|
||||
* @object: The object this query box is associated with.
|
||||
* @signal: The object's signal which will cause the query box to be closed.
|
||||
* @callback: The function which will be called when the user selects "OK".
|
||||
* @data: The callback's user data.
|
||||
*
|
||||
* Returns: A pointer to the new #GtkDialog.
|
||||
**/
|
||||
|
@ -306,7 +306,7 @@ gimp_query_double_box (const gchar *title,
|
|||
gdouble lower,
|
||||
gdouble upper,
|
||||
gint digits,
|
||||
GtkObject *object,
|
||||
GObject *object,
|
||||
const gchar *signal,
|
||||
GimpQueryDoubleCallback callback,
|
||||
gpointer data)
|
||||
|
@ -319,7 +319,7 @@ gimp_query_double_box (const gchar *title,
|
|||
G_CALLBACK (double_query_box_ok_callback),
|
||||
G_CALLBACK (query_box_cancel_callback),
|
||||
message,
|
||||
_("OK"), _("Cancel"),
|
||||
GTK_STOCK_OK, GTK_STOCK_CANCEL,
|
||||
object, signal,
|
||||
G_CALLBACK (callback), data);
|
||||
|
||||
|
@ -340,23 +340,24 @@ gimp_query_double_box (const gchar *title,
|
|||
|
||||
/**
|
||||
* gimp_query_size_box:
|
||||
* @title: The query box dialog's title.
|
||||
* @help_func: The help function to show this dialog's help page.
|
||||
* @help_data: A string pointing to this dialog's html help page.
|
||||
* @message: A string which will be shown above the dialog's entry widget.
|
||||
* @initial: The initial value.
|
||||
* @lower: The lower boundary of the range of possible values.
|
||||
* @upper: The upper boundray of the range of possible values.
|
||||
* @digits: The number of decimal digits the #GimpSizeEntry provide in
|
||||
* "pixel" mode.
|
||||
* @unit: The unit initially shown by the #GimpUnitMenu.
|
||||
* @resolution: The resolution (in dpi) which will be used for pixel/unit
|
||||
* calculations.
|
||||
* @title: The query box dialog's title.
|
||||
* @help_func: The help function to show this dialog's help page.
|
||||
* @help_data: A string pointing to this dialog's html help page.
|
||||
* @message: A string which will be shown above the dialog's entry widget.
|
||||
* @initial: The initial value.
|
||||
* @lower: The lower boundary of the range of possible values.
|
||||
* @upper: The upper boundray of the range of possible values.
|
||||
* @digits: The number of decimal digits the #GimpSizeEntry provide in
|
||||
* "pixel" mode.
|
||||
* @unit: The unit initially shown by the #GimpUnitMenu.
|
||||
* @resolution: The resolution (in dpi) which will be used for pixel/unit
|
||||
* calculations.
|
||||
* @dot_for_dot: #TRUE if the #GimpUnitMenu's initial unit should be "pixels".
|
||||
* @object: The object this query box is associated with.
|
||||
* @signal: The object's signal which will cause the query box to be closed.
|
||||
* @callback: The function which will be called when the user selects "OK".
|
||||
* @data: The callback's user data.
|
||||
* @object: The object this query box is associated with.
|
||||
* @signal: The object's signal which will cause the query box
|
||||
* to be closed.
|
||||
* @callback: The function which will be called when the user selects "OK".
|
||||
* @data: The callback's user data.
|
||||
*
|
||||
* Returns: A pointer to the new #GtkDialog.
|
||||
**/
|
||||
|
@ -372,7 +373,7 @@ gimp_query_size_box (const gchar *title,
|
|||
GimpUnit unit,
|
||||
gdouble resolution,
|
||||
gboolean dot_for_dot,
|
||||
GtkObject *object,
|
||||
GObject *object,
|
||||
const gchar *signal,
|
||||
GimpQuerySizeCallback callback,
|
||||
gpointer data)
|
||||
|
@ -384,7 +385,7 @@ gimp_query_size_box (const gchar *title,
|
|||
G_CALLBACK (size_query_box_ok_callback),
|
||||
G_CALLBACK (query_box_cancel_callback),
|
||||
message,
|
||||
_("OK"), _("Cancel"),
|
||||
GTK_STOCK_OK, GTK_STOCK_CANCEL,
|
||||
object, signal,
|
||||
G_CALLBACK (callback), data);
|
||||
|
||||
|
@ -413,19 +414,20 @@ gimp_query_size_box (const gchar *title,
|
|||
|
||||
/**
|
||||
* gimp_query_boolean_box:
|
||||
* @title: The query box dialog's title.
|
||||
* @help_func: The help function to show this dialog's help page.
|
||||
* @help_data: A string pointing to this dialog's html help page.
|
||||
* @eek: #TRUE if you want the "Eek" wilber to appear left of the dialog's
|
||||
* message.
|
||||
* @message: A string which will be shown in the query box.
|
||||
* @true_button: The string to be shown in the dialog's left button.
|
||||
* @title: The query box dialog's title.
|
||||
* @help_func: The help function to show this dialog's help page.
|
||||
* @help_data: A string pointing to this dialog's html help page.
|
||||
* @eek: #TRUE if you want the "Eek" wilber to appear left of
|
||||
* the dialog's message.
|
||||
* @message: A string which will be shown in the query box.
|
||||
* @true_button: The string to be shown in the dialog's left button.
|
||||
* @false_button: The string to be shown in the dialog's right button.
|
||||
* @object: The object this query box is associated with.
|
||||
* @signal: The object's signal which will cause the query box to be closed.
|
||||
* @callback: The function which will be called when the user clicks one
|
||||
* of the buttons.
|
||||
* @data: The callback's user data.
|
||||
* @object: The object this query box is associated with.
|
||||
* @signal: The object's signal which will cause the query box
|
||||
* to be closed.
|
||||
* @callback: The function which will be called when the user clicks one
|
||||
* of the buttons.
|
||||
* @data: The callback's user data.
|
||||
*
|
||||
* Returns: A pointer to the new #GtkDialog.
|
||||
**/
|
||||
|
@ -437,7 +439,7 @@ gimp_query_boolean_box (const gchar *title,
|
|||
const gchar *message,
|
||||
const gchar *true_button,
|
||||
const gchar *false_button,
|
||||
GtkObject *object,
|
||||
GObject *object,
|
||||
const gchar *signal,
|
||||
GimpQueryBooleanCallback callback,
|
||||
gpointer data)
|
||||
|
@ -493,7 +495,11 @@ query_box_disconnect (gpointer data)
|
|||
|
||||
/* disconnect, if we are connected to some signal */
|
||||
if (query_box->object)
|
||||
gtk_signal_disconnect_by_data (query_box->object, query_box);
|
||||
{
|
||||
g_signal_handlers_disconnect_by_func (query_box->object,
|
||||
query_box_cancel_callback,
|
||||
query_box);
|
||||
}
|
||||
|
||||
return query_box;
|
||||
}
|
||||
|
@ -513,7 +519,7 @@ string_query_box_ok_callback (GtkWidget *widget,
|
|||
/* Call the user defined callback */
|
||||
(* (GimpQueryStringCallback) query_box->callback) (query_box->qbox,
|
||||
string,
|
||||
query_box->data);
|
||||
query_box->callback_data);
|
||||
|
||||
/* Destroy the box */
|
||||
if (query_box->qbox)
|
||||
|
@ -532,13 +538,12 @@ int_query_box_ok_callback (GtkWidget *widget,
|
|||
query_box = query_box_disconnect (data);
|
||||
|
||||
/* Get the spinbutton data */
|
||||
value =
|
||||
gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (query_box->entry));
|
||||
value = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (query_box->entry));
|
||||
|
||||
/* Call the user defined callback */
|
||||
(* (GimpQueryIntCallback) query_box->callback) (query_box->qbox,
|
||||
value,
|
||||
query_box->data);
|
||||
query_box->callback_data);
|
||||
|
||||
/* Destroy the box */
|
||||
if (query_box->qbox)
|
||||
|
@ -563,7 +568,7 @@ double_query_box_ok_callback (GtkWidget *widget,
|
|||
/* Call the user defined callback */
|
||||
(* (GimpQueryDoubleCallback) query_box->callback) (query_box->qbox,
|
||||
value,
|
||||
query_box->data);
|
||||
query_box->callback_data);
|
||||
|
||||
/* Destroy the box */
|
||||
if (query_box->qbox)
|
||||
|
@ -590,7 +595,7 @@ size_query_box_ok_callback (GtkWidget *widget,
|
|||
(* (GimpQuerySizeCallback) query_box->callback) (query_box->qbox,
|
||||
size,
|
||||
unit,
|
||||
query_box->data);
|
||||
query_box->callback_data);
|
||||
|
||||
/* Destroy the box */
|
||||
if (query_box->qbox)
|
||||
|
@ -610,7 +615,7 @@ boolean_query_box_true_callback (GtkWidget *widget,
|
|||
/* Call the user defined callback */
|
||||
(* (GimpQueryBooleanCallback) query_box->callback) (query_box->qbox,
|
||||
TRUE,
|
||||
query_box->data);
|
||||
query_box->callback_data);
|
||||
|
||||
/* Destroy the box */
|
||||
if (query_box->qbox)
|
||||
|
@ -630,7 +635,7 @@ boolean_query_box_false_callback (GtkWidget *widget,
|
|||
/* Call the user defined callback */
|
||||
(* (GimpQueryBooleanCallback) query_box->callback) (query_box->qbox,
|
||||
FALSE,
|
||||
query_box->data);
|
||||
query_box->callback_data);
|
||||
|
||||
/* Destroy the box */
|
||||
if (query_box->qbox)
|
||||
|
|
|
@ -59,7 +59,7 @@ GtkWidget * gimp_query_string_box (const gchar *title,
|
|||
const gchar *help_data,
|
||||
const gchar *message,
|
||||
const gchar *initial,
|
||||
GtkObject *object,
|
||||
GObject *object,
|
||||
const gchar *signal,
|
||||
GimpQueryStringCallback callback,
|
||||
gpointer data);
|
||||
|
@ -71,7 +71,7 @@ GtkWidget * gimp_query_int_box (const gchar *title,
|
|||
gint initial,
|
||||
gint lower,
|
||||
gint upper,
|
||||
GtkObject *object,
|
||||
GObject *object,
|
||||
const gchar *signal,
|
||||
GimpQueryIntCallback callback,
|
||||
gpointer data);
|
||||
|
@ -84,7 +84,7 @@ GtkWidget * gimp_query_double_box (const gchar *title,
|
|||
gdouble lower,
|
||||
gdouble upper,
|
||||
gint digits,
|
||||
GtkObject *object,
|
||||
GObject *object,
|
||||
const gchar *signal,
|
||||
GimpQueryDoubleCallback callback,
|
||||
gpointer data);
|
||||
|
@ -100,7 +100,7 @@ GtkWidget * gimp_query_size_box (const gchar *title,
|
|||
GimpUnit unit,
|
||||
gdouble resolution,
|
||||
gboolean dot_for_dot,
|
||||
GtkObject *object,
|
||||
GObject *object,
|
||||
const gchar *signal,
|
||||
GimpQuerySizeCallback callback,
|
||||
gpointer data);
|
||||
|
@ -112,7 +112,7 @@ GtkWidget * gimp_query_boolean_box (const gchar *title,
|
|||
const gchar *message,
|
||||
const gchar *true_button,
|
||||
const gchar *false_button,
|
||||
GtkObject *object,
|
||||
GObject *object,
|
||||
const gchar *signal,
|
||||
GimpQueryBooleanCallback callback,
|
||||
gpointer data);
|
||||
|
|
|
@ -513,9 +513,9 @@ gimp_unit_menu_create_selection (GimpUnitMenu *gum)
|
|||
GTK_WIN_POS_MOUSE,
|
||||
FALSE, TRUE, FALSE,
|
||||
|
||||
_("OK"), gimp_unit_menu_selection_ok_callback,
|
||||
GTK_STOCK_OK, gimp_unit_menu_selection_ok_callback,
|
||||
gum, NULL, NULL, TRUE, FALSE,
|
||||
_("Cancel"), gtk_widget_destroy,
|
||||
GTK_STOCK_CANCEL, gtk_widget_destroy,
|
||||
NULL, 1, NULL, FALSE, TRUE,
|
||||
|
||||
NULL);
|
||||
|
|
Loading…
Reference in New Issue