Remove setup for important actions

This commit is contained in:
Robert Fewell 2022-10-28 16:34:43 +01:00
parent 103d82dcc3
commit 464c3340d1
5 changed files with 0 additions and 85 deletions

View File

@ -487,16 +487,6 @@ static GncDisplayItem gnc_menu_display_items [] =
/** The number of display items provided by the main window. */ /** The number of display items provided by the main window. */
static guint gnc_menu_n_display_items = G_N_ELEMENTS(gnc_menu_display_items); static guint gnc_menu_n_display_items = G_N_ELEMENTS(gnc_menu_display_items);
/** These are the "important" actions provided by the main window.
* Their labels will appear when the toolbar is set to "Icons and
* important text" (e.g. GTK_TOOLBAR_BOTH_HORIZ) mode. */
static const gchar *gnc_menu_important_actions[] =
{
"FileCloseAction",
nullptr,
};
/** The following are in the main window so they will always be /** The following are in the main window so they will always be
* present in the menu structure, but they are never sensitive. * present in the menu structure, but they are never sensitive.
* These actions should be overridden in child windows where they * These actions should be overridden in child windows where they
@ -4417,8 +4407,6 @@ gnc_main_window_setup_window (GncMainWindow *window)
gnc_main_window_menu_item_vis_by_action (window, gnc_main_window_menu_item_vis_by_action (window,
always_hidden_actions, false); always_hidden_actions, false);
//FIXMEb 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); // gtk_ui_manager_insert_action_group (window->ui_merge, priv->action_group, 0);

View File

@ -150,14 +150,6 @@ gnc_plugin_add_to_window (GncPlugin *plugin,
klass->display_items, klass->n_display_items, klass->display_items, klass->n_display_items,
klass->ui_updates, klass->ui_updates,
klass->ui_filename, plugin); klass->ui_filename, plugin);
if (klass->important_actions)
{
simple_action_group =
gnc_main_window_get_action_group (window, klass->actions_name);
//FIXMEb gnc_plugin_set_important_actions (simple_action_group,
// klass->important_actions);
}
} }
/* /*
@ -251,30 +243,6 @@ gnc_plugin_init_short_names (GtkWidget *toolbar,
} }
/** Mark certain actions as "important". This means that their labels
* will appear when the toolbar is set to "Icons and important text"
* (e.g. GTK_TOOLBAR_BOTH_HORIZ) mode.
*
* See gnc-plugin.h for documentation on the function arguments. */
void
gnc_plugin_set_important_actions (GSimpleActionGroup *simple_action_group,
const gchar **name)
{
GAction *action;
gint i;
for (i = 0; name[i]; i++)
{
//FIXMEb action = g_action_map_lookup_action (G_ACTION_MAP(simple_action_group), name[i]);
// g_object_set (G_OBJECT(action), "is_important", TRUE, NULL);
}
/* If this trips, you've got too many "important" actions. That
* can't *all* be that important, can they? */
g_assert(i <= 3);
}
/* Update a property of existing UI actions. This function can /* Update a property of existing UI actions. This function can
* modify actions making them visible, invisible, sensitive, or * modify actions making them visible, invisible, sensitive, or
* insensitive. * insensitive.

View File

@ -140,11 +140,6 @@ typedef struct
GtkToggleActionEntry *toggle_actions; GtkToggleActionEntry *toggle_actions;
/** The number of toggle actions in the toggle actions array. */ /** The number of toggle actions in the toggle actions array. */
guint n_toggle_actions; guint n_toggle_actions;
/** A NULL terminated list of actions that should be considered
* important. In the toolbar, these actions will display the
* action name when the toolbar is in "text beside icons"
* mode. */
const gchar **important_actions;
/** The relative name of the XML file describing the /** The relative name of the XML file describing the
* menu/toolbar action items. */ * menu/toolbar action items. */
const gchar *ui_filename; const gchar *ui_filename;
@ -266,21 +261,6 @@ void gnc_plugin_init_short_names (GtkWidget *toolbar,
GncToolBarShortNames *toolbar_labels); GncToolBarShortNames *toolbar_labels);
/** Mark certain actions as "important". This means that their labels
* will appear when the toolbar is set to "Icons and important text"
* (e.g. GTK_TOOLBAR_BOTH_HORIZ) mode.
*
* @param action_group The group of all actions associated with a
* plugin or plugin page. All actions to me modified must be in this
* group.
*
* @param name A list of actions names to be marked important. This
* list must be NULL terminated.
*/
void gnc_plugin_set_important_actions (GSimpleActionGroup *simple_action_group,
const gchar **names);
/** Update a property on a set of existing GtkActions. This function /** Update a property on a set of existing GtkActions. This function
* can be easily used to make a list of actions visible, invisible, * can be easily used to make a list of actions visible, invisible,
* sensitive, or insensitive. * sensitive, or insensitive.

View File

@ -144,15 +144,6 @@ static const gchar *gnc_plugin_load_ui_items [] =
NULL, NULL,
}; };
/** These are the "important" actions provided by the basic commands
* plugin. Their labels will appear when the toolbar is set to
* "Icons and important text" (e.g. GTK_TOOLBAR_BOTH_HORIZ) mode. */
static const gchar *gnc_plugin_important_actions[] =
{
"FileSaveAction",
NULL,
};
/** The following items should be made insensitive at startup time. The /** The following items should be made insensitive at startup time. The
* sensitivity will be changed by some later event. */ * sensitivity will be changed by some later event. */
static const gchar *gnc_plugin_initially_insensitive_actions[] = static const gchar *gnc_plugin_initially_insensitive_actions[] =
@ -312,7 +303,6 @@ gnc_plugin_basic_commands_class_init (GncPluginBasicCommandsClass *klass)
plugin_class->actions_name = PLUGIN_ACTIONS_NAME; plugin_class->actions_name = PLUGIN_ACTIONS_NAME;
plugin_class->actionsb = gnc_plugin_actions; plugin_class->actionsb = gnc_plugin_actions;
plugin_class->n_actionsb = gnc_plugin_n_actions; plugin_class->n_actionsb = gnc_plugin_n_actions;
plugin_class->important_actions = gnc_plugin_important_actions;
plugin_class->ui_filename = PLUGIN_UI_FILENAME; plugin_class->ui_filename = PLUGIN_UI_FILENAME;
plugin_class->ui_updates = gnc_plugin_load_ui_items; plugin_class->ui_updates = gnc_plugin_load_ui_items;
} }

View File

@ -571,15 +571,6 @@ static const gchar *gnc_plugin_load_ui_items [] =
NULL, NULL,
}; };
/** These are the "important" actions provided by the register page.
* Their labels will appear when the toolbar is set to "Icons and
* important text" (e.g. GTK_TOOLBAR_BOTH_HORIZ) mode. */
static const gchar* important_actions[] =
{
"SplitTransactionAction",
NULL,
};
/** Actions that require an account to be selected before they are /** Actions that require an account to be selected before they are
* enabled. */ * enabled. */
static const gchar* actions_requiring_account[] = static const gchar* actions_requiring_account[] =
@ -884,8 +875,6 @@ gnc_plugin_page_register_init (GncPluginPageRegister* plugin_page)
gnc_plugin_page_register_n_actions, gnc_plugin_page_register_n_actions,
plugin_page); plugin_page);
//FIXMEb gnc_plugin_set_important_actions (action_group, important_actions);
priv->lines_default = DEFAULT_LINES_AMOUNT; priv->lines_default = DEFAULT_LINES_AMOUNT;
priv->read_only = FALSE; priv->read_only = FALSE;
priv->fd.cleared_match = CLEARED_ALL; priv->fd.cleared_match = CLEARED_ALL;