Commit f234f146 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann

app/tools/gimptextoptions.[ch] app/tools/gimptexttool.c make the text

2006-08-28  Sven Neumann  <sven@gimp.org>

	* app/tools/gimptextoptions.[ch]
	* app/tools/gimptexttool.c
	* app/widgets/gimptexteditor.[ch]: make the text editor transient
	to the display shell.
parent 3db2d105
2006-08-28 Sven Neumann <sven@gimp.org>
* app/tools/gimptextoptions.[ch]
* app/tools/gimptexttool.c
* app/widgets/gimptexteditor.[ch]: make the text editor transient
to the display shell.
2006-08-28 Michael Natterer <mitch@gimp.org>
* app/widgets/gimppdbdialog.c (gimp_pdb_dialog_run_callback):
......
......@@ -543,7 +543,8 @@ gimp_text_options_editor_notify_font (GimpTextOptions *options,
}
GtkWidget *
gimp_text_options_editor_new (GimpTextOptions *options,
gimp_text_options_editor_new (GtkWindow *parent,
GimpTextOptions *options,
GimpMenuFactory *menu_factory,
const gchar *title)
{
......@@ -554,7 +555,7 @@ gimp_text_options_editor_new (GimpTextOptions *options,
g_return_val_if_fail (GIMP_IS_MENU_FACTORY (menu_factory), NULL);
g_return_val_if_fail (title != NULL, NULL);
editor = gimp_text_editor_new (title, menu_factory);
editor = gimp_text_editor_new (title, parent, menu_factory);
font_name = gimp_context_get_font_name (GIMP_CONTEXT (options));
......
......@@ -67,7 +67,8 @@ void gimp_text_options_connect_text (GimpTextOptions *options,
GtkWidget * gimp_text_options_gui (GimpToolOptions *tool_options);
GtkWidget * gimp_text_options_editor_new (GimpTextOptions *options,
GtkWidget * gimp_text_options_editor_new (GtkWindow *parent,
GimpTextOptions *options,
GimpMenuFactory *menu_factory,
const gchar *title);
......
......@@ -739,6 +739,7 @@ gimp_text_tool_editor (GimpTextTool *text_tool)
{
GimpTextOptions *options;
GimpDialogFactory *dialog_factory;
GtkWindow *parent = NULL;
if (text_tool->editor)
{
......@@ -750,7 +751,10 @@ gimp_text_tool_editor (GimpTextTool *text_tool)
dialog_factory = gimp_dialog_factory_from_name ("toplevel");
text_tool->editor = gimp_text_options_editor_new (options,
if (GIMP_TOOL (text_tool)->display)
parent = GTK_WINDOW (GIMP_TOOL (text_tool)->display->shell);
text_tool->editor = gimp_text_options_editor_new (parent, options,
dialog_factory->menu_factory,
_("GIMP Text Editor"));
......
......@@ -127,6 +127,7 @@ gimp_text_editor_finalize (GObject *object)
GtkWidget *
gimp_text_editor_new (const gchar *title,
GtkWindow *parent,
GimpMenuFactory *menu_factory)
{
GimpTextEditor *editor;
......@@ -135,6 +136,7 @@ gimp_text_editor_new (const gchar *title,
GtkWidget *scrolled_window;
g_return_val_if_fail (title != NULL, NULL);
g_return_val_if_fail (parent == NULL || GTK_IS_WINDOW (parent), NULL);
g_return_val_if_fail (GIMP_IS_MENU_FACTORY (menu_factory), NULL);
editor = g_object_new (GIMP_TYPE_TEXT_EDITOR,
......@@ -151,6 +153,9 @@ gimp_text_editor_new (const gchar *title,
G_CALLBACK (gtk_widget_destroy),
NULL);
if (parent)
gtk_window_set_transient_for (GTK_WINDOW (editor), parent);
editor->ui_manager = gimp_menu_factory_manager_new (menu_factory,
"<TextEditor>",
editor, FALSE);
......
......@@ -55,6 +55,7 @@ struct _GimpTextEditorClass
GType gimp_text_editor_get_type (void) G_GNUC_CONST;
GtkWidget * gimp_text_editor_new (const gchar *title,
GtkWindow *parent,
GimpMenuFactory *menu_factory);
void gimp_text_editor_set_text (GimpTextEditor *editor,
......
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