[glabels] Theme friendly app icons.
- From: Jim Evins <jimevins src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glabels] Theme friendly app icons.
- Date: Sat, 4 Sep 2010 16:16:49 +0000 (UTC)
commit 3fd4017b3e2461638683b3753b96c7484e7d4ed2
Author: Jim Evins <evins snaught com>
Date: Sat Sep 4 12:12:58 2010 -0400
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(-)
---
diff --git a/configure.ac b/configure.ac
index d3ee342..a889716 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 1a11481..ed0a369 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 0000000..de73342
--- /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 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
index 0000000..955d860
--- /dev/null
+++ b/data/icons/22x22/Makefile.am
@@ -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
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
index 0000000..baf6b8e
--- /dev/null
+++ b/data/icons/24x24/Makefile.am
@@ -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
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
index 0000000..c792c3d
--- /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 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
index 0000000..64a76f9
--- /dev/null
+++ b/data/icons/48x48/Makefile.am
@@ -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
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
index 0000000..7a9e4f2
--- /dev/null
+++ b/data/icons/Makefile.am
@@ -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
diff --git a/data/pixmaps/Makefile.am b/data/pixmaps/Makefile.am
index f08962d..f531e89 100644
--- a/data/pixmaps/Makefile.am
+++ b/data/pixmaps/Makefile.am
@@ -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/src/Makefile.am b/src/Makefile.am
index ea2bd76..5308484 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 1ab8ec7..4dd16e0 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 ce95ba5..e43f976 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 4a8473e..9cddc7b 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]