X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=src%2Fapp-config.c;h=6d65df9baa1215978158508a269ddecd61c575c8;hb=42f213fff59103c0f9ba464057bc1dee8dd0e78b;hp=15bed2b822a2e3ab061a17f870f604203b2b7dd9;hpb=9cddfd237c6aff9a7a05c637ef7eac3b57580c31;p=emu8051.git diff --git a/src/app-config.c b/src/app-config.c index 15bed2b..6d65df9 100644 --- a/src/app-config.c +++ b/src/app-config.c @@ -55,6 +55,7 @@ app_config_init(void) cfg->win_height = 480; cfg->hpane_pos = 100; cfg->vpane_pos = 200; + cfg->vpane_mem_pos = 200; } static int @@ -62,17 +63,11 @@ app_config_key_file_get_int(GKeyFile *kf, const char *grp, const char *key, int { char *str = g_key_file_get_value(kf, grp, key, NULL); -#ifdef EMU8051_DEBUG - printf("key: %s\n", key); -#endif + log_debug("key: %s", key); if (G_LIKELY(str)) { *value = atoi(str); - -#ifdef EMU8051_DEBUG - printf(" value = %d\n", *value); -#endif - + log_debug(" value = %d", *value); g_free(str); } @@ -91,6 +86,8 @@ app_config_load_from_key_file(GKeyFile *kf) app_config_key_file_get_int(kf, "ui", "win_height", &cfg->win_height); app_config_key_file_get_int(kf, "ui", "hpane_pos", &cfg->hpane_pos); app_config_key_file_get_int(kf, "ui", "vpane_pos", &cfg->vpane_pos); + app_config_key_file_get_int(kf, "ui", "vpane_mem_pos", + &cfg->vpane_mem_pos); } static char * @@ -117,9 +114,7 @@ app_config_get_file_path(void) file_path = g_build_filename(dir_path, file, NULL); -#ifdef EMU8051_DEBUG - printf("app. config file = %s\n", file_path); -#endif + log_info("app. config file = %s", file_path); g_free(dir_path); @@ -173,6 +168,8 @@ app_config_save(void) g_string_append_printf(buf, "win_height=%d\n", cfg->win_height); g_string_append_printf(buf, "hpane_pos=%d\n", cfg->hpane_pos); g_string_append_printf(buf, "vpane_pos=%d\n", cfg->vpane_pos); + g_string_append_printf(buf, "vpane_mem_pos=%d\n", + cfg->vpane_mem_pos); file_path = app_config_get_file_path();