2008-08-07 [colin] 3.5.0cvs54

* src/compose.c
	* src/editaddress.c
	* src/folderview.c
	* src/mainwindow.c
	* src/message_search.c
	* src/mimeview.c
	* src/noticeview.c
	* src/prefs_account.c
	* src/prefs_common.c
	* src/prefs_customheader.c
	* src/prefs_ext_prog.c
	* src/prefs_filtering_action.c
	* src/prefs_gtk.c
	* src/prefs_logging.c
	* src/prefs_matcher.c
	* src/prefs_msg_colors.c
	* src/procmime.c
	* src/summary_search.c
	* src/summaryview.c
	* src/toolbar.c
	* src/gtk/colorsel.c
	* src/gtk/gtkaspell.c
	* src/gtk/gtkutils.c
	* src/gtk/gtkutils.h
	* src/gtk/inputdialog.c
	* src/gtk/pluginwindow.c
	* src/gtk/quicksearch.c
	* src/plugins/bogofilter/bogofilter_gtk.c
	* src/plugins/dillo_viewer/dillo_prefs.c
	* src/plugins/spamassassin/spamassassin_gtk.c
		- Fix Ctrl-Space shortcut
		- Fix mime-parsing bug in procmime (cvs52)
		- Fix double-free in procmime (cvs52)
		- Use gtk_bin_get_child instead of GTK_BIN()->child
		- Fix Goto menu in mainwindow
This commit is contained in:
Colin Leroy 2008-08-07 16:39:17 +00:00
parent 313464ee06
commit 615cf77bea
33 changed files with 253 additions and 190 deletions

View file

@ -1,3 +1,41 @@
2008-08-07 [colin] 3.5.0cvs54
* src/compose.c
* src/editaddress.c
* src/folderview.c
* src/mainwindow.c
* src/message_search.c
* src/mimeview.c
* src/noticeview.c
* src/prefs_account.c
* src/prefs_common.c
* src/prefs_customheader.c
* src/prefs_ext_prog.c
* src/prefs_filtering_action.c
* src/prefs_gtk.c
* src/prefs_logging.c
* src/prefs_matcher.c
* src/prefs_msg_colors.c
* src/procmime.c
* src/summary_search.c
* src/summaryview.c
* src/toolbar.c
* src/gtk/colorsel.c
* src/gtk/gtkaspell.c
* src/gtk/gtkutils.c
* src/gtk/gtkutils.h
* src/gtk/inputdialog.c
* src/gtk/pluginwindow.c
* src/gtk/quicksearch.c
* src/plugins/bogofilter/bogofilter_gtk.c
* src/plugins/dillo_viewer/dillo_prefs.c
* src/plugins/spamassassin/spamassassin_gtk.c
- Fix Ctrl-Space shortcut
- Fix mime-parsing bug in procmime (cvs52)
- Fix double-free in procmime (cvs52)
- Use gtk_bin_get_child instead of GTK_BIN()->child
- Fix Goto menu in mainwindow
2008-08-07 [mones] 3.5.0cvs53
* po/es.po

View file

@ -3465,3 +3465,4 @@
( cvs diff -u -r 1.382.2.463 -r 1.382.2.464 src/compose.c; ) > 3.5.0cvs51.patchset
( cvs diff -u -r 1.22.2.19 -r 1.22.2.20 src/addrbook.c; cvs diff -u -r 1.1.4.7 -r 1.1.4.8 src/addrcindex.c; cvs diff -u -r 1.1.2.12 -r 1.1.2.13 src/addrduplicates.c; cvs diff -u -r 1.6.10.17 -r 1.6.10.18 src/addrharvest.c; cvs diff -u -r 1.3.2.5 -r 1.3.2.6 src/enriched.c; cvs diff -u -r 1.12.2.24 -r 1.12.2.25 src/html.c; cvs diff -u -r 1.12.2.17 -r 1.12.2.18 src/ldif.c; cvs diff -u -r 1.83.2.140 -r 1.83.2.141 src/mimeview.c; cvs diff -u -r 1.6.10.14 -r 1.6.10.15 src/mutt.c; cvs diff -u -r 1.6.2.13 -r 1.6.2.14 src/pine.c; cvs diff -u -r 1.49.2.110 -r 1.49.2.111 src/procmime.c; cvs diff -u -r 1.14.2.15 -r 1.14.2.16 src/vcard.c; cvs diff -u -r 1.1.2.72 -r 1.1.2.73 src/wizard.c; ) > 3.5.0cvs52.patchset
( cvs diff -u -r 1.60.2.53 -r 1.60.2.54 po/es.po; cvs diff -u -r 1.382.2.464 -r 1.382.2.465 src/compose.c; cvs diff -u -r 1.274.2.263 -r 1.274.2.264 src/mainwindow.c; ) > 3.5.0cvs53.patchset
( cvs diff -u -r 1.382.2.465 -r 1.382.2.466 src/compose.c; cvs diff -u -r 1.14.2.52 -r 1.14.2.53 src/editaddress.c; cvs diff -u -r 1.207.2.205 -r 1.207.2.206 src/folderview.c; cvs diff -u -r 1.274.2.264 -r 1.274.2.265 src/mainwindow.c; cvs diff -u -r 1.3.12.31 -r 1.3.12.32 src/message_search.c; cvs diff -u -r 1.83.2.141 -r 1.83.2.142 src/mimeview.c; cvs diff -u -r 1.5.2.18 -r 1.5.2.19 src/noticeview.c; cvs diff -u -r 1.105.2.141 -r 1.105.2.142 src/prefs_account.c; cvs diff -u -r 1.204.2.175 -r 1.204.2.176 src/prefs_common.c; cvs diff -u -r 1.16.2.32 -r 1.16.2.33 src/prefs_customheader.c; cvs diff -u -r 1.3.2.20 -r 1.3.2.21 src/prefs_ext_prog.c; cvs diff -u -r 1.1.4.55 -r 1.1.4.56 src/prefs_filtering_action.c; cvs diff -u -r 1.10.2.37 -r 1.10.2.38 src/prefs_gtk.c; cvs diff -u -r 1.1.2.14 -r 1.1.2.15 src/prefs_logging.c; cvs diff -u -r 1.43.2.75 -r 1.43.2.76 src/prefs_matcher.c; cvs diff -u -r 1.1.2.38 -r 1.1.2.39 src/prefs_msg_colors.c; cvs diff -u -r 1.49.2.111 -r 1.49.2.112 src/procmime.c; cvs diff -u -r 1.15.2.55 -r 1.15.2.56 src/summary_search.c; cvs diff -u -r 1.395.2.380 -r 1.395.2.381 src/summaryview.c; cvs diff -u -r 1.43.2.103 -r 1.43.2.104 src/toolbar.c; cvs diff -u -r 1.1.4.12 -r 1.1.4.13 src/gtk/colorsel.c; cvs diff -u -r 1.9.2.58 -r 1.9.2.59 src/gtk/gtkaspell.c; cvs diff -u -r 1.5.2.80 -r 1.5.2.81 src/gtk/gtkutils.c; cvs diff -u -r 1.4.2.44 -r 1.4.2.45 src/gtk/gtkutils.h; cvs diff -u -r 1.2.2.30 -r 1.2.2.31 src/gtk/inputdialog.c; cvs diff -u -r 1.5.2.52 -r 1.5.2.53 src/gtk/pluginwindow.c; cvs diff -u -r 1.1.2.84 -r 1.1.2.85 src/gtk/quicksearch.c; cvs diff -u -r 1.1.2.33 -r 1.1.2.34 src/plugins/bogofilter/bogofilter_gtk.c; cvs diff -u -r 1.5.2.23 -r 1.5.2.24 src/plugins/dillo_viewer/dillo_prefs.c; cvs diff -u -r 1.23.2.49 -r 1.23.2.50 src/plugins/spamassassin/spamassassin_gtk.c; ) > 3.5.0cvs54.patchset

View file

@ -11,7 +11,7 @@ MINOR_VERSION=5
MICRO_VERSION=0
INTERFACE_AGE=0
BINARY_AGE=0
EXTRA_VERSION=53
EXTRA_VERSION=54
EXTRA_RELEASE=
EXTRA_GTK2_VERSION=

View file

