2008-09-23 [colin] 3.5.0cvs123
authorColin Leroy <colin@colino.net>
Tue, 23 Sep 2008 16:13:10 +0000 (16:13 +0000)
committerColin Leroy <colin@colino.net>
Tue, 23 Sep 2008 16:13:10 +0000 (16:13 +0000)
* configure.ac
Add a --disable-dbus flag in case we want
no DBUS even if headers are available (like
for building gpg4win)
* src/filtering.c
* src/mainwindow.c
* src/prefs_logging.c
* src/common/utils.c
* src/plugins/pgpcore/sgpgme.c
* src/plugins/smime/claws.def
Windows fixes:
- disable filtering log (it's crashy for
  some reason)
- fix gmtime_r when time is -1 (before 01/01/70)
- add symbols for smime

ChangeLog
PATCHSETS
configure.ac
src/common/utils.c
src/filtering.c
src/mainwindow.c
src/plugins/pgpcore/sgpgme.c
src/plugins/smime/claws.def [new file with mode: 0644]
src/prefs_logging.c

index 84c1e70..46204ed 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,21 @@
+2008-09-23 [colin]     3.5.0cvs123
+
+       * configure.ac
+               Add a --disable-dbus flag in case we want
+               no DBUS even if headers are available (like
+               for building gpg4win)
+       * src/filtering.c
+       * src/mainwindow.c
+       * src/prefs_logging.c
+       * src/common/utils.c
+       * src/plugins/pgpcore/sgpgme.c
+       * src/plugins/smime/claws.def
+               Windows fixes:
+               - disable filtering log (it's crashy for
+                 some reason)
+               - fix gmtime_r when time is -1 (before 01/01/70)
+               - add symbols for smime
+
 2008-09-22 [colin]     3.5.0cvs122
 
        * src/common/utils.c
index be3e5a5..7159383 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.53.2.34 -r 1.53.2.35 po/POTFILES.in;  ) > 3.5.0cvs120.patchset
 ( cvs diff -u -r 1.9.2.63 -r 1.9.2.64 src/gtk/gtkaspell.c;  ) > 3.5.0cvs121.patchset
 ( cvs diff -u -r 1.61.2.87 -r 1.61.2.88 src/account.c;  cvs diff -u -r 1.382.2.478 -r 1.382.2.479 src/compose.c;  cvs diff -u -r 1.179.2.229 -r 1.179.2.230 src/imap.c;  cvs diff -u -r 1.83.2.143 -r 1.83.2.144 src/mimeview.c;  cvs diff -u -r 1.101.2.55 -r 1.101.2.56 src/news.c;  cvs diff -u -r 1.36.2.147 -r 1.36.2.148 src/common/utils.c;  ) > 3.5.0cvs122.patchset
+( cvs diff -u -r 1.654.2.3596 -r 1.654.2.3597 configure.ac;  cvs diff -u -r 1.60.2.46 -r 1.60.2.47 src/filtering.c;  cvs diff -u -r 1.274.2.273 -r 1.274.2.274 src/mainwindow.c;  cvs diff -u -r 1.1.2.15 -r 1.1.2.16 src/prefs_logging.c;  cvs diff -u -r 1.36.2.148 -r 1.36.2.149 src/common/utils.c;  cvs diff -u -r 1.1.2.52 -r 1.1.2.53 src/plugins/pgpcore/sgpgme.c;  diff -u /dev/null src/plugins/smime/claws.def;  ) > 3.5.0cvs123.patchset
index 63eee70..9a31936 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=5
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=122
+EXTRA_VERSION=123
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
@@ -750,17 +750,21 @@ fi
 dnl #######################################################################
 dnl # Check for D-Bus support
 dnl #######################################################################
-PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60, dbus-glib-1 >= 0.60],
-[
-       AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define if glib bindings of D-Bus are available])
-       enable_dbus_glib=yes
-],
-[
-       echo "D-Bus requirements not met. D-Bus support not activated."
-       enable_dbus_glib=no
-])
-AC_SUBST(DBUS_CFLAGS)
-AC_SUBST(DBUS_LIBS)
+AC_ARG_ENABLE(dbus, [  --disable-dbus    disable dbus support],,enable_dbus=yes)
+
+if test "x$enable_dbus" = "xyes"; then
+       PKG_CHECK_MODULES(DBUS, [dbus-1 >= 0.60, dbus-glib-1 >= 0.60],
+       [
+               AC_DEFINE(HAVE_DBUS_GLIB, 1, [Define if glib bindings of D-Bus are available])
+               enable_dbus_glib=yes
+       ],
+       [
+               echo "D-Bus requirements not met. D-Bus support not activated."
+               enable_dbus_glib=no
+       ])
+       AC_SUBST(DBUS_CFLAGS)
+       AC_SUBST(DBUS_LIBS)
+fi
 
 dnl #######################################################################
 dnl # Check for NetworkManager support
@@ -1097,6 +1101,7 @@ echo "Crash dialog      : $ac_cv_enable_crash_dialog"
 echo "Libgnomeprint     : $ac_cv_enable_gnomeprint"
 echo "GTK+ print support: $ac_cv_have_gtk210"
 echo "LibSM             : $ac_cv_enable_libsm"
+echo "DBUS              : $enable_dbus"
 echo "NetworkManager    : $enable_networkmanager_support"
 echo "Manual            : $ac_cv_enable_manual"
 echo "Plugins           : $PLUGINS"
index 2c500dc..6a72407 100644 (file)
@@ -3470,7 +3470,10 @@ time_t tzoffset_sec(time_t *now)
 #ifndef G_OS_WIN32
        struct tm buf1, buf2;
 #endif
-       
+#ifdef G_OS_WIN32
+       if (now && *now == -1)
+               return 0;
+#endif 
        gmt = *gmtime_r(now, &buf1);
        lt = localtime_r(now, &buf2);
 
@@ -3503,7 +3506,10 @@ gchar *tzoffset(time_t *now)
 #ifndef G_OS_WIN32
        struct tm buf1, buf2;
 #endif
-
+#ifdef G_OS_WIN32
+       if (now && *now == -1)
+               return 0;
+#endif
        gmt = *gmtime_r(now, &buf1);
        lt = localtime_r(now, &buf2);
 
index f73f5de..46ac609 100644 (file)
@@ -468,7 +468,7 @@ static gboolean filteringaction_apply(FilteringAction * action, MsgInfo * info)
                        gint errors = 0;
 
                        if (!addressbook_peek_folder_exists(action->destination, &book, &folder)) {
-                               g_warning("addressbook folder not found '%s'\n", action->destination);
+                               g_warning("addressbook folder not found '%s'\n", action->destination?action->destination:"(null)");
                                return FALSE;
                        }
                        if (!book) {
@@ -518,7 +518,7 @@ static gboolean filteringaction_apply(FilteringAction * action, MsgInfo * info)
                                g_slist_free(address_list);
                                end_address_completion();
                        } else {
-                               g_warning("header '%s' not set or empty\n", action->header);
+                               g_warning("header '%s' not set or empty\n", action->header?action->header:"(null)");
                        }
                        return (errors == 0);
                }
@@ -587,7 +587,7 @@ static gboolean filtering_match_condition(FilteringProp *filtering, MsgInfo *inf
                                                log_status_ok(LOG_DEBUG_FILTERING,
                                                                _("rule is account-based [id=%d, name='%s'], "
                                                                "matching the account currently used to retrieve messages\n"),
-                                                               ac_prefs->account_id, ac_prefs->account_name);
+                                                               ac_prefs->account_id, ac_prefs?ac_prefs->account_name:_("NON_EXISTENT"));
                                        }
                                }
                        }
@@ -851,7 +851,7 @@ gboolean filter_message_by_msginfo(GSList *flist, MsgInfo *info, PrefsAccount* a
 
        if (prefs_common.enable_filtering_debug) {
                gchar *tmp = _("undetermined");
-
+#ifndef G_OS_WIN32
                switch (context) {
                case FILTERING_INCORPORATION:
                        tmp = _("incorporation");
@@ -877,6 +877,9 @@ gboolean filter_message_by_msginfo(GSList *flist, MsgInfo *info, PrefsAccount* a
                        debug_filtering_session = FALSE;
                        break;
                }
+#else
+               debug_filtering_session = FALSE;
+#endif
                if (debug_filtering_session) {
                        gchar *file = procmsg_get_message_file_path(info);
                        gchar *spc = g_strnfill(LOG_TIME_LEN + 1, ' ');
index 54f06cb..18aabcb 100644 (file)
@@ -692,7 +692,9 @@ static GtkActionEntry mainwin_entries[] =
        {"Tools/SSLCertificates",               NULL, N_("SSL cer_tificates"), NULL, NULL, G_CALLBACK(ssl_manager_open_cb) }, 
 #endif
        /* {"Tools/---",                        NULL, "---", NULL, NULL, NULL }, */
+#ifndef G_OS_WIN32
        {"Tools/FilteringLog",                  NULL, N_("Filtering Lo_g"), NULL, NULL, G_CALLBACK(filtering_debug_window_show_cb) }, 
+#endif
        {"Tools/NetworkLog",                    NULL, N_("Network _Log"), "<shift><control>L", NULL, G_CALLBACK(log_window_show_cb) }, 
        /* {"Tools/---",                        NULL, "---", NULL, NULL, NULL }, */
        {"Tools/ForgetSessionPasswords",                NULL, N_("_Forget all session passwords"), NULL, NULL, G_CALLBACK(forget_session_passwords_cb) }, 
@@ -1852,7 +1854,9 @@ MainWindow *main_window_create()
        MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "SSLCertificates", "Tools/SSLCertificates", GTK_UI_MANAGER_MENUITEM)
 #endif
        MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "Separator7", "Tools/---", GTK_UI_MANAGER_SEPARATOR)
+#ifndef G_OS_WIN32
        MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "FilteringLog", "Tools/FilteringLog", GTK_UI_MANAGER_MENUITEM)
+#endif
        MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "NetworkLog", "Tools/NetworkLog", GTK_UI_MANAGER_MENUITEM)
        MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "Separator8", "Tools/---", GTK_UI_MANAGER_SEPARATOR)
        MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Tools", "ForgetSessionPasswords", "Tools/ForgetSessionPasswords", GTK_UI_MANAGER_MENUITEM)
index cebdfe6..e48fb44 100644 (file)
@@ -547,13 +547,15 @@ void sgpgme_init()
 #endif
                if (!gpgme_get_engine_info(&engineInfo)) {
                        while (engineInfo) {
+#ifndef G_OS_WIN32
                                debug_print("GpgME Protocol: %s\n"
                                            "Version: %s (req %s)\n"
                                            "Executable: %s\n",
-                                       gpgme_get_protocol_name(engineInfo->protocol),
+                                       gpgme_get_protocol_name(engineInfo->protocol) ? gpgme_get_protocol_name(engineInfo->protocol):"???",
                                        engineInfo->version ? engineInfo->version:"???",
                                        engineInfo->req_version ? engineInfo->req_version:"???",
                                        engineInfo->file_name ? engineInfo->file_name:"???");
+#endif
                                if (engineInfo->protocol == GPGME_PROTOCOL_OpenPGP
                                &&  gpgme_engine_check_version(engineInfo->protocol) != 
                                        GPG_ERR_NO_ERROR) {
diff --git a/src/plugins/smime/claws.def b/src/plugins/smime/claws.def
new file mode 100644 (file)
index 0000000..eec9eb5
--- /dev/null
@@ -0,0 +1,29 @@
+LIBRARY CLAWS-MAIL.EXE
+EXPORTS
+alertpanel_error
+canonicalize_file_replace
+canonicalize_str
+check_plugin_version
+claws_unlink
+debug_print_real
+debug_srcname
+file_read_stream_to_str
+file_read_to_str
+generate_mime_boundary
+get_mime_tmp_dir
+get_tmp_file
+my_tmpfile
+privacy_register_system
+privacy_set_error
+privacy_unregister_system
+procmime_decode_content
+procmime_encode_content
+procmime_get_part
+procmime_mimeinfo_free_all
+procmime_mimeinfo_get_parameter
+procmime_mimeinfo_new
+procmime_mimeinfo_parent
+procmime_scan_file
+procmime_write_mime_header
+procmime_write_mimeinfo
+str_write_to_file
index 8130d18..7f50d2a 100644 (file)
@@ -55,6 +55,7 @@ typedef struct _LoggingPage
        GtkWidget *checkbtn_log_warning;
        GtkWidget *checkbtn_log_error;
        GtkWidget *checkbtn_log_status;
+#ifndef G_OS_WIN32
        GtkWidget *checkbtn_clip_filtering_log;
        GtkWidget *spinbtn_filtering_log_length;
        GtkWidget *checkbtn_filtering_log;
@@ -64,6 +65,7 @@ typedef struct _LoggingPage
        GtkWidget *checkbtn_filtering_log_pre_proc;
        GtkWidget *checkbtn_filtering_log_post_proc;
        GtkWidget *optmenu_filtering_log_level;
+#endif
 } LoggingPage;
 
 static GtkWidget *prefs_logging_create_check_buttons(GtkWidget **checkbtn1,
@@ -96,6 +98,8 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *checkbtn_clip_network_log;
        GtkWidget *spinbtn_network_log_length;
        GtkObject *spinbtn_network_log_length_adj;
+       GtkWidget *hbox_checkbtn;
+#ifndef G_OS_WIN32
        GtkWidget *vbox1_filtering_log;
        GtkWidget *hbox_clip_filtering_log;
        GtkWidget *checkbtn_clip_filtering_log;
@@ -105,7 +109,6 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *checkbtn_filtering_log;
        GtkWidget *frame_filtering_log;
        GtkWidget *vbox2_filtering_log;
-       GtkWidget *hbox_checkbtn;
        GtkWidget *checkbtn_filtering_log_inc;
        GtkWidget *checkbtn_filtering_log_manual;
        GtkWidget *checkbtn_filtering_log_folder_proc;
@@ -114,8 +117,10 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *hbox_filtering_log_level;
        GtkWidget *label_filtering_log_level;
        GtkWidget *optmenu_filtering_log_level;
+       GtkSizeGroup *filter_size_group;
        GtkListStore *menu;
        GtkTreeIter iter;
+#endif
        GtkWidget *frame_disk_log;
        GtkWidget *vbox_disk_log;
        GtkWidget *label;
@@ -125,7 +130,6 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        GtkWidget *checkbtn_log_error;
        GtkWidget *checkbtn_log_status;
        GtkSizeGroup *log_size_group;
-       GtkSizeGroup *filter_size_group;
        CLAWS_TIP_DECL();
        
        vbox1 = gtk_vbox_new (FALSE, VSPACING);
@@ -161,6 +165,7 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        SET_TOGGLE_SENSITIVITY(checkbtn_clip_network_log, spinbtn_network_log_length);
        SET_TOGGLE_SENSITIVITY(checkbtn_clip_network_log, label);
 
+#ifndef G_OS_WIN32
        /* Filtering/processing debug log */
        vbox1_filtering_log = gtkut_get_options_frame(vbox1,
                                &frame_logging, _("Filtering/processing log"));
@@ -270,7 +275,7 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        SET_TOGGLE_SENSITIVITY(checkbtn_filtering_log, optmenu_filtering_log_level);
        SET_TOGGLE_SENSITIVITY(checkbtn_filtering_log, checkbtn_clip_filtering_log);
        SET_TOGGLE_SENSITIVITY(checkbtn_filtering_log, label_filtering_log_level);
-
+#endif
        /* disk log */
        vbox_disk_log = gtkut_get_options_frame(vbox1, &frame_disk_log, _("Disk log"));
 
@@ -297,8 +302,10 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
 
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_clip_network_log), 
                prefs_common.cliplog);
+#ifndef G_OS_WIN32
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_clip_filtering_log), 
                prefs_common.filtering_debug_cliplog);
+#endif
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_log_standard), 
                prefs_common.enable_log_standard);
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_log_warning), 
@@ -307,6 +314,7 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
                prefs_common.enable_log_error);
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_log_status), 
                prefs_common.enable_log_status);
