2005-07-06 [colin] 1.9.12cvs24
authorColin Leroy <colin@colino.net>
Wed, 6 Jul 2005 18:22:55 +0000 (18:22 +0000)
committerColin Leroy <colin@colino.net>
Wed, 6 Jul 2005 18:22:55 +0000 (18:22 +0000)
* configure.ac
* src/account.c
* src/folder.c
* src/imap.c
* src/etpan/etpan-log.c
* src/etpan/etpan-thread-manager.c
* src/etpan/imap-thread.c
Add a --disable-libetpan parameter. With this,
users that don't want IMAP4 support can avoid
the new dependancy (and have no IMAP support).
Users that have IMAP4 accounts and use this
parameter won't lose their configuration, their
IMAP accounts will just be invisible and not
used.
* src/textview.c
Make the "Copy ..." contextual menu items
copy to both the X clipboard and the gtk
clipboard - as most other apps do.
* src/gtk/about.c
Add a notice about OpenSSL usage, in order to
comply with OpenSSL's license (point 6):
http://www.openssl.org/source/license.html

ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/account.c
src/etpan/etpan-log.c
src/etpan/etpan-thread-manager.c
src/etpan/imap-thread.c
src/folder.c
src/gtk/about.c
src/imap.c
src/textview.c

index d5539a0760dcf5032e40af5d17945b378fdc1e25..e28251a68086b1a49565e96f297c6dcab6d507b2 100644 (file)
@@ -1,3 +1,28 @@
+2005-07-06 [colin]     1.9.12cvs24
+
+       * configure.ac
+       * src/account.c
+       * src/folder.c
+       * src/imap.c
+       * src/etpan/etpan-log.c
+       * src/etpan/etpan-thread-manager.c
+       * src/etpan/imap-thread.c
+               Add a --disable-libetpan parameter. With this,
+               users that don't want IMAP4 support can avoid
+               the new dependancy (and have no IMAP support).
+               Users that have IMAP4 accounts and use this
+               parameter won't lose their configuration, their
+               IMAP accounts will just be invisible and not
+               used.
+       * src/textview.c
+               Make the "Copy ..." contextual menu items 
+               copy to both the X clipboard and the gtk 
+               clipboard - as most other apps do.
+       * src/gtk/about.c
+               Add a notice about OpenSSL usage, in order to
+               comply with OpenSSL's license (point 6):
+               http://www.openssl.org/source/license.html
+
 2005-07-06 [colin]     1.9.12cvs23
 
        * src/alertpanel.c
index e1249cd4da2537a84fa5afdcc700b07f8774c249..043c729fa98be0865d089ad4ad4a1a007ec1b285 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.1.4.4 -r 1.1.4.5 src/plugins/trayicon/libeggtrayicon/eggtrayicon.c;  ) > 1.9.12cvs21.patchset
 ( cvs diff -u -r 1.179.2.46 -r 1.179.2.47 src/imap.c;  ) > 1.9.12cvs22.patchset
 ( cvs diff -u -r 1.17.2.15 -r 1.17.2.16 src/alertpanel.c;  cvs diff -u -r 1.382.2.140 -r 1.382.2.141 src/compose.c;  cvs diff -u -r 1.1.2.14 -r 1.1.2.15 src/imap_gtk.c;  cvs diff -u -r 1.2.2.7 -r 1.2.2.8 src/mh_gtk.c;  ) > 1.9.12cvs23.patchset
+( cvs diff -u -r 1.654.2.658 -r 1.654.2.659 configure.ac;  cvs diff -u -r 1.61.2.27 -r 1.61.2.28 src/account.c;  cvs diff -u -r 1.213.2.39 -r 1.213.2.40 src/folder.c;  cvs diff -u -r 1.179.2.47 -r 1.179.2.48 src/imap.c;  cvs diff -u -r 1.96.2.59 -r 1.96.2.60 src/textview.c;  cvs diff -u -r 1.1.4.2 -r 1.1.4.3 src/etpan/etpan-log.c;  cvs diff -u -r 1.1.4.2 -r 1.1.4.3 src/etpan/etpan-thread-manager.c;  cvs diff -u -r 1.1.4.3 -r 1.1.4.4 src/etpan/imap-thread.c;  cvs diff -u -r 1.4.2.12 -r 1.4.2.13 src/gtk/about.c;  ) > 1.9.12cvs24.patchset
index 341f823fa8cc2a445ae036069c9b04c54fa88a20..48f66200e412087a3b684bbab6da433e8de0c637 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=12
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=23
+EXTRA_VERSION=24
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
@@ -614,32 +614,38 @@ AC_SUBST(CLAMAV_LIBS)
 AM_CONDITIONAL(BUILD_CLAMAV_PLUGIN, test x"$ac_cv_enable_clamav_plugin" = xyes)
 
 dnl Libetpan
