mirror of
https://github.com/Gnucash/gnucash.git
synced 2025-02-25 18:55:30 -06:00
Make struct GtkMainWindow private with accessor for just_plugin_prefs.
This commit is contained in:
parent
81e11f70c3
commit
8331f99886
@ -208,10 +208,16 @@ static void gnc_quartz_set_menu (GncMainWindow* window);
|
||||
#endif
|
||||
static void gnc_main_window_init_menu_updaters (GncMainWindow *window);
|
||||
|
||||
struct _GncMainWindow
|
||||
{
|
||||
GtkApplicationWindow gtk_application_window; /**< The parent object for a main window. */
|
||||
gboolean window_quitting; /**< Set to TRUE when quitting from this window. */
|
||||
gboolean just_plugin_prefs; /**< Just remove preferences only from plugins */
|
||||
};
|
||||
|
||||
/** The instance private data structure for an embedded window
|
||||
* object. */
|
||||
typedef struct GncMainWindowPrivate
|
||||
typedef struct
|
||||
{
|
||||
/** The dock (vbox) at the top of the window containing the
|
||||
* menubar and toolbar. These items are generated by the UI
|
||||
@ -5666,5 +5672,11 @@ gnc_main_window_get_menu_model (GncMainWindow *window)
|
||||
return priv->menubar_model;
|
||||
}
|
||||
|
||||
gboolean
|
||||
gnc_main_window_just_plugin_prefs (GncMainWindow* window)
|
||||
{
|
||||
return window->just_plugin_prefs;
|
||||
}
|
||||
|
||||
/** @} */
|
||||
/** @} */
|
||||
|
@ -63,12 +63,7 @@ typedef struct
|
||||
} GncMenuUpdate;
|
||||
|
||||
/** The instance data structure for a main window object. */
|
||||
typedef struct GncMainWindow
|
||||
{
|
||||
GtkApplicationWindow gtk_application_window; /**< The parent object for a main window. */
|
||||
gboolean window_quitting; /**< Set to TRUE when quitting from this window. */
|
||||
gboolean just_plugin_prefs; /**< Just remove preferences only from plugins */
|
||||
} GncMainWindow;
|
||||
typedef struct _GncMainWindow GncMainWindow;
|
||||
|
||||
/** The class data structure for a main window object. */
|
||||
typedef struct
|
||||
@ -545,6 +540,8 @@ void gnc_main_window_update_menu_and_toolbar (GncMainWindow *window,
|
||||
**/
|
||||
void gnc_main_window_show_all_windows(void);
|
||||
|
||||
gboolean gnc_main_window_just_plugin_prefs (GncMainWindow* window);
|
||||
|
||||
/**
|
||||
* Opens the Book Options dialog.
|
||||
*
|
||||
|
@ -543,7 +543,7 @@ gnc_plugin_menu_additions_remove_from_window (GncPlugin *plugin,
|
||||
* actions name is installed into the plugin class. */
|
||||
simple_action_group = gnc_main_window_get_action_group (window, PLUGIN_ACTIONS_NAME);
|
||||
|
||||
if (simple_action_group && !window->just_plugin_prefs)
|
||||
if (simple_action_group && !gnc_main_window_just_plugin_prefs (window))
|
||||
gtk_widget_insert_action_group (GTK_WIDGET(window), PLUGIN_ACTIONS_NAME, NULL);
|
||||
|
||||
LEAVE(" ");
|
||||
|
@ -196,7 +196,7 @@ gnc_plugin_remove_from_window (GncPlugin *plugin,
|
||||
/*
|
||||
* Update window to remove UI items
|
||||
*/
|
||||
if (klass->actions_name && !window->just_plugin_prefs)
|
||||
if (klass->actions_name && !gnc_main_window_just_plugin_prefs (window))
|
||||
{
|
||||
DEBUG ("%s: %d actions to unmerge",
|
||||
klass->actions_name, (klass->n_actions));
|
||||
|
Loading…
Reference in New Issue
Block a user