app/gui/brush-select.c app/gui/channels-commands.c app/gui/info-window.c

2001-07-25  Michael Natterer  <mitch@gimp.org>

	* app/gui/brush-select.c
	* app/gui/channels-commands.c
	* app/gui/info-window.c
	* app/gui/layers-commands.c
	* app/gui/offset-dialog.c
	* app/gui/palette-import-dialog.c
	* app/gui/paths-dialog.c
	* app/gui/preferences-dialog.c: use GObject functions, stuff.
This commit is contained in:
Michael Natterer 2001-07-25 00:42:47 +00:00 committed by Michael Natterer
parent f5cfbd50da
commit a5dccb8d6b
15 changed files with 838 additions and 691 deletions

View File

@ -1,3 +1,14 @@
2001-07-25 Michael Natterer <mitch@gimp.org>
* app/gui/brush-select.c
* app/gui/channels-commands.c
* app/gui/info-window.c
* app/gui/layers-commands.c
* app/gui/offset-dialog.c
* app/gui/palette-import-dialog.c
* app/gui/paths-dialog.c
* app/gui/preferences-dialog.c: use GObject functions, stuff.
2001-07-25 Sven Neumann <sven@gimp.org>
* app/nav_window.c

View File

@ -176,7 +176,7 @@ channels_add_channel_to_sel_cmd_callback (GtkWidget *widget,
CHANNEL_OP_ADD,
0, 0); /* off x/y */
gimage_mask_load (gimage, new_channel);
gtk_object_unref (GTK_OBJECT (new_channel));
g_object_unref (G_OBJECT (new_channel));
gdisplays_flush ();
}
}
@ -202,7 +202,7 @@ channels_sub_channel_from_sel_cmd_callback (GtkWidget *widget,
CHANNEL_OP_SUB,
0, 0); /* off x/y */
gimage_mask_load (gimage, new_channel);
gtk_object_unref (GTK_OBJECT (new_channel));
g_object_unref (G_OBJECT (new_channel));
gdisplays_flush ();
}
}
@ -228,7 +228,7 @@ channels_intersect_channel_with_sel_cmd_callback (GtkWidget *widget,
CHANNEL_OP_INTERSECT,
0, 0); /* off x/y */
gimage_mask_load (gimage, new_channel);
gtk_object_unref (GTK_OBJECT (new_channel));
g_object_unref (G_OBJECT (new_channel));
gdisplays_flush ();
}
}
@ -360,9 +360,9 @@ channels_new_channel_query (GimpImage *gimage)
NULL);
gtk_signal_connect_object (GTK_OBJECT (options->query_box), "destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->query_box), "destroy",
G_CALLBACK (g_free),
options);
/* The main hbox */
hbox = gtk_hbox_new (FALSE, 2);
@ -407,19 +407,21 @@ channels_new_channel_query (GimpImage *gimage)
opacity_scale = gtk_hscale_new (GTK_ADJUSTMENT (opacity_scale_data));
gtk_table_attach_defaults (GTK_TABLE (table), opacity_scale, 1, 2, 1, 2);
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 (channels_opacity_update),
options->color_panel);
gtk_widget_show (opacity_scale);
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
G_CALLBACK (channels_opacity_update),
options->color_panel);
/* The color panel */
gtk_signal_connect (GTK_OBJECT (options->color_panel), "color_changed",
channels_color_changed,
opacity_scale_data);
gtk_box_pack_start (GTK_BOX (hbox), options->color_panel,
TRUE, TRUE, 0);
gtk_widget_show (options->color_panel);
g_signal_connect (G_OBJECT (options->color_panel), "color_changed",
G_CALLBACK (channels_color_changed),
opacity_scale_data);
gtk_widget_show (table);
gtk_widget_show (vbox);
gtk_widget_show (hbox);
@ -511,13 +513,14 @@ channels_edit_channel_query (GimpChannel *channel)
NULL);
gtk_signal_connect_object (GTK_OBJECT (options->query_box), "destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->query_box), "destroy",
G_CALLBACK (g_free),
options);
gtk_signal_connect_object_while_alive (GTK_OBJECT (channel), "removed",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (options->query_box));
g_signal_connect_object (G_OBJECT (channel), "removed",
G_CALLBACK (gtk_widget_destroy),
G_OBJECT (options->query_box),
G_CONNECT_SWAPPED);
/* The main hbox */
hbox = gtk_hbox_new (FALSE, 2);
@ -562,19 +565,21 @@ channels_edit_channel_query (GimpChannel *channel)
opacity_scale = gtk_hscale_new (GTK_ADJUSTMENT (opacity_scale_data));
gtk_table_attach_defaults (GTK_TABLE (table), opacity_scale, 1, 2, 1, 2);
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 (channels_opacity_update),
options->color_panel);
gtk_widget_show (opacity_scale);
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
G_CALLBACK (channels_opacity_update),
options->color_panel);
/* The color panel */
gtk_signal_connect (GTK_OBJECT (options->color_panel), "color_changed",
channels_color_changed,
opacity_scale_data);
gtk_box_pack_start (GTK_BOX (hbox), options->color_panel,
TRUE, TRUE, 0);
gtk_widget_show (options->color_panel);
g_signal_connect (G_OBJECT (options->color_panel), "color_changed",
G_CALLBACK (channels_color_changed),
opacity_scale_data);
gtk_widget_show (table);
gtk_widget_show (vbox);
gtk_widget_show (hbox);

View File

@ -594,9 +594,9 @@ layers_new_layer_query (GimpImage *gimage)
NULL);
gtk_signal_connect_object (GTK_OBJECT (options->query_box), "destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->query_box), "destroy",
G_CALLBACK (g_free),
options);
/* The main vbox */
vbox = gtk_vbox_new (FALSE, 2);
@ -683,17 +683,18 @@ layers_new_layer_query (GimpImage *gimage)
gtk_widget_show (table);
/* The radio frame */
frame =
gimp_radio_group_new2 (TRUE, _("Layer Fill Type"),
gimp_radio_button_update,
&options->fill_type, (gpointer) options->fill_type,
frame = gimp_radio_group_new2
(TRUE, _("Layer Fill Type"),
G_CALLBACK (gimp_radio_button_update),
&options->fill_type,
GINT_TO_POINTER (options->fill_type),
_("Foreground"), (gpointer) FOREGROUND_FILL, NULL,
_("Background"), (gpointer) BACKGROUND_FILL, NULL,
_("White"), (gpointer) WHITE_FILL, NULL,
_("Transparent"), (gpointer) TRANSPARENT_FILL, NULL,
_("Foreground"), GINT_TO_POINTER (FOREGROUND_FILL), NULL,
_("Background"), GINT_TO_POINTER (BACKGROUND_FILL), NULL,
_("White"), GINT_TO_POINTER (WHITE_FILL), NULL,
_("Transparent"), GINT_TO_POINTER (TRANSPARENT_FILL), NULL,
NULL);
NULL);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
@ -776,13 +777,14 @@ layers_edit_layer_query (GimpLayer *layer)
NULL);
gtk_signal_connect_object (GTK_OBJECT (options->query_box), "destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->query_box), "destroy",
G_CALLBACK (g_free),
options);
gtk_signal_connect_object_while_alive (GTK_OBJECT (layer), "removed",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (options->query_box));
g_signal_connect_object (G_OBJECT (layer), "removed",
G_CALLBACK (gtk_widget_destroy),
G_OBJECT (options->query_box),
G_CONNECT_SWAPPED);
/* The main vbox */
vbox = gtk_vbox_new (FALSE, 2);
@ -804,11 +806,12 @@ layers_edit_layer_query (GimpLayer *layer)
((gimp_layer_is_floating_sel (layer) ?
_("Floating Selection") :
gimp_object_get_name (GIMP_OBJECT (layer)))));
gtk_signal_connect (GTK_OBJECT (options->name_entry), "activate",
edit_layer_query_ok_callback,
options);
gtk_widget_show (options->name_entry);
g_signal_connect (G_OBJECT (options->name_entry), "activate",
G_CALLBACK (edit_layer_query_ok_callback),
options);
gtk_widget_show (hbox);
gtk_widget_show (vbox);
@ -879,13 +882,14 @@ layers_add_mask_query (GimpLayer *layer)
NULL);
gtk_signal_connect_object (GTK_OBJECT (options->query_box), "destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->query_box), "destroy",
G_CALLBACK (g_free),
options);
gtk_signal_connect_object_while_alive (GTK_OBJECT (layer), "removed",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (options->query_box));
g_signal_connect_object (G_OBJECT (layer), "removed",
G_CALLBACK (gtk_widget_destroy),
G_OBJECT (options->query_box),
G_CONNECT_SWAPPED);
/* The radio frame and box */
if (gimage->selection_mask)
@ -893,35 +897,37 @@ layers_add_mask_query (GimpLayer *layer)
options->add_mask_type = ADD_SELECTION_MASK;
frame = gimp_radio_group_new2 (TRUE, _("Initialize Layer Mask to:"),
gimp_radio_button_update,
G_CALLBACK (gimp_radio_button_update),
&options->add_mask_type,
(gpointer) options->add_mask_type,
GINT_TO_POINTER (options->add_mask_type),
_("Selection"),
(gpointer) ADD_SELECTION_MASK, NULL,
GINT_TO_POINTER (ADD_SELECTION_MASK), NULL,
_("Inverse Selection"),
(gpointer) ADD_INV_SELECTION_MASK, NULL,
GINT_TO_POINTER (ADD_INV_SELECTION_MASK), NULL,
_("White (Full Opacity)"),
(gpointer) ADD_WHITE_MASK, NULL,
GINT_TO_POINTER (ADD_WHITE_MASK), NULL,
_("Black (Full Transparency)"),
(gpointer) ADD_BLACK_MASK, NULL,
GINT_TO_POINTER (ADD_BLACK_MASK), NULL,
_("Layer's Alpha Channel"),
(gpointer) ADD_ALPHA_MASK, NULL,
GINT_TO_POINTER (ADD_ALPHA_MASK), NULL,
NULL);
}
else
{
frame = gimp_radio_group_new2 (TRUE, _("Initialize Layer Mask to:"),
gimp_radio_button_update,
G_CALLBACK (gimp_radio_button_update),
&options->add_mask_type,
(gpointer) options->add_mask_type,
GINT_TO_POINTER (options->add_mask_type),
_("White (Full Opacity)"),
(gpointer) ADD_WHITE_MASK, NULL,
GINT_TO_POINTER (ADD_WHITE_MASK), NULL,
_("Black (Full Transparency)"),
(gpointer) ADD_BLACK_MASK, NULL,
GINT_TO_POINTER (ADD_BLACK_MASK), NULL,
_("Layer's Alpha Channel"),
(gpointer) ADD_ALPHA_MASK, NULL,
GINT_TO_POINTER (ADD_ALPHA_MASK), NULL,
NULL);
}
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
@ -1000,7 +1006,7 @@ layers_scale_layer_query (GimpImage *gimage,
options->resize =
resize_widget_new (ScaleWidget,
ResizeLayer,
GTK_OBJECT (layer),
G_OBJECT (layer),
"removed",
gimp_drawable_width (GIMP_DRAWABLE (layer)),
gimp_drawable_height (GIMP_DRAWABLE (layer)),
@ -1008,14 +1014,13 @@ layers_scale_layer_query (GimpImage *gimage,
gimage->yresolution,
gimage->unit,
TRUE,
scale_layer_query_ok_callback,
G_CALLBACK (scale_layer_query_ok_callback),
NULL,
options);
gtk_signal_connect_object (GTK_OBJECT (options->resize->resize_shell),
"destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->resize->resize_shell), "destroy",
G_CALLBACK (g_free),
options);
gtk_widget_show (options->resize->resize_shell);
}
@ -1089,7 +1094,7 @@ layers_resize_layer_query (GimpImage *gimage,
options->resize =
resize_widget_new (ResizeWidget,
ResizeLayer,
GTK_OBJECT (layer),
G_OBJECT (layer),
"removed",
gimp_drawable_width (GIMP_DRAWABLE (layer)),
gimp_drawable_height (GIMP_DRAWABLE (layer)),
@ -1097,14 +1102,13 @@ layers_resize_layer_query (GimpImage *gimage,
gimage->yresolution,
gimage->unit,
TRUE,
resize_layer_query_ok_callback,
G_CALLBACK (resize_layer_query_ok_callback),
NULL,
options);
gtk_signal_connect_object (GTK_OBJECT (options->resize->resize_shell),
"destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->resize->resize_shell), "destroy",
G_CALLBACK (g_free),
options);
gtk_widget_show (options->resize->resize_shell);
}
@ -1172,9 +1176,9 @@ layers_layer_merge_query (GimpImage *gimage,
NULL);
gtk_signal_connect_object (GTK_OBJECT (options->query_box), "destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->query_box), "destroy",
G_CALLBACK (g_free),
options);
/* The main vbox */
vbox = gtk_vbox_new (FALSE, 2);
@ -1186,16 +1190,16 @@ layers_layer_merge_query (GimpImage *gimage,
merge_visible ?
_("Final, Merged Layer should be:") :
_("Final, Anchored Layer should be:"),
gimp_radio_button_update,
G_CALLBACK (gimp_radio_button_update),
&options->merge_type,
(gpointer) options->merge_type,
GINT_TO_POINTER (options->merge_type),
_("Expanded as necessary"),
(gpointer) EXPAND_AS_NECESSARY, NULL,
GINT_TO_POINTER (EXPAND_AS_NECESSARY), NULL,
_("Clipped to image"),
(gpointer) CLIP_TO_IMAGE, NULL,
GINT_TO_POINTER (CLIP_TO_IMAGE), NULL,
_("Clipped to bottom layer"),
(gpointer) CLIP_TO_BOTTOM_LAYER, NULL,
GINT_TO_POINTER (CLIP_TO_BOTTOM_LAYER), NULL,
NULL);

View File

@ -376,8 +376,8 @@ static InfoDialog *info_window_auto = NULL;
static gchar *
info_window_title (GDisplay *gdisp)
{
gchar *basename;
gchar *title;
const gchar *basename;
gchar *title;
basename = g_basename (gimp_image_filename (gdisp->gimage));
@ -433,9 +433,9 @@ info_window_follow_auto (void)
{
info_window_auto = info_window_create (gdisp);
gtk_signal_connect (GTK_OBJECT (context), "display_changed",
GTK_SIGNAL_FUNC (info_window_change_display),
NULL);
g_signal_connect (G_OBJECT (context), "display_changed",
G_CALLBACK (info_window_change_display),
NULL);
info_window_update (gdisp);
}

View File

@ -167,13 +167,14 @@ offset_dialog_create (GimpDrawable *drawable)
/* The fill options */
frame =
gimp_radio_group_new2 (TRUE, _("Fill Type"),
gimp_radio_button_update,
&off_d->fill_type, (gpointer) off_d->fill_type,
G_CALLBACK (gimp_radio_button_update),
&off_d->fill_type,
GINT_TO_POINTER (off_d->fill_type),
_("Background"), (gpointer) OFFSET_BACKGROUND,
NULL,
_("Transparent"), (gpointer) OFFSET_TRANSPARENT,
&radio_button,
_("Background"),
GINT_TO_POINTER (OFFSET_BACKGROUND), NULL,
_("Transparent"),
GINT_TO_POINTER (OFFSET_TRANSPARENT), &radio_button,
NULL);
@ -190,16 +191,16 @@ offset_dialog_create (GimpDrawable *drawable)
gtk_widget_show (push);
/* Hook up the wrap around */
gtk_signal_connect (GTK_OBJECT (check), "toggled",
GTK_SIGNAL_FUNC (gimp_toggle_button_update),
&off_d->wrap_around);
gtk_object_set_data (GTK_OBJECT (check), "inverse_sensitive", frame);
g_signal_connect (G_OBJECT (check), "toggled",
G_CALLBACK (gimp_toggle_button_update),
&off_d->wrap_around);
g_object_set_data (G_OBJECT (check), "inverse_sensitive", frame);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), off_d->wrap_around);
/* Hook up the by half */
gtk_signal_connect (GTK_OBJECT (push), "clicked",
(GtkSignalFunc) offset_halfheight_callback,
off_d);
g_signal_connect (G_OBJECT (push), "clicked",
G_CALLBACK (offset_halfheight_callback),
off_d);
gtk_widget_show (vbox);
gtk_widget_show (off_d->dlg);

View File

@ -278,10 +278,11 @@ palette_import_image_menu_add (GimpImage *gimage)
g_free (lab);
gtk_widget_show (menuitem);
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
GTK_SIGNAL_FUNC (palette_import_image_sel_callback),
gimage);
gtk_menu_append (GTK_MENU (import_dialog->optionmenu1_menu), menuitem);
g_signal_connect (G_OBJECT (menuitem), "activate",
G_CALLBACK (palette_import_image_sel_callback),
gimage);
gtk_menu_shell_append (GTK_MENU_SHELL (import_dialog->optionmenu1_menu),
menuitem);
}
/* Last Param gives us control over what goes in the menu on a delete oper */
@ -527,7 +528,7 @@ palette_import_image_destroyed (GimpContainer *container,
}
void
palette_import_image_renamed (GimpImage* gimage)
palette_import_image_renamed (GimpImage *gimage)
{
/* Now fill in the names if image menu shown */
if (import_dialog &&
@ -564,7 +565,7 @@ palette_import_import_callback (GtkWidget *widget,
if (! import_dialog)
return;
palette_name = gtk_entry_get_text (GTK_ENTRY (import_dialog->entry));
palette_name = (gchar *) gtk_entry_get_text (GTK_ENTRY (import_dialog->entry));
if (! (palette_name && strlen (palette_name)))
palette_name = g_strdup (_("Unnamed"));
@ -695,32 +696,35 @@ palette_import_dialog_new (void)
gtk_table_attach_defaults (GTK_TABLE (table), optionmenu, 1, 2, 1, 2);
menuitem = import_dialog->image_menu_item_gradient =
gtk_menu_item_new_with_label (_("Gradient"));
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
GTK_SIGNAL_FUNC (palette_import_grad_callback),
NULL);
gtk_menu_append (GTK_MENU (optionmenu_menu), menuitem);
gtk_menu_shell_append (GTK_MENU_SHELL (optionmenu_menu), menuitem);
gtk_widget_show (menuitem);
g_signal_connect (G_OBJECT (menuitem), "activate",
G_CALLBACK (palette_import_grad_callback),
NULL);
menuitem = import_dialog->image_menu_item_image =
gtk_menu_item_new_with_label (_("Image"));
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
GTK_SIGNAL_FUNC (palette_import_image_callback),
import_dialog);
gtk_menu_append (GTK_MENU (optionmenu_menu), menuitem);
gtk_menu_shell_append (GTK_MENU_SHELL (optionmenu_menu), menuitem);
gtk_widget_show (menuitem);
gtk_widget_set_sensitive (menuitem,
palette_import_image_count (IMAGE_IMPORT) > 0);
g_signal_connect (G_OBJECT (menuitem), "activate",
G_CALLBACK (palette_import_image_callback),
import_dialog);
menuitem = import_dialog->image_menu_item_indexed =
gtk_menu_item_new_with_label (_("Indexed Palette"));
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
GTK_SIGNAL_FUNC (palette_import_indexed_callback),
import_dialog);
gtk_menu_append (GTK_MENU (optionmenu_menu), menuitem);
gtk_menu_shell_append (GTK_MENU_SHELL (optionmenu_menu), menuitem);
gtk_widget_show (menuitem);
gtk_widget_set_sensitive (menuitem,
palette_import_image_count (INDEXED_IMPORT) > 0);
g_signal_connect (G_OBJECT (menuitem), "activate",
G_CALLBACK (palette_import_indexed_callback),
import_dialog);
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), optionmenu_menu);
gtk_widget_show (optionmenu);
@ -775,28 +779,30 @@ palette_import_dialog_new (void)
button = import_dialog->select = gtk_button_new_with_label (_("Select"));
GTK_WIDGET_UNSET_FLAGS (button, GTK_RECEIVES_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (palette_import_select_grad_callback),
image);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (palette_import_select_grad_callback),
image);
/* Fill with the selected gradient */
palette_import_fill_grad_preview
(image, gimp_context_get_gradient (gimp_get_user_context (the_gimp)));
import_dialog->import_type = GRAD_IMPORT;
gtk_signal_connect (GTK_OBJECT (gimp_get_user_context (the_gimp)),
"gradient_changed",
GTK_SIGNAL_FUNC (palette_import_gradient_update),
NULL);
g_signal_connect (G_OBJECT (gimp_get_user_context (the_gimp)),
"gradient_changed",
G_CALLBACK (palette_import_gradient_update),
NULL);
/* keep the dialog up-to-date */
gtk_signal_connect (GTK_OBJECT (the_gimp->images), "add",
GTK_SIGNAL_FUNC (palette_import_image_new),
NULL);
gtk_signal_connect (GTK_OBJECT (the_gimp->images), "remove",
GTK_SIGNAL_FUNC (palette_import_image_destroyed),
NULL);
g_signal_connect (G_OBJECT (the_gimp->images), "add",
G_CALLBACK (palette_import_image_new),
NULL);
g_signal_connect (G_OBJECT (the_gimp->images), "remove",
G_CALLBACK (palette_import_image_destroyed),
NULL);
return import_dialog;
}

View File

@ -242,8 +242,8 @@ static GtkWidget * prefs_dlg = NULL;
* in the destination if there is one there already.
*/
static void
prefs_strset (gchar **dst,
gchar *src)
prefs_strset (gchar **dst,
const gchar *src)
{
if (*dst)
g_free (*dst);
@ -397,9 +397,9 @@ prefs_restart_notification (void)
NULL);
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
GTK_SIGNAL_FUNC (gtk_main_quit),
NULL);
g_signal_connect (G_OBJECT (dlg), "destroy",
G_CALLBACK (gtk_main_quit),
NULL);
hbox = gtk_hbox_new (FALSE, 4);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), hbox, TRUE, FALSE, 4);
@ -916,7 +916,7 @@ prefs_cancel_callback (GtkWidget *widget,
gdisplays_flush ();
}
prefs_strset (&gimprc.image_title_format, old_image_title_format);
prefs_strset (&gimprc.image_title_format, old_image_title_format);
prefs_strset (&the_gimp->config->default_comment, old_default_comment);
tool_manager_set_global_paint_options (the_gimp, old_global_paint_options);
@ -1536,9 +1536,9 @@ preferences_dialog_create (void)
gtk_object_set_user_data (GTK_OBJECT (prefs_dlg), notebook);
gtk_object_set_user_data (GTK_OBJECT (ctree), notebook);
gtk_signal_connect (GTK_OBJECT (ctree), "tree_select_row",
GTK_SIGNAL_FUNC (prefs_tree_select_callback),
NULL);
g_signal_connect (G_OBJECT (ctree), "tree_select_row",
G_CALLBACK (prefs_tree_select_callback),
NULL);
page_index = 0;
@ -1593,15 +1593,15 @@ preferences_dialog_create (void)
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry), 1,
the_gimp->config->default_height);
gtk_signal_connect (GTK_OBJECT (sizeentry), "unit_changed",
GTK_SIGNAL_FUNC (prefs_default_size_callback),
NULL);
gtk_signal_connect (GTK_OBJECT (sizeentry), "value_changed",
GTK_SIGNAL_FUNC (prefs_default_size_callback),
NULL);
gtk_signal_connect (GTK_OBJECT (sizeentry), "refval_changed",
GTK_SIGNAL_FUNC (prefs_default_size_callback),
NULL);
g_signal_connect (G_OBJECT (sizeentry), "unit_changed",
G_CALLBACK (prefs_default_size_callback),
NULL);
g_signal_connect (G_OBJECT (sizeentry), "value_changed",
G_CALLBACK (prefs_default_size_callback),
NULL);
g_signal_connect (G_OBJECT (sizeentry), "refval_changed",
G_CALLBACK (prefs_default_size_callback),
NULL);
gtk_box_pack_start (GTK_BOX (hbox), sizeentry, FALSE, FALSE, 0);
gtk_widget_show (sizeentry);
@ -1648,15 +1648,15 @@ preferences_dialog_create (void)
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry2), 1,
the_gimp->config->default_yresolution);
gtk_signal_connect (GTK_OBJECT (sizeentry2), "unit_changed",
(GtkSignalFunc) prefs_default_resolution_callback,
button);
gtk_signal_connect (GTK_OBJECT (sizeentry2), "value_changed",
(GtkSignalFunc) prefs_default_resolution_callback,
button);
gtk_signal_connect (GTK_OBJECT (sizeentry2), "refval_changed",
(GtkSignalFunc) prefs_default_resolution_callback,
button);
g_signal_connect (G_OBJECT (sizeentry2), "unit_changed",
G_CALLBACK (prefs_default_resolution_callback),
button);
g_signal_connect (G_OBJECT (sizeentry2), "value_changed",
G_CALLBACK (prefs_default_resolution_callback),
button);
g_signal_connect (G_OBJECT (sizeentry2), "refval_changed",
G_CALLBACK (prefs_default_resolution_callback),
button);
gtk_box_pack_start (GTK_BOX (hbox), sizeentry2, FALSE, FALSE, 0);
gtk_widget_show (sizeentry2);
@ -1673,14 +1673,16 @@ preferences_dialog_create (void)
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_toggle_callback),
&the_gimp->config->default_type,
(gpointer) the_gimp->config->default_type,
GINT_TO_POINTER (the_gimp->config->default_type),
_("RGB"), (gpointer) RGB, NULL,
_("Grayscale"), (gpointer) GRAY, NULL,
_("RGB"), GINT_TO_POINTER (RGB), NULL,
_("Grayscale"), GINT_TO_POINTER (GRAY), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Default Image Type:"), 1.0, 0.5,
optionmenu, 1, TRUE);
@ -1690,13 +1692,14 @@ preferences_dialog_create (void)
0, (4069.0 * 1024 * 1024 - 1),
1.0, 1.0, 0.0);
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_uint_adjustment_update),
&gimprc.max_new_image_size);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Maximum Image Size:"), 1.0, 0.5,
hbox, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_uint_adjustment_update),
&gimprc.max_new_image_size);
/* Default Comment page */
vbox = prefs_notebook_append_page (GTK_NOTEBOOK (notebook),
_("Default Comment"),
@ -1726,11 +1729,12 @@ preferences_dialog_create (void)
gtk_text_set_editable (GTK_TEXT (text), TRUE);
gtk_text_insert (GTK_TEXT (text), NULL, NULL, NULL,
the_gimp->config->default_comment, -1);
gtk_signal_connect (GTK_OBJECT (text), "changed",
GTK_SIGNAL_FUNC (prefs_text_callback),
&the_gimp->config->default_comment);
gtk_container_add (GTK_CONTAINER (hbox), text);
gtk_widget_show (text);
g_signal_connect (G_OBJECT (text), "changed",
G_CALLBACK (prefs_text_callback),
&the_gimp->config->default_comment);
#endif
/* Display page */
@ -1760,33 +1764,37 @@ preferences_dialog_create (void)
gtk_box_pack_start (GTK_BOX (hbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
&gimprc.transparency_type,
(gpointer) gimprc.transparency_type,
optionmenu = gimp_option_menu_new2
(FALSE,
G_CALLBACK (prefs_toggle_callback),
&gimprc.transparency_type,
GINT_TO_POINTER (gimprc.transparency_type),
_("Light Checks"), (gpointer) LIGHT_CHECKS, NULL,
_("Mid-Tone Checks"), (gpointer) GRAY_CHECKS, NULL,
_("Dark Checks"), (gpointer) DARK_CHECKS, NULL,
_("White Only"), (gpointer) WHITE_ONLY, NULL,
_("Gray Only"), (gpointer) GRAY_ONLY, NULL,
_("Black Only"), (gpointer) BLACK_ONLY, NULL,
_("Light Checks"), GINT_TO_POINTER (LIGHT_CHECKS), NULL,
_("Mid-Tone Checks"), GINT_TO_POINTER (GRAY_CHECKS), NULL,
_("Dark Checks"), GINT_TO_POINTER (DARK_CHECKS), NULL,
_("White Only"), GINT_TO_POINTER (WHITE_ONLY), NULL,
_("Gray Only"), GINT_TO_POINTER (GRAY_ONLY), NULL,
_("Black Only"), GINT_TO_POINTER (BLACK_ONLY), NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Transparency Type:"), 1.0, 0.5,
optionmenu, 1, TRUE);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_toggle_callback),
&gimprc.transparency_size,
(gpointer) gimprc.transparency_size,
GINT_TO_POINTER (gimprc.transparency_size),
_("Small"), (gpointer) SMALL_CHECKS, NULL,
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
_("Large"), (gpointer) LARGE_CHECKS, NULL,
_("Small"), GINT_TO_POINTER (SMALL_CHECKS), NULL,
_("Medium"), GINT_TO_POINTER (MEDIUM_CHECKS), NULL,
_("Large"), GINT_TO_POINTER (LARGE_CHECKS), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Check Size:"), 1.0, 0.5,
optionmenu, 1, TRUE);
@ -1808,31 +1816,34 @@ preferences_dialog_create (void)
27.0,
gtk_check_version (1, 2, 8) ? 216.0 : 256.0,
1.0, 8.0, 0.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&edit_min_colors);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Minimum Number of Colors:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&edit_min_colors);
button = gtk_check_button_new_with_label(_("Install Colormap"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
edit_install_cmap);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&edit_install_cmap);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&edit_install_cmap);
button = gtk_check_button_new_with_label(_("Colormap Cycling"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
edit_cycled_marching_ants);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&edit_cycled_marching_ants);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&edit_cycled_marching_ants);
/* Interface */
vbox = prefs_notebook_append_page (GTK_NOTEBOOK (notebook),
@ -1862,53 +1873,58 @@ preferences_dialog_create (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
auto_save);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&auto_save);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
auto_save);
*/
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_preview_size_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_preview_size_callback),
&gimprc.preview_size,
(gpointer) gimprc.preview_size,
GINT_TO_POINTER (gimprc.preview_size),
_("None"), (gpointer) 0, NULL,
_("Tiny"), (gpointer) 24, NULL,
_("Small"), (gpointer) 32, NULL,
_("Medium"), (gpointer) 48, NULL,
_("Large"), (gpointer) 64, NULL,
_("Huge"), (gpointer) 128, NULL,
_("None"), GINT_TO_POINTER (0), NULL,
_("Tiny"), GINT_TO_POINTER (24), NULL,
_("Small"), GINT_TO_POINTER (32), NULL,
_("Medium"), GINT_TO_POINTER (48), NULL,
_("Large"), GINT_TO_POINTER (64), NULL,
_("Huge"), GINT_TO_POINTER (128), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Preview Size:"), 1.0, 0.5,
optionmenu, 1, TRUE);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_nav_preview_size_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_nav_preview_size_callback),
&gimprc.nav_preview_size,
(gpointer) gimprc.nav_preview_size,
GINT_TO_POINTER (gimprc.nav_preview_size),
_("Small"), (gpointer) 48, NULL,
_("Medium"), (gpointer) 80, NULL,
_("Large"), (gpointer) 112, NULL,
_("Small"), GINT_TO_POINTER (48), NULL,
_("Medium"), GINT_TO_POINTER (80), NULL,
_("Large"), GINT_TO_POINTER (112), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Nav Preview Size:"), 1.0, 0.5,
optionmenu, 1, TRUE);
spinbutton =
gimp_spin_button_new (&adjustment, edit_last_opened_size,
0.0, 16.0, 1.0, 5.0, 0.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&edit_last_opened_size);
spinbutton = gimp_spin_button_new (&adjustment, edit_last_opened_size,
0.0, 16.0, 1.0, 5.0, 0.0, 1.0, 0.0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
_("Recent Documents List Size:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&edit_last_opened_size);
/* Indicators */
vbox2 = prefs_frame_new (_("Toolbox"), GTK_BOX (vbox));
@ -1917,42 +1933,46 @@ preferences_dialog_create (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
edit_show_indicators);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&edit_show_indicators);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&edit_show_indicators);
vbox2 = prefs_frame_new (_("Dialog Behaviour"), GTK_BOX (vbox));
button = gtk_check_button_new_with_label (_("Navigation Window per Display"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
edit_nav_window_per_display);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&edit_nav_window_per_display);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&edit_nav_window_per_display);
button = gtk_check_button_new_with_label (_("Info Window Follows Mouse"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
edit_info_window_follows_mouse);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&edit_info_window_follows_mouse);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&edit_info_window_follows_mouse);
vbox2 = prefs_frame_new (_("Menus"), GTK_BOX (vbox));
button = gtk_check_button_new_with_label (_("Disable Tearoff Menus"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
edit_disable_tearoff_menus);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&edit_disable_tearoff_menus);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&edit_disable_tearoff_menus);
/* Interface / Help System */
vbox = prefs_notebook_append_page (GTK_NOTEBOOK (notebook),
_("Help System"),
@ -1971,21 +1991,23 @@ preferences_dialog_create (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.show_tool_tips);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.show_tool_tips);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.show_tool_tips);
button =
gtk_check_button_new_with_label (_("Context Sensitive Help with \"F1\""));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.use_help);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.use_help);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.use_help);
vbox2 = prefs_frame_new (_("Help Browser"), GTK_BOX (vbox));
table = gtk_table_new (1, 2, FALSE);
@ -1994,15 +2016,17 @@ preferences_dialog_create (void)
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
&gimprc.help_browser,
(gpointer) gimprc.help_browser,
optionmenu = gimp_option_menu_new2
(FALSE,
G_CALLBACK (prefs_toggle_callback),
&gimprc.help_browser,
GINT_TO_POINTER (gimprc.help_browser),
_("Internal"), (gpointer) HELP_BROWSER_GIMP, NULL,
_("Netscape"), (gpointer) HELP_BROWSER_NETSCAPE, NULL,
_("Internal"), GINT_TO_POINTER (HELP_BROWSER_GIMP), NULL,
_("Netscape"), GINT_TO_POINTER (HELP_BROWSER_NETSCAPE), NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Help Browser to Use:"), 1.0, 0.5,
optionmenu, 1, TRUE);
@ -2025,38 +2049,42 @@ preferences_dialog_create (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.default_dot_for_dot);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.default_dot_for_dot);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.default_dot_for_dot);
button = gtk_check_button_new_with_label(_("Resize Window on Zoom"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.allow_resize_windows);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.allow_resize_windows);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.allow_resize_windows);
button = gtk_check_button_new_with_label(_("Show Rulers"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.show_rulers);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.show_rulers);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.show_rulers);
button = gtk_check_button_new_with_label(_("Show Statusbar"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.show_statusbar);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.show_statusbar);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.show_statusbar);
table = gtk_table_new (2, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
@ -2064,16 +2092,16 @@ preferences_dialog_create (void)
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
gtk_widget_show (table);
spinbutton =
gimp_spin_button_new (&adjustment, gimprc.marching_speed,
50.0, 32000.0, 10.0, 100.0, 1.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&gimprc.marching_speed);
spinbutton = gimp_spin_button_new (&adjustment, gimprc.marching_speed,
50.0, 32000.0, 10.0, 100.0, 1.0, 1.0, 0.0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Marching Ants Speed:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&gimprc.marching_speed);
/* The title format string */
combo = gtk_combo_new ();
gtk_combo_set_use_arrows (GTK_COMBO (combo), FALSE);
@ -2106,13 +2134,13 @@ preferences_dialog_create (void)
gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), comboitem);
gtk_widget_show (comboitem);
gtk_signal_connect (GTK_OBJECT (GTK_COMBO (combo)->entry), "changed",
GTK_SIGNAL_FUNC (prefs_string_callback),
&gimprc.image_title_format);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Image Title Format:"), 1.0, 0.5,
combo, 1, FALSE);
g_signal_connect (G_OBJECT (GTK_COMBO (combo)->entry), "changed",
G_CALLBACK (prefs_string_callback),
&gimprc.image_title_format);
/* End of the title format string */
vbox2 = prefs_frame_new (_("Pointer Movement Feedback"), GTK_BOX (vbox));
@ -2122,20 +2150,22 @@ preferences_dialog_create (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.perfectmouse);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.perfectmouse);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.perfectmouse);
button = gtk_check_button_new_with_label (_("Disable Cursor Updating"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.no_cursor_updating);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.no_cursor_updating);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.no_cursor_updating);
table = gtk_table_new (1, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
@ -2143,18 +2173,20 @@ preferences_dialog_create (void)
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_toggle_callback),
&gimprc.cursor_mode,
(gpointer) gimprc.cursor_mode,
GINT_TO_POINTER (gimprc.cursor_mode),
_("Tool Icon"),
(gpointer) CURSOR_MODE_TOOL_ICON, NULL,
GINT_TO_POINTER (CURSOR_MODE_TOOL_ICON), NULL,
_("Tool Icon with Crosshair"),
(gpointer) CURSOR_MODE_TOOL_CROSSHAIR, NULL,
GINT_TO_POINTER (CURSOR_MODE_TOOL_CROSSHAIR), NULL,
_("Crosshair only"),
(gpointer) CURSOR_MODE_CROSSHAIR, NULL,
GINT_TO_POINTER (CURSOR_MODE_CROSSHAIR), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Cursor Mode:"), 1.0, 0.5,
optionmenu, 1, TRUE);
@ -2179,11 +2211,12 @@ preferences_dialog_create (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.global_paint_options);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.global_paint_options);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.global_paint_options);
vbox2 = prefs_frame_new (_("Finding Contiguous Regions"), GTK_BOX (vbox));
table = gtk_table_new (1, 2, FALSE);
@ -2194,16 +2227,16 @@ preferences_dialog_create (void)
gtk_widget_show (table);
/* Default threshold */
spinbutton =
gimp_spin_button_new (&adjustment, gimprc.default_threshold,
0.0, 255.0, 1.0, 5.0, 0.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&gimprc.default_threshold);
spinbutton = gimp_spin_button_new (&adjustment, gimprc.default_threshold,
0.0, 255.0, 1.0, 5.0, 0.0, 1.0, 0.0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Default Threshold:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&gimprc.default_threshold);
/* Expand the "Interface" branch */
gtk_ctree_expand (GTK_CTREE (ctree), top_insert);
@ -2225,12 +2258,13 @@ preferences_dialog_create (void)
button = gtk_check_button_new_with_label(_("Conservative Memory Usage"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
edit_stingy_memory_use);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&edit_stingy_memory_use);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&edit_stingy_memory_use);
#ifdef ENABLE_MP
table = gtk_table_new (3, 2, FALSE);
#else
@ -2243,37 +2277,41 @@ preferences_dialog_create (void)
gtk_widget_show (table);
/* Levels of Undo */
spinbutton = gimp_spin_button_new (&adjustment, the_gimp->config->levels_of_undo,
spinbutton = gimp_spin_button_new (&adjustment,
the_gimp->config->levels_of_undo,
0.0, 255.0, 1.0, 5.0, 0.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&the_gimp->config->levels_of_undo);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Levels of Undo:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&the_gimp->config->levels_of_undo);
/* The tile cache size */
adjustment = gtk_adjustment_new (edit_tile_cache_size,
0, (4069.0 * 1024 * 1024 - 1),
1.0, 1.0, 0.0);
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_uint_adjustment_update),
&edit_tile_cache_size);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Tile Cache Size:"), 1.0, 0.5,
hbox, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_uint_adjustment_update),
&edit_tile_cache_size);
#ifdef ENABLE_MP
spinbutton =
gimp_spin_button_new (&adjustment, base_config->num_processors,
1, 30, 1.0, 2.0, 0.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&base_config->num_processors);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("Number of Processors to Use:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&base_config->num_processors);
#endif /* ENABLE_MP */
frame = gtk_frame_new (_("Scaling"));
@ -2291,18 +2329,20 @@ preferences_dialog_create (void)
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_toggle_callback),
&base_config->interpolation_type,
(gpointer) base_config->interpolation_type,
GINT_TO_POINTER (base_config->interpolation_type),
_("Nearest Neighbor (Fast)"),
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
GINT_TO_POINTER (NEAREST_NEIGHBOR_INTERPOLATION), NULL,
_("Linear"),
(gpointer) LINEAR_INTERPOLATION, NULL,
GINT_TO_POINTER (LINEAR_INTERPOLATION), NULL,
_("Cubic (Slow)"),
(gpointer) CUBIC_INTERPOLATION, NULL,
GINT_TO_POINTER (CUBIC_INTERPOLATION), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Interpolation Type:"), 1.0, 0.5,
optionmenu, 1, TRUE);
@ -2321,27 +2361,31 @@ preferences_dialog_create (void)
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_toggle_callback),
&the_gimp->config->thumbnail_mode,
(gpointer) the_gimp->config->thumbnail_mode,
GINT_TO_POINTER (the_gimp->config->thumbnail_mode),
_("Always"), (gpointer) 1, NULL,
_("Never"), (gpointer) 0, NULL,
_("Always"), GINT_TO_POINTER (TRUE), NULL,
_("Never"), GINT_TO_POINTER (FALSE), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Try to Write a Thumbnail File:"), 1.0, 0.5,
optionmenu, 1, TRUE);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_toggle_callback),
&gimprc.trust_dirty_flag,
(gpointer) gimprc.trust_dirty_flag,
GINT_TO_POINTER (gimprc.trust_dirty_flag),
_("Only when Modified"), (gpointer) 1, NULL,
_("Always"), (gpointer) 0, NULL,
_("Only when Modified"), GINT_TO_POINTER (TRUE), NULL,
_("Always"), GINT_TO_POINTER (FALSE), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("\"File > Save\" Saves the Image:"), 1.0, 0.5,
optionmenu, 1, TRUE);
@ -2365,11 +2409,12 @@ preferences_dialog_create (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.save_session_info);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.save_session_info);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.save_session_info);
hbox = gtk_hbox_new (FALSE, 2);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
@ -2378,31 +2423,34 @@ preferences_dialog_create (void)
button = gtk_button_new_with_label (_("Clear Saved Window Positions Now"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (prefs_clear_session_info_callback),
NULL);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (prefs_clear_session_info_callback),
NULL);
button = gtk_check_button_new_with_label (_("Always Try to Restore Session"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.always_restore_session);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.always_restore_session);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.always_restore_session);
vbox2 = prefs_frame_new (_("Devices"), GTK_BOX (vbox));
button = gtk_check_button_new_with_label (_("Save Device Status on Exit"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.save_device_status);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.save_device_status);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.save_device_status);
/* Monitor */
vbox = prefs_notebook_append_page (GTK_NOTEBOOK (notebook),
_("Monitor"),
@ -2465,12 +2513,12 @@ preferences_dialog_create (void)
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry), 1,
gimprc.monitor_yres);
gtk_signal_connect (GTK_OBJECT (sizeentry), "value_changed",
GTK_SIGNAL_FUNC (prefs_monitor_resolution_callback),
button);
gtk_signal_connect (GTK_OBJECT (sizeentry), "refval_changed",
GTK_SIGNAL_FUNC (prefs_monitor_resolution_callback),
button);
g_signal_connect (G_OBJECT (sizeentry), "value_changed",
G_CALLBACK (prefs_monitor_resolution_callback),
button);
g_signal_connect (G_OBJECT (sizeentry), "refval_changed",
G_CALLBACK (prefs_monitor_resolution_callback),
button);
gtk_container_add (GTK_CONTAINER (abox), sizeentry);
gtk_widget_show (sizeentry);
@ -2481,19 +2529,20 @@ preferences_dialog_create (void)
calibrate_button = gtk_button_new_with_label (_("Calibrate"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (calibrate_button)->child), 4, 0);
gtk_signal_connect (GTK_OBJECT (calibrate_button), "clicked",
GTK_SIGNAL_FUNC (prefs_resolution_calibrate_callback),
sizeentry);
gtk_box_pack_start (GTK_BOX (hbox), calibrate_button, FALSE, FALSE, 0);
gtk_widget_show (calibrate_button);
gtk_widget_set_sensitive (calibrate_button, ! gimprc.using_xserver_resolution);
g_signal_connect (G_OBJECT (calibrate_button), "clicked",
G_CALLBACK (prefs_resolution_calibrate_callback),
sizeentry);
group = NULL;
button = gtk_radio_button_new_with_label (group, _("From windowing system"));
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_res_source_callback),
NULL);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_res_source_callback),
NULL);
gtk_object_set_data (GTK_OBJECT (button), "monitor_resolution_sizeentry",
sizeentry);
gtk_object_set_data (GTK_OBJECT (button), "set_sensitive",
@ -2562,12 +2611,13 @@ preferences_dialog_create (void)
fileselection = gimp_file_selection_new (gettext(dirs[i].fs_label),
*(dirs[i].mdir),
TRUE, TRUE);
gtk_signal_connect (GTK_OBJECT (fileselection), "filename_changed",
GTK_SIGNAL_FUNC (prefs_filename_callback),
dirs[i].mdir);
gimp_table_attach_aligned (GTK_TABLE (table), 0, i,
gettext(dirs[i].label), 1.0, 0.5,
fileselection, 1, FALSE);
g_signal_connect (G_OBJECT (fileselection), "filename_changed",
G_CALLBACK (prefs_filename_callback),
dirs[i].mdir);
}
}
@ -2625,11 +2675,12 @@ preferences_dialog_create (void)
patheditor = gimp_path_editor_new (gettext(paths[i].fs_label),
*(paths[i].mpath));
gtk_signal_connect (GTK_OBJECT (patheditor), "path_changed",
GTK_SIGNAL_FUNC (prefs_path_callback),
paths[i].mpath);
gtk_container_add (GTK_CONTAINER (vbox), patheditor);
gtk_widget_show (patheditor);
g_signal_connect (G_OBJECT (patheditor), "path_changed",
G_CALLBACK (prefs_path_callback),
paths[i].mpath);
}
}

View File

@ -232,7 +232,9 @@ brush_select_new (gchar *title,
/* Create the paint mode option menu */
bsp->option_menu =
gimp_paint_mode_menu_new (paint_mode_menu_callback, (gpointer) bsp, TRUE,
gimp_paint_mode_menu_new (G_CALLBACK (paint_mode_menu_callback),
bsp,
TRUE,
gimp_context_get_paint_mode (bsp->context));
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Mode:"), 1.0, 0.5,

View File

@ -176,7 +176,7 @@ channels_add_channel_to_sel_cmd_callback (GtkWidget *widget,
CHANNEL_OP_ADD,
0, 0); /* off x/y */
gimage_mask_load (gimage, new_channel);
gtk_object_unref (GTK_OBJECT (new_channel));
g_object_unref (G_OBJECT (new_channel));
gdisplays_flush ();
}
}
@ -202,7 +202,7 @@ channels_sub_channel_from_sel_cmd_callback (GtkWidget *widget,
CHANNEL_OP_SUB,
0, 0); /* off x/y */
gimage_mask_load (gimage, new_channel);
gtk_object_unref (GTK_OBJECT (new_channel));
g_object_unref (G_OBJECT (new_channel));
gdisplays_flush ();
}
}
@ -228,7 +228,7 @@ channels_intersect_channel_with_sel_cmd_callback (GtkWidget *widget,
CHANNEL_OP_INTERSECT,
0, 0); /* off x/y */
gimage_mask_load (gimage, new_channel);
gtk_object_unref (GTK_OBJECT (new_channel));
g_object_unref (G_OBJECT (new_channel));
gdisplays_flush ();
}
}
@ -360,9 +360,9 @@ channels_new_channel_query (GimpImage *gimage)
NULL);
gtk_signal_connect_object (GTK_OBJECT (options->query_box), "destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->query_box), "destroy",
G_CALLBACK (g_free),
options);
/* The main hbox */
hbox = gtk_hbox_new (FALSE, 2);
@ -407,19 +407,21 @@ channels_new_channel_query (GimpImage *gimage)
opacity_scale = gtk_hscale_new (GTK_ADJUSTMENT (opacity_scale_data));
gtk_table_attach_defaults (GTK_TABLE (table), opacity_scale, 1, 2, 1, 2);
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 (channels_opacity_update),
options->color_panel);
gtk_widget_show (opacity_scale);
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
G_CALLBACK (channels_opacity_update),
options->color_panel);
/* The color panel */
gtk_signal_connect (GTK_OBJECT (options->color_panel), "color_changed",
channels_color_changed,
opacity_scale_data);
gtk_box_pack_start (GTK_BOX (hbox), options->color_panel,
TRUE, TRUE, 0);
gtk_widget_show (options->color_panel);
g_signal_connect (G_OBJECT (options->color_panel), "color_changed",
G_CALLBACK (channels_color_changed),
opacity_scale_data);
gtk_widget_show (table);
gtk_widget_show (vbox);
gtk_widget_show (hbox);
@ -511,13 +513,14 @@ channels_edit_channel_query (GimpChannel *channel)
NULL);
gtk_signal_connect_object (GTK_OBJECT (options->query_box), "destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->query_box), "destroy",
G_CALLBACK (g_free),
options);
gtk_signal_connect_object_while_alive (GTK_OBJECT (channel), "removed",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (options->query_box));
g_signal_connect_object (G_OBJECT (channel), "removed",
G_CALLBACK (gtk_widget_destroy),
G_OBJECT (options->query_box),
G_CONNECT_SWAPPED);
/* The main hbox */
hbox = gtk_hbox_new (FALSE, 2);
@ -562,19 +565,21 @@ channels_edit_channel_query (GimpChannel *channel)
opacity_scale = gtk_hscale_new (GTK_ADJUSTMENT (opacity_scale_data));
gtk_table_attach_defaults (GTK_TABLE (table), opacity_scale, 1, 2, 1, 2);
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 (channels_opacity_update),
options->color_panel);
gtk_widget_show (opacity_scale);
g_signal_connect (G_OBJECT (opacity_scale_data), "value_changed",
G_CALLBACK (channels_opacity_update),
options->color_panel);
/* The color panel */
gtk_signal_connect (GTK_OBJECT (options->color_panel), "color_changed",
channels_color_changed,
opacity_scale_data);
gtk_box_pack_start (GTK_BOX (hbox), options->color_panel,
TRUE, TRUE, 0);
gtk_widget_show (options->color_panel);
g_signal_connect (G_OBJECT (options->color_panel), "color_changed",
G_CALLBACK (channels_color_changed),
opacity_scale_data);
gtk_widget_show (table);
gtk_widget_show (vbox);
gtk_widget_show (hbox);

View File

@ -376,8 +376,8 @@ static InfoDialog *info_window_auto = NULL;
static gchar *
info_window_title (GDisplay *gdisp)
{
gchar *basename;
gchar *title;
const gchar *basename;
gchar *title;
basename = g_basename (gimp_image_filename (gdisp->gimage));
@ -433,9 +433,9 @@ info_window_follow_auto (void)
{
info_window_auto = info_window_create (gdisp);
gtk_signal_connect (GTK_OBJECT (context), "display_changed",
GTK_SIGNAL_FUNC (info_window_change_display),
NULL);
g_signal_connect (G_OBJECT (context), "display_changed",
G_CALLBACK (info_window_change_display),
NULL);
info_window_update (gdisp);
}

View File

@ -594,9 +594,9 @@ layers_new_layer_query (GimpImage *gimage)
NULL);
gtk_signal_connect_object (GTK_OBJECT (options->query_box), "destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->query_box), "destroy",
G_CALLBACK (g_free),
options);
/* The main vbox */
vbox = gtk_vbox_new (FALSE, 2);
@ -683,17 +683,18 @@ layers_new_layer_query (GimpImage *gimage)
gtk_widget_show (table);
/* The radio frame */
frame =
gimp_radio_group_new2 (TRUE, _("Layer Fill Type"),
gimp_radio_button_update,
&options->fill_type, (gpointer) options->fill_type,
frame = gimp_radio_group_new2
(TRUE, _("Layer Fill Type"),
G_CALLBACK (gimp_radio_button_update),
&options->fill_type,
GINT_TO_POINTER (options->fill_type),
_("Foreground"), (gpointer) FOREGROUND_FILL, NULL,
_("Background"), (gpointer) BACKGROUND_FILL, NULL,
_("White"), (gpointer) WHITE_FILL, NULL,
_("Transparent"), (gpointer) TRANSPARENT_FILL, NULL,
_("Foreground"), GINT_TO_POINTER (FOREGROUND_FILL), NULL,
_("Background"), GINT_TO_POINTER (BACKGROUND_FILL), NULL,
_("White"), GINT_TO_POINTER (WHITE_FILL), NULL,
_("Transparent"), GINT_TO_POINTER (TRANSPARENT_FILL), NULL,
NULL);
NULL);
gtk_box_pack_start (GTK_BOX (vbox), frame, FALSE, FALSE, 0);
gtk_widget_show (frame);
@ -776,13 +777,14 @@ layers_edit_layer_query (GimpLayer *layer)
NULL);
gtk_signal_connect_object (GTK_OBJECT (options->query_box), "destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->query_box), "destroy",
G_CALLBACK (g_free),
options);
gtk_signal_connect_object_while_alive (GTK_OBJECT (layer), "removed",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (options->query_box));
g_signal_connect_object (G_OBJECT (layer), "removed",
G_CALLBACK (gtk_widget_destroy),
G_OBJECT (options->query_box),
G_CONNECT_SWAPPED);
/* The main vbox */
vbox = gtk_vbox_new (FALSE, 2);
@ -804,11 +806,12 @@ layers_edit_layer_query (GimpLayer *layer)
((gimp_layer_is_floating_sel (layer) ?
_("Floating Selection") :
gimp_object_get_name (GIMP_OBJECT (layer)))));
gtk_signal_connect (GTK_OBJECT (options->name_entry), "activate",
edit_layer_query_ok_callback,
options);
gtk_widget_show (options->name_entry);
g_signal_connect (G_OBJECT (options->name_entry), "activate",
G_CALLBACK (edit_layer_query_ok_callback),
options);
gtk_widget_show (hbox);
gtk_widget_show (vbox);
@ -879,13 +882,14 @@ layers_add_mask_query (GimpLayer *layer)
NULL);
gtk_signal_connect_object (GTK_OBJECT (options->query_box), "destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->query_box), "destroy",
G_CALLBACK (g_free),
options);
gtk_signal_connect_object_while_alive (GTK_OBJECT (layer), "removed",
GTK_SIGNAL_FUNC (gtk_widget_destroy),
GTK_OBJECT (options->query_box));
g_signal_connect_object (G_OBJECT (layer), "removed",
G_CALLBACK (gtk_widget_destroy),
G_OBJECT (options->query_box),
G_CONNECT_SWAPPED);
/* The radio frame and box */
if (gimage->selection_mask)
@ -893,35 +897,37 @@ layers_add_mask_query (GimpLayer *layer)
options->add_mask_type = ADD_SELECTION_MASK;
frame = gimp_radio_group_new2 (TRUE, _("Initialize Layer Mask to:"),
gimp_radio_button_update,
G_CALLBACK (gimp_radio_button_update),
&options->add_mask_type,
(gpointer) options->add_mask_type,
GINT_TO_POINTER (options->add_mask_type),
_("Selection"),
(gpointer) ADD_SELECTION_MASK, NULL,
GINT_TO_POINTER (ADD_SELECTION_MASK), NULL,
_("Inverse Selection"),
(gpointer) ADD_INV_SELECTION_MASK, NULL,
GINT_TO_POINTER (ADD_INV_SELECTION_MASK), NULL,
_("White (Full Opacity)"),
(gpointer) ADD_WHITE_MASK, NULL,
GINT_TO_POINTER (ADD_WHITE_MASK), NULL,
_("Black (Full Transparency)"),
(gpointer) ADD_BLACK_MASK, NULL,
GINT_TO_POINTER (ADD_BLACK_MASK), NULL,
_("Layer's Alpha Channel"),
(gpointer) ADD_ALPHA_MASK, NULL,
GINT_TO_POINTER (ADD_ALPHA_MASK), NULL,
NULL);
}
else
{
frame = gimp_radio_group_new2 (TRUE, _("Initialize Layer Mask to:"),
gimp_radio_button_update,
G_CALLBACK (gimp_radio_button_update),
&options->add_mask_type,
(gpointer) options->add_mask_type,
GINT_TO_POINTER (options->add_mask_type),
_("White (Full Opacity)"),
(gpointer) ADD_WHITE_MASK, NULL,
GINT_TO_POINTER (ADD_WHITE_MASK), NULL,
_("Black (Full Transparency)"),
(gpointer) ADD_BLACK_MASK, NULL,
GINT_TO_POINTER (ADD_BLACK_MASK), NULL,
_("Layer's Alpha Channel"),
(gpointer) ADD_ALPHA_MASK, NULL,
GINT_TO_POINTER (ADD_ALPHA_MASK), NULL,
NULL);
}
gtk_container_set_border_width (GTK_CONTAINER (frame), 6);
@ -1000,7 +1006,7 @@ layers_scale_layer_query (GimpImage *gimage,
options->resize =
resize_widget_new (ScaleWidget,
ResizeLayer,
GTK_OBJECT (layer),
G_OBJECT (layer),
"removed",
gimp_drawable_width (GIMP_DRAWABLE (layer)),
gimp_drawable_height (GIMP_DRAWABLE (layer)),
@ -1008,14 +1014,13 @@ layers_scale_layer_query (GimpImage *gimage,
gimage->yresolution,
gimage->unit,
TRUE,
scale_layer_query_ok_callback,
G_CALLBACK (scale_layer_query_ok_callback),
NULL,
options);
gtk_signal_connect_object (GTK_OBJECT (options->resize->resize_shell),
"destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->resize->resize_shell), "destroy",
G_CALLBACK (g_free),
options);
gtk_widget_show (options->resize->resize_shell);
}
@ -1089,7 +1094,7 @@ layers_resize_layer_query (GimpImage *gimage,
options->resize =
resize_widget_new (ResizeWidget,
ResizeLayer,
GTK_OBJECT (layer),
G_OBJECT (layer),
"removed",
gimp_drawable_width (GIMP_DRAWABLE (layer)),
gimp_drawable_height (GIMP_DRAWABLE (layer)),
@ -1097,14 +1102,13 @@ layers_resize_layer_query (GimpImage *gimage,
gimage->yresolution,
gimage->unit,
TRUE,
resize_layer_query_ok_callback,
G_CALLBACK (resize_layer_query_ok_callback),
NULL,
options);
gtk_signal_connect_object (GTK_OBJECT (options->resize->resize_shell),
"destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->resize->resize_shell), "destroy",
G_CALLBACK (g_free),
options);
gtk_widget_show (options->resize->resize_shell);
}
@ -1172,9 +1176,9 @@ layers_layer_merge_query (GimpImage *gimage,
NULL);
gtk_signal_connect_object (GTK_OBJECT (options->query_box), "destroy",
GTK_SIGNAL_FUNC (g_free),
(GtkObject *) options);
g_signal_connect_swapped (G_OBJECT (options->query_box), "destroy",
G_CALLBACK (g_free),
options);
/* The main vbox */
vbox = gtk_vbox_new (FALSE, 2);
@ -1186,16 +1190,16 @@ layers_layer_merge_query (GimpImage *gimage,
merge_visible ?
_("Final, Merged Layer should be:") :
_("Final, Anchored Layer should be:"),
gimp_radio_button_update,
G_CALLBACK (gimp_radio_button_update),
&options->merge_type,
(gpointer) options->merge_type,
GINT_TO_POINTER (options->merge_type),
_("Expanded as necessary"),
(gpointer) EXPAND_AS_NECESSARY, NULL,
GINT_TO_POINTER (EXPAND_AS_NECESSARY), NULL,
_("Clipped to image"),
(gpointer) CLIP_TO_IMAGE, NULL,
GINT_TO_POINTER (CLIP_TO_IMAGE), NULL,
_("Clipped to bottom layer"),
(gpointer) CLIP_TO_BOTTOM_LAYER, NULL,
GINT_TO_POINTER (CLIP_TO_BOTTOM_LAYER), NULL,
NULL);

View File

@ -167,13 +167,14 @@ offset_dialog_create (GimpDrawable *drawable)
/* The fill options */
frame =
gimp_radio_group_new2 (TRUE, _("Fill Type"),
gimp_radio_button_update,
&off_d->fill_type, (gpointer) off_d->fill_type,
G_CALLBACK (gimp_radio_button_update),
&off_d->fill_type,
GINT_TO_POINTER (off_d->fill_type),
_("Background"), (gpointer) OFFSET_BACKGROUND,
NULL,
_("Transparent"), (gpointer) OFFSET_TRANSPARENT,
&radio_button,
_("Background"),
GINT_TO_POINTER (OFFSET_BACKGROUND), NULL,
_("Transparent"),
GINT_TO_POINTER (OFFSET_TRANSPARENT), &radio_button,
NULL);
@ -190,16 +191,16 @@ offset_dialog_create (GimpDrawable *drawable)
gtk_widget_show (push);
/* Hook up the wrap around */
gtk_signal_connect (GTK_OBJECT (check), "toggled",
GTK_SIGNAL_FUNC (gimp_toggle_button_update),
&off_d->wrap_around);
gtk_object_set_data (GTK_OBJECT (check), "inverse_sensitive", frame);
g_signal_connect (G_OBJECT (check), "toggled",
G_CALLBACK (gimp_toggle_button_update),
&off_d->wrap_around);
g_object_set_data (G_OBJECT (check), "inverse_sensitive", frame);
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (check), off_d->wrap_around);
/* Hook up the by half */
gtk_signal_connect (GTK_OBJECT (push), "clicked",
(GtkSignalFunc) offset_halfheight_callback,
off_d);
g_signal_connect (G_OBJECT (push), "clicked",
G_CALLBACK (offset_halfheight_callback),
off_d);
gtk_widget_show (vbox);
gtk_widget_show (off_d->dlg);

View File

@ -278,10 +278,11 @@ palette_import_image_menu_add (GimpImage *gimage)
g_free (lab);
gtk_widget_show (menuitem);
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
GTK_SIGNAL_FUNC (palette_import_image_sel_callback),
gimage);
gtk_menu_append (GTK_MENU (import_dialog->optionmenu1_menu), menuitem);
g_signal_connect (G_OBJECT (menuitem), "activate",
G_CALLBACK (palette_import_image_sel_callback),
gimage);
gtk_menu_shell_append (GTK_MENU_SHELL (import_dialog->optionmenu1_menu),
menuitem);
}
/* Last Param gives us control over what goes in the menu on a delete oper */
@ -527,7 +528,7 @@ palette_import_image_destroyed (GimpContainer *container,
}
void
palette_import_image_renamed (GimpImage* gimage)
palette_import_image_renamed (GimpImage *gimage)
{
/* Now fill in the names if image menu shown */
if (import_dialog &&
@ -564,7 +565,7 @@ palette_import_import_callback (GtkWidget *widget,
if (! import_dialog)
return;
palette_name = gtk_entry_get_text (GTK_ENTRY (import_dialog->entry));
palette_name = (gchar *) gtk_entry_get_text (GTK_ENTRY (import_dialog->entry));
if (! (palette_name && strlen (palette_name)))
palette_name = g_strdup (_("Unnamed"));
@ -695,32 +696,35 @@ palette_import_dialog_new (void)
gtk_table_attach_defaults (GTK_TABLE (table), optionmenu, 1, 2, 1, 2);
menuitem = import_dialog->image_menu_item_gradient =
gtk_menu_item_new_with_label (_("Gradient"));
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
GTK_SIGNAL_FUNC (palette_import_grad_callback),
NULL);
gtk_menu_append (GTK_MENU (optionmenu_menu), menuitem);
gtk_menu_shell_append (GTK_MENU_SHELL (optionmenu_menu), menuitem);
gtk_widget_show (menuitem);
g_signal_connect (G_OBJECT (menuitem), "activate",
G_CALLBACK (palette_import_grad_callback),
NULL);
menuitem = import_dialog->image_menu_item_image =
gtk_menu_item_new_with_label (_("Image"));
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
GTK_SIGNAL_FUNC (palette_import_image_callback),
import_dialog);
gtk_menu_append (GTK_MENU (optionmenu_menu), menuitem);
gtk_menu_shell_append (GTK_MENU_SHELL (optionmenu_menu), menuitem);
gtk_widget_show (menuitem);
gtk_widget_set_sensitive (menuitem,
palette_import_image_count (IMAGE_IMPORT) > 0);
g_signal_connect (G_OBJECT (menuitem), "activate",
G_CALLBACK (palette_import_image_callback),
import_dialog);
menuitem = import_dialog->image_menu_item_indexed =
gtk_menu_item_new_with_label (_("Indexed Palette"));
gtk_signal_connect (GTK_OBJECT (menuitem), "activate",
GTK_SIGNAL_FUNC (palette_import_indexed_callback),
import_dialog);
gtk_menu_append (GTK_MENU (optionmenu_menu), menuitem);
gtk_menu_shell_append (GTK_MENU_SHELL (optionmenu_menu), menuitem);
gtk_widget_show (menuitem);
gtk_widget_set_sensitive (menuitem,
palette_import_image_count (INDEXED_IMPORT) > 0);
g_signal_connect (G_OBJECT (menuitem), "activate",
G_CALLBACK (palette_import_indexed_callback),
import_dialog);
gtk_option_menu_set_menu (GTK_OPTION_MENU (optionmenu), optionmenu_menu);
gtk_widget_show (optionmenu);
@ -775,28 +779,30 @@ palette_import_dialog_new (void)
button = import_dialog->select = gtk_button_new_with_label (_("Select"));
GTK_WIDGET_UNSET_FLAGS (button, GTK_RECEIVES_DEFAULT);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (palette_import_select_grad_callback),
image);
gtk_box_pack_start (GTK_BOX (vbox), button, FALSE, FALSE, 0);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (palette_import_select_grad_callback),
image);
/* Fill with the selected gradient */
palette_import_fill_grad_preview
(image, gimp_context_get_gradient (gimp_get_user_context (the_gimp)));
import_dialog->import_type = GRAD_IMPORT;
gtk_signal_connect (GTK_OBJECT (gimp_get_user_context (the_gimp)),
"gradient_changed",
GTK_SIGNAL_FUNC (palette_import_gradient_update),
NULL);
g_signal_connect (G_OBJECT (gimp_get_user_context (the_gimp)),
"gradient_changed",
G_CALLBACK (palette_import_gradient_update),
NULL);
/* keep the dialog up-to-date */
gtk_signal_connect (GTK_OBJECT (the_gimp->images), "add",
GTK_SIGNAL_FUNC (palette_import_image_new),
NULL);
gtk_signal_connect (GTK_OBJECT (the_gimp->images), "remove",
GTK_SIGNAL_FUNC (palette_import_image_destroyed),
NULL);
g_signal_connect (G_OBJECT (the_gimp->images), "add",
G_CALLBACK (palette_import_image_new),
NULL);
g_signal_connect (G_OBJECT (the_gimp->images), "remove",
G_CALLBACK (palette_import_image_destroyed),
NULL);
return import_dialog;
}

View File

@ -147,32 +147,32 @@ static void path_close (Path *);
/* the ops buttons */
static GtkSignalFunc to_path_ext_callbacks[] =
{
paths_dialog_advanced_to_path_callback, NULL, NULL, NULL
G_CALLBACK (paths_dialog_advanced_to_path_callback), NULL, NULL, NULL
};
static OpsButton paths_ops_buttons[] =
{
{ new_xpm, paths_dialog_new_path_callback, NULL,
{ new_xpm, G_CALLBACK (paths_dialog_new_path_callback), NULL,
N_("New Path"),
"paths/new_path.html",
NULL },
{ duplicate_xpm, paths_dialog_dup_path_callback, NULL,
{ duplicate_xpm, G_CALLBACK (paths_dialog_dup_path_callback), NULL,
N_("Duplicate Path"),
"paths/duplicate_path.html",
NULL },
{ toselection_xpm, paths_dialog_path_to_sel_callback, NULL,
{ toselection_xpm, G_CALLBACK (paths_dialog_path_to_sel_callback), NULL,
N_("Path to Selection"),
"paths/path_to_selection.html",
NULL },
{ topath_xpm, paths_dialog_sel_to_path_callback, to_path_ext_callbacks,
{ topath_xpm, G_CALLBACK (paths_dialog_sel_to_path_callback), to_path_ext_callbacks,
N_("Selection to Path"),
"filters/sel2path.html",
NULL },
{ penstroke_xpm, paths_dialog_stroke_path_callback, NULL,
{ penstroke_xpm, G_CALLBACK (paths_dialog_stroke_path_callback), NULL,
N_("Stroke Path"),
"paths/stroke_path.html",
NULL },
{ delete_xpm, paths_dialog_delete_path_callback, NULL,
{ delete_xpm, G_CALLBACK (paths_dialog_delete_path_callback), NULL,
N_("Delete Path"),
"paths/delete_path.html",
NULL },
@ -181,19 +181,19 @@ static OpsButton paths_ops_buttons[] =
static OpsButton point_ops_buttons[] =
{
{ pennorm_xpm, paths_dialog_new_point_callback, NULL,
{ pennorm_xpm, G_CALLBACK (paths_dialog_new_point_callback), NULL,
N_("New Point"),
"#new_point_button",
NULL },
{ penadd_xpm, paths_dialog_add_point_callback, NULL,
{ penadd_xpm, G_CALLBACK (paths_dialog_add_point_callback), NULL,
N_("Add Point"),
"#add_point_button",
NULL },
{ pendel_xpm, paths_dialog_delete_point_callback, NULL,
{ pendel_xpm, G_CALLBACK (paths_dialog_delete_point_callback), NULL,
N_("Delete Point"),
"#delete_point_button",
NULL },
{ penedit_xpm, paths_dialog_edit_point_callback, NULL,
{ penedit_xpm, G_CALLBACK (paths_dialog_edit_point_callback), NULL,
N_("Edit Point"),
"#edit_point_button",
NULL },
@ -1844,7 +1844,7 @@ file_ok_callback (GtkWidget *widget,
{
GtkFileSelection *fs;
FILE *f;
char* filename;
const char* filename;
Path* bzpath;
PathList* plp;
gint row = paths_dialog->selected_row_num;

View File

@ -242,8 +242,8 @@ static GtkWidget * prefs_dlg = NULL;
* in the destination if there is one there already.
*/
static void
prefs_strset (gchar **dst,
gchar *src)
prefs_strset (gchar **dst,
const gchar *src)
{
if (*dst)
g_free (*dst);
@ -397,9 +397,9 @@ prefs_restart_notification (void)
NULL);
gtk_signal_connect (GTK_OBJECT (dlg), "destroy",
GTK_SIGNAL_FUNC (gtk_main_quit),
NULL);
g_signal_connect (G_OBJECT (dlg), "destroy",
G_CALLBACK (gtk_main_quit),
NULL);
hbox = gtk_hbox_new (FALSE, 4);
gtk_box_pack_start (GTK_BOX (GTK_DIALOG (dlg)->vbox), hbox, TRUE, FALSE, 4);
@ -916,7 +916,7 @@ prefs_cancel_callback (GtkWidget *widget,
gdisplays_flush ();
}
prefs_strset (&gimprc.image_title_format, old_image_title_format);
prefs_strset (&gimprc.image_title_format, old_image_title_format);
prefs_strset (&the_gimp->config->default_comment, old_default_comment);
tool_manager_set_global_paint_options (the_gimp, old_global_paint_options);
@ -1536,9 +1536,9 @@ preferences_dialog_create (void)
gtk_object_set_user_data (GTK_OBJECT (prefs_dlg), notebook);
gtk_object_set_user_data (GTK_OBJECT (ctree), notebook);
gtk_signal_connect (GTK_OBJECT (ctree), "tree_select_row",
GTK_SIGNAL_FUNC (prefs_tree_select_callback),
NULL);
g_signal_connect (G_OBJECT (ctree), "tree_select_row",
G_CALLBACK (prefs_tree_select_callback),
NULL);
page_index = 0;
@ -1593,15 +1593,15 @@ preferences_dialog_create (void)
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry), 1,
the_gimp->config->default_height);
gtk_signal_connect (GTK_OBJECT (sizeentry), "unit_changed",
GTK_SIGNAL_FUNC (prefs_default_size_callback),
NULL);
gtk_signal_connect (GTK_OBJECT (sizeentry), "value_changed",
GTK_SIGNAL_FUNC (prefs_default_size_callback),
NULL);
gtk_signal_connect (GTK_OBJECT (sizeentry), "refval_changed",
GTK_SIGNAL_FUNC (prefs_default_size_callback),
NULL);
g_signal_connect (G_OBJECT (sizeentry), "unit_changed",
G_CALLBACK (prefs_default_size_callback),
NULL);
g_signal_connect (G_OBJECT (sizeentry), "value_changed",
G_CALLBACK (prefs_default_size_callback),
NULL);
g_signal_connect (G_OBJECT (sizeentry), "refval_changed",
G_CALLBACK (prefs_default_size_callback),
NULL);
gtk_box_pack_start (GTK_BOX (hbox), sizeentry, FALSE, FALSE, 0);
gtk_widget_show (sizeentry);
@ -1648,15 +1648,15 @@ preferences_dialog_create (void)
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry2), 1,
the_gimp->config->default_yresolution);
gtk_signal_connect (GTK_OBJECT (sizeentry2), "unit_changed",
(GtkSignalFunc) prefs_default_resolution_callback,
button);
gtk_signal_connect (GTK_OBJECT (sizeentry2), "value_changed",
(GtkSignalFunc) prefs_default_resolution_callback,
button);
gtk_signal_connect (GTK_OBJECT (sizeentry2), "refval_changed",
(GtkSignalFunc) prefs_default_resolution_callback,
button);
g_signal_connect (G_OBJECT (sizeentry2), "unit_changed",
G_CALLBACK (prefs_default_resolution_callback),
button);
g_signal_connect (G_OBJECT (sizeentry2), "value_changed",
G_CALLBACK (prefs_default_resolution_callback),
button);
g_signal_connect (G_OBJECT (sizeentry2), "refval_changed",
G_CALLBACK (prefs_default_resolution_callback),
button);
gtk_box_pack_start (GTK_BOX (hbox), sizeentry2, FALSE, FALSE, 0);
gtk_widget_show (sizeentry2);
@ -1673,14 +1673,16 @@ preferences_dialog_create (void)
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_toggle_callback),
&the_gimp->config->default_type,
(gpointer) the_gimp->config->default_type,
GINT_TO_POINTER (the_gimp->config->default_type),
_("RGB"), (gpointer) RGB, NULL,
_("Grayscale"), (gpointer) GRAY, NULL,
_("RGB"), GINT_TO_POINTER (RGB), NULL,
_("Grayscale"), GINT_TO_POINTER (GRAY), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Default Image Type:"), 1.0, 0.5,
optionmenu, 1, TRUE);
@ -1690,13 +1692,14 @@ preferences_dialog_create (void)
0, (4069.0 * 1024 * 1024 - 1),
1.0, 1.0, 0.0);
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_uint_adjustment_update),
&gimprc.max_new_image_size);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Maximum Image Size:"), 1.0, 0.5,
hbox, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_uint_adjustment_update),
&gimprc.max_new_image_size);
/* Default Comment page */
vbox = prefs_notebook_append_page (GTK_NOTEBOOK (notebook),
_("Default Comment"),
@ -1726,11 +1729,12 @@ preferences_dialog_create (void)
gtk_text_set_editable (GTK_TEXT (text), TRUE);
gtk_text_insert (GTK_TEXT (text), NULL, NULL, NULL,
the_gimp->config->default_comment, -1);
gtk_signal_connect (GTK_OBJECT (text), "changed",
GTK_SIGNAL_FUNC (prefs_text_callback),
&the_gimp->config->default_comment);
gtk_container_add (GTK_CONTAINER (hbox), text);
gtk_widget_show (text);
g_signal_connect (G_OBJECT (text), "changed",
G_CALLBACK (prefs_text_callback),
&the_gimp->config->default_comment);
#endif
/* Display page */
@ -1760,33 +1764,37 @@ preferences_dialog_create (void)
gtk_box_pack_start (GTK_BOX (hbox), table, FALSE, FALSE, 0);
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
&gimprc.transparency_type,
(gpointer) gimprc.transparency_type,
optionmenu = gimp_option_menu_new2
(FALSE,
G_CALLBACK (prefs_toggle_callback),
&gimprc.transparency_type,
GINT_TO_POINTER (gimprc.transparency_type),
_("Light Checks"), (gpointer) LIGHT_CHECKS, NULL,
_("Mid-Tone Checks"), (gpointer) GRAY_CHECKS, NULL,
_("Dark Checks"), (gpointer) DARK_CHECKS, NULL,
_("White Only"), (gpointer) WHITE_ONLY, NULL,
_("Gray Only"), (gpointer) GRAY_ONLY, NULL,
_("Black Only"), (gpointer) BLACK_ONLY, NULL,
_("Light Checks"), GINT_TO_POINTER (LIGHT_CHECKS), NULL,
_("Mid-Tone Checks"), GINT_TO_POINTER (GRAY_CHECKS), NULL,
_("Dark Checks"), GINT_TO_POINTER (DARK_CHECKS), NULL,
_("White Only"), GINT_TO_POINTER (WHITE_ONLY), NULL,
_("Gray Only"), GINT_TO_POINTER (GRAY_ONLY), NULL,
_("Black Only"), GINT_TO_POINTER (BLACK_ONLY), NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Transparency Type:"), 1.0, 0.5,
optionmenu, 1, TRUE);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_toggle_callback),
&gimprc.transparency_size,
(gpointer) gimprc.transparency_size,
GINT_TO_POINTER (gimprc.transparency_size),
_("Small"), (gpointer) SMALL_CHECKS, NULL,
_("Medium"), (gpointer) MEDIUM_CHECKS, NULL,
_("Large"), (gpointer) LARGE_CHECKS, NULL,
_("Small"), GINT_TO_POINTER (SMALL_CHECKS), NULL,
_("Medium"), GINT_TO_POINTER (MEDIUM_CHECKS), NULL,
_("Large"), GINT_TO_POINTER (LARGE_CHECKS), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Check Size:"), 1.0, 0.5,
optionmenu, 1, TRUE);
@ -1808,31 +1816,34 @@ preferences_dialog_create (void)
27.0,
gtk_check_version (1, 2, 8) ? 216.0 : 256.0,
1.0, 8.0, 0.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&edit_min_colors);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Minimum Number of Colors:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&edit_min_colors);
button = gtk_check_button_new_with_label(_("Install Colormap"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
edit_install_cmap);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&edit_install_cmap);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&edit_install_cmap);
button = gtk_check_button_new_with_label(_("Colormap Cycling"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
edit_cycled_marching_ants);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&edit_cycled_marching_ants);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&edit_cycled_marching_ants);
/* Interface */
vbox = prefs_notebook_append_page (GTK_NOTEBOOK (notebook),
@ -1862,53 +1873,58 @@ preferences_dialog_create (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
auto_save);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&auto_save);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
auto_save);
*/
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_preview_size_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_preview_size_callback),
&gimprc.preview_size,
(gpointer) gimprc.preview_size,
GINT_TO_POINTER (gimprc.preview_size),
_("None"), (gpointer) 0, NULL,
_("Tiny"), (gpointer) 24, NULL,
_("Small"), (gpointer) 32, NULL,
_("Medium"), (gpointer) 48, NULL,
_("Large"), (gpointer) 64, NULL,
_("Huge"), (gpointer) 128, NULL,
_("None"), GINT_TO_POINTER (0), NULL,
_("Tiny"), GINT_TO_POINTER (24), NULL,
_("Small"), GINT_TO_POINTER (32), NULL,
_("Medium"), GINT_TO_POINTER (48), NULL,
_("Large"), GINT_TO_POINTER (64), NULL,
_("Huge"), GINT_TO_POINTER (128), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Preview Size:"), 1.0, 0.5,
optionmenu, 1, TRUE);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_nav_preview_size_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_nav_preview_size_callback),
&gimprc.nav_preview_size,
(gpointer) gimprc.nav_preview_size,
GINT_TO_POINTER (gimprc.nav_preview_size),
_("Small"), (gpointer) 48, NULL,
_("Medium"), (gpointer) 80, NULL,
_("Large"), (gpointer) 112, NULL,
_("Small"), GINT_TO_POINTER (48), NULL,
_("Medium"), GINT_TO_POINTER (80), NULL,
_("Large"), GINT_TO_POINTER (112), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Nav Preview Size:"), 1.0, 0.5,
optionmenu, 1, TRUE);
spinbutton =
gimp_spin_button_new (&adjustment, edit_last_opened_size,
0.0, 16.0, 1.0, 5.0, 0.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&edit_last_opened_size);
spinbutton = gimp_spin_button_new (&adjustment, edit_last_opened_size,
0.0, 16.0, 1.0, 5.0, 0.0, 1.0, 0.0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 3,
_("Recent Documents List Size:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&edit_last_opened_size);
/* Indicators */
vbox2 = prefs_frame_new (_("Toolbox"), GTK_BOX (vbox));
@ -1917,42 +1933,46 @@ preferences_dialog_create (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
edit_show_indicators);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&edit_show_indicators);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&edit_show_indicators);
vbox2 = prefs_frame_new (_("Dialog Behaviour"), GTK_BOX (vbox));
button = gtk_check_button_new_with_label (_("Navigation Window per Display"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
edit_nav_window_per_display);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&edit_nav_window_per_display);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&edit_nav_window_per_display);
button = gtk_check_button_new_with_label (_("Info Window Follows Mouse"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
edit_info_window_follows_mouse);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&edit_info_window_follows_mouse);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&edit_info_window_follows_mouse);
vbox2 = prefs_frame_new (_("Menus"), GTK_BOX (vbox));
button = gtk_check_button_new_with_label (_("Disable Tearoff Menus"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
edit_disable_tearoff_menus);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&edit_disable_tearoff_menus);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&edit_disable_tearoff_menus);
/* Interface / Help System */
vbox = prefs_notebook_append_page (GTK_NOTEBOOK (notebook),
_("Help System"),
@ -1971,21 +1991,23 @@ preferences_dialog_create (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.show_tool_tips);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.show_tool_tips);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.show_tool_tips);
button =
gtk_check_button_new_with_label (_("Context Sensitive Help with \"F1\""));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.use_help);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.use_help);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.use_help);
vbox2 = prefs_frame_new (_("Help Browser"), GTK_BOX (vbox));
table = gtk_table_new (1, 2, FALSE);
@ -1994,15 +2016,17 @@ preferences_dialog_create (void)
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
&gimprc.help_browser,
(gpointer) gimprc.help_browser,
optionmenu = gimp_option_menu_new2
(FALSE,
G_CALLBACK (prefs_toggle_callback),
&gimprc.help_browser,
GINT_TO_POINTER (gimprc.help_browser),
_("Internal"), (gpointer) HELP_BROWSER_GIMP, NULL,
_("Netscape"), (gpointer) HELP_BROWSER_NETSCAPE, NULL,
_("Internal"), GINT_TO_POINTER (HELP_BROWSER_GIMP), NULL,
_("Netscape"), GINT_TO_POINTER (HELP_BROWSER_NETSCAPE), NULL,
NULL);
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Help Browser to Use:"), 1.0, 0.5,
optionmenu, 1, TRUE);
@ -2025,38 +2049,42 @@ preferences_dialog_create (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.default_dot_for_dot);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.default_dot_for_dot);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.default_dot_for_dot);
button = gtk_check_button_new_with_label(_("Resize Window on Zoom"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.allow_resize_windows);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.allow_resize_windows);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.allow_resize_windows);
button = gtk_check_button_new_with_label(_("Show Rulers"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.show_rulers);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.show_rulers);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.show_rulers);
button = gtk_check_button_new_with_label(_("Show Statusbar"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.show_statusbar);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.show_statusbar);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.show_statusbar);
table = gtk_table_new (2, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
gtk_table_set_row_spacings (GTK_TABLE (table), 2);
@ -2064,16 +2092,16 @@ preferences_dialog_create (void)
gtk_box_pack_start (GTK_BOX (vbox2), table, FALSE, FALSE, 0);
gtk_widget_show (table);
spinbutton =
gimp_spin_button_new (&adjustment, gimprc.marching_speed,
50.0, 32000.0, 10.0, 100.0, 1.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&gimprc.marching_speed);
spinbutton = gimp_spin_button_new (&adjustment, gimprc.marching_speed,
50.0, 32000.0, 10.0, 100.0, 1.0, 1.0, 0.0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Marching Ants Speed:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&gimprc.marching_speed);
/* The title format string */
combo = gtk_combo_new ();
gtk_combo_set_use_arrows (GTK_COMBO (combo), FALSE);
@ -2106,13 +2134,13 @@ preferences_dialog_create (void)
gtk_container_add (GTK_CONTAINER (GTK_COMBO (combo)->list), comboitem);
gtk_widget_show (comboitem);
gtk_signal_connect (GTK_OBJECT (GTK_COMBO (combo)->entry), "changed",
GTK_SIGNAL_FUNC (prefs_string_callback),
&gimprc.image_title_format);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Image Title Format:"), 1.0, 0.5,
combo, 1, FALSE);
g_signal_connect (G_OBJECT (GTK_COMBO (combo)->entry), "changed",
G_CALLBACK (prefs_string_callback),
&gimprc.image_title_format);
/* End of the title format string */
vbox2 = prefs_frame_new (_("Pointer Movement Feedback"), GTK_BOX (vbox));
@ -2122,20 +2150,22 @@ preferences_dialog_create (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.perfectmouse);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.perfectmouse);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.perfectmouse);
button = gtk_check_button_new_with_label (_("Disable Cursor Updating"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.no_cursor_updating);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.no_cursor_updating);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.no_cursor_updating);
table = gtk_table_new (1, 2, FALSE);
gtk_container_set_border_width (GTK_CONTAINER (table), 2);
gtk_table_set_col_spacings (GTK_TABLE (table), 4);
@ -2143,18 +2173,20 @@ preferences_dialog_create (void)
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_toggle_callback),
&gimprc.cursor_mode,
(gpointer) gimprc.cursor_mode,
GINT_TO_POINTER (gimprc.cursor_mode),
_("Tool Icon"),
(gpointer) CURSOR_MODE_TOOL_ICON, NULL,
GINT_TO_POINTER (CURSOR_MODE_TOOL_ICON), NULL,
_("Tool Icon with Crosshair"),
(gpointer) CURSOR_MODE_TOOL_CROSSHAIR, NULL,
GINT_TO_POINTER (CURSOR_MODE_TOOL_CROSSHAIR), NULL,
_("Crosshair only"),
(gpointer) CURSOR_MODE_CROSSHAIR, NULL,
GINT_TO_POINTER (CURSOR_MODE_CROSSHAIR), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Cursor Mode:"), 1.0, 0.5,
optionmenu, 1, TRUE);
@ -2179,11 +2211,12 @@ preferences_dialog_create (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.global_paint_options);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.global_paint_options);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.global_paint_options);
vbox2 = prefs_frame_new (_("Finding Contiguous Regions"), GTK_BOX (vbox));
table = gtk_table_new (1, 2, FALSE);
@ -2194,16 +2227,16 @@ preferences_dialog_create (void)
gtk_widget_show (table);
/* Default threshold */
spinbutton =
gimp_spin_button_new (&adjustment, gimprc.default_threshold,
0.0, 255.0, 1.0, 5.0, 0.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&gimprc.default_threshold);
spinbutton = gimp_spin_button_new (&adjustment, gimprc.default_threshold,
0.0, 255.0, 1.0, 5.0, 0.0, 1.0, 0.0);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Default Threshold:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&gimprc.default_threshold);
/* Expand the "Interface" branch */
gtk_ctree_expand (GTK_CTREE (ctree), top_insert);
@ -2225,12 +2258,13 @@ preferences_dialog_create (void)
button = gtk_check_button_new_with_label(_("Conservative Memory Usage"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
edit_stingy_memory_use);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&edit_stingy_memory_use);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&edit_stingy_memory_use);
#ifdef ENABLE_MP
table = gtk_table_new (3, 2, FALSE);
#else
@ -2243,37 +2277,41 @@ preferences_dialog_create (void)
gtk_widget_show (table);
/* Levels of Undo */
spinbutton = gimp_spin_button_new (&adjustment, the_gimp->config->levels_of_undo,
spinbutton = gimp_spin_button_new (&adjustment,
the_gimp->config->levels_of_undo,
0.0, 255.0, 1.0, 5.0, 0.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&the_gimp->config->levels_of_undo);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Levels of Undo:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&the_gimp->config->levels_of_undo);
/* The tile cache size */
adjustment = gtk_adjustment_new (edit_tile_cache_size,
0, (4069.0 * 1024 * 1024 - 1),
1.0, 1.0, 0.0);
hbox = gimp_mem_size_entry_new (GTK_ADJUSTMENT (adjustment));
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_uint_adjustment_update),
&edit_tile_cache_size);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("Tile Cache Size:"), 1.0, 0.5,
hbox, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_uint_adjustment_update),
&edit_tile_cache_size);
#ifdef ENABLE_MP
spinbutton =
gimp_spin_button_new (&adjustment, base_config->num_processors,
1, 30, 1.0, 2.0, 0.0, 1.0, 0.0);
gtk_signal_connect (GTK_OBJECT (adjustment), "value_changed",
GTK_SIGNAL_FUNC (gimp_int_adjustment_update),
&base_config->num_processors);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 2,
_("Number of Processors to Use:"), 1.0, 0.5,
spinbutton, 1, TRUE);
g_signal_connect (G_OBJECT (adjustment), "value_changed",
G_CALLBACK (gimp_int_adjustment_update),
&base_config->num_processors);
#endif /* ENABLE_MP */
frame = gtk_frame_new (_("Scaling"));
@ -2291,18 +2329,20 @@ preferences_dialog_create (void)
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_toggle_callback),
&base_config->interpolation_type,
(gpointer) base_config->interpolation_type,
GINT_TO_POINTER (base_config->interpolation_type),
_("Nearest Neighbor (Fast)"),
(gpointer) NEAREST_NEIGHBOR_INTERPOLATION, NULL,
GINT_TO_POINTER (NEAREST_NEIGHBOR_INTERPOLATION), NULL,
_("Linear"),
(gpointer) LINEAR_INTERPOLATION, NULL,
GINT_TO_POINTER (LINEAR_INTERPOLATION), NULL,
_("Cubic (Slow)"),
(gpointer) CUBIC_INTERPOLATION, NULL,
GINT_TO_POINTER (CUBIC_INTERPOLATION), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Interpolation Type:"), 1.0, 0.5,
optionmenu, 1, TRUE);
@ -2321,27 +2361,31 @@ preferences_dialog_create (void)
gtk_widget_show (table);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_toggle_callback),
&the_gimp->config->thumbnail_mode,
(gpointer) the_gimp->config->thumbnail_mode,
GINT_TO_POINTER (the_gimp->config->thumbnail_mode),
_("Always"), (gpointer) 1, NULL,
_("Never"), (gpointer) 0, NULL,
_("Always"), GINT_TO_POINTER (TRUE), NULL,
_("Never"), GINT_TO_POINTER (FALSE), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 0,
_("Try to Write a Thumbnail File:"), 1.0, 0.5,
optionmenu, 1, TRUE);
optionmenu =
gimp_option_menu_new2 (FALSE, prefs_toggle_callback,
gimp_option_menu_new2 (FALSE,
G_CALLBACK (prefs_toggle_callback),
&gimprc.trust_dirty_flag,
(gpointer) gimprc.trust_dirty_flag,
GINT_TO_POINTER (gimprc.trust_dirty_flag),
_("Only when Modified"), (gpointer) 1, NULL,
_("Always"), (gpointer) 0, NULL,
_("Only when Modified"), GINT_TO_POINTER (TRUE), NULL,
_("Always"), GINT_TO_POINTER (FALSE), NULL,
NULL);
gimp_table_attach_aligned (GTK_TABLE (table), 0, 1,
_("\"File > Save\" Saves the Image:"), 1.0, 0.5,
optionmenu, 1, TRUE);
@ -2365,11 +2409,12 @@ preferences_dialog_create (void)
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.save_session_info);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.save_session_info);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.save_session_info);
hbox = gtk_hbox_new (FALSE, 2);
gtk_container_set_border_width (GTK_CONTAINER (hbox), 4);
gtk_box_pack_start (GTK_BOX (vbox2), hbox, FALSE, FALSE, 0);
@ -2378,31 +2423,34 @@ preferences_dialog_create (void)
button = gtk_button_new_with_label (_("Clear Saved Window Positions Now"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (button)->child), 2, 0);
gtk_box_pack_start (GTK_BOX (hbox), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "clicked",
GTK_SIGNAL_FUNC (prefs_clear_session_info_callback),
NULL);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (prefs_clear_session_info_callback),
NULL);
button = gtk_check_button_new_with_label (_("Always Try to Restore Session"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.always_restore_session);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.always_restore_session);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.always_restore_session);
vbox2 = prefs_frame_new (_("Devices"), GTK_BOX (vbox));
button = gtk_check_button_new_with_label (_("Save Device Status on Exit"));
gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (button),
gimprc.save_device_status);
gtk_box_pack_start (GTK_BOX (vbox2), button, FALSE, FALSE, 0);
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_toggle_callback),
&gimprc.save_device_status);
gtk_widget_show (button);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_toggle_callback),
&gimprc.save_device_status);
/* Monitor */
vbox = prefs_notebook_append_page (GTK_NOTEBOOK (notebook),
_("Monitor"),
@ -2465,12 +2513,12 @@ preferences_dialog_create (void)
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (sizeentry), 1,
gimprc.monitor_yres);
gtk_signal_connect (GTK_OBJECT (sizeentry), "value_changed",
GTK_SIGNAL_FUNC (prefs_monitor_resolution_callback),
button);
gtk_signal_connect (GTK_OBJECT (sizeentry), "refval_changed",
GTK_SIGNAL_FUNC (prefs_monitor_resolution_callback),
button);
g_signal_connect (G_OBJECT (sizeentry), "value_changed",
G_CALLBACK (prefs_monitor_resolution_callback),
button);
g_signal_connect (G_OBJECT (sizeentry), "refval_changed",
G_CALLBACK (prefs_monitor_resolution_callback),
button);
gtk_container_add (GTK_CONTAINER (abox), sizeentry);
gtk_widget_show (sizeentry);
@ -2481,19 +2529,20 @@ preferences_dialog_create (void)
calibrate_button = gtk_button_new_with_label (_("Calibrate"));
gtk_misc_set_padding (GTK_MISC (GTK_BIN (calibrate_button)->child), 4, 0);
gtk_signal_connect (GTK_OBJECT (calibrate_button), "clicked",
GTK_SIGNAL_FUNC (prefs_resolution_calibrate_callback),
sizeentry);
gtk_box_pack_start (GTK_BOX (hbox), calibrate_button, FALSE, FALSE, 0);
gtk_widget_show (calibrate_button);
gtk_widget_set_sensitive (calibrate_button, ! gimprc.using_xserver_resolution);
g_signal_connect (G_OBJECT (calibrate_button), "clicked",
G_CALLBACK (prefs_resolution_calibrate_callback),
sizeentry);
group = NULL;
button = gtk_radio_button_new_with_label (group, _("From windowing system"));
group = gtk_radio_button_group (GTK_RADIO_BUTTON (button));
gtk_signal_connect (GTK_OBJECT (button), "toggled",
GTK_SIGNAL_FUNC (prefs_res_source_callback),
NULL);
g_signal_connect (G_OBJECT (button), "toggled",
G_CALLBACK (prefs_res_source_callback),
NULL);
gtk_object_set_data (GTK_OBJECT (button), "monitor_resolution_sizeentry",
sizeentry);
gtk_object_set_data (GTK_OBJECT (button), "set_sensitive",
@ -2562,12 +2611,13 @@ preferences_dialog_create (void)
fileselection = gimp_file_selection_new (gettext(dirs[i].fs_label),
*(dirs[i].mdir),
TRUE, TRUE);
gtk_signal_connect (GTK_OBJECT (fileselection), "filename_changed",
GTK_SIGNAL_FUNC (prefs_filename_callback),
dirs[i].mdir);
gimp_table_attach_aligned (GTK_TABLE (table), 0, i,
gettext(dirs[i].label), 1.0, 0.5,
fileselection, 1, FALSE);
g_signal_connect (G_OBJECT (fileselection), "filename_changed",
G_CALLBACK (prefs_filename_callback),
dirs[i].mdir);
}
}
@ -2625,11 +2675,12 @@ preferences_dialog_create (void)
patheditor = gimp_path_editor_new (gettext(paths[i].fs_label),
*(paths[i].mpath));
gtk_signal_connect (GTK_OBJECT (patheditor), "path_changed",
GTK_SIGNAL_FUNC (prefs_path_callback),
paths[i].mpath);
gtk_container_add (GTK_CONTAINER (vbox), patheditor);
gtk_widget_show (patheditor);
g_signal_connect (G_OBJECT (patheditor), "path_changed",
G_CALLBACK (prefs_path_callback),
paths[i].mpath);
}
}