[gthumb] Simplify and tidy up build files, remove gthumb-module - bug 583463



commit a9a169e4c6b1158f5a4e6db6a0ee3da961e56cac
Author: Marc Pavot <marc pavot gmail com>
Date:   Mon May 25 15:16:34 2009 -0400

    Simplify and tidy up build files, remove gthumb-module - bug 583463
    
    Also deleted some debugging printfs.
---
 configure.in                        |   16 +++++-
 libgthumb/Makefile.am               |   13 ----
 libgthumb/gthumb-module.c           |  115 -----------------------------------
 libgthumb/gthumb-module.h           |   29 ---------
 libgthumb/jpegutils/Makefile.am     |    8 +--
 src/Makefile.am                     |   87 +++++++--------------------
 src/dlg-photo-importer.c            |    3 -
 src/gth-browser-actions-callbacks.c |   46 ++++----------
 src/gth-window-actions-callbacks.c  |   17 +----
 9 files changed, 54 insertions(+), 280 deletions(-)

diff --git a/configure.in b/configure.in
index df95118..2df763d 100644
--- a/configure.in
+++ b/configure.in
@@ -259,8 +259,22 @@ fi
 dnl ******************************
 
 AC_ARG_ENABLE(deprecations,AC_HELP_STRING([--enable-deprecations],[warn about deprecated usages]))
+if test "x$enable_deprecations" = "xyes"; then
+        DISABLE_DEPRECATED="-DG_DISABLE_DEPRECATED \
+        -DGDK_DISABLE_DEPRECATED \
+        -DGDK_PIXBUF_DISABLE_DEPRECATED \
+        -DGTK_DISABLE_DEPRECATED \
+        -DGNOME_VFS_DISABLE_DEPRECATED \
+        -DGNOME_DISABLE_DEPRECATED"
+        AC_SUBST(DISABLE_DEPRECATED)
+fi
+
+dnl ******************************
 
-AM_CONDITIONAL(ENABLE_DEPRECATIONS, test "x$enable_deprecations" = xyes)
+WARNINGS="-Wall -Wimplicit -Wunused-label \
+-Wpointer-arith -Wcast-align -Wtype-limits \
+-Wclobbered -Wempty-body -Wignored-qualifiers"
+AC_SUBST(WARNINGS)
 
 dnl ******************************
 
diff --git a/libgthumb/Makefile.am b/libgthumb/Makefile.am
index 4919cc2..97ded52 100644
--- a/libgthumb/Makefile.am
+++ b/libgthumb/Makefile.am
@@ -1,21 +1,10 @@
 SUBDIRS = icons cursors jpegutils
 DIST_SUBDIRS = icons cursors jpegutils
 
-if ENABLE_DEPRECATIONS
-DISABLE_DEPRECATED = -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED
-else
-DISABLE_DEPRECATED =
-endif
-
-WARNINGS = -Wall -Wimplicit -Wunused-label \
-	   -Wpointer-arith -Wcast-align -Wtype-limits \
-	   -Wclobbered -Wempty-body -Wignored-qualifiers
-
 gladedir = $(datadir)/gthumb/glade
 
 INCLUDES =							\
 	$(GTHUMB_CFLAGS)					\
-	-DGTHUMB_MODULEDIR=\""$(libdir)/gthumb/modules"\"	\
 	-DGTHUMB_GLADEDIR=\""$(gladedir)"\"			\
 	$(LIBOPENRAW_CFLAGS)                                    \
 	$(EXIV2_CFLAGS)						\
@@ -65,7 +54,6 @@ HEADER_FILES =				\
 	gthumb-histogram.h		\
 	gthumb-init.h			\
 	gthumb-info-bar.h		\
-	gthumb-module.h			\
 	gthumb-slide.h			\
 	gthumb-stock.h			\
 	gtk-utils.h			\
@@ -126,7 +114,6 @@ libgthumb_la_SOURCES =			\
 	gthumb-histogram.c		\
 	gthumb-init.c			\
 	gthumb-info-bar.c		\
-	gthumb-module.c			\
 	gthumb-slide.c			\
 	gthumb-stock.c			\
 	gtk-utils.c			\
diff --git a/libgthumb/gthumb-module.c b/libgthumb/gthumb-module.c
deleted file mode 100644
index 2c6026a..0000000
--- a/libgthumb/gthumb-module.c
+++ /dev/null
@@ -1,115 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- *  GThumb
- *
- *  Copyright (C) 2001, 2003 The 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 <string.h>
-#include <glib.h>
-#include <gmodule.h>
-
-
-static struct {
-	char     *module_name;
-	char     *symbol_name;
-} symbol_module_table [] = {
-	{ "pngexporter",   "dlg_exporter" },
-	{ "webexporter",   "dlg_web_exporter" },
-	{ "search",        "dlg_search" },
-	{ "search",        "dlg_catalog_edit_search" },
-	{ "search",        "dlg_catalog_search" },
-	{ "jpegtran",      "dlg_jpegtran" },
-	{ "jpegtran",      "dlg_apply_jpegtran" },
-	{ "duplicates",    "dlg_duplicates" },
-	{ "photoimporter", "dlg_photo_importer" },
-	{ NULL, NULL }
-};
-
-
-static struct {
-	char    *module_name;
-	GModule *module;
-} module_table [] = {
-	{ "pngexporter", NULL },
-	{ "webexporter", NULL },
-	{ "search", NULL },
-	{ "jpegtran", NULL },
-	{ "duplicates", NULL },
-	{ "photoimporter", NULL },
-	{ NULL, NULL }
-};
-
-
-static GModule *
-get_module (const char *module_name)
-{
-	int i;
-
-	for (i = 0; module_table[i].module_name != NULL; i++)
-		if (strcmp (module_table[i].module_name, module_name) == 0) 
-			break;
-	
-	g_assert (module_table[i].module_name != NULL);
-	
-	if (module_table[i].module == NULL) {
-		char *filename = g_module_build_path (GTHUMB_MODULEDIR, module_table[i].module_name);
-		module_table[i].module = g_module_open (filename, G_MODULE_BIND_LAZY);
-		g_free (filename);
-	}
-	
-	return module_table[i].module;
-}
-
-
-static const char*
-get_module_name_from_symbol_name (const char *symbol_name) 
-{
-	int i;
-
-	for (i = 0; symbol_module_table[i].module_name != NULL; i++)
-		if (strcmp (symbol_module_table[i].symbol_name, symbol_name) == 0)
-			return symbol_module_table[i].module_name;
-
-	return NULL;
-}
-
-
-gboolean
-gthumb_module_get (const char  *symbol_name,
-		   gpointer    *symbol)
-{
-	const char *module_name;
-	GModule    *module;
-
-	if (! g_module_supported ())
-                return FALSE;
-
-	module_name = get_module_name_from_symbol_name (symbol_name);
-	if (module_name == NULL) 
-		return FALSE;
-
-	module = get_module (module_name);
-	if (module == NULL) {
-		g_warning ("Error, unable to open module file '%s'\n",
-                           g_module_error ());
-		return FALSE;
-	}
-
-	return g_module_symbol (module, symbol_name, symbol);
-}
diff --git a/libgthumb/gthumb-module.h b/libgthumb/gthumb-module.h
deleted file mode 100644
index da3e7bc..0000000
--- a/libgthumb/gthumb-module.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
-
-/*
- *  GThumb
- *
- *  Copyright (C) 2001, 2003 The 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.
- */
-
-#ifndef GTHUMB_MODULE_H
-#define GTHUMB_MODULE_H
-
-gboolean gthumb_module_get (const char  *symbol_name,
-			    gpointer    *symbol);
-
-#endif /* GTHUMB_MODULE_H */
diff --git a/libgthumb/jpegutils/Makefile.am b/libgthumb/jpegutils/Makefile.am
index 5cfe3c3..2574f9f 100644
--- a/libgthumb/jpegutils/Makefile.am
+++ b/libgthumb/jpegutils/Makefile.am
@@ -1,15 +1,9 @@
-if ENABLE_DEPRECATIONS
-DISABLE_DEPRECATED = -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED
-else
-DISABLE_DEPRECATED =
-endif
-
 INCLUDES = 				\
 	-I$(top_srcdir)/libgthumb	\
 	$(DISABLE_DEPRECATED)		\
