2005-06-01 [colin] 1.9.11cvs31
authorColin Leroy <colin@colino.net>
Wed, 1 Jun 2005 17:44:37 +0000 (17:44 +0000)
committerColin Leroy <colin@colino.net>
Wed, 1 Jun 2005 17:44:37 +0000 (17:44 +0000)
* src/addrharvest.c
* src/compose.c
* src/mbox.c
* src/mbox.h
* src/mh.c
* src/msgcache.c
* src/send_message.c
* src/setup.c
* src/undo.c
* src/common/hooks.c
* src/common/prefs.c
* src/common/template.c
* src/common/utils.c
* src/gtk/gtkutils.c
* src/gtk/inputdialog.c
* src/gtk/menu.c
* src/gtk/pluginwindow.c
* src/gtk/prefswindow.c
* src/plugins/pgpmime/passphrase.c
* src/plugins/pgpmime/prefs_gpg.c
More -Wall fixes

* src/common/Makefile.am
* src/common/timing.h
Add basic timing code

* src/summaryview.c
Fix a bug with unread messages when
re-sorting folders, and by the way
fix a big performance hit when
re-sorting (10k mails: before 5s,
after .5s)

* src/prefs_compose_writing.c
* src/prefs_compose_writing.h
* src/prefs_message.c
* src/prefs_message.h
* src/prefs_other.c
* src/prefs_other.h
* src/prefs_quote.c
* src/prefs_quote.h
* src/prefs_receive.c
* src/prefs_receive.h
* src/prefs_send.c
* src/prefs_send.h
* src/prefs_summaries.c
* src/prefs_summaries.h
Fix copyright banner

40 files changed:
ChangeLog-gtk2.claws
PATCHSETS
configure.ac
src/addrharvest.c
src/common/Makefile.am
src/common/hooks.c
src/common/prefs.c
src/common/template.c
src/common/timing.h [new file with mode: 0644]
src/common/utils.c
src/compose.c
src/gtk/gtkutils.c
src/gtk/inputdialog.c
src/gtk/menu.c
src/gtk/pluginwindow.c
src/gtk/prefswindow.c
src/mbox.c
src/mbox.h
src/mh.c
src/msgcache.c
src/plugins/pgpmime/passphrase.c
src/plugins/pgpmime/prefs_gpg.c
src/prefs_compose_writing.c
src/prefs_compose_writing.h
src/prefs_message.c
src/prefs_message.h
src/prefs_other.c
src/prefs_other.h
src/prefs_quote.c
src/prefs_quote.h
src/prefs_receive.c
src/prefs_receive.h
src/prefs_send.c
src/prefs_send.h
src/prefs_summaries.c
src/prefs_summaries.h
src/send_message.c
src/setup.c
src/summaryview.c
src/undo.c

index eaceb8c8af4cde13f734ac676c7071828e38c485..2e02db9598628d5ce8e663b039b0d909161aa9a7 100644 (file)
@@ -1,3 +1,54 @@
+2005-06-01 [colin]     1.9.11cvs31
+
+       * src/addrharvest.c
+       * src/compose.c
+       * src/mbox.c
+       * src/mbox.h
+       * src/mh.c
+       * src/msgcache.c
+       * src/send_message.c
+       * src/setup.c
+       * src/undo.c
+       * src/common/hooks.c
+       * src/common/prefs.c
+       * src/common/template.c
+       * src/common/utils.c
+       * src/gtk/gtkutils.c
+       * src/gtk/inputdialog.c
+       * src/gtk/menu.c
+       * src/gtk/pluginwindow.c
+       * src/gtk/prefswindow.c
+       * src/plugins/pgpmime/passphrase.c
+       * src/plugins/pgpmime/prefs_gpg.c
+               More -Wall fixes
+
+       * src/common/Makefile.am
+       * src/common/timing.h
+               Add basic timing code
+
+       * src/summaryview.c
+               Fix a bug with unread messages when 
+               re-sorting folders, and by the way
+               fix a big performance hit when 
+               re-sorting (10k mails: before 5s,
+               after .5s)
+
+       * src/prefs_compose_writing.c
+       * src/prefs_compose_writing.h
+       * src/prefs_message.c
+       * src/prefs_message.h
+       * src/prefs_other.c
+       * src/prefs_other.h
+       * src/prefs_quote.c
+       * src/prefs_quote.h
+       * src/prefs_receive.c
+       * src/prefs_receive.h
+       * src/prefs_send.c
+       * src/prefs_send.h
+       * src/prefs_summaries.c
+       * src/prefs_summaries.h
+               Fix copyright banner
+
 2005-06-01 [paul]      1.9.11cvs30
 
        * po/fi.po
index 68957d39737b060070d8cc0899ae85e2767a555d..6fa48ebdb1d410f6d448a0565c216619f2dcdad8 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.155.2.25 -r 1.155.2.26 src/Makefile.am;  cvs diff -u -r 1.61.2.25 -r 1.61.2.26 src/account.c;  cvs diff -u -r 1.12.2.22 -r 1.12.2.23 src/action.c;  cvs diff -u -r 1.27.2.10 -r 1.27.2.11 src/addr_compl.c;  cvs diff -u -r 1.60.2.15 -r 1.60.2.16 src/addressbook.c;  cvs diff -u -r 1.65.2.28 -r 1.65.2.29 src/codeconv.c;  cvs diff -u -r 1.382.2.124 -r 1.382.2.125 src/compose.c;  cvs diff -u -r 1.8.2.7 -r 1.8.2.8 src/export.c;  cvs diff -u -r 1.213.2.28 -r 1.213.2.29 src/folder.c;  cvs diff -u -r 1.207.2.38 -r 1.207.2.39 src/folderview.c;  cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/image_viewer.c;  cvs diff -u -r 1.115.2.37 -r 1.115.2.38 src/main.c;  cvs diff -u -r 1.274.2.39 -r 1.274.2.40 src/mainwindow.c;  cvs diff -u -r 1.94.2.51 -r 1.94.2.52 src/messageview.c;  cvs diff -u -r 1.83.2.32 -r 1.83.2.33 src/mimeview.c;  cvs diff -u -r 1.16.2.17 -r 1.16.2.18 src/msgcache.c;  cvs diff -u -r 1.105.2.23 -r 1.105.2.24 src/prefs_account.c;  cvs diff -u -r 1.60.2.15 -r 1.60.2.16 src/prefs_actions.c;  cvs diff -u -r 1.204.2.44 -r 1.204.2.45 src/prefs_common.c;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_compose_writing.c;  cvs diff -u -r 1.16.2.9 -r 1.16.2.10 src/prefs_customheader.c;  cvs diff -u -r 1.3.2.5 -r 1.3.2.6 src/prefs_ext_prog.c;  cvs diff -u -r 1.59.2.18 -r 1.59.2.19 src/prefs_filtering.c;  cvs diff -u -r 1.1.4.14 -r 1.1.4.15 src/prefs_filtering_action.c;  cvs diff -u -r 1.4.2.9 -r 1.4.2.10 src/prefs_fonts.c;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_image_viewer.c;  diff -u /dev/null src/prefs_message.c;  diff -u /dev/null src/prefs_message.h;  cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/prefs_msg_colors.c;  diff -u /dev/null src/prefs_other.c;  diff -u /dev/null src/prefs_other.h;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_quote.c;  diff -u /dev/null src/prefs_receive.c;  diff -u /dev/null src/prefs_receive.h;  diff -u /dev/null src/prefs_send.c;  diff -u /dev/null src/prefs_send.h;  cvs diff -u -r 1.5.2.7 -r 1.5.2.8 src/prefs_spelling.c;  cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/prefs_summaries.c;  cvs diff -u -r 1.10.2.7 -r 1.10.2.8 src/prefs_summary_column.c;  cvs diff -u -r 1.12.2.10 -r 1.12.2.11 src/prefs_template.c;  cvs diff -u -r 1.3.2.19 -r 1.3.2.20 src/prefs_themes.c;  cvs diff -u -r 1.30.2.13 -r 1.30.2.14 src/prefs_toolbar.c;  cvs diff -u -r 1.1.2.4 -r 1.1.2.5 src/prefs_wrapping.c;  cvs diff -u -r 1.49.2.42 -r 1.49.2.43 src/procmime.c;  cvs diff -u -r 1.150.2.26 -r 1.150.2.27 src/procmsg.c;  cvs diff -u -r 1.1 -r 1.2 src/send_message.h;  cvs diff -u -r 1.3.2.9 -r 1.3.2.10 src/ssl_manager.c;  cvs diff -u -r 1.15.2.15 -r 1.15.2.16 src/summary_search.c;  cvs diff -u -r 1.395.2.71 -r 1.395.2.72 src/summaryview.c;  cvs diff -u -r 1.96.2.55 -r 1.96.2.56 src/textview.c;  cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/wizard.c;  cvs diff -u -r 1.11.2.10 -r 1.11.2.11 src/common/smtp.c;  cvs diff -u -r 1.6.2.6 -r 1.6.2.7 src/common/smtp.h;  cvs diff -u -r 1.4.2.10 -r 1.4.2.11 src/gtk/gtkutils.h;  ) > 1.9.11cvs28.patchset
 ( cvs diff -u -r 1.49.2.43 -r 1.49.2.44 src/procmime.c;  ) > 1.9.11cvs29.patchset
 ( cvs diff -u -r 1.1.2.2 -r 1.1.2.3 po/fi.po;  cvs diff -u -r 1.49.2.44 -r 1.49.2.45 src/procmime.c;  ) > 1.9.11cvs30.patchset
+( cvs diff -u -r 1.6.10.5 -r 1.6.10.6 src/addrharvest.c;  cvs diff -u -r 1.382.2.125 -r 1.382.2.126 src/compose.c;  cvs diff -u -r 1.28.2.4 -r 1.28.2.5 src/mbox.c;  cvs diff -u -r 1.3.2.3 -r 1.3.2.4 src/mbox.h;  cvs diff -u -r 1.79.2.10 -r 1.79.2.11 src/mh.c;  cvs diff -u -r 1.16.2.18 -r 1.16.2.19 src/msgcache.c;  cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/prefs_compose_writing.c;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_compose_writing.h;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_message.c;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_message.h;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_other.c;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_other.h;  cvs diff -u -r 1.1.2.2 -r 1.1.2.3 src/prefs_quote.c;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_quote.h;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_receive.c;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_receive.h;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_send.c;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_send.h;  cvs diff -u -r 1.1.2.3 -r 1.1.2.4 src/prefs_summaries.c;  cvs diff -u -r 1.1.2.1 -r 1.1.2.2 src/prefs_summaries.h;  cvs diff -u -r 1.17.2.11 -r 1.17.2.12 src/send_message.c;  cvs diff -u -r 1.5.2.6 -r 1.5.2.7 src/setup.c;  cvs diff -u -r 1.395.2.72 -r 1.395.2.73 src/summaryview.c;  cvs diff -u -r 1.13.2.2 -r 1.13.2.3 src/undo.c;  cvs diff -u -r 1.24.2.6 -r 1.24.2.7 src/common/Makefile.am;  cvs diff -u -r 1.10 -r 1.11 src/common/hooks.c;  cvs diff -u -r 1.5 -r 1.6 src/common/prefs.c;  cvs diff -u -r 1.2.4.7 -r 1.2.4.8 src/common/template.c;  diff -u /dev/null src/common/timing.h;  cvs diff -u -r 1.36.2.31 -r 1.36.2.32 src/common/utils.c;  cvs diff -u -r 1.5.2.12 -r 1.5.2.13 src/gtk/gtkutils.c;  cvs diff -u -r 1.2.2.7 -r 1.2.2.8 src/gtk/inputdialog.c;  cvs diff -u -r 1.5.2.14 -r 1.5.2.15 src/gtk/menu.c;  cvs diff -u -r 1.5.2.14 -r 1.5.2.15 src/gtk/pluginwindow.c;  cvs diff -u -r 1.12.2.19 -r 1.12.2.20 src/gtk/prefswindow.c;  cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/plugins/pgpmime/passphrase.c;  cvs diff -u -r 1.1.2.7 -r 1.1.2.8 src/plugins/pgpmime/prefs_gpg.c;  ) > 1.9.11cvs31.patchset
index 1ec9f9ad1bd09637485d9afa610764cfe563183a..2cc9d6f9d6b5154ede3b639aaa437248338251eb 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=9
 MICRO_VERSION=11
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=30
+EXTRA_VERSION=31
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
@@ -122,6 +122,8 @@ esac
 AC_MSG_RESULT([$os_win32])
 AM_CONDITIONAL(OS_WIN32, test x"$os_win32" = x"yes")
 
+CFLAGS="$CFLAGS -Wall"
+
 case "$target" in
 *-darwin*)
        CFLAGS="$CFLAGS -no-cpp-precomp -fno-common"
index e97b8655f1de9ef0274999936056a2657e8e9e3c..b8cd636ecae11f4fe49043e794e9ebd4bd50d255 100644 (file)
@@ -29,6 +29,7 @@
 #include "utils.h"
 #include "mgutils.h"
 #include "addrharvest.h"
+#include "codeconv.h"
 #include "addritem.h"
 
 /* Mail header names of interest */
@@ -514,7 +515,6 @@ static void addrharvest_parse_address(
                AddressCache *cache, const gchar *hdrBuf )
 {
        gchar buffer[ ADDR_BUFFSIZE + 2 ];
-       gchar buf[ADDR_BUFFSIZE];
        const gchar *bp;
        const gchar *ep;
        gchar *atCh, *email, *name;
@@ -553,18 +553,18 @@ static void addrharvest_parse_address(
                        g_strstrip( buffer );
 
                        if( g_ascii_strcasecmp( buffer, email ) == 0 ) {
-                               name = "";
+                               name = g_strdup("");
                        }
                        else {
                                name = buffer;
-                               conv_unmime_header(buf, sizeof(buf), name,
-                               NULL);
+                               name = conv_unmime_header(buffer, NULL);
                        }
 
                        /* Insert into address book */
                        addrharvest_insert_cache(
                                harvester, entry, cache, name, email );
                        g_free( email );
+                       g_free( name );
                }
                hdrBuf = ep;
        }
index 8c36e6e4c46e888abdb87072d931933d287ac876..7984eb06f356d9fced7b7779bc0602e97ac9f48d 100644 (file)
@@ -49,6 +49,7 @@ sylpheedcommoninclude_HEADERS = \
        stringtable.h \
        sylpheed.h \
        template.h \
+       timing.h \
        utils.h \
        uuencode.h \
        version.h \
index 6090199cc1dfb5a950047cd0c10c04c370f047b0..caa946f3e93fecd6c5da2b0e9193ed41f41763c1 100644 (file)
@@ -67,7 +67,7 @@ guint hooks_register_hook(const gchar *hooklist_name,
 
        g_hook_append(hooklist, hook);
 
-       debug_print("registed new hook for '%s' as id %d\n", hooklist_name, hook->hook_id);
+       debug_print("registed new hook for '%s' as id %lu\n", hooklist_name, hook->hook_id);
 
        return hook->hook_id;
 }
@@ -86,7 +86,7 @@ void hooks_unregister_hook(const gchar *hooklist_name,
        hook = g_hook_get(hooklist, hook_id);
        g_return_if_fail(hook != NULL);
 
-       debug_print("unregisted hook %d in '%s'\n", hook->hook_id, hooklist_name);
+       debug_print("unregisted hook %lu in '%s'\n", hook->hook_id, hooklist_name);
 
        g_hook_destroy(hooklist, hook_id);
 }
index fc29030b493d8ade281cd5ce1ac78d5e60cc6037..6bd27081afa29070c789ec1e7c6e868215cd746f 100644 (file)
@@ -206,7 +206,7 @@ gint prefs_file_close(PrefFile *pfile)
  */
 gint prefs_file_close_revert(PrefFile *pfile)
 {
-       gchar *tmppath;
+       gchar *tmppath = NULL;
 
        g_return_val_if_fail(pfile != NULL, -1);
 
index 9451249b795685b96d1324f68d831a2705c3d500..b2fc3991b8433c6ce3a0fe97bfbabb83b8a90978 100644 (file)
@@ -54,8 +54,6 @@ static Template *template_load(gchar *filename)
        tmpl->value = NULL;
 
        while (fgets(buf, sizeof(buf), fp) != NULL) {
-               gchar *tmp = NULL;
-
                if (buf[0] == '\n')
                        break;
                else if (!g_ascii_strncasecmp(buf, "Name:", 5))
diff --git a/src/common/timing.h b/src/common/timing.h
new file mode 100644 (file)
index 0000000..39a9cb6
--- /dev/null
@@ -0,0 +1,58 @@
+/*
+ * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
+ * Copyright (C) 2005 Colin Leroy <colin@colino.net> & the Sylpheed-Claws team
+ *
+ * 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 Place - Suite 330, Boston, MA 02111-1307, USA.
+ */
+
+/*
+ * This is a (quite naive) timer, to help determine the speed of various
+ * functions of Claws. By default START_TIMING() and END_TIMING() are NOPS,
+ * so that nothing gets printed out. If you change the #if, however, you'll
+ * be able to get functions timing information. As the implementation is
+ * naive, START_TIMING("message"); must be present just at the end of a
+ * declaration block (or compilation would fail with gcc 2.x), and the
+ * END_TIMING() call must be in the same scope.
+ */
+#ifndef __TIMING_H__
+#define __TIMING_H__
+
+#include <sys/time.h>
+#ifdef HAVE_CONFIG_H
+#  include "config.h"
+#endif
+
+#if 1 /* set to 0 to measure times at various places */
+#define START_TIMING(str) do {} while(0);
+#define END_TIMING() do {} while(0);
+#else
+/* no {} by purpose */
+#define START_TIMING(str)                                              \
+       struct timeval start;                                           \
+       struct timeval end;                                             \
+       struct timeval diff;                                            \
+       const char *timing_name=str;                                    \
+       gettimeofday(&start, NULL);                                     \
+
+#define END_TIMING()                                                   \
+       gettimeofday(&end, NULL);                                       \
+       timersub(&end, &start, &diff);                                  \
+       printf("%s: %ds%dus\n",                                         \
+               timing_name, (unsigned int)diff.tv_sec,                 \
+               (unsigned int)diff.tv_usec);                            \
+
+#endif
+
+#endif 
index c6772ee58f100985911795f912136f65d36534ce..fc1c17177fa0fdc8e67aed030ec402edf7c0f55d 100644 (file)
@@ -1456,7 +1456,6 @@ GList *uri_list_extract_filenames(const gchar *uri_list)
        GList *result = NULL;
        const gchar *p, *q;
        gchar *escaped_utf8uri;
-       gchar *file;
 
        p = uri_list;
 
@@ -1480,7 +1479,6 @@ GList *uri_list_extract_filenames(const gchar *uri_list)
                                        strncpy(escaped_utf8uri, p, q - p + 1);
                                        escaped_utf8uri[q - p + 1] = '\0';
                                        decode_uri(file, escaped_utf8uri);
-#warning FIXME_GTK2 /* should we use g_filename_from_utf8()? */
                     /*
                     * g_filename_from_uri() rejects escaped/locale encoded uri
                     * string which come from Nautilus.
@@ -3843,8 +3841,9 @@ GAuto *g_auto_pointer_new(gpointer p)
        ptr->ref = ref;
        ptr->ptr = p;
 
+#ifdef REF_DEBUG
        G_PRINT_REF ("XXXX ALLOC(%lx)\n", p);
-
+#endif
        return ptr;
 }
 
@@ -3898,8 +3897,9 @@ GAuto *g_auto_pointer_copy(GAuto *auto_ptr)
        newp->ptr = ref->pointer;
        ++(ref->cnt);
        
+#ifdef REF_DEBUG
        G_PRINT_REF ("XXXX COPY(%lx) -- REF (%d)\n", ref->pointer, ref->cnt);
-
+#endif
        return newp;
 }
 
@@ -3918,11 +3918,16 @@ void g_auto_pointer_free(GAuto *auto_ptr)
        ref = ptr->ref;
 
        if (--(ref->cnt) == 0) {
+#ifdef REF_DEBUG
                G_PRINT_REF ("XXXX FREE(%lx) -- REF (%d)\n", ref->pointer, ref->cnt);
+#endif
                ref->free(ref->pointer);
                g_free(ref);
-       } else
+       } 
+#ifdef REF_DEBUG
+       else
                G_PRINT_REF ("XXXX DEREF(%lx) -- REF (%d)\n", ref->pointer, ref->cnt);
+#endif
        g_free(ptr);            
 }
 
index b92a53ea80b85105ea9c1f9607915e65b871c4ec..1ab79d8eac3527e3708df317c57119b2af952c89 100644 (file)
@@ -1454,7 +1454,6 @@ void compose_entry_append(Compose *compose, const gchar *address,
        gchar *header;
        gchar *cur, *begin;
        gboolean in_quote = FALSE;
-       int i = 0;
        if (!address || *address == '\0') return;
 
        switch (type) {
index 9b69773a7675c9548be903603c005cd482bbdaac..54c2f2702032c1720014926d237af270c389c817 100644 (file)
@@ -51,7 +51,6 @@
 #include "prefs_account.h"
 #include "prefs_common.h"
 
-#warning FIXME_GTK2
 gboolean gtkut_get_font_size(GtkWidget *widget,
                             gint *width, gint *height)
 {
index 1557cdd345d3a6e3ef7270713a3db7b11926f77e..d0c7392f9555614ef9ecca579a8545a98d84ec13 100644 (file)
@@ -37,6 +37,7 @@
 #include <gtk/gtkbutton.h>
 #include <gtk/gtkhbbox.h>
 #include <gtk/gtkstock.h>
+#include <gtk/gtkimage.h>
 
 #include "inputdialog.h"
 #include "manage_window.h"
index a97540d854617234169dc97241510cda279635ae..21ce9e5686d8ba72870c77ce543d4f942b8e2f1e 100644 (file)
 #include "menu.h"
 #include "utils.h"
 
-static void menu_item_add_accel( GtkWidget *widget, guint accel_signal_id, GtkAccelGroup *accel_group,
-                                guint accel_key, GdkModifierType accel_mods, GtkAccelFlags accel_flags,
-                                gpointer user_data);
-
-static void menu_item_remove_accel(GtkWidget *widget, GtkAccelGroup *accel_group,
-                                  guint accel_key, GdkModifierType accel_mods,
-                                  gpointer user_data);
-
 static void connect_accel_change_signals(GtkWidget* widget, GtkWidget *wid2) ;
 
 
@@ -97,14 +89,6 @@ gchar *menu_translate(const gchar *path, gpointer data)
        return retval;
 }
 
-static void factory_print_func(gpointer data, gchar *string)
-{
-       GString *out_str = data;
-
-       g_string_append(out_str, string);
-       g_string_append_c(out_str, '\n');
-}
-
 void menu_set_sensitive(GtkItemFactory *ifactory, const gchar *path,
                        gboolean sensitive)
 {
@@ -214,45 +198,8 @@ gpointer menu_get_option_menu_active_user_data(GtkOptionMenu *optmenu)
        return g_object_get_data(G_OBJECT(menuitem), MENU_VAL_ID);
 }
 
-/* call backs for accelerator changes on selected menu items */
-static void menu_item_add_accel( GtkWidget *widget, guint accel_signal_id, GtkAccelGroup *accel_group,
-                                guint accel_key, GdkModifierType accel_mods, GtkAccelFlags accel_flags,
-                                gpointer user_data)
-{
-#warning FIXME_GTK2
-#if 0
-       GtkWidget *connected = GTK_WIDGET(user_data);   
-       if (gtk_signal_n_emissions_by_name(G_OBJECT(widget),"add_accelerator") > 1 ) return;
-       gtk_widget_remove_accelerators(connected,"activate",FALSE);
-       /* lock _this_ widget */
-       gtk_accel_group_lock_entry(accel_group,accel_key,accel_mods);
-       /* modify the _other_ widget */
-       gtk_widget_add_accelerator(connected, "activate",
-                                  gtk_item_factory_from_widget(connected)->accel_group,
-                                  accel_key, accel_mods,
-                                  GTK_ACCEL_VISIBLE );
-       gtk_accel_group_unlock_entry(accel_group,accel_key,accel_mods);                            
-#endif
-}
-
-static void menu_item_remove_accel(GtkWidget *widget, GtkAccelGroup *accel_group,
-                                  guint accel_key, GdkModifierType accel_mods,
-                                  gpointer user_data)
-{      
-#warning FIXME_GTK2
-#if 0
-       GtkWidget *wid = GTK_WIDGET(user_data);
-
-       if (gtk_signal_n_emissions_by_name(G_OBJECT(widget),
-           "remove_accelerator") > 2 )
-               return;
-       gtk_widget_remove_accelerators(wid,"activate",FALSE);
-#endif
-}
-
 static void connect_accel_change_signals(GtkWidget* widget, GtkWidget *wid2) 
 {
-#warning FIXME_GTK2
 #if 0
        g_signal_connect_after(G_OBJECT(widget), "add_accelerator", 
                               G_CALLBACK(menu_item_add_accel), wid2);
index a45566617fa0ffb5719a54318db8d57fd1712863..3950ca274d1014df020cf62ddfc91dd999f8a79d 100644 (file)
@@ -72,7 +72,6 @@ static void set_plugin_list(PluginWindow *pluginwindow)
 {
        GSList *plugins, *cur;
        const gchar *text;
-       gint row;
        GtkListStore *store;
        GtkTreeIter iter;
        GtkTextBuffer *textbuf;
index c899a5880fd2f00d9ec59887ae5738eb3c965c5f..0cb2caecea1946f91d6c4c98aaad407d81e0895b 100644 (file)
@@ -333,9 +333,7 @@ static void prefswindow_build_tree(GtkWidget *tree_view, GSList *prefs_pages)
 
 void prefswindow_open_full(const gchar *title, GSList *prefs_pages, gpointer data, GtkDestroyNotify func)
 {
-       gint optsize;
        PrefsWindow *prefswindow;
-       GtkTreeStore *store;
 
        prefswindow = g_new0(PrefsWindow, 1);
 
index 7742a65bf013704db233000f19b5fb5c2f1b3d93..d16115ad26df934424ae2ae0fab43c6f4c9368f3 100644 (file)
@@ -417,7 +417,6 @@ gint export_list_to_mbox(GSList *mlist, const gchar *mbox)
 gint export_to_mbox(FolderItem *src, const gchar *mbox)
 {
        GSList *mlist;
-       int res = 0;
        
        g_return_val_if_fail(src != NULL, -1);
        g_return_val_if_fail(src->folder != NULL, -1);
index 3e72c2266434362c4316e63f9ef43309f76bfa7d..e9bf23aa3f8195fcbd986bc34397d5cd011e4255 100644 (file)
@@ -30,9 +30,6 @@ typedef enum {
 } LockType;
 
 
-#warning FIXME_GTK2
-/*  file name should be locale encode. */
-
 gint proc_mbox         (FolderItem     *dest,
                         const gchar    *mbox,
                         gboolean        apply_filter);
index dbcde048d04b4583021d1d6f679461d879319ac6..b41ab8b8309e09accc785ff9673aec6ee8b25a26 100644 (file)
--- a/src/mh.c
+++ b/src/mh.c
@@ -518,10 +518,10 @@ static gboolean mh_is_msg_changed(Folder *folder, FolderItem *item,
        struct stat s;
 
        if (stat(itos(msginfo->msgnum), &s) < 0 ||
-           msginfo->size  != s.st_size ||
+           msginfo->size  != s.st_size || (
                (msginfo->mtime - s.st_mtime != 0) &&
                (msginfo->mtime - s.st_mtime != 3600) &&
-               (msginfo->mtime - s.st_mtime != -3600))
+               (msginfo->mtime - s.st_mtime != -3600)))
                return TRUE;
 
        return FALSE;
@@ -986,7 +986,6 @@ static gboolean mh_rename_folder_func(GNode *node, gpointer data)
        return FALSE;
 }
 
-#warning FIXME_GTK2 /* should we use g_filename_from_utf8()? */
 static gchar *mh_filename_from_utf8(const gchar *path)
 {
        const gchar *src_codeset = CS_UTF_8;
@@ -1003,7 +1002,6 @@ static gchar *mh_filename_from_utf8(const gchar *path)
        return real_path;
 }
 
-#warning FIXME_GTK2 /* should we use g_filename_to_utf8()? */
 static gchar *mh_filename_to_utf8(const gchar *path)
 {
        const gchar *src_codeset = conv_get_locale_charset_str();
index 3bfbec875c379ae9b0e5cd121d4e0340a88deb8c..4721a13fbfb1cc6c5eb28ce1d328681d9b502c1e 100644 (file)
@@ -242,7 +242,7 @@ gint msgcache_get_memory_usage(MsgCache *cache)
  \
        if ((ni = fread(&idata, 1, sizeof(idata), fp)) != sizeof(idata)) { \
                g_warning("read_int: Cache data corrupted, read %d of %d at " \
-                         "offset %d\n", ni, sizeof(idata), ftell(fp)); \
+                         "offset %ld\n", ni, sizeof(idata), ftell(fp)); \
                procmsg_msginfo_free(msginfo); \
                error = TRUE; \
                break; \
@@ -336,7 +336,7 @@ static gint msgcache_read_cache_data_str(FILE *fp, gchar **str,
        if ((ni = fread(&len, 1, sizeof(len), fp) != sizeof(len)) ||
            len > G_MAXINT) {
                g_warning("read_data_str: Cache data (len) corrupted, read %d "
-                         "of %d bytes at offset %d\n", ni, sizeof(len), 
+                         "of %d bytes at offset %ld\n", ni, sizeof(len), 
                          ftell(fp));
                return -1;
        }
@@ -348,7 +348,7 @@ static gint msgcache_read_cache_data_str(FILE *fp, gchar **str,
 
        if ((ni = fread(tmpstr, 1, len, fp)) != len) {
                g_warning("read_data_str: Cache data corrupted, read %d of %d "
-                         "bytes at offset %d\n", 
+                         "bytes at offset %ld\n", 
                          ni, len, ftell(fp));
                g_free(tmpstr);
                return -1;
index 5ac4f2eca4ea98cce529a9e651fbdb6d6f67806a..c9a5eab067c32e0b0860b334d040ea40ae3ad4c7 100644 (file)
@@ -83,7 +83,6 @@ passphrase_mbox (const gchar *desc)
     GtkWidget *pass_entry;
     GtkWidget *ok_button;
     GtkWidget *cancel_button;
-    gint       grab_result;
 
     window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
     gtk_window_set_title(GTK_WINDOW(window), _("Passphrase"));
@@ -140,8 +139,8 @@ try_again:
        gdk_flush();
        while(gtk_events_pending())
                gtk_main_iteration();
-        if (err = gdk_pointer_grab(window->window, TRUE, 0,
-                             window->window, NULL, GDK_CURRENT_TIME)) {
+        if ((err = gdk_pointer_grab(window->window, TRUE, 0,
+                             window->window, NULL, GDK_CURRENT_TIME))) {
            if (err == GDK_GRAB_NOT_VIEWABLE && cnt < 10) {
                /* HACK! */
                cnt++;
index dcc27bbe876d7c6172a0e89d0ba178455e2522db..df158e2b892e9439c9963c0062290927e6c841ee 100644 (file)
@@ -459,7 +459,7 @@ struct GPGAccountConfig *prefs_gpg_account_get_config(PrefsAccount *account)
 
 void prefs_gpg_account_set_config(PrefsAccount *account, GPGAccountConfig *config)
 {
-       gchar *confstr;
+       gchar *confstr = NULL;
 
        switch (config->sign_key) {
        case SIGN_KEY_DEFAULT:
@@ -471,6 +471,9 @@ void prefs_gpg_account_set_config(PrefsAccount *account, GPGAccountConfig *confi
        case SIGN_KEY_CUSTOM:
                confstr = g_strdup_printf("CUSTOM;%s", config->sign_key_id);
                break;
+       default:
+               confstr = g_strdup("");
+               g_warning("prefs_gpg_account_set_config: bad sign_key val\n");
        }
 
        prefs_account_set_privacy_prefs(account, "gpg", confstr);
index d451baa723e52b58be58b121704e0230ad0fe712..c325c5ebb053e3e622c2b82cda75cf7b801f18fd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004 Hiroyuki Yamamoto & The Sylpheed-Claws Team
+ * Copyright (C) 2005 Colin Leroy <colin@colino.net> & The Sylpheed-Claws Team
  *
  * 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
index ad6543896410f0473d65248bf48d58bcff8f4913..c62c6ca61e2fc3bcab6f12e369c37db07fd03ea2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004 Hiroyuki Yamamoto & the Sylpheed-Claws team
+ * Copyright (C) 2005 Colin Leroy <colin@colino.net> & the Sylpheed-Claws team
  *
  * 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
index 950ac432b5d28c9b0c10e113fa70417939a84232..a8ee2cba1737b2907418cfed29b29c5c7deef49a 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004 Hiroyuki Yamamoto & The Sylpheed-Claws Team
+ * Copyright (C) 2005 Colin Leroy <colin@colino.net> & The Sylpheed-Claws Team
  *
  * 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
index a885f460db06d20b93999d7beac96f336653b417..9f045fce178e83b167474bc952fee51208727430 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004 Hiroyuki Yamamoto & the Sylpheed-Claws team
+ * Copyright (C) 2005 Colin Leroy <colin@colino.net> & the Sylpheed-Claws team
  *
  * 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
index 6b524057b1f01e14dbfd2b943944bc028a9fd5c9..d8aa7bf1f5b0675420c8af9b507f02a6a1cff5f3 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004 Hiroyuki Yamamoto & The Sylpheed-Claws Team
+ * Copyright (C) 2005 Colin Leroy <colin@colino.net> & The Sylpheed-Claws Team
  *
  * 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
index 25191e6a110a14217cca9abb3d39428759095e12..90ab3b13c1dff3e472180e0e45a030b287e168ff 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004 Hiroyuki Yamamoto & the Sylpheed-Claws team
+ * Copyright (C) 2005 Colin Leroy <colin@colino.net> & the Sylpheed-Claws team
  *
  * 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
index d7d267e03d36f853644228ed573a5a53680c3071..09f11b95eb157db88cfa466f980e4a5d6bd94358 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004 Hiroyuki Yamamoto & The Sylpheed-Claws Team
+ * Copyright (C) 2005 Colin Leroy <colin@colino.net> & The Sylpheed-Claws Team
  *
  * 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
index 3de1359c8493344400f06f6ddfc561b5ba53eeec..68d8c21245e21aef841c894bdf97a1b960af1753 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004 Hiroyuki Yamamoto & the Sylpheed-Claws team
+ * Copyright (C) 2005 Colin Leroy <colin@colino.net> & the Sylpheed-Claws team
  *
  * 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
index cf3ad8f1f183ec2dd1456c39ffd3c64b96a153b5..3f510052f81e37e3c7d36525f4710cbbc67a9955 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004 Hiroyuki Yamamoto & The Sylpheed-Claws Team
+ * Copyright (C) 2005 Colin Leroy <colin@colino.net> & The Sylpheed-Claws Team
  *
  * 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
index a66c4ecfdeb1cfb808da4a0d049c6e8e09dfc689..dcba8877f4f4a7b72fbbc4164117f9df7d3a34a5 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004 Hiroyuki Yamamoto & the Sylpheed-Claws team
+ * Copyright (C) 2005 Colin Leroy <colin@colino.net> & the Sylpheed-Claws team
  *
  * 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
index fa39f2ff57fec75894441cbebfa71099b4c8dbf3..c4bdf55727fe06172ebacb86789adab3f164dbcd 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004 Hiroyuki Yamamoto & The Sylpheed-Claws Team
+ * Copyright (C) 2005 Colin Leroy <colin@colino.net> & The Sylpheed-Claws Team
  *
  * 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
index 4d6b345f88ffaa04dd5e48cd67d4f24ee5c832ce..cec5d21151664555e80fe66b0ff6e4aef168fd3c 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004 Hiroyuki Yamamoto & the Sylpheed-Claws team
+ * Copyright (C) 2005 Colin Leroy <colin@colino.net> & the Sylpheed-Claws team
  *
  * 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
index 1dc09b04c4ecb1a577c6a92c18eb11b33016a3c8..fa1f308826294c10f3fce5597d8a6cbe5b870c82 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004 Hiroyuki Yamamoto & The Sylpheed-Claws Team
+ * Copyright (C) 2005 Colin Leroy <colin@colino.net> & The Sylpheed-Claws Team
  *
  * 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
index f2e8e219d9c7b8c45e2e33451e35ac4e198037b3..67c7f7d4ecbc344899980eb199f9ca831d030c10 100644 (file)
@@ -1,6 +1,6 @@
 /*
  * Sylpheed -- a GTK+ based, lightweight, and fast e-mail client
- * Copyright (C) 2004 Hiroyuki Yamamoto & the Sylpheed-Claws team
+ * Copyright (C) 2005 Colin Leroy <colin@colino.net> & the Sylpheed-Claws team
  *
  * 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
index 512d02423434e98d03ea72e84a43360ec9c50f3b..fa9bd5b651b2c620b8ec0b1d1ef2eb4949d95b1f 100644 (file)
@@ -176,7 +176,7 @@ gint send_message_smtp_full(PrefsAccount *ac_prefs, GSList *to_list, FILE *fp, g
 {
        Session *session;
        SMTPSession *smtp_session;
-       gushort port;
+       gushort port = 0;
        SendProgressDialog *dialog;
        gchar buf[BUFFSIZE];
        gint ret = 0;
@@ -350,7 +350,7 @@ gint send_message_smtp_full(PrefsAccount *ac_prefs, GSList *to_list, FILE *fp, g
         */
        if (!keep_session || ret != 0) {
                if (session_is_connected(session))
-                       smtp_quit(session);
+                       smtp_quit(smtp_session);
                while (session_is_connected(session))
                        gtk_main_iteration();
                session_destroy(session);
index 6ded1e4705ae22135d819d7ee545baf8e0b88ac1..2899139cad6a97e61284ac6fed9123269e8cc747 100644 (file)
 
 static void scan_tree_func(Folder *folder, FolderItem *item, gpointer data);
 
-void setup(MainWindow *mainwin)
-{
-       gchar *path;
-       
-       path = input_dialog
-               (_("Mailbox setting"),
-                _("First, you have to set the location of mailbox.\n"
-                  "You can use existing mailbox in MH format\n"
-                  "if you have the one.\n"
-                  "If you're not sure, just select OK."),
-                "Mail");
-       setup_write_mailbox_path(mainwin, path);
-       g_free(path);
-}
-
 gboolean setup_write_mailbox_path(MainWindow *mainwin, const gchar *path)
 {
        Folder *folder;
@@ -81,6 +66,21 @@ gboolean setup_write_mailbox_path(MainWindow *mainwin, const gchar *path)
        return TRUE;
 }
 
+void setup(MainWindow *mainwin)
+{
+       gchar *path;
+       
+       path = input_dialog
+               (_("Mailbox setting"),
+                _("First, you have to set the location of mailbox.\n"
+                  "You can use existing mailbox in MH format\n"
+                  "if you have the one.\n"
+                  "If you're not sure, just select OK."),
+                "Mail");
+       setup_write_mailbox_path(mainwin, path);
+       g_free(path);
+}
+
 static void scan_tree_func(Folder *folder, FolderItem *item, gpointer data)
 {
        MainWindow *mainwin = (MainWindow *)data;
index 1fcec04ff3d3ff761a6e48033b71507e1701d298..43e13d9bd023ac2b315a35826a2b3b3225132e2b 100644 (file)
@@ -85,6 +85,7 @@
 #include "folderutils.h"
 #include "quicksearch.h"
 #include "partial_download.h"
+#include "timing.h"
 
 #define SUMMARY_COL_MARK_WIDTH         10
 #define SUMMARY_COL_STATUS_WIDTH       13
@@ -2129,10 +2130,11 @@ static void summary_set_ctree_from_list(SummaryView *summaryview,
 {
        GtkCTree *ctree = GTK_CTREE(summaryview->ctree);
        MsgInfo *msginfo;
-               GtkCTreeNode *node = NULL;
+       GtkCTreeNode *node = NULL;
        GHashTable *msgid_table;
        GHashTable *subject_table;
        GSList * cur;
+       START_TIMING("summary_set_ctree_from_list");
        
        if (!mlist) return;
 
@@ -2233,7 +2235,7 @@ static void summary_set_ctree_from_list(SummaryView *summaryview,
 
        g_signal_handlers_unblock_by_func(G_OBJECT(ctree),
                                       G_CALLBACK(summary_tree_expanded), summaryview);
-
+       END_TIMING();
 }
 
 static gchar *summary_complete_address(const gchar *addr)
@@ -4739,12 +4741,31 @@ static void summary_create_processing_cb(SummaryView *summaryview,
 static void summary_sort_by_column_click(SummaryView *summaryview,
                                         FolderSortKey sort_key)
 {
+       GtkCTreeNode *node = NULL;
+       START_TIMING("summary_sort_by_column_click");
+       g_signal_handlers_block_by_func(G_OBJECT(summaryview->ctree),
+                                      G_CALLBACK(summary_tree_expanded), summaryview);
+       gtk_clist_freeze(GTK_CLIST(summaryview->ctree));
        if (summaryview->sort_key == sort_key)
                summary_sort(summaryview, sort_key,
                             summaryview->sort_type == SORT_ASCENDING
                             ? SORT_DESCENDING : SORT_ASCENDING);
        else
                summary_sort(summaryview, sort_key, SORT_ASCENDING);
+
+       gtk_clist_thaw(GTK_CLIST(summaryview->ctree));
+       g_signal_handlers_unblock_by_func(G_OBJECT(summaryview->ctree),
+                                      G_CALLBACK(summary_tree_expanded), summaryview);
+
+       node = GTK_CTREE_NODE(GTK_CLIST(summaryview->ctree)->row_list);
+
+       while (prefs_common.bold_unread && node) {
+               GtkCTreeNode *next = GTK_CTREE_NODE_NEXT(node);
+               if (GTK_CTREE_ROW(node)->children)
+                       summary_set_row_marks(summaryview, node);
+               node = next;
+       }
+       END_TIMING();
 }
 
 static void summary_mark_clicked(GtkWidget *button, SummaryView *summaryview)
index abc956bc534b4a2b5d8af891d6e2aeb9b36a7f83..3a4320e8a5d92009dc8ba8b9277ef40d3099a0ca 100644 (file)
@@ -574,7 +574,6 @@ void undo_delete_text_cb(GtkTextBuffer *textbuf, GtkTextIter *start,
 
 void undo_paste_clipboard_cb(GtkTextView *textview, UndoMain *undostruct)
 {
-#warning GTK2 check clipboard content
 #if 0
        if (editable->clipboard_text == NULL) return;
 #endif