summaryrefslogtreecommitdiffhomepage
path: root/mixgtk/mixgtk_fontsel.c
diff options
context:
space:
mode:
Diffstat (limited to 'mixgtk/mixgtk_fontsel.c')
-rw-r--r--mixgtk/mixgtk_fontsel.c23
1 files changed, 18 insertions, 5 deletions
diff --git a/mixgtk/mixgtk_fontsel.c b/mixgtk/mixgtk_fontsel.c
index 0e7712d..ffb2209 100644
--- a/mixgtk/mixgtk_fontsel.c
+++ b/mixgtk/mixgtk_fontsel.c
@@ -46,6 +46,14 @@ static mixgtk_widget_id_t widget_ids_[] = {
MIXGTK_WIDGET_DEVICE
};
+static mixgtk_dialog_id_t dialog_ids_[] = {
+ MIXGTK_MIXVM_DIALOG,
+ MIXGTK_MAIN,
+ MIXGTK_MAIN,
+ MIXGTK_MIXAL_DIALOG,
+ MIXGTK_DEVICES_DIALOG
+};
+
static const gchar *keys_[] = {
"MIX.font", "Prompt.font", "Log.font", "MIXAL.font", "Device.font"
};
@@ -80,14 +88,17 @@ change_font_ (mixgtk_widget_id_t widget)
}
void
-mixgtk_fontsel_load_defaults (void)
+mixgtk_fontsel_load_defaults (gboolean split)
{
int i;
const gchar *font = NULL;
winfo_ = g_hash_table_new (NULL, NULL);
+ if (!split)
+ for (i - 0; i < WIDGET_NO_; ++i) dialog_ids_[i] = MIXGTK_MAIN;
for (i = 0; i < WIDGET_NO_; ++i)
{
- infos_[i].widget = mixgtk_widget_factory_get (widget_ids_[i]);
+ infos_[i].widget =
+ mixgtk_widget_factory_get (dialog_ids_[i], widget_ids_[i]);
g_assert (infos_[i].widget != NULL);
infos_[i].style = gtk_style_copy
(gtk_widget_get_style (infos_[i].widget));
@@ -96,8 +107,9 @@ mixgtk_fontsel_load_defaults (void)
{
int k;
for (k = MIXGTK_WIDGET_rA; k <= MIXGTK_WIDGET_UPTIME; ++k)
- gtk_widget_set_style (mixgtk_widget_factory_get (k),
- infos_[i].style);
+ gtk_widget_set_style
+ (mixgtk_widget_factory_get (MIXGTK_MIXVM_DIALOG, k),
+ infos_[i].style);
}
infos_[i].key = keys_[i];
g_hash_table_insert (winfo_, GINT_TO_POINTER (widget_ids_[i]),
@@ -129,7 +141,8 @@ mixgtk_fontsel_set (mixgtk_widget_id_t widget, const gchar *font)
{
int k;
for (k = MIXGTK_WIDGET_rA; k <= MIXGTK_WIDGET_UPTIME; ++k)
- gtk_widget_draw (mixgtk_widget_factory_get (k), NULL);
+ gtk_widget_draw
+ (mixgtk_widget_factory_get (MIXGTK_MIXVM_DIALOG, k), NULL);
}
}
mixgtk_config_update (w->key, w->font);