Commit cc3bdec2 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer

app/widgets/Makefile.am app/widgets/widgets-types.h new dialog widget

2002-08-30  Michael Natterer  <mitch@gimp.org>

	* app/widgets/Makefile.am
	* app/widgets/widgets-types.h
	* app/widgets/gimpviewabledialog.[ch]: new dialog widget featuring
	a title bar containing a stock icon, a description, the viewable's
	name and a preview. Will be used for all viewable related dialogs
	and serves as a common place to control their look & feel.

	* app/tools/gimpimagemaptool.[ch]: removed the code which did
	almost the same and use GimpViewableDialog.

	* app/gui/info-dialog.[ch]: extended the API so it has enough
	information to create a GimpViewableDialog.

	* app/gui/channels-commands.c
	* app/gui/convert-dialog.c
	* app/gui/gradient-editor-commands.c
	* app/gui/image-commands.c
	* app/gui/info-window.c
	* app/gui/layers-commands.c
	* app/gui/offset-dialog.c
	* app/gui/qmask-commands.c
	* app/gui/resize-dialog.c
	* app/gui/vectors-commands.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimphistogramtool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimpperspectivetool.c
	* app/tools/gimprotatetool.c
	* app/tools/gimpscaletool.c
	* app/tools/gimpsheartool.c: use GimpViewableDialogs

	* themes/Default/gtkrc: apply the dialog style to "*Gimp*Dialog*",
	not only "*GimpDialog*" so it covers GimpViewableDialog.
