[gnome-builder] workbench: general cleanup



commit 121e23fc801a4fc2bcd40d9dcc83eacdf10bdf0d
Author: Christian Hergert <christian hergert me>
Date:   Sun Dec 14 02:33:06 2014 -0800

    workbench: general cleanup

 src/app/gb-application.c     |   23 -----------------------
 src/resources/gtk/menus.ui   |    2 +-
 src/workbench/gb-workbench.c |    4 ++--
 src/workbench/gb-workbench.h |   14 +++++++-------
 4 files changed, 10 insertions(+), 33 deletions(-)
---
diff --git a/src/app/gb-application.c b/src/app/gb-application.c
index f3a5fa3..816e463 100644
--- a/src/app/gb-application.c
+++ b/src/app/gb-application.c
@@ -442,32 +442,9 @@ gb_application_activate_preferences_action (GSimpleAction *action,
 }
 
 static void
-gb_application_activate_about_action (GSimpleAction *action,
-                                      GVariant      *parameter,
-                                      gpointer       user_data)
-{
-  GList *list;
-
-  g_return_if_fail (GB_IS_APPLICATION (user_data));
-
-  list = gtk_application_get_windows (GTK_APPLICATION (user_data));
-
-  for (; list; list = list->next)
-    {
-      if (GB_IS_WORKBENCH (list->data))
-        {
-          gb_workbench_roll_credits (list->data);
-          gtk_window_present (list->data);
-          break;
-        }
-    }
-}
-
-static void
 gb_application_register_actions (GbApplication *self)
 {
   static const GActionEntry action_entries[] = {
-    { "about", gb_application_activate_about_action },
     { "preferences", gb_application_activate_preferences_action },
     { "quit", gb_application_activate_quit_action },
   };
diff --git a/src/resources/gtk/menus.ui b/src/resources/gtk/menus.ui
index 77e4cce..3378607 100644
--- a/src/resources/gtk/menus.ui
+++ b/src/resources/gtk/menus.ui
@@ -17,7 +17,7 @@
       </item>
       <item>
         <attribute name="label" translatable="yes">_About</attribute>
-        <attribute name="action">app.about</attribute>
+        <attribute name="action">win.about</attribute>
       </item>
       <item>
         <attribute name="label" translatable="yes">_Quit</attribute>
diff --git a/src/workbench/gb-workbench.c b/src/workbench/gb-workbench.c
index dbbd7ad..c69c6c1 100644
--- a/src/workbench/gb-workbench.c
+++ b/src/workbench/gb-workbench.c
@@ -137,7 +137,7 @@ gb_workbench_get_workspace (GbWorkbench *workbench,
   return NULL;
 }
 
-void
+static void
 gb_workbench_roll_credits (GbWorkbench *workbench)
 {
   g_return_if_fail (GB_IS_WORKBENCH (workbench));
@@ -425,10 +425,10 @@ gb_workbench_constructed (GObject *object)
     { "go-forward", on_go_forward_activate },
     { "show-command-bar", on_show_command_bar_activate },
     { "toggle-command-bar", on_toggle_command_bar_activate, "b" },
-    { "roll-credits", on_roll_credits },
     { "new-document", on_new_document },
     { "open", on_open },
     { "save-all", on_save_all },
+    { "about", on_roll_credits },
   };
   GbWorkbenchPrivate *priv;
   GbWorkbench *workbench = (GbWorkbench *)object;
diff --git a/src/workbench/gb-workbench.h b/src/workbench/gb-workbench.h
index 7e08256..e651999 100644
--- a/src/workbench/gb-workbench.h
+++ b/src/workbench/gb-workbench.h
@@ -54,13 +54,13 @@ struct _GbWorkbenchClass
                              GbWorkspace *workspace);
 };
 
-GType             gb_workbench_get_type             (void) G_GNUC_CONST;
-GbNavigationList *gb_workbench_get_navigation_list  (GbWorkbench *workbench);
-GbWorkspace      *gb_workbench_get_active_workspace (GbWorkbench *workbench);
-GbWorkspace      *gb_workbench_get_workspace        (GbWorkbench *workbench,
-                                                     GType        type);
-gpointer          gb_workbench_get_command_manager  (GbWorkbench *workbench);
-void              gb_workbench_roll_credits         (GbWorkbench *workbench);
+GType              gb_workbench_get_type             (void);
+
+GbNavigationList  *gb_workbench_get_navigation_list  (GbWorkbench *workbench);
+GbWorkspace       *gb_workbench_get_active_workspace (GbWorkbench *workbench);
+GbWorkspace       *gb_workbench_get_workspace        (GbWorkbench *workbench,
+                                                      GType        type);
+gpointer           gb_workbench_get_command_manager  (GbWorkbench *workbench);
 
 GbWorkbench      *gb_navigation_list_get_workbench  (GbNavigationList *list);
 


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