Commit bbc102f9 authored by Michael Natterer's avatar Michael Natterer 😴 Committed by Michael Natterer
Browse files

app/display/gimpdisplayshell-callbacks.c app/tools/gimpcolorpickertool.c

2003-05-28  Michael Natterer  <mitch@gimp.org>

	* app/display/gimpdisplayshell-callbacks.c
	* app/tools/gimpcolorpickertool.c
	* app/tools/gimpcroptool.c
	* app/tools/gimphistogramtool.c
	* app/tools/gimpimagemaptool.c
	* app/tools/gimpmeasuretool.c
	* app/tools/gimptextoptions.c
	* app/tools/gimptransformtool.c
	* app/tools/paint_options.c
	* app/tools/tool_manager.c
	* app/widgets/gimppaletteeditor.c
	* app/widgets/gimptoolbox-color-area.c:
	don't #include "gui/dialogs.h" to get the global factories but use
	gimp_dialog_factory_from_name() instead.
parent 698a4ad0
2003-05-28 Michael Natterer <mitch@gimp.org>
* app/display/gimpdisplayshell-callbacks.c
* app/tools/gimpcolorpickertool.c
* app/tools/gimpcroptool.c
* app/tools/gimphistogramtool.c
* app/tools/gimpimagemaptool.c
* app/tools/gimpmeasuretool.c
* app/tools/gimptextoptions.c
* app/tools/gimptransformtool.c
* app/tools/paint_options.c
* app/tools/tool_manager.c
* app/widgets/gimppaletteeditor.c
* app/widgets/gimptoolbox-color-area.c:
don't #include "gui/dialogs.h" to get the global factories but use
gimp_dialog_factory_from_name() instead.
2003-05-28 Sven Neumann <sven@gimp.org>
 
