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
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
## Process this file with automake to produce Makefile.in
-SUBDIRS = desktop man mime pixmaps ui
+SUBDIRS = desktop icons man mime pixmaps ui
--- /dev/null
+
+size = 16x16
+appiconsdir = $(datadir)/icons/hicolor/$(size)/apps
+
+appicons_DATA = \
+ apps/glabels-3.0.png
+
+noinst_DATA =
+
+EXTRA_DIST = $(appicons_DATA) \
+ $(noinst_DATA)
--- /dev/null
+
+size = 22x22
+appiconsdir = $(datadir)/icons/hicolor/$(size)/apps
+
+appicons_DATA = \
+ apps/glabels-3.0.png
+
+noinst_DATA =
+
+EXTRA_DIST = $(appicons_DATA) \
+ $(noinst_DATA)
--- /dev/null
+
+size = 24x24
+appiconsdir = $(datadir)/icons/hicolor/$(size)/apps
+
+appicons_DATA = \
+ apps/glabels-3.0.png
+
+noinst_DATA =
+
+EXTRA_DIST = $(appicons_DATA) \
+ $(noinst_DATA)
--- /dev/null
+
+size = 32x32
+appiconsdir = $(datadir)/icons/hicolor/$(size)/apps
+
+appicons_DATA = \
+ apps/glabels-3.0.png
+
+noinst_DATA =
+
+EXTRA_DIST = $(appicons_DATA) \
+ $(noinst_DATA)
--- /dev/null
+
+size = 48x48
+appiconsdir = $(datadir)/icons/hicolor/$(size)/apps
+
+appicons_DATA = \
+ apps/glabels-3.0.png
+
+noinst_DATA =
+
+EXTRA_DIST = $(appicons_DATA) \
+ $(noinst_DATA)
--- /dev/null
+
+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
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)
$(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
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);
};
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);
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 ();
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);