[easytag/wip/application-window: 2/2] Use GAction for file sorting mode GSetting



commit 7c8d0609966a2716e44d3aa712049f43b308c11f
Author: David King <amigadave amigadave com>
Date:   Sun Jul 13 19:01:59 2014 +0100

    Use GAction for file sorting mode GSetting

 data/menus.ui            |   80 ++++++++++++++++++++++++++++++++++++++++
 src/application_window.c |   91 ++++------------------------------------------
 src/bar.c                |   13 ++-----
 src/bar.h                |    5 +--
 src/ui_manager.h         |   76 --------------------------------------
 5 files changed, 92 insertions(+), 173 deletions(-)
---
diff --git a/data/menus.ui b/data/menus.ui
index 7911299..66b5ea4 100644
--- a/data/menus.ui
+++ b/data/menus.ui
@@ -152,106 +152,158 @@
                 <attribute name="label" translatable="yes">Sort List by Tag</attribute>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by track number</attribute>
+                        <attribute name="target">ascending-track-number</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by track number</attribute>
+                        <attribute name="target">descending-track-number</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by title</attribute>
+                        <attribute name="target">ascending-title</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by title</attribute>
+                        <attribute name="target">descending-title</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by artist</attribute>
+                        <attribute name="target">ascending-artist</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by artist</attribute>
+                        <attribute name="target">descending-artist</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by album artist</attribute>
+                        <attribute name="target">ascending-album-artist</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by album artist</attribute>
+                        <attribute name="target">descending-album-artist</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by album</attribute>
+                        <attribute name="target">ascending-album</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by album</attribute>
+                        <attribute name="target">descending-album</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by year</attribute>
+                        <attribute name="target">ascending-year</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by year</attribute>
+                        <attribute name="target">descending-year</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by genre</attribute>
+                        <attribute name="target">ascending-genre</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by genre</attribute>
+                        <attribute name="target">descending-genre</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by comment</attribute>
+                        <attribute name="target">ascending-comment</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by comment</attribute>
+                        <attribute name="target">descending-comment</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by composer</attribute>
+                        <attribute name="target">ascending-composer</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by composer</attribute>
+                        <attribute name="target">descending-composer</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by original artist</attribute>
+                        <attribute name="target">ascending-orig-artist</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by original artist</attribute>
+                        <attribute name="target">descending-orig-artist</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by copyright</attribute>
+                        <attribute name="target">ascending-copyright</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by copyright</attribute>
+                        <attribute name="target">descending-copyright</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by URL</attribute>
+                        <attribute name="target">ascending-url</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by URL</attribute>
+                        <attribute name="target">descending-url</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by encoder name</attribute>
+                        <attribute name="target">ascending-encoded-by</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by encoder name</attribute>
+                        <attribute name="target">descending-encoded-by</attribute>
                     </item>
                 </section>
             </submenu>
@@ -259,58 +311,86 @@
                 <attribute name="label" translatable="yes">Sort List by Property</attribute>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by filename</attribute>
+                        <attribute name="target">ascending-filename</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by filename</attribute>
+                        <attribute name="target">descending-filename</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by creation date</attribute>
+                        <attribute name="target">ascending-creation-date</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by creation date</attribute>
+                        <attribute name="target">descending-creation-date</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by file type</attribute>
+                        <attribute name="target">ascending-file-type</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by file type</attribute>
+                        <attribute name="target">descending-file-type</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by file size</attribute>
+                        <attribute name="target">ascending-file-size</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by file size</attribute>
+                        <attribute name="target">descending-file-size</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by duration</attribute>
+                        <attribute name="target">ascending-file-duration</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by duration</attribute>
+                        <attribute name="target">descending-file-duration</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by bitrate</attribute>
+                        <attribute name="target">ascending-file-bitrate</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by bitrate</attribute>
+                        <attribute name="target">descending-file-bitrate</attribute>
                     </item>
                 </section>
                 <section>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Ascending by samplerate</attribute>
+                        <attribute name="target">ascending-file-samplerate</attribute>
                     </item>
                     <item>
+                        <attribute name="action">win.sort-mode</attribute>
                         <attribute name="label" translatable="yes">Descending by samplerate</attribute>
+                        <attribute name="target">descending-file-samplerate</attribute>
                     </item>
                 </section>
             </submenu>
diff --git a/src/application_window.c b/src/application_window.c
index 351571f..9786be8 100644
--- a/src/application_window.c
+++ b/src/application_window.c
@@ -2811,7 +2811,8 @@ static const GActionEntry actions[] =
     { "scanner", on_action_toggle, NULL, "false", on_scanner_change },
     /* { "scan-mode", on_action_radio, NULL, "false", on_scan_mode_change },
      * Created from GSetting. */
