GnuCash
2.6.99
|
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 |
struct | GncPlugin |
struct | GncPluginClass |
struct | action_toolbar_labels |
Macros | |
#define | GNC_PLUGIN_GET_PRIVATE(o) (G_TYPE_INSTANCE_GET_PRIVATE ((o), GNC_TYPE_PLUGIN, GncPluginPrivate)) |
#define | GNC_TYPE_PLUGIN (gnc_plugin_get_type ()) |
#define | GNC_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), GNC_TYPE_PLUGIN, GncPlugin)) |
#define | GNC_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GNC_TYPE_PLUGIN, GncPluginClass)) |
#define | GNC_IS_PLUGIN(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), GNC_TYPE_PLUGIN)) |
#define | GNC_IS_PLUGIN_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GNC_TYPE_PLUGIN)) |
#define | GNC_PLUGIN_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GNC_PLUGIN, GncPluginClass)) |
#define | GNC_PLUGIN_NAME "GncPlugin" |
Typedefs | |
typedef struct GncPluginPrivate | GncPluginPrivate |
Functions | |
GType | gnc_plugin_get_type (void) |
void | gnc_plugin_add_to_window (GncPlugin *plugin, GncMainWindow *window, GQuark type) |
void | gnc_plugin_remove_from_window (GncPlugin *plugin, GncMainWindow *window, GQuark type) |
const gchar * | gnc_plugin_get_name (GncPlugin *plugin) |
void | gnc_plugin_init_short_names (GtkActionGroup *action_group, action_toolbar_labels *toolbar_labels) |
void | gnc_plugin_set_important_actions (GtkActionGroup *action_group, const gchar **name) |
void | gnc_plugin_update_actions (GtkActionGroup *action_group, const gchar **action_names, const gchar *property_name, gboolean value) |
gint | gnc_plugin_add_actions (GtkUIManager *ui_merge, GtkActionGroup *action_group, const gchar *filename) |
typedef struct GncPluginPrivate GncPluginPrivate |
The instance private data for a menu-only plugin. This data structure is unused.
gint gnc_plugin_add_actions | ( | GtkUIManager * | ui_merge, |
GtkActionGroup * | action_group, | ||
const gchar * | filename | ||
) |
Load a new set of actions into an existing UI.
See gnc-plugin.h for documentation on the function arguments.
Load a new set of actions into an existing UI. The actions from the provided group will be merged into the pre-existing ui, as directed by the specified file.
ui_merge | A pointer to the UI manager data structure for a window. |
action_group | The set of actions provided by a given plugin. |
filename | The name of the ui description file. This file name will be searched for in the ui directory. |
Definition at line 346 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. 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.
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.
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 157 of file gnc-plugin.c.
const gchar * gnc_plugin_get_name | ( | GncPlugin * | plugin | ) |
Retrieve the textual name of a plugin.
Retrieve the textual name of a plugin.
plugin | The plugin whose name should be returned. |
Definition at line 246 of file gnc-plugin.c.
GType gnc_plugin_get_type | ( | void | ) |
Get the type of a gnc window plugin.
Get the type of a menu-only plugin.
Definition at line 71 of file gnc-plugin.c.
void gnc_plugin_init_short_names | ( | GtkActionGroup * | action_group, |
action_toolbar_labels * | 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.
Add "short" labels to existing actions. 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 action_toolbar_labels items. |
Definition at line 263 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 209 of file gnc-plugin.c.
void gnc_plugin_set_important_actions | ( | GtkActionGroup * | action_group, |
const gchar ** | name | ||
) |
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.
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.
action_group | The group of all actions associated with a plugin or plugin page. All actions to me modified must be in this group. |
name | A list of actions names to be marked important. This list must be NULL terminated. |
Definition at line 289 of file gnc-plugin.c.
void gnc_plugin_update_actions | ( | GtkActionGroup * | action_group, |
const gchar ** | action_names, | ||
const gchar * | property_name, | ||
gboolean | value | ||
) |
Update a property on a set of existing GtkActions. This function can be easily used to make a list of actions visible, invisible, sensitive, or insensitive.
action_group | The group of all actions associated with a plugin or plugin page. All actions to be modified must be contained in this group. |
action_names | A NULL terminated list of actions names that should modified. |
property_name | The property name to be changed on the specified actions. The only two GtkAction properties that it makes sense to modify are "visible" and "sensitive". |
value | A boolean specifying the new state for the specified property. |
Definition at line 313 of file gnc-plugin.c.