@ -4482,7 +4482,7 @@ gboolean compose_check_for_valid_recipient(Compose *compose) {
for (list = compose->header_list; list; list = list->next) {
gchar *header;
gchar *entry;
header = gtk_editable_get_chars(GTK_EDITABLE(GTK_BIN(((ComposeHeaderEntry *)list->data)->combo)->child), 0, -1);
header = gtk_editable_get_chars(GTK_EDITABLE(gtk_bin_get_child(GTK_BIN((((ComposeHeaderEntry *)list->data)->combo)))), 0, -1);
entry = gtk_editable_get_chars(GTK_EDITABLE(((ComposeHeaderEntry *)list->data)->entry), 0, -1);
g_strstrip(entry);
g_strstrip(header);
@ -4516,7 +4516,7 @@ static gboolean compose_check_for_set_recipients(Compose *compose)
gchar *entry;
gchar *header;
entry = gtk_editable_get_chars(GTK_EDITABLE(((ComposeHeaderEntry *)list->data)->entry), 0, -1);
header = gtk_editable_get_chars(GTK_EDITABLE(GTK_BIN(((ComposeHeaderEntry *)list->data)->combo)->child), 0, -1);
header = gtk_editable_get_chars(GTK_EDITABLE(gtk_bin_get_child(GTK_BIN((((ComposeHeaderEntry *)list->data)->combo)))), 0, -1);
g_strstrip(entry);
g_strstrip(header);
if (strcmp(entry, compose->account->auto_cc)
@ -4548,7 +4548,7 @@ static gboolean compose_check_for_set_recipients(Compose *compose)
gchar *entry;
gchar *header;
entry = gtk_editable_get_chars(GTK_EDITABLE(((ComposeHeaderEntry *)list->data)->entry), 0, -1);
header = gtk_editable_get_chars(GTK_EDITABLE(GTK_BIN(((ComposeHeaderEntry *)list->data)->combo)->child), 0, -1);
header = gtk_editable_get_chars(GTK_EDITABLE(gtk_bin_get_child(GTK_BIN((((ComposeHeaderEntry *)list->data)->combo)))), 0, -1);
g_strstrip(entry);
g_strstrip(header);
if (strcmp(entry, compose->account->auto_bcc)
@ -4802,7 +4802,7 @@ static gint compose_redirect_write_headers_from_headerlist(Compose *compose,
first_to_address = TRUE;
for (list = compose->header_list; list; list = list->next) {
headerentry = ((ComposeHeaderEntry *)list->data);
headerentryname = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(headerentry->combo)->child));
headerentryname = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((headerentry->combo)))));
if (g_utf8_collate(headerentryname, to_hdr) == 0) {
const gchar *entstr = gtk_entry_get_text(GTK_ENTRY(headerentry->entry));
@ -4830,7 +4830,7 @@ static gint compose_redirect_write_headers_from_headerlist(Compose *compose,
first_cc_address = TRUE;
for (list = compose->header_list; list; list = list->next) {
headerentry = ((ComposeHeaderEntry *)list->data);
headerentryname = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(headerentry->combo)->child));
headerentryname = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((headerentry->combo)))));
if (g_utf8_collate(headerentryname, cc_hdr) == 0) {
const gchar *strg = gtk_entry_get_text(GTK_ENTRY(headerentry->entry));
@ -5700,7 +5700,7 @@ static void compose_add_headerfield_from_headerlist(Compose *compose,
for (list = compose->header_list; list; list = list->next) {
headerentry = ((ComposeHeaderEntry *)list->data);
headerentryname = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(headerentry->combo)->child));
headerentryname = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((headerentry->combo)))));
if (!g_utf8_collate(trans_fieldname, headerentryname)) {
str = gtk_editable_get_chars(GTK_EDITABLE(headerentry->entry), 0, -1);
@ -5964,7 +5964,7 @@ static gchar *compose_get_header(Compose *compose)
headerentry = ((ComposeHeaderEntry *)list->data);
tmp = g_strdup(gtk_entry_get_text(GTK_ENTRY(GTK_BIN(headerentry->combo)->child)));
tmp = g_strdup(gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((headerentry->combo))))));
g_strstrip(tmp);
if (*tmp == '\0' || strchr(tmp, ' ') != NULL || strchr(tmp, '\r') != NULL || strchr(tmp, '\n') != NULL) {
g_free(tmp);
@ -6136,7 +6136,7 @@ static void compose_create_header_entry(Compose *compose)
string++;
}
gtk_combo_box_set_active(GTK_COMBO_BOX(combo), 0);
g_signal_connect(G_OBJECT(GTK_BIN(combo)->child), "grab_focus",
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((combo)))), "grab_focus",
G_CALLBACK(compose_grab_focus_cb), compose);
gtk_widget_show(combo);
gtk_table_attach(GTK_TABLE(compose->header_table), combo, 0, 1,
@ -6144,7 +6144,7 @@ static void compose_create_header_entry(Compose *compose)
GTK_SHRINK, GTK_FILL, 0, 0);
if (compose->header_last) {
const gchar *last_header_entry = gtk_entry_get_text(
GTK_ENTRY(GTK_BIN(compose->header_last->combo)->child));
GTK_ENTRY(gtk_bin_get_child(GTK_BIN((compose->header_last->combo)))));
string = headers;
while (*string != NULL) {
if (!strcmp(*string, last_header_entry))
@ -6152,7 +6152,7 @@ static void compose_create_header_entry(Compose *compose)
string++;
}
if (standard_header)
header = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(compose->header_last->combo)->child));
header = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((compose->header_last->combo)))));
}
if (!compose->header_last || !standard_header) {
switch(compose->account->protocol) {
@ -6165,9 +6165,9 @@ static void compose_create_header_entry(Compose *compose)
}
}
if (header)
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(combo)->child), header);
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((combo)))), header);
g_signal_connect_after(G_OBJECT(GTK_BIN(combo)->child), "grab_focus",
g_signal_connect_after(G_OBJECT(gtk_bin_get_child(GTK_BIN((combo)))), "grab_focus",
G_CALLBACK(compose_grab_focus_cb), compose);
/* Entry field */
@ -6222,7 +6222,7 @@ static void compose_add_header_entry(Compose *compose, const gchar *header, gcha
last_header = compose->header_last;
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(last_header->combo)->child), header);
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((last_header->combo)))), header);
gtk_entry_set_text(GTK_ENTRY(last_header->entry), text);
}
@ -6260,7 +6260,7 @@ static GtkWidget *compose_create_header(Compose *compose)
gtk_widget_show(header_table);
gtk_container_set_border_width(GTK_CONTAINER(header_table), BORDER_WIDTH);
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(header_scrolledwin), header_table);
gtk_viewport_set_shadow_type(GTK_VIEWPORT(GTK_BIN(header_scrolledwin)->child), GTK_SHADOW_NONE);
gtk_viewport_set_shadow_type(GTK_VIEWPORT(gtk_bin_get_child(GTK_BIN((header_scrolledwin)))), GTK_SHADOW_NONE);
count = 0;
/* option menu for selecting accounts */
@ -7183,10 +7183,10 @@ static Compose *compose_create(PrefsAccount *account,
cm_menu_set_sensitive_full(compose->ui_manager, "Menu/Options/ReplyMode", compose->mode == COMPOSE_REPLY);
if (account->protocol != A_NNTP)
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(compose->header_last->combo)->child),
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((compose->header_last->combo)))),
prefs_common_translated_header_name("To:"));
else
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(compose->header_last->combo)->child),
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((compose->header_last->combo)))),
prefs_common_translated_header_name("Newsgroups:"));
addressbook_set_target_compose(compose);
@ -8237,7 +8237,7 @@ static void compose_attach_property_create(gboolean *cancelled)
}
g_list_free(strlist);
gtk_combo_box_set_active(GTK_COMBO_BOX(mimetype_entry), 0);
mimetype_entry = GTK_BIN(mimetype_entry)->child;
mimetype_entry = gtk_bin_get_child(GTK_BIN((mimetype_entry)));
label = gtk_label_new(_("Encoding"));
gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2,
@ -10565,7 +10565,7 @@ static MsgInfo *compose_msginfo_new_from_compose(Compose *compose)
for (list = compose->header_list; list; list = list->next) {
gchar *header = gtk_editable_get_chars(
GTK_EDITABLE(
GTK_BIN(((ComposeHeaderEntry *)list->data)->combo)->child), 0, -1);
gtk_bin_get_child(GTK_BIN((((ComposeHeaderEntry *)list->data)->combo)))), 0, -1);
gchar *entry = gtk_editable_get_chars(
GTK_EDITABLE(((ComposeHeaderEntry *)list->data)->entry), 0, -1);

View file

