From 5064e7bf6ece140895252a67349f4f9a741102ce Mon Sep 17 00:00:00 2001 From: Gustavo Sverzut Barbieri Date: Tue, 12 Oct 2010 03:44:17 +0000 Subject: [PATCH] remember_directory is not an option anymore. useless to have it as an option as user may already override with command line what to show. SVN revision: 53283 --- src/bin/ephoto.h | 10 ++++------ src/bin/ephoto_config.c | 3 --- src/bin/ephoto_preferences.c | 13 +------------ 3 files changed, 5 insertions(+), 21 deletions(-) diff --git a/src/bin/ephoto.h b/src/bin/ephoto.h index 87973e1..74320f8 100644 --- a/src/bin/ephoto.h +++ b/src/bin/ephoto.h @@ -89,17 +89,15 @@ enum _Ephoto_Orient struct _Ephoto_Config { int config_version; + const char *editor; + double slideshow_timeout; + const char *slideshow_transition; + /* these should be per-window */ int thumb_size; int thumb_gen_size; - - int remember_directory; const char *directory; - double slideshow_timeout; - const char *slideshow_transition; - - const char *editor; }; struct _Ephoto diff --git a/src/bin/ephoto_config.c b/src/bin/ephoto_config.c index 2b76b5d..602e2f3 100644 --- a/src/bin/ephoto_config.c +++ b/src/bin/ephoto_config.c @@ -28,7 +28,6 @@ ephoto_config_init(Ephoto *ephoto) C_VAL(D, T, config_version, EET_T_INT); C_VAL(D, T, thumb_size, EET_T_INT); C_VAL(D, T, thumb_gen_size, EET_T_INT); - C_VAL(D, T, remember_directory, EET_T_INT); C_VAL(D, T, directory, EET_T_STRING); C_VAL(D, T, slideshow_timeout, EET_T_DOUBLE); C_VAL(D, T, slideshow_transition, EET_T_STRING); @@ -41,7 +40,6 @@ ephoto_config_init(Ephoto *ephoto) ephoto->config->config_version = CONFIG_VERSION; ephoto->config->thumb_size = 256; ephoto->config->thumb_gen_size = 256; - ephoto->config->remember_directory = 1; ephoto->config->slideshow_timeout = 4.0; ephoto->config->slideshow_transition = eina_stringshare_add("fade"); ephoto->config->editor = eina_stringshare_add("gimp %s"); @@ -51,7 +49,6 @@ ephoto_config_init(Ephoto *ephoto) /* Incremental additions */ if (ephoto->config->config_version < 2) { - ephoto->config->remember_directory = 1; ephoto->config->slideshow_timeout = 4.0; ephoto->config->slideshow_transition = eina_stringshare_add("fade"); } diff --git a/src/bin/ephoto_preferences.c b/src/bin/ephoto_preferences.c index d2af2a6..6d3457c 100644 --- a/src/bin/ephoto_preferences.c +++ b/src/bin/ephoto_preferences.c @@ -48,15 +48,6 @@ ephoto_show_preferences(Ephoto *em) evas_object_data_set(pg1, "pager", pager); elm_toolbar_item_add(tb, NULL, "General", _ephoto_preferences_pager_switch, pg1); - o = elm_check_add(pg1); - elm_check_label_set(o, "Remember last used directory"); - elm_check_state_set(o, em->config->remember_directory); - evas_object_data_set(o, "config", "remember_directory"); - evas_object_smart_callback_add(o, "changed", - _ephoto_preferences_item_change, em); - elm_box_pack_end(pg1, o); - evas_object_show(o); - elm_box_pack_end(box, pager); evas_object_show(pager); @@ -163,9 +154,7 @@ _ephoto_preferences_item_change(void *data, Evas_Object *obj, void *event_info) Ephoto *em = data; const char *key = evas_object_data_get(obj, "config"); - if (!strcmp(key, "remember_directory")) - em->config->remember_directory = elm_check_state_get(obj); - else if (!strcmp(key, "slideshow_timeout")) + if (!strcmp(key, "slideshow_timeout")) em->config->slideshow_timeout = elm_spinner_value_get(obj); else if (!strcmp(key, "editor")) eina_stringshare_replace(