summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorali <ali198724@gmail.com>2019-12-20 14:04:18 +0100
committerXavi Artigas <xavierartigas@yahoo.es>2019-12-20 14:10:00 +0100
commitb9818f566cca37888782c01a4f4388ce3260af2d (patch)
tree70bda4f6302c59d7789da0a4e35314f26874cd93
parent778bef8e606cd1b20b9213a0516c02072391aa7a (diff)
efl.ui.textbox: rename _disabled properties into _enabled
Reviewers: segfaultxavi, woohyun, bu5hm4n Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Maniphest Tasks: T8522 Differential Revision: https://phab.enlightenment.org/D10923
-rw-r--r--src/lib/elementary/efl_ui_clock.c2
-rw-r--r--src/lib/elementary/efl_ui_textbox.c32
-rw-r--r--src/lib/elementary/efl_ui_textbox.eo12
3 files changed, 23 insertions, 23 deletions
diff --git a/src/lib/elementary/efl_ui_clock.c b/src/lib/elementary/efl_ui_clock.c
index 1e6ae63f2d..89a0d4a02b 100644
--- a/src/lib/elementary/efl_ui_clock.c
+++ b/src/lib/elementary/efl_ui_clock.c
@@ -201,7 +201,7 @@ field_create(Eo *obj, Efl_Ui_Clock_Type field_type)
201 efl_text_multiline_set(efl_added, EINA_FALSE), 201 efl_text_multiline_set(efl_added, EINA_FALSE),
202 efl_text_interactive_editable_set(efl_added, EINA_FALSE), 202 efl_text_interactive_editable_set(efl_added, EINA_FALSE),
203 efl_input_text_input_panel_autoshow_set(efl_added, EINA_FALSE), 203 efl_input_text_input_panel_autoshow_set(efl_added, EINA_FALSE),
204 efl_ui_textbox_context_menu_disabled_set(efl_added, EINA_TRUE)); 204 efl_ui_textbox_context_menu_enabled_set(efl_added, EINA_FALSE));
205 } 205 }
206 evas_object_data_set(field_obj, "_field_type", (void *)field_type); 206 evas_object_data_set(field_obj, "_field_type", (void *)field_type);
207 207
diff --git a/src/lib/elementary/efl_ui_textbox.c b/src/lib/elementary/efl_ui_textbox.c
index 31531d9ef6..ed9c4b365f 100644
--- a/src/lib/elementary/efl_ui_textbox.c
+++ b/src/lib/elementary/efl_ui_textbox.c
@@ -102,7 +102,7 @@ struct _Efl_Ui_Textbox_Data
102 Eina_Future *primary; 102 Eina_Future *primary;
103 Eina_Future *clipboard; 103 Eina_Future *clipboard;
104 } sel_future; 104 } sel_future;
105 Eina_Bool sel_handler_disabled : 1; 105 Eina_Bool sel_handler_enabled : 1;
106 Eina_Bool start_handler_down : 1; 106 Eina_Bool start_handler_down : 1;
107 Eina_Bool start_handler_shown : 1; 107 Eina_Bool start_handler_shown : 1;
108 Eina_Bool end_handler_down : 1; 108 Eina_Bool end_handler_down : 1;
@@ -110,7 +110,7 @@ struct _Efl_Ui_Textbox_Data
110 Eina_Bool deferred_decoration_selection : 1; 110 Eina_Bool deferred_decoration_selection : 1;
111 Eina_Bool deferred_decoration_cursor : 1; 111 Eina_Bool deferred_decoration_cursor : 1;
112 Eina_Bool deferred_decoration_anchor : 1; 112 Eina_Bool deferred_decoration_anchor : 1;
113 Eina_Bool context_menu : 1; 113 Eina_Bool context_menu_enabled : 1;
114 Eina_Bool long_pressed : 1; 114 Eina_Bool long_pressed : 1;
115 Eina_Bool auto_save : 1; 115 Eina_Bool auto_save : 1;
116 Eina_Bool has_text : 1; 116 Eina_Bool has_text : 1;
@@ -465,7 +465,7 @@ _update_selection_handler(Eo *obj)
465 return; 465 return;
466 } 466 }
467 467
468 if (!sd->sel_handler_disabled) 468 if (sd->sel_handler_enabled)
469 { 469 {
470 Eina_Rect rect; 470 Eina_Rect rect;
471 Eina_Position2D off; 471 Eina_Position2D off;
@@ -1176,7 +1176,7 @@ _menu_call(Evas_Object *obj)
1176 { 1176 {
1177 sd->api->obj_longpress(obj); 1177 sd->api->obj_longpress(obj);
1178 } 1178 }
1179 else if (sd->context_menu) 1179 else if (sd->context_menu_enabled)
1180 { 1180 {
1181 const char *context_menu_orientation; 1181 const char *context_menu_orientation;
1182 Eina_Bool ownersel; 1182 Eina_Bool ownersel;
@@ -1974,13 +1974,13 @@ _efl_ui_textbox_efl_object_constructor(Eo *obj, Efl_Ui_Textbox_Data *sd)
1974 sd->entry_edje = wd->resize_obj; 1974 sd->entry_edje = wd->resize_obj;
1975 sd->cnp_mode = EFL_UI_SELECTION_FORMAT_TEXT; 1975 sd->cnp_mode = EFL_UI_SELECTION_FORMAT_TEXT;
1976 sd->line_wrap = ELM_WRAP_WORD; 1976 sd->line_wrap = ELM_WRAP_WORD;
1977 sd->context_menu = EINA_TRUE; 1977 sd->context_menu_enabled = EINA_TRUE;
1978 sd->auto_save = EINA_TRUE; 1978 sd->auto_save = EINA_TRUE;
1979 efl_text_interactive_editable_set(obj, EINA_TRUE); 1979 efl_text_interactive_editable_set(obj, EINA_TRUE);
1980 efl_text_interactive_selection_allowed_set(obj, EINA_TRUE); 1980 efl_text_interactive_selection_allowed_set(obj, EINA_TRUE);
1981 sd->drop_format = EFL_UI_SELECTION_FORMAT_MARKUP | EFL_UI_SELECTION_FORMAT_IMAGE; 1981 sd->drop_format = EFL_UI_SELECTION_FORMAT_MARKUP | EFL_UI_SELECTION_FORMAT_IMAGE;
1982 sd->last.scroll = EINA_SIZE2D(0, 0); 1982 sd->last.scroll = EINA_SIZE2D(0, 0);
1983 sd->sel_handler_disabled = EINA_TRUE; 1983 sd->sel_handler_enabled = EINA_FALSE;
1984 1984
1985 return obj; 1985 return obj;
1986} 1986}
@@ -2197,16 +2197,16 @@ _efl_ui_textbox_selection_get(const Eo *obj, Efl_Ui_Textbox_Data *sd EINA_UNUSED
2197} 2197}
2198 2198
2199EOLIAN static void 2199EOLIAN static void
2200_efl_ui_textbox_selection_handler_disabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Textbox_Data *sd, Eina_Bool disabled) 2200_efl_ui_textbox_selection_handler_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Textbox_Data *sd, Eina_Bool enabled)
2201{ 2201{
2202 if (sd->sel_handler_disabled == disabled) return; 2202 if (sd->sel_handler_enabled == enabled) return;
2203 sd->sel_handler_disabled = disabled; 2203 sd->sel_handler_enabled = enabled;
2204} 2204}
2205 2205
2206EOLIAN static Eina_Bool 2206EOLIAN static Eina_Bool
2207_efl_ui_textbox_selection_handler_disabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Textbox_Data *sd) 2207_efl_ui_textbox_selection_handler_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Textbox_Data *sd)
2208{ 2208{
2209 return sd->sel_handler_disabled; 2209 return sd->sel_handler_enabled;
2210} 2210}
2211 2211
2212static void 2212static void
@@ -2349,16 +2349,16 @@ _efl_ui_textbox_selection_paste(Eo *obj, Efl_Ui_Textbox_Data *sd EINA_UNUSED)
2349} 2349}
2350 2350
2351EOLIAN static void 2351EOLIAN static void
2352_efl_ui_textbox_context_menu_disabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Textbox_Data *sd, Eina_Bool disabled) 2352_efl_ui_textbox_context_menu_enabled_set(Eo *obj EINA_UNUSED, Efl_Ui_Textbox_Data *sd, Eina_Bool enabled)
2353{ 2353{
2354 if (sd->context_menu == !disabled) return; 2354 if (sd->context_menu_enabled == enabled) return;
2355 sd->context_menu = !disabled; 2355 sd->context_menu_enabled = enabled;
2356} 2356}
2357 2357
2358EOLIAN static Eina_Bool 2358EOLIAN static Eina_Bool
2359_efl_ui_textbox_context_menu_disabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Textbox_Data *sd) 2359_efl_ui_textbox_context_menu_enabled_get(const Eo *obj EINA_UNUSED, Efl_Ui_Textbox_Data *sd)
2360{ 2360{
2361 return !sd->context_menu; 2361 return sd->context_menu_enabled;
2362} 2362}
2363 2363
2364EOLIAN static Eina_Error 2364EOLIAN static Eina_Error
diff --git a/src/lib/elementary/efl_ui_textbox.eo b/src/lib/elementary/efl_ui_textbox.eo
index 11007ffef8..9104d436b2 100644
--- a/src/lib/elementary/efl_ui_textbox.eo
+++ b/src/lib/elementary/efl_ui_textbox.eo
@@ -19,14 +19,14 @@ class @beta Efl.Ui.Textbox extends Efl.Ui.Layout_Base implements Efl.Input.Click
19 scroll: bool; [[$true to enable scrolling. Default is $false.]] 19 scroll: bool; [[$true to enable scrolling. Default is $false.]]
20 } 20 }
21 } 21 }
22 @property context_menu_disabled { 22 @property context_menu_enabled {
23 [[This disables the entry's contextual (longpress) menu.]] 23 [[This enables or disables the entry's contextual (longpress) menu.]]
24 set { 24 set {
25 } 25 }
26 get { 26 get {
27 } 27 }
28 values { 28 values {
29 disabled: bool; [[If $true, the menu is disabled.]] 29 enabled: bool; [[If $true, the menu is enabled.]]
30 } 30 }
31 } 31 }
32 @property cnp_mode { 32 @property cnp_mode {
@@ -45,14 +45,14 @@ class @beta Efl.Ui.Textbox extends Efl.Ui.Layout_Base implements Efl.Input.Click
45 format: Efl.Ui.Selection_Format; [[Format for copy & paste.]] 45 format: Efl.Ui.Selection_Format; [[Format for copy & paste.]]
46 } 46 }
47 } 47 }
48 @property selection_handler_disabled { 48 @property selection_handler_enabled {
49 [[This disables the entry's selection handlers.]] 49 [[This enables or disables the entry's selection handlers.]]
50 set { 50 set {
51 } 51 }
52 get { 52 get {
53 } 53 }
54 values { 54 values {
55 disabled: bool; [[If $true, the selection handlers are disabled.]] 55 enabled: bool; [[If $true, the selection handlers are enabled.]]
56 } 56 }
57 } 57 }
58 58