-    /* FIXME: Sorting submenus. */
+    /* { "sort-mode", on_action_radio, "s", "'ascending-filename'",
+     * on_sort_mode_change }, Created from GSetting */
     { "file-artist-view", on_action_radio, "s", "'file'",
       on_file_artist_view_change },
     { "collapse-tree", on_collapse_tree },
@@ -2889,6 +2890,8 @@ et_application_window_init (EtApplicationWindow *self)
     g_action_map_add_action (G_ACTION_MAP (self), action);
     action = g_settings_create_action (MainSettings, "scan-mode");
     g_action_map_add_action (G_ACTION_MAP (self), action);
+    action = g_settings_create_action (MainSettings, "sort-mode");
+    g_action_map_add_action (G_ACTION_MAP (self), action);
 
     window = GTK_WINDOW (self);
 
@@ -2905,14 +2908,12 @@ et_application_window_init (EtApplicationWindow *self)
 
     /* Menu bar and tool bar. */
     {
-        GtkWidget *menu_area;
         GtkWidget *tool_area;
         GtkBuilder *builder;
         GError *error = NULL;
         GtkWidget *toolbar;
 
-        Create_UI (window, &menu_area, &tool_area);
-        gtk_box_pack_start (GTK_BOX (main_vbox), menu_area, FALSE, FALSE, 0);
+        tool_area = create_main_toolbar (window);
         gtk_box_pack_start (GTK_BOX (main_vbox), tool_area, FALSE, FALSE, 0);
 
         builder = gtk_builder_new ();
@@ -3356,30 +3357,6 @@ et_application_window_file_area_set_sensitive (EtApplicationWindow *self,
 }
 
 static void
-ui_widget_set_sensitive (const gchar *menu,
-                         const gchar *action,
-                         gboolean sensitive)
-{
-    GtkAction *uiaction;
-    gchar *path;
-
-    path = g_strconcat ("/MenuBar/", menu,"/", action, NULL);
-
-    uiaction = gtk_ui_manager_get_action (UIManager, path);
-
-    if (uiaction)
-    {
-        gtk_action_set_sensitive (uiaction, sensitive);
-    }
-    else
-    {
-        g_warning ("Action not found for path '%s'", path);
-    }
-
-    g_free (path);
-}
-
-static void
 set_action_state (EtApplicationWindow *self,
                   const gchar *action_name,
                   gboolean enabled)
@@ -3470,34 +3447,7 @@ et_application_window_update_actions (EtApplicationWindow *self)
         set_action_state (self, "open-with", FALSE);
         set_action_state (self, "invert-selection", FALSE);
         set_action_state (self, "delete", FALSE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH, AM_SORT_ASCENDING_FILENAME, FALSE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH, AM_SORT_DESCENDING_FILENAME,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH, AM_SORT_ASCENDING_CREATION_DATE,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH, AM_SORT_DESCENDING_CREATION_DATE,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH, AM_SORT_ASCENDING_TRACK_NUMBER,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH, AM_SORT_DESCENDING_TRACK_NUMBER,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH, AM_SORT_ASCENDING_TITLE,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH, AM_SORT_DESCENDING_TITLE,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH, AM_SORT_ASCENDING_ARTIST,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH, AM_SORT_DESCENDING_ARTIST,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH, AM_SORT_ASCENDING_ALBUM,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH, AM_SORT_DESCENDING_ALBUM,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH, AM_SORT_ASCENDING_YEAR,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH, AM_SORT_DESCENDING_YEAR,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH, AM_SORT_ASCENDING_GENRE,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH, AM_SORT_DESCENDING_GENRE,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH, AM_SORT_ASCENDING_COMMENT,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH, AM_SORT_DESCENDING_COMMENT,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH, AM_SORT_ASCENDING_FILE_TYPE,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH, AM_SORT_DESCENDING_FILE_TYPE,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH, AM_SORT_ASCENDING_FILE_SIZE,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH, AM_SORT_DESCENDING_FILE_SIZE,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH, AM_SORT_ASCENDING_FILE_DURATION,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH, AM_SORT_DESCENDING_FILE_DURATION,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH, AM_SORT_ASCENDING_FILE_BITRATE,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH, AM_SORT_DESCENDING_FILE_BITRATE,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH, AM_SORT_ASCENDING_FILE_SAMPLERATE,FALSE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH, AM_SORT_DESCENDING_FILE_SAMPLERATE,FALSE);
+        /* FIXME: set_action_state (self, "sort-mode", FALSE); */
         set_action_state (self, "go-previous", FALSE);
         set_action_state (self, "go-next", FALSE);
         set_action_state (self, "go-first", FALSE);
@@ -3545,34 +3495,7 @@ et_application_window_update_actions (EtApplicationWindow *self)
         set_action_state (self, "open-with", TRUE);
         set_action_state (self, "invert-selection", TRUE);
         set_action_state (self, "delete", TRUE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH,AM_SORT_ASCENDING_FILENAME,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH,AM_SORT_DESCENDING_FILENAME,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH,AM_SORT_ASCENDING_CREATION_DATE,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH,AM_SORT_DESCENDING_CREATION_DATE,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH,AM_SORT_ASCENDING_TRACK_NUMBER,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH,AM_SORT_DESCENDING_TRACK_NUMBER,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH,AM_SORT_ASCENDING_TITLE,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH,AM_SORT_DESCENDING_TITLE,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH,AM_SORT_ASCENDING_ARTIST,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH,AM_SORT_DESCENDING_ARTIST,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH,AM_SORT_ASCENDING_ALBUM,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH,AM_SORT_DESCENDING_ALBUM,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH,AM_SORT_ASCENDING_YEAR,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH,AM_SORT_DESCENDING_YEAR,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH,AM_SORT_ASCENDING_GENRE,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH,AM_SORT_DESCENDING_GENRE,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH,AM_SORT_ASCENDING_COMMENT,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_TAG_PATH,AM_SORT_DESCENDING_COMMENT,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH,AM_SORT_ASCENDING_FILE_TYPE,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH,AM_SORT_DESCENDING_FILE_TYPE,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH,AM_SORT_ASCENDING_FILE_SIZE,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH,AM_SORT_DESCENDING_FILE_SIZE,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH,AM_SORT_ASCENDING_FILE_DURATION,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH,AM_SORT_DESCENDING_FILE_DURATION,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH,AM_SORT_ASCENDING_FILE_BITRATE,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH,AM_SORT_DESCENDING_FILE_BITRATE,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH,AM_SORT_ASCENDING_FILE_SAMPLERATE,TRUE);
-        ui_widget_set_sensitive(MENU_SORT_PROP_PATH,AM_SORT_DESCENDING_FILE_SAMPLERATE,TRUE);
+        /* FIXME set_action_state (self, "sort-mode", TRUE); */
         set_action_state (self, "remove-tags", TRUE);
         set_action_state (self, "find", TRUE);
         set_action_state (self, "show-load-filenames", TRUE);
diff --git a/src/bar.c b/src/bar.c
index 04d6b66..3841cd8 100644
--- a/src/bar.c
+++ b/src/bar.c
@@ -127,10 +127,9 @@ Menu_Sort_Action (GtkAction *item, gpointer data)
     et_application_window_browser_refresh_sort (ET_APPLICATION_WINDOW (data));
 }
 
