2007-08-15 [ticho] 2.10.0cvs124
authorAndrej Kacian <ticho@claws-mail.org>
Wed, 15 Aug 2007 21:47:44 +0000 (21:47 +0000)
committerAndrej Kacian <ticho@claws-mail.org>
Wed, 15 Aug 2007 21:47:44 +0000 (21:47 +0000)
* src/prefs_compose_writing.c
Convert the insert-or-attach-dragged-files GtkOptionMenu
into GtkComboBox.

ChangeLog
PATCHSETS
configure.ac
src/prefs_compose_writing.c

index abee8f9262b2d80c5068750fb2c522566b42c61e..8487e66c64c4aaeccf1e1bb9d90e79372f339d55 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2007-08-15 [ticho]     2.10.0cvs124
+
+       * src/prefs_compose_writing.c
+               Convert the insert-or-attach-dragged-files GtkOptionMenu
+               into GtkComboBox.
+
 2007-08-14 [ticho]     2.10.0cvs123
 
        * src/messageview.c
 2007-08-14 [ticho]     2.10.0cvs123
 
        * src/messageview.c
index 07109c109a0a07ab2ede3912b31b711e73cee4d2..c956747b58776a233b5dd69fe316ad7f93666461 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.25.2.20 -r 1.25.2.21 tools/Makefile.am;  cvs diff -u -r 1.30.2.22 -r 1.30.2.23 tools/README;  diff -u /dev/null tools/popfile-link.sh;  ) > 2.10.0cvs121.patchset
 ( cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/prefs_logging.c;  ) > 2.10.0cvs122.patchset
 ( cvs diff -u -r 1.94.2.144 -r 1.94.2.145 src/messageview.c;  cvs diff -u -r 1.5.2.64 -r 1.5.2.65 src/gtk/gtkutils.c;  ) > 2.10.0cvs123.patchset
 ( cvs diff -u -r 1.25.2.20 -r 1.25.2.21 tools/Makefile.am;  cvs diff -u -r 1.30.2.22 -r 1.30.2.23 tools/README;  diff -u /dev/null tools/popfile-link.sh;  ) > 2.10.0cvs121.patchset
 ( cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/prefs_logging.c;  ) > 2.10.0cvs122.patchset
 ( cvs diff -u -r 1.94.2.144 -r 1.94.2.145 src/messageview.c;  cvs diff -u -r 1.5.2.64 -r 1.5.2.65 src/gtk/gtkutils.c;  ) > 2.10.0cvs123.patchset
+( cvs diff -u -r 1.1.2.22 -r 1.1.2.23 src/prefs_compose_writing.c;  ) > 2.10.0cvs124.patchset
index cea924143c9d14f98c57ff2c2dc905904196de24..bd42d7b47579eec98249eee559dc0b4f8094752e 100644 (file)
@@ -11,7 +11,7 @@ MINOR_VERSION=10
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
 MICRO_VERSION=0
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=123
+EXTRA_VERSION=124
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index fda92b57b869f41ab2df01c43e784a9702f0fc29..0d9464c33591c65cd44bba656a8974b54c035ab2 100644 (file)
@@ -43,6 +43,7 @@
 #include "quote_fmt.h"
 #include "prefs_template.h"
 #include "alertpanel.h"
 #include "quote_fmt.h"
 #include "prefs_template.h"
 #include "alertpanel.h"
