[nautilus-actions] NADP I/O Provider: define an image for desktop export format
- From: Pierre Wieser <pwieser src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus-actions] NADP I/O Provider: define an image for desktop export format
- Date: Sun, 1 Jan 2012 16:33:23 +0000 (UTC)
commit 9f018bf2604ea23624aee55f08e0952c8c0f484b
Author: Pierre Wieser <pwieser trychlos org>
Date: Tue Dec 27 08:34:10 2011 +0100
NADP I/O Provider: define an image for desktop export format
ChangeLog | 7 +++++++
src/io-desktop/Makefile.am | 13 +++++++++++++
src/io-desktop/export-desktop.png | Bin 0 -> 7610 bytes
src/io-desktop/nadp-formats.c | 7 +++++--
4 files changed, 25 insertions(+), 2 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5ecde09..e7e20ac 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,13 @@
2011-12-27 Pierre Wieser <pwieser trychlos org>
+ * src/io-desktop/export-desktop.png: New file.
+
+ * src/io-desktop/nadp-formats.c (nadp_formats_get_formats): Define an icon
+ for desktop export format.
+
+ * src/io-desktop/Makefile.am: Updated accordingly.
+
* src/io-xml/export-dump.png:
* src/io-xml/export-schemas-v1.png:
* src/io-xml/export-schemas-v2.png: New files.
diff --git a/src/io-desktop/Makefile.am b/src/io-desktop/Makefile.am
index e3ac424..7362b67 100644
--- a/src/io-desktop/Makefile.am
+++ b/src/io-desktop/Makefile.am
@@ -33,6 +33,7 @@ AM_CPPFLAGS += \
-I $(top_srcdir)/src \
$(NAUTILUS_ACTIONS_CFLAGS) \
-DG_LOG_DOMAIN=\"${NA_LOGDOMAIN_IO_DESKTOP}\" \
+ -DPKGDATADIR=\"$(pkgdatadir)\" \
$(NULL)
libna_io_desktop_la_SOURCES = \
@@ -67,3 +68,15 @@ libna_io_desktop_la_LDFLAGS = \
-no-undefined \
-avoid-version \
$(NULL)
+
+images_files = \
+ export-desktop.png \
+ $(NULL)
+
+pkgdata_DATA = \
+ $(images_files) \
+ $(NULL)
+
+EXTRA_DIST = \
+ $(pkgdata_DATA) \
+ $(NULL)
diff --git a/src/io-desktop/export-desktop.png b/src/io-desktop/export-desktop.png
new file mode 100644
index 0000000..ee16fdc
Binary files /dev/null and b/src/io-desktop/export-desktop.png differ
diff --git a/src/io-desktop/nadp-formats.c b/src/io-desktop/nadp-formats.c
index fdd9ee2..3b02fd6 100644
--- a/src/io-desktop/nadp-formats.c
+++ b/src/io-desktop/nadp-formats.c
@@ -65,7 +65,7 @@ static NadpExportFormat nadp_formats[] = {
"- Import assistant of the Nautilus-Actions Configuration Tool,\n" \
"- drag-n-drop into the Nautilus-Actions Configuration Tool,\n" \
"- or by copying it into a XDG_DATA_DIRS/file-manager/actions directory." ),
- NULL },
+ "export-desktop.png" },
{ NULL }
};
@@ -87,6 +87,7 @@ nadp_formats_get_formats( const NAIExporter* exporter )
NAIExporterFormatExt *str;
guint i;
gint width, height;
+ gchar *fname;
str_list = NULL;
@@ -102,7 +103,9 @@ nadp_formats_get_formats( const NAIExporter* exporter )
str->label = g_strdup( gettext( nadp_formats[i].label ));
str->description = g_strdup( gettext( nadp_formats[i].description ));
if( nadp_formats[i].image ){
- str->pixbuf = gdk_pixbuf_new_from_file_at_size( nadp_formats[i].image, width, height, NULL );
+ fname = g_strdup_printf( "%s/%s", PKGDATADIR, nadp_formats[i].image );
+ str->pixbuf = gdk_pixbuf_new_from_file_at_size( fname, width, height, NULL );
+ g_free( fname );
}
str_list = g_list_prepend( str_list, str );
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]