[nautilus-actions/file-manager-actions] Use icon name defined in the Makefile
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions/file-manager-actions] Use icon name defined in the Makefile
- Date: Wed, 15 Jul 2015 18:27:36 +0000 (UTC)
commit 39422973d1137463c9c4070ab04418e7a021b9a9
Author: Pierre Wieser <pwieser trychlos org>
Date: Thu Jul 9 17:08:09 2015 +0200
Use icon name defined in the Makefile
src/core/Makefile.am | 3 +++
src/core/na-about.c | 10 ++++++++--
2 files changed, 11 insertions(+), 2 deletions(-)
---
diff --git a/src/core/Makefile.am b/src/core/Makefile.am
index 0cf630c..0b3e6a0 100644
--- a/src/core/Makefile.am
+++ b/src/core/Makefile.am
@@ -31,6 +31,8 @@ exportformat_datadir = $(pkgdatadir)/export-format
importmode_datadir = $(pkgdatadir)/import-mode
+icon_fname = $(datadir)/icons/hicolor/48x48/apps/nautilus-actions.png
+
ui_datadir = $(pkgdatadir)/ui
AM_CPPFLAGS += \
@@ -41,6 +43,7 @@ AM_CPPFLAGS += \
-DPKGLIBEXECDIR=\""$(pkglibexecdir)"\" \
-DSYSCONFDIR=\"$(sysconfdir)\" \
-DG_LOG_DOMAIN=\"${NA_LOGDOMAIN_CORE}\" \
+ -DICON_FNAME=\"$(icon_fname)\" \
-DPKGEXPORTFORMATDIR=\"$(exportformat_datadir)\" \
-DPKGIMPORTMODEDIR=\"$(importmode_datadir)\" \
-DPKGUIDIR=\"$(ui_datadir)\" \
diff --git a/src/core/na-about.c b/src/core/na-about.c
index 1cab770..4c660e3 100644
--- a/src/core/na-about.c
+++ b/src/core/na-about.c
@@ -36,6 +36,8 @@
#include "na-about.h"
+static const gchar *st_icon_filename = ICON_FNAME;
+
/*
* na_about_display:
* @toplevel: the parent window.
@@ -101,7 +103,10 @@ na_about_display( GtkWindow *toplevel )
"copyright", copyright,
"documenters", documenters,
"license", license_i18n->str,
- "logo-icon-name", na_about_get_icon_name(),
+ /* using NULL here works because the icon is taken from the
+ * main window - have to be tested when displayed in file-
+ * manager context menu */
+ "logo-icon-name", NULL,
"program-name", application_name,
"translator-credits", _( "The GNOME Translation Project <gnome-i18n gnome org>" ),
"version", PACKAGE_VERSION,
@@ -135,11 +140,12 @@ na_about_get_application_name( void )
* This name is owned by the package, and should not be released by the caller.
*
* cf. Makefile: PACKAGE = nautilus-actions
+ * while st_icon_filename points to full path of the icon.
*/
const gchar *
na_about_get_icon_name( void )
{
- return( PACKAGE );
+ return( st_icon_filename );
}
/*
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]