@ -280,7 +280,7 @@ static void edit_person_email_clear( gpointer data ) {
static void edit_person_attrib_clear( gpointer data ) {
if (!personeditdlg.ldap) {
gtk_entry_set_text( GTK_ENTRY(GTK_BIN(personeditdlg.entry_atname)->child), "" );
gtk_entry_set_text( GTK_ENTRY(gtk_bin_get_child(GTK_BIN((personeditdlg.entry_atname)))), "" );
gtk_entry_set_text( GTK_ENTRY(personeditdlg.entry_atvalue), "" );
}
}
@ -531,7 +531,7 @@ static void edit_person_load_attrib( ItemPerson *person ) {
static void edit_person_attrib_list_selected( GtkCMCList *clist, gint row, gint column, GdkEvent *event, gpointer data ) {
UserAttribute *attrib = gtk_cmclist_get_row_data( clist, row );
if( attrib && !personeditdlg.read_only && !personeditdlg.ldap ) {
gtk_entry_set_text( GTK_ENTRY(GTK_BIN(personeditdlg.entry_atname)->child ), attrib->name );
gtk_entry_set_text( GTK_ENTRY(gtk_bin_get_child(GTK_BIN((personeditdlg.entry_atname))) ), attrib->name );
gtk_entry_set_text( GTK_ENTRY(personeditdlg.entry_atvalue), attrib->value );
gtk_widget_set_sensitive(personeditdlg.attrib_del, TRUE);
} else {
@ -570,7 +570,7 @@ static UserAttribute *edit_person_attrib_edit( gboolean *error, UserAttribute *a
gchar *sName, *sValue, *sName_, *sValue_;
*error = TRUE;
sName_ = gtk_editable_get_chars( GTK_EDITABLE(GTK_BIN(personeditdlg.entry_atname)->child), 0, -1 );
sName_ = gtk_editable_get_chars( GTK_EDITABLE(gtk_bin_get_child(GTK_BIN((personeditdlg.entry_atname)))), 0, -1 );
sValue_ = gtk_editable_get_chars( GTK_EDITABLE(personeditdlg.entry_atvalue), 0, -1 );
sName = mgu_email_check_empty( sName_ );
sValue = mgu_email_check_empty( sValue_ );
@ -1219,7 +1219,7 @@ static void edit_person_entry_att_changed (GtkWidget *entry, gpointer data)
if (personeditdlg.read_only || personeditdlg.ldap)
return;
atname = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(personeditdlg.entry_atname)->child));
atname = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((personeditdlg.entry_atname)))));
if ( atname == NULL
|| strlen(atname) == 0) {
gtk_widget_set_sensitive(personeditdlg.attrib_add,FALSE);

View file

@ -2062,6 +2062,9 @@ static gboolean folderview_button_released(GtkWidget *ctree, GdkEventButton *eve
return FALSE;
}
#define BREAK_ON_MODIFIER_KEY() \
if ((event->state & (GDK_MOD1_MASK|GDK_CONTROL_MASK)) != 0) break
static gboolean folderview_key_pressed(GtkWidget *widget, GdkEventKey *event,
FolderView *folderview)
{
@ -2091,6 +2094,7 @@ static gboolean folderview_key_pressed(GtkWidget *widget, GdkEventKey *event,
break;
#endif
case GDK_space:
BREAK_ON_MODIFIER_KEY();
if (folderview->selected) {
if (folderview->opened == folderview->selected &&
(!folderview->summaryview->folder_item ||

View file

@ -17,10 +17,10 @@
*
*/
#undef GTK_DISABLE_DEPRECATED /* FIXME set_color */
#include <gtk/gtk.h>
#include <gdk/gdkkeysyms.h>
#include "gtkutils.h"
#include "colorsel.h"
#include "manage_window.h"
@ -54,7 +54,7 @@ static gboolean quote_colors_set_dialog_key_pressed(GtkWidget *widget,
gint colorsel_select_color_rgb(gchar *title, gint rgbvalue)
{
gdouble color[4] = {0.0, 0.0, 0.0, 0.0};
GdkColor color;
GtkColorSelectionDialog *color_dialog;
gint result;
@ -73,26 +73,16 @@ gint colorsel_select_color_rgb(gchar *title, gint rgbvalue)
G_CALLBACK(quote_colors_set_dialog_key_pressed), &result);
/* preselect the previous color in the color selection dialog */
color[0] = (gdouble) ((rgbvalue & 0xff0000) >> 16) / 255.0;
color[1] = (gdouble) ((rgbvalue & 0x00ff00) >> 8) / 255.0;
color[2] = (gdouble) (rgbvalue & 0x0000ff) / 255.0;
gtk_color_selection_set_color
(GTK_COLOR_SELECTION(color_dialog->colorsel), color);
gtkut_convert_int_to_gdk_color(rgbvalue, &color);
gtk_color_selection_set_current_color
(GTK_COLOR_SELECTION(color_dialog->colorsel), &color);
gtk_widget_show(GTK_WIDGET(color_dialog));
gtk_main();
if (result == 0) {
gint red, green, blue, rgbvalue_new;
gtk_color_selection_get_color(GTK_COLOR_SELECTION(color_dialog->colorsel), color);
red = (gint) (color[0] * 255.0);
green = (gint) (color[1] * 255.0);
blue = (gint) (color[2] * 255.0);
rgbvalue_new = (gint) ((red * 0x10000) | (green * 0x100) | blue);
rgbvalue = rgbvalue_new;
gtk_color_selection_get_current_color(GTK_COLOR_SELECTION(color_dialog->colorsel), &color);
rgbvalue = gtkut_convert_gdk_color_to_int(&color);
}
gtk_widget_destroy(GTK_WIDGET(color_dialog));

View file

@ -824,7 +824,7 @@ static void set_sug_mode_cb(GtkMenuItem *w, GtkAspell *gtkaspell)
{
char *themode;
themode = (char *) gtk_label_get_text(GTK_LABEL(GTK_BIN(w)->child));
themode = (char *) gtk_label_get_text(GTK_LABEL(gtk_bin_get_child(GTK_BIN((w)))));
themode = g_strdup(themode);
set_real_sug_mode(gtkaspell, themode);
@ -1321,7 +1321,7 @@ static void replace_word_cb(GtkWidget *w, gpointer data)
GtkAspell *gtkaspell = (GtkAspell *) data;
GdkEvent *e= (GdkEvent *) gtk_get_current_event();
newword = (unsigned char *) gtk_label_get_text(GTK_LABEL(GTK_BIN(w)->child));
newword = (unsigned char *) gtk_label_get_text(GTK_LABEL(gtk_bin_get_child(GTK_BIN((w)))));
newword = (unsigned char *)g_strdup((char *)newword);
replace_real_word(gtkaspell, (char *)newword);
@ -1953,7 +1953,7 @@ static GSList *make_sug_menu(GtkAspell *gtkaspell)
g_free(utf8buf);
gtk_widget_show(item);
list = g_slist_append(list, item);
gtk_misc_set_alignment(GTK_MISC(GTK_BIN(item)->child), 0.5, 0.5);
gtk_misc_set_alignment(GTK_MISC(gtk_bin_get_child(GTK_BIN((item)))), 0.5, 0.5);
g_free(caption);
item = gtk_menu_item_new();
@ -2093,7 +2093,7 @@ static GSList *populate_submenu(GtkAspell *gtkaspell)
dictname = g_strdup_printf(_("Dictionary: %s"),
gtkaspeller->dictionary->dictname);
item = gtk_menu_item_new_with_label(dictname);
gtk_misc_set_alignment(GTK_MISC(GTK_BIN(item)->child), 0.5, 0.5);
gtk_misc_set_alignment(GTK_MISC(gtk_bin_get_child(GTK_BIN((item)))), 0.5, 0.5);
g_free(dictname);
gtk_widget_show(item);
list = g_slist_append(list, item);

View file

@ -109,6 +109,17 @@ void gtkut_convert_int_to_gdk_color(gint rgbvalue, GdkColor *color)
color->blue = (int) (((gdouble) (rgbvalue & 0x0000ff) / 255.0) * 65535.0);
}
#define CL(x) (((gulong) (x) >> (gulong) 8) & 0xFFUL)
#define RGB_FROM_GDK_COLOR(c) \
((CL(c->red) << (gulong) 16) | \
(CL(c->green) << (gulong) 8) | \
(CL(c->blue)))
gint gtkut_convert_gdk_color_to_int(GdkColor *color)
{
return RGB_FROM_GDK_COLOR(color);
}
void gtkut_stock_button_add_help(GtkWidget *bbox, GtkWidget **help_btn)
{
g_return_if_fail(bbox != NULL);
@ -1202,7 +1213,7 @@ GtkWidget *gtkut_get_link_btn(GtkWidget *window, const gchar *url, const gchar *
btn = gtk_button_new_with_label(label?label:url);
gtk_button_set_relief(GTK_BUTTON(btn), GTK_RELIEF_NONE);
btn_label = GTK_BIN(btn)->child;
btn_label = gtk_bin_get_child(GTK_BIN((btn)));
cmap = gdk_drawable_get_colormap(window->window);
gdk_colormap_alloc_colors(cmap, uri_color, 2, FALSE, TRUE, success);
if (success[0] == TRUE && success[1] == TRUE) {

View file

@ -90,6 +90,7 @@ gboolean gtkut_get_font_size (GtkWidget *widget,
void gtkut_convert_int_to_gdk_color (gint rgbvalue,
GdkColor *color);
gint gtkut_convert_gdk_color_to_int (GdkColor *color);
void gtkut_stock_button_add_help(GtkWidget *bbox, GtkWidget **help_btn);

View file

@ -317,7 +317,7 @@ static void input_dialog_create(gboolean is_password)
combo = gtk_combo_box_entry_new_text();
gtk_box_pack_start(GTK_BOX(vbox), combo, FALSE, FALSE, 0);
g_signal_connect(G_OBJECT(GTK_BIN(combo)->child), "activate",
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((combo)))), "activate",
G_CALLBACK(combo_activated), NULL);
remember_checkbtn = gtk_check_button_new_with_label(_("Remember this"));
@ -396,7 +396,7 @@ static gchar *input_dialog_open(const gchar *title, const gchar *message,
GtkEditable *editable;
if (type == INPUT_DIALOG_COMBO)
editable = GTK_EDITABLE(GTK_BIN(combo)->child);
editable = GTK_EDITABLE(gtk_bin_get_child(GTK_BIN((combo))));
else
editable = GTK_EDITABLE(entry);
@ -426,7 +426,7 @@ static void input_dialog_set(const gchar *title, const gchar *message,
GtkWidget *entry_;
if (type == INPUT_DIALOG_COMBO)
entry_ = GTK_BIN(combo)->child;
entry_ = gtk_bin_get_child(GTK_BIN((combo)));
else
entry_ = entry;

View file

@ -370,7 +370,7 @@ void pluginwindow_create()
gtk_box_pack_start(GTK_BOX(hbox_info), desc_lbl, FALSE, FALSE, 0);
get_more_btn = gtkut_get_link_btn(window, PLUGINS_URI, _("Get more..."));
gtk_misc_set_alignment(GTK_MISC(GTK_BIN(get_more_btn)->child), 0, 0.5);
gtk_misc_set_alignment(GTK_MISC(gtk_bin_get_child(GTK_BIN((get_more_btn)))), 0, 0.5);
gtk_widget_show(get_more_btn);
gtk_box_pack_start(GTK_BOX(hbox_info), get_more_btn, FALSE, FALSE, 0);
gtk_box_pack_start(GTK_BOX(hbox_info), gtk_label_new(""), TRUE, TRUE, 0);

View file

@ -96,7 +96,7 @@ static void quicksearch_set_type(QuickSearch *quicksearch, gint type)
static gchar *quicksearch_get_text(QuickSearch * quicksearch)
{
gchar *search_string = gtk_editable_get_chars(GTK_EDITABLE(GTK_BIN(quicksearch->search_string_entry)->child), 0, -1);
gchar *search_string = gtk_editable_get_chars(GTK_EDITABLE(gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry)))), 0, -1);
g_strstrip(search_string);
return search_string;
@ -704,21 +704,21 @@ QuickSearch *quicksearch_new()
gtk_box_pack_start(GTK_BOX(hbox_search), search_hbox, FALSE, FALSE, 2);
gtk_widget_show(search_hbox);
g_signal_connect(G_OBJECT(GTK_BIN(search_string_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((search_string_entry)))),
"key_press_event",
G_CALLBACK(searchbar_pressed),
quicksearch);
g_signal_connect(G_OBJECT(GTK_BIN(search_string_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((search_string_entry)))),
"changed",
G_CALLBACK(searchbar_changed_cb),
quicksearch);
g_signal_connect(G_OBJECT(GTK_BIN(search_string_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((search_string_entry)))),
"focus_in_event",
G_CALLBACK(searchbar_focus_evt_in),
quicksearch);
g_signal_connect(G_OBJECT(GTK_BIN(search_string_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((search_string_entry)))),
"focus_out_event",
G_CALLBACK(searchbar_focus_evt_out),
quicksearch);
@ -790,7 +790,7 @@ void quicksearch_show(QuickSearch *quicksearch)
gtk_widget_show(quicksearch->hbox_search);
update_extended_buttons(quicksearch);
gtk_widget_grab_focus(
GTK_WIDGET(GTK_BIN(quicksearch->search_string_entry)->child));
GTK_WIDGET(gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry)))));
GTK_EVENTS_FLUSH();
@ -823,11 +823,11 @@ void quicksearch_set(QuickSearch *quicksearch, QuickSearchType type,
if (!matchstring || !(*matchstring))
quicksearch->in_typing = FALSE;
g_signal_handlers_block_by_func(G_OBJECT(GTK_BIN(quicksearch->search_string_entry)->child),
g_signal_handlers_block_by_func(G_OBJECT(gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry)))),
G_CALLBACK(searchbar_changed_cb), quicksearch);
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(quicksearch->search_string_entry)->child),
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry)))),
matchstring);
g_signal_handlers_unblock_by_func(G_OBJECT(GTK_BIN(quicksearch->search_string_entry)->child),
g_signal_handlers_unblock_by_func(G_OBJECT(gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry)))),
G_CALLBACK(searchbar_changed_cb), quicksearch);
prefs_common.summary_quicksearch_type = type;
@ -878,20 +878,20 @@ static void quicksearch_set_active(QuickSearch *quicksearch, gboolean active)
gtk_widget_set_sensitive(quicksearch->clear_search, TRUE);
if (colors_initialised) {
gtk_widget_modify_base(
GTK_BIN(quicksearch->search_string_entry)->child,
gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry))),
GTK_STATE_NORMAL, error ? &red : &yellow);
gtk_widget_modify_text(
GTK_BIN(quicksearch->search_string_entry)->child,
gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry))),
GTK_STATE_NORMAL, &black);
}
} else {
gtk_widget_set_sensitive(quicksearch->clear_search, FALSE);
if (colors_initialised) {
gtk_widget_modify_base(
GTK_BIN(quicksearch->search_string_entry)->child,
gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry))),
GTK_STATE_NORMAL, NULL);
gtk_widget_modify_text(
GTK_BIN(quicksearch->search_string_entry)->child,
gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry))),
GTK_STATE_NORMAL, NULL);
}
}
@ -1200,7 +1200,7 @@ gboolean quicksearch_is_running(QuickSearch *quicksearch)
void quicksearch_pass_key(QuickSearch *quicksearch, guint val, GdkModifierType mod)
{
GtkEntry *entry = GTK_ENTRY(GTK_BIN(quicksearch->search_string_entry)->child);
GtkEntry *entry = GTK_ENTRY(gtk_bin_get_child(GTK_BIN((quicksearch->search_string_entry))));
glong curpos = gtk_editable_get_position(GTK_EDITABLE(entry));
guint32 c;
char *str = g_strdup(gtk_entry_get_text(entry));

View file

@ -1266,6 +1266,7 @@ static gboolean mainwindow_key_pressed (GtkWidget *widget, GdkEventKey *event,
app_exit_cb(NULL, mainwin);
return FALSE;
case GDK_space:
BREAK_ON_MODIFIER_KEY();
if (gtk_window_is_active(GTK_WINDOW(mainwin->window))) {
if (mainwin->folderview && mainwin->summaryview
&& ((!mainwin->summaryview->displayed
@ -1640,22 +1641,22 @@ MainWindow *main_window_create()
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "Goto", "View/Goto", GTK_UI_MANAGER_MENU)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Prev", "View/Goto/Prev", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Next", "View/Goto/Next", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator1", "View/Goto/---", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator1", "View/Goto/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "PrevUnread", "View/Goto/PrevUnread", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "NextUnread", "View/Goto/NextUnread", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator2", "View/Goto/---", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator2", "View/Goto/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "PrevNew", "View/Goto/PrevNew", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "NextNew", "View/Goto/NextNew", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator3", "View/Goto/---", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator3", "View/Goto/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "PrevMarked", "View/Goto/PrevMarked", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "NextMarked", "View/Goto/NextMarked", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator4", "View/Goto/---", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator4", "View/Goto/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "PrevLabeled", "View/Goto/PrevLabeled", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "NextLabeled", "View/Goto/NextLabeled", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator5", "View/Goto/---", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator5", "View/Goto/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "LastRead", "View/Goto/LastRead", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "ParentMessage", "View/Goto/ParentMessage", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator6", "View/Goto/---", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "Separator6", "View/Goto/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "NextUnreadFolder", "View/Goto/NextUnreadFolder", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View/Goto", "OtherFolder", "View/Goto/OtherFolder", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/View", "Separator4", "View/---", GTK_UI_MANAGER_SEPARATOR)
@ -1783,7 +1784,7 @@ MainWindow *main_window_create()
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message", "Mark", "Message/Mark", GTK_UI_MANAGER_MENU)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "Mark", "Message/Mark/Mark", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "Unmark", "Message/Mark/Unmark", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "---", "Message/Mark/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "Separator1", "Message/Mark/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "MarkUnread", "Message/Mark/MarkUnread", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "MarkRead", "Message/Mark/MarkRead", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "MarkAllRead", "Message/Mark/MarkAllRead", GTK_UI_MANAGER_MENUITEM)
@ -1791,10 +1792,10 @@ MainWindow *main_window_create()
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "UnignoreThread", "Message/Mark/UnignoreThread", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "WatchThread", "Message/Mark/WatchThread", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "UnwatchThread", "Message/Mark/UnwatchThread", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "---", "Message/Mark/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "Separator2", "Message/Mark/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "MarkSpam", "Message/Mark/MarkSpam", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "MarkHam", "Message/Mark/MarkHam", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "---", "Message/Mark/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "Separator3", "Message/Mark/---", GTK_UI_MANAGER_SEPARATOR)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "Lock", "Message/Mark/Lock", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message/Mark", "Unlock", "Message/Mark/Unlock", GTK_UI_MANAGER_MENUITEM)
MENUITEM_ADDUI_MANAGER(mainwin->ui_manager, "/Menu/Message", "ColorLabel", "Message/ColorLabel", GTK_UI_MANAGER_MENUITEM)
@ -3416,7 +3417,7 @@ static void mailing_list_compose (GtkWidget *w, gpointer *data)
{
const gchar *mailto;
mailto = gtk_label_get_text(GTK_LABEL (GTK_BIN (w)->child));
mailto = gtk_label_get_text(GTK_LABEL (gtk_bin_get_child(GTK_BIN((w)))));
if (mailto)
compose_new(NULL, mailto+7, NULL);
}
@ -3426,7 +3427,7 @@ static void mailing_list_compose (GtkWidget *w, gpointer *data)
const gchar *mailto;
mailto = gtk_label_get_text(GTK_LABEL (GTK_BIN (w)->child));
mailto = gtk_label_get_text(GTK_LABEL (gtk_bin_get_child(GTK_BIN((w)))));
if (mailto)
open_uri (mailto, prefs_common_get_uri_cmd());
}

View file

@ -81,14 +81,21 @@ static gboolean key_pressed (GtkWidget *widget,
gpointer data);
#define GTK_BUTTON_SET_SENSITIVE(widget,sensitive) { \
#if !GTK_CHECK_VERSION(2,14,0)
/* Work around http://bugzilla.gnome.org/show_bug.cgi?id=56070 */
#define GTK_BUTTON_SET_SENSITIVE(widget,sensitive) { \
gboolean in_btn = FALSE; \
if (GTK_IS_BUTTON(widget)) \
in_btn = GTK_BUTTON(widget)->in_button; \
gtk_widget_set_sensitive(widget, sensitive); \
in_btn = GTK_BUTTON(widget)->in_button; \
gtk_widget_set_sensitive(widget, sensitive); \
if (GTK_IS_BUTTON(widget)) \
GTK_BUTTON(widget)->in_button = in_btn; \
GTK_BUTTON(widget)->in_button = in_btn; \
}
#else
#define GTK_BUTTON_SET_SENSITIVE(widget,sensitive) { \
gtk_widget_set_sensitive(widget, sensitive); \
}
#endif
static void message_show_stop_button(void)
{
@ -188,9 +195,9 @@ static void message_search_create(void)
gtk_box_pack_start (GTK_BOX (hbox1), body_entry, TRUE, TRUE, 0);
g_signal_connect(G_OBJECT(body_entry), "changed",
G_CALLBACK(body_changed), NULL);
g_signal_connect(G_OBJECT(GTK_BIN(body_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((body_entry)))),
"focus_in_event", G_CALLBACK(body_entry_focus_evt_in), NULL);
g_signal_connect(G_OBJECT(GTK_BIN(body_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((body_entry)))),
"focus_out_event", G_CALLBACK(body_entry_focus_evt_out), NULL);
checkbtn_hbox = gtk_hbox_new (FALSE, 8);

View file

@ -2425,7 +2425,7 @@ static gint mime_toggle_button_cb(GtkWidget *button, GdkEventButton *event,
mimeview->ctree_mode = !mimeview->ctree_mode;
if (mimeview->ctree_mode) {
gtk_arrow_set(GTK_ARROW(GTK_BIN(button)->child), GTK_ARROW_RIGHT,
gtk_arrow_set(GTK_ARROW(gtk_bin_get_child(GTK_BIN((button)))), GTK_ARROW_RIGHT,
GTK_SHADOW_NONE);
gtk_widget_hide(mimeview->icon_mainbox);
gtk_widget_show(mimeview->ctree_mainbox);
@ -2436,7 +2436,7 @@ static gint mime_toggle_button_cb(GtkWidget *button, GdkEventButton *event,
gtk_box_pack_end(GTK_BOX(mimeview->ctree_mainbox),
button, FALSE, FALSE, 0);
} else {
gtk_arrow_set(GTK_ARROW(GTK_BIN(button)->child), GTK_ARROW_LEFT,
gtk_arrow_set(GTK_ARROW(gtk_bin_get_child(GTK_BIN((button)))), GTK_ARROW_LEFT,
GTK_SHADOW_NONE);
mimeview->oldsize = mimeview->ctree_mainbox->allocation.height;
gtk_widget_hide(mimeview->ctree_mainbox);

View file

@ -182,7 +182,7 @@ void noticeview_set_button_text(NoticeView *noticeview, const char *text)
if (text != NULL) {
gtk_label_set_text
(GTK_LABEL(GTK_BIN(noticeview->button)->child), text);
(GTK_LABEL(gtk_bin_get_child(GTK_BIN((noticeview->button)))), text);
gtk_widget_show(noticeview->button);
} else
gtk_widget_hide(noticeview->button);
@ -250,7 +250,7 @@ void noticeview_set_2ndbutton_text(NoticeView *noticeview, const char *text)
if (text != NULL) {
gtk_label_set_text
(GTK_LABEL(GTK_BIN(noticeview->button2)->child), text);
(GTK_LABEL(gtk_bin_get_child(GTK_BIN((noticeview->button2)))), text);
gtk_widget_show(noticeview->button2);
} else
gtk_widget_hide(noticeview->button2);

View file

@ -84,10 +84,10 @@ static void bogofilter_whitelist_ab_select_cb(GtkWidget *widget, gpointer data)
const gchar *folderpath = NULL;
gchar *new_path = NULL;
folderpath = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(page->whitelist_ab_folder_combo)->child));
folderpath = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((page->whitelist_ab_folder_combo)))));
new_path = addressbook_folder_selection(folderpath);
if (new_path) {
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(page->whitelist_ab_folder_combo)->child), new_path);
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((page->whitelist_ab_folder_combo)))), new_path);
g_free(new_path);
}
}
@ -292,15 +292,15 @@ static void bogofilter_create_widget_func(PrefsPage * _page,
if (config->whitelist_ab_folder != NULL) {
/* translate "Any" (stored UNtranslated) */
if (strcasecmp(config->whitelist_ab_folder, "Any") == 0)
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(whitelist_ab_folder_combo)->child),
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((whitelist_ab_folder_combo)))),
config->whitelist_ab_folder);
else
/* backward compatibility (when translated "Any" was stored) */
if (g_utf8_collate(config->whitelist_ab_folder, _("Any")) == 0)
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(whitelist_ab_folder_combo)->child),
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((whitelist_ab_folder_combo)))),
config->whitelist_ab_folder);
else
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(whitelist_ab_folder_combo)->child),
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((whitelist_ab_folder_combo)))),
config->whitelist_ab_folder);
}
if (config->save_folder != NULL)
@ -371,7 +371,7 @@ static void bogofilter_save_func(PrefsPage *_page)
config->whitelist_ab = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->whitelist_ab));
g_free(config->whitelist_ab_folder);
config->whitelist_ab_folder = gtk_editable_get_chars(
GTK_EDITABLE(GTK_BIN(page->whitelist_ab_folder_combo)->child), 0, -1);
GTK_EDITABLE(gtk_bin_get_child(GTK_BIN((page->whitelist_ab_folder_combo)))), 0, -1);
/* store UNtranslated "Any" */
if (g_utf8_collate(config->whitelist_ab_folder, _("Any")) == 0) {
g_free(config->whitelist_ab_folder);

View file

@ -83,10 +83,10 @@ static void dillo_whitelist_ab_select_cb(GtkWidget *widget, gpointer data)
const gchar *folderpath = NULL;
gchar *new_path = NULL;
folderpath = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(page->whitelist_ab_folder_combo)->child));
folderpath = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((page->whitelist_ab_folder_combo)))));
new_path = addressbook_folder_selection(folderpath);
if (new_path) {
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(page->whitelist_ab_folder_combo)->child), new_path);
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((page->whitelist_ab_folder_combo)))), new_path);
g_free(new_path);
}
}
@ -205,15 +205,15 @@ static void create_dillo_prefs_page(PrefsPage *page,
if (dillo_prefs.whitelist_ab_folder != NULL) {
/* translate "Any" (stored UNtranslated) */
if (strcasecmp(dillo_prefs.whitelist_ab_folder, "Any") == 0)
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(whitelist_ab_folder_combo)->child),
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((whitelist_ab_folder_combo)))),
_("Any"));
else
/* backward compatibility (when translated "Any" was stored) */
if (g_utf8_collate(dillo_prefs.whitelist_ab_folder, _("Any")) == 0)
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(whitelist_ab_folder_combo)->child),
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((whitelist_ab_folder_combo)))),
dillo_prefs.whitelist_ab_folder);
else
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(whitelist_ab_folder_combo)->child),
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((whitelist_ab_folder_combo)))),
dillo_prefs.whitelist_ab_folder);
}
@ -270,7 +270,7 @@ static void save_dillo_prefs(PrefsPage *page)
dillo_prefs.whitelist_ab = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(prefs_page->whitelist_ab));
g_free(dillo_prefs.whitelist_ab_folder);
dillo_prefs.whitelist_ab_folder = gtk_editable_get_chars(
GTK_EDITABLE(GTK_BIN(prefs_page->whitelist_ab_folder_combo)->child), 0, -1);
GTK_EDITABLE(gtk_bin_get_child(GTK_BIN((prefs_page->whitelist_ab_folder_combo)))), 0, -1);
/* store UNtranslated "Any" */
if (g_utf8_collate(dillo_prefs.whitelist_ab_folder, _("Any")) == 0) {
g_free(dillo_prefs.whitelist_ab_folder);

View file

@ -98,10 +98,10 @@ static void spamassassin_whitelist_ab_select_cb(GtkWidget *widget, gpointer data
const gchar *folderpath = NULL;
gchar *new_path = NULL;
folderpath = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(page->whitelist_ab_folder_combo)->child));
folderpath = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((page->whitelist_ab_folder_combo)))));
new_path = addressbook_folder_selection(folderpath);
if (new_path) {
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(page->whitelist_ab_folder_combo)->child), new_path);
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((page->whitelist_ab_folder_combo)))), new_path);
g_free(new_path);
}
}
@ -476,15 +476,15 @@ static void spamassassin_create_widget_func(PrefsPage * _page,
if (config->whitelist_ab_folder != NULL) {
/* translate "Any" (stored UNtranslated) */
if (strcasecmp(config->whitelist_ab_folder, "Any") == 0)
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(whitelist_ab_folder_combo)->child),
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((whitelist_ab_folder_combo)))),
config->whitelist_ab_folder);
else
/* backward compatibility (when translated "Any" was stored) */
if (g_utf8_collate(config->whitelist_ab_folder, _("Any")) == 0)
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(whitelist_ab_folder_combo)->child),
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((whitelist_ab_folder_combo)))),
config->whitelist_ab_folder);
else
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(whitelist_ab_folder_combo)->child),
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((whitelist_ab_folder_combo)))),
config->whitelist_ab_folder);
}
gtk_spin_button_set_value(GTK_SPIN_BUTTON(spamd_port_spinbtn), (float) config->port);
@ -601,7 +601,7 @@ static void spamassassin_save_func(PrefsPage *_page)
config->whitelist_ab = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(page->whitelist_ab));
g_free(config->whitelist_ab_folder);
config->whitelist_ab_folder = gtk_editable_get_chars(
GTK_EDITABLE(GTK_BIN(page->whitelist_ab_folder_combo)->child), 0, -1);
GTK_EDITABLE(gtk_bin_get_child(GTK_BIN((page->whitelist_ab_folder_combo)))), 0, -1);
/* store UNtranslated "Any" */
if (g_utf8_collate(config->whitelist_ab_folder, _("Any")) == 0) {
g_free(config->whitelist_ab_folder);

View file

@ -17,7 +17,6 @@
*
*/
#undef GTK_DISABLE_DEPRECATED /* Fixme GtkOptionMenu */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif

View file

@ -260,7 +260,7 @@ static PrefParam param[] = {
NULL, NULL, NULL},
{"recheck_when_changing_dict", "TRUE", &prefs_common.recheck_when_changing_dict,
P_BOOL, NULL, NULL, NULL},
{"misspelled_color", "16711680", &prefs_common.misspelled_col, P_COLOR,
{"misspelled_color", "#ff0000", &prefs_common.misspelled_col, P_COLOR,
NULL, NULL, NULL},
{"use_both_dicts", "FALSE", &prefs_common.use_both_dicts, P_BOOL,
NULL, NULL, NULL},
@ -679,27 +679,27 @@ static PrefParam param[] = {
{"enable_color", "TRUE", &prefs_common.enable_color, P_BOOL,
NULL, NULL, NULL},
{"quote_level1_color", "179", &prefs_common.quote_level1_col, P_COLOR,
{"quote_level1_color", "#0000b3", &prefs_common.quote_level1_col, P_COLOR,
NULL, NULL, NULL},
{"quote_level2_color", "179", &prefs_common.quote_level2_col, P_COLOR,
{"quote_level2_color", "#0000b3", &prefs_common.quote_level2_col, P_COLOR,
NULL, NULL, NULL},
{"quote_level3_color", "179", &prefs_common.quote_level3_col, P_COLOR,
{"quote_level3_color", "#0000b3", &prefs_common.quote_level3_col, P_COLOR,
NULL, NULL, NULL},
{"enable_bgcolor", "FALSE", &prefs_common.enable_bgcolor, P_BOOL,
NULL, NULL, NULL},
{"quote_level1_bgcolor", "13421772", &prefs_common.quote_level1_bgcol, P_COLOR,
{"quote_level1_bgcolor", "#cccccc", &prefs_common.quote_level1_bgcol, P_COLOR,
NULL, NULL, NULL},
{"quote_level2_bgcolor", "13948116", &prefs_common.quote_level2_bgcol, P_COLOR,
{"quote_level2_bgcolor", "#d4d4d4", &prefs_common.quote_level2_bgcol, P_COLOR,
NULL, NULL, NULL},
{"quote_level3_bgcolor", "14540253", &prefs_common.quote_level3_bgcol, P_COLOR,
{"quote_level3_bgcolor", "#dddddd", &prefs_common.quote_level3_bgcol, P_COLOR,
NULL, NULL, NULL},
{"uri_color", "32512", &prefs_common.uri_col, P_COLOR,
{"uri_color", "#007f00", &prefs_common.uri_col, P_COLOR,
NULL, NULL, NULL},
{"emphasis_color", "207", &prefs_common.emphasis_col, P_COLOR,
{"emphasis_color", "#0000cf", &prefs_common.emphasis_col, P_COLOR,
NULL, NULL, NULL},
{"target_folder_color", "14294218", &prefs_common.tgt_folder_col, P_COLOR,
{"target_folder_color", "#da1cca", &prefs_common.tgt_folder_col, P_COLOR,
NULL, NULL, NULL},
{"signature_color", "7960953", &prefs_common.signature_col, P_COLOR,
{"signature_color", "#797979", &prefs_common.signature_col, P_COLOR,
NULL, NULL, NULL},
{"recycle_quote_colors", "FALSE", &prefs_common.recycle_quote_colors,
P_BOOL, NULL, NULL, NULL},
@ -917,7 +917,7 @@ static PrefParam param[] = {
{"gtk_can_change_accels", "TRUE", &prefs_common.gtk_can_change_accels, P_BOOL,
NULL, NULL, NULL},
{"color_new", "179", &prefs_common.color_new, P_COLOR,
{"color_new", "#0000b3", &prefs_common.color_new, P_COLOR,
NULL, NULL, NULL},
/* Some windows' sizes */

View file

@ -309,7 +309,7 @@ static void prefs_custom_header_create(void)
customhdr.cancel_btn = cancel_btn;
customhdr.hdr_combo = hdr_combo;
customhdr.hdr_entry = GTK_BIN (hdr_combo)->child;
customhdr.hdr_entry = gtk_bin_get_child(GTK_BIN((hdr_combo)));
customhdr.val_entry = val_entry;
customhdr.list_view = list_view;

View file

@ -175,7 +175,7 @@ static void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
gtk_table_attach (GTK_TABLE (table2), uri_combo, 1, 2, i, i+1,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
uri_entry = GTK_BIN (uri_combo)->child;
uri_entry = gtk_bin_get_child(GTK_BIN((uri_combo)));
gtk_entry_set_text(GTK_ENTRY(uri_entry), prefs_common.uri_cmd ? prefs_common.uri_cmd : "");
exteditor_label = gtk_label_new (_("Text editor"));
@ -202,7 +202,7 @@ static void prefs_ext_prog_create_widget(PrefsPage *_page, GtkWindow *window,
gtk_table_attach (GTK_TABLE (table2), exteditor_combo, 1, 2, i, i+1,
GTK_EXPAND | GTK_FILL, 0, 0, 0);
exteditor_entry = GTK_BIN (exteditor_combo)->child;
exteditor_entry = gtk_bin_get_child(GTK_BIN((exteditor_combo)));
gtk_entry_set_text(GTK_ENTRY(exteditor_entry),
prefs_common.ext_editor_cmd ? prefs_common.ext_editor_cmd : "");

View file

@ -17,7 +17,6 @@
*
*/
#undef GTK_DISABLE_DEPRECATED /* Fixme GtkOptionMenu */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@ -490,7 +489,7 @@ static void prefs_filtering_action_create(void)
gtk_size_group_add_widget(size_action, header_combo);
gtk_box_pack_start (GTK_BOX (hbox1), header_combo,
FALSE, FALSE, 0);
header_entry = GTK_BIN(header_combo)->child;
header_entry = gtk_bin_get_child(GTK_BIN((header_combo)));
/* destination */

View file

@ -209,8 +209,9 @@ static void prefs_config_parse_one_line(PrefParam *param, const gchar *buf)
(gushort)atoi(value);
break;
case P_COLOR:
if (gdk_color_parse(value, &color))
if (gdk_color_parse(value, &color)) {
*((gulong *)param[i].data) = RGB_FROM_GDK_COLOR(color);
}
else
/* be compatible and accept ints */
*((gulong *)param[i].data) = strtoul(value, 0, 10);

View file

@ -75,10 +75,10 @@ static GtkWidget *prefs_logging_create_check_buttons(GtkWidget **checkbtn1,
gtk_widget_show(hbox_checkbtn);
PACK_CHECK_BUTTON (hbox_checkbtn, *checkbtn1, label1);
gtk_label_set_line_wrap(GTK_LABEL(GTK_BIN(*checkbtn1)->child), TRUE);
gtk_label_set_line_wrap(GTK_LABEL(gtk_bin_get_child(GTK_BIN((*checkbtn1)))), TRUE);
PACK_CHECK_BUTTON (hbox_checkbtn, *checkbtn2, label2);
gtk_label_set_line_wrap(GTK_LABEL(GTK_BIN(*checkbtn2)->child), TRUE);
gtk_label_set_line_wrap(GTK_LABEL(gtk_bin_get_child(GTK_BIN((*checkbtn2)))), TRUE);
return hbox_checkbtn;
}

View file

@ -16,7 +16,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
#undef GTK_DISABLE_DEPRECATED /* Fixme GtkOptionMenu */
#ifdef HAVE_CONFIG_H
# include "config.h"
@ -624,7 +623,7 @@ static void prefs_matcher_create(void)
headers_combo = gtk_combo_box_entry_new_with_model(matcher.model_headers, 0);
gtk_widget_set_size_request(headers_combo, 100, -1);
gtk_box_pack_start(GTK_BOX(upper_hbox), headers_combo, TRUE, TRUE, 0);
header_entry = GTK_BIN (headers_combo)->child;
header_entry = gtk_bin_get_child(GTK_BIN((headers_combo)));
criteria_combo2 = gtkut_sc_combobox_create(NULL, TRUE);
prefs_matcher_set_model(criteria_combo2, matcher.model_phrase);
@ -667,7 +666,7 @@ static void prefs_matcher_create(void)
Q_("Filtering Matcher Menu|All"), _("Any"),
"From", "To", "Cc", "Reply-To", "Sender", NULL);
gtk_box_pack_start(GTK_BOX(match_hbox), header_addr_combo, FALSE, FALSE, 0);
header_addr_entry = GTK_BIN(header_addr_combo)->child;
header_addr_entry = gtk_bin_get_child(GTK_BIN((header_addr_combo)));
gtk_widget_set_size_request(header_addr_combo, 150, -1);
match_label2 = gtk_label_new("");
@ -874,7 +873,7 @@ static void prefs_matcher_reset_condition(void)
gtk_entry_set_text(GTK_ENTRY(matcher.header_entry), "");
gtk_entry_set_text(GTK_ENTRY(matcher.header_addr_entry), "");
gtk_entry_set_text(GTK_ENTRY(matcher.string_entry), "");
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(matcher.addressbook_folder_combo)->child), "");
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((matcher.addressbook_folder_combo)))), "");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.regexp_checkbtn), FALSE);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(matcher.case_checkbtn), FALSE);
}
@ -1462,7 +1461,7 @@ static MatcherProp *prefs_matcher_dialog_to_matcher(void)
case CRITERIA_FOUND_IN_ADDRESSBOOK:
header = gtk_entry_get_text(GTK_ENTRY(matcher.header_addr_entry));
expr = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(matcher.addressbook_folder_combo)->child));
expr = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((matcher.addressbook_folder_combo)))));
if (*header == '\0') {
alertpanel_error(_("Header name is not set."));
@ -2041,10 +2040,10 @@ static void prefs_matcher_addressbook_select(void)
const gchar *folderpath = NULL;
gchar *new_path = NULL;
folderpath = gtk_entry_get_text(GTK_ENTRY(GTK_BIN(matcher.addressbook_folder_combo)->child));
folderpath = gtk_entry_get_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((matcher.addressbook_folder_combo)))));
new_path = addressbook_folder_selection(folderpath);
if (new_path) {
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(matcher.addressbook_folder_combo)->child), new_path);
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((matcher.addressbook_folder_combo)))), new_path);
g_free(new_path);
}
}
@ -2346,7 +2345,7 @@ static gboolean prefs_matcher_selected(GtkTreeSelection *selector,
expr = prop->expr;
gtk_entry_set_text(GTK_ENTRY(matcher.header_addr_entry), header);
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(matcher.addressbook_folder_combo)->child), expr);
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((matcher.addressbook_folder_combo)))), expr);
break;
}

