[gimp] Go via gtk_widget_get_toplevel() to get to the statusbar
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Go via gtk_widget_get_toplevel() to get to the statusbar
- Date: Tue, 29 Sep 2009 18:37:39 +0000 (UTC)
commit 0b12978761f376f58791b5a124c81f568b05c5e1
Author: Michael Natterer <mitch gimp org>
Date: Thu Sep 24 10:30:47 2009 +0200
Go via gtk_widget_get_toplevel() to get to the statusbar
app/tools/gimpmeasuretool.c | 17 +++++++++++------
1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/app/tools/gimpmeasuretool.c b/app/tools/gimpmeasuretool.c
index b6b59f8..9338d2f 100644
--- a/app/tools/gimpmeasuretool.c
+++ b/app/tools/gimpmeasuretool.c
@@ -44,6 +44,7 @@
#include "display/gimpdisplay.h"
#include "display/gimpdisplayshell.h"
+#include "display/gimpimagewindow.h"
#include "gimpmeasureoptions.h"
#include "gimpmeasuretool.h"
@@ -330,13 +331,17 @@ gimp_measure_tool_button_press (GimpTool *tool,
}
/* create the info window if necessary */
- if (! measure->dialog && (options->use_info_window ||
- /* FIXME image window */
- ! GTK_WIDGET_VISIBLE (GIMP_IMAGE_WINDOW (shell)->statusbar)))
+ if (! measure->dialog)
{
- measure->dialog = gimp_measure_tool_dialog_new (measure);
- g_object_add_weak_pointer (G_OBJECT (measure->dialog),
- (gpointer) &measure->dialog);
+ GtkWidget *toplevel = gtk_widget_get_toplevel (GTK_WIDGET (shell));
+
+ if (options->use_info_window ||
+ ! GTK_WIDGET_VISIBLE (GIMP_IMAGE_WINDOW (toplevel)->statusbar))
+ {
+ measure->dialog = gimp_measure_tool_dialog_new (measure);
+ g_object_add_weak_pointer (G_OBJECT (measure->dialog),
+ (gpointer) &measure->dialog);
+ }
}
if (measure->dialog)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]