+	$(WARNINGS)			\
 	$(GTHUMB_CFLAGS)
 
-
 noinst_LTLIBRARIES = libgthumb-jpegutils.la
 
 libgthumb_jpegutils_la_SOURCES =	\
diff --git a/src/Makefile.am b/src/Makefile.am
index 8f32f22..2e6d44a 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -3,24 +3,13 @@ DIST_SUBDIRS = icons
 
 gladedir = $(datadir)/gthumb/glade
 
-if ENABLE_DEPRECATIONS
-DISABLE_DEPRECATED = -DG_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGNOME_VFS_DISABLE_DEPRECATED -DGNOME_DISABLE_DEPRECATED
-else
-DISABLE_DEPRECATED =
-endif
-
-WARNINGS = -Wall -Wimplicit -Wunused-label \
-	   -Wpointer-arith -Wcast-align -Wtype-limits \
-	   -Wclobbered -Wempty-body -Wignored-qualifiers
-
 INCLUDES =					\
 	-I$(top_srcdir)/libgthumb		\
-	-I../libgthumb				\
 	$(GTHUMB_CFLAGS)			\
-	$(DISABLE_DEPRECATED)			\
 	$(GPHOTO_CFLAGS)			\
 	$(IGE_MAC_INTEGRATION_CFLAGS)		\
 	$(GTKUNIQUE_CFLAGS)			\
+	$(DISABLE_DEPRECATED)			\
 	$(WARNINGS)       			\
 	-DGTHUMB_PREFIX=\"$(prefix)\"		\
 	-DGTHUMB_SYSCONFDIR=\"$(sysconfdir)\"	\
@@ -149,7 +138,26 @@ gthumb_SOURCES = 				\
 	totem-scrsaver.c			\
 	totem-scrsaver.h			\
 	rotation-utils.c			\
-	rotation-utils.h
+	rotation-utils.h 			\
+	dlg-duplicates.c 			\
+	dlg-duplicates.h 			\
+	dlg-jpegtran.c 				\
+	dlg-jpegtran.h 				\
+	catalog-png-exporter.c			\
+	catalog-png-exporter.h			\
+	dlg-png-exporter.c			\
+	dlg-png-exporter.h 			\
+	dlg-search.c 				\
+	dlg-search.h 				\
+	albumtheme.c				\
+	albumtheme-private.c			\
+	albumtheme-private.h			\
+	catalog-web-exporter.c			\
+	catalog-web-exporter.h			\
+	dlg-web-exporter.c			\
+	dlg-web-exporter.h      		\
+	dlg-photo-importer.c    		\
+	dlg-photo-importer.h
 
 if PLATFORM_WIN32
 gthumb_LDFLAGS = -Wl,--export-all-symbols,--out-implib,.libs/gthumb.exe.a
@@ -164,59 +172,8 @@ gthumb_LDADD = 					\
 	$(RENDER_LIBS)				\
 	$(GPHOTO_LIBS)				\
 	$(IGE_MAC_INTEGRATION_LIBS)		\
