From eed0eb6a476d54ce19aeff137984aa981d9e3976 Mon Sep 17 00:00:00 2001 From: Pixel Date: Tue, 15 Jun 2010 00:59:57 -0700 Subject: Upgrading to iup 3.1 --- iup/src/gtk/iupgtk_fontdlg.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'iup/src/gtk/iupgtk_fontdlg.c') diff --git a/iup/src/gtk/iupgtk_fontdlg.c b/iup/src/gtk/iupgtk_fontdlg.c index 5769cbc..dca0232 100755 --- a/iup/src/gtk/iupgtk_fontdlg.c +++ b/iup/src/gtk/iupgtk_fontdlg.c @@ -24,7 +24,7 @@ static int gtkFontDlgPopup(Ihandle* ih, int x, int y) InativeHandle* parent = iupDialogGetNativeParent(ih); GtkFontSelectionDialog* dialog; int response; - char* preview_text; + char* preview_text, *standardfont; iupAttribSetInt(ih, "_IUPDLG_X", x); /* used in iupDialogUpdatePosition */ iupAttribSetInt(ih, "_IUPDLG_Y", y); @@ -36,7 +36,10 @@ static int gtkFontDlgPopup(Ihandle* ih, int x, int y) if (parent) gtk_window_set_transient_for((GtkWindow*)dialog, (GtkWindow*)parent); - gtk_font_selection_dialog_set_font_name(dialog, iupAttribGet(ih, "VALUE")); + standardfont = iupAttribGet(ih, "VALUE"); + if (!standardfont) + standardfont = IupGetGlobal("DEFAULTFONT"); + gtk_font_selection_dialog_set_font_name(dialog, standardfont); preview_text = iupAttribGet(ih, "PREVIEWTEXT"); if (preview_text) -- cgit v1.2.3