parent
bd1ed51ead
commit
368ed28cce
|
@ -8,47 +8,47 @@ static void _ephoto_delete_main_window(void *data, Evas_Object *obj, void *event
|
||||||
static void _ephoto_flow_browser_delete_cb(void *data, Evas_Object *obj, void *event_info);
|
static void _ephoto_flow_browser_delete_cb(void *data, Evas_Object *obj, void *event_info);
|
||||||
static void _ephoto_thumb_browser_selected_cb(void *data, Evas_Object *obj, void *event_info);
|
static void _ephoto_thumb_browser_selected_cb(void *data, Evas_Object *obj, void *event_info);
|
||||||
static void _ephoto_thumb_browser_directory_changed_cb(void *data, Evas_Object *obj, void *event_info);
|
static void _ephoto_thumb_browser_directory_changed_cb(void *data, Evas_Object *obj, void *event_info);
|
||||||
|
|
||||||
/* Objects Callbacks */
|
/* Objects Callbacks */
|
||||||
static void
|
static void
|
||||||
_ephoto_flow_browser_delete_cb(void *data, Evas_Object *obj, void *event_info)
|
_ephoto_flow_browser_delete_cb(void *data, Evas_Object *obj, void *event_info)
|
||||||
{
|
{
|
||||||
em->thumb_browser = ephoto_create_thumb_browser(em->layout, em->cur_directory);
|
em->thumb_browser = ephoto_create_thumb_browser(em->layout, em->cur_directory);
|
||||||
elm_layout_content_set(em->layout, "ephoto.content.swallow", em->thumb_browser);
|
elm_layout_content_set(em->layout, "ephoto.content.swallow", em->thumb_browser);
|
||||||
evas_object_smart_callback_add(em->thumb_browser,
|
evas_object_smart_callback_add(em->thumb_browser,
|
||||||
"selected",
|
"selected",
|
||||||
_ephoto_thumb_browser_selected_cb,
|
_ephoto_thumb_browser_selected_cb,
|
||||||
NULL);
|
NULL);
|
||||||
evas_object_smart_callback_add(em->thumb_browser,
|
evas_object_smart_callback_add(em->thumb_browser,
|
||||||
"directory,changed",
|
"directory,changed",
|
||||||
_ephoto_thumb_browser_directory_changed_cb,
|
_ephoto_thumb_browser_directory_changed_cb,
|
||||||
NULL);
|
NULL);
|
||||||
|
|
||||||
em->state = EPHOTO_STATE_THUMB;
|
em->state = EPHOTO_STATE_THUMB;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ephoto_thumb_browser_selected_cb(void *data, Evas_Object *obj, void *event_info)
|
_ephoto_thumb_browser_selected_cb(void *data, Evas_Object *obj, void *event_info)
|
||||||
{
|
{
|
||||||
const char *file = event_info;
|
const char *file = event_info;
|
||||||
|
|
||||||
em->flow_browser = ephoto_create_flow_browser(em->layout);
|
em->flow_browser = ephoto_create_flow_browser(em->layout);
|
||||||
ephoto_flow_browser_image_set(em->flow_browser, file);
|
ephoto_flow_browser_image_set(em->flow_browser, file);
|
||||||
elm_layout_content_set(em->layout, "ephoto.content.swallow", em->flow_browser);
|
elm_layout_content_set(em->layout, "ephoto.content.swallow", em->flow_browser);
|
||||||
evas_object_smart_callback_add(em->flow_browser,
|
evas_object_smart_callback_add(em->flow_browser,
|
||||||
"delete,request",
|
"delete,request",
|
||||||
_ephoto_flow_browser_delete_cb,
|
_ephoto_flow_browser_delete_cb,
|
||||||
NULL);
|
NULL);
|
||||||
em->state = EPHOTO_STATE_FLOW;
|
em->state = EPHOTO_STATE_FLOW;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
_ephoto_thumb_browser_directory_changed_cb(void *data, Evas_Object *obj, void *event_info)
|
_ephoto_thumb_browser_directory_changed_cb(void *data, Evas_Object *obj, void *event_info)
|
||||||
{
|
{
|
||||||
const char *dir = event_info;
|
const char *dir = event_info;
|
||||||
|
|
||||||
eina_stringshare_del(em->cur_directory);
|
eina_stringshare_del(em->cur_directory);
|
||||||
em->cur_directory = eina_stringshare_add(dir);
|
em->cur_directory = eina_stringshare_add(dir);
|
||||||
printf("Directory changed : %s\n", em->cur_directory);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/*Create the main ephoto window*/
|
/*Create the main ephoto window*/
|
||||||
|
|
|
@ -455,7 +455,7 @@ _ephoto_directory_chosen(void *data, Evas_Object *obj, void *event_info)
|
||||||
elm_win_title_set(em->win, "Ephoto");
|
elm_win_title_set(em->win, "Ephoto");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
printf("before callback\n");
|
|
||||||
evas_object_smart_callback_call(tb->layout, "directory,changed", tb->current_directory);
|
evas_object_smart_callback_call(tb->layout, "directory,changed", tb->current_directory);
|
||||||
|
|
||||||
evas_object_del(tb->fsel_win);
|
evas_object_del(tb->fsel_win);
|
||||||
|
|
Loading…
Reference in New Issue