forked from enlightenment/ephoto
Fix elm_toolbar usage on several projects
SVN revision: 53896
This commit is contained in:
parent
c589ea128f
commit
11487fbdb5
|
@ -445,7 +445,7 @@ static void
|
|||
_zoom_in(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Ephoto_Flow_Browser *fb = data;
|
||||
elm_toolbar_item_unselect(fb->action.zoom_in);
|
||||
elm_toolbar_item_selected_set(fb->action.zoom_in, EINA_FALSE);
|
||||
_zoom_set(fb, fb->zoom + ZOOM_STEP);
|
||||
}
|
||||
|
||||
|
@ -453,7 +453,7 @@ static void
|
|||
_zoom_out(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Ephoto_Flow_Browser *fb = data;
|
||||
elm_toolbar_item_unselect(fb->action.zoom_out);
|
||||
elm_toolbar_item_selected_set(fb->action.zoom_out, EINA_FALSE);
|
||||
_zoom_set(fb, fb->zoom - ZOOM_STEP);
|
||||
}
|
||||
|
||||
|
@ -461,7 +461,7 @@ static void
|
|||
_zoom_1(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Ephoto_Flow_Browser *fb = data;
|
||||
elm_toolbar_item_unselect(fb->action.zoom_1);
|
||||
elm_toolbar_item_selected_set(fb->action.zoom_1, EINA_FALSE);
|
||||
_zoom_set(fb, 1.0);
|
||||
}
|
||||
|
||||
|
@ -525,7 +525,7 @@ static void
|
|||
_go_first(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Ephoto_Flow_Browser *fb = data;
|
||||
elm_toolbar_item_unselect(fb->action.go_first);
|
||||
elm_toolbar_item_selected_set(fb->action.go_first, EINA_FALSE);
|
||||
_first_entry(fb);
|
||||
}
|
||||
|
||||
|
@ -533,7 +533,7 @@ static void
|
|||
_go_prev(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Ephoto_Flow_Browser *fb = data;
|
||||
elm_toolbar_item_unselect(fb->action.go_prev);
|
||||
elm_toolbar_item_selected_set(fb->action.go_prev, EINA_FALSE);
|
||||
_prev_entry(fb);
|
||||
}
|
||||
|
||||
|
@ -541,7 +541,7 @@ static void
|
|||
_go_next(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Ephoto_Flow_Browser *fb = data;
|
||||
elm_toolbar_item_unselect(fb->action.go_next);
|
||||
elm_toolbar_item_selected_set(fb->action.go_next, EINA_FALSE);
|
||||
_next_entry(fb);
|
||||
}
|
||||
|
||||
|
@ -549,7 +549,7 @@ static void
|
|||
_go_last(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Ephoto_Flow_Browser *fb = data;
|
||||
elm_toolbar_item_unselect(fb->action.go_last);
|
||||
elm_toolbar_item_selected_set(fb->action.go_last, EINA_FALSE);
|
||||
_last_entry(fb);
|
||||
}
|
||||
|
||||
|
@ -557,7 +557,7 @@ static void
|
|||
_go_rotate_counterclock(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Ephoto_Flow_Browser *fb = data;
|
||||
elm_toolbar_item_unselect(fb->action.rotate_counterclock);
|
||||
elm_toolbar_item_selected_set(fb->action.rotate_counterclock, EINA_FALSE);
|
||||
_rotate_counterclock(fb);
|
||||
}
|
||||
|
||||
|
@ -565,7 +565,7 @@ static void
|
|||
_go_rotate_clock(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Ephoto_Flow_Browser *fb = data;
|
||||
elm_toolbar_item_unselect(fb->action.rotate_clock);
|
||||
elm_toolbar_item_selected_set(fb->action.rotate_clock, EINA_FALSE);
|
||||
_rotate_clock(fb);
|
||||
}
|
||||
|
||||
|
@ -573,7 +573,7 @@ static void
|
|||
_go_flip_horiz(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Ephoto_Flow_Browser *fb = data;
|
||||
elm_toolbar_item_unselect(fb->action.flip_horiz);
|
||||
elm_toolbar_item_selected_set(fb->action.flip_horiz, EINA_FALSE);
|
||||
_flip_horiz(fb);
|
||||
}
|
||||
|
||||
|
@ -581,7 +581,7 @@ static void
|
|||
_go_flip_vert(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Ephoto_Flow_Browser *fb = data;
|
||||
elm_toolbar_item_unselect(fb->action.flip_vert);
|
||||
elm_toolbar_item_selected_set(fb->action.flip_vert, EINA_FALSE);
|
||||
_flip_vert(fb);
|
||||
}
|
||||
|
||||
|
@ -589,7 +589,7 @@ static void
|
|||
_slideshow(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Ephoto_Flow_Browser *fb = data;
|
||||
elm_toolbar_item_unselect(fb->action.slideshow);
|
||||
elm_toolbar_item_selected_set(fb->action.slideshow, EINA_FALSE);
|
||||
if (fb->entry)
|
||||
evas_object_smart_callback_call(fb->layout, "slideshow", fb->entry);
|
||||
}
|
||||
|
@ -669,7 +669,8 @@ _layout_del(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *eve
|
|||
static Elm_Toolbar_Item *
|
||||
_toolbar_item_add(Ephoto_Flow_Browser *fb, const char *icon, const char *label, int priority, Evas_Smart_Cb cb)
|
||||
{
|
||||
Elm_Toolbar_Item *item = elm_toolbar_item_add(fb->toolbar, icon, label, cb, fb);
|
||||
Elm_Toolbar_Item *item = elm_toolbar_item_append(fb->toolbar, icon, label,
|
||||
cb, fb);
|
||||
elm_toolbar_item_priority_set(item, priority);
|
||||
return item;
|
||||
}
|
||||
|
@ -677,7 +678,7 @@ _toolbar_item_add(Ephoto_Flow_Browser *fb, const char *icon, const char *label,
|
|||
static Elm_Toolbar_Item *
|
||||
_toolbar_item_separator_add(Ephoto_Flow_Browser *fb)
|
||||
{
|
||||
Elm_Toolbar_Item *it = elm_toolbar_item_add
|
||||
Elm_Toolbar_Item *it = elm_toolbar_item_append
|
||||
(fb->toolbar, NULL, NULL, NULL, NULL);
|
||||
elm_toolbar_item_separator_set(it, EINA_TRUE);
|
||||
return it;
|
||||
|
|
|
@ -46,7 +46,7 @@ ephoto_show_preferences(Ephoto *em)
|
|||
evas_object_show(pg1);
|
||||
elm_pager_content_push(pager, pg1);
|
||||
evas_object_data_set(pg1, "pager", pager);
|
||||
elm_toolbar_item_add(tb, NULL, "General", _ephoto_preferences_pager_switch, pg1);
|
||||
elm_toolbar_item_append(tb, NULL, "General", _ephoto_preferences_pager_switch, pg1);
|
||||
|
||||
elm_box_pack_end(box, pager);
|
||||
evas_object_show(pager);
|
||||
|
@ -56,7 +56,7 @@ ephoto_show_preferences(Ephoto *em)
|
|||
evas_object_show(pg2);
|
||||
elm_pager_content_push(pager, pg2);
|
||||
evas_object_data_set(pg2, "pager", pager);
|
||||
elm_toolbar_item_add(tb, NULL, "Slideshow", _ephoto_preferences_pager_switch, pg2);
|
||||
elm_toolbar_item_append(tb, NULL, "Slideshow", _ephoto_preferences_pager_switch, pg2);
|
||||
|
||||
o = elm_label_add(pg2);
|
||||
elm_label_label_set(o, "Delay:");
|
||||
|
@ -95,7 +95,7 @@ ephoto_show_preferences(Ephoto *em)
|
|||
evas_object_show(pg3);
|
||||
elm_pager_content_push(pager, pg3);
|
||||
evas_object_data_set(pg3, "pager", pager);
|
||||
elm_toolbar_item_add(tb, NULL, "External Editor", _ephoto_preferences_pager_switch, pg3);
|
||||
elm_toolbar_item_append(tb, NULL, "External Editor", _ephoto_preferences_pager_switch, pg3);
|
||||
|
||||
o = elm_label_add(pg3);
|
||||
elm_label_label_set(o, "Image editor:");
|
||||
|
@ -131,7 +131,8 @@ ephoto_show_preferences(Ephoto *em)
|
|||
evas_object_event_callback_add(em->prefs_win, EVAS_CALLBACK_KEY_DOWN,
|
||||
_ephoto_key_pressed, em);
|
||||
|
||||
elm_toolbar_item_select_first(tb);
|
||||
elm_toolbar_item_selected_set(elm_toolbar_first_item_get(tb),
|
||||
EINA_TRUE);
|
||||
elm_pager_content_promote(pager, pg1);
|
||||
}
|
||||
|
||||
|
|
|
@ -414,7 +414,7 @@ static void
|
|||
_zoom_in(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Ephoto_Thumb_Browser *tb = data;
|
||||
elm_toolbar_item_unselect(tb->action.zoom_in);
|
||||
elm_toolbar_item_selected_set(tb->action.zoom_in, EINA_FALSE);
|
||||
_zoom_set(tb, tb->ephoto->config->thumb_size + ZOOM_STEP);
|
||||
}
|
||||
|
||||
|
@ -422,7 +422,7 @@ static void
|
|||
_zoom_out(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Ephoto_Thumb_Browser *tb = data;
|
||||
elm_toolbar_item_unselect(tb->action.zoom_out);
|
||||
elm_toolbar_item_selected_set(tb->action.zoom_out, EINA_FALSE);
|
||||
_zoom_set(tb, tb->ephoto->config->thumb_size - ZOOM_STEP);
|
||||
}
|
||||
|
||||
|
@ -433,7 +433,7 @@ _view_flow(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
|||
Elm_Gengrid_Item *it = elm_gengrid_selected_item_get(tb->grid);
|
||||
Ephoto_Entry *entry;
|
||||
|
||||
elm_toolbar_item_unselect(tb->action.view_flow);
|
||||
elm_toolbar_item_selected_set(tb->action.view_flow, EINA_FALSE);
|
||||
|
||||
if (it) entry = elm_gengrid_item_data_get(it);
|
||||
else entry = _first_file_entry_find(tb);
|
||||
|
@ -452,7 +452,7 @@ _slideshow(void *data, Evas_Object *o __UNUSED__, void *event_info __UNUSED__)
|
|||
Elm_Gengrid_Item *it = elm_gengrid_selected_item_get(tb->grid);
|
||||
Ephoto_Entry *entry;
|
||||
|
||||
elm_toolbar_item_unselect(tb->action.slideshow);
|
||||
elm_toolbar_item_selected_set(tb->action.slideshow, EINA_FALSE);
|
||||
|
||||
if (it) entry = elm_gengrid_item_data_get(it);
|
||||
else entry = _first_file_entry_find(tb);
|
||||
|
@ -535,7 +535,8 @@ _layout_del(void *data, Evas *e __UNUSED__, Evas_Object *o __UNUSED__, void *eve
|
|||
static Elm_Toolbar_Item *
|
||||
_toolbar_item_add(Ephoto_Thumb_Browser *tb, const char *icon, const char *label, int priority, Evas_Smart_Cb cb)
|
||||
{
|
||||
Elm_Toolbar_Item *item = elm_toolbar_item_add(tb->toolbar, icon, label, cb, tb);
|
||||
Elm_Toolbar_Item *item = elm_toolbar_item_append(tb->toolbar, icon, label,
|
||||
cb, tb);
|
||||
elm_toolbar_item_priority_set(item, priority);
|
||||
return item;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue