From b2d0d33f71a6586aecdcf2d5e2bd9df1d5c654cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ball=C3=B3=20Gy=C3=B6rgy?= Date: Wed, 29 Jul 2015 01:53:34 +0200 Subject: logviewer: Provide an application icon Based on this commit in gnome-system-log: https://git.gnome.org/browse/gnome-system-log/commit/?id=f3f63c20a0b9fd9e791dde542292f9931de6e86f --- configure.ac | 1 + logview/data/Makefile.am | 2 + logview/data/icons/Makefile.am | 58 +++++++++++++++++++++ .../icons/hicolor_apps_16x16_mate-system-log.png | Bin 0 -> 714 bytes .../icons/hicolor_apps_22x22_mate-system-log.png | Bin 0 -> 1337 bytes .../icons/hicolor_apps_256x256_mate-system-log.png | Bin 0 -> 59630 bytes .../icons/hicolor_apps_32x32_mate-system-log.png | Bin 0 -> 1944 bytes .../icons/hicolor_apps_48x48_mate-system-log.png | Bin 0 -> 3993 bytes ...olor_apps_scalable_mate-system-log-symbolic.svg | 23 ++++++++ logview/data/mate-system-log.desktop.in.in | 2 +- logview/logview-app.c | 2 +- logview/logview-window.c | 2 +- 12 files changed, 87 insertions(+), 3 deletions(-) create mode 100644 logview/data/icons/Makefile.am create mode 100644 logview/data/icons/hicolor_apps_16x16_mate-system-log.png create mode 100644 logview/data/icons/hicolor_apps_22x22_mate-system-log.png create mode 100644 logview/data/icons/hicolor_apps_256x256_mate-system-log.png create mode 100644 logview/data/icons/hicolor_apps_32x32_mate-system-log.png create mode 100644 logview/data/icons/hicolor_apps_48x48_mate-system-log.png create mode 100644 logview/data/icons/hicolor_apps_scalable_mate-system-log-symbolic.svg diff --git a/configure.ac b/configure.ac index 2eb24675..0d50cf2b 100644 --- a/configure.ac +++ b/configure.ac @@ -401,6 +401,7 @@ baobab/help/Makefile logview/Makefile logview/data/Makefile logview/data/org.mate.system-log.gschema.xml +logview/data/icons/Makefile logview/tests/Makefile logview/help/Makefile diff --git a/logview/data/Makefile.am b/logview/data/Makefile.am index 93a713d6..ea98da7f 100644 --- a/logview/data/Makefile.am +++ b/logview/data/Makefile.am @@ -1,3 +1,5 @@ +SUBDIRS=icons + xmldir = $(pkgdatadir) xml_DATA = logview-toolbar.xml logview-filter.ui diff --git a/logview/data/icons/Makefile.am b/logview/data/icons/Makefile.am new file mode 100644 index 00000000..a87353f7 --- /dev/null +++ b/logview/data/icons/Makefile.am @@ -0,0 +1,58 @@ +NULL = + +public_icons_themes = \ + hicolor \ + $(NULL) + +public_icons = \ + hicolor_apps_16x16_mate-system-log.png \ + hicolor_apps_22x22_mate-system-log.png \ + hicolor_apps_32x32_mate-system-log.png \ + hicolor_apps_48x48_mate-system-log.png \ + hicolor_apps_256x256_mate-system-log.png \ + hicolor_apps_scalable_mate-system-log-symbolic.svg \ + $(NULL) + +EXTRA_DIST = \ + $(public_icons) \ + $(NULL) + +############################################################################### + +gtk_update_icon_cache = gtk-update-icon-cache -f -t + +update-icon-cache: + @-if test -z "$(DESTDIR)"; then \ + echo "Updating Gtk icon cache."; \ + for theme in $(public_icons_themes); do \ + $(gtk_update_icon_cache) $(datadir)/icons/$$theme; \ + done; \ + else \ + echo "*** Icon cache not updated. After (un)install, run this:"; \ + for theme in $(public_icons_themes); do \ + echo "*** $(gtk_update_icon_cache) $(datadir)/icons/$$theme"; \ + done; \ + fi + +install-icons: + for icon in $(public_icons); do \ + THEME=`echo $$icon | cut -d_ -f1`; \ + CONTEXT=`echo $$icon | cut -d_ -f2`; \ + SIZE=`echo $$icon | cut -d_ -f3`; \ + ICONFILE=`echo $$icon | cut -d_ -f4`; \ + mkdir -p $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT; \ + $(INSTALL_DATA) $(srcdir)/$$icon $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ + done + +uninstall-icons: + -for icon in $(public_icons); do \ + THEME=`echo $$icon | cut -d_ -f1`; \ + CONTEXT=`echo $$icon | cut -d_ -f2`; \ + SIZE=`echo $$icon | cut -d_ -f3`; \ + ICONFILE=`echo $$icon | cut -d_ -f4`; \ + rm -f $(DESTDIR)$(datadir)/icons/$$THEME/$$SIZE/$$CONTEXT/$$ICONFILE; \ + done + +install-data-local: install-icons update-icon-cache + +uninstall-local: uninstall-icons update-icon-cache diff --git a/logview/data/icons/hicolor_apps_16x16_mate-system-log.png b/logview/data/icons/hicolor_apps_16x16_mate-system-log.png new file mode 100644 index 00000000..34638e07 Binary files /dev/null and b/logview/data/icons/hicolor_apps_16x16_mate-system-log.png differ diff --git a/logview/data/icons/hicolor_apps_22x22_mate-system-log.png b/logview/data/icons/hicolor_apps_22x22_mate-system-log.png new file mode 100644 index 00000000..ff6fad54 Binary files /dev/null and b/logview/data/icons/hicolor_apps_22x22_mate-system-log.png differ diff --git a/logview/data/icons/hicolor_apps_256x256_mate-system-log.png b/logview/data/icons/hicolor_apps_256x256_mate-system-log.png new file mode 100644 index 00000000..45334bf8 Binary files /dev/null and b/logview/data/icons/hicolor_apps_256x256_mate-system-log.png differ diff --git a/logview/data/icons/hicolor_apps_32x32_mate-system-log.png b/logview/data/icons/hicolor_apps_32x32_mate-system-log.png new file mode 100644 index 00000000..943028d1 Binary files /dev/null and b/logview/data/icons/hicolor_apps_32x32_mate-system-log.png differ diff --git a/logview/data/icons/hicolor_apps_48x48_mate-system-log.png b/logview/data/icons/hicolor_apps_48x48_mate-system-log.png new file mode 100644 index 00000000..b00429e9 Binary files /dev/null and b/logview/data/icons/hicolor_apps_48x48_mate-system-log.png differ diff --git a/logview/data/icons/hicolor_apps_scalable_mate-system-log-symbolic.svg b/logview/data/icons/hicolor_apps_scalable_mate-system-log-symbolic.svg new file mode 100644 index 00000000..df132b2a --- /dev/null +++ b/logview/data/icons/hicolor_apps_scalable_mate-system-log-symbolic.svg @@ -0,0 +1,23 @@ + + + + + + + + image/svg+xml + + Gnome Symbolic Icon Theme + + + + + + + Gnome Symbolic Icon Theme + + + + + + diff --git a/logview/data/mate-system-log.desktop.in.in b/logview/data/mate-system-log.desktop.in.in index 0d2e2cd8..77bb9595 100644 --- a/logview/data/mate-system-log.desktop.in.in +++ b/logview/data/mate-system-log.desktop.in.in @@ -2,7 +2,7 @@ _Name=Log File Viewer _Comment=View or monitor system log files Exec=mate-system-log -Icon=logviewer +Icon=mate-system-log Terminal=false Type=Application StartupNotify=true diff --git a/logview/logview-app.c b/logview/logview-app.c index f9d24826..e82fe46e 100644 --- a/logview/logview-app.c +++ b/logview/logview-app.c @@ -79,7 +79,7 @@ logview_app_set_window (LogviewApp *app) retval = TRUE; } - gtk_window_set_default_icon_name ("logviewer"); + gtk_window_set_default_icon_name ("mate-system-log"); return retval; } diff --git a/logview/logview-window.c b/logview/logview-window.c index c0d65a2b..116aca51 100644 --- a/logview/logview-window.c +++ b/logview/logview-window.c @@ -768,7 +768,7 @@ logview_about (GtkWidget *widget, GtkWidget *window) "translator_credits", strcmp (logview_about_translator_credits, "translator-credits") != 0 ? logview_about_translator_credits : NULL, - "logo_icon_name", "logviewer", + "logo_icon_name", "mate-system-log", NULL); g_free (license_trans); -- cgit v1.2.1