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.


git-svn-id: svn+ssh://svn.gnucash.org/repo/gnucash/trunk@12204 57a11ea4-9604-0410-9ed3-97b8803252fd
zzzoldfeatures/register-rewrite
David Hampton 21 years ago
parent 9cab16538f
commit fe80448c99

@ -1,5 +1,12 @@
2005-12-29 David Hampton <hampton@employees.org>
* 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.

@ -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"), "<control>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);

@ -58,7 +58,9 @@
<separator name="ViewSep1"/>
<placeholder name="ViewContentPlaceholder"/>
<separator name="ViewSep2"/>
<menuitem name="ViewSortBy" action="ViewSortByAction"/>
<placeholder name="ViewSortPlaceholder"/>
<menuitem name="ViewFilterBy" action="ViewFilterByAction"/>
<placeholder name="ViewFilterPlaceholder"/>
<separator name="ViewSep3"/>
<placeholder name="ViewZoomPlaceholder"/>

@ -30,10 +30,6 @@
<separator name="ViewSep44"/>
<menuitem name="ViewStyleDoubleLine" action="ViewStyleDoubleLineAction"/>
</placeholder>
<placeholder name="ViewSortPlaceholder">
<menuitem name="ViewSortBy" action="ViewSortByAction"/>
<menuitem name="ViewFilterBy" action="ViewFilterByAction"/>
</placeholder>
</menu>
<menu name="Actions" action="ActionsAction">

Loading…
Cancel
Save