Rearrange the pixmap folder to contain a hicolor directory structure
Add a hicolor directory structure and move the existing icons to this folder structure and update the gnc-icons.c file to reflect the changes
@ -32,34 +32,34 @@
|
|||||||
#include "gnc-icons.h"
|
#include "gnc-icons.h"
|
||||||
#include "gnc-filepath-utils.h"
|
#include "gnc-filepath-utils.h"
|
||||||
#include "gnc-gnome-utils.h"
|
#include "gnc-gnome-utils.h"
|
||||||
|
#include "gnc-path.h"
|
||||||
|
|
||||||
typedef struct _item_file
|
typedef struct _item_file
|
||||||
{
|
{
|
||||||
const gchar *icon_name;
|
const gchar *icon_name;
|
||||||
const gchar *filename_lg;
|
const gchar *filename;
|
||||||
const gchar *filename_sm;
|
|
||||||
} item_file;
|
} item_file;
|
||||||
|
|
||||||
static item_file item_files[] =
|
static item_file item_files[] =
|
||||||
{
|
{
|
||||||
{ GNC_ICON_ACCOUNT, "gnc-account.png", "gnc-account-16.png"},
|
{ GNC_ICON_ACCOUNT, "gnc-account.png"},
|
||||||
{ GNC_ICON_ACCOUNT_REPORT, "gnc-account-report.png", "gnc-account-report-16.png"},
|
{ GNC_ICON_ACCOUNT_REPORT, "gnc-account-report.png"},
|
||||||
{ GNC_ICON_DELETE_ACCOUNT, "gnc-account-delete.png", "gnc-account-delete-16.png"},
|
{ GNC_ICON_DELETE_ACCOUNT, "gnc-account-delete.png"},
|
||||||
{ GNC_ICON_EDIT_ACCOUNT, "gnc-account-edit.png", "gnc-account-edit-16.png"},
|
{ GNC_ICON_EDIT_ACCOUNT, "gnc-account-edit.png"},
|
||||||
{ GNC_ICON_NEW_ACCOUNT, "gnc-account-new.png", "gnc-account-new-16.png"},
|
{ GNC_ICON_NEW_ACCOUNT, "gnc-account-new.png"},
|
||||||
{ GNC_ICON_OPEN_ACCOUNT, "gnc-account-open.png", "gnc-account-open-16.png"},
|
{ GNC_ICON_OPEN_ACCOUNT, "gnc-account-open.png"},
|
||||||
{ GNC_ICON_TRANSFER, "gnc-transfer.png", "gnc-transfer-16.png"},
|
{ GNC_ICON_TRANSFER, "gnc-transfer.png"},
|
||||||
{ GNC_ICON_SCHEDULE, "gnc-sx-new.png", "gnc-sx-new-16.png"},
|
{ GNC_ICON_SCHEDULE, "gnc-sx-new.png"},
|
||||||
{ GNC_ICON_SPLIT_TRANS, "gnc-split-trans.png", "gnc-split-trans-16.png"},
|
{ GNC_ICON_SPLIT_TRANS, "gnc-split-trans.png"},
|
||||||
{ GNC_ICON_JUMP_TO, "gnc-jumpto.png", "gnc-jumpto-16.png"},
|
{ GNC_ICON_JUMP_TO, "gnc-jumpto.png"},
|
||||||
{ GNC_ICON_INVOICE, "gnc-invoice.png", "gnc-invoice-16.png"},
|
{ GNC_ICON_INVOICE, "gnc-invoice.png"},
|
||||||
{ GNC_ICON_INVOICE_PAY, "gnc-invoice-pay.png", "gnc-invoice-pay-16.png"},
|
{ GNC_ICON_INVOICE_PAY, "gnc-invoice-pay.png"},
|
||||||
{ GNC_ICON_INVOICE_POST, "gnc-invoice-post.png", "gnc-invoice-post-16.png"},
|
{ GNC_ICON_INVOICE_POST, "gnc-invoice-post.png"},
|
||||||
{ GNC_ICON_INVOICE_UNPOST, "gnc-invoice-unpost.png", "gnc-invoice-unpost-16.png"},
|
{ GNC_ICON_INVOICE_UNPOST, "gnc-invoice-unpost.png"},
|
||||||
{ GNC_ICON_INVOICE_NEW, "gnc-invoice-new.png", "gnc-invoice-new-16.png"},
|
{ GNC_ICON_INVOICE_NEW, "gnc-invoice-new.png"},
|
||||||
{ GNC_ICON_INVOICE_EDIT, "gnc-invoice-edit.png", "gnc-invoice-edit-16.png"},
|
{ GNC_ICON_INVOICE_EDIT, "gnc-invoice-edit.png"},
|
||||||
{ GNC_ICON_INVOICE_DUPLICATE, "gnc-invoice-duplicate.png", "gnc-invoice-duplicate-16.png"},
|
{ GNC_ICON_INVOICE_DUPLICATE, "gnc-invoice-duplicate.png"},
|
||||||
{ GNC_ICON_PDF_EXPORT, "gnc-gnome-pdf-24.png", "gnc-gnome-pdf-16.png"},
|
{ GNC_ICON_PDF_EXPORT, "gnc-gnome-pdf.png"},
|
||||||
{ 0 },
|
{ 0 },
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -67,14 +67,18 @@ void
|
|||||||
gnc_load_app_icons (void)
|
gnc_load_app_icons (void)
|
||||||
{
|
{
|
||||||
item_file *file;
|
item_file *file;
|
||||||
|
const gchar *default_path;
|
||||||
|
gchar* pkgdatadir = gnc_path_get_pkgdatadir ();
|
||||||
|
default_path = g_build_filename (pkgdatadir, "icons", NULL);
|
||||||
|
g_free(pkgdatadir);
|
||||||
|
|
||||||
for (file = item_files; file->icon_name; file++)
|
for (file = item_files; file->icon_name; file++)
|
||||||
{
|
{
|
||||||
GdkPixbuf *pixbuf_sm, *pixbuf_lg;
|
GdkPixbuf *pixbuf_sm, *pixbuf_lg;
|
||||||
char *fullname_sm = NULL, *fullname_lg = NULL;
|
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);
|
||||||
|
|
||||||
fullname_sm = gnc_filepath_locate_pixmap (file->filename_sm);
|
|
||||||
fullname_lg = gnc_filepath_locate_pixmap (file->filename_lg);
|
|
||||||
g_assert (fullname_sm && fullname_lg);
|
g_assert (fullname_sm && fullname_lg);
|
||||||
|
|
||||||
pixbuf_sm = gnc_gnome_get_gdkpixbuf (fullname_sm);
|
pixbuf_sm = gnc_gnome_get_gdkpixbuf (fullname_sm);
|
||||||
@ -86,5 +90,8 @@ gnc_load_app_icons (void)
|
|||||||
|
|
||||||
g_object_unref(pixbuf_sm);
|
g_object_unref(pixbuf_sm);
|
||||||
g_object_unref(pixbuf_lg);
|
g_object_unref(pixbuf_lg);
|
||||||
|
|
||||||
|
g_free (fullname_sm);
|
||||||
|
g_free (fullname_lg);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,6 +2,10 @@
|
|||||||
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION share/gnucash
|
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} DESTINATION share/gnucash
|
||||||
PATTERN Makefile.* EXCLUDE
|
PATTERN Makefile.* EXCLUDE
|
||||||
PATTERN CMakeLists.txt EXCLUDE
|
PATTERN CMakeLists.txt EXCLUDE
|
||||||
|
PATTERN hicolor EXCLUDE
|
||||||
|
)
|
||||||
|
|
||||||
|
INSTALL(DIRECTORY ${DATADIR_BUILD}/gnucash/icons DESTINATION share/gnucash
|
||||||
)
|
)
|
||||||
|
|
||||||
IF (GNC_BUILD_AS_INSTALL)
|
IF (GNC_BUILD_AS_INSTALL)
|
||||||
@ -9,6 +13,13 @@ IF (GNC_BUILD_AS_INSTALL)
|
|||||||
DESTINATION ${DATADIR_BUILD}/gnucash/pixmaps
|
DESTINATION ${DATADIR_BUILD}/gnucash/pixmaps
|
||||||
PATTERN Makefile.* EXCLUDE
|
PATTERN Makefile.* EXCLUDE
|
||||||
PATTERN CMakeLists.txt EXCLUDE
|
PATTERN CMakeLists.txt EXCLUDE
|
||||||
|
PATTERN hicolor EXCLUDE
|
||||||
|
)
|
||||||
|
ENDIF()
|
||||||
|
|
||||||
|
IF (GNC_BUILD_AS_INSTALL)
|
||||||
|
FILE(COPY hicolor
|
||||||
|
DESTINATION ${DATADIR_BUILD}/gnucash/icons
|
||||||
)
|
)
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
|
||||||
@ -116,4 +127,4 @@ IF (GNC_BUILD_AS_INSTALL)
|
|||||||
${DATADIR_BUILD}/gnucash/pixmaps/gnucash-icon-32x32.png
|
${DATADIR_BUILD}/gnucash/pixmaps/gnucash-icon-32x32.png
|
||||||
)
|
)
|
||||||
|
|
||||||
ENDIF()
|
ENDIF()
|
||||||
|
Before Width: | Height: | Size: 540 B After Width: | Height: | Size: 540 B |
Before Width: | Height: | Size: 416 B After Width: | Height: | Size: 416 B |
Before Width: | Height: | Size: 460 B After Width: | Height: | Size: 460 B |
Before Width: | Height: | Size: 540 B After Width: | Height: | Size: 540 B |
Before Width: | Height: | Size: 417 B After Width: | Height: | Size: 417 B |
Before Width: | Height: | Size: 334 B After Width: | Height: | Size: 334 B |
Before Width: | Height: | Size: 549 B After Width: | Height: | Size: 549 B |
Before Width: | Height: | Size: 824 B After Width: | Height: | Size: 824 B |
Before Width: | Height: | Size: 711 B After Width: | Height: | Size: 711 B |
Before Width: | Height: | Size: 542 B After Width: | Height: | Size: 542 B |
Before Width: | Height: | Size: 767 B After Width: | Height: | Size: 767 B |
Before Width: | Height: | Size: 658 B After Width: | Height: | Size: 658 B |
Before Width: | Height: | Size: 682 B After Width: | Height: | Size: 682 B |
Before Width: | Height: | Size: 546 B After Width: | Height: | Size: 546 B |
Before Width: | Height: | Size: 723 B After Width: | Height: | Size: 723 B |
Before Width: | Height: | Size: 616 B After Width: | Height: | Size: 616 B |
Before Width: | Height: | Size: 714 B After Width: | Height: | Size: 714 B |
Before Width: | Height: | Size: 789 B After Width: | Height: | Size: 789 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1016 B After Width: | Height: | Size: 1016 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 359 B After Width: | Height: | Size: 359 B |
Before Width: | Height: | Size: 1019 B After Width: | Height: | Size: 1019 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 952 B After Width: | Height: | Size: 952 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 980 B After Width: | Height: | Size: 980 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 1.0 KiB |
Before Width: | Height: | Size: 1013 B After Width: | Height: | Size: 1013 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |
Before Width: | Height: | Size: 906 B After Width: | Height: | Size: 906 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 1.3 KiB |