[gimp] app: keep the "use-editor" setting consistent
- From: Michael Natterer <mitch src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: keep the "use-editor" setting consistent
- Date: Sun, 21 Feb 2010 18:00:37 +0000 (UTC)
commit 4295b1712c55ea2fba986fbb4a6d4eed34669a2f
Author: Michael Natterer <mitch gimp org>
Date: Sun Feb 21 18:59:51 2010 +0100
app: keep the "use-editor" setting consistent
When the editor is closed explicitely, set "use-editor" to FALSE
app/tools/gimptexttool-editor.c | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
---
diff --git a/app/tools/gimptexttool-editor.c b/app/tools/gimptexttool-editor.c
index a14af8c..6da51ef 100644
--- a/app/tools/gimptexttool-editor.c
+++ b/app/tools/gimptexttool-editor.c
@@ -69,6 +69,8 @@ static void gimp_text_tool_options_notify (GimpTextOptions *options,
GParamSpec *pspec,
GimpTextTool *text_tool);
static void gimp_text_tool_editor_dialog (GimpTextTool *text_tool);
+static void gimp_text_tool_editor_destroy (GtkWidget *dialog,
+ GimpTextTool *text_tool);
static void gimp_text_tool_enter_text (GimpTextTool *text_tool,
const gchar *str);
static gint gimp_text_tool_xy_to_offset (GimpTextTool *text_tool,
@@ -156,7 +158,12 @@ gimp_text_tool_editor_halt (GimpTextTool *text_tool)
text_tool);
if (text_tool->editor_dialog)
- gtk_widget_destroy (text_tool->editor_dialog);
+ {
+ g_signal_handlers_disconnect_by_func (text_tool->editor_dialog,
+ gimp_text_tool_editor_destroy,
+ text_tool);
+ gtk_widget_destroy (text_tool->editor_dialog);
+ }
if (text_tool->proxy_text_view)
{
@@ -1024,10 +1031,25 @@ gimp_text_tool_editor_dialog (GimpTextTool *text_tool)
"gimp-text-tool-dialog",
text_tool->editor_dialog);
+ g_signal_connect (text_tool->editor_dialog, "destroy",
+ G_CALLBACK (gimp_text_tool_editor_destroy),
+ text_tool);
+
gtk_widget_show (text_tool->editor_dialog);
}
static void
+gimp_text_tool_editor_destroy (GtkWidget *dialog,
+ GimpTextTool *text_tool)
+{
+ GimpTextOptions *options = GIMP_TEXT_TOOL_GET_OPTIONS (text_tool);
+
+ g_object_set (options,
+ "use-editor", FALSE,
+ NULL);
+}
+
+static void
gimp_text_tool_enter_text (GimpTextTool *text_tool,
const gchar *str)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]