summaryrefslogtreecommitdiff
path: root/gtk
diff options
context:
space:
mode:
authorMatthias Clasen <mclasen@redhat.com>2004-06-02 18:18:42 +0000
committerMatthias Clasen <matthiasc@src.gnome.org>2004-06-02 18:18:42 +0000
commita3d5971960ecfb6c1c488362c340bfc8bf39f1c4 (patch)
tree662ee16442dae27975645db48b7980de96f2e73e /gtk
parent3127f29ef626097dd861376f36a0914a20f4598c (diff)
downloadgtk+-a3d5971960ecfb6c1c488362c340bfc8bf39f1c4.tar.gz
Don't close the dialog on focus out of the size entry. (#143505, David
2004-06-02 Matthias Clasen <mclasen@redhat.com> * gtk/gtkfontsel.c (gtk_font_selection_size_focus_out): Don't close the dialog on focus out of the size entry. (#143505, David Hawthorne)
Diffstat (limited to 'gtk')
-rw-r--r--gtk/gtkfontsel.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/gtk/gtkfontsel.c b/gtk/gtkfontsel.c
index a59ce09e5c..64c7b312d0 100644
--- a/gtk/gtkfontsel.c
+++ b/gtk/gtkfontsel.c
@@ -998,7 +998,16 @@ gtk_font_selection_size_focus_out (GtkWidget *w,
GdkEventFocus *event,
gpointer data)
{
- gtk_font_selection_size_activate (w, data);
+ GtkFontSelection *fontsel;
+ gint new_size;
+ const gchar *text;
+
+ fontsel = GTK_FONT_SELECTION (data);
+
+ text = gtk_entry_get_text (GTK_ENTRY (fontsel->size_entry));
+ new_size = MAX (0.1, atof (text) * PANGO_SCALE + 0.5);
+
+ gtk_font_selection_set_size (fontsel, new_size);
return TRUE;
}