bug fix in font selection
authorChristoph Hohmann <reboot@gmx.ch>
Sun, 24 Jun 2001 14:14:56 +0000 (14:14 +0000)
committerChristoph Hohmann <reboot@gmx.ch>
Sun, 24 Jun 2001 14:14:56 +0000 (14:14 +0000)
ChangeLog.claws
src/prefs_common.c

index 7cf42e842d443b78661a587266b088348b8b371e..7b85742b6ca30fb106a46fe7eec785a230dbcb06 100644 (file)
@@ -1,3 +1,8 @@
+2001-06-24 [christoph]
+
+       * src/prefs_common.c
+               bug fix in font selection
+
 2001-06-24 [alfons]
 
        * src/mainwindow.[ch]
 2001-06-24 [alfons]
 
        * src/mainwindow.[ch]
index 411c9190f0586e71a4525df45b066e26f6a43ddd..3ff31a1e048e3a66950517f87bbf2bb4a71f2cee 100644 (file)
@@ -183,6 +183,7 @@ static struct MessageColorButtons {
 
 static GtkWidget *quote_desc_win;
 static GtkWidget *font_sel_win;
 
 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;
 
 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_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",
                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));
        }
 
                         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);
        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);