[gthumb] Added an example extension



commit 7845a04d3e8623ad4c5d8fa7ffb492b215783225
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Jan 18 21:04:47 2010 +0100

    Added an example extension

 autogen.sh                                     |    2 +-
 extensions/Makefile.am                         |    2 +
 extensions/example/Makefile.am                 |   67 +++++++++
 extensions/example/README                      |   21 +++
 extensions/example/autogen.sh                  |   22 +++
 extensions/example/configure.ac.example        |  114 +++++++++++++++
 extensions/example/git.mk                      |  181 ++++++++++++++++++++++++
 extensions/example/init.sh                     |   40 +++++
 extensions/example/po/LINGUAS                  |    1 +
 extensions/example/po/POTFILES.in              |    5 +
 extensions/example/po/it.po                    |   26 ++++
 extensions/example/po/update-potfiles.sh       |   14 ++
 extensions/example/src/Makefile.am             |   25 ++++
 extensions/example/src/example.extension.in.in |   10 ++
 extensions/example/src/main.c                  |   53 +++++++
 15 files changed, 582 insertions(+), 1 deletions(-)
---
diff --git a/autogen.sh b/autogen.sh
index cb30e46..dab5edd 100755
--- a/autogen.sh
+++ b/autogen.sh
@@ -15,7 +15,7 @@ REQUIRED_AUTOMAKE_VERSION=1.8
 }
 
 which gnome-autogen.sh || {
-    echo "You need to install gnome-common from the GNOME CVS"
+    echo "You need to install gnome-common from the GNOME git"
     exit 1
 }
 
diff --git a/extensions/Makefile.am b/extensions/Makefile.am
index 62a37c7..49cbdbd 100644
--- a/extensions/Makefile.am
+++ b/extensions/Makefile.am
@@ -23,4 +23,6 @@ SUBDIRS = 			\
 	search			\
 	slideshow
 
+EXTRA_DIST = example
+
 -include $(top_srcdir)/git.mk
