diff --git a/ChangeLog b/ChangeLog index 0d972f15ca..2e6a54ad86 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,12 @@ 2005-12-29 David Hampton + * src/gnome-utils/ui/gnc-main-window-ui.xml: + * src/gnome-utils/gnc-main-window.c: + * src/gnome/ui/gnc-plugin-page-register-ui.xml: Move the "Sort By" + and "Filter By" menu items to the main window so they will always + appear in the same place in the menus. Hide them so they don't + actually appear until a page provides them. + * src/engine/gw-engine-spec.scm: Comment out unused function that won't compile with g-wrap 1.9 after the const-ifying of the account functions. diff --git a/src/gnome-utils/gnc-main-window.c b/src/gnome-utils/gnc-main-window.c index a5605fe533..6138a8e744 100644 --- a/src/gnome-utils/gnc-main-window.c +++ b/src/gnome-utils/gnc-main-window.c @@ -244,6 +244,8 @@ static GtkActionEntry gnc_menu_actions [] = /* View menu */ + { "ViewSortByAction", NULL, N_("_Sort By..."), NULL, NULL, NULL }, + { "ViewFilterByAction", NULL, N_("_Filter By..."), NULL, NULL, NULL }, { "ViewRefreshAction", GTK_STOCK_REFRESH, N_("_Refresh"), "r", N_("Refresh this window"), G_CALLBACK (gnc_main_window_cmd_view_refresh) }, @@ -343,6 +345,17 @@ static const gchar *always_insensitive_actions[] = { }; +/** The following are in the main window so they will always be + * present in the menu structure, but they are always hidden. + * These actions should be overridden in child windows where they + * have meaning. */ +static const gchar *always_hidden_actions[] = { + "ViewSortByAction", + "ViewFilterByAction", + NULL +}; + + /** If a page is flagged as immutable, then the following actions * cannot be performed on that page. */ static const gchar *immutable_page_actions[] = { @@ -2368,6 +2381,9 @@ gnc_main_window_setup_window (GncMainWindow *window) gnc_plugin_update_actions(priv->action_group, always_insensitive_actions, "sensitive", FALSE); + gnc_plugin_update_actions(priv->action_group, + always_hidden_actions, + "visible", FALSE); gnc_plugin_set_important_actions (priv->action_group, gnc_menu_important_actions); gtk_ui_manager_insert_action_group (window->ui_merge, priv->action_group, 0); diff --git a/src/gnome-utils/ui/gnc-main-window-ui.xml b/src/gnome-utils/ui/gnc-main-window-ui.xml index 718a11859f..f254b1c0a3 100644 --- a/src/gnome-utils/ui/gnc-main-window-ui.xml +++ b/src/gnome-utils/ui/gnc-main-window-ui.xml @@ -58,7 +58,9 @@ + + diff --git a/src/gnome/ui/gnc-plugin-page-register-ui.xml b/src/gnome/ui/gnc-plugin-page-register-ui.xml index 9fe6eaa7d1..781b4e8bd1 100644 --- a/src/gnome/ui/gnc-plugin-page-register-ui.xml +++ b/src/gnome/ui/gnc-plugin-page-register-ui.xml @@ -30,10 +30,6 @@ - - - -