Okay. Ephoto back to normal. Move along.
SVN revision: 57560
This commit is contained in:
parent
169813a679
commit
ae03e70576
|
@ -38,7 +38,7 @@ void ephoto_thumb_size_set(Ephoto *ephoto, int size);
|
|||
Evas_Object *ephoto_thumb_add(Ephoto *ephoto, Evas_Object *parent, const char *path);
|
||||
void ephoto_thumb_path_set(Evas_Object *o, const char *path);
|
||||
void ephoto_directory_set(Ephoto *ephoto, const char *path);
|
||||
void auto_hide_toolbar(void *data __UNUSED__, Evas_Object *obj, const char *emission __UNUSED__, const char *source __UNUSED__);
|
||||
void ephoto_auto_hide_toolbar(void *data __UNUSED__, Evas_Object *obj, const char *emission __UNUSED__, const char *source __UNUSED__);
|
||||
|
||||
Ephoto_Orient ephoto_file_orient_get(const char *path);
|
||||
|
||||
|
@ -110,6 +110,8 @@ struct _Ephoto_Config
|
|||
/* these should be per-window */
|
||||
int thumb_size;
|
||||
int thumb_gen_size;
|
||||
int autohide_toolbar;
|
||||
int best_fit_images;
|
||||
const char *directory;
|
||||
|
||||
};
|
||||
|
|
|
@ -28,11 +28,12 @@ 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, autohide_toolbar, EET_T_INT);
|
||||
C_VAL(D, T, best_fit_images, 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);
|
||||
C_VAL(D, T, editor, EET_T_STRING);
|
||||
|
||||
switch (_ephoto_config_load(ephoto))
|
||||
{
|
||||
case 0:
|
||||
|
|
|
@ -336,16 +336,30 @@ ephoto_flow_browser_add(Ephoto *e, Evas_Object *parent)
|
|||
evas_object_event_callback_add
|
||||
(efb->main_layout, EVAS_CALLBACK_KEY_DOWN, _key_down, efb);
|
||||
evas_object_data_set(efb->main_layout, "flow_browser", efb);
|
||||
edje_object_signal_callback_add
|
||||
(efb->edje, "mouse,clicked,1", "toolbar_event", auto_hide_toolbar, efb->ephoto);
|
||||
|
||||
if (efb->ephoto->config->autohide_toolbar)
|
||||
{
|
||||
edje_object_signal_callback_add
|
||||
(efb->edje, "mouse,clicked,1", "toolbar_event",
|
||||
ephoto_auto_hide_toolbar, efb->ephoto);
|
||||
if (!elm_layout_file_set
|
||||
(efb->main_layout, PACKAGE_DATA_DIR "/themes/default/ephoto.edj",
|
||||
"ephoto/layout/simple/autohide"))
|
||||
{
|
||||
ERR("could not load style 'ephoto/layout/simple/autohide' from theme");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!elm_layout_file_set
|
||||
(efb->main_layout, PACKAGE_DATA_DIR "/themes/default/ephoto.edj",
|
||||
"ephoto/layout/simple"))
|
||||
{
|
||||
ERR("could not load style 'ephoto/layout/simple' from theme");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
efb->toolbar = elm_toolbar_add(efb->main_layout);
|
||||
elm_toolbar_homogenous_set(efb->toolbar, EINA_TRUE);
|
||||
|
|
|
@ -590,7 +590,7 @@ _toolbar_hide(void *data)
|
|||
}
|
||||
|
||||
void
|
||||
auto_hide_toolbar(void *data __UNUSED__, Evas_Object *obj, const char *emission __UNUSED__, const char *source __UNUSED__)
|
||||
ephoto_auto_hide_toolbar(void *data __UNUSED__, Evas_Object *obj, const char *emission __UNUSED__, const char *source __UNUSED__)
|
||||
{
|
||||
Ecore_Timer *timer;
|
||||
|
||||
|
|
|
@ -9,7 +9,6 @@
|
|||
* Rotating the scroller is not correct and was rejected by Raster and others.
|
||||
*/
|
||||
#define ROTATION 1
|
||||
#define HORIZONTAL 0
|
||||
#define ZOOM_STEP 0.2
|
||||
|
||||
typedef struct _Ephoto_Single_Browser Ephoto_Single_Browser;
|
||||
|
@ -789,9 +788,12 @@ ephoto_single_browser_add(Ephoto *ephoto, Evas_Object *parent)
|
|||
evas_object_event_callback_add
|
||||
(layout, EVAS_CALLBACK_KEY_DOWN, _key_down, sb);
|
||||
evas_object_data_set(layout, "single_browser", sb);
|
||||
edje_object_signal_callback_add
|
||||
(sb->edje, "mouse,clicked,1", "toolbar_event", auto_hide_toolbar, sb->ephoto);
|
||||
|
||||
if (sb->ephoto->config->autohide_toolbar)
|
||||
{
|
||||
edje_object_signal_callback_add
|
||||
(sb->edje, "mouse,clicked,1", "toolbar_event",
|
||||
ephoto_auto_hide_toolbar, sb->ephoto);
|
||||
if (!elm_layout_file_set
|
||||
(layout, PACKAGE_DATA_DIR "/themes/default/ephoto.edj",
|
||||
"ephoto/layout/simple/autohide"))
|
||||
|
@ -799,6 +801,17 @@ ephoto_single_browser_add(Ephoto *ephoto, Evas_Object *parent)
|
|||
ERR("could not load style 'ephoto/layout/simple/autohide' from theme");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!elm_layout_file_set
|
||||
(layout, PACKAGE_DATA_DIR "/themes/default/ephoto.edj",
|
||||
"ephoto/layout/simple"))
|
||||
{
|
||||
ERR("could not load style 'ephoto/layout/simple' from theme");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
sb->toolbar = elm_toolbar_add(sb->layout);
|
||||
elm_toolbar_homogenous_set(sb->toolbar, EINA_FALSE);
|
||||
|
|
|
@ -445,16 +445,30 @@ ephoto_thumb_browser_add(Ephoto *ephoto, Evas_Object *parent)
|
|||
evas_object_event_callback_add
|
||||
(layout, EVAS_CALLBACK_KEY_DOWN, _key_down, tb);
|
||||
evas_object_data_set(layout, "thumb_browser", tb);
|
||||
edje_object_signal_callback_add
|
||||
(tb->edje, "mouse,clicked,1", "toolbar_event", auto_hide_toolbar, tb->ephoto);
|
||||
|
||||
if (tb->ephoto->config->autohide_toolbar)
|
||||
{
|
||||
edje_object_signal_callback_add
|
||||
(tb->edje, "mouse,clicked,1", "toolbar_event",
|
||||
ephoto_auto_hide_toolbar, tb->ephoto);
|
||||
if (!elm_layout_file_set
|
||||
(layout, PACKAGE_DATA_DIR "/themes/default/ephoto.edj",
|
||||
"ephoto/layout/simple/autohide"))
|
||||
{
|
||||
ERR("could not load style 'ephoto/layout/simple/autohide' from theme");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!elm_layout_file_set
|
||||
(layout, PACKAGE_DATA_DIR "/themes/default/ephoto.edj",
|
||||
"ephoto/layout/simple"))
|
||||
{
|
||||
ERR("could not load style 'ephoto/layout/simple' from theme");
|
||||
goto error;
|
||||
}
|
||||
}
|
||||
|
||||
tb->toolbar = elm_toolbar_add(tb->layout);
|
||||
elm_toolbar_homogenous_set(tb->toolbar, EINA_FALSE);
|
||||
|
|
Loading…
Reference in New Issue