parent 77934d68
2002-08-30 Michael Natterer <mitch@gimp.org>
* app/widgets/Makefile.am
* app/widgets/widgets-types.h
* app/widgets/gimpviewabledialog.[ch]: new dialog widget featuring
a title bar containing a stock icon, a description, the viewable's
name and a preview. Will be used for all viewable related dialogs
and serves as a common place to control their look & feel.
* app/tools/gimpimagemaptool.[ch]: removed the code which did
almost the same and use GimpViewableDialog.
* app/gui/info-dialog.[ch]: extended the API so it has enough
information to create a GimpViewableDialog.
* app/gui/channels-commands.c
* app/gui/convert-dialog.c
* app/gui/gradient-editor-commands.c
* app/gui/image-commands.c
* app/gui/info-window.c
* app/gui/layers-commands.c
* app/gui/offset-dialog.c
* app/gui/qmask-commands.c
* app/gui/resize-dialog.c
* app/gui/vectors-commands.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpcroptool.c
* app/tools/gimphistogramtool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimpperspectivetool.c
* app/tools/gimprotatetool.c
* app/tools/gimpscaletool.c
* app/tools/gimpsheartool.c: use GimpViewableDialogs
* themes/Default/gtkrc: apply the dialog style to "*Gimp*Dialog*",
not only "*GimpDialog*" so it covers GimpViewableDialog.
2002-08-31 James Henstridge <james@daa.com.au> 2002-08-31 James Henstridge <james@daa.com.au>
* libgimp/gimp.c (gimp_run_procedure): handle GIMP_PDB_COLOR * libgimp/gimp.c (gimp_run_procedure): handle GIMP_PDB_COLOR
......
...@@ -37,6 +37,7 @@ ...@@ -37,6 +37,7 @@
#include "widgets/gimpcolorpanel.h" #include "widgets/gimpcolorpanel.h"
#include "widgets/gimpitemfactory.h" #include "widgets/gimpitemfactory.h"
#include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h" #include "widgets/gimpwidgets-utils.h"
#include "channels-commands.h" #include "channels-commands.h"
...@@ -293,11 +294,12 @@ channels_new_channel_query (GimpImage *gimage, ...@@ -293,11 +294,12 @@ channels_new_channel_query (GimpImage *gimage,
/* The dialog */ /* The dialog */
options->query_box = options->query_box =
gimp_dialog_new (_("New Channel Options"), "new_channel_options", gimp_viewable_dialog_new (GIMP_VIEWABLE (gimage),
_("New Channel"), "new_channel_options",
GTK_STOCK_NEW,
_("New Channel Options"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/channels/new_channel.html", "dialogs/channels/new_channel.html",
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
GTK_STOCK_CANCEL, gtk_widget_destroy, GTK_STOCK_CANCEL, gtk_widget_destroy,
NULL, 1, NULL, FALSE, TRUE, NULL, 1, NULL, FALSE, TRUE,
...@@ -441,11 +443,12 @@ channels_edit_channel_query (GimpChannel *channel) ...@@ -441,11 +443,12 @@ channels_edit_channel_query (GimpChannel *channel)
/* The dialog */ /* The dialog */
options->query_box = options->query_box =
gimp_dialog_new (_("Edit Channel Attributes"), "edit_channel_attributes", gimp_viewable_dialog_new (GIMP_VIEWABLE (channel),
_("Channel Attributes"), "edit_channel_attributes",
GIMP_STOCK_EDIT,
_("Edit Channel Attributes"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/channels/edit_channel_attributes.html", "dialogs/channels/edit_channel_attributes.html",
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
GTK_STOCK_CANCEL, gtk_widget_destroy, GTK_STOCK_CANCEL, gtk_widget_destroy,
NULL, 1, NULL, FALSE, TRUE, NULL, 1, NULL, FALSE, TRUE,
......
...@@ -535,7 +535,6 @@ gradient_editor_replicate_cmd_callback (GtkWidget *widget, ...@@ -535,7 +535,6 @@ gradient_editor_replicate_cmd_callback (GtkWidget *widget,
if (! editor) if (! editor)
return; return;
/* Create dialog window */
dialog = dialog =
gimp_dialog_new ((editor->control_sel_l == editor->control_sel_r) ? gimp_dialog_new ((editor->control_sel_l == editor->control_sel_r) ?
_("Replicate segment") : _("Replicate segment") :
...@@ -584,7 +583,6 @@ gradient_editor_replicate_cmd_callback (GtkWidget *widget, ...@@ -584,7 +583,6 @@ gradient_editor_replicate_cmd_callback (GtkWidget *widget,
G_CALLBACK (gimp_int_adjustment_update), G_CALLBACK (gimp_int_adjustment_update),
&editor->replicate_times); &editor->replicate_times);
/* Show! */
gtk_widget_show (dialog); gtk_widget_show (dialog);
gtk_widget_set_sensitive (GTK_WIDGET (editor), FALSE); gtk_widget_set_sensitive (GTK_WIDGET (editor), FALSE);
} }
......
...@@ -34,6 +34,8 @@ ...@@ -34,6 +34,8 @@
#include "core/gimpimage-resize.h" #include "core/gimpimage-resize.h"
#include "core/gimpimage-scale.h" #include "core/gimpimage-scale.h"
#include "widgets/gimpviewabledialog.h"
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h" #include "display/gimpdisplayshell.h"
#include "display/gimpprogress.h" #include "display/gimpprogress.h"
...@@ -286,11 +288,12 @@ image_layers_merge_query (GimpImage *gimage, ...@@ -286,11 +288,12 @@ image_layers_merge_query (GimpImage *gimage,
/* The dialog */ /* The dialog */
options->query_box = options->query_box =
gimp_dialog_new (_("Layers Merge Options"), "layers_merge_options", gimp_viewable_dialog_new (GIMP_VIEWABLE (gimage),
_("Merge Layers"), "layers_merge_options",
GIMP_STOCK_MERGE_DOWN,
_("Layers Merge Options"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/layers/merge_visible_layers.html", "dialogs/layers/merge_visible_layers.html",
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
GTK_STOCK_CANCEL, gtk_widget_destroy, GTK_STOCK_CANCEL, gtk_widget_destroy,
NULL, 1, NULL, FALSE, TRUE, NULL, 1, NULL, FALSE, TRUE,
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "widgets/gimpenummenu.h" #include "widgets/gimpenummenu.h"
#include "widgets/gimpitemfactory.h" #include "widgets/gimpitemfactory.h"
#include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h" #include "widgets/gimpwidgets-utils.h"
#include "layers-commands.h" #include "layers-commands.h"
...@@ -577,11 +578,12 @@ layers_new_layer_query (GimpImage *gimage, ...@@ -577,11 +578,12 @@ layers_new_layer_query (GimpImage *gimage,
/* The dialog */ /* The dialog */
options->query_box = options->query_box =
gimp_dialog_new (_("New Layer Options"), "new_layer_options", gimp_viewable_dialog_new (GIMP_VIEWABLE (gimage),
_("New Layer"), "new_layer_options",
GTK_STOCK_NEW,
_("New Layer Options"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/layers/new_layer.html", "dialogs/layers/new_layer.html",
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
GTK_STOCK_CANCEL, gtk_widget_destroy, GTK_STOCK_CANCEL, gtk_widget_destroy,
NULL, 1, NULL, FALSE, TRUE, NULL, 1, NULL, FALSE, TRUE,
...@@ -766,11 +768,13 @@ layers_edit_layer_query (GimpLayer *layer) ...@@ -766,11 +768,13 @@ layers_edit_layer_query (GimpLayer *layer)
/* The dialog */ /* The dialog */
options->query_box = options->query_box =
gimp_dialog_new (_("Edit Layer Attributes"), "edit_layer_attributes", gimp_viewable_dialog_new (GIMP_VIEWABLE (layer),
_("Layer Attributes"),
"edit_layer_attributes",
GIMP_STOCK_EDIT,
_("Edit Layer Attributes"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/layers/edit_layer_attributes.html", "dialogs/layers/edit_layer_attributes.html",
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
GTK_STOCK_CANCEL, gtk_widget_destroy, GTK_STOCK_CANCEL, gtk_widget_destroy,
NULL, 1, NULL, FALSE, TRUE, NULL, 1, NULL, FALSE, TRUE,
...@@ -871,11 +875,12 @@ layers_add_mask_query (GimpLayer *layer) ...@@ -871,11 +875,12 @@ layers_add_mask_query (GimpLayer *layer)
/* The dialog */ /* The dialog */
options->query_box = options->query_box =
gimp_dialog_new (_("Add Mask Options"), "add_mask_options", gimp_viewable_dialog_new (GIMP_VIEWABLE (layer),
_("Add Mask"), "add_mask_options",
GTK_STOCK_ADD,
_("Add Layer Mask Options"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/layers/add_layer_mask.html", "dialogs/layers/add_layer_mask.html",
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
GTK_STOCK_CANCEL, gtk_widget_destroy, GTK_STOCK_CANCEL, gtk_widget_destroy,
NULL, 1, NULL, FALSE, TRUE, NULL, 1, NULL, FALSE, TRUE,
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "widgets/gimpcolorpanel.h" #include "widgets/gimpcolorpanel.h"
#include "widgets/gimpitemfactory.h" #include "widgets/gimpitemfactory.h"
#include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h" #include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
...@@ -173,11 +174,12 @@ qmask_channel_query (GimpDisplayShell *shell) ...@@ -173,11 +174,12 @@ qmask_channel_query (GimpDisplayShell *shell)
/* The dialog */ /* The dialog */
options->query_box = options->query_box =
gimp_dialog_new (_("Edit Qmask Attributes"), "edit_qmask_attributes", gimp_viewable_dialog_new (GIMP_VIEWABLE (shell->gdisp->gimage),
_("Qmask Attributes"), "edit_qmask_attributes",
GIMP_STOCK_QMASK_ON,
_("Edit QuickMask Attributes"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/edit_qmask_attributes.html", "dialogs/edit_qmask_attributes.html",
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
GTK_STOCK_CANCEL, qmask_query_cancel_callback, GTK_STOCK_CANCEL, qmask_query_cancel_callback,
options, NULL, NULL, FALSE, TRUE, options, NULL, NULL, FALSE, TRUE,
......
...@@ -31,6 +31,7 @@ ...@@ -31,6 +31,7 @@
#include "widgets/gimpcolorpanel.h" #include "widgets/gimpcolorpanel.h"
#include "widgets/gimpitemfactory.h" #include "widgets/gimpitemfactory.h"
#include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h" #include "widgets/gimpwidgets-utils.h"
#include "display/gimpdisplay.h" #include "display/gimpdisplay.h"
...@@ -173,11 +174,12 @@ qmask_channel_query (GimpDisplayShell *shell) ...@@ -173,11 +174,12 @@ qmask_channel_query (GimpDisplayShell *shell)
/* The dialog */ /* The dialog */
options->query_box = options->query_box =
gimp_dialog_new (_("Edit Qmask Attributes"), "edit_qmask_attributes", gimp_viewable_dialog_new (GIMP_VIEWABLE (shell->gdisp->gimage),
_("Qmask Attributes"), "edit_qmask_attributes",
GIMP_STOCK_QMASK_ON,
_("Edit QuickMask Attributes"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/edit_qmask_attributes.html", "dialogs/edit_qmask_attributes.html",
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
GTK_STOCK_CANCEL, qmask_query_cancel_callback, GTK_STOCK_CANCEL, qmask_query_cancel_callback,
options, NULL, NULL, FALSE, TRUE, options, NULL, NULL, FALSE, TRUE,
......
...@@ -42,6 +42,7 @@ ...@@ -42,6 +42,7 @@
#include "vectors/gimpvectors.h" #include "vectors/gimpvectors.h"
#include "widgets/gimpitemfactory.h" #include "widgets/gimpitemfactory.h"
#include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h" #include "widgets/gimpwidgets-utils.h"
#include "tools/gimppainttool.h" #include "tools/gimppainttool.h"
...@@ -435,11 +436,12 @@ vectors_new_vectors_query (GimpImage *gimage, ...@@ -435,11 +436,12 @@ vectors_new_vectors_query (GimpImage *gimage,
/* The dialog */ /* The dialog */
options->query_box = options->query_box =
gimp_dialog_new (_("New Path Options"), "new_path_options", gimp_viewable_dialog_new (GIMP_VIEWABLE (gimage),
_("New Path"), "new_path_options",
GTK_STOCK_NEW,
_("New Path Options"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/vectors/new_vectors.html", "dialogs/vectors/new_vectors.html",
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
GTK_STOCK_CANCEL, gtk_widget_destroy, GTK_STOCK_CANCEL, gtk_widget_destroy,
NULL, 1, NULL, FALSE, TRUE, NULL, 1, NULL, FALSE, TRUE,
...@@ -550,11 +552,12 @@ vectors_edit_vectors_query (GimpVectors *vectors) ...@@ -550,11 +552,12 @@ vectors_edit_vectors_query (GimpVectors *vectors)
/* The dialog */ /* The dialog */
options->query_box = options->query_box =
gimp_dialog_new (_("Edit Path Attributes"), "edit_path_attributes", gimp_viewable_dialog_new (GIMP_VIEWABLE (vectors),
_("Path Attributes"), "edit_path_attributes",
GIMP_STOCK_EDIT,
_("Edit Path Attributes"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/paths/edit_path_attributes.html", "dialogs/paths/edit_path_attributes.html",
GTK_WIN_POS_MOUSE,
FALSE, TRUE, FALSE,
GTK_STOCK_CANCEL, gtk_widget_destroy, GTK_STOCK_CANCEL, gtk_widget_destroy,
NULL, 1, NULL, FALSE, TRUE, NULL, 1, NULL, FALSE, TRUE,
......
...@@ -83,6 +83,8 @@ static GimpConvertPaletteType spalette_type = GIMP_MAKE_PALETTE; ...@@ -83,6 +83,8 @@ static GimpConvertPaletteType spalette_type = GIMP_MAKE_PALETTE;
void void
convert_to_rgb (GimpImage *gimage) convert_to_rgb (GimpImage *gimage)
{ {
g_return_if_fail (GIMP_IS_IMAGE (gimage));
gimp_image_convert (gimage, GIMP_RGB, 0, 0, 0, 0, 0, NULL); gimp_image_convert (gimage, GIMP_RGB, 0, 0, 0, 0, 0, NULL);
gimp_image_flush (gimage); gimp_image_flush (gimage);
} }
...@@ -90,6 +92,8 @@ convert_to_rgb (GimpImage *gimage) ...@@ -90,6 +92,8 @@ convert_to_rgb (GimpImage *gimage)
void void
convert_to_grayscale (GimpImage* gimage) convert_to_grayscale (GimpImage* gimage)
{ {
g_return_if_fail (GIMP_IS_IMAGE (gimage));
gimp_image_convert (gimage, GIMP_GRAY, 0, 0, 0, 0, 0, NULL); gimp_image_convert (gimage, GIMP_GRAY, 0, 0, 0, 0, 0, NULL);
gimp_image_flush (gimage); gimp_image_flush (gimage);
} }
...@@ -108,6 +112,8 @@ convert_to_indexed (GimpImage *gimage) ...@@ -108,6 +112,8 @@ convert_to_indexed (GimpImage *gimage)
GtkWidget *toggle; GtkWidget *toggle;
GSList *group = NULL; GSList *group = NULL;
g_return_if_fail (GIMP_IS_IMAGE (gimage));
dialog = g_new0 (IndexedDialog, 1); dialog = g_new0 (IndexedDialog, 1);
dialog->gimage = gimage; dialog->gimage = gimage;
...@@ -120,11 +126,13 @@ convert_to_indexed (GimpImage *gimage) ...@@ -120,11 +126,13 @@ convert_to_indexed (GimpImage *gimage)
dialog->palette_type = spalette_type; dialog->palette_type = spalette_type;
dialog->shell = dialog->shell =
gimp_dialog_new (_("Indexed Color Conversion"), "indexed_color_conversion", gimp_viewable_dialog_new (GIMP_VIEWABLE (gimage),
_("Indexed Color Conversion"),
"indexed_color_conversion",
GIMP_STOCK_CONVERT_INDEXED,
_("Convert Image to Indexed Colors"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/convert_to_indexed.html", "dialogs/convert_to_indexed.html",
GTK_WIN_POS_NONE,
FALSE, FALSE, TRUE,
GTK_STOCK_CANCEL, indexed_cancel_callback, GTK_STOCK_CANCEL, indexed_cancel_callback,
dialog, NULL, NULL, FALSE, TRUE, dialog, NULL, NULL, FALSE, TRUE,
......
...@@ -26,6 +26,8 @@ ...@@ -26,6 +26,8 @@
#include "gui-types.h" #include "gui-types.h"
#include "widgets/gimpviewabledialog.h"
#include "info-dialog.h" #include "info-dialog.h"
#include "gimprc.h" #include "gimprc.h"
...@@ -158,7 +160,11 @@ info_dialog_delete_callback (GtkWidget *widget, ...@@ -158,7 +160,11 @@ info_dialog_delete_callback (GtkWidget *widget,
} }
static InfoDialog * static InfoDialog *
info_dialog_new_extended (gchar *title, info_dialog_new_extended (GimpViewable *viewable,
const gchar *title,
const gchar *wmclass_name,
const gchar *stock_id,
const gchar *desc,
GimpHelpFunc help_func, GimpHelpFunc help_func,
gpointer help_data, gpointer help_data,
gboolean in_notebook) gboolean in_notebook)
...@@ -173,9 +179,11 @@ info_dialog_new_extended (gchar *title, ...@@ -173,9 +179,11 @@ info_dialog_new_extended (gchar *title,
idialog->field_list = NULL; idialog->field_list = NULL;
idialog->nfields = 0; idialog->nfields = 0;
shell = g_object_new (GIMP_TYPE_DIALOG, NULL); shell = gimp_viewable_dialog_new (viewable,
gtk_window_set_wmclass (GTK_WINDOW (shell), "info_dialog", "Gimp"); title, wmclass_name,
gtk_window_set_title (GTK_WINDOW (shell), title); stock_id, desc,
help_func, help_data,
NULL);
g_signal_connect (G_OBJECT (shell), "delete_event", g_signal_connect (G_OBJECT (shell), "delete_event",
G_CALLBACK (info_dialog_delete_callback), G_CALLBACK (info_dialog_delete_callback),
...@@ -213,28 +221,37 @@ info_dialog_new_extended (gchar *title, ...@@ -213,28 +221,37 @@ info_dialog_new_extended (gchar *title,
gtk_widget_show (idialog->info_table); gtk_widget_show (idialog->info_table);
gtk_widget_show (idialog->vbox); gtk_widget_show (idialog->vbox);
/* Connect the "F1" help key */
gimp_help_connect (idialog->shell, help_func, help_data);
return idialog; return idialog;
} }
/* public functions */ /* public functions */
InfoDialog * InfoDialog *
info_dialog_notebook_new (gchar *title, info_dialog_notebook_new (GimpViewable *viewable,
const gchar *title,
const gchar *wmclass_name,
const gchar *stock_id,
const gchar *desc,
GimpHelpFunc help_func, GimpHelpFunc help_func,
gpointer help_data) gpointer help_data)
{ {
return info_dialog_new_extended (title, help_func, help_data, TRUE); return info_dialog_new_extended (viewable, title, wmclass_name,
stock_id, desc,
help_func, help_data, TRUE);
} }
InfoDialog * InfoDialog *
info_dialog_new (gchar *title, info_dialog_new (GimpViewable *viewable,
const gchar *title,
const gchar *wmclass_name,
const gchar *stock_id,
const gchar *desc,
GimpHelpFunc help_func, GimpHelpFunc help_func,
gpointer help_data) gpointer help_data)
{ {
return info_dialog_new_extended (title, help_func, help_data, FALSE); return info_dialog_new_extended (viewable, title, wmclass_name,
stock_id, desc,
help_func, help_data, FALSE);
} }
void void
......
...@@ -57,10 +57,18 @@ struct _InfoDialog ...@@ -57,10 +57,18 @@ struct _InfoDialog
/* Info Dialog functions */ /* Info Dialog functions */
InfoDialog *info_dialog_new (gchar *title, InfoDialog *info_dialog_new (GimpViewable *viewable,
const gchar *title,
const gchar *wmclass_name,
const gchar *stock_id,
const gchar *desc,
GimpHelpFunc help_func, GimpHelpFunc help_func,
gpointer help_data); gpointer help_data);
InfoDialog *info_dialog_notebook_new (gchar *title, InfoDialog *info_dialog_notebook_new (GimpViewable *viewable,
const gchar *title,
const gchar *wmclass_name,
const gchar *stock_id,
const gchar *desc,
GimpHelpFunc help_func, GimpHelpFunc help_func,
gpointer help_data); gpointer help_data);
void info_dialog_free (InfoDialog *idialog); void info_dialog_free (InfoDialog *idialog);
......
...@@ -322,7 +322,10 @@ info_window_create (GimpDisplay *gdisp) ...@@ -322,7 +322,10 @@ info_window_create (GimpDisplay *gdisp)
type = gimp_image_base_type (gdisp->gimage); type = gimp_image_base_type (gdisp->gimage);
title = info_window_title (gdisp); title = info_window_title (gdisp);
info_win = info_dialog_notebook_new (title, info_win = info_dialog_notebook_new (GIMP_VIEWABLE (gdisp->gimage),
title, "image_info",
GIMP_STOCK_INFO,
_("Image Information"),
gimp_standard_help_func, gimp_standard_help_func,
"dialogs/info_window.html"); "dialogs/info_window.html");
g_free (title); g_free (title);
......
...@@ -32,6 +32,8 @@ ...@@ -32,6 +32,8 @@
#include "core/gimplayermask.h" #include "core/gimplayermask.h"
#include "core/gimpimage.h" #include "core/gimpimage.h"
#include "widgets/gimpviewabledialog.h"
#include "offset-dialog.h" #include "offset-dialog.h"
#include "libgimp/gimpintl.h" #include "libgimp/gimpintl.h"
...@@ -79,6 +81,8 @@ offset_dialog_create (GimpDrawable *drawable) ...@@ -79,6 +81,8 @@ offset_dialog_create (GimpDrawable *drawable)
GtkWidget *radio_button; GtkWidget *radio_button;
const gchar *title = NULL; const gchar *title = NULL;
g_return_if_fail (GIMP_IS_DRAWABLE (drawable));