From 3fd4017b3e2461638683b3753b96c7484e7d4ed2 Mon Sep 17 00:00:00 2001 From: Jim Evins Date: Sat, 4 Sep 2010 12:12:58 -0400 Subject: [PATCH] Theme friendly app icons. --- configure.ac | 13 ++++++++++--- data/Makefile.am | 2 +- data/icons/16x16/Makefile.am | 11 +++++++++++ data/icons/16x16/apps/glabels-3.0.png | Bin 0 -> 483 bytes data/icons/22x22/Makefile.am | 11 +++++++++++ data/icons/22x22/apps/glabels-3.0.png | Bin 0 -> 762 bytes data/icons/24x24/Makefile.am | 11 +++++++++++ data/icons/24x24/apps/glabels-3.0.png | Bin 0 -> 762 bytes data/icons/32x32/Makefile.am | 11 +++++++++++ data/icons/32x32/apps/glabels-3.0.png | Bin 0 -> 1192 bytes data/icons/48x48/Makefile.am | 11 +++++++++++ data/icons/48x48/apps/glabels-3.0.png | Bin 0 -> 1748 bytes data/icons/Makefile.am | 15 +++++++++++++++ data/pixmaps/Makefile.am | 4 ---- data/pixmaps/glabels-3.0.png | Bin 2074 -> 0 bytes src/Makefile.am | 5 ++--- src/glabels-batch.c | 2 +- src/glabels.c | 15 ++------------- src/template-designer.c | 2 +- 19 files changed, 87 insertions(+), 26 deletions(-) create mode 100644 data/icons/16x16/Makefile.am create mode 100644 data/icons/16x16/apps/glabels-3.0.png create mode 100644 data/icons/22x22/Makefile.am create mode 100644 data/icons/22x22/apps/glabels-3.0.png create mode 100644 data/icons/24x24/Makefile.am create mode 100644 data/icons/24x24/apps/glabels-3.0.png create mode 100644 data/icons/32x32/Makefile.am create mode 100644 data/icons/32x32/apps/glabels-3.0.png create mode 100644 data/icons/48x48/Makefile.am create mode 100644 data/icons/48x48/apps/glabels-3.0.png create mode 100644 data/icons/Makefile.am delete mode 100644 data/pixmaps/glabels-3.0.png diff --git a/configure.ac b/configure.ac index d3ee342c..a889716e 100644 --- a/configure.ac +++ b/configure.ac @@ -31,6 +31,7 @@ AC_PATH_PROG(GLIB_GENMARSHAL, glib-genmarshal) AC_PATH_PROG(GDK_PIXBUF_CSOURCE, gdk-pixbuf-csource) AC_PATH_PROG(UPDATE_MIME_DATABASE, update-mime-database) AC_PATH_PROG(UPDATE_DESKTOP_DATABASE, update-desktop-database) +AC_PATH_PROG(GTK_UPDATE_ICON_CACHE, gtk-update-icon-cache) dnl --------------------------------------------------------------------------- dnl - GLABELS branch @@ -275,11 +276,17 @@ src/Makefile src/pixmaps/Makefile src/stock-pixmaps/Makefile data/Makefile -data/pixmaps/Makefile -data/mime/Makefile -data/ui/Makefile data/desktop/Makefile +data/icons/Makefile +data/icons/16x16/Makefile +data/icons/22x22/Makefile +data/icons/24x24/Makefile +data/icons/32x32/Makefile +data/icons/48x48/Makefile data/man/Makefile +data/mime/Makefile +data/pixmaps/Makefile +data/ui/Makefile templates/Makefile po/Makefile.in help/Makefile diff --git a/data/Makefile.am b/data/Makefile.am index 1a11481f..ed0a3699 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -1,5 +1,5 @@ ## Process this file with automake to produce Makefile.in -SUBDIRS = desktop man mime pixmaps ui +SUBDIRS = desktop icons man mime pixmaps ui diff --git a/data/icons/16x16/Makefile.am b/data/icons/16x16/Makefile.am new file mode 100644 index 00000000..de73342e --- /dev/null +++ b/data/icons/16x16/Makefile.am @@ -0,0 +1,11 @@ + +size = 16x16 +appiconsdir = $(datadir)/icons/hicolor/$(size)/apps + +appicons_DATA = \ + apps/glabels-3.0.png + +noinst_DATA = + +EXTRA_DIST = $(appicons_DATA) \ + $(noinst_DATA) diff --git a/data/icons/16x16/apps/glabels-3.0.png b/data/icons/16x16/apps/glabels-3.0.png new file mode 100644 index 0000000000000000000000000000000000000000..4e244e33140d8444864e3edc71485fc3814b8fe1 GIT binary patch literal 483 zcmV<90UZ8`P)Px#24YJ`L;wH)0002_L%V+f000SaNLh0L01FWS01FWTe`H^g00007bV*G`2ige) z4J8Ww{mNwk00Co3L_t(I%k7e}iW*TAhQDF1Sm@o+9R*QeAWPU-q)25U?8DgD_y~D{ zJd=bJ8L*qi8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w^&v|23= z4-Ylhb%%fw&`cZzL4dC7NtK3Spp-&HFin#!I7ZiXl!8tt#57HO-zN-1c6N5y z-Q8t=ejeZ{aFPI`C}MSWm140#CX-=rZ;wrzgYJmCMA$1fJ(5)s{+wSk@!* z`8?l~T8&`|hT7B7#zia=HAogCGd*O!Q;2`(PrH s0RHq}bYE1uTcmaE|MUm?Uw^y40aKgJg3$4SaR2}S07*qoM6N<$g5BFqO#lD@ literal 0 HcmV?d00001 diff --git a/data/icons/32x32/Makefile.am b/data/icons/32x32/Makefile.am new file mode 100644 index 00000000..c792c3da --- /dev/null +++ b/data/icons/32x32/Makefile.am @@ -0,0 +1,11 @@ + +size = 32x32 +appiconsdir = $(datadir)/icons/hicolor/$(size)/apps + +appicons_DATA = \ + apps/glabels-3.0.png + +noinst_DATA = + +EXTRA_DIST = $(appicons_DATA) \ + $(noinst_DATA) diff --git a/data/icons/32x32/apps/glabels-3.0.png b/data/icons/32x32/apps/glabels-3.0.png new file mode 100644 index 0000000000000000000000000000000000000000..79c36f0f1a0dcd6750a678e532ef128462bc38c0 GIT binary patch literal 1192 zcmV;Z1XufsP)Px#24YJ`L;&OfC^Ef;QF$b}n1KqX?r0hCxY1&1H8v14bwJG${k#UWp5 zH2Zen?ECI}-#0t3hdu1!1A)AU@iTDbUlaH*(QG#5(xpo>Iy$-l9RAk?j4=|&v9#N5 zX}8-FMUg~NBw-jz7>1&?mLLcu2mR&V^Wm&2dPvlxUS3DvtM!l{(Z{j=S)veQ!bau<#IfI`jnZOPsrtR zXsz))kL%a3Q!15s@!|!wT8;Jfbv8CORJ~ruvaD}`Z?;PzZxK*RkxmZ~h9TK(hSAXj zRI62#QUDAO=U87a69fUNREi)7P)f0~vclThZ#a(2sZ*zDwOYJ-^@=lR&XCP!(OUEP z@ncG*5|v7Y#l^)RfuDd#?I;0SYm`#Nag0(55y7@?M1&}cP)cFjHgOySV2nX)jpI07 zI}Ae-i3G+Nf*>G{V~jDhS}pG0z00jzx43%sDu4roZ)G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0)c>`oXBJ{$EoIQJ%xw$zU4o6X?Ha9m@Lrw&N4;g!^0?wLMRl%WcuGwx7&@XsNmo}F zE|-gefdQUAeZu_w96|^bMZx3o5Rb=6BoaJ%@`P+Qi^XEWv!;dDCL zPfk=li6DPVOU0m5V%|} zmX~9^crl09+lJTcWoc=N7cb^mTU*CwvobsToM5mMfTg7q|+&y znwp9PWLYMc%VD?MnVFd>R+{zobru#D7#J8RioDY3D~f{EYBeNK^(0?Kp;RW zmBQ(CB7`6q3HD!z3;UtZLDzb|N3tS4iZ_hn-U2 z?CdN*{O|+pm&BzBSedw$eLe^Hf>q9E^o(I-RS8s1dXQ&=gZN5c-;}m1D`QmxwI(S2 z-{%Hj09vhIwFs0|p;xb7vAw-rbFUhaH1ZvkM74g^B2Y%)^y$-voxWu&C13^mfTLdt zOTG4ik4hBE%czM8q4bTK4x~R`%Rez~ZEaEdcj;ACRXRI6dH?=>L*?;vB>U3R5+frc zhHM&sFZ89s8zp(E)%-qS1nO%Ms*Av3f&W~D_9gJC6C5U?YG(MAvf9lWo%ArGQE62l zXbuDDrxL13U_Tj=PN&f{t@x_rOUj7C+loK!Pdfzr57B1+V~(*AzW@LL07*qoM6N<$ Ef;)rG6951J diff --git a/src/Makefile.am b/src/Makefile.am index ea2bd76d..53084844 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -12,10 +12,9 @@ INCLUDES = \ $(LIBQRENCODE_CFLAGS) \ $(LIBIEC16022_CFLAGS) \ $(DISABLE_DEPRECATED_CFLAGS) \ - -DGLABELS_LOCALEDIR=\""$(datadir)/locale"\" \ - -DGLABELS_ICON_DIR=\""$(datadir)/pixmaps"\" \ - -DGLABELS_ICON=\""$(GLABELS_BRANCH).png"\" \ + -DGLABELS_LOCALE_DIR=\""$(datadir)/locale"\" \ -DGLABELS_DATA_DIR=\""$(datadir)/$(GLABELS_BRANCH)"\" \ + -DGLABELS_ICON_NAME=\""$(GLABELS_BRANCH)\"" \ -DG_LOG_DOMAIN=\""glabels\"" glabels_3_LDFLAGS = -export-dynamic diff --git a/src/glabels-batch.c b/src/glabels-batch.c index 1ab8ec72..4dd16e06 100644 --- a/src/glabels-batch.c +++ b/src/glabels-batch.c @@ -90,7 +90,7 @@ main (int argc, char **argv) gchar *utf8_filename; GError *error = NULL; - bindtextdomain (GETTEXT_PACKAGE, GLABELS_LOCALEDIR); + bindtextdomain (GETTEXT_PACKAGE, GLABELS_LOCALE_DIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); diff --git a/src/glabels.c b/src/glabels.c index ce95ba54..e43f9768 100644 --- a/src/glabels.c +++ b/src/glabels.c @@ -66,13 +66,12 @@ main (int argc, char **argv) }; GOptionContext *option_context; - gchar *icon_file; GList *file_list = NULL, *p; GtkWidget *win; gchar *utf8_filename; GError *error = NULL; - bindtextdomain (GETTEXT_PACKAGE, GLABELS_LOCALEDIR); + bindtextdomain (GETTEXT_PACKAGE, GLABELS_LOCALE_DIR); bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8"); textdomain (GETTEXT_PACKAGE); @@ -98,17 +97,7 @@ main (int argc, char **argv) gl_warning_handler_init(); /* Set default icon */ - icon_file = g_build_filename (GLABELS_ICON_DIR, GLABELS_ICON, NULL); - if (!g_file_test (icon_file, G_FILE_TEST_EXISTS)) - { - g_message ("Could not find %s", icon_file); - } - else - { - gtk_window_set_default_icon_from_file (icon_file, NULL); - } - g_free (icon_file); - + gtk_window_set_default_icon_name (GLABELS_ICON_NAME); /* Initialize subsystems */ gl_debug_init (); diff --git a/src/template-designer.c b/src/template-designer.c index 4a8473e7..9cddc7b5 100644 --- a/src/template-designer.c +++ b/src/template-designer.c @@ -403,7 +403,7 @@ gl_template_designer_construct (glTemplateDesigner *dialog) gtk_window_set_title (GTK_WINDOW(dialog), _("New gLabels Template")); - logo_filename = g_build_filename (GLABELS_ICON_DIR, GLABELS_ICON, NULL); + logo_filename = g_build_filename (GLABELS_DATA_DIR, "pixmaps", "new-select.png", NULL); logo = gdk_pixbuf_new_from_file (logo_filename, NULL); g_free (logo_filename); -- 2.39.5