0.8.8claws71
authorChristoph Hohmann <reboot@gmx.ch>
Thu, 9 Jan 2003 20:38:38 +0000 (20:38 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Thu, 9 Jan 2003 20:38:38 +0000 (20:38 +0000)
* 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)

ChangeLog.claws
configure.in
src/compose.c
src/gtk/menu.c
src/gtk/menu.h

index 9a49386..891056f 100644 (file)
@@ -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
index 149b4ce..531c1b3 100644 (file)
@@ -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
index 6a670b4..da487c1 100644 (file)
@@ -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 : "");
index 2bbf7ca..6c527ef 100644 (file)
@@ -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);
+}
index 4e7e2bb..d4a49db 100644 (file)
@@ -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__ */