-	$(XF86GAMMA_LIBS)			\
-	$(XTEST_LIBS)				\
-	$(GTKUNIQUE_LIBS)
-
-moduledir = $(libdir)/gthumb/modules
-module_LTLIBRARIES = 		\
-	libduplicates.la	\
-	libjpegtran.la		\
-	libpngexporter.la	\
-	libsearch.la		\
-	libwebexporter.la	\
-	libphotoimporter.la
-
-libduplicates_la_SOURCES = dlg-duplicates.c dlg-duplicates.h
-libduplicates_la_LDFLAGS = $(MODULE_LIBTOOL_FLAGS)
-libduplicates_la_LIBADD = $(top_builddir)/libgthumb/libgthumb.la $(JPEG_LIBS) $(PNG_LIBS) $(TIFF_LIBS) $(GTHUMB_LIBS)
-libduplicates_la_DEPENDENCIES = gthumb$(EXEEXT)
-
-libjpegtran_la_SOURCES = dlg-jpegtran.c dlg-jpegtran.h
-libjpegtran_la_LDFLAGS = $(MODULE_LIBTOOL_FLAGS)
-libjpegtran_la_LIBADD  = $(top_builddir)/libgthumb/jpegutils/libgthumb-jpegutils.la $(top_builddir)/libgthumb/libgthumb.la $(JPEG_LIBS) $(GTHUMB_LIBS)
-libjpegtran_la_DEPENDENCIES = gthumb$(EXEEXT)
-
-libpngexporter_la_SOURCES = 	\
-	catalog-png-exporter.c	\
-	catalog-png-exporter.h	\
-	dlg-png-exporter.c	\
-	dlg-png-exporter.h
-libpngexporter_la_LDFLAGS = $(MODULE_LIBTOOL_FLAGS)
-libpngexporter_la_LIBADD = $(top_builddir)/libgthumb/libgthumb.la $(GTHUMB_LIBS) $(PNG_LIBS)
-libpngexporter_la_DEPENDENCIES = gthumb$(EXEEXT)
-
-libsearch_la_SOURCES = dlg-search.c dlg-search.h
-libsearch_la_LDFLAGS = $(MODULE_LIBTOOL_FLAGS)
-libsearch_la_LIBADD = $(top_builddir)/libgthumb/libgthumb.la $(JPEG_LIBS) $(TIFF_LIBS) $(PNG_LIBS) $(GTHUMB_LIBS)
-libsearch_la_DEPENDENCIES = gthumb$(EXEEXT)
-
-libwebexporter_la_SOURCES = 	\
-	albumtheme.c		\
-	albumtheme-private.c	\
-	albumtheme-private.h	\
-	catalog-web-exporter.c	\
-	catalog-web-exporter.h	\
-	dlg-web-exporter.c	\
-	dlg-web-exporter.h
-libwebexporter_la_LDFLAGS = $(MODULE_LIBTOOL_FLAGS)
-libwebexporter_la_LIBADD = $(top_builddir)/libgthumb/libgthumb.la $(GTHUMB_LIBS)
-libwebexporter_la_DEPENDENCIES = gthumb$(EXEEXT)
+	$(XTEST_LIBS)
 
-libphotoimporter_la_SOURCES = dlg-photo-importer.c dlg-photo-importer.h
-libphotoimporter_la_LDFLAGS = $(MODULE_LIBTOOL_FLAGS)
-libphotoimporter_la_LIBADD  = $(top_builddir)/libgthumb/jpegutils/libgthumb-jpegutils.la $(top_builddir)/libgthumb/libgthumb.la $(GTHUMB_LIBS) $(JPEG_LIBS) $(GPHOTO_LIBS)
-libphotoimporter_la_DEPENDENCIES = gthumb$(EXEEXT)
 
 AUTHORS.tab : $(top_srcdir)/AUTHORS
 	sed -e 's/^/"/' -e 's/$$/",/' < $(top_srcdir)/AUTHORS > $  tmp
diff --git a/src/dlg-photo-importer.c b/src/dlg-photo-importer.c
index 011bda8..6d6d89b 100644
--- a/src/dlg-photo-importer.c
+++ b/src/dlg-photo-importer.c
@@ -2068,11 +2068,8 @@ dlg_photo_importer (GthBrowser *browser)
 
 	gtk_image_set_from_pixbuf (GTK_IMAGE (data->progress_camera_image), data->no_camera_pixbuf);
 
-printf ("delete_checkbutton\n");
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (data->delete_checkbutton), eel_gconf_get_boolean (PREF_PHOTO_IMPORT_DELETE, FALSE));
-printf ("reset_exif_tag_on_import_checkbutton\n");
 	gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (data->reset_exif_tag_on_import_checkbutton), eel_gconf_get_boolean (PREF_PHOTO_IMPORT_RESET_EXIF_ORIENTATION, TRUE));
