35 #ifndef GNC_GTK_UTILS_H 36 #define GNC_GTK_UTILS_H 48 #define GNC_MENU_ATTRIBUTE_ACCELERATOR "accel" 49 #define GNC_MENU_ATTRIBUTE_TOOLTIP "tooltip" 50 #define GNC_MENU_ATTRIBUTE_TEMPORARY "temp" 53 void gnc_cbwe_add_completion (GtkComboBox *cbwe);
54 void gnc_cbwe_require_list_item (GtkComboBox *cbwe);
77 GtkWidget *statusbar);
80 GtkWidget *statusbar);
84 const gchar *search_action_name;
85 const gchar *search_action_label;
86 const gchar *search_action_target;
98 const gchar *target,
const gchar *label,
99 const gchar *accel_name,
const gchar *tooltip);
void gnc_cbwe_set_by_string(GtkComboBox *cbwe, const gchar *text)
Find an entry in the GtkComboBox by its text value, and set the widget to that value.
void gnc_menubar_model_remove_items_with_attrib(GMenuModel *menu_model, const gchar *attrib)
Remove GMenuModel entries based on having an attribute value equal to attrib, it does not matter what...
void gnc_tool_item_setup_tooltip_to_statusbar_callback(GtkWidget *tool_item, GtkWidget *statusbar)
Setup the callbacks for tool bar items so the tooltip can be displayed in the status bar...
gboolean gnc_menubar_model_find_item(GMenuModel *menu_model, GncMenuModelSearch *gsm)
Find a GtkMenu item from the action name.
gboolean gnc_is_dark_theme(GdkRGBA *fg_color)
Return whether the current gtk theme is a dark one.
void gnc_style_context_get_border_color(GtkStyleContext *context, GtkStateFlags state, GdkRGBA *color)
Wrapper to get the border color of a widget for a given state.
void gnc_style_context_get_background_color(GtkStyleContext *context, GtkStateFlags state, GdkRGBA *color)
Wrapper to get the background color of a widget for a given state.
GtkWidget * gnc_get_dialog_widget_from_id(GtkDialog *dialog, const gchar *id)
Find the Widget defined by 'id' in the dialog.
GList * gnc_menu_get_items(GtkWidget *menu)
Return a list of GtkMenuItems.
GtkWidget * gnc_menubar_model_find_menu_item(GMenuModel *menu_model, GtkWidget *menu, const gchar *action_name)
Find a GtkMenu item from the action name.
GtkWidget * gnc_find_toolbar_item(GtkWidget *toolbar, const gchar *action_name)
Search the toolbar for the tool item based on the action name.
GtkWidget * gnc_find_menu_item_by_action_name(GtkWidget *menu, const gchar *action_name)
Search the menu for the menu item based on action name.
void gnc_add_accelerator_keys_for_menu(GtkWidget *menu, GMenuModel *model, GtkAccelGroup *accel_group)
Add accelerator keys for menu item widgets.
GtkWidget * gnc_find_menu_item_by_action_label(GtkWidget *menu, const gchar *action_label)
Search the menu for the menu item based on the action label.
void gnc_disable_all_actions_in_group(GSimpleActionGroup *action_group)
Disable all the actions in a simple action group.
gboolean gnc_menubar_model_update_item(GMenuModel *menu_model, const gchar *action_name, const gchar *target, const gchar *label, const gchar *accel_name, const gchar *tooltip)
Update the GMenuModel item based on the action name by copying existing item, removing it and inserti...
void gnc_menu_item_setup_tooltip_to_statusbar_callback(GtkWidget *menu_item, GtkWidget *statusbar)
Setup the callbacks for menu bar items so the tooltip can be displayed in the status bar...