summaryrefslogtreecommitdiff
path: root/legacy/elementary/src/lib/elm_widget_entry.h
diff options
context:
space:
mode:
authorYoungbok Shin <youngb.shin@samsung.com>2013-05-16 18:10:13 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2013-05-16 18:10:13 +0900
commite847b65e2fdaba68555cbcf47f2679983fce0fcb (patch)
treed19c7eacdf0c49f32e434cadcb13bd8604e7a42f /legacy/elementary/src/lib/elm_widget_entry.h
parent56b597432784c88004314b1b4f9d0cf4cf15e35f (diff)
entry: elm_entry_markup_filter_remove() has a problem when internally defined filters are used. fixed.
When we call elm_entry_markup_filter_remove() with internally defined filter callbacks, it doesn't work. So we need a one of pointer for saving the address of data. 10 Elm_Entry_Filter_Limit_Size lim; 11 lim.max_char_count = 20; 12 lim.max_byte_count = 0; 13 elm_entry_markup_filter_append(en, elm_entry_filter_limit_size, &lim); 14 15 elm_entry_markup_filter_remove(en, elm_entry_filter_limit_size, &lim); 16 lim.max_char_count = 50; 17 lim.max_byte_count = 0; 18 elm_entry_markup_filter_append(en, elm_entry_filter_limit_size, &lim); In this code, we expect to see the filter of entry will be renewed. But elm_entry_markup_filter_remove() doesn't work. Because, markup_filter does not hold the address of data when we use the filter callback which is defined in elm_entry.c _filter_new() in elm_entry.c You can see that _filter_new allocates new pointer and names as lim2. lim2 is saved in data of _Elm_Entry_Markup_Filter. So the address of data doesn't equal to the input data.
Diffstat (limited to '')
-rw-r--r--legacy/elementary/src/lib/elm_widget_entry.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/legacy/elementary/src/lib/elm_widget_entry.h b/legacy/elementary/src/lib/elm_widget_entry.h
index b2ba26e..ddb0e54 100644
--- a/legacy/elementary/src/lib/elm_widget_entry.h
+++ b/legacy/elementary/src/lib/elm_widget_entry.h
@@ -116,6 +116,7 @@ struct _Elm_Entry_Markup_Filter
116{ 116{
117 Elm_Entry_Filter_Cb func; 117 Elm_Entry_Filter_Cb func;
118 void *data; 118 void *data;
119 void *orig_data;
119}; 120};
120 121
121typedef enum _Length_Unit 122typedef enum _Length_Unit