sync with 0.9.0cvs3

This commit is contained in:
Paul Mangan 2003-05-20 10:02:32 +00:00
parent 16c9ed4bc7
commit 2a2436dc24
6 changed files with 39 additions and 56 deletions

View file

@ -11,7 +11,7 @@ MINOR_VERSION=8
MICRO_VERSION=11
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=claws167
EXTRA_VERSION=claws168
VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION
dnl set $target

View file

@ -382,10 +382,10 @@ static gboolean isprintableeuckanji(guchar c1, guchar c2)
return (gboolean)valid_eucjp_tbl[c1 - 0xa2][c2 - 0xa0];
if (c1 == 0xcf) {
if (c2 >= 0xd4 && c2 <= 0xff)
if (c2 >= 0xd4 && c2 <= 0xfe)
return FALSE;
} else if (c1 == 0xf4) {
if (c2 >= 0xa7 && c2 <= 0xff)
if (c2 >= 0xa7 && c2 <= 0xfe)
return FALSE;
}

View file

@ -48,7 +48,7 @@ static gint smtp_helo(SMTPSession *session);
static gint smtp_rcpt(SMTPSession *session);
static gint smtp_data(SMTPSession *session);
static gint smtp_send_data(SMTPSession *session);
static gint smtp_rset(SMTPSession *session);
/* static gint smtp_rset(SMTPSession *session); */
static gint smtp_quit(SMTPSession *session);
static gint smtp_eom(SMTPSession *session);
@ -378,6 +378,7 @@ static gint smtp_send_data(SMTPSession *session)
return SM_OK;
}
#if 0
static gint smtp_rset(SMTPSession *session)
{
session->state = SMTP_RSET;
@ -387,6 +388,7 @@ static gint smtp_rset(SMTPSession *session)
return SM_OK;
}
#endif
static gint smtp_quit(SMTPSession *session)
{

View file

@ -49,6 +49,14 @@ static StringEntry *string_entry_new(const gchar *str)
return entry;
}
static void string_entry_free(StringEntry *entry)
{
g_return_if_fail(entry != NULL);
g_free(entry->string);
g_free(entry);
}
StringTable *string_table_new(void)
{
StringTable *strtable;
@ -102,8 +110,7 @@ void string_table_free_string(StringTable *table, gchar *str)
if (entry->ref_count <= 0) {
XXX_DEBUG ("refcount of string %s dropped to zero\n", entry->string);
g_hash_table_remove(table->hash_table, str);
g_free(entry->string);
g_free(entry);
string_entry_free(entry);
} else {
XXX_DEBUG ("ref-- for %s (%d)\n", entry->string, entry->ref_count);
}
@ -116,8 +123,7 @@ static gboolean string_table_remove_for_each_fn(gchar *key, StringEntry *entry,
g_return_val_if_fail(key != NULL, TRUE);
g_return_val_if_fail(entry != NULL, TRUE);
g_free(entry->string);
g_free(entry);
string_entry_free(entry);
return TRUE;
}

View file

@ -1901,23 +1901,16 @@ static void compose_insert_sig(Compose *compose, gboolean replace)
gtk_stext_freeze(text);
if (replace && compose->sig_str) {
gchar *tmp;
gint pos;
gint len;
if (compose->account->sig_sep)
tmp = g_strconcat(compose->account->sig_sep, "\n",
compose->sig_str, NULL);
else
tmp = g_strdup(compose->sig_str);
if (tmp[0] == '\0')
if (compose->sig_str[0] == '\0')
pos = -1;
else
pos = gtkut_stext_find(text, 0, tmp, TRUE);
pos = gtkut_stext_find(text, 0, compose->sig_str, TRUE);
if (pos != -1) {
len = get_mbs_len(tmp);
len = get_mbs_len(compose->sig_str);
if (len >= 0) {
gtk_stext_set_point(text, pos);
gtk_stext_forward_delete(text, len);
@ -1929,17 +1922,9 @@ static void compose_insert_sig(Compose *compose, gboolean replace)
len = gtk_stext_get_length(text);
gtk_stext_set_point(text, len);
}
g_free(tmp);
} else
gtk_stext_insert(text, NULL, NULL, NULL, "\n\n", 2);
if (compose->account->sig_sep) {
gtk_stext_insert(text, NULL, NULL, NULL,
compose->account->sig_sep, -1);
gtk_stext_insert(text, NULL, NULL, NULL, "\n", 1);
}
g_free(compose->sig_str);
compose->sig_str = compose_get_signature_str(compose);
if (!compose->sig_str)
@ -1958,43 +1943,41 @@ static void compose_insert_sig(Compose *compose, gboolean replace)
static gchar *compose_get_signature_str(Compose *compose)
{
static gchar *default_sigfile;
gchar *sig_file = NULL;
gchar *sig_body = NULL;
gchar *sig_str = NULL;
g_return_val_if_fail(compose->account != NULL, NULL);
if (compose->account->sig_type == SIG_FILE) {
if (compose->account->sig_path)
sig_file = compose->account->sig_path;
else {
if (!default_sigfile)
default_sigfile = g_strconcat
(get_home_dir(), G_DIR_SEPARATOR_S,
DEFAULT_SIGNATURE, NULL);
sig_file = default_sigfile;
}
if (!compose->account->sig_path)
return NULL;
if (!is_file_or_fifo_exist(sig_file)) {
g_warning("can't open signature file: %s\n", sig_file);
if (compose->account->sig_type == SIG_FILE) {
if (!is_file_or_fifo_exist(compose->account->sig_path)) {
g_warning("can't open signature file: %s\n",
compose->account->sig_path);
return NULL;
}
}
if (compose->account->sig_type == SIG_COMMAND) {
if (compose->account->sig_path)
sig_str = get_command_output
(compose->account->sig_path);
} else {
if (compose->account->sig_type == SIG_COMMAND)
sig_body = get_command_output(compose->account->sig_path);
else {
gchar *tmp;
tmp = file_read_to_str(sig_file);
tmp = file_read_to_str(compose->account->sig_path);
if (!tmp)
return NULL;
sig_str = normalize_newlines(tmp);
sig_body = normalize_newlines(tmp);
g_free(tmp);
}
if (compose->account->sig_sep) {
sig_str = g_strconcat(compose->account->sig_sep, "\n", sig_body,
NULL);
g_free(sig_body);
} else
sig_str = sig_body;
return sig_str;
}
@ -2896,7 +2879,7 @@ static void compose_select_account(Compose *compose, PrefsAccount *account,
activate_gnupg_mode(compose, account);
#endif /* USE_GPGME */
if (!init && account->auto_sig)
if (!init)
compose_insert_sig(compose, TRUE);
}

View file

@ -45,14 +45,6 @@
#include "hooks.h"
#include "msgcache.h"
typedef struct _FlagInfo FlagInfo;
struct _FlagInfo
{
guint msgnum;
MsgFlags flags;
};
GHashTable *procmsg_msg_hash_table_create(GSList *mlist)
{
GHashTable *msg_table;