X-Git-Url: http://gitweb.hugovil.com/?a=blobdiff_plain;f=src%2Fgtk%2Fapp-config.c;h=315242154a6c7972a829e540379a2e1396336c7e;hb=121bcb38f29409f10de63a68d86620c4beb75c97;hp=eccfc4d871a983ec7703af7cc264f17073906478;hpb=5419d1bd9d2faae98c78da740634b972e8f5aac1;p=emu8051.git diff --git a/src/gtk/app-config.c b/src/gtk/app-config.c index eccfc4d..3152421 100644 --- a/src/gtk/app-config.c +++ b/src/gtk/app-config.c @@ -41,6 +41,8 @@ app_config_init(void) /* UI settings */ cfg->win_width = 640; cfg->win_height = 480; + cfg->win_pos_x = 10; + cfg->win_pos_y = 10; cfg->hpane_pos = 100; cfg->vpane_pos = 200; cfg->main_pane_pos = 200; @@ -79,6 +81,8 @@ app_config_load_from_key_file(GKeyFile *kf) /* ui */ app_config_key_file_get_int(kf, "ui", "win_width", &cfg->win_width); app_config_key_file_get_int(kf, "ui", "win_height", &cfg->win_height); + app_config_key_file_get_int(kf, "ui", "win_pos_x", &cfg->win_pos_x); + app_config_key_file_get_int(kf, "ui", "win_pos_y", &cfg->win_pos_y); 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", "main_pane_pos", @@ -103,7 +107,7 @@ app_config_get_dir_path(void) { char *dir_path; - dir_path = g_build_filename(g_get_user_config_dir(), PACKAGE, + dir_path = g_build_filename(g_get_user_config_dir(), PACKAGE_NAME, profile_name, NULL); return dir_path; @@ -116,7 +120,7 @@ app_config_get_file_path(void) char *dir_path; char file[MAX_FILENAME_LENGTH]; - sprintf(file, "%s.conf", PACKAGE); + sprintf(file, "%s.conf", PACKAGE_NAME); dir_path = app_config_get_dir_path(); @@ -173,6 +177,8 @@ app_config_save(void) g_string_append_printf(buf, "win_width=%d\n", cfg->win_width); g_string_append_printf(buf, "win_height=%d\n", cfg->win_height); + g_string_append_printf(buf, "win_pos_x=%d\n", cfg->win_pos_x); + g_string_append_printf(buf, "win_pos_y=%d\n", cfg->win_pos_y); 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, "main_pane_pos=%d\n",