2006-06-25 [ticho] 2.3.1cvs20

* src/compose.c
	* src/exphtmldlg.c
	* src/gtk/gtkutils.c
	* src/gtk/gtkutils.h
	Added second argument to gtkut_sc_combobox_create() to
	control focus-on-click for the widget.
	Migrated the only GtkOptionMenu in exphtmldlg.c to GtkComboBox.
This commit is contained in:
Andrej Kacian 2006-06-25 17:01:28 +00:00
parent 879857dc65
commit 7452a07576
7 changed files with 40 additions and 79 deletions

View file

@ -1,3 +1,13 @@
2006-06-25 [ticho] 2.3.1cvs20
* src/compose.c
* src/exphtmldlg.c
* src/gtk/gtkutils.c
* src/gtk/gtkutils.h
Added second argument to gtkut_sc_combobox_create() to
control focus-on-click for the widget.
Migrated the only GtkOptionMenu in exphtmldlg.c to GtkComboBox.
2006-06-25 [ticho] 2.3.1cvs19
* src/compose.c

View file

@ -1620,3 +1620,4 @@
( cvs diff -u -r 1.382.2.284 -r 1.382.2.285 src/compose.c; cvs diff -u -r 1.204.2.89 -r 1.204.2.90 src/prefs_common.c; cvs diff -u -r 1.103.2.52 -r 1.103.2.53 src/prefs_common.h; cvs diff -u -r 1.1.2.8 -r 1.1.2.9 src/prefs_compose_writing.c; ) > 2.3.1cvs17.patchset
( cvs diff -u -r 1.204.2.90 -r 1.204.2.91 src/prefs_common.c; ) > 2.3.1cvs18.patchset
( cvs diff -u -r 1.382.2.285 -r 1.382.2.286 src/compose.c; cvs diff -u -r 1.20.2.8 -r 1.20.2.9 src/gtk/Makefile.am; diff -u /dev/null src/gtk/combobox.c; diff -u /dev/null src/gtk/combobox.h; cvs diff -u -r 1.5.2.28 -r 1.5.2.29 src/gtk/gtkutils.c; cvs diff -u -r 1.4.2.20 -r 1.4.2.21 src/gtk/gtkutils.h; ) > 2.3.1cvs19.patchset
( cvs diff -u -r 1.382.2.286 -r 1.382.2.287 src/compose.c; cvs diff -u -r 1.3.2.16 -r 1.3.2.17 src/exphtmldlg.c; cvs diff -u -r 1.5.2.29 -r 1.5.2.30 src/gtk/gtkutils.c; cvs diff -u -r 1.4.2.21 -r 1.4.2.22 src/gtk/gtkutils.h; ) > 2.3.1cvs20.patchset

View file

@ -11,7 +11,7 @@ MINOR_VERSION=3
MICRO_VERSION=1
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=19
EXTRA_VERSION=20
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=

View file

@ -6158,7 +6158,7 @@ static GtkWidget *compose_account_option_menu_create(Compose *compose)
g_return_val_if_fail(accounts != NULL, NULL);
optmenubox = gtk_event_box_new();
optmenu = gtkut_sc_combobox_create(optmenubox);
optmenu = gtkut_sc_combobox_create(optmenubox, FALSE);
menu = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(optmenu)));
hbox = gtk_hbox_new(FALSE, 6);
@ -6972,7 +6972,7 @@ static void compose_attach_property_create(gboolean *cancelled)
gtk_table_attach(GTK_TABLE(table), hbox, 1, 2, 1, 2,
GTK_EXPAND|GTK_SHRINK|GTK_FILL, 0, 0, 0);
optmenu = gtkut_sc_combobox_create(NULL);
optmenu = gtkut_sc_combobox_create(NULL, TRUE);
optmenu_menu = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(optmenu)));
COMBOBOX_ADD(optmenu_menu, "7bit", ENC_7BIT);

View file

