forked from enlightenment/efl
elementary/fileselector - support elm_object_part_text_set() to set the ok, cancel button label.
This commit is contained in:
parent
8659b377cb
commit
95ca372382
|
@ -1510,3 +1510,8 @@
|
|||
the imf is available, the keyboard mode should be decided by ime, but
|
||||
not entry. This prevents the asynchronous states between ime and
|
||||
conformant.
|
||||
|
||||
2013-07-23 ChunEon Park (Hermet)
|
||||
|
||||
* File Selector : Support elm_object_part_text_set() for the ok, cancel
|
||||
part to change the OK, Cancel button label.
|
||||
|
|
|
@ -80,6 +80,7 @@ Additions:
|
|||
* added callback call "scroll", "scroll,anim,start", "scroll,anim,stop", "scroll,drag,start", "scroll,drag,stop" in toolar widget.
|
||||
* Add the configuration thumbscroll_flick_distance_tolerance.
|
||||
* Add elm_access_highlight_next_set, export elm_widget_focus_region_show
|
||||
* File Selector : Support elm_object_part_text_set() for the ok, cancel part to change the OK, Cancel button label.
|
||||
|
||||
Improvements:
|
||||
|
||||
|
|
|
@ -1416,6 +1416,28 @@ _elm_fileselector_smart_focus_direction_manager_is(Eo *obj EINA_UNUSED, void *_p
|
|||
*ret = EINA_FALSE;
|
||||
}
|
||||
|
||||
static void
|
||||
_elm_fileselector_smart_text_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
|
||||
{
|
||||
Elm_Fileselector_Smart_Data *sd = _pd;
|
||||
|
||||
const char *part = va_arg(*list, const char *);
|
||||
const char *label = va_arg(*list, const char *);
|
||||
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
|
||||
if (ret) *ret = EINA_FALSE;
|
||||
|
||||
if (sd->ok_button && !strcmp(part, "ok"))
|
||||
{
|
||||
elm_object_text_set(sd->ok_button, label);
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
else if (sd->cancel_button && !strcmp(part, "cancel"))
|
||||
{
|
||||
elm_object_text_set(sd->cancel_button, label);
|
||||
if (ret) *ret = EINA_TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_class_constructor(Eo_Class *klass)
|
||||
{
|
||||
|
@ -1432,6 +1454,7 @@ _class_constructor(Eo_Class *klass)
|
|||
EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_fileselector_smart_focus_direction_manager_is),
|
||||
|
||||
EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL), _elm_fileselector_smart_sizing_eval),
|
||||
EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TEXT_SET), _elm_fileselector_smart_text_set),
|
||||
|
||||
EO_OP_FUNC(ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_IS_SAVE_SET), _is_save_set),
|
||||
EO_OP_FUNC(ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_IS_SAVE_GET), _is_save_get),
|
||||
|
|
|
@ -48,6 +48,10 @@
|
|||
* buttons (@c event_info is a pointer to the selection's
|
||||
* path, a @b stringshared string)
|
||||
*
|
||||
* For text, elm_layout_text_set() will work here on:
|
||||
* @li @c "ok" - OK button label if the ok button is set. @since 1.8
|
||||
* @li @c "cancel" - Cancel button label if the cancel button is set. @since 1.8
|
||||
*
|
||||
* Here is an example on its usage:
|
||||
* @li @ref fileselector_example
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue