GnuCash
5.6-150-g038405b370+
|
Files | |
file | gnc-plugin.c |
Functions for adding plugins to a Gnucash window. | |
file | gnc-plugin.h |
Functions for adding plugins to a GnuCash window. | |
Data Structures | |
struct | GncPluginPrivate |
The instance private data for a menu-only plugin. More... | |
struct | _GncPluginClass |
The class data structure for a menu-only plugin. More... | |
struct | action_toolbar_labels |
A structure for defining alternate action names for use in the toolbar. More... | |
Macros | |
#define | GNC_TYPE_PLUGIN (gnc_plugin_get_type ()) |
#define | GNC_PLUGIN_NAME "GncPlugin" |
Functions | |
G_DEFINE_TYPE_WITH_CODE (GncPlugin, gnc_plugin, G_TYPE_OBJECT, G_ADD_PRIVATE(GncPlugin)) | |
Initialize the class for the new gnucash plugin object. More... | |
void | gnc_plugin_add_to_window (GncPlugin *plugin, GncMainWindow *window, GQuark type) |
Add the specified plugin from the specified window. More... | |
void | gnc_plugin_remove_from_window (GncPlugin *plugin, GncMainWindow *window, GQuark type) |
Remove the specified plugin from the specified window. More... | |
const gchar * | gnc_plugin_get_name (GncPlugin *plugin) |
Retrieve the textual name of a plugin. More... | |
void | gnc_plugin_init_short_names (GtkWidget *toolbar, GncToolBarShortNames *toolbar_labels) |
Add "short" labels to existing actions. More... | |
void | gnc_plugin_set_actions_enabled (GActionMap *action_map, const gchar **action_names, gboolean enable) |
This function sets the sensitivity of a GAction in a specific group. More... | |
void | gnc_plugin_add_menu_tooltip_callbacks (GtkWidget *menubar, GMenuModel *menubar_model, GtkWidget *statusbar) |
This function adds the tooltip callbacks to make the tooltips appear in the status bar. More... | |
void | gnc_plugin_add_toolbar_tooltip_callbacks (GtkWidget *toolbar, GtkWidget *statusbar) |
This function adds the tooltip callbacks to make the tooltips appear in the status bar. More... | |
G_DEFINE_TYPE_WITH_CODE | ( | GncPlugin | , |
gnc_plugin | , | ||
G_TYPE_OBJECT | , | ||
G_ADD_PRIVATE(GncPlugin) | |||
) |
Initialize the class for the new gnucash plugin object.
This will set up any function pointers that override functions in the parent class, and also installs the proprieties that are unique to this class.
klass | The new class structure created by the object system. |
Definition at line 61 of file gnc-plugin.c.
void gnc_plugin_add_menu_tooltip_callbacks | ( | GtkWidget * | menubar, |
GMenuModel * | menubar_model, | ||
GtkWidget * | statusbar | ||
) |
This function adds the tooltip callbacks to make the tooltips appear in the status bar.
menubar | The main window menu bar widget. |
menubar_model | The GMenuModel used to create the menubar. |
statusbar | The status bar widget in the main window. |
Definition at line 268 of file gnc-plugin.c.
void gnc_plugin_add_to_window | ( | GncPlugin * | plugin, |
GncMainWindow * | window, | ||
GQuark | type | ||
) |
Add the specified plugin from the specified window.
Add the specified plugin to the specified window.
This function will add the page's user interface from the window and call the plugin to perform any plugin specific actions.
See gnc-plugin.h for documentation on the function arguments.
This function will add the page's user interface from the window and call the plugin to perform any plugin specific actions.
plugin | The plugin to be added. |
window | Add the plugin to this window. |
type | An identifier for the type of window specified. |
Definition at line 133 of file gnc-plugin.c.
void gnc_plugin_add_toolbar_tooltip_callbacks | ( | GtkWidget * | toolbar, |
GtkWidget * | statusbar | ||
) |
This function adds the tooltip callbacks to make the tooltips appear in the status bar.
toolbar | The main window tool bar widget. |
statusbar | The status bar widget in the main window. |
Definition at line 299 of file gnc-plugin.c.
const gchar * gnc_plugin_get_name | ( | GncPlugin * | plugin | ) |
Retrieve the textual name of a plugin.
plugin | The plugin whose name should be returned. |
Definition at line 212 of file gnc-plugin.c.
void gnc_plugin_init_short_names | ( | GtkWidget * | toolbar, |
GncToolBarShortNames * | toolbar_labels | ||
) |
Add "short" labels to existing actions.
The "short" label is the string used on toolbar buttons when the action is visible.
See gnc-plugin.h for documentation on the function arguments.
The "short" label is the string used on toolbar buttons when the action is visible. All toolbar buttons are homogeneous in size and are sized to fit the longest label. Therefore, this structure should be used if an action name is more than one word. This way the menu can have the label "Whizzy Feature", while the toolbar button only has the label "Whizzy".
action_group | The group of all actions associated with a plugin or plugin page. All actions to me modified must be in this group. |
toolbar_labels | A pointer to a NULL terminated array of data GncToolBarShortNames items. |
Definition at line 229 of file gnc-plugin.c.
void gnc_plugin_remove_from_window | ( | GncPlugin * | plugin, |
GncMainWindow * | window, | ||
GQuark | type | ||
) |
Remove the specified plugin from the specified window.
This function will call the plugin to perform any plugin specific actions and remove the page's user interface from the window.
plugin | The plugin to be removed. |
window | The window the plugin should be removed from. |
type | An identifier for the type of window specified. |
Definition at line 175 of file gnc-plugin.c.
void gnc_plugin_set_actions_enabled | ( | GActionMap * | action_map, |
const gchar ** | action_names, | ||
gboolean | enable | ||
) |
This function sets the sensitivity of a GAction in a specific group.
action_map | The action map associated with the window. |
action_names | A NULL terminated list of actions names that should be modified. |
enable | A boolean specifying the new state for the specified property. |
Definition at line 250 of file gnc-plugin.c.