commit 18a29a035fa83939b08669c3011f25197def8f7f
parent 12f768ce48acf2800a4907689a29f5c08714b345
Author: Colin Leroy <colin@colino.net>
Date: Mon, 22 Sep 2008 15:49:25 +0000
2008-09-22 [colin] 3.5.0cvs122
* src/common/utils.c
* src/account.c
Remove raw printf
* src/compose.c
Fix cursor position after changing account
* src/imap.c
* src/mimeview.c
* src/news.c
Fix absolute path detection
Diffstat:
9 files changed, 27 insertions(+), 8 deletions(-)
diff --git a/ChangeLog b/ChangeLog
@@ -1,3 +1,15 @@
+2008-09-22 [colin] 3.5.0cvs122
+
+ * src/common/utils.c
+ * src/account.c
+ Remove raw printf
+ * src/compose.c
+ Fix cursor position after changing account
+ * src/imap.c
+ * src/mimeview.c
+ * src/news.c
+ Fix absolute path detection
+
2008-09-21 [colin] 3.5.0cvs121
* src/gtk/gtkaspell.c
diff --git a/PATCHSETS b/PATCHSETS
@@ -3533,3 +3533,4 @@
( cvs diff -u -r 1.8.2.7 -r 1.8.2.8 src/plugins/Makefile.am; diff -u /dev/null src/plugins/smime/Makefile.am; diff -u /dev/null src/plugins/smime/plugin.c; diff -u /dev/null src/plugins/smime/smime.c; diff -u /dev/null src/plugins/smime/smime.deps; diff -u /dev/null src/plugins/smime/smime.h; ) > 3.5.0cvs119.patchset
( 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
diff --git a/configure.ac b/configure.ac
@@ -11,7 +11,7 @@ MINOR_VERSION=5
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
-EXTRA_VERSION=121
+EXTRA_VERSION=122
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=
diff --git a/src/account.c b/src/account.c
@@ -1795,7 +1795,6 @@ gchar *account_get_signature_str(PrefsAccount *account)
if (!account->sig_path)
return NULL;
-printf("opening %s\n", account->sig_path);
if (account->sig_type == SIG_FILE) {
if (!is_file_or_fifo_exist(account->sig_path)) {
diff --git a/src/common/utils.c b/src/common/utils.c
@@ -1633,7 +1633,6 @@ gint scan_mailto_url(const gchar *mailto, gchar **from, gchar **to, gchar **cc,
if (tmp) {
/* attach is correct */
num_attach++;
- printf("realloc my_att %d\n", (num_attach+1));
my_att = g_realloc(my_att, (sizeof(char *))*(num_attach+1));
my_att[num_attach-1] = tmp;
my_att[num_attach] = NULL;
diff --git a/src/compose.c b/src/compose.c
@@ -3230,7 +3230,8 @@ static void compose_insert_sig(Compose *compose, gboolean replace)
else
gtk_text_buffer_get_iter_at_offset(buffer, &iter,
compose->set_cursor_pos);
-
+
+ compose->set_cursor_pos = -1;
gtk_text_buffer_place_cursor(buffer, &iter);
g_signal_handlers_unblock_by_func(G_OBJECT(buffer),
G_CALLBACK(compose_changed_cb),
diff --git a/src/imap.c b/src/imap.c
@@ -2495,7 +2495,7 @@ static gchar *imap_item_get_path(Folder *folder, FolderItem *item)
folder_path = imap_folder_get_path(folder);
g_return_val_if_fail(folder_path != NULL, NULL);
- if (folder_path[0] == G_DIR_SEPARATOR) {
+ if (g_path_is_absolute(folder_path)) {
if (item->path)
path = g_strconcat(folder_path, G_DIR_SEPARATOR_S,
item->path, NULL);
@@ -2511,6 +2511,10 @@ static gchar *imap_item_get_path(Folder *folder, FolderItem *item)
folder_path, NULL);
}
g_free(folder_path);
+#ifdef G_OS_WIN32
+ while (strchr(path, '/'))
+ *strchr(path, '/') = '\\';
+#endif
return path;
}
diff --git a/src/mimeview.c b/src/mimeview.c
@@ -1591,7 +1591,7 @@ static gchar *mimeview_get_filename_for_part(MimeInfo *partinfo,
subst_for_filename(filename);
fullname = g_strconcat
- (basedir, G_DIR_SEPARATOR_S, (filename[0] == G_DIR_SEPARATOR)
+ (basedir, G_DIR_SEPARATOR_S, (g_path_is_absolute(filename))
? &filename[1] : filename, NULL);
g_free(filename);
diff --git a/src/news.c b/src/news.c
@@ -931,7 +931,7 @@ static gchar *news_item_get_path(Folder *folder, FolderItem *item)
folder_path = news_folder_get_path(folder);
g_return_val_if_fail(folder_path != NULL, NULL);
- if (folder_path[0] == G_DIR_SEPARATOR) {
+ if (g_path_is_absolute(folder_path)) {
if (item->path)
path = g_strconcat(folder_path, G_DIR_SEPARATOR_S,
item->path, NULL);
@@ -947,7 +947,10 @@ static gchar *news_item_get_path(Folder *folder, FolderItem *item)
folder_path, NULL);
}
g_free(folder_path);
-
+#ifdef G_OS_WIN32
+ while (strchr(path, '/'))
+ *strchr(path, '/') = '\\';
+#endif
return path;
}