-libetpan=no
-AC_PATH_PROG(libetpanconfig, [libetpan-config])
-if test "x$libetpanconfig" != "x"; then
-  CPPFLAGS="$CPPFLAGS `$libetpanconfig --cflags 2>/dev/null`"
-  AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan=yes])
-  if test "x$libetpan" = "xyes"; then
-    AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
-    LDFLAGS="$LDFLAGS `$libetpanconfig --libs 2>/dev/null`"
-    AC_TRY_LINK([], [db_mailstorage_init();], [libetpan=yes], [libetpan=no])
-    AC_MSG_RESULT([$libetpan])
-  fi
-fi
-if test "x$libetpan" = "xyes"; then
-   LIBETPAN_CPPFLAGS="`$libetpanconfig --cflags`"
-   LIBETPAN_LIBS="`$libetpanconfig --libs`"
-   LIBETPAN_VERSION=`$libetpanconfig --version | sed "s/\.//g" | sed "s/-.*$//"`
-   if test "$LIBETPAN_VERSION" -lt "037"; then
-       AC_MSG_ERROR([Sylpheed requires libetpan 0.37 or newer. See http://www.etpan.org/])
-   fi
-else
-   AC_MSG_ERROR([Sylpheed requires libetpan 0.37 or newer. See http://www.etpan.org/ ])
+AC_ARG_ENABLE(libetpan,
+       [  --disable-libetpan           Do not compile IMAP4 support with libetpan],
+       [ac_cv_enable_libetpan=$enableval], [ac_cv_enable_libetpan=yes])
+if test x"$ac_cv_enable_libetpan" = xyes; then
+       libetpan_result=no
+       AC_PATH_PROG(libetpanconfig, [libetpan-config])
+       if test "x$libetpanconfig" != "x"; then
+         CPPFLAGS="$CPPFLAGS `$libetpanconfig --cflags 2>/dev/null`"
+         AC_CHECK_HEADER(libetpan/libetpan.h, [libetpan_result=yes])
+         if test "x$libetpan_result" = "xyes"; then
+           AC_MSG_CHECKING([whether libetpan-config hints compiles and links fine])
+           LDFLAGS="$LDFLAGS `$libetpanconfig --libs 2>/dev/null`"
+           AC_TRY_LINK([], [db_mailstorage_init();], [libetpan_result=yes], [libetpan_result=no])
+           AC_MSG_RESULT([$libetpan_result])
+         fi
+       fi
+       if test "x$libetpan_result" = "xyes"; then
+          LIBETPAN_CPPFLAGS="`$libetpanconfig --cflags`"
+          LIBETPAN_LIBS="`$libetpanconfig --libs`"
+          LIBETPAN_VERSION=`$libetpanconfig --version | sed "s/\.//g" | sed "s/-.*$//"`
+          if test "$LIBETPAN_VERSION" -lt "037"; then
+               AC_MSG_ERROR([Sylpheed requires libetpan 0.37 or newer. See http://www.etpan.org/])
+               AC_MSG_ERROR([You can use --disable-libetpan if you don't need IMAP4 support.])
+          fi
+          AC_SUBST(LIBETPAN_FLAGS)
+          AC_SUBST(LIBETPAN_LIBS)
+          AC_DEFINE(HAVE_LIBETPAN, 1, Define if you want IMAP support.)
+       else
+          AC_MSG_ERROR([Sylpheed requires libetpan 0.37 or newer. See http://www.etpan.org/ ])
+          AC_MSG_ERROR([You can use --disable-libetpan if you don't need IMAP4 support.])
+       fi
 fi
-
-AC_SUBST(LIBETPAN_FLAGS)
-AC_SUBST(LIBETPAN_LIBS)
-
 dnl ****************************
 dnl ** Final configure output **
 dnl ****************************
@@ -694,6 +700,7 @@ echo "iconv         : $am_cv_func_iconv"
 echo "compface      : $ac_cv_enable_compface"
 echo "IPv6          : $ac_cv_enable_ipv6"
 echo "GNU/aspell    : $ac_cv_enable_aspell"
+echo "IMAP4         : $ac_cv_enable_libetpan"
 echo "Crash dialog  : $ac_cv_enable_crash_dialog"
 echo "Plugins       : $PLUGINS"
 echo "Config dir    : $ac_cv_with_config_dir"
index fd6e7336737d4453829431156ce277394f30e96e..566fde42521bdda3029e4fd7509f8fd44db5fe67 100644 (file)
@@ -412,7 +412,10 @@ void account_add(void)
                        folder = folder_new(folder_get_class_from_string("news"), ac_prefs->account_name,
                                            ac_prefs->nntp_server);
                }
-
+               if (folder == NULL) {
+                       alertpanel_error(_("Can't create folder."));
+                       return;
+               }
                folder->account = ac_prefs;
                ac_prefs->folder = folder;
                folder_add(folder);
@@ -495,7 +498,8 @@ void account_set_missing_folder(void)
                                folder = folder_new(folder_get_class_from_string("news"), ap->account_name,
                                                    ap->nntp_server);
                        }
-
+                       if (folder == NULL)
+                               return;
                        folder->account = ap;
                        ap->folder = folder;
                        folder_add(folder);
index 5d4598175cf1f5c49eb0ba2dbf9afd265773c6b7..83d4547eed6b1cfec07df27fd07c1449e541f9ab 100644 (file)
@@ -1,3 +1,9 @@
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#ifdef HAVE_LIBETPAN
+
 #include "etpan-log.h"
 
 #include <pthread.h>
@@ -185,3 +191,4 @@ void etpan_log_stack(void)
 
 #endif
 #endif
+#endif
index c530e0a1dc6df906c030581e2cff69df50010c19..37a1daaab01e7b73e5e34af95aeed7ddef8265a3 100644 (file)
@@ -1,3 +1,9 @@
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#ifdef HAVE_LIBETPAN
+
 #include "etpan-thread-manager.h"
 
 #include <stdlib.h>
@@ -631,3 +637,4 @@ void etpan_thread_manager_join(struct etpan_thread_manager * manager)
     etpan_thread_manager_loop(manager);
   }
 }
+#endif
index 45ae45e00f3fb500ef68c980b2b9ba9b7153676f..b7d00265bef84f14c5ecd2610f58a05ff226f2fb 100644 (file)
@@ -1,3 +1,9 @@
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#ifdef HAVE_LIBETPAN
+
 #include "imap-thread.h"
 
 #include <sys/types.h>
@@ -2167,3 +2173,16 @@ int imap_threaded_connect_cmd(Folder * folder, const char * command,
        
        return result.error;
 }
+#else
+
+void imap_main_init(void)
+{
+}
+void imap_main_done(void)
+{
+}
+void imap_main_set_timeout(int sec)
+{
+}
+
+#endif
index 2ed20e153c6e7eb7515ef826af1e715d661aa3a2..97ef715c403db387df8b05273e5702b981def8ea 100644 (file)
@@ -156,6 +156,9 @@ Folder *folder_new(FolderClass *klass, const gchar *name, const gchar *path)
 
        /* Create root folder item */
        item = folder_item_new(folder, name, NULL);
+       if (item == NULL) {
+               return NULL;
+       }
        item->folder = folder;
        folder->node = item->node = g_node_new(item);
        folder->data = NULL;
@@ -257,7 +260,9 @@ XMLTag *folder_get_xml(Folder *folder)
 FolderItem *folder_item_new(Folder *folder, const gchar *name, const gchar *path)
 {
        FolderItem *item = NULL;
-
+       
+       g_return_val_if_fail(folder != NULL, NULL);
+       
        if (folder->klass->item_new) {
                item = folder->klass->item_new(folder);
        } else {
index d6a238b5e5dabfc5b515319b2d9d544b09f90355..40ff23c0ef95a5cfd6eedd9be9417427bae5ef55 100644 (file)
@@ -239,7 +239,11 @@ static void about_create(void)
                  "along with this program; if not, write to the Free Software "
                  "Foundation, Inc., 59 Temple Place - Suite 330, Boston, "
                  "MA 02111-1307, USA."), -1);
-
+#ifdef USE_OPENSSL
+       gtk_text_buffer_insert(buffer, &iter,
+               _("\n\nThis product includes software developed by the OpenSSL Project "
+                 "for use in the OpenSSL Toolkit (http://www.openssl.org/)"), -1);
+#endif
        gtkut_stock_button_set_create(&confirm_area, &close_button, GTK_STOCK_CLOSE,
                                      NULL, NULL, NULL, NULL);
        gtk_box_pack_end(GTK_BOX(vbox1), confirm_area, FALSE, FALSE, 4);
index 753edb30adb034bd57f00604ed823fb076fc4d31..54a185b40c74735173f4b7815ade1bb00ae6606b 100644 (file)
 #include <glib/gi18n.h>
 #include <stdio.h>
 #include <string.h>
+#include "imap.h"
+#include "imap_gtk.h"
+
+#ifdef HAVE_LIBETPAN
+
 #include <stdlib.h>
 #include <dirent.h>
 #include <unistd.h>
@@ -44,8 +49,6 @@
 #include "folder.h"
 #include "session.h"
 #include "procmsg.h"
-#include "imap.h"
-#include "imap_gtk.h"
 #include "socket.h"
 #include "recv.h"
 #include "procheader.h"
@@ -3752,3 +3755,47 @@ static struct mailimap_flag_list * imap_flag_to_lep(IMAPFlags flags)
        
        return flag_list;
 }
+#else /* HAVE_LIBETPAN */
+
+static FolderClass imap_class;
+
+static Folder  *imap_folder_new        (const gchar    *name,
+                                        const gchar    *path)
+{
+       return NULL;
+}
+static gint    imap_create_tree        (Folder         *folder)
+{
+       return -1;
+}
+static FolderItem *imap_create_folder  (Folder         *folder,
+                                        FolderItem     *parent,
+                                        const gchar    *name)
+{
+       return NULL;
+}
+static gint    imap_rename_folder      (Folder         *folder,
+                                        FolderItem     *item, 
+                                        const gchar    *name)
+{
+       return -1;
+}
+
+FolderClass *imap_get_class(void)
+{
+       if (imap_class.idstr == NULL) {
+               imap_class.type = F_IMAP;
+               imap_class.idstr = "imap";
+               imap_class.uistr = "IMAP4";
+
+               imap_class.new_folder = imap_folder_new;
+               imap_class.create_tree = imap_create_tree;
+               imap_class.create_folder = imap_create_folder;
+               imap_class.rename_folder = imap_rename_folder;
+               /* nothing implemented */
+       }
+
+       return &imap_class;
+}
+
+#endif
index 1997e4a2c8ec507066a7c81b1a4a1f0cf741d6ba..2756dad49d151ac9c1181b91b1d8bc6a48e08ceb 100644 (file)
@@ -2323,7 +2323,8 @@ static void copy_uri_cb   (TextView *textview, guint action, void *data)
        if (uri == NULL)
                return;
 
-       gtk_clipboard_set_text(gtk_clipboard_get(GDK_NONE), uri->uri, -1);
+       gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), uri->uri, -1);
+       gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), uri->uri, -1);
        g_object_set_data(G_OBJECT(textview->link_popup_menu), "menu_button",
                          NULL);
 }
@@ -2375,7 +2376,8 @@ static void copy_mail_to_uri_cb   (TextView *textview, guint action, void *data)
        if (uri == NULL)
                return;
 
-       gtk_clipboard_set_text(gtk_clipboard_get(GDK_NONE), uri->uri + 7, -1);
+       gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_PRIMARY), uri->uri +7, -1);
+       gtk_clipboard_set_text(gtk_clipboard_get(GDK_SELECTION_CLIPBOARD), uri->uri +7, -1);
        g_object_set_data(G_OBJECT(textview->mail_popup_menu), "menu_button",
                          NULL);
 }