diff --git a/extensions/example/AUTHORS b/extensions/example/AUTHORS
new file mode 100644
index 0000000..e69de29
diff --git a/extensions/example/Makefile.am b/extensions/example/Makefile.am
new file mode 100644
index 0000000..55c5bc7
--- /dev/null
+++ b/extensions/example/Makefile.am
@@ -0,0 +1,67 @@
+SUBDIRS = po src
+ACLOCAL_AMFLAGS = -I m4
+
+EXTRA_DIST =                    \
+	AUTHORS                 \
+        NEWS                    \
+        README                  \
+	config.rpath		\
+	intltool-merge.in       \
+	intltool-update.in      \
+	intltool-extract.in
+
+DISTCLEANFILES =                        \
+	po/.intltool-merge-cache        \
+	intltool-extract                \
+	intltool-merge                  \
+	intltool-update                 \
+	gnome-doc-utils.make
+
+MAINTAINERCLEANFILES = \
+	$(srcdir)/INSTALL \
+	$(srcdir)/aclocal.m4 \
+	$(srcdir)/autoscan.log \
+	$(srcdir)/compile \
+	$(srcdir)/config.guess \
+	$(srcdir)/config.h.in \
+	$(srcdir)/config.sub \
+	$(srcdir)/configure.scan \
+	$(srcdir)/depcomp \
+	$(srcdir)/install-sh \
+	$(srcdir)/ltmain.sh \
+	$(srcdir)/m4 \
+	$(srcdir)/missing \
+	$(srcdir)/mkinstalldirs \
+	$(srcdir)/omf.make \
+	$(srcdir)/xmldocs.make \
+	$(srcdir)/gtk-doc.make \
+	$(srcdir)/ChangeLog \
+	`find "$(srcdir)" -type f -name Makefile.in -print`
+
+GITIGNOREFILES = build .cdt* .cproject .project .settings/
+
+DISTCHECK_CONFIGURE_FLAGS = --disable-scrollkeeper
+
+CLEANFILES = ChangeLog
+
+# Build ChangeLog from GIT history
+
+ChangeLog:
+	@echo Creating $@
+	@if test -d $(top_srcdir)/.git; then \
+		(GIT_DIR=$(top_srcdir)/.git $(top_srcdir)/missing --run git log --stat -M -C --name-status --date=short --no-color) | fmt --split-only > $  tmp \
+		 && mv -f $  tmp $@ \
+		 || ($(RM) $  tmp; \
+		     echo Failed to generate ChangeLog, your ChangeLog may be outdated >&2; \
+		     (test -f $@ || echo git-log is required to generate this file >> $@)); \
+	else \
+		test -f $@ || \
+		(echo A git checkout and git-log is required to generate ChangeLog >&2 && \
+		echo A git checkout and git-log is required to generate this file >> $@); \
+	fi
+
+dist: ChangeLog
+
+.PHONY: ChangeLog
+
+-include $(top_srcdir)/git.mk
diff --git a/extensions/example/NEWS b/extensions/example/NEWS
new file mode 100644
index 0000000..e69de29
diff --git a/extensions/example/README b/extensions/example/README
new file mode 100644
index 0000000..eecad80
--- /dev/null
+++ b/extensions/example/README
@@ -0,0 +1,21 @@
+This is an example extension that can be used as a starting point to develop 
+a new extension.
+
+For example to create a flickr uploader extension, open a terminal and issue 
+the following commands:
+
+cp -R example ~/gthumb-flickr-uploader
+cd ~/gthumb-flickr-uploader
+sh init.sh flickr-uploader
+
+and remember to modify the extension description in 
+src/flickr_uploader.extension.in.in
+
+at this point the extension is ready to be compiled with the usual commands:
+
+./autogen.sh --prefix=SAME_GTHUMB_PREFIX
+make
+sudo make install
+
+If you think your extension can be useful to others as well, add it to
+the extensions list available at http://live.gnome.org/gthumb/extensions
diff --git a/extensions/example/autogen.sh b/extensions/example/autogen.sh
new file mode 100755
index 0000000..a6293f0
--- /dev/null
+++ b/extensions/example/autogen.sh
@@ -0,0 +1,22 @@
+#!/bin/sh
+# Run this to generate all the initial makefiles, etc.
+
+srcdir=`dirname $0`
+test -z "$srcdir" && srcdir=.
+
+PKG_NAME="gthumb-example"
+REQUIRED_AUTOMAKE_VERSION=1.8
+
+(test -f $srcdir/configure.ac \
+  && test -d $srcdir/src) || {
+    echo -n "**Error**: Directory "\`$srcdir\'" does not look like the"
+    echo " top-level $PKG_NAME directory"
+    exit 1
+}
+
+which gnome-autogen.sh || {
+    echo "You need to install gnome-common from the GNOME git"
+    exit 1
+}
+
+USE_GNOME2_MACROS=1 USE_COMMON_DOC_BUILD=yes . gnome-autogen.sh
diff --git a/extensions/example/configure.ac.example b/extensions/example/configure.ac.example
new file mode 100644
index 0000000..1cd20cd
--- /dev/null
+++ b/extensions/example/configure.ac.example
@@ -0,0 +1,114 @@
+AC_PREREQ([2.57])
+AC_INIT([gthumb-example], [1.0])
+AM_INIT_AUTOMAKE([1.9 foreign])
+
+AC_CONFIG_HEADERS([config.h])
+AC_CONFIG_MACRO_DIR([m4])
+AC_CONFIG_SRCDIR([configure.ac])
+
+if test -z "$enable_maintainer_mode"; then
+  enable_maintainer_mode=yes
+fi
+AM_MAINTAINER_MODE([enable])
+
+m4_ifdef([AM_SILENT_RULES], [AM_SILENT_RULES([yes])])
+
+AM_PROG_LIBTOOL
+
+AC_ISC_POSIX
+AC_PROG_CC
+AM_PROG_CC_STDC
+AM_PROG_CC_C_O
+AC_HEADER_STDC
+AC_C_BIGENDIAN
+AC_PROG_CPP
+
+GNOME_COMMON_INIT
+GNOME_DOC_INIT
+GNOME_MAINTAINER_MODE_DEFINES
+GNOME_COMPILE_WARNINGS([maximum])
+
+GLIB_REQUIRED=2.16.0
+GTK_REQUIRED=2.16.0
+GCONF_REQUIRED=2.6.0
+GTHUMB_REQUIRED=2.11.1
+
+dnl ===========================================================================
+
+CFLAGS=${CFLAGS-:""}
+CFLAGS+=" -DG_DISABLE_SINGLE_INCLUDES -DGDK_PIXBUF_DISABLE_SINGLE_INCLUDES -DGTK_DISABLE_SINGLE_INCLUDES"
+CFLAGS+=" -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED"
+
+AC_ARG_ENABLE(debug,
+	      AS_HELP_STRING([--enable-debug], [enable compilation of debugging messages]),
+	      [case "${enableval}" in
+	      yes) ENABLE_DEBUG=yes ;;
+	      no) ENABLE_DEBUG=no ;;
+	      *) AC_MSG_ERROR([bad value ${enableval} for --enable-debug]) ;;
+	      esac],
+	      [ENABLE_DEBUG=no])
+if test x$ENABLE_DEBUG = xyes; then
+	AC_DEFINE(DEBUG, 1, [enable compilation of debugging messages])
+	CFLAGS+=" -g -O0"
+fi
+
+dnl ===========================================================================
+
+PKG_CHECK_MODULES(EXTENSION, [
+	glib-2.0 		>= $GLIB_REQUIRED
+	gthread-2.0
+	gmodule-2.0
+	gio-unix-2.0
+	gtk+-2.0 		>= $GTK_REQUIRED
+	gconf-2.0 		>= $GCONF_REQUIRED
+	gthumb-2.12		>= $GTHUMB_REQUIRED
+])
+AC_SUBST(EXTENSION_LIBS)
+AC_SUBST(EXTENSION_CFLAGS)
+
+EXTENSION_DIR=`pkg-config --variable=extensionsdir gthumb-2.12`
+AC_SUBST(EXTENSION_DIR)
+
+EXTENSION_LIBTOOL_FLAGS='-module -avoid-version -disable-static'
+AC_SUBST(EXTENSION_LIBTOOL_FLAGS)
+
+dnl ===========================================================================
+
+IT_PROG_INTLTOOL([0.35.0])
+GETTEXT_PACKAGE=gthumb-example
+AC_SUBST([GETTEXT_PACKAGE])
+AC_DEFINE_UNQUOTED([GETTEXT_PACKAGE],["$GETTEXT_PACKAGE"],[Gettext package])
+AM_GLIB_GNU_GETTEXT
+
+if test "x${prefix}" = "xNONE"; then
+	AC_DEFINE_UNQUOTED(LOCALEDIR, "${ac_default_prefix}/${DATADIRNAME}/locale", [Locale directory])
+else
+	AC_DEFINE_UNQUOTED(LOCALEDIR, "${prefix}/${DATADIRNAME}/locale", [Locale directory])
+fi
+
+dnl ===========================================================================
+
+AC_PATH_PROG(GCONFTOOL, gconftool-2, no)
+if test x"$GCONFTOOL" = xno; then
+	AC_MSG_ERROR([gconftool-2 executable not found in your path - should be installed with GConf])
+fi
+AM_GCONF_SOURCE_2
+
+dnl ===========================================================================
+
+AC_CONFIG_FILES([
+Makefile
+src/Makefile
+po/Makefile.in
+])
+
+AC_OUTPUT
+
+echo "
+Configuration:
+
+	Source code location : $srcdir
+	Compiler             : $CC
+	Prefix               : $prefix
+	Debug                : $ENABLE_DEBUG
+"
diff --git a/extensions/example/git.mk b/extensions/example/git.mk
new file mode 100644
index 0000000..77ba220
--- /dev/null
+++ b/extensions/example/git.mk
@@ -0,0 +1,181 @@
+# git.mk
+#
+# Copyright 2009, Red Hat, Inc.
+# Written by Behdad Esfahbod
+#
+# Copying and distribution of this file, with or without modification,
+# are permitted in any medium without royalty provided the copyright
+# notice and this notice are preserved.
+#
+# The canonical source for this file is pango/git.mk, or whereever the
+# header of pango/git.mk suggests in the future.
+#
+# To use in your project, import this file in your git repo's toplevel,
+# then do "make -f git.mk".  This modifies all Makefile.am files in
+# your project to include git.mk.
+#
+# This enables automatic .gitignore generation.  If you need to ignore
+# more files, add them to the GITIGNOREFILES variable in your Makefile.am.
+# But think twice before doing that.  If a file has to be in .gitignore,
+# chances are very high that it's a generated file and should be in one
+# of MOSTLYCLEANFILES, CLEANFILES, DISTCLEANFILES, or MAINTAINERCLEANFILES.
+#
+# The only case that you need to manually add a file to GITIGNOREFILES is
+# when remove files in one of mostlyclean-local, clean-local, distclean-local,
+# or maintainer-clean-local.
+#
+# Note that for files like editor backup, etc, there are better places to
+# ignore them.  See "man gitignore".
+#
+# If "make maintainer-clean" removes the files but they are not recognized
+# by this script (that is, if "git status" shows untracked files still), send
+# me the output of "git status" as well as your Makefile.am and Makefile for
+# the directories involved.
+#
+# For a list of toplevel files that should be in MAINTAINERCLEANFILES, see
+# pango/Makefile.am.
+#
+# Don't EXTRA_DIST this file.  It is supposed to only live in git clones,
+# not tarballs.  It serves no useful purpose in tarballs and clutters the
+# build dir.
+#
+# This file knows how to handle autoconf, automake, libtool, gtk-doc,
+# gnome-doc-utils, intltool.
+#
+#
+# KNOWN ISSUES:
+#
+# - Recursive configure doesn't work as $(top_srcdir)/git.mk inside the
+#   submodule doesn't find us.  If you have configure.{in,ac} files in
+#   subdirs, add a proxy git.mk file in those dirs that simply does:
+#   "include $(top_srcdir)/../git.mk".  Add more ..'s to your taste.
+#   And add those files to git.  See vte/gnome-pty-helper/git.mk for
+#   example.
+#
+
+git-all: git-mk-install
+
+git-mk-install:
+	@echo Installing git makefile
+	@any_failed=; find $(top_srcdir) -name Makefile.am | while read x; do \
+		if grep 'include .*/git.mk' $$x >/dev/null; then \
+			echo $$x already includes git.mk; \
+		else \
+			failed=; \
+			echo "Updating $$x"; \
+			{ cat $$x; \
+			  echo ''; \
+			  echo '-include $$(top_srcdir)/git.mk'; \
+			} > $$x.tmp || failed=1; \
+			if test x$$failed = x; then \
+				mv $$x.tmp $$x || failed=1; \
+			fi; \
+			if test x$$failed = x; then : else \
+				echo Failed updating $$x; >&2 \
+				any_failed=1; \
+			fi; \
+	fi; done; test -z "$$any_failed"
+
+.PHONY: git-all git-mk-install
+
+
+### .gitignore generation
+
+$(srcdir)/.gitignore: Makefile.am $(top_srcdir)/git.mk
+	@echo Generating $@; \
+	{ \
+		if test "x$(DOC_MODULE)" = x -o "x$(DOC_MAIN_SGML_FILE)" = x; then :; else \
+			for x in \
+				$(DOC_MODULE)-decl-list.txt \
+				$(DOC_MODULE)-decl.txt \
+				tmpl/$(DOC_MODULE)-unused.sgml \
+				"tmpl/*.bak" \
+				xml html \
+			; do echo /$$x; done; \
+		fi; \
+		if test "x$(DOC_MODULE)" = x -o "x$(DOC_LINGUAS)" = x; then :; else \
+			for x in \
+				$(_DOC_C_DOCS) \
+				$(_DOC_LC_DOCS) \
+				$(_DOC_OMF_ALL) \
+				$(_DOC_DSK_ALL) \
+				$(_DOC_HTML_ALL) \
+				"*/.xml2po.mo" \
+				"*/*.omf.out" \
+			; do echo /$$x; done; \
+		fi; \
+		if test -f $(srcdir)/po/Makefile.in.in; then \
+			for x in \
+				po/Makefile.in.in \
+				po/Makefile.in \
+				po/Makefile \
+				po/POTFILES \
+				po/stamp-it \
+				po/.intltool-merge-cache \
+				"po/*.gmo" \
+				"po/*.mo" \
+				intltool-extract.in \
+				intltool-merge.in \
+				intltool-update.in \
+			; do echo /$$x; done; \
+		fi; \
+		if test -f $(srcdir)/configure; then \
+			for x in \
+				autom4te.cache \
+				configure \
+				config.h \
+				stamp-h1 \
+				libtool \
+				config.lt \
+			; do echo /$$x; done; \
+		fi; \
+		for x in \
+			.gitignore \
+			$(GITIGNOREFILES) \
+			$(CLEANFILES) \
+			$(PROGRAMS) \
+			$(EXTRA_PROGRAMS) \
+			$(LTLIBRARIES) \
+			so_locations \
+			.libs _libs \
+			$(MOSTLYCLEANFILES) \
+			"*.$(OBJEXT)" \
+			"*.lo" \
+			$(DISTCLEANFILES) \
+			$(am__CONFIG_DISTCLEAN_FILES) \
+			$(CONFIG_CLEAN_FILES) \
+			TAGS ID GTAGS GRTAGS GSYMS GPATH tags \
+			"*.tab.c" \
+			$(MAINTAINERCLEANFILES) \
+			$(BUILT_SOURCES) \
+			$(DEPDIR) \
+			Makefile \
+			Makefile.in \
+			"*.orig" \
+			"*.rej" \
+			"*.bak" \
+			"*~" \
+			".*.sw[nop]" \
+		; do echo /$$x; done; \
+	} | \
+	sed "s ^/`echo "$(srcdir)" | sed 's/\(.\)/[\1]/g'`/@/@" | \
+	sed 's@/[.]/@/@g' | \
+	LANG=C sort | uniq > $  tmp && \
+	mv $  tmp $@;
+
+all: $(srcdir)/.gitignore gitignore-recurse-maybe
+gitignore-recurse-maybe:
+	@if test "x$(SUBDIRS)" = "x$(DIST_SUBDIRS)"; then :; else \
+		$(MAKE) $(AM_MAKEFLAGS) gitignore-recurse; \
+	fi;
+gitignore-recurse:
+	@list='$(DIST_SUBDIRS)'; for subdir in $$list; do \
+	  test "$$subdir" = . || (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) .gitignore gitignore-recurse || echo "Skipping $$subdir"); \
+	done
+gitignore: $(srcdir)/.gitignore gitignore-recurse
+
+maintainer-clean: gitignore-clean
+gitignore-clean:
+	-rm -f $(srcdir)/.gitignore
+
+.PHONY: gitignore-clean gitignore gitignore-recurse gitignore-recurse-maybe
diff --git a/extensions/example/init.sh b/extensions/example/init.sh
new file mode 100644
index 0000000..446984d
--- /dev/null
+++ b/extensions/example/init.sh
@@ -0,0 +1,40 @@
+if [ -z $1 ]; then
+  echo "Usage: sh init.sh YOUR-EXTENSION-NAME [ORIGINAL-NAME]"
+  echo "Change the name of the extension in YOUR-EXTENSION-NAME"
+  echo ""
+  echo "  YOUR-EXTENSION-NAME  The new name to use, separate the words with -"
+  echo "  [ORIGINAL-NAME]      The original name to substitute (optional, default:example)"
+  exit 1
+fi
+
+if [ -z $2 ]; then
+  originalname=example
+else
+  originalname=$2
+fi
+originalname=`echo $originalname | tr '_' '-'`
+original_name=`echo $originalname | tr '-' '_'`
+
+extensionname=`echo $1 | tr '_' '-'`
+extension_name=`echo $extensionname | tr '-' '_'`
+
+orig_dir=`pwd`
+
+sed -e "s|$originalname|$extensionname|" < autogen.sh > autogen.sh
+
+if [ -e configure.ac.example ]; then
+  mv configure.ac.example configure.ac
+fi
+sed -e "s|gthumb-$originalname|gthumb-$extensionname|" < configure.ac > configure.ac.tmp
+mv configure.ac.tmp configure.ac
+
+if [ -e src/$original_name.extension.in.in ]; then
+  mv src/$original_name.extension.in.in src/$extension_name.extension.in.in
+fi
+sed -e "s|$original_name|$extension_name|" < src/Makefile.am > src/Makefile.am.tmp
+mv src/Makefile.am.tmp src/Makefile.am
+
+cd po
+sh update-potfiles.sh > POTFILES.in
+
+cd $orig_dir
diff --git a/extensions/example/po/LINGUAS b/extensions/example/po/LINGUAS
new file mode 100644
index 0000000..7d5856f
--- /dev/null
+++ b/extensions/example/po/LINGUAS
@@ -0,0 +1 @@
+it
diff --git a/extensions/example/po/POTFILES.in b/extensions/example/po/POTFILES.in
new file mode 100644
index 0000000..487d756
--- /dev/null
+++ b/extensions/example/po/POTFILES.in
@@ -0,0 +1,5 @@
+# DO NOT EDIT.  This file is automatically generated.
+# List of source files which contain translatable strings.
+[encoding: UTF-8]
+[type: gettext/ini]src/example.extension.in.in
+src/main.c
diff --git a/extensions/example/po/it.po b/extensions/example/po/it.po
new file mode 100644
index 0000000..3c920f0
--- /dev/null
+++ b/extensions/example/po/it.po
@@ -0,0 +1,26 @@
+# Italian translations for gthumb-example package
+# Traduzioni italiane per il pacchetto gthumb-example..
+# Copyright (C) 2010 THE gthumb-example'S COPYRIGHT HOLDER
+# This file is distributed under the same license as the gthumb-example package.
+# Translator name <example translation it>, 2010.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: gthumb-example 1.0\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2010-01-18 13:29+0100\n"
+"PO-Revision-Date: 2010-01-18 13:29+0100\n"
+"Last-Translator: Translator name <example translation it>\n"
+"Language-Team: Italian\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=2; plural=(n != 1);\n"
+
+#: ../src/example.extension.in.in.h:1
+msgid "Example"
+msgstr "Esempio"
+
+#: ../src/example.extension.in.in.h:2
+msgid "Extension example."
+msgstr "Estensione d'esempio."
diff --git a/extensions/example/po/update-potfiles.sh b/extensions/example/po/update-potfiles.sh
new file mode 100644
index 0000000..fc900aa
--- /dev/null
+++ b/extensions/example/po/update-potfiles.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+echo "# DO NOT EDIT.  This file is automatically generated."
+echo "# List of source files which contain translatable strings."
+echo "[encoding: UTF-8]"
+files=`find .. \( -name '*.c' -o -name '*.h' -o -name '*.cpp' -o -name '*.ui' -o -name '*.schemas.in' -o -name '*.desktop.in.in' -o -name '*.extension.in.in' \) -printf "%P\n" | sort`
+for f in $files; do
+	case $f in
+        build/*) ;;
+	*.ui) echo "[type: gettext/glade]$f" ;;
+	*.extension.in.in) echo "[type: gettext/ini]$f" ;;
+	*) echo $f
+	esac
+done
diff --git a/extensions/example/src/Makefile.am b/extensions/example/src/Makefile.am
new file mode 100644
index 0000000..f87f71a
--- /dev/null
+++ b/extensions/example/src/Makefile.am
@@ -0,0 +1,25 @@
+extensiondir = $(EXTENSION_DIR)
+extension_LTLIBRARIES = libexample.la
+
+libexample_la_SOURCES = \
+	main.c
+
+libexample_la_CFLAGS = $(EXTENSION_CFLAGS) -DEXTENSION_LOCALEDIR=\"$(datadir)/locale\" 
+libexample_la_LDFLAGS = $(EXTENSION_LIBTOOL_FLAGS)
+libexample_la_LIBADD = $(EXTENSION_LIBS)
+
+extensioninidir = $(EXTENSION_DIR)
+extensionini_in_files = example.extension.in.in
+extensionini_DATA = $(extensionini_in_files:.extension.in.in=.extension)
+
+%.extension.in: %.extension.in.in $(extension_LTLIBRARIES)
+	$(AM_V_GEN)( sed -e "s|%LIBRARY%|`. ./$(extension_LTLIBRARIES) && echo $$dlname`|" \
+	$< > $@ )
+
+%.extension: %.extension.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< $@
+
+EXTRA_DIST = $(extensionini_in_files) 
+
+DISTCLEANFILES = $(extensionini_DATA)
+
+-include $(top_srcdir)/git.mk
diff --git a/extensions/example/src/example.extension.in.in b/extensions/example/src/example.extension.in.in
new file mode 100644
index 0000000..4379e11
--- /dev/null
+++ b/extensions/example/src/example.extension.in.in
@@ -0,0 +1,10 @@
+[Extension]
+_Name=Example
+_Description=Extension example.
+Authors=gthumb development team
+Copyright=Copyright © 2010 The Free Software Foundation, Inc.
+Version=1.0
+
+[Loader]
+Type=module
+File=%LIBRARY%
diff --git a/extensions/example/src/main.c b/extensions/example/src/main.c
new file mode 100644
index 0000000..5c45317
--- /dev/null
+++ b/extensions/example/src/main.c
@@ -0,0 +1,53 @@
+/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
+
+/*
+ *  GThumb
+ *
+ *  Copyright (C) 2010 Free Software Foundation, Inc.
+ *
+ *  This program is free software; you can redistribute it and/or modify
+ *  it under the terms of the GNU General Public License as published by
+ *  the Free Software Foundation; either version 2 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  GNU General Public License for more details.
+ *
+ *  You should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 59 Temple Street #330, Boston, MA 02111-1307, USA.
+ */
+
+
+#include <config.h>
+#include <gtk/gtk.h>
+#include <gthumb.h>
+
+
+G_MODULE_EXPORT void
+gthumb_extension_activate (void)
+{
+	bindtextdomain (GETTEXT_PACKAGE, EXTENSION_LOCALEDIR);
+	bind_textdomain_codeset (GETTEXT_PACKAGE, "UTF-8");
+}
+
+
+G_MODULE_EXPORT void
+gthumb_extension_deactivate (void)
+{
+}
+
+
+G_MODULE_EXPORT gboolean
+gthumb_extension_is_configurable (void)
+{
+	return FALSE;
+}
+
+
+G_MODULE_EXPORT void
+gthumb_extension_configure (GtkWindow *parent)
+{
+}



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]