+#ifndef G_OS_WIN32
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_filtering_log), 
                prefs_common.enable_filtering_debug);
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_filtering_log_inc), 
@@ -319,14 +327,15 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
                prefs_common.enable_filtering_debug_pre_proc);
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(checkbtn_filtering_log_post_proc), 
                prefs_common.enable_filtering_debug_post_proc);
-
+#endif
        gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbtn_network_log_length),
                prefs_common.loglength);
+#ifndef G_OS_WIN32
        gtk_spin_button_set_value(GTK_SPIN_BUTTON(spinbtn_filtering_log_length),
                prefs_common.filtering_debug_loglength);
-
        combobox_select_by_data(GTK_COMBO_BOX(optmenu_filtering_log_level),
                        prefs_common.filtering_debug_level);
+#endif
 
        prefs_logging->checkbtn_clip_network_log = checkbtn_clip_network_log;
        prefs_logging->spinbtn_network_log_length = spinbtn_network_log_length;
@@ -334,6 +343,7 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        prefs_logging->checkbtn_log_warning = checkbtn_log_warning;
        prefs_logging->checkbtn_log_error = checkbtn_log_error;
        prefs_logging->checkbtn_log_status = checkbtn_log_status;
+#ifndef G_OS_WIN32
        prefs_logging->checkbtn_clip_filtering_log = checkbtn_clip_filtering_log;
        prefs_logging->spinbtn_filtering_log_length = spinbtn_filtering_log_length;
        prefs_logging->checkbtn_filtering_log = checkbtn_filtering_log;
@@ -343,7 +353,7 @@ static void prefs_logging_create_widget(PrefsPage *_page, GtkWindow *window,
        prefs_logging->checkbtn_filtering_log_pre_proc = checkbtn_filtering_log_pre_proc;
        prefs_logging->checkbtn_filtering_log_post_proc = checkbtn_filtering_log_post_proc;
        prefs_logging->optmenu_filtering_log_level = optmenu_filtering_log_level;
-
+#endif
        prefs_logging->page.widget = vbox1;
 }
 
@@ -351,10 +361,11 @@ static void prefs_logging_save(PrefsPage *_page)
 {
        LoggingPage *page = (LoggingPage *) _page;
        MainWindow *mainwindow;
+#ifndef G_OS_WIN32
        gboolean filtering_debug_enabled;
-
        prefs_common.filtering_debug_level =
                combobox_get_active_data(GTK_COMBO_BOX(page->optmenu_filtering_log_level));
+#endif
 
        prefs_common.cliplog = gtk_toggle_button_get_active(
                GTK_TOGGLE_BUTTON(page->checkbtn_clip_network_log));
@@ -368,6 +379,7 @@ static void prefs_logging_save(PrefsPage *_page)
                GTK_TOGGLE_BUTTON(page->checkbtn_log_error));
        prefs_common.enable_log_status = gtk_toggle_button_get_active(
                GTK_TOGGLE_BUTTON(page->checkbtn_log_status));
+#ifndef G_OS_WIN32
        prefs_common.filtering_debug_cliplog = gtk_toggle_button_get_active(
                GTK_TOGGLE_BUTTON(page->checkbtn_clip_filtering_log));
        prefs_common.filtering_debug_loglength = gtk_spin_button_get_value_as_int(
@@ -391,12 +403,14 @@ static void prefs_logging_save(PrefsPage *_page)
                GTK_TOGGLE_BUTTON(page->checkbtn_filtering_log_pre_proc));
        prefs_common.enable_filtering_debug_post_proc = gtk_toggle_button_get_active(
                GTK_TOGGLE_BUTTON(page->checkbtn_filtering_log_post_proc));
-
+#endif
        mainwindow = mainwindow_get_mainwindow();
        log_window_set_clipping(mainwindow->logwin, prefs_common.cliplog,
                                prefs_common.loglength);
+#ifndef G_OS_WIN32
        log_window_set_clipping(mainwindow->filtering_debugwin, prefs_common.filtering_debug_cliplog,
                                prefs_common.filtering_debug_loglength);
+#endif
 }
 
 static void prefs_logging_destroy_widget(PrefsPage *_page)