]> git.sur5r.net Git - glabels/commitdiff
Theme friendly app icons.
authorJim Evins <evins@snaught.com>
Sat, 4 Sep 2010 16:12:58 +0000 (12:12 -0400)
committerJim Evins <evins@snaught.com>
Sat, 4 Sep 2010 16:12:58 +0000 (12:12 -0400)
19 files changed:
configure.ac
data/Makefile.am
data/icons/16x16/Makefile.am [new file with mode: 0644]
data/icons/16x16/apps/glabels-3.0.png [new file with mode: 0644]
data/icons/22x22/Makefile.am [new file with mode: 0644]
data/icons/22x22/apps/glabels-3.0.png [new file with mode: 0644]
data/icons/24x24/Makefile.am [new file with mode: 0644]
data/icons/24x24/apps/glabels-3.0.png [new file with mode: 0644]
data/icons/32x32/Makefile.am [new file with mode: 0644]
data/icons/32x32/apps/glabels-3.0.png [new file with mode: 0644]
data/icons/48x48/Makefile.am [new file with mode: 0644]
data/icons/48x48/apps/glabels-3.0.png [new file with mode: 0644]
data/icons/Makefile.am [new file with mode: 0644]
data/pixmaps/Makefile.am
data/pixmaps/glabels-3.0.png [deleted file]
src/Makefile.am
src/glabels-batch.c
src/glabels.c
src/template-designer.c

index d3ee342c4baba167ddd1a1130375cea10999cbbd..a889716e24d5655c3633d8a859ad2380bacdaf60 100644 (file)
@@ -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
index 1a11481f1180fcee3c05742916305f3dd916f00f..ed0a36999d053e67f8146c7cb052ec7c227c15a4 100644 (file)
@@ -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 (file)
index 0000000..de73342
--- /dev/null
@@ -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 (file)
index 0000000..4e244e3
Binary files /dev/null and b/data/icons/16x16/apps/glabels-3.0.png differ
diff --git a/data/icons/22x22/Makefile.am b/data/icons/22x22/Makefile.am
new file mode 100644 (file)
index 0000000..955d860
--- /dev/null
@@ -0,0 +1,11 @@
+
+size = 22x22
+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/22x22/apps/glabels-3.0.png b/data/icons/22x22/apps/glabels-3.0.png
new file mode 100644 (file)
index 0000000..ea1ee02
Binary files /dev/null and b/data/icons/22x22/apps/glabels-3.0.png differ
diff --git a/data/icons/24x24/Makefile.am b/data/icons/24x24/Makefile.am
new file mode 100644 (file)
index 0000000..baf6b8e
--- /dev/null
@@ -0,0 +1,11 @@
+
+size = 24x24
+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/24x24/apps/glabels-3.0.png b/data/icons/24x24/apps/glabels-3.0.png
new file mode 100644 (file)
index 0000000..8e876e2
Binary files /dev/null and b/data/icons/24x24/apps/glabels-3.0.png differ
diff --git a/data/icons/32x32/Makefile.am b/data/icons/32x32/Makefile.am
new file mode 100644 (file)
index 0000000..c792c3d
--- /dev/null
@@ -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 (file)
index 0000000..79c36f0
Binary files /dev/null and b/data/icons/32x32/apps/glabels-3.0.png differ
diff --git a/data/icons/48x48/Makefile.am b/data/icons/48x48/Makefile.am
new file mode 100644 (file)
index 0000000..64a76f9
--- /dev/null
@@ -0,0 +1,11 @@
+
+size = 48x48
+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/48x48/apps/glabels-3.0.png b/data/icons/48x48/apps/glabels-3.0.png
new file mode 100644 (file)
index 0000000..e54900a
Binary files /dev/null and b/data/icons/48x48/apps/glabels-3.0.png differ
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
new file mode 100644 (file)
index 0000000..7a9e4f2
--- /dev/null
@@ -0,0 +1,15 @@
+
+SUBDIRS = 16x16 22x22 24x24 32x32 48x48
+
+gtk_update_icon_cache = $(GTK_UPDATE_ICON_CACHE) -f -t $(datadir)/icons/hicolor
+
+install-data-hook: update-icon-cache
+uninstall-hook: update-icon-cache
+update-icon-cache:
+       @-if test -z "$(DESTDIR)"; then \
+               echo "Updating Gtk icon cache."; \
+               $(gtk_update_icon_cache); \
+       else \
+               echo "*** Icon cache not updated.  After (un)install, run this:"; \
+               echo "***   $(gtk_update_icon_cache)"; \
+       fi
index f08962d847840ecbf942c6b0b24cda187426bb12..f531e899c3f706bdbbd0500014126ac8660c2aed 100644 (file)
@@ -15,14 +15,10 @@ glabels_pixmaps_DATA = \
 
 glabels_app_icondir = $(datadir)/pixmaps
 
-glabels_app_icon_DATA = \
-       $(GLABELS_BRANCH).png
-
 glabels_mime_icondir = $(datadir)/icons/hicolor/48x48/mimetypes
 
 glabels_mime_icon_DATA = \
        application-x-glabels.png
 
 EXTRA_DIST = $(glabels_pixmaps_DATA)   \
-            $(glabels_app_icon_DATA)  \
             $(glabels_mime_icon_DATA)
diff --git a/data/pixmaps/glabels-3.0.png b/data/pixmaps/glabels-3.0.png
deleted file mode 100644 (file)
index afb7ecf..0000000
Binary files a/data/pixmaps/glabels-3.0.png and /dev/null differ
index ea2bd76de1f8ac9f2dc13d256cf97c6030c5af67..53084844159a97e3c6282aad438d6d1afcdf1d26 100644 (file)
@@ -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
index 1ab8ec721ca26fe23c83d515a2947182bf1a354f..4dd16e06c58ecede21fb3ac370cbc04ed1d267a1 100644 (file)
@@ -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);
 
index ce95ba54a0c7f7472384bdd113c54c854a9af861..e43f97689c30def2093850fc66999808671b7d1e 100644 (file)
@@ -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 ();
index 4a8473e770b3eaf85bef4b8cef832125a34036b2..9cddc7b59eabc9fec28d58096ea95d2702d58070 100644 (file)
@@ -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);