GnuCash
5.6-150-g038405b370+
|
Files | |
file | gnc-main-window.h |
Functions for adding content to a window. | |
Data Structures | |
struct | GncMainWindowPrivate |
The instance private data structure for an embedded window object. More... | |
struct | GncMainWindowSaveData |
struct | menu_update |
This data structure is used to describe the requested state of a GAction, and is used to pass data among several functions. More... | |
struct | TabWidth |
This data structure allows the passing of the tab width and whether the tab layout is on the left or right. More... | |
struct | GncMenuUpdate |
struct | GncMainWindow |
The instance data structure for a main window object. More... | |
struct | GncMainWindowClass |
The class data structure for a main window object. More... | |
struct | GncMainWindowActionData |
struct | GncToolBarShortNames |
A structure for defining alternate action names for use in the toolbar. More... | |
Macros | |
#define | PLUGIN_PAGE_LABEL "plugin-page" |
This label is used to provide a mapping from a visible page widget back to the corresponding GncPluginPage object. More... | |
#define | PLUGIN_PAGE_CLOSE_BUTTON "close-button" |
#define | PLUGIN_PAGE_TAB_LABEL "label" |
#define | GNC_PREF_SHOW_CLOSE_BUTTON "tab-close-buttons" |
#define | GNC_PREF_TAB_NEXT_RECENT "tab-next-recent" |
#define | GNC_PREF_TAB_POSITION_TOP "tab-position-top" |
#define | GNC_PREF_TAB_POSITION_BOTTOM "tab-position-bottom" |
#define | GNC_PREF_TAB_POSITION_LEFT "tab-position-left" |
#define | GNC_PREF_TAB_POSITION_RIGHT "tab-position-right" |
#define | GNC_PREF_TAB_WIDTH "tab-width" |
#define | GNC_PREF_TAB_COLOR "show-account-color-tabs" |
#define | GNC_PREF_SAVE_CLOSE_EXPIRES "save-on-close-expires" |
#define | GNC_PREF_SAVE_CLOSE_WAIT_TIME "save-on-close-wait-time" |
#define | GNC_PREF_TAB_OPEN_ADJACENT "tab-open-adjacent" |
#define | GNC_MAIN_WINDOW_NAME "GncMainWindow" |
#define | DIALOG_BOOK_OPTIONS_CM_CLASS "dialog-book-options" |
#define | MSG_AUTO_SAVE _("Changes will be saved automatically in %u seconds") |
#define | WINDOW_COUNT "WindowCount" |
#define | WINDOW_STRING "Window %d" |
#define | WINDOW_GEOMETRY "WindowGeometry" |
#define | WINDOW_POSITION "WindowPosition" |
#define | WINDOW_MAXIMIZED "WindowMaximized" |
#define | TOOLBAR_VISIBLE "ToolbarVisible" |
#define | STATUSBAR_VISIBLE "StatusbarVisible" |
#define | SUMMARYBAR_VISIBLE "SummarybarVisible" |
#define | WINDOW_FIRSTPAGE "FirstPage" |
#define | WINDOW_PAGECOUNT "PageCount" |
#define | WINDOW_PAGEORDER "PageOrder" |
#define | PAGE_TYPE "PageType" |
#define | PAGE_NAME "PageName" |
#define | PAGE_STRING "Page %d" |
#define | GNC_TYPE_MAIN_WINDOW (gnc_main_window_get_type ()) |
#define | GNC_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GNC_TYPE_MAIN_WINDOW, GncMainWindow)) |
#define | GNC_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_MAIN_WINDOW, GncMainWindowClass)) |
#define | GNC_IS_MAIN_WINDOW(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GNC_TYPE_MAIN_WINDOW)) |
#define | GNC_IS_MAIN_WINDOW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_MAIN_WINDOW)) |
#define | GNC_MAIN_WINDOW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_TYPE_MAIN_WINDOW, GncMainWindowClass)) |
#define | PLUGIN_PAGE_IMMUTABLE "page-immutable" |
Typedefs | |
typedef void(* | GncMainWindowFunc) (GncMainWindow *window, GncPluginPage *page) |
typedef void(* | GncMainWindowPageFunc) (GncPluginPage *page, gpointer user_data) |
Enumerations | |
enum | { PAGE_ADDED, PAGE_CHANGED, MENU_CHANGED, LAST_SIGNAL } |
Names of signals generated by the main window. More... | |
Functions | |
gboolean | gnc_book_options_dialog_apply_helper (GncOptionDB *options) |
Processes selected options in the Book Options dialog: checks book_currency and use_split_action_for_num to see if features kvp should be set. More... | |
G_DEFINE_TYPE_WITH_CODE (GncMainWindow, gnc_main_window, GTK_TYPE_APPLICATION_WINDOW, G_IMPLEMENT_INTERFACE(GNC_TYPE_WINDOW, gnc_window_main_window_init)) static guint main_window_signals[LAST_SIGNAL] | |
A holding place for all the signals generated by the main window code. More... | |
gboolean | gnc_main_window_is_restoring_pages (GncMainWindow *window) |
Check if the main window is restoring the plugin pages. More... | |
void | gnc_main_window_foreach_page (GncMainWindowPageFunc fn, gpointer user_data) |
Iterator function to walk all pages in all windows, calling the specified function for each page. More... | |
void | gnc_main_window_restore_all_windows (const GKeyFile *keyfile) |
Restore the persistent state of all windows. More... | |
void | gnc_main_window_restore_default_state (GncMainWindow *window) |
Restore the persistent state of one window to a sane default. | |
void | gnc_main_window_save_all_windows (GKeyFile *keyfile) |
Save the persistent state of all windows. More... | |
gboolean | gnc_main_window_finish_pending (GncMainWindow *window) |
Tell a window to finish any outstanding activities. More... | |
gboolean | gnc_main_window_all_finish_pending (void) |
Tell all pages in all windows to finish any outstanding activities. More... | |
void | main_window_update_page_long_name (GncPluginPage *page, const gchar *long_name_in) |
Update the long name of the page in the main window. More... | |
void | main_window_update_page_name (GncPluginPage *page, const gchar *name_in) |
Update the name of the page in the main window. More... | |
void | main_window_update_page_color (GncPluginPage *page, const gchar *color_in) |
Update the color on the page tabs in the main window. More... | |
void | main_window_update_page_set_read_only_icon (GncPluginPage *page, gboolean read_only) |
Update the icon on the page tabs in the main window. More... | |
GncMainWindow * | gnc_main_window_new (void) |
Create a new gnc main window plugin. More... | |
void | gnc_main_window_display_page (GncPluginPage *page) |
Bring the window containing the specified page to the top of the window stack, then switch the notebook to show the specified page. More... | |
void | gnc_main_window_open_page (GncMainWindow *window, GncPluginPage *page) |
Display a data plugin page in a window. More... | |
void | gnc_main_window_close_page (GncPluginPage *page) |
Remove a data plugin page from a window and display the previous page. More... | |
GncPluginPage * | gnc_main_window_get_current_page (GncMainWindow *window) |
Retrieve a pointer to the page that is currently at the front of the specified window. More... | |
void | gnc_main_window_manual_merge_actions (GncMainWindow *window, const gchar *group_name, GSimpleActionGroup *group) |
Manually add a set of actions to the specified window. More... | |
void | gnc_main_window_merge_actions (GncMainWindow *window, const gchar *group_name, GActionEntry *entries, guint n_entries, const gchar **ui_updates, const gchar *ui_filename, gpointer user_data) |
Add a set of actions to the specified window. More... | |
void | gnc_main_window_unmerge_actions (GncMainWindow *window, const gchar *group_name) |
Remove a set of actions from the specified window. More... | |
GAction * | gnc_main_window_find_action (GncMainWindow *window, const gchar *action_name) |
Find the GAction in the main window. More... | |
GAction * | gnc_main_window_find_action_in_group (GncMainWindow *window, const gchar *group_name, const gchar *action_name) |
Find the GAction in a specific action group for window. More... | |
GSimpleActionGroup * | gnc_main_window_get_action_group (GncMainWindow *window, const gchar *group_name) |
Retrieve a specific set of user interface actions from a window. More... | |
GtkWidget * | gnc_main_window_toolbar_find_tool_item (GncMainWindow *window, const gchar *action_name) |
Find the toolbar item with the given action name for the window specified. More... | |
GtkWidget * | gnc_main_window_menu_find_menu_item (GncMainWindow *window, const gchar *action_name) |
Find the menu item with the given action name for the window specified. More... | |
void | gnc_main_window_menu_add_accelerator_keys (GncMainWindow *window) |
Scan the main window menu and add accelerator keys to main window accelerator group. More... | |
gboolean | gnc_main_window_update_menu_for_action (GncMainWindow *window, const gchar *action_name, const gchar *label, const gchar *tooltip) |
Find the GMenuModel item given the action name for the window specified. More... | |
void | gnc_main_window_set_vis_of_items_by_action (GncMainWindow *window, const gchar **action_names, gboolean vis) |
Show or hide menu and toolbar items based on a NULL terminated list of action names. More... | |
void | gnc_main_window_init_short_names (GncMainWindow *window, GncToolBarShortNames *toolbar_labels) |
Update the labels of the toolbar items with short names. More... | |
void | gnc_main_window_update_menu_and_toolbar (GncMainWindow *window, GncPluginPage *page, const gchar **ui_updates) |
Update the main window menu with the placeholders listed in ui_updates and load the page specific toolbar. More... | |
void | gnc_book_option_num_field_source_change_cb (gboolean num_action) |
Calls gnc_book_option_num_field_source_change to initiate registered callbacks when num_field_source book option changes so that registers/reports can update themselves; sets feature flag. | |
GtkWidget * | gnc_book_options_dialog_cb (gboolean modal, gchar *title, GtkWindow *parent) |
Opens the Book Options dialog. More... | |
void | gnc_main_window_show_all_windows (void) |
Shows all main windows. | |
GtkWindow * | gnc_ui_get_gtk_window (GtkWidget *widget) |
Get a pointer to the widget's immediate top level GtkWindow. More... | |
GtkWindow * | gnc_ui_get_main_window (GtkWidget *widget) |
Get a pointer to the final GncMainWindow widget is rooted in. More... | |
void | gnc_main_window_set_progressbar_window (GncMainWindow *window) |
Set the window where all progressbar updates should occur. More... | |
gboolean | gnc_main_window_popup_menu_cb (GtkWidget *widget, GncPluginPage *page) |
Callback function invoked when the user requests that Gnucash popup the contextual menu via the keyboard context-menu request key combination (Shift-F10 by default). More... | |
gboolean | gnc_main_window_button_press_cb (GtkWidget *whatever, GdkEventButton *event, GncPluginPage *page) |
Callback function invoked when the user clicks in the content of any Gnucash window. More... | |
void | gnc_main_window_all_action_set_sensitive (const gchar *action_name, gboolean sensitive) |
Change the sensitivity of a command in all windows. More... | |
GMenuModel * | gnc_main_window_get_menu_model (GncMainWindow *window) |
Return the GMenuModel for the main window menu bar. More... | |
GType | gnc_main_window_get_type (void) |
Get the type of a gnc main window. More... | |
Variables | |
constexpr auto | gnc_main_window_max_number {10} |
Max number of windows allowed. | |
#define PLUGIN_PAGE_LABEL "plugin-page" |
This label is used to provide a mapping from a visible page widget back to the corresponding GncPluginPage object.
Definition at line 101 of file gnc-main-window.cpp.
anonymous enum |
Names of signals generated by the main window.
Definition at line 91 of file gnc-main-window.cpp.
G_DEFINE_TYPE_WITH_CODE | ( | GncMainWindow | , |
gnc_main_window | , | ||
GTK_TYPE_APPLICATION_WINDOW | , | ||
G_IMPLEMENT_INTERFACE(GNC_TYPE_WINDOW, gnc_window_main_window_init) | |||
) |
A holding place for all the signals generated by the main window code.
gboolean gnc_book_options_dialog_apply_helper | ( | GncOptionDB * | options | ) |
Processes selected options in the Book Options dialog: checks book_currency and use_split_action_for_num to see if features kvp should be set.
To be used where ever a new book situation requires book option selection (e.g., not just in Book Options dialog opened from main window but also in new-file assistant).
GncOptionDB | * options. |
Definition at line 4542 of file gnc-main-window.cpp.
GtkWidget * gnc_book_options_dialog_cb | ( | gboolean | modal, |
gchar * | title, | ||
GtkWindow * | parent | ||
) |
Opens the Book Options dialog.
modal | True to open in modal mode, false otherwise. |
title | Title of the dialog; "Book Options" if NULL. |
parent | The toplevel GdkWindow with which the dialog will be transient for. |
Definition at line 4648 of file gnc-main-window.cpp.
void gnc_main_window_all_action_set_sensitive | ( | const gchar * | action_name, |
gboolean | sensitive | ||
) |
Change the sensitivity of a command in all windows.
This can be used to serialize access to a command so that in cannot be reinvoked until the current invocation is finished.
action_name | The name of the command to modity. |
sensitive | Whether or not the user should be able to invoke this action. |
Definition at line 5647 of file gnc-main-window.cpp.
gboolean gnc_main_window_all_finish_pending | ( | void | ) |
Tell all pages in all windows to finish any outstanding activities.
This function will call gnc_plugin_page_finish_pending for each installed page. If any page returns a failure indication, then the function stops walking pages and immediately returns a failure.
Definition at line 1090 of file gnc-main-window.cpp.
gboolean gnc_main_window_button_press_cb | ( | GtkWidget * | whatever, |
GdkEventButton * | event, | ||
GncPluginPage * | page | ||
) |
Callback function invoked when the user clicks in the content of any Gnucash window.
If this was a "right-click" then Gnucash will popup the contextual menu.
whatever | Whatever widget had focus when the user issued the keyboard context-menu request. |
event | The event parameter describing where on the screen the mouse was pointing when clicked, type of click, modifiers, etc. |
page | This is the GncPluginPage corresponding to the visible page. |
Definition at line 5627 of file gnc-main-window.cpp.
void gnc_main_window_close_page | ( | GncPluginPage * | page | ) |
Remove a data plugin page from a window and display the previous page.
If the page removed was the last page in the window, and there is more than one window open, then the entire window will be destroyed.
page | The page of data to be removed. |
Definition at line 3361 of file gnc-main-window.cpp.
void gnc_main_window_display_page | ( | GncPluginPage * | page | ) |
Bring the window containing the specified page to the top of the window stack, then switch the notebook to show the specified page.
page | The existing page to be displayed. |
Definition at line 3184 of file gnc-main-window.cpp.
GAction * gnc_main_window_find_action | ( | GncMainWindow * | window, |
const gchar * | action_name | ||
) |
Find the GAction in the main window.
window | The window which should be checked for the action. |
action_name | The name of the command to be retrieved. |
Definition at line 3552 of file gnc-main-window.cpp.
GAction * gnc_main_window_find_action_in_group | ( | GncMainWindow * | window, |
const gchar * | group_name, | ||
const gchar * | action_name | ||
) |
Find the GAction in a specific action group for window.
window | The window which should be checked for the action. |
group_name | The name of the action group to search. |
name | The name of the command to be retrieved. |
Definition at line 3566 of file gnc-main-window.cpp.
gboolean gnc_main_window_finish_pending | ( | GncMainWindow * | window | ) |
Tell a window to finish any outstanding activities.
This function will call gnc_plugin_page_finish_pending for each installed page. If any page returns a failure indication, then the function stops walking pages and immediately returns a failure.
window | The window whose pages should be checked. |
Definition at line 1070 of file gnc-main-window.cpp.
void gnc_main_window_foreach_page | ( | GncMainWindowPageFunc | fn, |
gpointer | user_data | ||
) |
Iterator function to walk all pages in all windows, calling the specified function for each page.
entry | A pointer to the function to be called. |
user_data | A data pointer passed to each call of the function. |
Definition at line 411 of file gnc-main-window.cpp.
GSimpleActionGroup * gnc_main_window_get_action_group | ( | GncMainWindow * | window, |
const gchar * | group_name | ||
) |
Retrieve a specific set of user interface actions from a window.
This function can be used to get an group of action to be manipulated when the front page of a window has changed.
window | The window to check when looking for the action group. |
group_name | The name of a set of actions. This must be a name provided when the actions were installed. |
Definition at line 3590 of file gnc-main-window.cpp.
GncPluginPage * gnc_main_window_get_current_page | ( | GncMainWindow * | window | ) |
Retrieve a pointer to the page that is currently at the front of the specified window.
Any plugin that needs to manipulate its menus based upon the currently selected menu page should connect to the "page_changed" signal on a window. The callback function from that signal can then call this function to obtain a pointer to the current page.
window | A pointer to the window whose front page should be returned. |
Definition at line 3418 of file gnc-main-window.cpp.
GMenuModel * gnc_main_window_get_menu_model | ( | GncMainWindow * | window | ) |
Return the GMenuModel for the main window menu bar.
window | The window for the menu bar. |
Definition at line 5658 of file gnc-main-window.cpp.
GType gnc_main_window_get_type | ( | void | ) |
Get the type of a gnc main window.
void gnc_main_window_init_short_names | ( | GncMainWindow * | window, |
GncToolBarShortNames * | toolbar_labels | ||
) |
Update the labels of the toolbar items with short names.
window | The window that conatins a tool bar to update. |
toolbar_labels | A pointer to a NULL terminated array of data GncToolBarShortNames items. |
Definition at line 3715 of file gnc-main-window.cpp.
gboolean gnc_main_window_is_restoring_pages | ( | GncMainWindow * | window | ) |
Check if the main window is restoring the plugin pages.
This is used on report pages to delay the creation of the report till the page is focused.
window | The window whose pages should be checked. |
Definition at line 401 of file gnc-main-window.cpp.
void gnc_main_window_manual_merge_actions | ( | GncMainWindow * | window, |
const gchar * | group_name, | ||
GSimpleActionGroup * | group | ||
) |
Manually add a set of actions to the specified window.
Plugins whose user interface is not hard coded (e.g. the menu-additions * plugin) must create their actions at run time, then use this * function to install them into the window.
window | A pointer to the window whose user interface should be updated. |
group_name | The name for this set of actions. This name should be unique among all groups added to the window, and will be needed to remove the actions from this window. |
group | A pointer to the GSimpleActionGroup. |
Definition at line 3433 of file gnc-main-window.cpp.
void gnc_main_window_menu_add_accelerator_keys | ( | GncMainWindow * | window | ) |
Scan the main window menu and add accelerator keys to main window accelerator group.
window | A pointer to the window whose user interface should be updated. |
Definition at line 3637 of file gnc-main-window.cpp.
GtkWidget * gnc_main_window_menu_find_menu_item | ( | GncMainWindow * | window, |
const gchar * | action_name | ||
) |
Find the menu item with the given action name for the window specified.
window | A pointer to the window whose user interface should be updated. |
action_name | The action name of the tool item to find. |
Definition at line 3614 of file gnc-main-window.cpp.
void gnc_main_window_merge_actions | ( | GncMainWindow * | window, |
const gchar * | group_name, | ||
GActionEntry * | entries, | ||
guint | n_entries, | ||
const gchar ** | ui_updates, | ||
const gchar * | ui_filename, | ||
gpointer | user_data | ||
) |
Add a set of actions to the specified window.
This function should not need to be called directly by plugin implementors. Correctly assigning values to the GncPluginClass fields during plugin initialization will cause this routine to be automatically called.
window | A pointer to the window whose user interface should be updated. |
group_name | The name for this set of actions. This name should be unique among all groups added to the window, and will be needed to remove the actions from this window. |
entries | A pointer to an array of GActionEntry. These are the actions that will be added to the user interface. |
n_entries | The number of actions in the array. |
filename | The filename containing the user interface definition that goes with this set of actions. |
user_data | The data to be provided to all callback functions. |
Definition at line 3501 of file gnc-main-window.cpp.
GncMainWindow * gnc_main_window_new | ( | void | ) |
Create a new gnc main window plugin.
Definition at line 2982 of file gnc-main-window.cpp.
void gnc_main_window_open_page | ( | GncMainWindow * | window, |
GncPluginPage * | page | ||
) |
Display a data plugin page in a window.
If the page already exists in any window, then that window will be brought to the front and the notebook switch to display the specified page. If the page is new then it will be added to the specified window (unless the page itself requests otherwise.). If the window is NULL, the new page will be added to the first window.
window | The window to display a new page in. |
page | The new page of data to be displayed, or the existing page of data the should be brought to the top and displayed. |
Definition at line 3208 of file gnc-main-window.cpp.
gboolean gnc_main_window_popup_menu_cb | ( | GtkWidget * | widget, |
GncPluginPage * | page | ||
) |
Callback function invoked when the user requests that Gnucash popup the contextual menu via the keyboard context-menu request key combination (Shift-F10 by default).
page | This is the GncPluginPage corresponding to the visible page. |
widget | Whatever widget had focus when the user issued the keyboard context-menu request. |
Definition at line 5612 of file gnc-main-window.cpp.
void gnc_main_window_restore_all_windows | ( | const GKeyFile * | keyfile | ) |
Restore the persistent state of all windows.
keyfile | The GKeyFile containing persistent window state. |
Definition at line 853 of file gnc-main-window.cpp.
void gnc_main_window_save_all_windows | ( | GKeyFile * | keyfile | ) |
Save the persistent state of all windows.
keyfile | The GKeyFile to contain persistent window state. |
Definition at line 1052 of file gnc-main-window.cpp.
void gnc_main_window_set_progressbar_window | ( | GncMainWindow * | window | ) |
Set the window where all progressbar updates should occur.
This is a wrapper around the gnc_window_set_progressbar_window() function.
window | The window to use for all progressbar updates. |
Definition at line 5516 of file gnc-main-window.cpp.
void gnc_main_window_set_vis_of_items_by_action | ( | GncMainWindow * | window, |
const gchar ** | action_names, | ||
gboolean | vis | ||
) |
Show or hide menu and toolbar items based on a NULL terminated list of action names.
window | A pointer to the window whose user interface should be updated. |
action_names | A NULL terminated list of actions names that should be modified. |
vis | Whether to show or hide the widget items |
Definition at line 3676 of file gnc-main-window.cpp.
GtkWidget * gnc_main_window_toolbar_find_tool_item | ( | GncMainWindow * | window, |
const gchar * | action_name | ||
) |
Find the toolbar item with the given action name for the window specified.
window | A pointer to the window whose user interface should be updated. |
action_name | The action name of the tool item to find. |
Definition at line 3601 of file gnc-main-window.cpp.
void gnc_main_window_unmerge_actions | ( | GncMainWindow * | window, |
const gchar * | group_name | ||
) |
Remove a set of actions from the specified window.
This function should not need to be called directly by plugin implementors. It will automatically be called when a plugin is removed from a window.
window | A pointer to the window whose user interface should be updated. |
group_name | The name for this set of actions. This must be the same name provided when the actions were installed. |
Definition at line 3542 of file gnc-main-window.cpp.
void gnc_main_window_update_menu_and_toolbar | ( | GncMainWindow * | window, |
GncPluginPage * | page, | ||
const gchar ** | ui_updates | ||
) |
Update the main window menu with the placeholders listed in ui_updates and load the page specific toolbar.
window | The window which should be checked for the action. |
page | The plugin page calling this function. |
ui_updates | A NULL terminated list of placeholders to load |
Definition at line 3779 of file gnc-main-window.cpp.
gboolean gnc_main_window_update_menu_for_action | ( | GncMainWindow * | window, |
const gchar * | action_name, | ||
const gchar * | label, | ||
const gchar * | tooltip | ||
) |
Find the GMenuModel item given the action name for the window specified.
window | A pointer to the window whose user interface should be updated. |
action_name | The action name of the menu item to find. |
label | The new label for the menu item. |
tooltip | The new tooltip for the menu item, optional. |
Definition at line 3650 of file gnc-main-window.cpp.
GtkWindow* gnc_ui_get_gtk_window | ( | GtkWidget * | widget | ) |
Get a pointer to the widget's immediate top level GtkWindow.
This can be a dialog window or a GncMainWindow. If the widget is not a child of a GtkWindow (yet), NULL is returned.
widget | the widget to find a GtkWindow for. |
Definition at line 5337 of file gnc-main-window.cpp.
GtkWindow* gnc_ui_get_main_window | ( | GtkWidget * | widget | ) |
Get a pointer to the final GncMainWindow widget is rooted in.
If widget is a child of a GncMainWindow return that window. If it's a child of a dialog window recursively query the dialog's transient parent until the first parent that's a GncMainWindow and return that. If widget is NULL or not part of any GtkWindow, get a pointer to the first active top level window. If there is none, return the first mapped window. If there's no mapped window return NULL.
An example of why searching for a GncMainWindow makes sense: suppose a user has opened a search dialog for vendors and in that dialog has clicked "View vendor invoices". This opens another search window in which the user can click "View/Edit bill". Clicking that button should open a new tab in the GncMainWindow from which the first search dialog was opened.
widget | the widget to find a GncMainWindow for. |
Definition at line 5352 of file gnc-main-window.cpp.
void main_window_update_page_color | ( | GncPluginPage * | page, |
const gchar * | color_in | ||
) |
Update the color on the page tabs in the main window.
page | The page to be updated. |
color_in | The new color string for the page tab. |
Definition at line 2415 of file gnc-main-window.cpp.
void main_window_update_page_long_name | ( | GncPluginPage * | page, |
const gchar * | long_name_in | ||
) |
Update the long name of the page in the main window.
page | The page to be updated. |
long_name_in | The new long name for the page. |
Definition at line 2310 of file gnc-main-window.cpp.
void main_window_update_page_name | ( | GncPluginPage * | page, |
const gchar * | name_in | ||
) |
Update the name of the page in the main window.
page | The page to be updated. |
name_in | The new name for the page. |
Definition at line 2352 of file gnc-main-window.cpp.
void main_window_update_page_set_read_only_icon | ( | GncPluginPage * | page, |
gboolean | read_only | ||
) |
Update the icon on the page tabs in the main window.
page | The page to be updated. |
read_only | If set a padlock icon will be displayed for the page tab icon if it had one. |
Definition at line 2489 of file gnc-main-window.cpp.