summaryrefslogtreecommitdiffhomepage
path: root/mixgtk/mixgtk_device.c
diff options
context:
space:
mode:
Diffstat (limited to 'mixgtk/mixgtk_device.c')
-rw-r--r--mixgtk/mixgtk_device.c32
1 files changed, 28 insertions, 4 deletions
diff --git a/mixgtk/mixgtk_device.c b/mixgtk/mixgtk_device.c
index 1b3a78a..30e5bf3 100644
--- a/mixgtk/mixgtk_device.c
+++ b/mixgtk/mixgtk_device.c
@@ -1,7 +1,7 @@
/* -*-c-*- ---------------- mixgtk_device.c :
* actual types for mixgtk devices
* ------------------------------------------------------------------
- * $Id: mixgtk_device.c,v 1.24 2004/07/02 00:08:28 jao Exp $
+ * $Id: mixgtk_device.c,v 1.25 2004/07/04 22:34:15 jao Exp $
* ------------------------------------------------------------------
* Copyright (C) 2001, 2002, 2004 Free Software Foundation, Inc.
*
@@ -578,8 +578,11 @@ on_devdir_ok_clicked ()
g_free (cmd);
}
-void
-on_devices_font_activate ()
+
+
+/* fonts */
+static GtkWidget **
+font_widgets_ (gint * n)
{
gint no = gtk_notebook_get_n_pages (dev_nb_);
GtkWidget **w = g_new (GtkWidget *, no + 1);
@@ -595,7 +598,28 @@ on_devices_font_activate ()
g_assert (k == no);
w[k] = GTK_WIDGET (dev_nb_);
- mixgtk_fontsel_query_font (MIX_FONT_DEVICES, w, no + 1);
+ if (n) *n = no;
+ return w;
+}
+
+void
+on_devices_font_activate ()
+{
+ gint no = 0;
+ GtkWidget **w = font_widgets_ (&no);
+ mixgtk_fontsel_query_font (MIX_FONT_DEVICES, w, no + 1);
g_free (w);
}
+
+void
+mixgtk_device_update_fonts (void)
+{
+ gint k, n = 0;
+ GtkWidget **w = font_widgets_ (&n);
+
+ g_assert (n >= 0);
+
+ for (k = 0; k < n; ++k)
+ mixgtk_fontsel_set_font (MIX_FONT_DEVICES, w[k]);
+}