-void
-Create_UI (GtkWindow *window, GtkWidget **ppmenubar, GtkWidget **pptoolbar)
+GtkWidget *
+create_main_toolbar (GtkWindow *window)
 {
-    GtkWidget *menubar;
     GtkWidget *toolbar;
 
     /*
@@ -269,16 +268,12 @@ Create_UI (GtkWindow *window, GtkWidget **ppmenubar, GtkWidget **pptoolbar)
     gtk_window_add_accel_group (window,
                                 gtk_ui_manager_get_accel_group (UIManager));
 
-    menubar = gtk_ui_manager_get_widget(UIManager, "/MenuBar");
-    gtk_widget_show_all(menubar);
-
     toolbar = gtk_ui_manager_get_widget (UIManager, "/ToolBar");
-    gtk_widget_show_all(toolbar);
+    gtk_widget_show_all (toolbar);
     gtk_style_context_add_class (gtk_widget_get_style_context (toolbar),
                                  GTK_STYLE_CLASS_PRIMARY_TOOLBAR);
 
-    *pptoolbar = toolbar;
-    *ppmenubar = menubar;
+    return toolbar;
 }
 
 
diff --git a/src/bar.h b/src/bar.h
index d1218fc..f96934f 100644
--- a/src/bar.h
+++ b/src/bar.h
@@ -25,15 +25,12 @@
 /***************
  * Declaration *
  ***************/
-GtkWidget      *MenuBar;
 GtkWidget      *ProgressBar;
 GtkUIManager   *UIManager;
 GtkActionGroup *ActionGroup;
 
 #define MENU_FILE_SORT_TAG      "SortTagMenu"
 #define MENU_FILE_SORT_PROP     "SortPropMenu"
-#define MENU_SORT_TAG_PATH "ViewMenu/SortTagMenu"
-#define MENU_SORT_PROP_PATH "ViewMenu/SortPropMenu"
 
 #define POPUP_FILE              "FilePopup"
 #define POPUP_DIR               "DirPopup"
@@ -105,7 +102,7 @@ struct _Action_Pair {
  * Prototypes *
  **************/
 
-void Create_UI (GtkWindow *window, GtkWidget **menubar, GtkWidget **toolbar);
+GtkWidget *create_main_toolbar (GtkWindow *window);
 GtkWidget *Create_Status_Bar   (void);
 void Statusbar_Message (const gchar *message, gboolean with_timer);
 GtkWidget *Create_Progress_Bar (void);
diff --git a/src/ui_manager.h b/src/ui_manager.h
index b5a6c26..4a63081 100644
--- a/src/ui_manager.h
+++ b/src/ui_manager.h
@@ -7,82 +7,6 @@ static const gchar *ui_xml =
 "<ui>"
 
 /*
- * Menu bar
- */
-"  <menubar name='MenuBar'>"
-"    <menu action='ViewMenu'>"
-"      <menu action='SortTagMenu'>"
-"        <menuitem action='SortTrackNumAsc' />"
-"        <menuitem action='SortTrackNumDesc' />"
-"        <separator />"
-"        <menuitem action='SortTitleAsc' />"
-"        <menuitem action='SortTitleDesc' />"
-"        <separator />"
-"        <menuitem action='SortArtistAsc' />"
-"        <menuitem action='SortArtistDesc' />"
-"        <separator />"
-"        <menuitem action='SortAlbumArtistAsc' />"
-"        <menuitem action='SortAlbumArtistDesc' />"
-"        <separator />"
-"        <menuitem action='SortAlbumAsc' />"
-"        <menuitem action='SortAlbumDesc' />"
-"        <separator />"
-"        <menuitem action='SortYearAsc' />"
-"        <menuitem action='SortYearDesc' />"
-"        <separator />"
-"        <menuitem action='SortYearAsc' />"
-"        <menuitem action='SortYearDesc' />"
-"        <separator />"
-"        <menuitem action='SortGenreAsc' />"
-"        <menuitem action='SortGenreDesc' />"
-"        <separator />"
-"        <menuitem action='SortCommentAsc' />"
-"        <menuitem action='SortCommentDesc' />"
-"        <separator />"
-"        <menuitem action='SortComposerAsc' />"
-"        <menuitem action='SortComposerDesc' />"
-"        <separator />"
-"        <menuitem action='SortOrigArtistAsc' />"
-"        <menuitem action='SortOrigArtistDesc' />"
-"        <separator />"
-"        <menuitem action='SortCopyrightAsc' />"
-"        <menuitem action='SortCopyrightDesc' />"
-"        <separator />"
-"        <menuitem action='SortUrlAsc' />"
-"        <menuitem action='SortUrlDesc' />"
-"        <separator />"
-"        <menuitem action='SortEncodedByAsc' />"
-"        <menuitem action='SortEncodedByDesc' />"
-"      </menu>"
-
-"      <menu action='SortPropMenu'>"
-"        <menuitem action='SortFilenameAsc' />"
-"        <menuitem action='SortFilenameDesc' />"
-"        <separator />"
-"        <menuitem action='SortDateAsc' />"
-"        <menuitem action='SortDateDesc' />"
-"        <separator />"
-"        <menuitem action='SortTypeAsc' />"
-"        <menuitem action='SortTypeDesc' />"
-"        <separator />"
-"        <menuitem action='SortSizeAsc' />"
-"        <menuitem action='SortSizeDesc' />"
-"        <separator />"
-"        <menuitem action='SortDurationAsc' />"
-"        <menuitem action='SortDurationDesc' />"
-"        <separator />"
-"        <menuitem action='SortBitrateAsc' />"
-"        <menuitem action='SortBitrateDesc' />"
-"        <separator />"
-"        <menuitem action='SortSamplerateAsc' />"
-"        <menuitem action='SortSamplerateDesc' />"
-"      </menu>"
-"    </menu>"
-
-"  </menubar>"
-
-
-/*
  * Tool bar
  */
 "  <toolbar name='ToolBar'>"


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