@ -47,6 +47,7 @@
#include "utils.h"
#include "manage_window.h"
#include "filesel.h"
#include "combobox.h"
#define PAGE_FILE_INFO 0
#define PAGE_FORMAT 1
@ -210,19 +211,14 @@ static gboolean exp_html_move_file( void ) {
*/
static gboolean exp_html_move_format( void ) {
gboolean retVal = FALSE;
GtkWidget *menu, *menuItem;
gint id;
/* Set stylesheet */
menu = gtk_option_menu_get_menu( GTK_OPTION_MENU( exphtml_dlg.optmenuCSS ) );
menuItem = gtk_menu_get_active( GTK_MENU( menu ) );
id = GPOINTER_TO_INT( gtk_object_get_user_data(GTK_OBJECT(menuItem)) );
id = combobox_get_active_data(GTK_COMBO_BOX(exphtml_dlg.optmenuCSS));
exporthtml_set_stylesheet( _exportCtl_, id );
/* Set name format */
menu = gtk_option_menu_get_menu( GTK_OPTION_MENU( exphtml_dlg.optmenuName ) );
menuItem = gtk_menu_get_active( GTK_MENU( menu ) );
id = GPOINTER_TO_INT( gtk_object_get_user_data(GTK_OBJECT(menuItem)) );
id = combobox_get_active_data(GTK_COMBO_BOX(exphtml_dlg.optmenuName));
exporthtml_set_name_format( _exportCtl_, id );
exporthtml_set_banding( _exportCtl_,
@ -425,11 +421,12 @@ static void export_html_page_format( gint pageNum, gchar *pageLbl ) {
GtkWidget *label;
GtkWidget *optmenuCSS;
GtkWidget *optmenuName;
GtkWidget *menu;
GtkWidget *menuItem;
GtkListStore *menu;
GtkTreeIter iter;
GtkWidget *checkBanding;
GtkWidget *checkLinkEMail;
GtkWidget *checkAttributes;
gint top;
vbox = gtk_vbox_new(FALSE, 8);
@ -457,52 +454,16 @@ static void export_html_page_format( gint pageNum, gchar *pageLbl ) {
GTK_FILL, 0, 0, 0);
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
menu = gtk_menu_new();
optmenuCSS = gtkut_sc_combobox_create(NULL, TRUE);
menu = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(optmenuCSS)));
menuItem = gtk_menu_item_new_with_label( _( "None" ) );
gtk_object_set_user_data( GTK_OBJECT( menuItem ),
GINT_TO_POINTER( EXPORT_HTML_ID_NONE ) );
gtk_menu_append( GTK_MENU(menu), menuItem );
gtk_widget_show( menuItem );
menuItem = gtk_menu_item_new_with_label( _( "Default" ) );
gtk_object_set_user_data( GTK_OBJECT( menuItem ),
GINT_TO_POINTER( EXPORT_HTML_ID_DEFAULT ) );
gtk_menu_append( GTK_MENU(menu), menuItem );
gtk_widget_show( menuItem );
menuItem = gtk_menu_item_new_with_label( _( "Full" ) );
gtk_object_set_user_data( GTK_OBJECT( menuItem ),
GINT_TO_POINTER( EXPORT_HTML_ID_FULL ) );
gtk_menu_append( GTK_MENU(menu), menuItem );
gtk_widget_show( menuItem );
menuItem = gtk_menu_item_new_with_label( _( "Custom" ) );
gtk_object_set_user_data( GTK_OBJECT( menuItem ),
GINT_TO_POINTER( EXPORT_HTML_ID_CUSTOM ) );
gtk_menu_append( GTK_MENU(menu), menuItem );
gtk_widget_show( menuItem );
menuItem = gtk_menu_item_new_with_label( _( "Custom-2" ) );
gtk_object_set_user_data( GTK_OBJECT( menuItem ),
GINT_TO_POINTER( EXPORT_HTML_ID_CUSTOM2 ) );
gtk_menu_append( GTK_MENU(menu), menuItem );
gtk_widget_show( menuItem );
menuItem = gtk_menu_item_new_with_label( _( "Custom-3" ) );
gtk_object_set_user_data( GTK_OBJECT( menuItem ),
GINT_TO_POINTER( EXPORT_HTML_ID_CUSTOM3 ) );
gtk_menu_append( GTK_MENU(menu), menuItem );
gtk_widget_show( menuItem );
menuItem = gtk_menu_item_new_with_label( _( "Custom-4" ) );
gtk_object_set_user_data( GTK_OBJECT( menuItem ),
GINT_TO_POINTER( EXPORT_HTML_ID_CUSTOM4 ) );
gtk_menu_append( GTK_MENU(menu), menuItem );
gtk_widget_show( menuItem );
optmenuCSS = gtk_option_menu_new();
gtk_option_menu_set_menu( GTK_OPTION_MENU( optmenuCSS ), menu );
COMBOBOX_ADD(menu, _("None"), EXPORT_HTML_ID_NONE);
COMBOBOX_ADD(menu, _("Default"), EXPORT_HTML_ID_DEFAULT);
COMBOBOX_ADD(menu, _("Full"), EXPORT_HTML_ID_FULL);
COMBOBOX_ADD(menu, _("Custom"), EXPORT_HTML_ID_CUSTOM);
COMBOBOX_ADD(menu, _("Custom-2"), EXPORT_HTML_ID_CUSTOM2);
COMBOBOX_ADD(menu, _("Custom-3"), EXPORT_HTML_ID_CUSTOM3);
COMBOBOX_ADD(menu, _("Custom-4"), EXPORT_HTML_ID_CUSTOM4);
gtk_table_attach(GTK_TABLE(table), optmenuCSS, 1, 2, top, (top + 1),
GTK_FILL, 0, 0, 0);
@ -514,22 +475,11 @@ static void export_html_page_format( gint pageNum, gchar *pageLbl ) {
GTK_FILL, 0, 0, 0);
gtk_misc_set_alignment(GTK_MISC(label), 0, 0.5);
menu = gtk_menu_new();
optmenuName = gtkut_sc_combobox_create(NULL, TRUE);
menu = GTK_LIST_STORE(gtk_combo_box_get_model(GTK_COMBO_BOX(optmenuName)));
menuItem = gtk_menu_item_new_with_label( _( "First Name, Last Name" ) );
gtk_object_set_user_data( GTK_OBJECT( menuItem ),
GINT_TO_POINTER( EXPORT_HTML_FIRST_LAST ) );
gtk_menu_append( GTK_MENU(menu), menuItem );
gtk_widget_show( menuItem );
menuItem = gtk_menu_item_new_with_label( _( "Last Name, First Name" ) );
gtk_object_set_user_data( GTK_OBJECT( menuItem ),
GINT_TO_POINTER( EXPORT_HTML_LAST_FIRST ) );
gtk_menu_append( GTK_MENU(menu), menuItem );
gtk_widget_show( menuItem );
optmenuName = gtk_option_menu_new();
gtk_option_menu_set_menu( GTK_OPTION_MENU( optmenuName ), menu );
COMBOBOX_ADD(menu, _("First Name, Last Name"), EXPORT_HTML_FIRST_LAST);
COMBOBOX_ADD(menu, _("Last Name, First Name"), EXPORT_HTML_LAST_FIRST);
gtk_table_attach(GTK_TABLE(table), optmenuName, 1, 2, top, (top + 1),
GTK_FILL, 0, 0, 0);
@ -728,10 +678,10 @@ static void export_html_fill_fields( ExportHtmlCtl *ctl ) {
ctl->path );
}
gtk_option_menu_set_history(
GTK_OPTION_MENU( exphtml_dlg.optmenuCSS ), ctl->stylesheet );
gtk_option_menu_set_history(
GTK_OPTION_MENU( exphtml_dlg.optmenuName ), ctl->nameFormat );
combobox_select_by_data(
GTK_COMBO_BOX(exphtml_dlg.optmenuCSS), ctl->stylesheet );
combobox_select_by_data(
GTK_COMBO_BOX(exphtml_dlg.optmenuName), ctl->nameFormat );
gtk_toggle_button_set_active(
GTK_TOGGLE_BUTTON( exphtml_dlg.checkBanding ), ctl->banding );
gtk_toggle_button_set_active(

View file

@ -1281,7 +1281,7 @@ GtkWidget *gtkut_get_link_btn(GtkWidget *window, const gchar *url, const gchar *
return btn;
}
GtkWidget *gtkut_sc_combobox_create(GtkWidget *eventbox)
GtkWidget *gtkut_sc_combobox_create(GtkWidget *eventbox, gboolean focus_on_click)
{
GtkWidget *combobox;
GtkListStore *menu;
@ -1300,7 +1300,7 @@ GtkWidget *gtkut_sc_combobox_create(GtkWidget *eventbox)
if( eventbox != NULL )
gtk_container_add(GTK_CONTAINER(eventbox), combobox);
gtk_combo_box_set_focus_on_click(GTK_COMBO_BOX(combobox), FALSE);
gtk_combo_box_set_focus_on_click(GTK_COMBO_BOX(combobox), focus_on_click);
return combobox;
}

View file

@ -204,6 +204,6 @@ gboolean get_tag_range(GtkTextIter *iter,
GtkWidget *face_get_from_header(const gchar *o_face);
GtkWidget *gtkut_get_link_btn(GtkWidget *window, const gchar *url, const gchar *label);
GtkWidget *gtkut_sc_combobox_create(GtkWidget *eventbox);
GtkWidget *gtkut_sc_combobox_create(GtkWidget *eventbox, gboolean focus_on_click);
#endif /* __GTKUTILS_H__ */