[gimp] Go via the tolevel to get to the image window's statusbar
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gimp] Go via the tolevel to get to the image window's statusbar
- Date: Tue, 29 Sep 2009 18:38:30 +0000 (UTC)
commit cf14f1ce626aa4bbbafc4b661ad5f2277b4e71a5
Author: Michael Natterer <mitch gimp org>
Date: Fri Sep 25 11:53:30 2009 +0200
Go via the tolevel to get to the image window's statusbar
app/display/gimpdisplay-handlers.c | 42 ++++++++++++++++++++++-------------
1 files changed, 26 insertions(+), 16 deletions(-)
---
diff --git a/app/display/gimpdisplay-handlers.c b/app/display/gimpdisplay-handlers.c
index 3b4d3db..c5b3967 100644
--- a/app/display/gimpdisplay-handlers.c
+++ b/app/display/gimpdisplay-handlers.c
@@ -162,14 +162,19 @@ gimp_display_saved_handler (GimpImage *image,
const gchar *uri,
GimpDisplay *display)
{
- /* FIXME image window */
- GtkWidget *statusbar = GIMP_IMAGE_WINDOW (display->shell)->statusbar;
- gchar *filename = file_utils_uri_display_name (uri);
-
- gimp_statusbar_push_temp (GIMP_STATUSBAR (statusbar), GIMP_MESSAGE_INFO,
- GTK_STOCK_SAVE, _("Image saved to '%s'"),
- filename);
- g_free (filename);
+ GtkWidget *toplevel = gtk_widget_get_toplevel (display->shell);
+ GimpImageWindow *window = GIMP_IMAGE_WINDOW (toplevel);
+
+ if (gimp_image_window_get_active_display (window) == display)
+ {
+ gchar *filename = file_utils_uri_display_name (uri);
+
+ gimp_statusbar_push_temp (GIMP_STATUSBAR (window->statusbar),
+ GIMP_MESSAGE_INFO,
+ GTK_STOCK_SAVE, _("Image saved to '%s'"),
+ filename);
+ g_free (filename);
+ }
}
static void
@@ -177,13 +182,18 @@ gimp_display_exported_handler (GimpImage *image,
const gchar *uri,
GimpDisplay *display)
{
- /* FIXME image window */
- GtkWidget *statusbar = GIMP_IMAGE_WINDOW (display->shell)->statusbar;
- gchar *filename = file_utils_uri_display_name (uri);
-
- gimp_statusbar_push_temp (GIMP_STATUSBAR (statusbar), GIMP_MESSAGE_INFO,
- GTK_STOCK_SAVE, _("Image exported to '%s'"),
- filename);
- g_free (filename);
+ GtkWidget *toplevel = gtk_widget_get_toplevel (display->shell);
+ GimpImageWindow *window = GIMP_IMAGE_WINDOW (toplevel);
+
+ if (gimp_image_window_get_active_display (window) == display)
+ {
+ gchar *filename = file_utils_uri_display_name (uri);
+
+ gimp_statusbar_push_temp (GIMP_STATUSBAR (window->statusbar),
+ GIMP_MESSAGE_INFO,
+ GTK_STOCK_SAVE, _("Image exported to '%s'"),
+ filename);
+ g_free (filename);
+ }
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]