From: Christoph Hohmann Date: Sun, 24 Jun 2001 14:14:56 +0000 (+0000) Subject: bug fix in font selection X-Git-Tag: VERSION_0_5_0~55 X-Git-Url: http://git.claws-mail.org/?p=claws.git;a=commitdiff_plain;h=53b192f30b1bae700e7662dea98fd46693dc07fe bug fix in font selection --- diff --git a/ChangeLog.claws b/ChangeLog.claws index 7cf42e842..7b85742b6 100644 --- a/ChangeLog.claws +++ b/ChangeLog.claws @@ -1,3 +1,8 @@ +2001-06-24 [christoph] + + * src/prefs_common.c + bug fix in font selection + 2001-06-24 [alfons] * src/mainwindow.[ch] diff --git a/src/prefs_common.c b/src/prefs_common.c index 411c9190f..3ff31a1e0 100644 --- a/src/prefs_common.c +++ b/src/prefs_common.c @@ -183,6 +183,7 @@ static struct MessageColorButtons { static GtkWidget *quote_desc_win; static GtkWidget *font_sel_win; +static guint font_sel_conn_id; static GtkWidget *quote_color_win; static GtkWidget *color_dialog; @@ -2723,11 +2724,6 @@ static void prefs_font_select(GtkButton *button, GtkEntry *entry) (GTK_OBJECT(font_sel_win), "key_press_event", GTK_SIGNAL_FUNC(prefs_font_selection_key_pressed), NULL); - gtk_signal_connect - (GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(font_sel_win)->ok_button), - "clicked", - GTK_SIGNAL_FUNC(prefs_font_selection_ok), - entry); gtk_signal_connect_object (GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(font_sel_win)->cancel_button), "clicked", @@ -2735,6 +2731,16 @@ static void prefs_font_select(GtkButton *button, GtkEntry *entry) GTK_OBJECT(font_sel_win)); } + if(font_sel_conn_id) { + gtk_signal_disconnect(GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(font_sel_win)->ok_button), font_sel_conn_id); + } + font_sel_conn_id = gtk_signal_connect + (GTK_OBJECT(GTK_FONT_SELECTION_DIALOG(font_sel_win)->ok_button), + "clicked", + GTK_SIGNAL_FUNC(prefs_font_selection_ok), + entry); + printf("%i\n", font_sel_conn_id); + font_name = gtk_editable_get_chars(GTK_EDITABLE(entry), 0, -1); gtk_font_selection_dialog_set_font_name(GTK_FONT_SELECTION_DIALOG(font_sel_win), font_name); g_free(font_name);