[gimp] app: Update 'Export to' after doing an export
- From: Martin Nordholts <martinn src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp] app: Update 'Export to' after doing an export
- Date: Sun, 17 May 2009 02:35:00 -0400 (EDT)
commit d62a057e16a37e2f26d9d91aa6963a5fd0ee60f4
Author: Martin Nordholts <martinn src gnome org>
Date: Sat May 16 19:42:59 2009 +0200
app: Update 'Export to' after doing an export
Make sure 'File -> Export to' is updated after doing an export.
---
app/display/gimpdisplay-handlers.c | 17 +++++++++++++++++
1 files changed, 17 insertions(+), 0 deletions(-)
diff --git a/app/display/gimpdisplay-handlers.c b/app/display/gimpdisplay-handlers.c
index 72df7e6..592323a 100644
--- a/app/display/gimpdisplay-handlers.c
+++ b/app/display/gimpdisplay-handlers.c
@@ -28,6 +28,8 @@
#include "file/file-utils.h"
+#include "widgets/gimpuimanager.h"
+
#include "gimpdisplay.h"
#include "gimpdisplay-handlers.h"
#include "gimpdisplayshell.h"
@@ -170,6 +172,18 @@ gimp_display_saved_handler (GimpImage *image,
g_free (filename);
}
+static gboolean
+gimp_display_update_ui_manager_idle (GimpDisplay *display)
+{
+ if (! display || ! display->shell)
+ return FALSE;
+
+ /* Update the File/Export to label */
+ gimp_ui_manager_update (GIMP_DISPLAY_SHELL (display->shell)->menubar_manager, display);
+
+ return FALSE;
+}
+
static void
gimp_display_exported_handler (GimpImage *image,
const gchar *uri,
@@ -181,5 +195,8 @@ gimp_display_exported_handler (GimpImage *image,
gimp_statusbar_push_temp (GIMP_STATUSBAR (statusbar), GIMP_MESSAGE_INFO,
GTK_STOCK_SAVE, _("Image exported to '%s'"), filename);
g_free (filename);
+
+ /* Schedule updating of the 'Export to' label */
+ g_idle_add ((GSourceFunc) gimp_display_update_ui_manager_idle, display);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]