summaryrefslogtreecommitdiffhomepage
path: root/mixgtk
diff options
context:
space:
mode:
Diffstat (limited to 'mixgtk')
-rw-r--r--mixgtk/mixgtk_fontsel.c39
1 files changed, 33 insertions, 6 deletions
diff --git a/mixgtk/mixgtk_fontsel.c b/mixgtk/mixgtk_fontsel.c
index 1a52532..c8317f3 100644
--- a/mixgtk/mixgtk_fontsel.c
+++ b/mixgtk/mixgtk_fontsel.c
@@ -62,6 +62,30 @@ static mixgtk_dialog_id_t dialog_ids_split_[] = {
MIXGTK_DEVICES_DIALOG
};
+static mixgtk_widget_id_t mixvm_children_[] = {
+ MIXGTK_WIDGET_rA,
+ MIXGTK_WIDGET_rX,
+ MIXGTK_WIDGET_rJ,
+ MIXGTK_WIDGET_rI1,
+ MIXGTK_WIDGET_rI2,
+ MIXGTK_WIDGET_rI3,
+ MIXGTK_WIDGET_rI4,
+ MIXGTK_WIDGET_rI5,
+ MIXGTK_WIDGET_rI6,
+ MIXGTK_WIDGET_CMP_L,
+ MIXGTK_WIDGET_CMP_E,
+ MIXGTK_WIDGET_CMP_G,
+ MIXGTK_WIDGET_OVER,
+ MIXGTK_WIDGET_CELLS,
+ MIXGTK_WIDGET_LAPTIME,
+ MIXGTK_WIDGET_PROGTIME,
+ MIXGTK_WIDGET_UPTIME,
+ MIXGTK_WIDGET_LOC
+};
+
+static const int CHILDREN_NO_ =
+(sizeof (mixvm_children_) / sizeof (mixvm_children_[0]));
+
static mixgtk_dialog_id_t *dialog_ids_ = NULL;
static const gchar *keys_[] = {
@@ -69,6 +93,7 @@ static const gchar *keys_[] = {
};
+
#define WIDGET_NO_ (sizeof (widget_ids_) / sizeof (widget_ids_[0]))
static winfo infos_[WIDGET_NO_];
@@ -121,10 +146,10 @@ mixgtk_fontsel_load_defaults (void)
if (widget_ids_[i] == MIXGTK_WIDGET_MIXVM)
{
int k;
- for (k = MIXGTK_WIDGET_rA; k <= MIXGTK_WIDGET_UPTIME; ++k)
- gtk_widget_set_style
- (mixgtk_widget_factory_get (MIXGTK_MIXVM_DIALOG, k),
- infos_[i].style);
+ for (k = 0; k < CHILDREN_NO_; ++k)
+ gtk_widget_set_style (mixgtk_widget_factory_get
+ (MIXGTK_MIXVM_DIALOG, mixvm_children_[k]),
+ infos_[i].style);
}
infos_[i].key = keys_[i];
g_hash_table_insert (winfo_, GINT_TO_POINTER (widget_ids_[i]),
@@ -155,9 +180,11 @@ mixgtk_fontsel_set (mixgtk_widget_id_t widget, const gchar *font)
if (widget == MIXGTK_WIDGET_MIXVM)
{
int k;
- for (k = MIXGTK_WIDGET_rA; k <= MIXGTK_WIDGET_UPTIME; ++k)
+ for (k = 0; k < CHILDREN_NO_; ++k)
gtk_widget_draw
- (mixgtk_widget_factory_get (MIXGTK_MIXVM_DIALOG, k), NULL);
+ (mixgtk_widget_factory_get (MIXGTK_MIXVM_DIALOG,
+ mixvm_children_[k]),
+ NULL);
}
}
mixgtk_config_update (w->key, w->font);