diff options
author | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-05-03 23:35:48 +0000 |
---|---|---|
committer | Jose Antonio Ortega Ruiz <jao@gnu.org> | 2001-05-03 23:35:48 +0000 |
commit | 49083add823f626a3f0d3b121491e0e66aacbe7c (patch) | |
tree | b13926da8bb7fd3c91d39500929ff31abce83706 | |
parent | 6bfd0c4d534dff0e3286911f977d613a8acfe958 (diff) | |
download | mdk-49083add823f626a3f0d3b121491e0e66aacbe7c.tar.gz mdk-49083add823f626a3f0d3b121491e0e66aacbe7c.tar.bz2 |
(change_font_) setting current font on fontsel dialog when available
-rw-r--r-- | mixgtk/mixgtk_fontsel.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/mixgtk/mixgtk_fontsel.c b/mixgtk/mixgtk_fontsel.c index 5f24776..4467925 100644 --- a/mixgtk/mixgtk_fontsel.c +++ b/mixgtk/mixgtk_fontsel.c @@ -1,7 +1,7 @@ /* -*-c-*- -------------- mixgtk_fontsel.c : * Implementation of the functions declared in mixgtk_fontsel.h * ------------------------------------------------------------------ - * Last change: Time-stamp: "2001-04-29 16:40:33 jao" + * Last change: Time-stamp: "2001-05-04 01:09:20 jao" * ------------------------------------------------------------------ * Copyright (C) 2001 Free Software Foundation, Inc. * @@ -57,8 +57,17 @@ static winfo infos_[WIDGET_NO_]; void change_font_ (mixgtk_widget_id_t widget) { + winfo *info = (winfo *) g_hash_table_lookup (winfo_, + GINT_TO_POINTER (widget)); + g_assert (info); widget_ = widget; + + if (info->font) + gtk_font_selection_dialog_set_font_name + (GTK_FONT_SELECTION_DIALOG (fontsel_dialog_), info->font); + gtk_widget_show (fontsel_dialog_); + } |