-printf ("done\n");
 
 	default_path = eel_gconf_get_path (PREF_PHOTO_IMPORT_DESTINATION, NULL);
 	if ((default_path == NULL) || (*default_path == 0))
diff --git a/src/gth-browser-actions-callbacks.c b/src/gth-browser-actions-callbacks.c
index 0be1e53..cb78657 100644
--- a/src/gth-browser-actions-callbacks.c
+++ b/src/gth-browser-actions-callbacks.c
@@ -39,6 +39,7 @@
 #include "dlg-rename-series.h"
 #include "dlg-scale-series.h"
 #include "dlg-scripts.h"
+#include "dlg-search.h"
 #include "dlg-write-to-cd.h"
 #include "file-utils.h"
 #include "gconf-utils.h"
@@ -47,10 +48,11 @@
 #include "gth-folder-selection-dialog.h"
 #include "gth-viewer.h"
 #include "gth-window-utils.h"
-#include "gthumb-module.h"
 #include "gtk-utils.h"
 #include "main.h"
 #include "thumb-cache.h"
+#include "dlg-png-exporter.h"
+#include "dlg-web-exporter.h"
 
 #define MAX_NAME_LEN 1024
 #define DEF_CONFIRM_DEL TRUE
@@ -125,11 +127,7 @@ gth_browser_activate_action_file_camera_import (GtkAction  *action,
 						GthBrowser *browser)
 {
 #ifdef HAVE_LIBGPHOTO
-	void (*module) (GthBrowser *browser);
-
-	if (gthumb_module_get ("dlg_photo_importer", (gpointer*) &module))
-		(*module) (browser);
-
+        dlg_photo_importer (browser);
 #endif /*HAVE_LIBGPHOTO */
 }
 
@@ -619,13 +617,11 @@ gth_browser_activate_action_edit_catalog_edit_search (GtkAction  *action,
 						      GthBrowser *browser)
 {
 	char *catalog_path;
-	void (*module) (GthBrowser *browser, const char *catalog_path);
 
 	catalog_path = catalog_list_get_selected_path (gth_browser_get_catalog_list (browser));
 	if (catalog_path == NULL)
 		return;
-	if (gthumb_module_get ("dlg_catalog_edit_search", (gpointer*) &module))
-		(*module) (browser, catalog_path);
+        dlg_catalog_edit_search (browser, catalog_path);
 	g_free (catalog_path);
 }
 
@@ -635,13 +631,11 @@ gth_browser_activate_action_edit_catalog_redo_search (GtkAction  *action,
 						      GthBrowser *browser)
 {
 	char *catalog_path;
-	void (*module) (GthBrowser *window, const char *catalog_path);
 
 	catalog_path = catalog_list_get_selected_path (gth_browser_get_catalog_list (browser));
 	if (catalog_path == NULL)
 		return;
-	if (gthumb_module_get ("dlg_catalog_search", (gpointer*) &module))
-		(*module) (browser, catalog_path);
+        dlg_catalog_search (browser, catalog_path);
 	g_free (catalog_path);
 }
 
@@ -819,12 +813,10 @@ gth_browser_activate_action_edit_current_catalog_edit_search (GtkAction  *action
 							      GthBrowser *browser)
 {
 	const char *catalog_path = gth_browser_get_current_catalog (browser);
-	void (*module) (GthBrowser *browser, const char *catalog_path);
 
 	if (catalog_path == NULL)
 		return;
-	if (gthumb_module_get ("dlg_catalog_edit_search", (gpointer*) &module))
-		(*module) (browser, catalog_path);
+        dlg_catalog_edit_search (browser, catalog_path);
 }
 
 
@@ -833,12 +825,10 @@ gth_browser_activate_action_edit_current_catalog_redo_search (GtkAction  *action
 							      GthBrowser *browser)
 {
 	const char *catalog_path = gth_browser_get_current_catalog (browser);
-	void (*module) (GthBrowser *browser, const char *catalog_path);
 
 	if (catalog_path == NULL)
 		return;
-	if (gthumb_module_get ("dlg_catalog_search", (gpointer*) &module))
-		(*module) (browser, catalog_path);
+        dlg_catalog_search (browser, catalog_path);
 }
 
 
