New 1.17 API: elm.Configuration.context_menu_disabled
This commit is contained in:
parent
926c325de8
commit
f03f83fba9
|
@ -1215,6 +1215,21 @@ cdef class Configuration(object):
|
|||
def __set__(self, mode):
|
||||
elm_config_slider_indicator_visible_mode_set(mode)
|
||||
|
||||
property context_menu_disabled:
|
||||
"""
|
||||
|
||||
Enable or disable context menu in entries.
|
||||
|
||||
:type: bool
|
||||
|
||||
.. versionadded:: 1.17
|
||||
|
||||
"""
|
||||
def __get__(self):
|
||||
return bool(elm_config_context_menu_disabled_get())
|
||||
def __set__(self, bint disabled):
|
||||
elm_config_context_menu_disabled_set(disabled)
|
||||
|
||||
#For compatibility
|
||||
def config_finger_size_get():
|
||||
return elm_config_finger_size_get()
|
||||
|
|
|
@ -180,6 +180,8 @@ cdef extern from "Elementary.h":
|
|||
Eina_Bool elm_config_window_auto_focus_animate_get()
|
||||
void elm_config_window_auto_focus_animate_set(Eina_Bool enable)
|
||||
|
||||
Eina_Bool elm_config_context_menu_disabled_get()
|
||||
void elm_config_context_menu_disabled_set(Eina_Bool disabled)
|
||||
|
||||
Eina_Bool elm_config_mirrored_get()
|
||||
void elm_config_mirrored_set(Eina_Bool mirrored)
|
||||
|
|
|
@ -5,6 +5,7 @@ from efl.evas import EVAS_HINT_EXPAND, EVAS_HINT_FILL, EXPAND_BOTH, FILL_BOTH, \
|
|||
EXPAND_HORIZ, FILL_HORIZ
|
||||
from efl import elementary
|
||||
from efl.elementary.check import Check
|
||||
from efl.elementary.configuration import Configuration
|
||||
from efl.elementary.window import StandardWindow
|
||||
from efl.elementary.background import Background
|
||||
from efl.elementary.box import Box
|
||||
|
@ -45,6 +46,9 @@ def my_entry_bt_3(bt, en):
|
|||
def my_entry_bt_4(bt, en):
|
||||
en.entry_insert("Insert some <b>BOLD</> text")
|
||||
|
||||
def my_entry_bt_5(chk):
|
||||
Configuration().context_menu_disabled = chk.state
|
||||
|
||||
def my_entry_anchor_test(obj, anchor, en, *args, **kwargs):
|
||||
en.entry_insert("ANCHOR CLICKED")
|
||||
|
||||
|
@ -95,6 +99,12 @@ def entry_clicked(obj, item=None):
|
|||
bx2.pack_end(bt)
|
||||
bt.show()
|
||||
|
||||
ck = Check(win, text="Context menu disabled")#, size_hint_weight=EXPAND_HORIZ,
|
||||
# size_hint_align=FILL_BOTH)
|
||||
ck.callback_changed_add(my_entry_bt_5)
|
||||
bx2.pack_end(ck)
|
||||
ck.show()
|
||||
|
||||
bx.pack_end(bx2)
|
||||
bx2.show()
|
||||
|
||||
|
|
Loading…
Reference in New Issue