View file

@ -17,7 +17,6 @@
*
*/
#undef GTK_DISABLE_DEPRECATED /*gtk_color_selection_set_color*/
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif
@ -579,7 +578,7 @@ static void quote_color_set_dialog(GtkWidget *widget, gpointer data)
{
gchar *type = (gchar *)data;
gchar *title = NULL;
gdouble color[4] = {0.0, 0.0, 0.0, 0.0};
GdkColor color;
gint rgbvalue = 0;
GtkColorSelectionDialog *dialog;
gint c;
@ -649,12 +648,12 @@ static void quote_color_set_dialog(GtkWidget *widget, gpointer data)
G_CALLBACK(quote_colors_set_dialog_key_pressed),data);
/* preselect the previous color in the color selection dialog */
color[0] = (gdouble) ((rgbvalue & 0xff0000) >> 16) / 255.0;
color[1] = (gdouble) ((rgbvalue & 0x00ff00) >> 8) / 255.0;
color[2] = (gdouble) (rgbvalue & 0x0000ff) / 255.0;
gtkut_convert_int_to_gdk_color(rgbvalue, &color);
dialog = GTK_COLOR_SELECTION_DIALOG(color_dialog);
gtk_color_selection_set_color
(GTK_COLOR_SELECTION(dialog->colorsel), color);
gtk_color_selection_set_current_color
(GTK_COLOR_SELECTION(dialog->colorsel), &color);
gtk_widget_show(color_dialog);
}
@ -663,17 +662,13 @@ static void quote_colors_set_dialog_ok(GtkWidget *widget, gpointer data)
{
GtkColorSelection *colorsel = (GtkColorSelection *)
((GtkColorSelectionDialog *)color_dialog)->colorsel;
gdouble color[4];
gint red, green, blue, rgbvalue;
GdkColor color;
gint rgbvalue;
gchar *type = (gchar *)data;
gint c;
gtk_color_selection_get_color(colorsel, color);
red = (gint) (color[0] * 255.0);
green = (gint) (color[1] * 255.0);
blue = (gint) (color[2] * 255.0);
rgbvalue = (gint) ((red * 0x10000) | (green * 0x100) | blue);
gtk_color_selection_get_current_color(colorsel, &color);
rgbvalue = gtkut_convert_gdk_color_to_int(&color);
/* custom colors */

View file

@ -986,13 +986,11 @@ gchar *procmime_get_mime_type(const gchar *filename)
base = g_path_get_basename(filename);
if ((p = strrchr(base, '.')) != NULL)
Xstrdup_a(ext, p + 1, p = NULL );
ext = g_utf8_strdown(p + 1, -1);
g_free(base);
if (!p) return NULL;
ext_down = g_utf8_strdown(ext, -1);
g_free(ext); ext = ext_down;
mime_type = g_hash_table_lookup(mime_type_table, ext);
g_free(ext);
if (mime_type) {
gchar *str;
@ -1581,11 +1579,11 @@ static void parse_parameters(const gchar *parameters, GHashTable *table)
gchar *params, *param, *next;
GSList *convlist = NULL, *concatlist = NULL, *cur;
params = g_utf8_strdown(parameters, -1);
params = g_strdup(parameters);
param = params;
next = params;
for (; next != NULL; param = next) {
gchar *attribute, *value, *tmp;
gchar *attribute, *value, *tmp, *down_attr;
gint len;
gboolean convert = FALSE;
@ -1607,12 +1605,14 @@ static void parse_parameters(const gchar *parameters, GHashTable *table)
while (value[0] == ' ')
value++;
len = strlen(attribute);
if (attribute[len - 1] == '*') {
down_attr = g_utf8_strdown(attribute, -1);
len = strlen(down_attr);
if (down_attr[len - 1] == '*') {
gchar *srcpos, *dstpos, *endpos;
convert = TRUE;
attribute[len - 1] = '\0';
down_attr[len - 1] = '\0';
srcpos = value;
dstpos = value;
@ -1640,11 +1640,11 @@ static void parse_parameters(const gchar *parameters, GHashTable *table)
*tmp = '\0';
}
if (attribute) {
while (attribute[0] == ' ')
attribute++;
while (attribute[strlen(attribute)-1] == ' ')
attribute[strlen(attribute)-1] = '\0';
if (down_attr) {
while (down_attr[0] == ' ')
down_attr++;
while (down_attr[strlen(down_attr)-1] == ' ')
down_attr[strlen(down_attr)-1] = '\0';
}
if (value) {
while (value[0] == ' ')
@ -1652,28 +1652,29 @@ static void parse_parameters(const gchar *parameters, GHashTable *table)
while (value[strlen(value)-1] == ' ')
value[strlen(value)-1] = '\0';
}
if (strrchr(attribute, '*') != NULL) {
if (strrchr(down_attr, '*') != NULL) {
gchar *tmpattr;
tmpattr = g_strdup(attribute);
tmpattr = g_strdup(down_attr);
tmp = strrchr(tmpattr, '*');
tmp[0] = '\0';
if ((tmp[1] == '0') && (tmp[2] == '\0') &&
(g_slist_find_custom(concatlist, attribute, g_str_equal) == NULL))
(g_slist_find_custom(concatlist, down_attr, g_str_equal) == NULL))
concatlist = g_slist_prepend(concatlist, g_strdup(tmpattr));
if (convert && (g_slist_find_custom(convlist, attribute, g_str_equal) == NULL))
if (convert && (g_slist_find_custom(convlist, down_attr, g_str_equal) == NULL))
convlist = g_slist_prepend(convlist, g_strdup(tmpattr));
g_free(tmpattr);
} else if (convert) {
if (g_slist_find_custom(convlist, attribute, g_str_equal) == NULL)
convlist = g_slist_prepend(convlist, g_strdup(attribute));
if (g_slist_find_custom(convlist, down_attr, g_str_equal) == NULL)
convlist = g_slist_prepend(convlist, g_strdup(down_attr));
}
if (g_hash_table_lookup(table, attribute) == NULL)
g_hash_table_insert(table, g_strdup(attribute), g_strdup(value));
if (g_hash_table_lookup(table, down_attr) == NULL)
g_hash_table_insert(table, g_strdup(down_attr), g_strdup(value));
g_free(down_attr);
}
for (cur = concatlist; cur != NULL; cur = g_slist_next(cur)) {

View file

@ -136,14 +136,21 @@ static gboolean key_pressed (GtkWidget *widget,
gpointer data);
#endif
#define GTK_BUTTON_SET_SENSITIVE(widget,sensitive) { \
#if !GTK_CHECK_VERSION(2,14,0)
/* Work around http://bugzilla.gnome.org/show_bug.cgi?id=56070 */
#define GTK_BUTTON_SET_SENSITIVE(widget,sensitive) { \
gboolean in_btn = FALSE; \
if (GTK_IS_BUTTON(widget)) \
in_btn = GTK_BUTTON(widget)->in_button; \
gtk_widget_set_sensitive(widget, sensitive); \
in_btn = GTK_BUTTON(widget)->in_button; \
gtk_widget_set_sensitive(widget, sensitive); \
if (GTK_IS_BUTTON(widget)) \
GTK_BUTTON(widget)->in_button = in_btn; \
GTK_BUTTON(widget)->in_button = in_btn; \
}
#else
#define GTK_BUTTON_SET_SENSITIVE(widget,sensitive) { \
gtk_widget_set_sensitive(widget, sensitive); \
}
#endif
void summary_search(SummaryView *summaryview)
{
@ -267,9 +274,9 @@ static void summary_search_create(void)
GTK_EXPAND|GTK_FILL, 0, 0, 0);
g_signal_connect(G_OBJECT(from_entry), "changed",
G_CALLBACK(from_changed), NULL);
g_signal_connect(G_OBJECT(GTK_BIN(from_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((from_entry)))),
"focus_in_event", G_CALLBACK(from_entry_focus_evt_in), NULL);
g_signal_connect(G_OBJECT(GTK_BIN(from_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((from_entry)))),
"focus_out_event", G_CALLBACK(from_entry_focus_evt_out), NULL);
to_entry = gtk_combo_box_entry_new_text ();
@ -282,9 +289,9 @@ static void summary_search_create(void)
GTK_EXPAND|GTK_FILL, 0, 0, 0);
g_signal_connect(G_OBJECT(to_entry), "changed",
G_CALLBACK(to_changed), NULL);
g_signal_connect(G_OBJECT(GTK_BIN(to_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((to_entry)))),
"focus_in_event", G_CALLBACK(to_entry_focus_evt_in), NULL);
g_signal_connect(G_OBJECT(GTK_BIN(to_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((to_entry)))),
"focus_out_event", G_CALLBACK(to_entry_focus_evt_out), NULL);
subject_entry = gtk_combo_box_entry_new_text ();
@ -297,9 +304,9 @@ static void summary_search_create(void)
GTK_EXPAND|GTK_FILL, 0, 0, 0);
g_signal_connect(G_OBJECT(subject_entry), "changed",
G_CALLBACK(subject_changed), NULL);
g_signal_connect(G_OBJECT(GTK_BIN(subject_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((subject_entry)))),
"focus_in_event", G_CALLBACK(subject_entry_focus_evt_in), NULL);
g_signal_connect(G_OBJECT(GTK_BIN(subject_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((subject_entry)))),
"focus_out_event", G_CALLBACK(subject_entry_focus_evt_out), NULL);
body_entry = gtk_combo_box_entry_new_text ();
@ -312,9 +319,9 @@ static void summary_search_create(void)
GTK_EXPAND|GTK_FILL, 0, 0, 0);
g_signal_connect(G_OBJECT(body_entry), "changed",
G_CALLBACK(body_changed), NULL);
g_signal_connect(G_OBJECT(GTK_BIN(body_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((body_entry)))),
"focus_in_event", G_CALLBACK(body_entry_focus_evt_in), NULL);
g_signal_connect(G_OBJECT(GTK_BIN(body_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((body_entry)))),
"focus_out_event", G_CALLBACK(body_entry_focus_evt_out), NULL);
adv_condition_entry = gtk_combo_box_entry_new_text ();
@ -327,9 +334,9 @@ static void summary_search_create(void)
GTK_EXPAND|GTK_FILL, 0, 0, 0);
g_signal_connect(G_OBJECT(adv_condition_entry), "changed",
G_CALLBACK(adv_condition_changed), NULL);
g_signal_connect(G_OBJECT(GTK_BIN(adv_condition_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((adv_condition_entry)))),
"focus_in_event", G_CALLBACK(adv_condition_entry_focus_evt_in), NULL);
g_signal_connect(G_OBJECT(GTK_BIN(adv_condition_entry)->child),
g_signal_connect(G_OBJECT(gtk_bin_get_child(GTK_BIN((adv_condition_entry)))),
"focus_out_event", G_CALLBACK(adv_condition_entry_focus_evt_out), NULL);
adv_condition_btn = gtk_button_new_with_label(" ... ");
@ -796,12 +803,12 @@ static void summary_search_clear(GtkButton *button, gpointer data)
{
if (gtk_toggle_button_get_active
(GTK_TOGGLE_BUTTON(search_window.adv_search_checkbtn))) {
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(search_window.adv_condition_entry)->child), "");
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((search_window.adv_condition_entry)))), "");
} else {
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(search_window.from_entry)->child), "");
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(search_window.to_entry)->child), "");
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(search_window.subject_entry)->child), "");
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(search_window.body_entry)->child), "");
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((search_window.from_entry)))), "");
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((search_window.to_entry)))), "");
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((search_window.subject_entry)))), "");
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((search_window.body_entry)))), "");
}
/* stop searching */
if (search_window.is_searching) {
@ -838,7 +845,7 @@ static void adv_condition_btn_done(MatcherList * matchers)
str = matcherlist_to_string(matchers);
if (str != NULL) {
gtk_entry_set_text(GTK_ENTRY(GTK_BIN(search_window.adv_condition_entry)->child), str);
gtk_entry_set_text(GTK_ENTRY(gtk_bin_get_child(GTK_BIN((search_window.adv_condition_entry)))), str);
g_free(str);
}
}

