+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
( 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
MICRO_VERSION=11
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=30
+EXTRA_VERSION=31
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
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"
#include "utils.h"
#include "mgutils.h"
#include "addrharvest.h"
+#include "codeconv.h"
#include "addritem.h"
/* Mail header names of interest */
AddressCache *cache, const gchar *hdrBuf )
{
gchar buffer[ ADDR_BUFFSIZE + 2 ];
- gchar buf[ADDR_BUFFSIZE];
const gchar *bp;
const gchar *ep;
gchar *atCh, *email, *name;
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;
}
stringtable.h \
sylpheed.h \
template.h \
+ timing.h \
utils.h \
uuencode.h \
version.h \
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;
}
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);
}
*/
gint prefs_file_close_revert(PrefFile *pfile)
{
- gchar *tmppath;
+ gchar *tmppath = NULL;
g_return_val_if_fail(pfile != NULL, -1);
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))
--- /dev/null
+/*
+ * 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
GList *result = NULL;
const gchar *p, *q;
gchar *escaped_utf8uri;
- gchar *file;
p = 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.
ptr->ref = ref;
ptr->ptr = p;
+#ifdef REF_DEBUG
G_PRINT_REF ("XXXX ALLOC(%lx)\n", p);
-
+#endif
return 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;
}
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);
}
gchar *header;
gchar *cur, *begin;
gboolean in_quote = FALSE;
- int i = 0;
if (!address || *address == '\0') return;
switch (type) {
#include "prefs_account.h"
#include "prefs_common.h"
-#warning FIXME_GTK2
gboolean gtkut_get_font_size(GtkWidget *widget,
gint *width, gint *height)
{
#include <gtk/gtkbutton.h>
#include <gtk/gtkhbbox.h>
#include <gtk/gtkstock.h>
+#include <gtk/gtkimage.h>
#include "inputdialog.h"
#include "manage_window.h"
#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) ;
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)
{
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);
{
GSList *plugins, *cur;
const gchar *text;
- gint row;
GtkListStore *store;
GtkTreeIter iter;
GtkTextBuffer *textbuf;
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);
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);
} LockType;
-#warning FIXME_GTK2
-/* file name should be locale encode. */
-
gint proc_mbox (FolderItem *dest,
const gchar *mbox,
gboolean apply_filter);
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;
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;
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();
\
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; \
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;
}
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;
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"));
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++;
void prefs_gpg_account_set_config(PrefsAccount *account, GPGAccountConfig *config)
{
- gchar *confstr;
+ gchar *confstr = NULL;
switch (config->sign_key) {
case SIGN_KEY_DEFAULT:
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);
/*
* 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
/*
* 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
/*
* 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
/*
* 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
/*
* 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
/*
* 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
/*
* 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
/*
* 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
/*
* 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
/*
* 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
/*
* 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
/*
* 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
/*
* 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
/*
* 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
{
Session *session;
SMTPSession *smtp_session;
- gushort port;
+ gushort port = 0;
SendProgressDialog *dialog;
gchar buf[BUFFSIZE];
gint ret = 0;
*/
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);
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;
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;
#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
{
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;
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)
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)
void undo_paste_clipboard_cb(GtkTextView *textview, UndoMain *undostruct)
{
-#warning GTK2 check clipboard content
#if 0
if (editable->clipboard_text == NULL) return;
#endif