@@ -1729,10 +1719,7 @@ void
 gth_browser_activate_action_tools_find_images (GtkAction  *action,
 					       GthBrowser *browser)
 {
-	void (*module) (GtkWidget *widget, GthBrowser *browser);
-
-	if (gthumb_module_get ("dlg_search", (gpointer*) &module))
-		(*module) (NULL, browser);
+        dlg_search (NULL, browser);
 }
 
 
@@ -1740,10 +1727,7 @@ void
 gth_browser_activate_action_tools_index_image (GtkAction  *action,
 					       GthBrowser *browser)
 {
-	void (*module) (GthBrowser *browser);
-
-	if (gthumb_module_get ("dlg_exporter", (gpointer*) &module))
-		(*module) (browser);
+        dlg_exporter (browser);
 }
 
 
@@ -1751,10 +1735,7 @@ void
 gth_browser_activate_action_tools_web_exporter (GtkAction  *action,
 						GthBrowser *browser)
 {
-	void (*module) (GthBrowser *browser);
-
-	if (gthumb_module_get ("dlg_web_exporter", (gpointer*) &module))
-		(*module) (browser);
+        dlg_web_exporter (browser);
 }
 
 
@@ -1770,10 +1751,7 @@ void
 gth_browser_activate_action_tools_find_duplicates (GtkAction  *action,
 						   GthBrowser *browser)
 {
-	void (*module) (GthBrowser *browser);
-
-	if (gthumb_module_get ("dlg_duplicates", (gpointer*) &module))
-		(*module) (browser);
+        dlg_duplicates (browser);
 }
 
 
diff --git a/src/gth-window-actions-callbacks.c b/src/gth-window-actions-callbacks.c
index 8921e73..cf5e722 100644
--- a/src/gth-window-actions-callbacks.c
+++ b/src/gth-window-actions-callbacks.c
@@ -56,12 +56,12 @@
 #include "dlg-crop.h"
 #include "dlg-write-to-cd.h"
 #include "dlg-image-prop.h"
+#include "dlg-jpegtran.h"
 #include "gconf-utils.h"
 #include "gth-pixbuf-op.h"
 #include "gth-viewer.h"
 #include "gth-utils.h"
 #include "gthumb-error.h"
-#include "gthumb-module.h"
 #include "gtk-utils.h"
 #include "gth-file-view.h"
 #include "image-viewer.h"
@@ -955,10 +955,7 @@ void
 gth_window_activate_action_tools_jpeg_rotate (GtkAction *action,
 					      GthWindow *window)
 {
-	void (*module) (GthWindow *window);
-
-	if (gthumb_module_get ("dlg_jpegtran", (gpointer*) &module))
-		(*module) (window);
+        dlg_jpegtran (window);
 }
 
 
@@ -966,10 +963,7 @@ void
 gth_window_activate_action_tools_jpeg_rotate_right (GtkAction *action,
 						    GthWindow *window)
 {
-	void (*module) (GthWindow *, GthTransform);
-
-	if (gthumb_module_get ("dlg_apply_jpegtran", (gpointer*) &module))
-		(*module) (window, GTH_TRANSFORM_ROTATE_90);
+        dlg_apply_jpegtran (window, GTH_TRANSFORM_ROTATE_90);
 }
 
 
@@ -977,9 +971,6 @@ void
 gth_window_activate_action_tools_jpeg_rotate_left (GtkAction *action,
 						   GthWindow *window)
 {
-	void (*module) (GthWindow *, GthTransform);
-
-	if (gthumb_module_get ("dlg_apply_jpegtran", (gpointer*) &module))
-		(*module) (window, GTH_TRANSFORM_ROTATE_270);
+        dlg_apply_jpegtran (window, GTH_TRANSFORM_ROTATE_270);
 }
 



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