Fixed un setable input and completion fonts.
authorDaniel Carl <danielcarl@gmx.de>
Mon, 19 Nov 2012 18:55:36 +0000 (19:55 +0100)
committerDaniel Carl <danielcarl@gmx.de>
Mon, 19 Nov 2012 18:57:58 +0000 (19:57 +0100)
Also fixed unneeded completion spaces introduced by different completion
fonts.

config.mk
src/completion.c
src/setting.c

index 8285b79..ac9e291 100644 (file)
--- a/config.mk
+++ b/config.mk
@@ -1,5 +1,5 @@
 #----------------user/install options----------------
-VERSION = 0.1.1
+VERSION = 0.1.2
 
 PROJECT = vimp
 PREFIX ?= /usr/local
index 3f0d46d..b5eb8d8 100644 (file)
@@ -132,7 +132,7 @@ static GList* completion_init_completion(GList* target, GList* source, const gch
         }
         if (match) {
             Completion* c = completion_get_new(data, prefix);
-            gtk_box_pack_start(GTK_BOX(vp.gui.compbox), c->event, FALSE, FALSE, 0);
+            gtk_box_pack_start(GTK_BOX(vp.gui.compbox), c->event, TRUE, TRUE, 0);
             target = g_list_append(target, c);
         }
     }
index 22d96fe..8540dd1 100644 (file)
@@ -92,9 +92,9 @@ static Setting default_settings[] = {
     {"input-font-normal", TYPE_CHAR, setting_input_style, {.s = "monospace normal 8"}},
     {"input-font-error", TYPE_CHAR, setting_input_style, {.s = "monospace bold 8"}},
     {"completion-font-normal", TYPE_CHAR, setting_completion_style, {.s = "monospace normal 8"}},
-    {"completion-font-active", TYPE_CHAR, setting_completion_style, {.s = "monospace bold 10"}},
+    {"completion-font-active", TYPE_CHAR, setting_completion_style, {.s = "monospace bold 8"}},
     {"completion-fg-normal", TYPE_CHAR, setting_completion_style, {.s = "#f6f3e8"}},
-    {"completion-fg-active", TYPE_CHAR, setting_completion_style, {.s = "#0f0"}},
+    {"completion-fg-active", TYPE_CHAR, setting_completion_style, {.s = "#fff"}},
     {"completion-bg-normal", TYPE_CHAR, setting_completion_style, {.s = "#656565"}},
     {"completion-bg-active", TYPE_CHAR, setting_completion_style, {.s = "#777777"}},
 };
@@ -242,7 +242,7 @@ static gboolean setting_input_style(const Setting* s)
         VP_COLOR_PARSE(&style->input_bg[type], s->arg.s);
     } else if (g_str_has_prefix(s->name, "input-fg")) {
         VP_COLOR_PARSE(&style->input_fg[type], s->arg.s);
-    } else if (g_str_has_prefix(s->arg.s, "input-font")) {
+    } else if (g_str_has_prefix(s->name, "input-font")) {
         if (style->input_font[type]) {
             pango_font_description_free(style->input_font[type]);
         }
@@ -261,7 +261,7 @@ static gboolean setting_completion_style(const Setting* s)
         VP_COLOR_PARSE(&style->comp_bg[type], s->arg.s);
     } else if (g_str_has_prefix(s->name, "completion-fg")) {
         VP_COLOR_PARSE(&style->comp_fg[type], s->arg.s);
-    } else if (g_str_has_prefix(s->arg.s, "completion-font")) {
+    } else if (g_str_has_prefix(s->name, "completion-font")) {
         if (style->comp_font[type]) {
             pango_font_description_free(style->comp_font[type]);
         }