* app/app_procs.[ch]: wrap gui_libs_init() so we don't need to
......@@ -49,8 +49,6 @@
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimpitemfactory.h"
#include "gui/dialogs.h"
#include "gimpdisplay.h"
#include "gimpdisplayshell.h"
#include "gimpdisplayshell-appearance.h"
......@@ -995,9 +993,12 @@ gimp_display_shell_canvas_tool_events (GtkWidget *canvas,
case GDK_Tab:
if (! state)
{
/* Hide or show all dialogs */
GimpDialogFactory *dialog_factory;
dialog_factory = gimp_dialog_factory_from_name ("toolbox");
gimp_dialog_factories_toggle (global_toolbox_factory);
/* Hide or show all dialogs */
gimp_dialog_factories_toggle (dialog_factory);
}
else if (! gimp_image_is_empty (gimage))
{
......
......@@ -43,7 +43,6 @@
#include "display/gimpdisplay.h"
#include "gui/dialogs.h"
#include "gui/info-dialog.h"
#include "gimpcolorpickeroptions.h"
......@@ -562,7 +561,7 @@ gimp_color_picker_tool_info_create (GimpToolInfo *tool_info,
gtk_widget_show (color_area);
gtk_widget_show (frame);
gimp_dialog_factory_add_foreign (global_dialog_factory,
gimp_dialog_factory_add_foreign (gimp_dialog_factory_from_name ("toplevel"),
"gimp-color-picker-tool-dialog",
info_dialog->shell);
......
......@@ -48,7 +48,6 @@
#include "widgets/gimpviewabledialog.h"
#include "widgets/gimpwidgets-utils.h"
#include "gui/dialogs.h"
#include "gui/info-dialog.h"
#include "gimpcropoptions.h"
......@@ -1081,7 +1080,7 @@ crop_info_create (GimpCropTool *crop)
gtk_box_pack_start (GTK_BOX (crop->crop_info->vbox), bbox, FALSE, FALSE, 0);
gtk_widget_show (bbox);
gimp_dialog_factory_add_foreign (global_dialog_factory,
gimp_dialog_factory_add_foreign (gimp_dialog_factory_from_name ("toplevel"),
"gimp-crop-tool-dialog",
crop->crop_info->shell);
}
......
......@@ -25,11 +25,6 @@
#include "tools-types.h"
#ifdef __GNUC__
#warning FIXME #include "gui/gui-types.h"
#endif
#include "gui/gui-types.h"
#include "base/gimphistogram.h"
#include "base/pixel-region.h"
......@@ -49,8 +44,6 @@
#include "display/gimpdisplay.h"
#include "gui/dialogs.h"
#include "gimphistogramtool.h"
#include "tool_manager.h"
......@@ -438,7 +431,7 @@ histogram_tool_dialog_new (GimpToolInfo *tool_info)
gtk_widget_show (htd->info_labels[i]);
}
gimp_dialog_factory_add_foreign (global_dialog_factory,
gimp_dialog_factory_add_foreign (gimp_dialog_factory_from_name ("toplevel"),
"gimp-histogram-tool-dialog",
htd->shell);
......
......@@ -24,11 +24,6 @@
#include "tools-types.h"
#ifdef __GNUC__
#warning FIXME #include "gui/gui-types.h"
#endif
#include "gui/gui-types.h"
#include "core/gimpdrawable.h"
#include "core/gimpimage.h"
#include "core/gimpimagemap.h"
......@@ -41,8 +36,6 @@
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
#include "gui/dialogs.h"
#include "gimpimagemaptool.h"
#include "gimptoolcontrol.h"
......@@ -256,10 +249,15 @@ gimp_image_map_tool_initialize (GimpTool *tool,
gtk_widget_show (vbox);
if (image_map_tool->shell_identifier)
gimp_dialog_factory_add_foreign (global_dialog_factory,
image_map_tool->shell_identifier,
image_map_tool->shell);
{
GimpDialogFactory *dialog_factory;
dialog_factory = gimp_dialog_factory_from_name ("toplevel");
gimp_dialog_factory_add_foreign (dialog_factory,
image_map_tool->shell_identifier,
image_map_tool->shell);
}
}
drawable = gimp_image_active_drawable (gdisp->gimage);
......
......@@ -48,7 +48,6 @@
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
#include "gui/dialogs.h"
#include "gui/info-dialog.h"
#include "gimpmeasureoptions.h"
......@@ -398,7 +397,7 @@ gimp_measure_tool_button_press (GimpTool *tool,
NULL);
gimp_dialog_factory_add_foreign (global_dialog_factory,
gimp_dialog_factory_add_foreign (gimp_dialog_factory_from_name ("toplevel"),
"gimp-measure-tool-dialog",
measure_tool_info->shell);
}
......
......@@ -34,6 +34,7 @@
#include "paint/gimppaintoptions.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimppropwidgets.h"
#include "widgets/gtkhwrapbox.h"
#include "widgets/gimpviewablebutton.h"
......@@ -89,8 +90,7 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
vbox = gimp_tool_options_gui (tool_options);
dialog_factory = g_object_get_data (G_OBJECT (tool_options),
"gimp-tool-options-dialog-factory");
dialog_factory = gimp_dialog_factory_from_name ("dock");
/* the main table */
table = gtk_table_new (3, 3, FALSE);
......
......@@ -36,6 +36,7 @@
#include "text/gimptext.h"
#include "widgets/gimpcolorpanel.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimpfontselection.h"
#include "widgets/gimppropwidgets.h"
#include "widgets/gimptexteditor.h"
......@@ -249,8 +250,7 @@ gimp_text_options_gui (GimpToolOptions *tool_options)
vbox = gimp_tool_options_gui (tool_options);
dialog_factory = g_object_get_data (G_OBJECT (tool_options),
"gimp-tool-options-dialog-factory");
dialog_factory = gimp_dialog_factory_from_name ("dock");
table = gtk_table_new (10, 3, FALSE);
gtk_table_set_col_spacings (GTK_TABLE (table), 2);
......
......@@ -54,7 +54,6 @@
#include "display/gimpdisplay-foreach.h"
#include "display/gimpprogress.h"
#include "gui/dialogs.h"
#include "gui/info-dialog.h"
#include "gimptoolcontrol.h"
......@@ -1150,10 +1149,15 @@ gimp_transform_tool_dialog (GimpTransformTool *tr_tool)
GIMP_TRANSFORM_TOOL_GET_CLASS (tr_tool)->dialog (tr_tool);
if (tr_tool->shell_identifier)
gimp_dialog_factory_add_foreign (global_dialog_factory,
tr_tool->shell_identifier,
tr_tool->info_dialog->shell);
{
GimpDialogFactory *dialog_factory;
dialog_factory = gimp_dialog_factory_from_name ("toplevel");
gimp_dialog_factory_add_foreign (dialog_factory,
tr_tool->shell_identifier,
tr_tool->info_dialog->shell);
}
}
}
......
......@@ -34,6 +34,7 @@
#include "paint/gimppaintoptions.h"
#include "widgets/gimpdialogfactory.h"
#include "widgets/gimppropwidgets.h"
#include "widgets/gtkhwrapbox.h"
#include "widgets/gimpviewablebutton.h"
......@@ -89,8 +90,7 @@ gimp_paint_options_gui (GimpToolOptions *tool_options)
vbox = gimp_tool_options_gui (tool_options);
dialog_factory = g_object_get_data (G_OBJECT (tool_options),
"gimp-tool-options-dialog-factory");
dialog_factory = gimp_dialog_factory_from_name ("dock");
/* the main table */
table = gtk_table_new (3, 3, FALSE);
......
......@@ -33,11 +33,6 @@
#include "display/gimpdisplay.h"
#ifdef __GNUC__
#warning FIXME: #include "gui/dialogs.h"
#endif
#include "gui/dialogs.h"
#include "gimpairbrushtool.h"
#include "gimpclonetool.h"
#include "gimpconvolvetool.h"
......@@ -52,8 +47,6 @@
#include "tool_options.h"
#include "tools.h"
#include "app_procs.h"
#include "gimp-intl.h"
......@@ -209,15 +202,7 @@ tool_manager_restore (Gimp *gimp)
if (options_gui_func)
{
g_object_set_data (G_OBJECT (tool_info->tool_options),
"gimp-tool-options-dialog-factory",
global_dock_factory);
options_gui = options_gui_func (tool_info->tool_options);
g_object_set_data (G_OBJECT (tool_info->tool_options),
"gimp-tool-options-dialog-factory",
NULL);
options_gui = (* options_gui_func) (tool_info->tool_options);
}
else
{
......
......@@ -37,6 +37,7 @@
#include "core/gimpdatafactory.h"
#include "core/gimppalette.h"
#include "gimpdialogfactory.h"
#include "gimpdnd.h"
#include "gimpitemfactory.h"
#include "gimppaletteeditor.h"
......@@ -44,7 +45,6 @@
#include "gimptoolbox-color-area.h"
#include "gui/color-notebook.h"
#include "gui/dialogs.h"
#include "gimp-intl.h"
......@@ -1017,12 +1017,16 @@ palette_editor_edit_clicked (GtkWidget *widget,
if (! editor->color_notebook)
{
GimpDialogFactory *toplevel_factory;
toplevel_factory = gimp_dialog_factory_from_name ("toplevel");
editor->color_notebook =
color_notebook_viewable_new (GIMP_VIEWABLE (palette),
_("Edit Palette Color"),
GTK_STOCK_SELECT_COLOR,
_("Edit Color Palette Entry"),
global_dialog_factory,
toplevel_factory,
"gimp-palette-editor-color-dialog",
(const GimpRGB *) &editor->color->color,
palette_editor_color_notebook_callback,
......
......@@ -41,7 +41,6 @@
#include "gimptoolbox-color-area.h"
#include "gui/color-notebook.h"
#include "gui/dialogs.h"
#ifdef DISPLAY_FILTERS
#include "gdisplay_color.h"
......@@ -396,8 +395,12 @@ color_area_edit (GimpContext *context)
if (! color_notebook)
{
GimpDialogFactory *toplevel_factory;
toplevel_factory = gimp_dialog_factory_from_name ("toplevel");
color_notebook = color_notebook_new (title,
global_dialog_factory,
toplevel_factory,
"gimp-toolbox-color-dialog",
(const GimpRGB *) &color,
color_area_select_callback,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment