[nautilus-actions] XML I/O Provider: define images for .xml export formats



commit 8f799727281d4329bf088e590123e08acf934332
Author: Pierre Wieser <pwieser trychlos org>
Date:   Tue Dec 27 08:29:08 2011 +0100

    XML I/O Provider: define images for .xml export formats

 ChangeLog                        |    9 +++++++++
 src/io-xml/Makefile.am           |   15 +++++++++++++++
 src/io-xml/export-dump.png       |  Bin 0 -> 4872 bytes
 src/io-xml/export-schemas-v1.png |  Bin 0 -> 4830 bytes
 src/io-xml/export-schemas-v2.png |  Bin 0 -> 4821 bytes
 src/io-xml/naxml-formats.c       |   11 +++++++----
 6 files changed, 31 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 5a6e397..5ecde09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,15 @@
 
 2011-12-27 Pierre Wieser <pwieser trychlos org>
 
+	* src/io-xml/export-dump.png:
+	* src/io-xml/export-schemas-v1.png:
+	* src/io-xml/export-schemas-v2.png: New files.
+
+	* src/io-xml/naxml-formats.c (naxml_formats_get_formats): Define icons for
+	XML export formats.
+
+	* src/io-xml/Makefile.am: Updated accordingly.
+	 
 	* src/core/na-import-mode.c:
 	* src/core/na-import-mode.h:
 	* src/core/na-ioption.c:
diff --git a/src/io-xml/Makefile.am b/src/io-xml/Makefile.am
index e389c1d..019d76e 100644
--- a/src/io-xml/Makefile.am
+++ b/src/io-xml/Makefile.am
@@ -33,6 +33,7 @@ AM_CPPFLAGS += \
 	-I $(top_srcdir)/src								\
 	$(NAUTILUS_ACTIONS_CFLAGS)							\
 	-DG_LOG_DOMAIN=\"${NA_LOGDOMAIN_IO_XML}\"			\
+	-DPKGDATADIR=\"$(pkgdatadir)\"						\
 	$(NULL)
 
 libna_io_xml_la_SOURCES = \
@@ -59,3 +60,17 @@ libna_io_xml_la_LDFLAGS = \
 	-no-undefined										\
 	-avoid-version										\
 	$(NULL)
+
+images_files = \
+	export-dump.png										\
+	export-schemas-v1.png								\
+	export-schemas-v2.png								\
+	$(NULL)
+
+pkgdata_DATA = \
+	$(images_files)										\
+	$(NULL)
+
+EXTRA_DIST = \
+	$(pkgdata_DATA)										\
+	$(NULL)
diff --git a/src/io-xml/export-dump.png b/src/io-xml/export-dump.png
new file mode 100644
index 0000000..d5012ac
Binary files /dev/null and b/src/io-xml/export-dump.png differ
diff --git a/src/io-xml/export-schemas-v1.png b/src/io-xml/export-schemas-v1.png
new file mode 100644
index 0000000..e61b0b0
Binary files /dev/null and b/src/io-xml/export-schemas-v1.png differ
diff --git a/src/io-xml/export-schemas-v2.png b/src/io-xml/export-schemas-v2.png
new file mode 100644
index 0000000..6459cfb
Binary files /dev/null and b/src/io-xml/export-schemas-v2.png differ
diff --git a/src/io-xml/naxml-formats.c b/src/io-xml/naxml-formats.c
index 5dd14c7..66cef45 100644
--- a/src/io-xml/naxml-formats.c
+++ b/src/io-xml/naxml-formats.c
@@ -59,7 +59,7 @@ static NaxmlExportFormat naxml_formats[] = {
 				"- Import assistant of the Nautilus-Actions Configuration Tool,\n" \
 				"- drag-n-drop into the Nautilus-Actions Configuration Tool,\n" \
 				"- or via the gconftool-2 --import-schema-file command-line tool." ),
-			NULL },
+			"export-schemas-v1.png" },
 
 	/* GCONF_SCHEMA_V2: the lightest schema still compatible with gconftool-2 --install-schema-file
 	 * (no owner, no short nor long descriptions) - introduced in v 1.11
@@ -74,7 +74,7 @@ static NaxmlExportFormat naxml_formats[] = {
 				"- Import assistant of the Nautilus-Actions Configuration Tool,\n" \
 				"- drag-n-drop into the Nautilus-Actions Configuration Tool,\n" \
 				"- or via the gconftool-2 --import-schema-file command-line tool." ),
-			NULL },
+			"export-schemas-v2.png" },
 
 	/* GCONF_ENTRY: not a schema, but a dump of the GConf entry
 	 * introduced in v 1.11
@@ -89,7 +89,7 @@ static NaxmlExportFormat naxml_formats[] = {
 				"- Import assistant of the Nautilus-Actions Configuration Tool (1.11 and above),\n" \
 				"- drag-n-drop into the Nautilus-Actions Configuration Tool (1.11 and above),\n" \
 				"- or via the gconftool-2 --load command-line tool." ),
-			NULL },
+			"export-dump.png" },
 
 	{ NULL }
 };
@@ -111,6 +111,7 @@ naxml_formats_get_formats( const NAIExporter* exporter )
 	NAIExporterFormatExt *str;
 	guint i;
 	gint width, height;
+	gchar *fname;
 
 	str_list = NULL;
 
@@ -126,7 +127,9 @@ naxml_formats_get_formats( const NAIExporter* exporter )
 		str->label = g_strdup( gettext( naxml_formats[i].label ));
 		str->description = g_strdup( gettext( naxml_formats[i].description ));
 		if( naxml_formats[i].image ){
-			str->pixbuf = gdk_pixbuf_new_from_file_at_size( naxml_formats[i].image, width, height, NULL );
+			fname = g_strdup_printf( "%s/%s", PKGDATADIR, naxml_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]