+#include "combobox.h"
 
 typedef struct _WritingPage
 {
 
 typedef struct _WritingPage
 {
@@ -102,8 +103,8 @@ static void prefs_compose_writing_create_widget(PrefsPage *_page, GtkWindow *win
        GtkWidget *hbox_dnd_insert_or_attach;
        GtkWidget *label_dnd_insert_or_attach;
        GtkWidget *optmenu_dnd_insert_or_attach;
        GtkWidget *hbox_dnd_insert_or_attach;
        GtkWidget *label_dnd_insert_or_attach;
        GtkWidget *optmenu_dnd_insert_or_attach;
-       GtkWidget *menu;
-       GtkWidget *menuitem;
+       GtkListStore *menu;
+       GtkTreeIter iter;
 
        GtkWidget *frame_quote;
        GtkWidget *hbox1;
 
        GtkWidget *frame_quote;
        GtkWidget *hbox1;
@@ -192,15 +193,14 @@ static void prefs_compose_writing_create_widget(PrefsPage *_page, GtkWindow *win
        gtk_misc_set_alignment(GTK_MISC(label_dnd_insert_or_attach), 0, 0.5);
        gtk_widget_show (label_dnd_insert_or_attach);
 
        gtk_misc_set_alignment(GTK_MISC(label_dnd_insert_or_attach), 0, 0.5);
        gtk_widget_show (label_dnd_insert_or_attach);
 
-       optmenu_dnd_insert_or_attach = gtk_option_menu_new ();
+       optmenu_dnd_insert_or_attach = gtkut_sc_combobox_create(NULL, FALSE);
        gtk_widget_show (optmenu_dnd_insert_or_attach);
 
        gtk_widget_show (optmenu_dnd_insert_or_attach);
 
-       menu = gtk_menu_new ();
-       MENUITEM_ADD (menu, menuitem, _("Ask"), COMPOSE_DND_ASK);
-       MENUITEM_ADD (menu, menuitem, _("Insert"), COMPOSE_DND_INSERT);
-       MENUITEM_ADD (menu, menuitem, _("Attach"), COMPOSE_DND_ATTACH);
-
-       gtk_option_menu_set_menu (GTK_OPTION_MENU (optmenu_dnd_insert_or_attach), menu);
+       menu = GTK_LIST_STORE(gtk_combo_box_get_model(
+                               GTK_COMBO_BOX(optmenu_dnd_insert_or_attach)));
+       COMBOBOX_ADD (menu, _("Ask"), COMPOSE_DND_ASK);
+       COMBOBOX_ADD (menu, _("Insert"), COMPOSE_DND_INSERT);
+       COMBOBOX_ADD (menu, _("Attach"), COMPOSE_DND_ATTACH);
 
        hbox_dnd_insert_or_attach = gtk_hbox_new(FALSE, 20);
        gtk_widget_show(hbox_dnd_insert_or_attach);
 
        hbox_dnd_insert_or_attach = gtk_hbox_new(FALSE, 20);
        gtk_widget_show(hbox_dnd_insert_or_attach);
@@ -284,7 +284,7 @@ static void prefs_compose_writing_create_widget(PrefsPage *_page, GtkWindow *win
                        prefs_common.reply_with_quote);
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(prefs_writing->checkbtn_default_reply_list),
                prefs_common.default_reply_list);
                        prefs_common.reply_with_quote);
        gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(prefs_writing->checkbtn_default_reply_list),
                prefs_common.default_reply_list);
-       gtk_option_menu_set_history(GTK_OPTION_MENU(optmenu_dnd_insert_or_attach),
+       combobox_select_by_data(GTK_COMBO_BOX(optmenu_dnd_insert_or_attach),
                prefs_common.compose_dnd_mode);
        gtk_entry_set_text(GTK_ENTRY(entry_quote_chars), 
                        prefs_common.quote_chars?prefs_common.quote_chars:"");
                prefs_common.compose_dnd_mode);
        gtk_entry_set_text(GTK_ENTRY(entry_quote_chars), 
                        prefs_common.quote_chars?prefs_common.quote_chars:"");
@@ -294,10 +294,8 @@ static void prefs_compose_writing_create_widget(PrefsPage *_page, GtkWindow *win
 
 static void prefs_compose_writing_save(PrefsPage *_page)
 {
 
 static void prefs_compose_writing_save(PrefsPage *_page)
 {
-       GtkWidget *menu;
-       GtkWidget *menuitem;
-
        WritingPage *page = (WritingPage *) _page;
        WritingPage *page = (WritingPage *) _page;
+
        prefs_common.auto_exteditor = 
                gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_autoextedit));
        prefs_common.forward_as_attachment =
        prefs_common.auto_exteditor = 
                gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_autoextedit));
        prefs_common.forward_as_attachment =
@@ -322,10 +320,8 @@ static void prefs_compose_writing_save(PrefsPage *_page)
        prefs_common.default_reply_list =
                gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_default_reply_list));
        
        prefs_common.default_reply_list =
                gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->checkbtn_default_reply_list));
        
-       menu = gtk_option_menu_get_menu(GTK_OPTION_MENU(page->optmenu_dnd_insert_or_attach));
-       menuitem = gtk_menu_get_active(GTK_MENU(menu));
-       prefs_common.compose_dnd_mode = GPOINTER_TO_INT
-               (g_object_get_data(G_OBJECT(menuitem), MENU_VAL_ID));
+       prefs_common.compose_dnd_mode = combobox_get_active_data(
+                       GTK_COMBO_BOX(page->optmenu_dnd_insert_or_attach));
 
        g_free(prefs_common.quote_chars); 
        prefs_common.quote_chars = gtk_editable_get_chars(
 
        g_free(prefs_common.quote_chars); 
        prefs_common.quote_chars = gtk_editable_get_chars(