[gimp] Add new function gimp_display_shell_present()



commit 94dcbe0e2e60f866544c16f91ee63786834cf6e8
Author: Michael Natterer <mitch gimp org>
Date:   Sun Oct 4 19:24:55 2009 +0200

    Add new function gimp_display_shell_present()
    
    Not only presents the shell's toplevel, but also makes it the active
    shell in the image window.

 app/display/gimpdisplayshell.c |   17 +++++++++++++++++
 app/display/gimpdisplayshell.h |    3 ++-
 2 files changed, 19 insertions(+), 1 deletions(-)
---
diff --git a/app/display/gimpdisplayshell.c b/app/display/gimpdisplayshell.c
index d3ff17e..06d5ee7 100644
--- a/app/display/gimpdisplayshell.c
+++ b/app/display/gimpdisplayshell.c
@@ -1177,6 +1177,23 @@ gimp_display_shell_get_statusbar (GimpDisplayShell *shell)
 }
 
 void
+gimp_display_shell_present (GimpDisplayShell *shell)
+{
+  GimpImageWindow *window;
+
+  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+
+  window = gimp_display_shell_get_window (shell);
+
+  if (window)
+    {
+      gimp_image_window_set_active_shell (window, shell);
+
+      gtk_window_present (GTK_WINDOW (window));
+    }
+}
+
+void
 gimp_display_shell_reconnect (GimpDisplayShell *shell)
 {
   g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
diff --git a/app/display/gimpdisplayshell.h b/app/display/gimpdisplayshell.h
index 9a489fc..6bf954a 100644
--- a/app/display/gimpdisplayshell.h
+++ b/app/display/gimpdisplayshell.h
@@ -224,9 +224,10 @@ GtkWidget       * gimp_display_shell_new           (GimpDisplay        *display,
                                                     GimpUIManager      *popup_manager);
 
 GimpImageWindow * gimp_display_shell_get_window    (GimpDisplayShell   *shell);
-
 GimpStatusbar   * gimp_display_shell_get_statusbar (GimpDisplayShell   *shell);
 
+void              gimp_display_shell_present       (GimpDisplayShell   *shell);
+
 void              gimp_display_shell_reconnect     (GimpDisplayShell   *shell);
 
 void              gimp_display_shell_empty         (GimpDisplayShell   *shell);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]