Fix initialization of custom-font key
authorEduardo Lima (Etrunko) <eduardo.lima@intel.com>
Tue, 21 Oct 2014 21:40:41 +0000 (19:40 -0200)
committerEduardo Lima (Etrunko) <eduardo.lima@intel.com>
Wed, 22 Oct 2014 22:25:43 +0000 (20:25 -0200)
Change-Id: Ia5de054faecb6ad64bf0b22d7f7af57e404ec6de
Signed-off-by: Eduardo Lima (Etrunko) <eduardo.lima@intel.com>
src/wkb-ibus-config-eet.c

index 3bd5b4986bab5fb05891c6ddf3d45e7faba24750..1ce0d80b7bfa73bbc67ec58a1ececf4c8b2e452a 100644 (file)
@@ -527,6 +527,7 @@ _config_panel_edd_new(void)
    EET_EINA_STREAM_DATA_DESCRIPTOR_CLASS_SET(&eddc, struct _config_panel);
    edd = eet_data_descriptor_stream_new(&eddc);
 
+   EET_DATA_DESCRIPTOR_ADD_BASIC(edd, struct _config_panel, "custom-font", custom_font, EET_T_STRING);
    EET_DATA_DESCRIPTOR_ADD_BASIC(edd, struct _config_panel, "show", show, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(edd, struct _config_panel, "x", x, EET_T_INT);
    EET_DATA_DESCRIPTOR_ADD_BASIC(edd, struct _config_panel, "y", y, EET_T_INT);
@@ -534,8 +535,6 @@ _config_panel_edd_new(void)
    EET_DATA_DESCRIPTOR_ADD_BASIC(edd, struct _config_panel, "show-icon-in-systray", show_icon_in_systray, EET_T_UCHAR);
    EET_DATA_DESCRIPTOR_ADD_BASIC(edd, struct _config_panel, "show-im-name", show_im_name, EET_T_UCHAR);
    EET_DATA_DESCRIPTOR_ADD_BASIC(edd, struct _config_panel, "use-custom-font", use_custom_font, EET_T_UCHAR);
-   EET_DATA_DESCRIPTOR_ADD_BASIC(edd, struct _config_panel, "custom-font", custom_font, EET_T_STRING);
-
    return edd;
 }
 
@@ -544,6 +543,7 @@ _config_panel_set_defaults(struct _config_section *base)
 {
    struct _config_panel *panel = (struct _config_panel *) base;
 
+   panel->custom_font = eina_stringshare_add("Sans 10");
    panel->show = 0;
    panel->x = -1;
    panel->y = -1;
@@ -551,12 +551,12 @@ _config_panel_set_defaults(struct _config_section *base)
    panel->show_icon_in_systray = EINA_TRUE;
    panel->show_im_name = EINA_FALSE;
    panel->use_custom_font = EINA_FALSE;
-   panel->custom_font = eina_stringshare_add("Sans 10");
 }
 
 static void
 _config_panel_section_init(struct _config_section *base, struct _config_section *parent)
 {
+   _config_section_add_key_string(base, panel, custom_font);
    _config_section_init(base, panel);
    _config_section_add_key_int(base, panel, show);
    _config_section_add_key_int(base, panel, x);
@@ -565,7 +565,6 @@ _config_panel_section_init(struct _config_section *base, struct _config_section
    _config_section_add_key_bool(base, panel, show_icon_in_systray);
    _config_section_add_key_bool(base, panel, show_im_name);
    _config_section_add_key_bool(base, panel, use_custom_font);
-   _config_section_add_key_string(base, panel, custom_font);
 }
 
 static struct _config_section *