0.8.11claws145
authorChristoph Hohmann <reboot@gmx.ch>
Tue, 6 May 2003 20:43:42 +0000 (20:43 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Tue, 6 May 2003 20:43:42 +0000 (20:43 +0000)
* src/main.c
* src/plugins/image_viewer/viewer.c
        fix usage of imlib in imageviewer plugin

* src/gtk/prefswindow.c
        handle window close event correctly

ChangeLog.claws
configure.ac
src/gtk/prefswindow.c
src/main.c
src/plugins/image_viewer/viewer.c

index 59e7c533241452bcb1e86a2a86dc65139f623532..964c5d42fed5ef1bb96bfeb273c69993ff393a8c 100644 (file)
@@ -1,3 +1,12 @@
+2003-05-06 [christoph] 0.8.11claws145
+
+       * src/main.c
+       * src/plugins/image_viewer/viewer.c
+               fix usage of imlib in imageviewer plugin
+
+       * src/gtk/prefswindow.c
+               handle window close event correctly
+
 2003-05-06 [paul]      0.8.11claws144
 
        * src/common/ssl.c
index 916ca5d700d72afbd2354c0fbbba11c057f4d274..b2a44230c5c6131e4cd85dbf94f9e85e05676181 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=8
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=claws144
+EXTRA_VERSION=claws145
 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
 
 dnl set $target
@@ -412,7 +412,11 @@ if test x"$ac_cv_enable_image_viewer_plugin" = xyes; then
 fi
 AM_CONDITIONAL(BUILD_IMAGE_VIEWER_PLUGIN, test x"$ac_cv_enable_image_viewer_plugin" = xyes)
 if test x"$ac_cv_enable_image_viewer_plugin" = xyes; then
-       PLUGINS="image-viewer $PLUGINS"
+       if test "$ac_cv_enable_gdk_pixbuf" = yes; then
+               PLUGINS="image-viewer(gdk-pixbuf)"
+       elif test "$ac_cv_enable_imlib" = yes; then
+               PLUGINS="image-viewer(gdk_imlib)"
+       fi
 fi
 
 AC_ARG_ENABLE(dillo-viewer-plugin,
@@ -489,13 +493,6 @@ dnl Output the configuration summary
 echo ""
 echo "$PACKAGE $VERSION"
 echo ""
-if test "$ac_cv_enable_gdk_pixbuf" = yes; then
-       echo "image support : yes (gdk-pixbuf)"
-elif test "$ac_cv_enable_imlib" = yes; then
-       echo "image support : yes (gdk_imlib)"
-else
-       echo "image support : no"
-fi
 echo "GnuPG         : $ac_cv_enable_gpgme"
 echo "JPilot        : $ac_cv_enable_jpilot"
 echo "LDAP          : $ac_cv_enable_ldap"
index 1bba86954e3ef2ecc5df4ec98063cfabdabd953d..35cba419759e5492e6e635233117ce93568a8cd1 100644 (file)
@@ -25,6 +25,7 @@
 #include <gtk/gtk.h>
 
 #include "intl.h"
+#include "utils.h"
 #include "prefswindow.h"
 #include "gtkutils.h"
 
@@ -138,9 +139,9 @@ static void ok_button_released(GtkButton *button, gpointer user_data)
        g_free(prefswindow);
 }
 
-static void cancel_button_released(GtkButton *button, gpointer user_data)
+static void close_prefs_window(PrefsWindow *prefswindow)
 {
-       PrefsWindow *prefswindow = (PrefsWindow *) user_data;
+       debug_print("prefs window closed\n");
 
        gtk_widget_destroy(prefswindow->window);
        close_all_pages(prefswindow->prefs_pages);
@@ -148,6 +149,21 @@ static void cancel_button_released(GtkButton *button, gpointer user_data)
        g_free(prefswindow);
 }
 
+static void cancel_button_released(GtkButton *button, gpointer user_data)
+{
+       PrefsWindow *prefswindow = (PrefsWindow *) user_data;
+
+       close_prefs_window(prefswindow);
+}
+
+static gboolean window_closed(GtkWidget *widget, GdkEvent *event, gpointer user_data)
+{
+       PrefsWindow *prefswindow = (PrefsWindow *) user_data;
+
+       close_prefs_window(prefswindow);
+       return FALSE;
+}
+
 struct name_search
 {
        gchar *text;
@@ -266,6 +282,7 @@ void prefswindow_open(GSList *prefs_pages, gpointer data)
        gtk_signal_connect(GTK_OBJECT(prefswindow->ok_btn), "released", GTK_SIGNAL_FUNC(ok_button_released), prefswindow);
        gtk_signal_connect(GTK_OBJECT(prefswindow->cancel_btn), "released", GTK_SIGNAL_FUNC(cancel_button_released), prefswindow);
        gtk_signal_connect(GTK_OBJECT(prefswindow->apply_btn), "released", GTK_SIGNAL_FUNC(apply_button_released), prefswindow);
+       gtk_signal_connect(GTK_OBJECT(prefswindow->window), "delete_event", GTK_SIGNAL_FUNC(window_closed), prefswindow);
 
        gtk_widget_show_all(prefswindow->window);
 }
index fe2ccf50a344da58d60598d87897b0dfb41e8816..0d54030eb5798a094d7e23a7b4d3bf687cbbbcfa 100644 (file)
 #include <gtk/gtkmain.h>
 #include <gtk/gtkrc.h>
 
-#if HAVE_GDK_IMLIB
-#  include <gdk_imlib.h>
-#endif
-
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -208,12 +204,6 @@ int main(int argc, char *argv[])
                g_error(_("g_thread is not supported by glib.\n"));
 #endif
 
-#if HAVE_GDK_IMLIB
-       gdk_imlib_init();
-       gtk_widget_push_visual(gdk_imlib_get_visual());
-       gtk_widget_push_colormap(gdk_imlib_get_colormap());
-#endif
-
        /* parse gtkrc files */
        userrc = g_strconcat(get_home_dir(), G_DIR_SEPARATOR_S, ".gtkrc",
                             NULL);
index 7e20186f374b8ec450ad97df116e768cd7a384ef..66846d2b960cfb18ccb589144cbafc4dcabf882e 100644 (file)
@@ -289,6 +289,12 @@ MimeViewerFactory image_viewer_factory =
 
 void image_viewer_init(void)
 {
+#if HAVE_GDK_IMLIB
+       gdk_imlib_init();
+       gtk_widget_push_visual(gdk_imlib_get_visual());
+       gtk_widget_push_colormap(gdk_imlib_get_colormap());
+#endif
+
        mimeview_register_viewer_factory(&image_viewer_factory);
 }