From: Christoph Hohmann Date: Thu, 9 Jan 2003 20:38:38 +0000 (+0000) Subject: 0.8.8claws71 X-Git-Tag: rel_0_8_9~78 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=e5c38a05bfbc867fefa259d4e8ce436b60155d64;hp=d0df72ba50a277f84e412b47e79a07cca9fcbed2 0.8.8claws71 * src/compose.c * src/gtk/menu.[ch] fix wrong selecting of mime encoding type, when opening property dialog of attachments in the compose window. 7bit was always selected and that destoryed files with 8bit data. (closes bug #9 Sylpheed-claws destroys attachments when changing MIME-types) --- diff --git a/ChangeLog.claws b/ChangeLog.claws index 9a4938645..891056f3b 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,14 @@ +2003-01-09 [christoph] 0.8.8claws71 + + * src/compose.c + * src/gtk/menu.[ch] + fix wrong selecting of mime encoding type, when + opening property dialog of attachments in the + compose window. 7bit was always selected and that + destoryed files with 8bit data. + (closes bug #9 Sylpheed-claws destroys attachments when + changing MIME-types) + 2003-01-09 [paul] 0.8.8claws70 * sync with 0.8.8cvs3 @@ -24,7 +35,7 @@ name to be edited and remarks to be entered Patch submitted by Luke Plant -2003-01-08 [darko] +2003-01-08 [darko] 0.8.8claws66 * README.claws, src/summaryview.c fix description for marked messages diff --git a/configure.in b/configure.in index 149b4cebe..531c1b3eb 100644 --- a/configure.in +++ b/configure.in @@ -11,7 +11,7 @@ MINOR_VERSION=8 MICRO_VERSION=8 INTERFACE_AGE=0 BINARY_AGE=0 -EXTRA_VERSION=claws70 +EXTRA_VERSION=claws71 VERSION=$MAJOR_VERSION.$MINOR_VERSION.$MICRO_VERSION$EXTRA_VERSION dnl set $target diff --git a/src/compose.c b/src/compose.c index 6a670b443..da487c138 100644 --- a/src/compose.c +++ b/src/compose.c @@ -5305,9 +5305,11 @@ static void compose_attach_property(Compose *compose) optmenu = GTK_OPTION_MENU(attach_prop.encoding_optmenu); if (ainfo->encoding == ENC_UNKNOWN) - gtk_option_menu_set_history(optmenu, ENC_BASE64); + menu_select_by_data(gtk_option_menu_get_menu(optmenu), + GINT_TO_POINTER(ENC_BASE64)); else - gtk_option_menu_set_history(optmenu, ainfo->encoding); + menu_select_by_data(gtk_option_menu_get_menu(optmenu), + GINT_TO_POINTER(ainfo->encoding)); gtk_entry_set_text(GTK_ENTRY(attach_prop.mimetype_entry), ainfo->content_type ? ainfo->content_type : ""); diff --git a/src/gtk/menu.c b/src/gtk/menu.c index 2bbf7cad9..6c527ef63 100644 --- a/src/gtk/menu.c +++ b/src/gtk/menu.c @@ -306,6 +306,26 @@ void menu_connect_identical_items(void) } } +void menu_select_by_data(GtkMenu *menu, gpointer data) +{ + GList *children, *cur; + GtkWidget *select_item = NULL; + + g_return_if_fail(menu != NULL); + children = gtk_container_children(GTK_CONTAINER(menu)); - + for (cur = children; cur != NULL; cur = g_list_next(cur)) { + GtkObject *child = GTK_OBJECT(cur->data); + + if (gtk_object_get_user_data(child) == data) { + select_item = GTK_WIDGET(child); + } + } + if (select_item != NULL) { + gtk_menu_shell_select_item(GTK_MENU_SHELL(menu), select_item); + gtk_menu_shell_activate_item(GTK_MENU_SHELL(menu), select_item, FALSE); + } + + g_list_free(children); +} diff --git a/src/gtk/menu.h b/src/gtk/menu.h index 4e7e2bbee..d4a49dba6 100644 --- a/src/gtk/menu.h +++ b/src/gtk/menu.h @@ -77,4 +77,7 @@ gint menu_find_option_menu_index(GtkOptionMenu *optmenu, void menu_connect_identical_items(void); +void menu_select_by_data (GtkMenu *menu, + gpointer data); + #endif /* __MENU_H__ */