From ff93071608b34aef547aa1da93992bdb43db4333 Mon Sep 17 00:00:00 2001 From: Geert Janssens Date: Sun, 9 Jul 2017 21:48:36 +0200 Subject: [PATCH] Rework our icon management They are now all stored in a directory structure similar to the final installation target, so no more copying of images during build is needed. Both Makefile.am and CMakelists.txt behave the same now. Some additional cleanups: - move stock_move related images to art; they aren't used so don't need to be installed - clean up icon loading There is one harmless warning still at run time about not all requested image sizes being found. This is odd because they are all installed. I suspect gtk no longer searches for these resolutions. Perhaps we just shouldn't run the check on them. The application works fine even without the images in the requested resolution. --- {src/pixmaps => art}/stock_split_title.png | Bin .../pixmaps => art}/stock_split_watermark.png | Bin .../{16x16/gnucash.svg => gnucash-16x16.svg} | 0 .../{22x22/gnucash.svg => gnucash-22x22.svg} | 0 .../{32x32/gnucash.svg => gnucash-32x32.svg} | 0 .../gnucash.svg => gnucash-48x48+.svg} | 0 art/tango/scalable/gnucash.png | Bin 3619 -> 0 bytes src/cmake_modules/MakeDist.cmake | 2 +- src/cmake_modules/MakeDistFiles.cmake | 14 +- src/core-utils/gnc-path.c | 10 + src/core-utils/gnc-path.h | 6 + src/gnc/gnucash.qrc | 34 +- src/gnome-utils/gnc-gnome-utils.c | 39 +- src/gnome-utils/gnc-icons.c | 91 +- src/gnome-utils/gnc-icons.h | 1 + src/gnome-utils/gnc-main-window.c | 10 +- src/pixmaps/CMakeLists.txt | 249 +--- src/pixmaps/Makefile.am | 134 +-- .../128x128/apps/gnucash-icon.png} | Bin .../hicolor/16x16/apps/gnucash-icon.png | Bin .../hicolor/22x22/apps/gnucash-icon.png | Bin .../hicolor/24x24/apps/gnucash-icon.png | Bin .../256x256/apps/gnucash-icon.png} | Bin .../hicolor/32x32/apps/gnucash-icon.png | Bin .../48x48/apps/gnucash-icon.png} | Bin .../64x64/apps/gnucash-icon.png} | Bin .../96x96/apps/gnucash-icon.png} | Bin .../hicolor/scalable/apps/gnucash-icon.svg | 1057 +++++++++++++++++ 28 files changed, 1254 insertions(+), 393 deletions(-) rename {src/pixmaps => art}/stock_split_title.png (100%) rename {src/pixmaps => art}/stock_split_watermark.png (100%) rename art/tango/{16x16/gnucash.svg => gnucash-16x16.svg} (100%) rename art/tango/{22x22/gnucash.svg => gnucash-22x22.svg} (100%) rename art/tango/{32x32/gnucash.svg => gnucash-32x32.svg} (100%) rename art/tango/{scalable/gnucash.svg => gnucash-48x48+.svg} (100%) delete mode 100644 art/tango/scalable/gnucash.png rename src/pixmaps/{gnucash-icon-128x128.png => hicolor/128x128/apps/gnucash-icon.png} (100%) rename art/tango/16x16/gnucash.png => src/pixmaps/hicolor/16x16/apps/gnucash-icon.png (100%) rename art/tango/22x22/gnucash-22x22.png => src/pixmaps/hicolor/22x22/apps/gnucash-icon.png (100%) rename art/tango/22x22/gnucash-24x24.png => src/pixmaps/hicolor/24x24/apps/gnucash-icon.png (100%) rename src/pixmaps/{gnucash-icon-256x256.png => hicolor/256x256/apps/gnucash-icon.png} (100%) rename art/tango/32x32/gnucash.png => src/pixmaps/hicolor/32x32/apps/gnucash-icon.png (100%) rename src/pixmaps/{gnucash-icon-48x48.png => hicolor/48x48/apps/gnucash-icon.png} (100%) rename src/pixmaps/{gnucash-icon-64x64.png => hicolor/64x64/apps/gnucash-icon.png} (100%) rename src/pixmaps/{gnucash-icon-96x96.png => hicolor/96x96/apps/gnucash-icon.png} (100%) create mode 100644 src/pixmaps/hicolor/scalable/apps/gnucash-icon.svg diff --git a/src/pixmaps/stock_split_title.png b/art/stock_split_title.png similarity index 100% rename from src/pixmaps/stock_split_title.png rename to art/stock_split_title.png diff --git a/src/pixmaps/stock_split_watermark.png b/art/stock_split_watermark.png similarity index 100% rename from src/pixmaps/stock_split_watermark.png rename to art/stock_split_watermark.png diff --git a/art/tango/16x16/gnucash.svg b/art/tango/gnucash-16x16.svg similarity index 100% rename from art/tango/16x16/gnucash.svg rename to art/tango/gnucash-16x16.svg diff --git a/art/tango/22x22/gnucash.svg b/art/tango/gnucash-22x22.svg similarity index 100% rename from art/tango/22x22/gnucash.svg rename to art/tango/gnucash-22x22.svg diff --git a/art/tango/32x32/gnucash.svg b/art/tango/gnucash-32x32.svg similarity index 100% rename from art/tango/32x32/gnucash.svg rename to art/tango/gnucash-32x32.svg diff --git a/art/tango/scalable/gnucash.svg b/art/tango/gnucash-48x48+.svg similarity index 100% rename from art/tango/scalable/gnucash.svg rename to art/tango/gnucash-48x48+.svg diff --git a/art/tango/scalable/gnucash.png b/art/tango/scalable/gnucash.png deleted file mode 100644 index 9e9f409424945d1651dcbc307dbaf43905fec414..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3619 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 diff --git a/src/cmake_modules/MakeDist.cmake b/src/cmake_modules/MakeDist.cmake index e1f45a5cec..b31f946c8e 100644 --- a/src/cmake_modules/MakeDist.cmake +++ b/src/cmake_modules/MakeDist.cmake @@ -1,4 +1,4 @@ -# This file implements the process of making source distributio tarballs. It expects to find list in +# This file implements the process of making source distribution tarballs. It expects to find list in # 'dist_manifest.txt' of all of the files to be included in the distribution, EXCEPT those # files that are generated. The list of generated files is specified in MakeDistFiles.cmake in the # COPY_FROM_BUILD and COPY_FROM_BUILD_2 variables. diff --git a/src/cmake_modules/MakeDistFiles.cmake b/src/cmake_modules/MakeDistFiles.cmake index c0fcb6a93a..3e91e291b1 100644 --- a/src/cmake_modules/MakeDistFiles.cmake +++ b/src/cmake_modules/MakeDistFiles.cmake @@ -106,19 +106,7 @@ SET(COPY_FROM_BUILD_2 po/gnucash.pot src/doc/design/stamp-vti src/doc/design/version.texi - src/pixmaps/128x128/gnucash-icon.png - src/pixmaps/16x16/gnucash-icon.png - src/pixmaps/22x22/gnucash-icon.png - src/pixmaps/24x24/gnucash-icon.png - src/pixmaps/256x256/gnucash-icon.png - src/pixmaps/32x32/gnucash-icon.png - src/pixmaps/48x48/gnucash-icon.png - src/pixmaps/64x64/gnucash-icon.png - src/pixmaps/96x96/gnucash-icon.png - src/pixmaps/gnucash-icon-16x16.png - src/pixmaps/gnucash-icon-32x32.png - src/pixmaps/scalable/gnucash-icon.svg src/optional/python-bindings/gnucash_core_c.py src/test-core/unittest_support.py - ) \ No newline at end of file + ) diff --git a/src/core-utils/gnc-path.c b/src/core-utils/gnc-path.c index 9b06259c1a..b9aa1623d8 100644 --- a/src/core-utils/gnc-path.c +++ b/src/core-utils/gnc-path.c @@ -51,6 +51,16 @@ gchar *gnc_path_get_libdir() return gnc_gbr_find_lib_dir (LIBDIR); } +/** Returns the libdir path, usually + * "$prefix/lib". + * + * @returns A newly allocated string. */ +gchar *gnc_path_get_datadir() +{ + //printf("Returning libdir %s\n", gnc_gbr_find_lib_dir (LIBDIR)); + return gnc_gbr_find_data_dir (DATADIR); +} + /** Returns the datadir path, usually * "$prefix/share/gnucash". Needed for gnc_gnome_locate_*(). * diff --git a/src/core-utils/gnc-path.h b/src/core-utils/gnc-path.h index 12cdf51257..d9d8f768a6 100644 --- a/src/core-utils/gnc-path.h +++ b/src/core-utils/gnc-path.h @@ -43,6 +43,12 @@ gchar *gnc_path_get_bindir(void); * @returns A newly allocated string. */ gchar *gnc_path_get_libdir(void); +/** Returns the datadir path, usually + * "$prefix/share". + * + * @returns A newly allocated string. */ +gchar *gnc_path_get_datadir(void); + /** Returns the pkgdatadir path, usually * "$prefix/share/gnucash". Needed for gnc_gnome_locate_*(). * diff --git a/src/gnc/gnucash.qrc b/src/gnc/gnucash.qrc index 8a6ebb1c43..ac7b9c1504 100644 --- a/src/gnc/gnucash.qrc +++ b/src/gnc/gnucash.qrc @@ -1,21 +1,21 @@ - - ../pixmaps/gnc-account-delete.png - ../pixmaps/gnc-account-edit.png - ../pixmaps/gnc-account-new.png - ../pixmaps/gnc-account-open.png - ../pixmaps/gnc-account.png - ../pixmaps/gnc-invoice-edit.png - ../pixmaps/gnc-invoice.png - ../pixmaps/gnc-invoice-post.png - ../pixmaps/gnc-invoice-unpost.png - ../pixmaps/gnc-jumpto.png - ../pixmaps/gnc-split-trans.png - ../pixmaps/gnc-sx-new.png - ../pixmaps/gnc-transfer.png - ../pixmaps/gnucash-icon-48x48.png - ../pixmaps/gnucash-icon-64x64.png - ../pixmaps/gnucash_splash.png + + ../pixmaps/hicolor/24x24/actions/gnc-account-delete.png + ../pixmaps/hicolor/24x24/actions/gnc-account-edit.png + ../pixmaps/hicolor/24x24/actions/gnc-account-new.png + ../pixmaps/hicolor/24x24/actions/gnc-account-open.png + ../pixmaps/hicolor/24x24/actions/gnc-account.png + ../pixmaps/hicolor/24x24/actions/gnc-invoice-edit.png + ../pixmaps/hicolor/24x24/actions/gnc-invoice.png + ../pixmaps/hicolor/24x24/actions/gnc-invoice-post.png + ../pixmaps/hicolor/24x24/actions/gnc-invoice-unpost.png + ../pixmaps/hicolor/24x24/actions/gnc-jumpto.png + ../pixmaps/hicolor/24x24/actions/gnc-split-trans.png + ../pixmaps/hicolor/24x24/actions/gnc-sx-new.png + ../pixmaps/hicolor/24x24/actions/gnc-transfer.png + ../pixmaps/hicolor/24x24/actions/gnucash-icon.png + ../pixmaps/hicolor/24x24/actions/gnucash-icon.png + ../pixmaps/gnucash_splash.png diff --git a/src/gnome-utils/gnc-gnome-utils.c b/src/gnome-utils/gnc-gnome-utils.c index 3e31f1165e..c85d44908a 100644 --- a/src/gnome-utils/gnc-gnome-utils.c +++ b/src/gnome-utils/gnc-gnome-utils.c @@ -648,13 +648,9 @@ gnc_gui_init(void) gchar *data_dir; #endif int idx; - char *icon_filenames[] = {"gnucash-icon-16x16.png", - "gnucash-icon-32x32.png", - "gnucash-icon-48x48.png", - NULL - }; + int icon_sizes[] = { 16, 32, 48, 0 }; GList *icons = NULL; - char *fullname; + GtkIconTheme *icon_theme = gtk_icon_theme_get_default (); ENTER (""); @@ -662,26 +658,18 @@ gnc_gui_init(void) return main_window; /* use custom icon */ - for (idx = 0; icon_filenames[idx] != NULL; idx++) + gnc_load_app_icons(); + for (idx = 0; icon_sizes[idx] != 0; idx++) { - GdkPixbuf *buf = NULL; - - fullname = gnc_filepath_locate_pixmap(icon_filenames[idx]); - if (fullname == NULL) - { - g_warning("couldn't find icon file [%s]", icon_filenames[idx]); - continue; - } - - buf = gnc_gnome_get_gdkpixbuf(fullname); - if (buf == NULL) - { - g_warning("error loading image from [%s]", fullname); - g_free(fullname); - continue; - } - g_free(fullname); - icons = g_list_append(icons, buf); + GdkPixbuf *pixbuf = gtk_icon_theme_load_icon (icon_theme, + GNC_ICON_APP, + icon_sizes[idx], + GTK_ICON_LOOKUP_USE_BUILTIN, + NULL); + if (!pixbuf) + g_warning("error loading application icon of size [%i]", icon_sizes[idx]); + else + icons = g_list_append(icons, pixbuf); } gtk_window_set_default_icon_list(icons); @@ -747,7 +735,6 @@ gnc_gui_init(void) /* Load css configuration file */ gnc_add_css_file (); - gnc_load_app_icons(); gnc_totd_dialog(GTK_WINDOW(main_window), TRUE); LEAVE (""); diff --git a/src/gnome-utils/gnc-icons.c b/src/gnome-utils/gnc-icons.c index f7c222d7d7..4810611260 100644 --- a/src/gnome-utils/gnc-icons.c +++ b/src/gnome-utils/gnc-icons.c @@ -34,83 +34,72 @@ #include "gnc-gnome-utils.h" #include "gnc-path.h" -typedef struct _item_file +typedef enum { + APP_ICON, + ACTION_ICON +} IconFileType; + +typedef struct _icon_file { const gchar *icon_name; const gchar *filename; -} item_file; + const IconFileType icon_type; +} icon_file; -static item_file item_files[] = +static icon_file icon_files[] = { - { GNC_ICON_ACCOUNT, "gnc-account.png"}, - { GNC_ICON_ACCOUNT_REPORT, "gnc-account-report.png"}, - { GNC_ICON_DELETE_ACCOUNT, "gnc-account-delete.png"}, - { GNC_ICON_EDIT_ACCOUNT, "gnc-account-edit.png"}, - { GNC_ICON_NEW_ACCOUNT, "gnc-account-new.png"}, - { GNC_ICON_OPEN_ACCOUNT, "gnc-account-open.png"}, - { GNC_ICON_TRANSFER, "gnc-transfer.png"}, - { GNC_ICON_SCHEDULE, "gnc-sx-new.png"}, - { GNC_ICON_SPLIT_TRANS, "gnc-split-trans.png"}, - { GNC_ICON_JUMP_TO, "gnc-jumpto.png"}, - { GNC_ICON_INVOICE, "gnc-invoice.png"}, - { GNC_ICON_INVOICE_PAY, "gnc-invoice-pay.png"}, - { GNC_ICON_INVOICE_POST, "gnc-invoice-post.png"}, - { GNC_ICON_INVOICE_UNPOST, "gnc-invoice-unpost.png"}, - { GNC_ICON_INVOICE_NEW, "gnc-invoice-new.png"}, - { GNC_ICON_INVOICE_EDIT, "gnc-invoice-edit.png"}, - { GNC_ICON_INVOICE_DUPLICATE, "gnc-invoice-duplicate.png"}, - { GNC_ICON_PDF_EXPORT, "gnc-gnome-pdf.png"}, + { GNC_ICON_APP, "gnucash-icon.png", APP_ICON}, + { GNC_ICON_ACCOUNT, "gnc-account.png", ACTION_ICON}, + { GNC_ICON_ACCOUNT_REPORT, "gnc-account-report.png", ACTION_ICON}, + { GNC_ICON_DELETE_ACCOUNT, "gnc-account-delete.png", ACTION_ICON}, + { GNC_ICON_EDIT_ACCOUNT, "gnc-account-edit.png", ACTION_ICON}, + { GNC_ICON_NEW_ACCOUNT, "gnc-account-new.png", ACTION_ICON}, + { GNC_ICON_OPEN_ACCOUNT, "gnc-account-open.png", ACTION_ICON}, + { GNC_ICON_TRANSFER, "gnc-transfer.png", ACTION_ICON}, + { GNC_ICON_SCHEDULE, "gnc-sx-new.png", ACTION_ICON}, + { GNC_ICON_SPLIT_TRANS, "gnc-split-trans.png", ACTION_ICON}, + { GNC_ICON_JUMP_TO, "gnc-jumpto.png", ACTION_ICON}, + { GNC_ICON_INVOICE, "gnc-invoice.png", ACTION_ICON}, + { GNC_ICON_INVOICE_PAY, "gnc-invoice-pay.png", ACTION_ICON}, + { GNC_ICON_INVOICE_POST, "gnc-invoice-post.png", ACTION_ICON}, + { GNC_ICON_INVOICE_UNPOST, "gnc-invoice-unpost.png", ACTION_ICON}, + { GNC_ICON_INVOICE_NEW, "gnc-invoice-new.png", ACTION_ICON}, + { GNC_ICON_INVOICE_EDIT, "gnc-invoice-edit.png", ACTION_ICON}, + { GNC_ICON_INVOICE_DUPLICATE, "gnc-invoice-duplicate.png", ACTION_ICON}, + { GNC_ICON_PDF_EXPORT, "gnc-gnome-pdf.png", ACTION_ICON}, + { GNC_ICON_PDF_EXPORT, "gnc-gnome-pdf.png", ACTION_ICON}, { 0 }, }; void gnc_load_app_icons (void) { -#if GTK_CHECK_VERSION(3,14,0) GtkIconTheme *icon_theme = gtk_icon_theme_get_default (); -#endif - item_file *file; + icon_file *file; const gchar *default_path; gchar* pkgdatadir = gnc_path_get_pkgdatadir (); + gchar* datadir = gnc_path_get_datadir (); + default_path = g_build_filename (pkgdatadir, "icons", NULL); g_free (pkgdatadir); - -#if GTK_CHECK_VERSION(3,14,0) gtk_icon_theme_append_search_path (icon_theme, default_path); -#endif + default_path = g_build_filename (datadir, "icons", NULL); + g_free (datadir); + gtk_icon_theme_append_search_path (icon_theme, default_path); - for (file = item_files; file->icon_name; file++) + for (file = icon_files; file->icon_name; file++) { -#if GTK_CHECK_VERSION(3,14,0) gint *icon_sizes = gtk_icon_theme_get_icon_sizes (icon_theme, file->icon_name); - if ((icon_sizes[0] != 16) && (icon_sizes[1] != 24)) + if ((file->icon_type == ACTION_ICON) && + (icon_sizes[0] != 16) && (icon_sizes[1] != 24)) + g_warning ("Required icon size for icon name '%s' not found", file->icon_name); + else if ((icon_sizes[0] != 16) && (icon_sizes[3] != 32) && (icon_sizes[4] != 48)) g_warning ("Required icon size for icon name '%s' not found", file->icon_name); g_free (icon_sizes); // check to see if we have at least one size for the named icons loaded g_assert (gtk_icon_theme_has_icon (icon_theme, file->icon_name)); -#else - GdkPixbuf *pixbuf_sm, *pixbuf_lg; - char *fullname_sm, *fullname_lg; - fullname_sm = g_strconcat (default_path, "/hicolor/16x16/actions/", file->filename, NULL); - fullname_lg = g_strconcat (default_path, "/hicolor/24x24/actions/", file->filename, NULL); - - g_assert (fullname_sm && fullname_lg); - - pixbuf_sm = gnc_gnome_get_gdkpixbuf (fullname_sm); - pixbuf_lg = gnc_gnome_get_gdkpixbuf (fullname_lg); - g_assert (pixbuf_sm && pixbuf_lg); - - gtk_icon_theme_add_builtin_icon (file->icon_name, 16, pixbuf_sm); - gtk_icon_theme_add_builtin_icon (file->icon_name, 24, pixbuf_lg); - - g_object_unref(pixbuf_sm); - g_object_unref(pixbuf_lg); - - g_free (fullname_sm); - g_free (fullname_lg); -#endif } } diff --git a/src/gnome-utils/gnc-icons.h b/src/gnome-utils/gnc-icons.h index 369654ce71..72d76451c0 100644 --- a/src/gnome-utils/gnc-icons.h +++ b/src/gnome-utils/gnc-icons.h @@ -55,6 +55,7 @@ G_BEGIN_DECLS //#define GNC_ICON_CLOSE_BUDGET "gnc-close-account" //#define GNC_ICON_EDIT_BUDGET "gnc-edit-account" #define GNC_ICON_DELETE_BUDGET "gnc-account-delete" +#define GNC_ICON_APP "gnucash-icon" void gnc_load_app_icons (void); diff --git a/src/gnome-utils/gnc-main-window.c b/src/gnome-utils/gnc-main-window.c index 19b90a93c5..6021477545 100644 --- a/src/gnome-utils/gnc-main-window.c +++ b/src/gnome-utils/gnc-main-window.c @@ -35,6 +35,7 @@ #include "config.h" #include +#include #include #include @@ -57,6 +58,7 @@ #include "gnc-gobject-utils.h" #include "gnc-gui-query.h" #include "gnc-hooks.h" +#include "gnc-icons.h" #include "gnc-session.h" #include "gnc-state.h" #include "gnc-ui.h" @@ -4455,7 +4457,13 @@ gnc_main_window_cmd_help_about (GtkAction *action, GncMainWindow *window) gchar **documenters = get_file_strsplit("DOCUMENTERS"); gchar *license = get_file("LICENSE"); gchar *message; - GdkPixbuf *logo = gnc_gnome_get_gdkpixbuf ("gnucash-icon-48x48.png"); + GtkIconTheme *icon_theme = gtk_icon_theme_get_default (); + GdkPixbuf *logo = gtk_icon_theme_load_icon (icon_theme, + GNC_ICON_APP, + 48, + GTK_ICON_LOOKUP_USE_BUILTIN, + NULL); + #ifdef GNUCASH_SCM /* Development version */ diff --git a/src/pixmaps/CMakeLists.txt b/src/pixmaps/CMakeLists.txt index 61c69cc1ba..9a4949d60d 100644 --- a/src/pixmaps/CMakeLists.txt +++ b/src/pixmaps/CMakeLists.txt @@ -4,203 +4,74 @@ INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION share/gnucash PATTERN CMakeLists.txt EXCLUDE PATTERN hicolor EXCLUDE ) - -INSTALL(DIRECTORY ${DATADIR_BUILD}/gnucash/icons DESTINATION share/gnucash - PATTERN Makefile.* EXCLUDE - PATTERN CMakeLists.txt EXCLUDE -) - -FILE(COPY . - DESTINATION ${DATADIR_BUILD}/gnucash/pixmaps - PATTERN Makefile.* EXCLUDE - PATTERN CMakeLists.txt EXCLUDE - PATTERN hicolor EXCLUDE -) - -FILE(COPY hicolor - DESTINATION ${DATADIR_BUILD}/gnucash/icons -) - -FOREACH(dir 256x256 128x128 96x96 64x64 48x48) - INSTALL( - FILES ${CMAKE_CURRENT_SOURCE_DIR}/gnucash-icon-${dir}.png - RENAME gnucash-icon.png - DESTINATION share/icons/hicolor/${dir}/apps) - - FILE(COPY ${CMAKE_CURRENT_SOURCE_DIR}/gnucash-icon-${dir}.png - DESTINATION ${DATADIR_BUILD}/icons/hicolor/${dir}/apps/gnucash-icon-${dir}.png) - - IF (BUILDING_FROM_VCS) - FILE(MAKE_DIRECTORY ${dir}) - FILE(COPY gnucash-icon-${dir}.png DESTINATION ${dir}) - FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/${dir}/gnucash-icon-${dir}.png - ${CMAKE_CURRENT_BINARY_DIR}/${dir}/gnucash-icon.png) - ENDIF() -ENDFOREACH(dir) - -IF (BUILDING_FROM_VCS) - FILE(MAKE_DIRECTORY 16x16 22x22 24x24 32x32 scalable) - - # 16x16 - FILE(COPY ${CMAKE_SOURCE_DIR}/art/tango/16x16/gnucash.png DESTINATION 16x16) - FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/16x16/gnucash.png - ${CMAKE_CURRENT_BINARY_DIR}/16x16/gnucash-icon.png) - - FILE(COPY ${CMAKE_SOURCE_DIR}/art/tango/16x16/gnucash.png DESTINATION .) - FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/gnucash.png - ${CMAKE_CURRENT_BINARY_DIR}/gnucash-icon-16x16.png) - - - # 22x22 - FILE(COPY ${CMAKE_SOURCE_DIR}/art/tango/22x22/gnucash-22x22.png DESTINATION 22x22) - FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/22x22/gnucash-22x22.png - ${CMAKE_CURRENT_BINARY_DIR}/22x22/gnucash-icon.png) - - # 24x24 - FILE(COPY ${CMAKE_SOURCE_DIR}/art/tango/22x22/gnucash-24x24.png DESTINATION 24x24) - FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/24x24/gnucash-24x24.png - ${CMAKE_CURRENT_BINARY_DIR}/24x24/gnucash-icon.png) - - # 32x32 - FILE(COPY ${CMAKE_SOURCE_DIR}/art/tango/32x32/gnucash.png DESTINATION 32x32) - FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/32x32/gnucash.png - ${CMAKE_CURRENT_BINARY_DIR}/32x32/gnucash-icon.png) - - FILE(COPY ${CMAKE_SOURCE_DIR}/art/tango/32x32/gnucash.png DESTINATION .) - FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/gnucash.png - ${CMAKE_CURRENT_BINARY_DIR}/gnucash-icon-32x32.png) - - - # scalable - FILE(COPY ${CMAKE_SOURCE_DIR}/art/tango/scalable/gnucash.svg DESTINATION scalable) - FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/scalable/gnucash.svg - ${CMAKE_CURRENT_BINARY_DIR}/scalable/gnucash-icon.svg) - -ELSE() - FILE(MAKE_DIRECTORY 16x16 22x22 24x24 32x32 scalable) - - FILE(COPY 16x16/gnucash-icon.png DESTINATION 16x16) - - FILE(COPY 22x22/gnucash-icon.png DESTINATION 22x22) - FILE(COPY 24x24/gnucash-icon.png DESTINATION 24x24) - FILE(COPY 32x32/gnucash-icon.png DESTINATION 32x32) - FILE(COPY 32x32/gnucash-icon.png DESTINATION .) - FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/gnucash-icon.png ${CMAKE_CURRENT_BINARY_DIR}/gnucash-icon-32x32.png) - FILE(COPY 16x16/gnucash-icon.png DESTINATION .) - FILE(RENAME ${CMAKE_CURRENT_BINARY_DIR}/gnucash-icon.png ${CMAKE_CURRENT_BINARY_DIR}/gnucash-icon-16x16.png) - FILE(COPY scalable/gnucash-icon.svg DESTINATION scalable) -ENDIF() - - -#------- - -FILE(COPY ${CMAKE_CURRENT_BINARY_DIR}/32x32/gnucash-icon.png - DESTINATION ${DATADIR_BUILD}/icons/hicolor/32x32/apps) - -FILE(COPY ${CMAKE_CURRENT_BINARY_DIR}/22x22/gnucash-icon.png - DESTINATION ${DATADIR_BUILD}/icons/hicolor/22x22/apps) - -FILE(COPY ${CMAKE_CURRENT_BINARY_DIR}/24x24/gnucash-icon.png - DESTINATION ${DATADIR_BUILD}/icons/hicolor/24x24/apps) - -FILE(COPY ${CMAKE_CURRENT_BINARY_DIR}/16x16/gnucash-icon.png - DESTINATION ${DATADIR_BUILD}/icons/hicolor/16x16/apps) - -FILE(COPY ${CMAKE_CURRENT_BINARY_DIR}/scalable/gnucash-icon.svg - DESTINATION ${DATADIR_BUILD}/icons/hicolor/scalable/apps) - -FILE(COPY ${CMAKE_CURRENT_BINARY_DIR}/16x16/gnucash-icon.png - DESTINATION ${DATADIR_BUILD}/gnucash/pixmaps) - -FILE(RENAME ${DATADIR_BUILD}/gnucash/pixmaps/gnucash-icon.png - ${DATADIR_BUILD}/gnucash/pixmaps/gnucash-icon-16x16.png) - -FILE(COPY ${CMAKE_CURRENT_BINARY_DIR}/32x32/gnucash-icon.png - DESTINATION ${DATADIR_BUILD}/gnucash/pixmaps) - -FILE(RENAME ${DATADIR_BUILD}/gnucash/pixmaps/gnucash-icon.png -${DATADIR_BUILD}/gnucash/pixmaps/gnucash-icon-32x32.png) - - -#------------------------ INSTALL( - FILES ${CMAKE_CURRENT_BINARY_DIR}/32x32/gnucash-icon.png - DESTINATION share/icons/hicolor/32x32/apps + DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/hicolor DESTINATION share/gnucash/icons + REGEX ".*/actions.*" EXCLUDE ) INSTALL( - FILES ${CMAKE_CURRENT_BINARY_DIR}/22x22/gnucash-icon.png - DESTINATION share/icons/hicolor/22x22/apps -) -INSTALL( - FILES ${CMAKE_CURRENT_BINARY_DIR}/24x24/gnucash-icon.png - DESTINATION share/icons/hicolor/24x24/apps + DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/hicolor DESTINATION share/icons + REGEX ".*/apps.*" EXCLUDE ) -INSTALL( - FILES ${CMAKE_CURRENT_BINARY_DIR}/16x16/gnucash-icon.png - DESTINATION share/icons/hicolor/16x16/apps -) -INSTALL( - FILES ${CMAKE_CURRENT_BINARY_DIR}/scalable/gnucash-icon.svg - DESTINATION share/icons/hicolor/scalable/apps -) -INSTALL( - FILES ${CMAKE_CURRENT_BINARY_DIR}/gnucash-icon-16x16.png - DESTINATION share/gnucash/pixmaps + +SET(gncpixmap_DATA + hicolor/16x16/actions/gnc-account.png + hicolor/24x24/actions/gnc-account.png + hicolor/16x16/actions/gnc-account-delete.png + hicolor/24x24/actions/gnc-account-delete.png + hicolor/16x16/actions/gnc-account-edit.png + hicolor/24x24/actions/gnc-account-edit.png + hicolor/16x16/actions/gnc-account-new.png + hicolor/24x24/actions/gnc-account-new.png + hicolor/16x16/actions/gnc-account-open.png + hicolor/24x24/actions/gnc-account-open.png + hicolor/16x16/actions/gnc-account-report.png + hicolor/24x24/actions/gnc-account-report.png + hicolor/16x16/actions/gnc-gnome-pdf.png + hicolor/24x24/actions/gnc-gnome-pdf.png + hicolor/16x16/actions/gnc-invoice.png + hicolor/24x24/actions/gnc-invoice.png + hicolor/16x16/actions/gnc-invoice-duplicate.png + hicolor/24x24/actions/gnc-invoice-duplicate.png + hicolor/16x16/actions/gnc-invoice-edit.png + hicolor/24x24/actions/gnc-invoice-edit.png + hicolor/16x16/actions/gnc-invoice-new.png + hicolor/24x24/actions/gnc-invoice-new.png + hicolor/16x16/actions/gnc-invoice-pay.png + hicolor/24x24/actions/gnc-invoice-pay.png + hicolor/16x16/actions/gnc-invoice-post.png + hicolor/24x24/actions/gnc-invoice-post.png + hicolor/16x16/actions/gnc-invoice-unpost.png + hicolor/24x24/actions/gnc-invoice-unpost.png + hicolor/16x16/actions/gnc-jumpto.png + hicolor/24x24/actions/gnc-jumpto.png + hicolor/16x16/actions/gnc-split-trans.png + hicolor/24x24/actions/gnc-split-trans.png + hicolor/16x16/actions/gnc-sx-new.png + hicolor/24x24/actions/gnc-sx-new.png + hicolor/16x16/actions/gnc-transfer.png + hicolor/24x24/actions/gnc-transfer.png + gnucash-icon.ico + gnucash-icon-48x48.bmp + gnucash_splash.png ) -INSTALL( - FILES ${CMAKE_CURRENT_BINARY_DIR}/gnucash-icon-32x32.png - DESTINATION share/gnucash/pixmaps + +SET(gncicon_DATA + hicolor/16x16/apps/gnucash-icon.png + hicolor/22x22/apps/gnucash-icon.png + hicolor/24x24/apps/gnucash-icon.png + hicolor/32x32/apps/gnucash-icon.png + hicolor/48x48/apps/gnucash-icon.png + hicolor/64x64/apps/gnucash-icon.png + hicolor/96x96/apps/gnucash-icon.png + hicolor/128x128/apps/gnucash-icon.png + hicolor/256x256/apps/gnucash-icon.png ) -SET(gncpixmap_DATA - gnc-account-16.png - gnc-account-delete-16.png - gnc-account-delete.png - gnc-account-edit-16.png - gnc-account-edit.png - gnc-account-new-16.png - gnc-account-new.png - gnc-account-open-16.png - gnc-account-open.png - gnc-account.png - gnc-account-report-16.png - gnc-account-report.png - gnc-gnome-pdf-16.png - gnc-gnome-pdf-24.png - gnc-invoice-16.png - gnc-invoice-duplicate-16.png - gnc-invoice-duplicate.png - gnc-invoice-edit-16.png - gnc-invoice-edit.png - gnc-invoice-new-16.png - gnc-invoice-new.png - gnc-invoice-pay-16.png - gnc-invoice-pay.png - gnc-invoice.png - gnc-invoice-post-16.png - gnc-invoice-post.png - gnc-invoice-unpost-16.png - gnc-invoice-unpost.png - gnc-jumpto-16.png - gnc-jumpto.png - gnc-split-trans-16.png - gnc-split-trans.png - gnc-sx-new-16.png - gnc-sx-new.png - gnc-transfer-16.png - gnc-transfer.png - gnucash-icon-128x128.png - gnucash-icon-256x256.png - gnucash-icon-48x48.png - gnucash-icon-48x48.bmp - gnucash-icon-64x64.png - gnucash-icon-96x96.png - gnucash-icon.ico - gnucash_splash.png - stock_split_title.png - stock_split_watermark.png +SET(gncscalableicon_DATA + hicolor/scalable/apps/gnucash-icon.svg ) -SET_LOCAL_DIST(pixmaps_DIST_local CMakeLists.txt Makefile.am ${gncpixmap_DATA}) +SET_LOCAL_DIST(pixmaps_DIST_local CMakeLists.txt Makefile.am ${gncpixmap_DATA} + ${gncicon_DATA} ${gncscalableicon_DATA}) SET(pixmaps_DIST ${pixmaps_DIST_local} PARENT_SCOPE) diff --git a/src/pixmaps/Makefile.am b/src/pixmaps/Makefile.am index 9cf4f0531b..27b4f1f1fb 100644 --- a/src/pixmaps/Makefile.am +++ b/src/pixmaps/Makefile.am @@ -1,132 +1,80 @@ gncpixmapdir = ${GNC_PIXMAP_DIR} - gncpixmap_DATA = \ + gnucash-icon.ico \ + gnucash-icon-48x48.bmp \ + gnucash_splash.png + +gncicon16dir = ${pkgdatadir}/icons/hicolor/16x16/actions +gncicon16_DATA = \ hicolor/16x16/actions/gnc-account.png \ - hicolor/24x24/actions/gnc-account.png \ hicolor/16x16/actions/gnc-account-delete.png \ - hicolor/24x24/actions/gnc-account-delete.png \ hicolor/16x16/actions/gnc-account-edit.png \ - hicolor/24x24/actions/gnc-account-edit.png \ hicolor/16x16/actions/gnc-account-new.png \ - hicolor/24x24/actions/gnc-account-new.png \ hicolor/16x16/actions/gnc-account-open.png \ - hicolor/24x24/actions/gnc-account-open.png \ hicolor/16x16/actions/gnc-account-report.png \ - hicolor/24x24/actions/gnc-account-report.png \ hicolor/16x16/actions/gnc-gnome-pdf.png \ - hicolor/24x24/actions/gnc-gnome-pdf.png \ hicolor/16x16/actions/gnc-invoice.png \ - hicolor/24x24/actions/gnc-invoice.png \ hicolor/16x16/actions/gnc-invoice-duplicate.png \ - hicolor/24x24/actions/gnc-invoice-duplicate.png \ hicolor/16x16/actions/gnc-invoice-edit.png \ - hicolor/24x24/actions/gnc-invoice-edit.png \ hicolor/16x16/actions/gnc-invoice-new.png \ - hicolor/24x24/actions/gnc-invoice-new.png \ hicolor/16x16/actions/gnc-invoice-pay.png \ - hicolor/24x24/actions/gnc-invoice-pay.png \ hicolor/16x16/actions/gnc-invoice-post.png \ - hicolor/24x24/actions/gnc-invoice-post.png \ hicolor/16x16/actions/gnc-invoice-unpost.png \ - hicolor/24x24/actions/gnc-invoice-unpost.png \ hicolor/16x16/actions/gnc-jumpto.png \ - hicolor/24x24/actions/gnc-jumpto.png \ hicolor/16x16/actions/gnc-split-trans.png \ - hicolor/24x24/actions/gnc-split-trans.png \ hicolor/16x16/actions/gnc-sx-new.png \ + hicolor/16x16/actions/gnc-transfer.png + +gncicon24dir = ${pkgdatadir}/icons/hicolor/24x24/actions +gncicon24_DATA = \ + hicolor/24x24/actions/gnc-account.png \ + hicolor/24x24/actions/gnc-account-delete.png \ + hicolor/24x24/actions/gnc-account-edit.png \ + hicolor/24x24/actions/gnc-account-new.png \ + hicolor/24x24/actions/gnc-account-open.png \ + hicolor/24x24/actions/gnc-account-report.png \ + hicolor/24x24/actions/gnc-gnome-pdf.png \ + hicolor/24x24/actions/gnc-invoice.png \ + hicolor/24x24/actions/gnc-invoice-duplicate.png \ + hicolor/24x24/actions/gnc-invoice-edit.png \ + hicolor/24x24/actions/gnc-invoice-new.png \ + hicolor/24x24/actions/gnc-invoice-pay.png \ + hicolor/24x24/actions/gnc-invoice-post.png \ + hicolor/24x24/actions/gnc-invoice-unpost.png \ + hicolor/24x24/actions/gnc-jumpto.png \ + hicolor/24x24/actions/gnc-split-trans.png \ hicolor/24x24/actions/gnc-sx-new.png \ - hicolor/16x16/actions/gnc-transfer.png \ - hicolor/24x24/actions/gnc-transfer.png \ - gnucash-icon.ico \ - gnucash-icon-16x16.png \ - gnucash-icon-32x32.png \ - gnucash-icon-48x48.bmp \ - gnucash-icon-48x48.png \ - gnucash-icon-64x64.png \ - gnucash-icon-96x96.png \ - gnucash-icon-128x128.png \ - gnucash-icon-256x256.png \ - gnucash_splash.png \ - stock_split_title.png \ - stock_split_watermark.png + hicolor/24x24/actions/gnc-transfer.png gnchuge256icondir = ${datadir}/icons/hicolor/256x256/apps -gnchuge256icon_DATA = 256x256/gnucash-icon.png +gnchuge256icon_DATA = hicolor/256x256/apps/gnucash-icon.png gnchuge128icondir = ${datadir}/icons/hicolor/128x128/apps -gnchuge128icon_DATA = 128x128/gnucash-icon.png +gnchuge128icon_DATA = hicolor/128x128/apps/gnucash-icon.png gnclarge96icondir = ${datadir}/icons/hicolor/96x96/apps -gnclarge96icon_DATA = 96x96/gnucash-icon.png +gnclarge96icon_DATA = hicolor/96x96/apps/gnucash-icon.png gnclarge64icondir = ${datadir}/icons/hicolor/64x64/apps -gnclarge64icon_DATA = 64x64/gnucash-icon.png +gnclarge64icon_DATA = hicolor/64x64/apps/gnucash-icon.png gnclarge48icondir = ${datadir}/icons/hicolor/48x48/apps -gnclarge48icon_DATA = 48x48/gnucash-icon.png +gnclarge48icon_DATA = hicolor/48x48/apps/gnucash-icon.png gncmediumicondir = ${datadir}/icons/hicolor/32x32/apps -gncmediumicon_DATA = 32x32/gnucash-icon.png +gncmediumicon_DATA = hicolor/32x32/apps/gnucash-icon.png gncsmalltwfouricondir = ${datadir}/icons/hicolor/24x24/apps -gncsmalltwfouricon_DATA = 24x24/gnucash-icon.png +gncsmalltwfouricon_DATA = hicolor/24x24/apps/gnucash-icon.png gncsmalltwtwoicondir = ${datadir}/icons/hicolor/22x22/apps -gncsmalltwtwoicon_DATA = 22x22/gnucash-icon.png +gncsmalltwtwoicon_DATA = hicolor/22x22/apps/gnucash-icon.png gncextrasmallicondir = ${datadir}/icons/hicolor/16x16/apps -gncextrasmallicon_DATA = 16x16/gnucash-icon.png +gncextrasmallicon_DATA = hicolor/16x16/apps/gnucash-icon.png gncscalableicondir = ${datadir}/icons/hicolor/scalable/apps -gncscalableicon_DATA = scalable/gnucash-icon.svg - -if BUILDING_FROM_VCS -256x256/gnucash-icon.png: gnucash-icon-256x256.png - -mkdir -p 256x256 - cp ${srcdir}/gnucash-icon-256x256.png 256x256/gnucash-icon.png - -128x128/gnucash-icon.png: gnucash-icon-128x128.png - -mkdir -p 128x128 - cp ${srcdir}/gnucash-icon-128x128.png 128x128/gnucash-icon.png - -96x96/gnucash-icon.png: gnucash-icon-96x96.png - -mkdir -p 96x96 - cp ${srcdir}/gnucash-icon-96x96.png 96x96/gnucash-icon.png - -64x64/gnucash-icon.png: gnucash-icon-64x64.png - -mkdir -p 64x64 - cp ${srcdir}/gnucash-icon-64x64.png 64x64/gnucash-icon.png - -48x48/gnucash-icon.png: gnucash-icon-48x48.png - -mkdir -p 48x48 - cp ${srcdir}/gnucash-icon-48x48.png 48x48/gnucash-icon.png - -32x32/gnucash-icon.png: ${top_srcdir}/art/tango/32x32/gnucash.png - -mkdir -p 32x32 - cp ${top_srcdir}/art/tango/32x32/gnucash.png 32x32/gnucash-icon.png - -24x24/gnucash-icon.png: ${top_srcdir}/art/tango/22x22/gnucash-24x24.png - -mkdir -p 24x24 - cp ${top_srcdir}/art/tango/22x22/gnucash-24x24.png 24x24/gnucash-icon.png - -22x22/gnucash-icon.png: ${top_srcdir}/art/tango/22x22/gnucash-22x22.png - -mkdir -p 22x22 - cp ${top_srcdir}/art/tango/22x22/gnucash-22x22.png 22x22/gnucash-icon.png - -16x16/gnucash-icon.png: ${top_srcdir}/art/tango/16x16/gnucash.png - -mkdir -p 16x16 - cp ${top_srcdir}/art/tango/16x16/gnucash.png 16x16/gnucash-icon.png - -scalable/gnucash-icon.svg: ${top_srcdir}/art/tango/scalable/gnucash.svg - -mkdir -p scalable - cp ${top_srcdir}/art/tango/scalable/gnucash.svg scalable/gnucash-icon.svg - -gnucash-icon-16x16.png: - cp ${top_srcdir}/art/tango/16x16/gnucash.png gnucash-icon-16x16.png - -gnucash-icon-32x32.png: - cp ${top_srcdir}/art/tango/32x32/gnucash.png gnucash-icon-32x32.png -endif +gncscalableicon_DATA = hicolor/scalable/apps/gnucash-icon.svg # As suggested by if !OS_WIN32 @@ -158,16 +106,12 @@ ico_files_lr = \ EXTRA_DIST = \ ${gncpixmap_DATA} \ + ${gncicon16_DATA} \ + ${gncicon24_DATA} \ ${ico_files_hr} \ ${ico_files_lr} \ ${gncscalableicon_DATA} -# Only clean up if we're building from svn/svk/git/bzr -if BUILDING_FROM_VCS -clean-local: - -rm -rf 256x256 128x128 96x96 64x64 48x48 32x32 24x24 22x22 16x16 scalable -endif - # Create gnucash-icon.ico .PHONY: ico ico: ${ico_files_hr} ${ico_files_lr} diff --git a/src/pixmaps/gnucash-icon-128x128.png b/src/pixmaps/hicolor/128x128/apps/gnucash-icon.png similarity index 100% rename from src/pixmaps/gnucash-icon-128x128.png rename to src/pixmaps/hicolor/128x128/apps/gnucash-icon.png diff --git a/art/tango/16x16/gnucash.png b/src/pixmaps/hicolor/16x16/apps/gnucash-icon.png similarity index 100% rename from art/tango/16x16/gnucash.png rename to src/pixmaps/hicolor/16x16/apps/gnucash-icon.png diff --git a/art/tango/22x22/gnucash-22x22.png b/src/pixmaps/hicolor/22x22/apps/gnucash-icon.png similarity index 100% rename from art/tango/22x22/gnucash-22x22.png rename to src/pixmaps/hicolor/22x22/apps/gnucash-icon.png diff --git a/art/tango/22x22/gnucash-24x24.png b/src/pixmaps/hicolor/24x24/apps/gnucash-icon.png similarity index 100% rename from art/tango/22x22/gnucash-24x24.png rename to src/pixmaps/hicolor/24x24/apps/gnucash-icon.png diff --git a/src/pixmaps/gnucash-icon-256x256.png b/src/pixmaps/hicolor/256x256/apps/gnucash-icon.png similarity index 100% rename from src/pixmaps/gnucash-icon-256x256.png rename to src/pixmaps/hicolor/256x256/apps/gnucash-icon.png diff --git a/art/tango/32x32/gnucash.png b/src/pixmaps/hicolor/32x32/apps/gnucash-icon.png similarity index 100% rename from art/tango/32x32/gnucash.png rename to src/pixmaps/hicolor/32x32/apps/gnucash-icon.png diff --git a/src/pixmaps/gnucash-icon-48x48.png b/src/pixmaps/hicolor/48x48/apps/gnucash-icon.png similarity index 100% rename from src/pixmaps/gnucash-icon-48x48.png rename to src/pixmaps/hicolor/48x48/apps/gnucash-icon.png diff --git a/src/pixmaps/gnucash-icon-64x64.png b/src/pixmaps/hicolor/64x64/apps/gnucash-icon.png similarity index 100% rename from src/pixmaps/gnucash-icon-64x64.png rename to src/pixmaps/hicolor/64x64/apps/gnucash-icon.png diff --git a/src/pixmaps/gnucash-icon-96x96.png b/src/pixmaps/hicolor/96x96/apps/gnucash-icon.png similarity index 100% rename from src/pixmaps/gnucash-icon-96x96.png rename to src/pixmaps/hicolor/96x96/apps/gnucash-icon.png diff --git a/src/pixmaps/hicolor/scalable/apps/gnucash-icon.svg b/src/pixmaps/hicolor/scalable/apps/gnucash-icon.svg new file mode 100644 index 0000000000..9d590cb2f4 --- /dev/null +++ b/src/pixmaps/hicolor/scalable/apps/gnucash-icon.svg @@ -0,0 +1,1057 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + Removable drive + + + Andreas Nilsson + + + + + http://www.gnome.org + + + Jakub Steiner + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +