Ephoto: Bump config version: Remember fsel hidden state for next time opened.
This commit is contained in:
parent
6db2aa4ea2
commit
a5fb4b25c4
|
@ -102,6 +102,7 @@ struct _Ephoto_Config
|
||||||
Evas_Object *window;
|
Evas_Object *window;
|
||||||
Evas_Object *slide_time;
|
Evas_Object *slide_time;
|
||||||
Evas_Object *slide_trans;
|
Evas_Object *slide_trans;
|
||||||
|
int fsel_hide;
|
||||||
};
|
};
|
||||||
|
|
||||||
struct _Ephoto
|
struct _Ephoto
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#include "ephoto.h"
|
#include "ephoto.h"
|
||||||
|
|
||||||
#define CONFIG_VERSION 9
|
#define CONFIG_VERSION 10
|
||||||
|
|
||||||
static int _ephoto_config_load(Ephoto *ephoto);
|
static int _ephoto_config_load(Ephoto *ephoto);
|
||||||
static Eina_Bool _ephoto_on_config_save(void *data);
|
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, editor, EET_T_STRING);
|
||||||
C_VAL(D, T, window_width, EET_T_INT);
|
C_VAL(D, T, window_width, EET_T_INT);
|
||||||
C_VAL(D, T, window_height, 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))
|
switch (_ephoto_config_load(ephoto))
|
||||||
{
|
{
|
||||||
case 0:
|
case 0:
|
||||||
|
@ -49,6 +49,7 @@ ephoto_config_init(Ephoto *ephoto)
|
||||||
ephoto->config->editor = eina_stringshare_add("gimp %s");
|
ephoto->config->editor = eina_stringshare_add("gimp %s");
|
||||||
ephoto->config->window_width = 900;
|
ephoto->config->window_width = 900;
|
||||||
ephoto->config->window_height = 600;
|
ephoto->config->window_height = 600;
|
||||||
|
ephoto->config->fsel_hide = 0;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return EINA_TRUE;
|
return EINA_TRUE;
|
||||||
|
|
|
@ -367,6 +367,8 @@ _ephoto_dir_show_folders(void *data, Evas_Object *o EINA_UNUSED, void *event_inf
|
||||||
|
|
||||||
evas_object_show(tb->leftbox);
|
evas_object_show(tb->leftbox);
|
||||||
elm_box_pack_start(tb->main, tb->leftbox);
|
elm_box_pack_start(tb->main, tb->leftbox);
|
||||||
|
|
||||||
|
tb->ephoto->config->fsel_hide = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
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);
|
elm_box_pack_end(tb->bleftbox, but);
|
||||||
evas_object_show(but);
|
evas_object_show(but);
|
||||||
|
|
||||||
|
tb->ephoto->config->fsel_hide = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@ -941,6 +944,9 @@ ephoto_thumb_browser_add(Ephoto *ephoto, Evas_Object *parent)
|
||||||
(tb->handlers, ecore_event_handler_add
|
(tb->handlers, ecore_event_handler_add
|
||||||
(EPHOTO_EVENT_ENTRY_CREATE, _ephoto_thumb_entry_create, tb));
|
(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;
|
return tb->main;
|
||||||
|
|
||||||
error:
|
error:
|
||||||
|
|
Loading…
Reference in New Issue