[Commits] .cvsignore 1.11.2.2 1.11.2.2.16.1 compose.c 1.382.2.580.2.3 1.382.2.580.2.4 compose.h 1.50.2.62.2.1 1.50.2.62.2.2 main.c 1.115.2.239.2.2 1.115.2.239.2.3 mimeview.c 1.83.2.170.2.2 1.83.2.170.2.3 prefs_account.c 1.105.2.168.2.1 1.105.2.168.2.2
miras at claws-mail.org
miras at claws-mail.org
Sun Jan 1 11:31:02 CET 2012
Update of /home/claws-mail/claws/src
In directory claws-mail:/tmp/cvs-serv320/src
Modified Files:
Tag: new-contacts
.cvsignore compose.c compose.h main.c mimeview.c
prefs_account.c
Log Message:
2012-01-01 [mir] 3.7.10cvs16.16-new-contacts
* src/.cvsignore
* src/compose.c
* src/compose.h
* src/main.c
* src/mimeview.c
* src/prefs_account.c
Applied patch 3.8.0cvs5 to 3.8.0cvs8 from HEAD.
Index: .cvsignore
===================================================================
RCS file: /home/claws-mail/claws/src/.cvsignore,v
retrieving revision 1.11.2.2
retrieving revision 1.11.2.2.16.1
diff -u -d -r1.11.2.2 -r1.11.2.2.16.1
--- .cvsignore 7 Nov 2006 10:38:30 -0000 1.11.2.2
+++ .cvsignore 1 Jan 2012 10:30:59 -0000 1.11.2.2.16.1
@@ -13,3 +13,4 @@
matcher_parser_parse.c
matcher_parser_parse.h
ylwrap
+client-bindings.h
Index: mimeview.c
===================================================================
RCS file: /home/claws-mail/claws/src/mimeview.c,v
retrieving revision 1.83.2.170.2.2
retrieving revision 1.83.2.170.2.3
diff -u -d -r1.83.2.170.2.2 -r1.83.2.170.2.3
--- mimeview.c 11 Dec 2011 10:24:58 -0000 1.83.2.170.2.2
+++ mimeview.c 1 Jan 2012 10:31:00 -0000 1.83.2.170.2.3
@@ -121,6 +121,8 @@
MimeInfo *partinfo,
gboolean automatic);
#endif
+static void mimeview_send_to (MimeView *mimeview,
+ MimeInfo *partinfo);
static void mimeview_select_next_part (MimeView *mimeview);
static void mimeview_select_prev_part (MimeView *mimeview);
static void mimeview_view_file (const gchar *filename,
@@ -171,6 +173,12 @@
}
#endif
+static void mimeview_send_to_cb(GtkAction *action, gpointer data)
+{
+ MimeView *mimeview = (MimeView *)data;
+ mimeview_send_to(mimeview, mimeview_get_part_to_use(mimeview));
+}
+
static void mimeview_display_as_text_cb(GtkAction *action, gpointer data)
{
mimeview_display_as_text((MimeView *)data);
@@ -202,6 +210,7 @@
#if (!defined MAEMO && !defined G_OS_WIN32)
{ "MimeView/OpenWith", NULL, N_("Open _with (o)..."), NULL, "Open MIME part with...", G_CALLBACK(mimeview_open_with_cb) },
#endif
+ { "MimeView/SendTo", NULL, N_("Send to..."), NULL, "Send to", G_CALLBACK(mimeview_send_to_cb) },
{ "MimeView/DisplayAsText", NULL, N_("_Display as text (t)"), NULL, "Display as text", G_CALLBACK(mimeview_display_as_text_cb) },
{ "MimeView/SaveAs", NULL, N_("_Save as (y)..."), NULL, "Save as", G_CALLBACK(mimeview_save_as_cb) },
{ "MimeView/SaveAll", NULL, N_("Save _all..."), NULL, "Save all parts", G_CALLBACK(mimeview_save_all_cb) },
@@ -307,7 +316,9 @@
column = gtk_tree_view_get_column(GTK_TREE_VIEW(ctree), cols-1);
renderer = gtk_cell_renderer_text_new();
+#if(GTK_CHECK_VERSION(2,18,0))
gtk_cell_renderer_set_alignment(renderer, 1, 0.5);
+#endif
cols = gtk_tree_view_insert_column_with_attributes(GTK_TREE_VIEW(ctree),
-1, titles[COL_SIZE], renderer,
"text", COL_SIZE, NULL);
@@ -406,6 +417,9 @@
GTK_UI_MANAGER_MENUITEM);
#endif
MENUITEM_ADDUI_MANAGER(mimeview->ui_manager,
+ "/Menus/MimeView/", "SendTo", "MimeView/SendTo",
+ GTK_UI_MANAGER_MENUITEM);
+ MENUITEM_ADDUI_MANAGER(mimeview->ui_manager,
"/Menus/MimeView/", "DisplayAsText", "MimeView/DisplayAsText",
GTK_UI_MANAGER_MENUITEM);
MENUITEM_ADDUI_MANAGER(mimeview->ui_manager,
@@ -2196,6 +2210,44 @@
}
#endif
+static void mimeview_send_to(MimeView *mimeview, MimeInfo *partinfo)
+{
+ GList *attach_file = NULL;
+ AttachInfo *ainfo = NULL;
+ gchar *filename;
+ gint err;
+
+ if (!mimeview->opened) return;
+ if (!mimeview->file) return;
+
+ cm_return_if_fail(partinfo != NULL);
+
+ filename = procmime_get_tmp_file_name(partinfo);
+
+ if (!(err = procmime_get_part(filename, partinfo))) {
+ ainfo = g_new0(AttachInfo, 1);
+ ainfo->file = filename;
+ ainfo->name = g_strdup(get_part_name(partinfo));
+ ainfo->content_type = procmime_get_content_type_str(
+ partinfo->type, partinfo->subtype);
+ ainfo->charset = g_strdup(procmime_mimeinfo_get_parameter(
+ partinfo, "charset"));
+ attach_file = g_list_append(attach_file, ainfo);
+
+ compose_new(NULL, NULL, attach_file);
+
+ g_free(ainfo->name);
+ g_free(ainfo->content_type);
+ g_free(ainfo->charset);
+ g_free(ainfo);
+ g_list_free(attach_file);
+ } else
+ alertpanel_error
+ (_("Couldn't save the part of multipart message: %s"),
+ strerror(-err));
+ g_free(filename);
+}
+
static void mimeview_view_file(const gchar *filename, MimeInfo *partinfo,
const gchar *cmd, MimeView *mimeview)
{
Index: compose.h
===================================================================
RCS file: /home/claws-mail/claws/src/compose.h,v
retrieving revision 1.50.2.62.2.1
retrieving revision 1.50.2.62.2.2
diff -u -d -r1.50.2.62.2.1 -r1.50.2.62.2.2
--- compose.h 7 Sep 2011 15:52:25 -0000 1.50.2.62.2.1
+++ compose.h 1 Jan 2012 10:31:00 -0000 1.50.2.62.2.2
@@ -278,7 +278,7 @@
/* attache_files will be locale encode */
Compose *compose_new (PrefsAccount *account,
const gchar *mailto,
- GPtrArray *attach_files);
+ GList *attach_files);
Compose *compose_new_with_folderitem (PrefsAccount *account,
FolderItem *item,
Index: compose.c
===================================================================
RCS file: /home/claws-mail/claws/src/compose.c,v
retrieving revision 1.382.2.580.2.3
retrieving revision 1.382.2.580.2.4
diff -u -d -r1.382.2.580.2.3 -r1.382.2.580.2.4
--- compose.c 11 Dec 2011 10:23:54 -0000 1.382.2.580.2.3
+++ compose.c 1 Jan 2012 10:30:59 -0000 1.382.2.580.2.4
@@ -185,7 +185,7 @@
static Compose *compose_generic_new (PrefsAccount *account,
const gchar *to,
FolderItem *item,
- GPtrArray *attach_files,
+ GList *attach_files,
GList *listAddress );
static Compose *compose_create (PrefsAccount *account,
@@ -896,7 +896,7 @@
}
Compose *compose_new(PrefsAccount *account, const gchar *mailto,
- GPtrArray *attach_files)
+ GList *attach_files)
{
return compose_generic_new(account, mailto, NULL, attach_files, NULL);
}
@@ -956,7 +956,7 @@
}
Compose *compose_generic_new(PrefsAccount *account, const gchar *mailto, FolderItem *item,
- GPtrArray *attach_files, GList *listAddress )
+ GList *attach_files, GList *listAddress )
{
Compose *compose;
GtkTextView *textview;
@@ -1164,12 +1164,13 @@
procmsg_msginfo_free( dummyinfo );
if (attach_files) {
- gint i;
- gchar *file;
+ GList *curr;
+ AttachInfo *ainfo;
- for (i = 0; i < attach_files->len; i++) {
- file = g_ptr_array_index(attach_files, i);
- compose_attach_append(compose, file, file, NULL, NULL);
+ for (curr = attach_files ; curr != NULL ; curr = curr->next) {
+ ainfo = (AttachInfo *) curr->data;
+ compose_attach_append(compose, ainfo->file, ainfo->name,
+ ainfo->content_type, ainfo->charset);
}
}
Index: prefs_account.c
===================================================================
RCS file: /home/claws-mail/claws/src/prefs_account.c,v
retrieving revision 1.105.2.168.2.1
retrieving revision 1.105.2.168.2.2
diff -u -d -r1.105.2.168.2.1 -r1.105.2.168.2.2
--- prefs_account.c 29 Nov 2011 00:15:21 -0000 1.105.2.168.2.1
+++ prefs_account.c 1 Jan 2012 10:31:00 -0000 1.105.2.168.2.2
@@ -4297,11 +4297,7 @@
GTK_TOGGLE_BUTTON(send_page.msgid_checkbtn),
TRUE);
gtk_widget_hide(send_page.msgid_checkbtn);
- if (new_account)
- gtk_toggle_button_set_active(
- GTK_TOGGLE_BUTTON(send_page.xmailer_checkbtn),
- TRUE);
- gtk_widget_hide(send_page.xmailer_checkbtn);
+ gtk_widget_show(send_page.xmailer_checkbtn);
gtk_widget_hide(basic_page.nntpserv_label);
gtk_widget_hide(basic_page.nntpserv_entry);
gtk_table_set_row_spacing (GTK_TABLE (basic_page.serv_table),
Index: main.c
===================================================================
RCS file: /home/claws-mail/claws/src/main.c,v
retrieving revision 1.115.2.239.2.2
retrieving revision 1.115.2.239.2.3
diff -u -d -r1.115.2.239.2.2 -r1.115.2.239.2.3
--- main.c 29 Nov 2011 00:15:21 -0000 1.115.2.239.2.2
+++ main.c 1 Jan 2012 10:31:00 -0000 1.115.2.239.2.3
@@ -199,7 +199,7 @@
gboolean receive_all;
gboolean compose;
const gchar *compose_mailto;
- GPtrArray *attach_files;
+ GList *attach_files;
gboolean search;
const gchar *search_folder;
const gchar *search_type;
@@ -229,7 +229,7 @@
GIOCondition condition);
static void open_compose_new (const gchar *address,
- GPtrArray *attach_files);
+ GList *attach_files);
static void send_queue (void);
static void initial_processing (FolderItem *item, gpointer data);
@@ -1633,8 +1633,8 @@
open_compose_new(cmd.compose_mailto, cmd.attach_files);
}
if (cmd.attach_files) {
- ptr_array_free_strings(cmd.attach_files);
- g_ptr_array_free(cmd.attach_files, TRUE);
+ list_free_strings(cmd.attach_files);
+ g_list_free(cmd.attach_files);
cmd.attach_files = NULL;
}
if (cmd.subscribe) {
@@ -1888,6 +1888,7 @@
static void parse_cmd_opt(int argc, char *argv[])
{
+ AttachInfo *ainfo;
gint i;
for (i = 1; i < argc; i++) {
@@ -1926,9 +1927,6 @@
gchar *file = NULL;
while (p && *p != '\0' && *p != '-') {
- if (!cmd.attach_files) {
- cmd.attach_files = g_ptr_array_new();
- }
if ((file = g_filename_from_uri(p, NULL, NULL)) != NULL) {
if (!is_file_exist(file)) {
g_free(file);
@@ -1942,7 +1940,9 @@
} else if (file == NULL) {
file = g_strdup(p);
}
- g_ptr_array_add(cmd.attach_files, file);
+ ainfo = g_new0(AttachInfo, 1);
+ ainfo->file = file;
+ cmd.attach_files = g_list_append(cmd.attach_files, ainfo);
i++;
p = (i+1 < argc)?argv[i+1]:NULL;
}
@@ -2262,6 +2262,7 @@
static gint prohibit_duplicate_launch(void)
{
gint uxsock;
+ GList *curr;
#ifdef G_OS_UNIX
gchar *path;
@@ -2304,7 +2305,6 @@
fd_write_all(uxsock, "receive\n", 8);
} else if (cmd.compose && cmd.attach_files) {
gchar *str, *compose_str;
- gint i;
if (cmd.compose_mailto) {
compose_str = g_strdup_printf("compose_attach %s\n",
@@ -2316,8 +2316,8 @@
fd_write_all(uxsock, compose_str, strlen(compose_str));
g_free(compose_str);
- for (i = 0; i < cmd.attach_files->len; i++) {
- str = g_ptr_array_index(cmd.attach_files, i);
+ for (curr = cmd.attach_files; curr != NULL ; curr = curr->next) {
+ str = (gchar *) ((AttachInfo *)curr->data)->file;
fd_write_all(uxsock, str, strlen(str));
fd_write_all(uxsock, "\n", 1);
}
@@ -2481,20 +2481,29 @@
} else if (!strncmp(buf, "receive", 7)) {
inc_mail(mainwin, prefs_common.newmail_notify_manu);
} else if (!strncmp(buf, "compose_attach", 14)) {
- GPtrArray *files;
+ GList *files = NULL, *curr;
+ AttachInfo *ainfo;
gchar *mailto;
mailto = g_strdup(buf + strlen("compose_attach") + 1);
- files = g_ptr_array_new();
while (fd_gets(sock, buf, sizeof(buf)) > 0) {
strretchomp(buf);
if (!strcmp2(buf, "."))
break;
- g_ptr_array_add(files, g_strdup(buf));
+
+ ainfo = g_new0(AttachInfo, 1);
+ ainfo->file = g_strdup(buf);
+ files = g_list_append(files, ainfo);
}
open_compose_new(mailto, files);
- ptr_array_free_strings(files);
- g_ptr_array_free(files, TRUE);
+
+ curr = g_list_first(files);
+ while (curr != NULL) {
+ ainfo = (AttachInfo *)curr->data;
+ g_free(ainfo->file);
+ g_free(ainfo);
+ }
+ g_list_free(files);
g_free(mailto);
} else if (!strncmp(buf, "compose", 7)) {
open_compose_new(buf + strlen("compose") + 1, NULL);
@@ -2598,7 +2607,7 @@
}
-static void open_compose_new(const gchar *address, GPtrArray *attach_files)
+static void open_compose_new(const gchar *address, GList *attach_files)
{
gchar *addr = NULL;
More information about the Commits
mailing list