30 #include <glib/gi18n.h> 32 #include "gnc-icons.h" 38 static QofLogModule log_module = GNC_MOD_GUI;
40 static gchar *icon_files[] =
44 GNC_ICON_ACCOUNT_REPORT,
45 GNC_ICON_DELETE_ACCOUNT,
46 GNC_ICON_EDIT_ACCOUNT,
48 GNC_ICON_OPEN_ACCOUNT,
55 GNC_ICON_INVOICE_POST,
56 GNC_ICON_INVOICE_UNPOST,
58 GNC_ICON_INVOICE_EDIT,
59 GNC_ICON_INVOICE_DUPLICATE,
65 gnc_load_app_icons (
void)
67 GtkIconTheme *icon_theme = gtk_icon_theme_get_default ();
69 gchar* pkgdatadir = gnc_path_get_pkgdatadir ();
70 gchar* datadir = gnc_path_get_datadir ();
74 default_path = g_build_filename (pkgdatadir,
"icons", NULL);
75 gtk_icon_theme_append_search_path (icon_theme, default_path);
76 g_free (default_path);
77 default_path = g_build_filename (datadir,
"icons", NULL);
78 gtk_icon_theme_append_search_path (icon_theme, default_path);
79 g_free (default_path);
83 gtk_icon_theme_get_search_path (icon_theme,
86 PINFO (
"The icon theme search path has %i elements.", n_elements);
89 for (i = 0; i < n_elements; i++)
90 PINFO (
"Path %i: %s", i, path[i]);
95 for (i = 0; icon_files[i]; i++)
97 gchar *file = icon_files[i];
99 if (!gtk_icon_theme_has_icon (icon_theme, file))
100 PWARN (
"No icon named '%s' found. Some gui elements may be missing their icons", file);
#define PINFO(format, args...)
Print an informational note.
#define PWARN(format, args...)
Log a warning.
Gnome specific utility functions.
All type declarations for the whole Gnucash engine.
File path resolution utility functions.