Ephoto: Bump config version: Remember fsel hidden state for next time opened.

This commit is contained in:
Stephen Houston 2015-01-26 16:21:31 -06:00
parent 6db2aa4ea2
commit a5fb4b25c4
3 changed files with 10 additions and 2 deletions

View File

@ -102,6 +102,7 @@ struct _Ephoto_Config
Evas_Object *window;
Evas_Object *slide_time;
Evas_Object *slide_trans;
int fsel_hide;
};
struct _Ephoto

View File

@ -1,6 +1,6 @@
#include "ephoto.h"
#define CONFIG_VERSION 9
#define CONFIG_VERSION 10
static int _ephoto_config_load(Ephoto *ephoto);
static Eina_Bool _ephoto_on_config_save(void *data);
@ -38,7 +38,7 @@ ephoto_config_init(Ephoto *ephoto)
C_VAL(D, T, editor, EET_T_STRING);
C_VAL(D, T, window_width, EET_T_INT);
C_VAL(D, T, window_height, EET_T_INT);
C_VAL(D, T, fsel_hide, EET_T_INT);
switch (_ephoto_config_load(ephoto))
{
case 0:
@ -49,6 +49,7 @@ ephoto_config_init(Ephoto *ephoto)
ephoto->config->editor = eina_stringshare_add("gimp %s");
ephoto->config->window_width = 900;
ephoto->config->window_height = 600;
ephoto->config->fsel_hide = 0;
break;
default:
return EINA_TRUE;

View File

@ -367,6 +367,8 @@ _ephoto_dir_show_folders(void *data, Evas_Object *o EINA_UNUSED, void *event_inf
evas_object_show(tb->leftbox);
elm_box_pack_start(tb->main, tb->leftbox);
tb->ephoto->config->fsel_hide = 0;
}
static void
@ -418,6 +420,7 @@ _ephoto_dir_hide_folders(void *data, Evas_Object *o EINA_UNUSED, void *event_inf
elm_box_pack_end(tb->bleftbox, but);
evas_object_show(but);
tb->ephoto->config->fsel_hide = 1;
}
static void
@ -941,6 +944,9 @@ ephoto_thumb_browser_add(Ephoto *ephoto, Evas_Object *parent)
(tb->handlers, ecore_event_handler_add
(EPHOTO_EVENT_ENTRY_CREATE, _ephoto_thumb_entry_create, tb));
if (tb->ephoto->config->fsel_hide)
evas_object_smart_callback_call(but, "clicked", tb);
return tb->main;
error: