[gimp] Move image window related functions together (menubar and statusbar)



commit e7e87597107c57f9a77704f3353b73d044141b4c
Author: Michael Natterer <mitch gimp org>
Date:   Fri Sep 25 01:18:22 2009 +0200

    Move image window related functions together (menubar and statusbar)

 app/display/gimpdisplayshell-appearance.c |   69 +++++++++++++++--------------
 app/display/gimpdisplayshell-appearance.h |    8 ++--
 2 files changed, 39 insertions(+), 38 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-appearance.c b/app/display/gimpdisplayshell-appearance.c
index 3356e5c..9f2c4d0 100644
--- a/app/display/gimpdisplayshell-appearance.c
+++ b/app/display/gimpdisplayshell-appearance.c
@@ -72,12 +72,13 @@ gimp_display_shell_appearance_update (GimpDisplayShell *shell)
 
   gimp_display_shell_set_show_menubar       (shell,
                                              options->show_menubar);
+  gimp_display_shell_set_show_statusbar     (shell,
+                                             options->show_statusbar);
+
   gimp_display_shell_set_show_rulers        (shell,
                                              options->show_rulers);
   gimp_display_shell_set_show_scrollbars    (shell,
                                              options->show_scrollbars);
-  gimp_display_shell_set_show_statusbar     (shell,
-                                             options->show_statusbar);
   gimp_display_shell_set_show_selection     (shell,
                                              options->show_selection);
   gimp_display_shell_set_show_layer         (shell,
@@ -130,6 +131,38 @@ gimp_display_shell_get_show_menubar (const GimpDisplayShell *shell)
 }
 
 void
+gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
+                                       gboolean          show)
+{
+  GimpDisplayOptions *options;
+  GtkWidget          *toplevel;
+  GimpImageWindow    *window;
+
+  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
+
+  options  = appearance_get_options (shell);
+  toplevel = gtk_widget_get_toplevel (GTK_WIDGET (shell));
+  window   = GIMP_IMAGE_WINDOW (toplevel);
+
+  g_object_set (options, "show-statusbar", show, NULL);
+
+  if (gimp_image_window_get_active_display (window) == shell->display)
+    {
+      gimp_statusbar_set_visible (GIMP_STATUSBAR (window->statusbar), show);
+    }
+
+  appearance_set_action_active (shell, "view-show-statusbar", show);
+}
+
+gboolean
+gimp_display_shell_get_show_statusbar (const GimpDisplayShell *shell)
+{
+  g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
+
+  return appearance_get_options (shell)->show_statusbar;
+}
+
+void
 gimp_display_shell_set_show_rulers (GimpDisplayShell *shell,
                                     gboolean          show)
 {
@@ -230,38 +263,6 @@ gimp_display_shell_get_show_scrollbars (const GimpDisplayShell *shell)
 }
 
 void
-gimp_display_shell_set_show_statusbar (GimpDisplayShell *shell,
-                                       gboolean          show)
-{
-  GimpDisplayOptions *options;
-  GtkWidget          *toplevel;
-  GimpImageWindow    *window;
-
-  g_return_if_fail (GIMP_IS_DISPLAY_SHELL (shell));
-
-  options  = appearance_get_options (shell);
-  toplevel = gtk_widget_get_toplevel (GTK_WIDGET (shell));
-  window   = GIMP_IMAGE_WINDOW (toplevel);
-
-  g_object_set (options, "show-statusbar", show, NULL);
-
-  if (gimp_image_window_get_active_display (window) == shell->display)
-    {
-      gimp_statusbar_set_visible (GIMP_STATUSBAR (window->statusbar), show);
-    }
-
-  appearance_set_action_active (shell, "view-show-statusbar", show);
-}
-
-gboolean
-gimp_display_shell_get_show_statusbar (const GimpDisplayShell *shell)
-{
-  g_return_val_if_fail (GIMP_IS_DISPLAY_SHELL (shell), FALSE);
-
-  return appearance_get_options (shell)->show_statusbar;
-}
-
-void
 gimp_display_shell_set_show_selection (GimpDisplayShell *shell,
                                        gboolean          show)
 {
diff --git a/app/display/gimpdisplayshell-appearance.h b/app/display/gimpdisplayshell-appearance.h
index c899c6e..4256f8f 100644
--- a/app/display/gimpdisplayshell-appearance.h
+++ b/app/display/gimpdisplayshell-appearance.h
@@ -25,6 +25,10 @@ void       gimp_display_shell_set_show_menubar       (GimpDisplayShell       *sh
                                                       gboolean                show);
 gboolean   gimp_display_shell_get_show_menubar       (const GimpDisplayShell *shell);
 
+void       gimp_display_shell_set_show_statusbar     (GimpDisplayShell       *shell,
+                                                      gboolean                show);
+gboolean   gimp_display_shell_get_show_statusbar     (const GimpDisplayShell *shell);
+
 void       gimp_display_shell_set_show_rulers        (GimpDisplayShell       *shell,
                                                       gboolean                show);
 gboolean   gimp_display_shell_get_show_rulers        (const GimpDisplayShell *shell);
@@ -33,10 +37,6 @@ void       gimp_display_shell_set_show_scrollbars    (GimpDisplayShell       *sh
                                                       gboolean                show);
 gboolean   gimp_display_shell_get_show_scrollbars    (const GimpDisplayShell *shell);
 
-void       gimp_display_shell_set_show_statusbar     (GimpDisplayShell       *shell,
-                                                      gboolean                show);
-gboolean   gimp_display_shell_get_show_statusbar     (const GimpDisplayShell *shell);
-
 void       gimp_display_shell_set_show_selection     (GimpDisplayShell       *shell,
                                                       gboolean                show);
 gboolean   gimp_display_shell_get_show_selection     (const GimpDisplayShell *shell);



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