summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--NEWS1
-rw-r--r--src/lib/elc_fileselector.c23
-rw-r--r--src/lib/elc_fileselector.h4
4 files changed, 33 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index cb251552f..beb68e329 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1510,3 +1510,8 @@
1510 the imf is available, the keyboard mode should be decided by ime, but 1510 the imf is available, the keyboard mode should be decided by ime, but
1511 not entry. This prevents the asynchronous states between ime and 1511 not entry. This prevents the asynchronous states between ime and
1512 conformant. 1512 conformant.
1513
15142013-07-23 ChunEon Park (Hermet)
1515
1516 * File Selector : Support elm_object_part_text_set() for the ok, cancel
1517 part to change the OK, Cancel button label.
diff --git a/NEWS b/NEWS
index 4624a5b1c..178391b2a 100644
--- a/NEWS
+++ b/NEWS
@@ -80,6 +80,7 @@ Additions:
80 * added callback call "scroll", "scroll,anim,start", "scroll,anim,stop", "scroll,drag,start", "scroll,drag,stop" in toolar widget. 80 * added callback call "scroll", "scroll,anim,start", "scroll,anim,stop", "scroll,drag,start", "scroll,drag,stop" in toolar widget.
81 * Add the configuration thumbscroll_flick_distance_tolerance. 81 * Add the configuration thumbscroll_flick_distance_tolerance.
82 * Add elm_access_highlight_next_set, export elm_widget_focus_region_show 82 * Add elm_access_highlight_next_set, export elm_widget_focus_region_show
83 * File Selector : Support elm_object_part_text_set() for the ok, cancel part to change the OK, Cancel button label.
83 84
84Improvements: 85Improvements:
85 86
diff --git a/src/lib/elc_fileselector.c b/src/lib/elc_fileselector.c
index 2d675a2fc..4701574ee 100644
--- a/src/lib/elc_fileselector.c
+++ b/src/lib/elc_fileselector.c
@@ -1417,6 +1417,28 @@ _elm_fileselector_smart_focus_direction_manager_is(Eo *obj EINA_UNUSED, void *_p
1417} 1417}
1418 1418
1419static void 1419static void
1420_elm_fileselector_smart_text_set(Eo *obj EINA_UNUSED, void *_pd, va_list *list)
1421{
1422 Elm_Fileselector_Smart_Data *sd = _pd;
1423
1424 const char *part = va_arg(*list, const char *);
1425 const char *label = va_arg(*list, const char *);
1426 Eina_Bool *ret = va_arg(*list, Eina_Bool *);
1427 if (ret) *ret = EINA_FALSE;
1428
1429 if (sd->ok_button && !strcmp(part, "ok"))
1430 {
1431 elm_object_text_set(sd->ok_button, label);
1432 if (ret) *ret = EINA_TRUE;
1433 }
1434 else if (sd->cancel_button && !strcmp(part, "cancel"))
1435 {
1436 elm_object_text_set(sd->cancel_button, label);
1437 if (ret) *ret = EINA_TRUE;
1438 }
1439}
1440
1441static void
1420_class_constructor(Eo_Class *klass) 1442_class_constructor(Eo_Class *klass)
1421{ 1443{
1422 unsigned int i; 1444 unsigned int i;
@@ -1432,6 +1454,7 @@ _class_constructor(Eo_Class *klass)
1432 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_fileselector_smart_focus_direction_manager_is), 1454 EO_OP_FUNC(ELM_WIDGET_ID(ELM_WIDGET_SUB_ID_FOCUS_DIRECTION_MANAGER_IS), _elm_fileselector_smart_focus_direction_manager_is),
1433 1455
1434 EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL), _elm_fileselector_smart_sizing_eval), 1456 EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_SIZING_EVAL), _elm_fileselector_smart_sizing_eval),
1457 EO_OP_FUNC(ELM_OBJ_LAYOUT_ID(ELM_OBJ_LAYOUT_SUB_ID_TEXT_SET), _elm_fileselector_smart_text_set),
1435 1458
1436 EO_OP_FUNC(ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_IS_SAVE_SET), _is_save_set), 1459 EO_OP_FUNC(ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_IS_SAVE_SET), _is_save_set),
1437 EO_OP_FUNC(ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_IS_SAVE_GET), _is_save_get), 1460 EO_OP_FUNC(ELM_OBJ_FILESELECTOR_ID(ELM_OBJ_FILESELECTOR_SUB_ID_IS_SAVE_GET), _is_save_get),
diff --git a/src/lib/elc_fileselector.h b/src/lib/elc_fileselector.h
index 8ad6ae930..77e6a392e 100644
--- a/src/lib/elc_fileselector.h
+++ b/src/lib/elc_fileselector.h
@@ -48,6 +48,10 @@
48 * buttons (@c event_info is a pointer to the selection's 48 * buttons (@c event_info is a pointer to the selection's
49 * path, a @b stringshared string) 49 * path, a @b stringshared string)
50 * 50 *
51 * For text, elm_layout_text_set() will work here on:
52 * @li @c "ok" - OK button label if the ok button is set. @since 1.8
53 * @li @c "cancel" - Cancel button label if the cancel button is set. @since 1.8
54 *
51 * Here is an example on its usage: 55 * Here is an example on its usage:
52 * @li @ref fileselector_example 56 * @li @ref fileselector_example
53 */ 57 */