removed our own action_area API and use GtkDialog's one. Create all

2003-11-06  Michael Natterer  <mitch@gimp.org>

	* libgimpwidgets/gimpdialog.[ch]: removed our own action_area API
	and use GtkDialog's one. Create all dialogs without separator.
	Changed almost everything else too. Fixes bug #125143.

	* libgimpwidgets/gimpquerybox.c
	* libgimpwidgets/gimpunitmenu.c: changed accordingly.

	* libgimp/gimpexport.[ch]: ditto. Renamed enum GimpExportReturnType
	to GimpExportReturn.

	* libgimp/gimpcompat.h: added a #define for the old name.

	* themes/Default/gtkrc: increased action_area border to 6 pixels.

	* app/display/gimpdisplayshell-filter-dialog.c
	* app/display/gimpdisplayshell-scale.c
	* app/display/gimpprogress.c
	* app/gui/brush-select.c
	* app/gui/channels-commands.c
	* app/gui/color-notebook.c
	* app/gui/convert-dialog.c
	* app/gui/file-new-dialog.c
	* app/gui/font-select.c
	* app/gui/gradient-editor-commands.c
	* app/gui/gradient-select.c
	* app/gui/grid-dialog.c
	* app/gui/image-commands.c
	* app/gui/info-window.c
	* app/gui/layers-commands.c
	* app/gui/module-browser.c
	* app/gui/offset-dialog.c
	* app/gui/palette-import-dialog.c
	* app/gui/palette-select.c
	* app/gui/pattern-select.c
	* app/gui/preferences-dialog.c
	* app/gui/qmask-commands.c
	* app/gui/resize-dialog.c
	* app/gui/resolution-calibrate-dialog.c
	* app/gui/stroke-dialog.c
	* app/gui/templates-commands.c
	* app/gui/user-install-dialog.c
	* app/gui/vectors-commands.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimptransformtool.c
	* app/widgets/gimptexteditor.c
	* app/widgets/gimptooldialog.[ch]
	* app/widgets/gimpviewabledialog.[ch]
	* app/widgets/gimpwidgets-utils.c: changed accordingly and increased
	the dialogs' outer borders to 6 pixels all over the place.

	* plug-ins/*/*.c: changed accordingly. The plug-ins may be
	arbitrarily broken, I tested none of them.
This commit is contained in:
Michael Natterer
2003-11-06 15:27:05 +00:00
committed by Michael Natterer
parent 5648130ad3
commit 66c5dd8772
236 changed files with 11477 additions and 14387 deletions

View File

@ -40,35 +40,6 @@ static gint ruler_width = 1;
static gint ruler_height = 1;
static void
resolution_calibrate_ok (GtkWidget *button,
gpointer data)
{
GtkWidget *resolution_entry;
GtkWidget *chain_button;
gdouble x, y;
resolution_entry = g_object_get_data (G_OBJECT (data), "resolution-entry");
x = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (calibrate_entry), 0);
y = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (calibrate_entry), 1);
calibrate_xres = (gdouble) ruler_width * calibrate_xres / x;
calibrate_yres = (gdouble) ruler_height * calibrate_yres / y;
chain_button = GIMP_COORDINATES_CHAINBUTTON (resolution_entry);
if (ABS (x -y) > GIMP_MIN_RESOLUTION)
gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chain_button), FALSE);
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (resolution_entry),
0, calibrate_xres);
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (resolution_entry),
1, calibrate_yres);
gtk_widget_destroy (GTK_WIDGET (data));
}
/**
* resolution_calibrate_dialog:
* @resolution_entry: a #GimpSizeEntry to connect the dialog to
@ -113,29 +84,15 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
dialog = gimp_dialog_new (_("Calibrate Monitor Resolution"),
"calibrate_resolution",
resolution_entry,
GTK_DIALOG_MODAL | GTK_DIALOG_DESTROY_WITH_PARENT,
NULL, NULL,
GTK_WIN_POS_CENTER,
FALSE, FALSE, FALSE,
GTK_STOCK_CANCEL, gtk_widget_destroy,
NULL, 1, NULL, FALSE, TRUE,
GTK_STOCK_OK, resolution_calibrate_ok,
NULL, NULL, NULL, TRUE, FALSE,
GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OK, GTK_RESPONSE_OK,
NULL);
g_signal_connect (dialog, "destroy",
G_CALLBACK (gtk_main_quit),
NULL);
g_object_set_data (G_OBJECT (dialog), "resolution-entry", resolution_entry);
g_signal_connect_object (resolution_entry, "destroy",
G_CALLBACK (gtk_widget_destroy),
dialog, G_CONNECT_SWAPPED);
g_signal_connect_object (resolution_entry, "unmap",
G_CALLBACK (gtk_widget_destroy),
dialog, G_CONNECT_SWAPPED);
SET_STYLE (dialog, dialog_style);
gtk_container_set_border_width (GTK_CONTAINER (GTK_DIALOG (dialog)->action_area), 8);
@ -289,5 +246,33 @@ resolution_calibrate_dialog (GtkWidget *resolution_entry,
gtk_widget_show (dialog);
gtk_main ();
switch (gtk_dialog_run (GTK_DIALOG (dialog)))
{
case GTK_RESPONSE_OK:
{
GtkWidget *chain_button;
gdouble x, y;
x = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (calibrate_entry), 0);
y = gimp_size_entry_get_refval (GIMP_SIZE_ENTRY (calibrate_entry), 1);
calibrate_xres = (gdouble) ruler_width * calibrate_xres / x;
calibrate_yres = (gdouble) ruler_height * calibrate_yres / y;
chain_button = GIMP_COORDINATES_CHAINBUTTON (resolution_entry);
if (ABS (x -y) > GIMP_MIN_RESOLUTION)
gimp_chain_button_set_active (GIMP_CHAIN_BUTTON (chain_button), FALSE);
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (resolution_entry),
0, calibrate_xres);
gimp_size_entry_set_refval (GIMP_SIZE_ENTRY (resolution_entry),
1, calibrate_yres);
}
default:
break;
}
gtk_widget_destroy (dialog);
}