View file

@ -6445,8 +6445,10 @@ static gboolean summary_key_pressed(GtkWidget *widget, GdkEventKey *event,
switch (event->keyval) {
case GDK_space: /* Page down or go to the next */
handled = TRUE;
if (event->state & GDK_CONTROL_MASK)
event->state &= ~GDK_CONTROL_MASK;
if (event->state & GDK_CONTROL_MASK) {
handled = FALSE;
break;
}
if (event->state & GDK_SHIFT_MASK)
mimeview_scroll_page(messageview->mimeview, TRUE);
else {

View file

@ -2240,6 +2240,8 @@ void toolbar_update(ToolbarType type, gpointer data)
}
}
#if !GTK_CHECK_VERSION(2,14,0)
/* Work around http://bugzilla.gnome.org/show_bug.cgi?id=56070 */
#define GTK_BUTTON_SET_SENSITIVE(widget,sensitive) { \
gboolean in_btn1 = FALSE, in_btn2 = FALSE; \
if (GTK_IS_BUTTON(widget)) \
@ -2288,6 +2290,11 @@ void toolbar_update(ToolbarType type, gpointer data)
GTK_BUTTON(child)->in_button = in_btn1; \
} \
}
#else
#define GTK_BUTTON_SET_SENSITIVE(widget,sensitive) { \
gtk_widget_set_sensitive(widget, sensitive); \
}
#endif
void toolbar_main_set_sensitive(gpointer data)
{