[gnome-video-arcade] Move GtkActions to the GtkBuilder file.



commit d9488ad8dc3227767270884d9961a3161bc5d67a
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Apr 24 09:37:55 2011 -0400

    Move GtkActions to the GtkBuilder file.
    
    We can wire up more of the widgets directly in the GtkBuilder file now.

 data/gnome-video-arcade.builder |  253 +++++++++++++-
 src/gva-audit.c                 |    4 -
 src/gva-main.c                  |   20 -
 src/gva-preferences.c           |   16 -
 src/gva-properties.c            |    8 -
 src/gva-ui.c                    |  729 ++++++++++++++-------------------------
 src/gva-ui.h                    |   23 ++
 7 files changed, 519 insertions(+), 534 deletions(-)
---
diff --git a/data/gnome-video-arcade.builder b/data/gnome-video-arcade.builder
index 510dc62..d571c98 100644
--- a/data/gnome-video-arcade.builder
+++ b/data/gnome-video-arcade.builder
@@ -2,6 +2,227 @@
 <interface>
   <!-- interface-requires gtk+ 3.0 -->
   <!-- interface-requires gva 0.0 -->
+  <object class="GtkActionGroup" id="lockable-actions">
+    <child>
+      <object class="GtkAction" id="insert-favorite">
+        <property name="label" translatable="yes">Add to _Favorites</property>
+        <property name="stock_id">gtk-add</property>
+        <property name="icon_name">Add the selected game to my list of favorites</property>
+        <signal name="activate" handler="gva_action_insert_favorite_cb" swapped="no"/>
+      </object>
+      <accelerator key="plus" modifiers="GDK_CONTROL_MASK"/>
+    </child>
+    <child>
+      <object class="GtkAction" id="next-game">
+        <property name="tooltip" translatable="yes">Show next game</property>
+        <property name="stock_id">gtk-go-forward</property>
+        <signal name="activate" handler="gva_action_next_game_cb" swapped="no"/>
+      </object>
+      <accelerator key="Right" modifiers="GDK_MOD1_MASK"/>
+    </child>
+    <child>
+      <object class="GtkAction" id="play-back">
+        <property name="label" translatable="yes">Play _Back...</property>
+        <property name="tooltip" translatable="yes">Play back the selected game recording</property>
+        <property name="stock_id">gtk-media-play</property>
+        <signal name="activate" handler="gva_action_play_back_cb" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="previous-game">
+        <property name="tooltip" translatable="yes">Show previous game</property>
+        <property name="stock_id">gtk-go-back</property>
+        <signal name="activate" handler="gva_action_previous_game_cb" swapped="no"/>
+      </object>
+      <accelerator key="Left" modifiers="GDK_MOD1_MASK"/>
+    </child>
+    <child>
+      <object class="GtkAction" id="properties">
+        <property name="label" translatable="yes">_Properties</property>
+        <property name="tooltip" translatable="yes">Show information about the selected game</property>
+        <property name="stock_id">gtk-properties</property>
+        <signal name="activate" handler="gva_action_properties_cb" swapped="no"/>
+      </object>
+      <accelerator key="p" modifiers="GDK_CONTROL_MASK"/>
+    </child>
+    <child>
+      <object class="GtkAction" id="record">
+        <property name="label" translatable="yes">_Record</property>
+        <property name="tooltip" translatable="yes">Start the selected game and record keypresses to a file</property>
+        <property name="stock_id">gtk-media-record</property>
+        <signal name="activate" handler="gva_action_record_cb" swapped="no"/>
+      </object>
+      <accelerator key="r" modifiers="GDK_CONTROL_MASK"/>
+    </child>
+    <child>
+      <object class="GtkAction" id="remove-column">
+        <property name="label">(Label is set at runtime)</property>
+        <property name="tooltip">(Tooltip is set at runtime)</property>
+        <signal name="activate" handler="gva_action_remove_column_cb" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="remove-favorite">
+        <property name="label" translatable="yes">Remove from _Favorites</property>
+        <property name="tooltip" translatable="yes">Remove the selected game from my list of favorites</property>
+        <property name="stock_id">gtk-remove</property>
+        <signal name="activate" handler="gva_action_remove_favorite_cb" swapped="no"/>
+      </object>
+      <accelerator key="minus" modifiers="GDK_CONTROL_MASK"/>
+    </child>
+    <child>
+      <object class="GtkAction" id="save-errors">
+        <property name="label" translatable="yes">Save _As...</property>
+        <property name="tooltip" translatable="yes">Save ROM errors to a file</property>
+        <property name="stock_id">gtk-save-as</property>
+        <signal name="activate" handler="gva_action_save_errors_cb" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="search">
+        <property name="label" translatable="yes">S_earch...</property>
+        <property name="tooltip" translatable="yes">Show a custom list of games</property>
+        <property name="stock_id">gtk-find</property>
+        <signal name="activate" handler="gva_action_search_cb" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="show-play-back">
+        <property name="label" translatable="yes">Play _Back...</property>
+        <property name="tooltip" translatable="yes">Play back a previously recorded game</property>
+        <property name="stock_id">gtk-media-play</property>
+        <signal name="activate" handler="gva_action_show_play_back_cb" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="start">
+        <property name="label" translatable="yes">_Start</property>
+        <property name="tooltip" translatable="yes">Start the selected game</property>
+        <property name="stock_id">gtk-execute</property>
+        <signal name="activate" handler="gva_action_start_cb" swapped="no"/>
+      </object>
+      <accelerator key="s" modifiers="GDK_CONTROL_MASK"/>
+    </child>
+    <child>
+      <object class="GtkToggleAction" id="show-clones">
+        <property name="label" translatable="yes">Show _alternate versions of original games</property>
+        <signal name="toggled" handler="gva_action_show_clones_cb" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkRadioAction" id="view-inital">
+        <property name="label">(This is a bogus view that we switch away from on startup.)</property>
+        <property name="draw_as_radio">True</property>
+        <property name="active">True</property>
+        <property name="value">-1</property>
+        <signal name="changed" handler="gva_action_view_changed_cb" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkRadioAction" id="view-available">
+        <property name="label" translatable="yes">_Available Games</property>
+        <property name="tooltip" translatable="yes">Show all available games</property>
+        <property name="draw_as_radio">True</property>
+        <property name="group">view-inital</property>
+      </object>
+      <accelerator key="1" modifiers="GDK_CONTROL_MASK"/>
+    </child>
+    <child>
+      <object class="GtkRadioAction" id="view-favorites">
+        <property name="label" translatable="yes">_Favorite Games</property>
+        <property name="tooltip" translatable="yes">Only show my favorite games</property>
+        <property name="draw_as_radio">True</property>
+        <property name="value">1</property>
+        <property name="group">view-inital</property>
+      </object>
+      <accelerator key="2" modifiers="GDK_CONTROL_MASK"/>
+    </child>
+    <child>
+      <object class="GtkRadioAction" id="view-results">
+        <property name="label" translatable="yes">Search _Results</property>
+        <property name="tooltip" translatable="yes">Show my search results</property>
+        <property name="draw_as_radio">True</property>
+        <property name="value">2</property>
+        <property name="group">view-inital</property>
+      </object>
+      <accelerator key="3" modifiers="GDK_CONTROL_MASK"/>
+    </child>
+  </object>
+  <object class="GtkActionGroup" id="standard-actions">
+    <child>
+      <object class="GtkAction" id="about">
+        <property name="label" translatable="yes">_About</property>
+        <property name="tooltip" translatable="yes">Show information about the application</property>
+        <property name="stock_id">gtk-about</property>
+        <signal name="activate" handler="gva_action_about_cb" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="contents">
+        <property name="label" translatable="yes">_Contents</property>
+        <property name="tooltip" translatable="yes">Open the help documentation</property>
+        <property name="stock_id">gtk-help</property>
+        <signal name="activate" handler="gva_action_contents_cb" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="preferences">
+        <property name="label" translatable="yes">_Preferences</property>
+        <property name="tooltip" translatable="yes">Configure the application</property>
+        <property name="stock_id">gtk-preferences</property>
+        <signal name="activate" handler="gva_action_preferences_cb" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="quit">
+        <property name="label" translatable="yes">_Quit</property>
+        <property name="tooltip" translatable="yes">Quit the application</property>
+        <property name="stock_id">gtk-quit</property>
+        <signal name="activate" handler="gva_action_quit_cb" swapped="no"/>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="add-column-menu">
+        <property name="label" translatable="yes">_Add Column</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="edit-menu">
+        <property name="label" translatable="yes">_Edit</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="game-menu">
+        <property name="label" translatable="yes">_Game</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="help-menu">
+        <property name="label" translatable="yes">_Help</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkAction" id="view-menu">
+        <property name="label" translatable="yes">_View</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkToggleAction" id="auto-play">
+        <property name="label" translatable="yes">Play music _automatically</property>
+        <property name="tooltip" translatable="yes">Automatically play a music clip from the selected game</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkToggleAction" id="auto-save">
+        <property name="label" translatable="yes">_Restore previous state when starting a game</property>
+      </object>
+    </child>
+    <child>
+      <object class="GtkToggleAction" id="full-screen">
+        <property name="label" translatable="yes">Start games in _fullscreen mode</property>
+      </object>
+    </child>
+  </object>
   <object class="GtkWindow" id="audit-window">
     <property name="width_request">400</property>
     <property name="can_focus">False</property>
@@ -120,7 +341,6 @@
             </child>
             <child>
               <object class="GtkScrolledWindow" id="audit-scrolled-window">
-                <property name="height_request">200</property>
                 <property name="visible">True</property>
                 <property name="can_focus">True</property>
                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
@@ -166,7 +386,7 @@
                 <property name="has_tooltip">True</property>
                 <property name="tooltip_markup" translatable="yes">Save ROM errors to a file</property>
                 <property name="tooltip_text" translatable="yes">Save ROM errors to a file</property>
-                <property name="use_action_appearance">False</property>
+                <property name="related_action">save-errors</property>
                 <property name="use_stock">True</property>
               </object>
               <packing>
@@ -250,7 +470,7 @@
                         <property name="receives_default">True</property>
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                         <property name="tooltip_text" translatable="yes">Show all available games</property>
-                        <property name="use_action_appearance">False</property>
+                        <property name="related_action">view-available</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -265,7 +485,7 @@
                         <property name="receives_default">True</property>
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                         <property name="tooltip_text" translatable="yes">Only show my favorite games</property>
-                        <property name="use_action_appearance">False</property>
+                        <property name="related_action">view-favorites</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -280,7 +500,7 @@
                         <property name="receives_default">True</property>
                         <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                         <property name="tooltip_text" translatable="yes">Show my search results</property>
-                        <property name="use_action_appearance">False</property>
+                        <property name="related_action">view-results</property>
                       </object>
                       <packing>
                         <property name="expand">False</property>
@@ -424,7 +644,7 @@
                     <property name="can_default">True</property>
                     <property name="receives_default">False</property>
                     <property name="tooltip_text" translatable="yes">Show information about the selected game</property>
-                    <property name="use_action_appearance">False</property>
+                    <property name="related_action">properties</property>
                     <property name="use_stock">True</property>
                   </object>
                   <packing>
@@ -437,13 +657,13 @@
                   <object class="GtkButton" id="main-start-game-button">
                     <property name="label" translatable="yes">_Start Game</property>
                     <property name="visible">True</property>
-                    <property name="sensitive">False</property>
                     <property name="can_focus">True</property>
                     <property name="has_focus">True</property>
                     <property name="can_default">True</property>
                     <property name="has_default">True</property>
                     <property name="receives_default">False</property>
                     <property name="tooltip_text" translatable="yes">Start the selected game</property>
+                    <property name="related_action">start</property>
                     <property name="use_action_appearance">False</property>
                     <property name="image">main-start-game-image</property>
                     <property name="use_underline">True</property>
@@ -688,13 +908,13 @@
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkCheckButton" id="preferences-full-screen">
-                                <property name="label">(full-screen) GtkUIManager supplies the label</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="use_action_appearance">False</property>
+                                <property name="related_action">full-screen</property>
                                 <property name="use_underline">True</property>
+                                <property name="xalign">0</property>
                                 <property name="draw_indicator">True</property>
                               </object>
                               <packing>
@@ -705,13 +925,13 @@
                             </child>
                             <child>
                               <object class="GtkCheckButton" id="preferences-auto-save">
-                                <property name="label">(auto-save) GtkUIManager supplies the label</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="use_action_appearance">False</property>
+                                <property name="related_action">auto-save</property>
                                 <property name="use_underline">True</property>
+                                <property name="xalign">0</property>
                                 <property name="draw_indicator">True</property>
                               </object>
                               <packing>
@@ -796,12 +1016,12 @@
                             <property name="spacing">6</property>
                             <child>
                               <object class="GtkCheckButton" id="preferences-show-clones">
-                                <property name="label">(show-clones) GtkUIManager supplies the label</property>
                                 <property name="visible">True</property>
                                 <property name="can_focus">True</property>
                                 <property name="receives_default">False</property>
                                 <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
-                                <property name="use_action_appearance">False</property>
+                                <property name="related_action">show-clones</property>
+                                <property name="xalign">0</property>
                                 <property name="draw_indicator">True</property>
                               </object>
                               <packing>
@@ -1014,12 +1234,12 @@
                     <property name="receives_default">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="tooltip_text" translatable="yes">Show previous game</property>
+                    <property name="related_action">previous-game</property>
                     <property name="use_action_appearance">False</property>
                     <child>
                       <object class="GtkImage" id="properties-back-button-image">
                         <property name="visible">True</property>
                         <property name="can_focus">False</property>
-                        <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                         <property name="stock">gtk-go-back</property>
                       </object>
                     </child>
@@ -1037,6 +1257,7 @@
                     <property name="receives_default">True</property>
                     <property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
                     <property name="tooltip_text" translatable="yes">Show next game</property>
+                    <property name="related_action">next-game</property>
                     <property name="use_action_appearance">False</property>
                     <child>
                       <object class="GtkImage" id="properties-forward-button-image">
@@ -1920,12 +2141,12 @@ Manufacturer, Year</property>
                 </child>
                 <child>
                   <object class="GtkCheckButton" id="properties-music-auto-play">
-                    <property name="label">(auto-play) GtkUIManager supplies the label</property>
                     <property name="visible">True</property>
                     <property name="can_focus">True</property>
                     <property name="receives_default">False</property>
-                    <property name="use_action_appearance">False</property>
+                    <property name="related_action">auto-play</property>
                     <property name="use_underline">True</property>
+                    <property name="xalign">0</property>
                     <property name="draw_indicator">True</property>
                   </object>
                   <packing>
diff --git a/src/gva-audit.c b/src/gva-audit.c
index babe35b..46f7634 100644
--- a/src/gva-audit.c
+++ b/src/gva-audit.c
@@ -320,10 +320,6 @@ gva_audit_init (void)
         view = GTK_TREE_VIEW (GVA_WIDGET_AUDIT_TREE_VIEW);
         column = gva_columns_new_from_id (GVA_GAME_STORE_COLUMN_DESCRIPTION);
         gtk_tree_view_append_column (view, column);
-
-        gtk_activatable_set_related_action (
-                GTK_ACTIVATABLE (GVA_WIDGET_AUDIT_SAVE_BUTTON),
-                GVA_ACTION_SAVE_ERRORS);
 }
 
 /**
diff --git a/src/gva-main.c b/src/gva-main.c
index f1675b3..6f7fe7e 100644
--- a/src/gva-main.c
+++ b/src/gva-main.c
@@ -160,26 +160,6 @@ gva_main_init (void)
                 GTK_BOX (GVA_WIDGET_MAIN_VBOX),
                 gva_ui_get_managed_widget ("/main-menu"), 0);
 
-        gtk_activatable_set_related_action (
-                GTK_ACTIVATABLE (GVA_WIDGET_MAIN_VIEW_BUTTON_0),
-                GVA_ACTION_VIEW_AVAILABLE);
-
-        gtk_activatable_set_related_action (
-                GTK_ACTIVATABLE (GVA_WIDGET_MAIN_VIEW_BUTTON_1),
-                GVA_ACTION_VIEW_FAVORITES);
-
-        gtk_activatable_set_related_action (
-                GTK_ACTIVATABLE (GVA_WIDGET_MAIN_VIEW_BUTTON_2),
-                GVA_ACTION_VIEW_RESULTS);
-
-        gtk_activatable_set_related_action (
-                GTK_ACTIVATABLE (GVA_WIDGET_MAIN_PROPERTIES_BUTTON),
-                GVA_ACTION_PROPERTIES);
-
-        gtk_activatable_set_related_action (
-                GTK_ACTIVATABLE (GVA_WIDGET_MAIN_START_GAME_BUTTON),
-                GVA_ACTION_START);
-
         gtk_widget_set_sensitive (
                 GVA_WIDGET_MAIN_MUTE_BUTTON,
                 gva_mame_supports_sound ());
diff --git a/src/gva-preferences.c b/src/gva-preferences.c
index b8f4468..a90f5da 100644
--- a/src/gva-preferences.c
+++ b/src/gva-preferences.c
@@ -43,10 +43,6 @@ gva_preferences_init (void)
         /* This actually appears in the Properties window,
          * but it's still a preference so we manage it here. */
 
-        gtk_activatable_set_related_action (
-                GTK_ACTIVATABLE (GVA_WIDGET_PROPERTIES_MUSIC_AUTO_PLAY),
-                GVA_ACTION_AUTO_PLAY);
-
         g_settings_bind (
                 settings, GVA_SETTING_AUTO_PLAY,
                 GVA_ACTION_AUTO_PLAY, "active",
@@ -54,10 +50,6 @@ gva_preferences_init (void)
 
         /* Auto Save */
 
-        gtk_activatable_set_related_action (
-                GTK_ACTIVATABLE (GVA_WIDGET_PREFERENCES_AUTO_SAVE),
-                GVA_ACTION_AUTO_SAVE);
-
         gtk_action_set_sensitive (
                 GVA_ACTION_AUTO_SAVE,
                 gva_mame_supports_auto_save ());
@@ -70,10 +62,6 @@ gva_preferences_init (void)
 
         /* Full Screen */
 
-        gtk_activatable_set_related_action (
-                GTK_ACTIVATABLE (GVA_WIDGET_PREFERENCES_FULL_SCREEN),
-                GVA_ACTION_FULL_SCREEN);
-
         gtk_action_set_sensitive (
                 GVA_ACTION_FULL_SCREEN,
                 gva_mame_supports_full_screen () ||
@@ -87,10 +75,6 @@ gva_preferences_init (void)
 
         /* Show Clones */
 
-        gtk_activatable_set_related_action (
-                GTK_ACTIVATABLE (GVA_WIDGET_PREFERENCES_SHOW_CLONES),
-                GVA_ACTION_SHOW_CLONES);
-
         g_settings_bind (
                 settings, GVA_SETTING_SHOW_CLONES,
                 GVA_ACTION_SHOW_CLONES, "active",
diff --git a/src/gva-properties.c b/src/gva-properties.c
index d4578e0..8f2da71 100644
--- a/src/gva-properties.c
+++ b/src/gva-properties.c
@@ -783,14 +783,6 @@ gva_properties_init (void)
         view = GTK_TREE_VIEW (GVA_WIDGET_MAIN_TREE_VIEW);
         text_view = GVA_WIDGET_PROPERTIES_HISTORY_TEXT_VIEW;
 
-        gtk_activatable_set_related_action (
-                GTK_ACTIVATABLE (GVA_WIDGET_PROPERTIES_BACK_BUTTON),
-                GVA_ACTION_PREVIOUS_GAME);
-
-        gtk_activatable_set_related_action (
-                GTK_ACTIVATABLE (GVA_WIDGET_PROPERTIES_FORWARD_BUTTON),
-                GVA_ACTION_NEXT_GAME);
-
         g_settings_bind (
                 settings, GVA_SETTING_PROPERTIES_PAGE,
                 GVA_WIDGET_PROPERTIES_NOTEBOOK, "page",
diff --git a/src/gva-ui.c b/src/gva-ui.c
index 6d1251e..f97736f 100644
--- a/src/gva-ui.c
+++ b/src/gva-ui.c
@@ -47,8 +47,6 @@
 
 static GtkBuilder *builder = NULL;
 static GtkUIManager *manager = NULL;
-static GtkActionGroup *standard_actions = NULL;
-static GtkActionGroup *lockable_actions = NULL;
 static gboolean initialized = FALSE;
 
 /* About Dialog Information */
@@ -73,6 +71,185 @@ static const gchar *license =
 "You should have received a copy of the GNU General Public License "
 "along with this program.  If not, see <http://www.gnu.org/licenses/>.";
 
+/**
+ * GVA_ACTION_ABOUT:
+ *
+ * Activation of this action displays the application's About dialog.
+ *
+ * Main menu item: Help -> About
+ **/
+
+/**
+ * GVA_ACTION_AUTO_PLAY:
+ *
+ * This toggle action tracks the user's preference for whether to
+ * automatically start playing a music clip from the selected game
+ * (if available) when the Properties window is open.
+ **/
+
+/**
+ * GVA_ACTION_AUTO_SAVE:
+ *
+ * This toggle action tracks the user's preference for whether to
+ * restore the emulated machine's previous state when starting a game.
+ **/
+
+/**
+ * GVA_ACTION_CONTENTS:
+ *
+ * Activation of this action opens the user manual for GNOME Video Arcade.
+ *
+ * Main menu item: Help -> Contents
+ **/
+
+/**
+ * GVA_ACTION_FULL_SCREEN:
+ *
+ * This toggle action tracks the user's preference for whether to
+ * start games in full screen mode.
+ **/
+
+/**
+ * GVA_ACTION_INSERT_FAVORITE:
+ *
+ * Activation of this action adds the currently selected game to the
+ * user's list of favorites.
+ *
+ * Main menu item: Game -> Add to Favorites
+ **/
+
+/**
+ * GVA_ACTION_NEXT_GAME:
+ *
+ * Activation of this action selects the next game, rolling over to
+ * the first game if necessary.
+ **/
+
+/**
+ * GVA_ACTION_PLAY_BACK:
+ *
+ * Activation of this action plays back the selected game recording.
+ **/
+
+/**
+ * GVA_ACTION_PREFERENCES:
+ *
+ * Activation of this action presents the "Preferences" window.
+ *
+ * Main menu item: Edit -> Preferences
+ **/
+
+/**
+ * GVA_ACTION_PREVIOUS_GAME:
+ *
+ * Activation of this action selects the previous game, rolling over to
+ * the last game if necessary.
+ **/
+
+/**
+ * GVA_ACTION_PROPERTIES:
+ *
+ * Activation of this action presents the "Properties" window.
+ *
+ * Main menu item: View -> Properties
+ **/
+
+/**
+ * GVA_ACTION_QUIT:
+ *
+ * Activation of this action initiates application shutdown.
+ *
+ * Main menu item: Game -> Quit
+ **/
+
+/**
+ * GVA_ACTION_RECORD:
+ *
+ * Activation of this action starts the selected game with MAME recording
+ * user inputs to a file.  The "Recorded Games" window will automatically
+ * be displayed when the user exits the game.
+ *
+ * Main menu item: Game -> Record
+ **/
+
+/**
+ * GVA_ACTION_REMOVE_COLUMN:
+ *
+ * Activation of this action removes the currently selected column from
+ * the game list.
+ **/
+
+/**
+ * GVA_ACTION_REMOVE_FAVORITE:
+ *
+ * Activation of this action removes the currently selected game from
+ * the user's list of favorites.
+ *
+ * Main menu item: Game -> Remove from Favorites
+ **/
+
+/**
+ * GVA_ACTION_SAVE_ERRORS:
+ *
+ * Activation of this action saves the errors from a ROM audit to a file.
+ **/
+
+/**
+ * GVA_ACTION_SEARCH:
+ *
+ * Activation of this action presents the "Search for Games" window.
+ *
+ * Main menu item: Edit -> Search...
+ **/
+
+/**
+ * GVA_ACTION_SHOW_CLONES:
+ *
+ * This toggle action tracks the user's preference for whether to
+ * show cloned games in the main window's game list.
+ **/
+
+/**
+ * GVA_ACTION_SHOW_PLAY_BACK:
+ *
+ * Activation of this action presents the "Recorded Games" window.
+ *
+ * Main menu item: Game -> Play Back...
+ **/
+
+/**
+ * GVA_ACTION_START:
+ *
+ * Activation of this action starts the selected game.
+ *
+ * Main menu item: Game -> Start
+ **/
+
+/**
+ * GVA_ACTION_VIEW_AVAILABLE:
+ *
+ * Activation of this action queries the database for all available games.
+ *
+ * Main menu item: View -> Available Games
+ **/
+
+/**
+ * GVA_ACTION_VIEW_FAVORITES:
+ *
+ * Activation of this action queries the database for the user's favorite
+ * games.
+ *
+ * Main menu item: View -> Favorite Games
+ **/
+
+/**
+ * GVA_ACTION_VIEW_RESULTS:
+ *
+ * Activation of this action executes a custom database query.
+ *
+ * Main menu item: View -> Search Results
+ **/
+
 static void
 log_lastplayed (GvaProcess *process,
                 gint status,
@@ -125,15 +302,8 @@ record_game_exited (GvaProcess *process,
         g_free (inpname);
 }
 
-/**
- * GVA_ACTION_ABOUT:
- *
- * Activation of this action displays the application's About dialog.
- *
- * Main menu item: Help -> About
- **/
-static void
-action_about_cb (GtkAction *action)
+void
+gva_action_about_cb (GtkAction *action)
 {
         GdkPixbuf *logo;
         GError *error = NULL;
@@ -177,57 +347,14 @@ action_add_column_cb (GtkAction *action,
         gtk_tree_view_column_set_visible (column, TRUE);
 }
 
-/**
- * GVA_ACTION_AUTO_PLAY:
- *
- * This toggle action tracks the user's preference for whether to
- * automatically start playing a music clip from the selected game
- * (if available) when the Properties window is open.
- **/
-
-/**
- * GVA_ACTION_AUTO_SAVE:
- *
- * This toggle action tracks the user's preference for whether to
- * restore the emulated machine's previous state when starting a game.
- **/
-
-/* No need for a callback function.  GConfBridge keeps the GConf key
- * synchronized with the toggle action's checked state. */
-
-/**
- * GVA_ACTION_CONTENTS:
- *
- * Activation of this action opens the user manual for GNOME Video Arcade.
- *
- * Main menu item: Help -> Contents
- **/
-static void
-action_contents_cb (GtkAction *action)
+void
+gva_action_contents_cb (GtkAction *action)
 {
         gva_help_display (GTK_WINDOW (GVA_WIDGET_MAIN_WINDOW), NULL);
 }
 
-/**
- * GVA_ACTION_FULL_SCREEN:
- *
- * This toggle action tracks the user's preference for whether to
- * start games in full screen mode.
- **/
-
-/* No need for a callback function.  GConfBridge keeps the GConf key
- * synchronized with the toggle action's checked state. */
-
-/**
- * GVA_ACTION_INSERT_FAVORITE:
- *
- * Activation of this action adds the currently selected game to the
- * user's list of favorites.
- *
- * Main menu item: Game -> Add to Favorites
- **/
-static void
-action_insert_favorite_cb (GtkAction *action)
+void
+gva_action_insert_favorite_cb (GtkAction *action)
 {
         GtkTreeModel *model;
         GtkTreePath *path;
@@ -254,14 +381,8 @@ action_insert_favorite_cb (GtkAction *action)
         gtk_action_set_visible (GVA_ACTION_REMOVE_FAVORITE, TRUE);
 }
 
-/**
- * GVA_ACTION_NEXT_GAME:
- *
- * Activation of this action selects the next game, rolling over to
- * the first game if necessary.
- **/
-static void
-action_next_game_cb (GtkAction *action)
+void
+gva_action_next_game_cb (GtkAction *action)
 {
         GtkTreeSelection *selection;
         GtkTreeModel *model;
@@ -288,13 +409,8 @@ action_next_game_cb (GtkAction *action)
         gtk_tree_path_free (path);
 }
 
-/**
- * GVA_ACTION_PLAY_BACK:
- *
- * Activation of this action plays back the selected game recording.
- **/
-static void
-action_play_back_cb (GtkAction *action)
+void
+gva_action_play_back_cb (GtkAction *action)
 {
         GtkWidget *widget;
         GvaProcess *process;
@@ -362,27 +478,14 @@ action_play_back_cb (GtkAction *action)
         g_list_free (list);
 }
 
-/**
- * GVA_ACTION_PREFERENCES:
- *
- * Activation of this action presents the "Preferences" window.
- *
- * Main menu item: Edit -> Preferences
- **/
-static void
-action_preferences_cb (GtkAction *action)
+void
+gva_action_preferences_cb (GtkAction *action)
 {
         gtk_window_present (GTK_WINDOW (GVA_WIDGET_PREFERENCES_WINDOW));
 }
 
-/**
- * GVA_ACTION_PREVIOUS_GAME:
- *
- * Activation of this action selects the previous game, rolling over to
- * the last game if necessary.
- **/
-static void
-action_previous_game_cb (GtkAction *action)
+void
+gva_action_previous_game_cb (GtkAction *action)
 {
         GtkTreeSelection *selection;
         GtkTreeModel *model;
@@ -409,44 +512,21 @@ action_previous_game_cb (GtkAction *action)
         gtk_tree_path_free (path);
 }
 
-/**
- * GVA_ACTION_PROPERTIES:
- *
- * Activation of this action presents the "Properties" window.
- *
- * Main menu item: View -> Properties
- **/
-static void
-action_properties_cb (GtkAction *action)
+void
+gva_action_properties_cb (GtkAction *action)
 {
         gtk_window_present (GTK_WINDOW (GVA_WIDGET_PROPERTIES_WINDOW));
 }
 
-/**
- * GVA_ACTION_QUIT:
- *
- * Activation of this action initiates application shutdown.
- *
- * Main menu item: Game -> Quit
- **/
-static void
-action_quit_cb (GtkAction *action)
+void
+gva_action_quit_cb (GtkAction *action)
 {
         gva_process_kill_all ();
         gtk_main_quit ();
 }
 
-/**
- * GVA_ACTION_RECORD:
- *
- * Activation of this action starts the selected game with MAME recording
- * user inputs to a file.  The "Recorded Games" window will automatically
- * be displayed when the user exits the game.
- *
- * Main menu item: Game -> Record
- **/
-static void
-action_record_cb (GtkAction *action)
+void
+gva_action_record_cb (GtkAction *action)
 {
         GtkWidget *widget;
         GvaProcess *process;
@@ -495,14 +575,8 @@ action_record_cb (GtkAction *action)
         g_free (inpname);
 }
 
-/**
- * GVA_ACTION_REMOVE_COLUMN:
- *
- * Activation of this action removes the currently selected column from
- * the game list.
- **/
-static void
-action_remove_column_cb (GtkAction *action)
+void
+gva_action_remove_column_cb (GtkAction *action)
 {
         GtkTreeViewColumn *column;
         GtkTreeView *view;
@@ -515,16 +589,8 @@ action_remove_column_cb (GtkAction *action)
         gtk_tree_view_column_set_visible (column, FALSE);
 }
 
-/**
- * GVA_ACTION_REMOVE_FAVORITE:
- *
- * Activation of this action removes the currently selected game from
- * the user's list of favorites.
- *
- * Main menu item: Game -> Remove from Favorites
- **/
-static void
-action_remove_favorite_cb (GtkAction *action)
+void
+gva_action_remove_favorite_cb (GtkAction *action)
 {
         GtkTreeModel *model;
         GtkTreePath *path;
@@ -551,26 +617,14 @@ action_remove_favorite_cb (GtkAction *action)
         gtk_action_set_visible (GVA_ACTION_REMOVE_FAVORITE, FALSE);
 }
 
-/**
- * GVA_ACTION_SAVE_ERRORS:
- *
- * Activation of this action saves the errors from a ROM audit to a file.
- **/
-static void
-action_save_errors_cb (GtkAction *action)
+void
+gva_action_save_errors_cb (GtkAction *action)
 {
         gva_audit_save_errors ();
 }
 
-/**
- * GVA_ACTION_SEARCH:
- *
- * Activation of this action presents the "Search for Games" window.
- *
- * Main menu item: Edit -> Search...
- **/
-static void
-action_search_cb (GtkAction *action)
+void
+gva_action_search_cb (GtkAction *action)
 {
         GtkWidget *widget;
 
@@ -582,50 +636,30 @@ action_search_cb (GtkAction *action)
         gtk_cell_editable_start_editing (GTK_CELL_EDITABLE (widget), NULL);
 }
 
-/**
- * GVA_ACTION_SHOW_CLONES:
- *
- * This toggle action tracks the user's preference for whether to
- * show cloned games in the main window's game list.
- **/
-static void
-action_show_clones_cb (GtkToggleAction *action)
+void
+gva_action_show_clones_cb (GtkAction *action)
 {
         GError *error = NULL;
 
         /* This is a bit of a hack.  We want to instantly apply the
          * user preference, but not while loading the initial value
-         * from GConf.  So we desensitize the action until we're up
-         * and running, and use that to decide what to do here. */
-        if (gtk_action_is_sensitive (GTK_ACTION (action)))
+         * from GSettings.  So we desensitize the action until we're
+         * up and running, and use that to decide what to do here. */
+        if (gtk_action_is_sensitive (action))
         {
                 gva_tree_view_update (&error);
                 gva_error_handle (&error);
         }
 }
 
-/**
- * GVA_ACTION_SHOW_PLAY_BACK:
- *
- * Activation of this action presents the "Recorded Games" window.
- *
- * Main menu item: Game -> Play Back...
- **/
-static void
-action_show_play_back_cb (GtkAction *action)
+void
+gva_action_show_play_back_cb (GtkAction *action)
 {
         gva_play_back_show (NULL);
 }
 
-/**
- * GVA_ACTION_START:
- *
- * Activation of this action starts the selected game.
- *
- * Main menu item: Game -> Start
- **/
-static void
-action_start_cb (GtkAction *action)
+void
+gva_action_start_cb (GtkAction *action)
 {
         GtkWidget *widget;
         GvaProcess *process;
@@ -669,33 +703,9 @@ action_start_cb (GtkAction *action)
         }
 }
 
-/**
- * GVA_ACTION_VIEW_AVAILABLE:
- *
- * Activation of this action queries the database for all available games.
- *
- * Main menu item: View -> Available Games
- **/
-
-/**
- * GVA_ACTION_VIEW_FAVORITES:
- *
- * Activation of this action queries the database for the user's favorite
- * games.
- *
- * Main menu item: View -> Favorite Games
- **/
-
-/**
- * GVA_ACTION_VIEW_RESULTS:
- *
- * Activation of this action executes a custom database query.
- *
- * Main menu item: View -> Search Results
- **/
-static void
-action_view_changed_cb (GtkRadioAction *action,
-                        GtkRadioAction *current)
+void
+gva_action_view_changed_cb (GtkRadioAction *action,
+                            GtkRadioAction *current)
 {
         GError *error = NULL;
 
@@ -703,231 +713,6 @@ action_view_changed_cb (GtkRadioAction *action,
         gva_error_handle (&error);
 }
 
-static GtkActionEntry standard_entries[] =
-{
-        { "about",
-          GTK_STOCK_ABOUT,
-          N_("_About"),
-          NULL,
-          N_("Show information about the application"),
-          G_CALLBACK (action_about_cb) },
-
-        { "contents",
-          GTK_STOCK_HELP,
-          N_("_Contents"),
-          NULL,
-          N_("Open the help documentation"),
-          G_CALLBACK (action_contents_cb) },
-
-        { "preferences",
-          GTK_STOCK_PREFERENCES,
-          N_("_Preferences"),
-          NULL,
-          N_("Configure the application"),
-          G_CALLBACK (action_preferences_cb) },
-
-        { "quit",
-          GTK_STOCK_QUIT,
-          N_("_Quit"),
-          NULL,
-          N_("Quit the application"),
-          G_CALLBACK (action_quit_cb) },
-
-        { "add-column-menu",
-          NULL,
-          N_("_Add Column"),
-          NULL,
-          NULL,
-          NULL },
-
-        { "edit-menu",
-          NULL,
-          N_("_Edit"),
-          NULL,
-          NULL,
-          NULL },
-
-        { "game-menu",
-          NULL,
-          N_("_Game"),
-          NULL,
-          NULL,
-          NULL },
-
-        { "help-menu",
-          NULL,
-          N_("_Help"),
-          NULL,
-          NULL,
-          NULL },
-
-        { "view-menu",
-          NULL,
-          N_("_View"),
-          NULL,
-          NULL,
-          NULL }
-};
-
-static GtkActionEntry lockable_entries[] =
-{
-        { "insert-favorite",
-          GTK_STOCK_ADD,
-          N_("Add to _Favorites"),
-          "<Control>plus",
-          N_("Add the selected game to my list of favorites"),
-          G_CALLBACK (action_insert_favorite_cb) },
-
-        { "next-game",
-          GTK_STOCK_GO_FORWARD,
-          NULL,
-          "<Alt>rightarrow",
-          N_("Show next game"),
-          G_CALLBACK (action_next_game_cb) },
-
-        { "play-back",
-          GTK_STOCK_MEDIA_PLAY,
-          N_("Play _Back..."),
-          NULL,
-          N_("Play back the selected game recording"),
-          G_CALLBACK (action_play_back_cb) },
-
-        { "previous-game",
-          GTK_STOCK_GO_BACK,
-          NULL,
-          "<Alt>leftarrow",
-          N_("Show previous game"),
-          G_CALLBACK (action_previous_game_cb) },
-
-        { "properties",
-          GTK_STOCK_PROPERTIES,
-          N_("_Properties"),
-          "<Control>p",
-          N_("Show information about the selected game"),
-          G_CALLBACK (action_properties_cb) },
-
-        { "record",
-          GTK_STOCK_MEDIA_RECORD,
-          N_("_Record"),
-          "<Control>r",
-          N_("Start the selected game and record keypresses to a file"),
-          G_CALLBACK (action_record_cb) },
-
-        { "remove-column",
-          NULL,
-          "Fake Label",  /* label is set dynamically */
-          NULL,
-          NULL,          /* tooltip is set dynamically */
-          G_CALLBACK (action_remove_column_cb) },
-
-        { "remove-favorite",
-          GTK_STOCK_REMOVE,
-          N_("Remove from _Favorites"),
-          "<Control>minus",
-          N_("Remove the selected game from my list of favorites"),
-          G_CALLBACK (action_remove_favorite_cb) },
-
-        { "save-errors",
-          GTK_STOCK_SAVE_AS,
-          N_("Save _As..."),
-          NULL,
-          N_("Save ROM errors to a file"),
-          G_CALLBACK (action_save_errors_cb) },
-
-        { "search",
-          GTK_STOCK_FIND,
-          N_("S_earch..."),
-          NULL,
-          N_("Show a custom list of games"),
-          G_CALLBACK (action_search_cb) },
-
-        { "show-play-back",
-          GTK_STOCK_MEDIA_PLAY,
-          N_("Play _Back..."),
-          NULL,
-          N_("Play back a previously recorded game"),
-          G_CALLBACK (action_show_play_back_cb) },
-
-        { "start",
-          GTK_STOCK_EXECUTE,
-          N_("_Start"),
-          "<Control>s",
-          N_("Start the selected game"),
-          G_CALLBACK (action_start_cb) }
-};
-
-static GtkToggleActionEntry standard_toggle_entries[] =
-{
-        { "auto-play",
-          NULL,
-          N_("Play music _automatically"),
-          NULL,
-          N_("Automatically play a music clip from the selected game"),
-          NULL,     /* GConfBridge monitors the state */
-          FALSE },  /* GConf overrides this */
-
-        { "auto-save",
-          NULL,
-          N_("_Restore previous state when starting a game"),
-          NULL,
-          NULL,
-          NULL,     /* GConfBridge monitors the state */
-          FALSE },  /* GConf overrides this */
-
-        { "full-screen",
-          NULL,
-          N_("Start games in _fullscreen mode"),
-          NULL,
-          NULL,
-          NULL,     /* GConfBridge monitors the state */
-          FALSE }   /* GConf overrides this */
-};
-
-static GtkToggleActionEntry lockable_toggle_entries[] =
-{
-        { "show-clones",
-          NULL,
-          N_("Show _alternate versions of original games"),
-          NULL,
-          NULL,
-          G_CALLBACK (action_show_clones_cb),
-          FALSE }   /* GConf overrides this */
-};
-
-static GtkRadioActionEntry view_radio_entries[] =
-{
-        /* This is a bogus view that we switch away from on startup.
-         * It ensures that restoring the previous session's view from
-         * GConf always triggers a GtkRadioAction::changed emission. */
-        { "view-initial",
-          NULL,
-          NULL,
-          NULL,
-          NULL,
-          -1 },
-
-        { "view-available",
-          NULL,
-          N_("_Available Games"),
-          "<Control>1",
-          N_("Show all available games"),
-          0 },
-
-        { "view-favorites",
-          NULL,
-          N_("_Favorite Games"),
-          "<Control>2",
-          N_("Only show my favorite games"),
-          1 },
-
-        { "view-results",
-          NULL,
-          N_("Search _Results"),
-          "<Control>3",
-          N_("Show my search results"),
-          2 }
-};
-
 static void
 ui_column_notify_visible_cb (GtkTreeViewColumn *column,
                              GParamSpec *pspec,
@@ -955,6 +740,7 @@ ui_sort_columns (GtkTreeViewColumn *column1,
 static void
 ui_init (void)
 {
+        GObject *object;
         gchar *filename;
         GError *error = NULL;
 
@@ -962,35 +748,8 @@ ui_init (void)
          * when we use the GVA_WIDGET_MAIN_WINDOW macro below. */
         initialized = TRUE;
 
-        standard_actions = gtk_action_group_new ("standard");
-        gtk_action_group_set_translation_domain (
-                standard_actions, GETTEXT_PACKAGE);
-        gtk_action_group_add_actions (
-                standard_actions, standard_entries,
-                G_N_ELEMENTS (standard_entries), NULL);
-        gtk_action_group_add_toggle_actions (
-                standard_actions, standard_toggle_entries,
-                G_N_ELEMENTS (standard_toggle_entries), NULL);
-
-        lockable_actions = gtk_action_group_new ("lockable");
-        gtk_action_group_set_translation_domain (
-                lockable_actions, GETTEXT_PACKAGE);
-        gtk_action_group_add_actions (
-                lockable_actions, lockable_entries,
-                G_N_ELEMENTS (lockable_entries), NULL);
-        gtk_action_group_add_toggle_actions (
-                lockable_actions, lockable_toggle_entries,
-                G_N_ELEMENTS (lockable_toggle_entries), NULL);
-        gtk_action_group_add_radio_actions (
-                lockable_actions, view_radio_entries,
-                G_N_ELEMENTS (view_radio_entries),
-                -1, G_CALLBACK (action_view_changed_cb), NULL);
-
         manager = gtk_ui_manager_new ();
 
-        gtk_ui_manager_insert_action_group (manager, standard_actions, 0);
-        gtk_ui_manager_insert_action_group (manager, lockable_actions, 0);
-
         filename = gva_find_data_file (PACKAGE ".builder");
         if (filename != NULL && error == NULL)
         {
@@ -1020,6 +779,14 @@ ui_init (void)
 
         if (builder == NULL || manager == NULL)
                 g_error ("%s", _("Failed to initialize user interface"));
+
+        object = gtk_builder_get_object (builder, "standard-actions");
+        gtk_ui_manager_insert_action_group (
+                manager, GTK_ACTION_GROUP (object), 0);
+
+        object = gtk_builder_get_object (builder, "lockable-actions");
+        gtk_ui_manager_insert_action_group (
+                manager, GTK_ACTION_GROUP (object), 0);
 }
 
 /**
@@ -1037,19 +804,23 @@ GtkAction *
 gva_ui_get_action (const gchar *action_name)
 {
         GtkAction *action;
+        GList *list, *iter;
 
         g_return_val_if_fail (action_name != NULL, NULL);
 
         if (G_UNLIKELY (!initialized))
                 ui_init ();
 
-        action = gtk_action_group_get_action (standard_actions, action_name);
-        if (action != NULL)
-                return action;
+        list = gtk_ui_manager_get_action_groups (manager);
+        for (iter = list; iter != NULL; iter = g_list_next (iter))
+        {
+                GtkActionGroup *group;
 
-        action = gtk_action_group_get_action (lockable_actions, action_name);
-        if (action != NULL)
-                return action;
+                group = GTK_ACTION_GROUP (iter->data);
+                action = gtk_action_group_get_action (group, action_name);
+                if (action != NULL)
+                        return action;
+        }
 
         g_error ("No action named '%s'", action_name);
 }
@@ -1077,6 +848,7 @@ gva_ui_get_widget (const gchar *widget_name)
 
         object = gtk_builder_get_object (builder, widget_name);
         g_assert (object != NULL);
+
         return GTK_WIDGET (object);
 }
 
@@ -1118,11 +890,16 @@ gva_ui_get_managed_widget (const gchar *widget_path)
 void
 gva_ui_add_column_actions (GtkTreeView *view)
 {
+        GObject *object;
+        GtkActionGroup *action_group;
         GList *list;
         guint merge_id;
 
         g_return_if_fail (GTK_IS_TREE_VIEW (view));
 
+        object = gtk_builder_get_object (builder, "standard-actions");
+        action_group = GTK_ACTION_GROUP (object);
+
         list = gtk_tree_view_get_columns (view);
         list = g_list_sort (list, (GCompareFunc) ui_sort_columns);
         merge_id = gtk_ui_manager_new_merge_id (manager);
@@ -1150,7 +927,7 @@ gva_ui_add_column_actions (GtkTreeView *view)
 
                 action = gtk_action_new (
                         action_name, action_label, action_tooltip, NULL);
-                gtk_action_group_add_action (standard_actions, action);
+                gtk_action_group_add_action (action_group, action);
 
                 visible = gtk_tree_view_column_get_visible (column);
                 gtk_action_set_visible (action, !visible);
@@ -1186,11 +963,17 @@ gva_ui_add_column_actions (GtkTreeView *view)
 void
 gva_ui_lock (void)
 {
+        GObject *object;
+        GtkActionGroup *action_group;
+
+        object = gtk_builder_get_object (builder, "lockable-actions");
+        action_group = GTK_ACTION_GROUP (object);
+
         /* Hide secondary windows that may interfere. */
         gtk_widget_hide (GVA_WIDGET_PLAY_BACK_WINDOW);
         gtk_widget_hide (GVA_WIDGET_PROPERTIES_WINDOW);
 
-        gtk_action_group_set_sensitive (lockable_actions, FALSE);
+        gtk_action_group_set_sensitive (action_group, FALSE);
         gtk_widget_set_sensitive (GVA_WIDGET_MAIN_TREE_VIEW, FALSE);
 }
 
@@ -1202,6 +985,12 @@ gva_ui_lock (void)
 void
 gva_ui_unlock (void)
 {
-        gtk_action_group_set_sensitive (lockable_actions, TRUE);
+        GObject *object;
+        GtkActionGroup *action_group;
+
+        object = gtk_builder_get_object (builder, "lockable-actions");
+        action_group = GTK_ACTION_GROUP (object);
+
+        gtk_action_group_set_sensitive (action_group, TRUE);
         gtk_widget_set_sensitive (GVA_WIDGET_MAIN_TREE_VIEW, TRUE);
 }
diff --git a/src/gva-ui.h b/src/gva-ui.h
index 1e849b7..7533b3e 100644
--- a/src/gva-ui.h
+++ b/src/gva-ui.h
@@ -191,6 +191,29 @@ void            gva_ui_add_column_actions       (GtkTreeView *view);
 void            gva_ui_lock                     (void);
 void            gva_ui_unlock                   (void);
 
+/* GtkAction callbacks */
+
+void            gva_action_about_cb             (GtkAction *action);
+void            gva_action_contents_cb          (GtkAction *action);
+void            gva_action_insert_favorite_cb   (GtkAction *action);
+void            gva_action_next_game_cb         (GtkAction *action);
+void            gva_action_play_back_cb         (GtkAction *action);
+void            gva_action_preferences_cb       (GtkAction *action);
+void            gva_action_previous_game_cb     (GtkAction *action);
+void            gva_action_properties_cb        (GtkAction *action);
+void            gva_action_quit_cb              (GtkAction *action);
+void            gva_action_record_cb            (GtkAction *action);
+void            gva_action_remove_column_cb     (GtkAction *action);
+void            gva_action_remove_favorite_cb   (GtkAction *action);
+void            gva_action_save_errors_cb       (GtkAction *action);
+void            gva_action_search_cb            (GtkAction *action);
+void            gva_action_show_clones_cb       (GtkAction *action);
+void            gva_action_show_play_back_cb    (GtkAction *action);
+void            gva_action_start_cb             (GtkAction *action);
+
+void            gva_action_view_changed_cb      (GtkRadioAction *action,
+                                                 GtkRadioAction *current);
+
 G_END_DECLS
 
 #endif /* GVA_UI_H */



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