summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Zaoui <daniel.zaoui@samsung.com>2014-09-30 14:56:15 +0300
committerYakov Goldberg <yakov.g@samsung.com>2014-10-02 14:59:09 +0300
commit85be9c25ee8e179b3f62db755b5a8920d354225c (patch)
tree629b2323bdcbaa8eb80b9e48cd6af832f332ddb1
parentf4cb472ad0c717b35b54318fd1497ed139e25d3d (diff)
Fix default properties values.
Default values properties of each inherited class have to be set and not just the upper class.
-rw-r--r--data/config/func_names.json94
-rw-r--r--src/bin/egui_gui/editor.c19
2 files changed, 38 insertions, 75 deletions
diff --git a/data/config/func_names.json b/data/config/func_names.json
index 0ae5290..370598b 100644
--- a/data/config/func_names.json
+++ b/data/config/func_names.json
@@ -3,138 +3,94 @@
3 { 3 {
4 "Elm_Win": 4 "Elm_Win":
5 { 5 {
6 "Evas.Object.size":[150, 100], 6 "Evas.Object.size":[150, 100]
7 "Evas.Object.size_hint_weight":[1.0, 1.0],
8 "Evas.Object.visibility":[true]
9 },
10 "Elm_Bg":
11 {
12 "Evas.Object.size_hint_weight":[1.0, 1.0],
13 "Evas.Object.visibility":[true]
14 }, 7 },
15 "Elm_Button": 8 "Elm_Button":
16 { 9 {
17 "Evas.Object.size":[60, 30], 10 "Evas.Object.size":[60, 30]
18 "Evas.Object.size_hint_weight":[1.0, 1.0],
19 "Evas.Object.visibility":[true]
20 }, 11 },
21 "Elm_Label": 12 "Elm_Label":
22 { 13 {
23 "Evas.Object.size":[60, 30], 14 "Evas.Object.size":[60, 30]
24 "Evas.Object.size_hint_weight":[1.0, 1.0],
25 "Evas.Object.visibility":[true]
26 }, 15 },
27 "Elm_Check": 16 "Elm_Check":
28 { 17 {
29 "Evas.Object.size":[60, 30], 18 "Evas.Object.size":[60, 30]
30 "Evas.Object.size_hint_weight":[1.0, 1.0],
31 "Evas.Object.visibility":[true]
32 }, 19 },
33 "Elm_Radio": 20 "Elm_Radio":
34 { 21 {
35 "Evas.Object.size":[60, 30], 22 "Evas.Object.size":[60, 30]
36 "Evas.Object.size_hint_weight":[1.0, 1.0],
37 "Evas.Object.visibility":[true]
38 }, 23 },
39 "Elm_Icon": 24 "Elm_Icon":
40 { 25 {
41 "Evas.Object.size":[40, 40], 26 "Evas.Object.size":[40, 40]
42 "Evas.Object.size_hint_weight":[1.0, 1.0],
43 "Evas.Object.visibility":[true]
44 }, 27 },
45 "Elm_Image": 28 "Elm_Image":
46 { 29 {
47 "Evas.Object.size":[40, 40], 30 "Evas.Object.size":[40, 40]
48 "Evas.Object.size_hint_weight":[1.0, 1.0],
49 "Evas.Object.visibility":[true]
50 }, 31 },
51 "Elm_Actionslider": 32 "Elm_Actionslider":
52 { 33 {
53 "Evas.Object.size":[60, 30], 34 "Evas.Object.size":[60, 30]
54 "Evas.Object.size_hint_weight":[1.0, 1.0],
55 "Evas.Object.visibility":[true]
56 }, 35 },
57 "Elm_Clock": 36 "Elm_Clock":
58 { 37 {
59 "Evas.Object.size":[40, 40], 38 "Evas.Object.size":[40, 40]
60 "Evas.Object.size_hint_weight":[1.0, 1.0],
61 "Evas.Object.visibility":[true]
62 }, 39 },
63 "Elm_Dayselector": 40 "Elm_Dayselector":
64 { 41 {
65 "Evas.Object.size":[60, 45], 42 "Evas.Object.size":[60, 45]
66 "Evas.Object.size_hint_weight":[1.0, 1.0],
67 "Evas.Object.visibility":[true]
68 }, 43 },
69 "Elm_Calendar": 44 "Elm_Calendar":
70 { 45 {
71 "Evas.Object.size":[60, 45], 46 "Evas.Object.size":[60, 45]
72 "Evas.Object.size_hint_weight":[1.0, 1.0],
73 "Evas.Object.visibility":[true]
74 }, 47 },
75 "Elm_Bubble": 48 "Elm_Bubble":
76 { 49 {
77 "Evas.Object.size":[60, 45], 50 "Evas.Object.size":[60, 45]
78 "Evas.Object.size_hint_weight":[1.0, 1.0],
79 "Evas.Object.visibility":[true]
80 }, 51 },
81 "Elm_Colorselector": 52 "Elm_Colorselector":
82 { 53 {
83 "Evas.Object.size":[60, 45], 54 "Evas.Object.size":[60, 45]
84 "Evas.Object.size_hint_weight":[1.0, 1.0],
85 "Evas.Object.visibility":[true]
86 }, 55 },
87 "Elm_Entry": 56 "Elm_Entry":
88 { 57 {
89 "Evas.Object.size":[60, 30], 58 "Evas.Object.size":[60, 30]
90 "Evas.Object.size_hint_weight":[1.0, 1.0],
91 "Evas.Object.visibility":[true]
92 }, 59 },
93 "Elm_Flip": 60 "Elm_Flip":
94 { 61 {
95 "Evas.Object.size":[60, 30], 62 "Evas.Object.size":[60, 30]
96 "Evas.Object.size_hint_weight":[1.0, 1.0],
97 "Evas.Object.visibility":[true]
98 }, 63 },
99 "Elm_Genlist": 64 "Elm_Genlist":
100 { 65 {
101 "Evas.Object.size":[70, 60], 66 "Evas.Object.size":[70, 60]
102 "Evas.Object.size_hint_weight":[1.0, 1.0],
103 "Evas.Object.visibility":[true]
104 }, 67 },
105 "Elm_Gengrid": 68 "Elm_Gengrid":
106 { 69 {
107 "Evas.Object.size":[70, 60], 70 "Evas.Object.size":[70, 60]
108 "Evas.Object.size_hint_weight":[1.0, 1.0],
109 "Evas.Object.visibility":[true]
110 }, 71 },
111 "Elm_Table": 72 "Elm_Table":
112 { 73 {
113 "Evas.Object.size":[70, 60], 74 "Evas.Object.size":[70, 60]
114 "Evas.Object.size_hint_weight":[1.0, 1.0],
115 "Evas.Object.visibility":[true]
116 }, 75 },
117 "Elm_Menu": 76 "Elm_Menu":
118 { 77 {
119 "Evas.Object.size":[60, 30], 78 "Evas.Object.size":[60, 30]
120 "Evas.Object.size_hint_weight":[1.0, 1.0],
121 "Evas.Object.visibility":[true]
122 }, 79 },
123 "Elm_Diskselector": 80 "Elm_Diskselector":
124 { 81 {
125 "Evas.Object.size":[60, 50], 82 "Evas.Object.size":[60, 50]
126 "Evas.Object.size_hint_weight":[1.0, 1.0],
127 "Evas.Object.visibility":[true]
128 }, 83 },
129 "Elm_Ctxpopup": 84 "Elm_Ctxpopup":
130 { 85 {
131 "Evas.Object.size":[60, 40], 86 "Evas.Object.size":[60, 40]
132 "Evas.Object.size_hint_weight":[1.0, 1.0],
133 "Evas.Object.visibility":[true]
134 }, 87 },
135 "Elm_Toolbar": 88 "Elm_Toolbar":
136 { 89 {
137 "Evas.Object.size":[60, 30], 90 "Evas.Object.size":[60, 30]
91 },
92 "Evas.Object":
93 {
138 "Evas.Object.size_hint_weight":[1.0, 1.0], 94 "Evas.Object.size_hint_weight":[1.0, 1.0],
139 "Evas.Object.visibility":[true] 95 "Evas.Object.visibility":[true]
140 } 96 }
diff --git a/src/bin/egui_gui/editor.c b/src/bin/egui_gui/editor.c
index 707c408..3273efe 100644
--- a/src/bin/egui_gui/editor.c
+++ b/src/bin/egui_gui/editor.c
@@ -1649,14 +1649,21 @@ _editor_factory_wdg_create(const char *class_name)
1649 } 1649 }
1650 1650
1651 // Set default property values 1651 // Set default property values
1652 const Eina_List *defaults = db_default_prop_values_get(class_name); 1652 Eina_List *kl_list = eo_class_mro_get(class_name), *itr;
1653 const Eina_List *l = NULL; 1653 const char *kl_name;
1654 Gui_Widget_Property *defprop = NULL; 1654
1655 EINA_LIST_FOREACH(defaults, l, defprop) 1655 EINA_LIST_REVERSE_FOREACH(kl_list, itr, kl_name)
1656 { 1656 {
1657 Gui_Widget_Property *newprop = prop_copy(defprop); 1657 const Eina_List *defaults = db_default_prop_values_get(kl_name);
1658 wdg_prop_add(wdg, newprop); 1658 const Eina_List *l = NULL;
1659 Gui_Widget_Property *defprop = NULL;
1660 EINA_LIST_FOREACH(defaults, l, defprop)
1661 {
1662 Gui_Widget_Property *newprop = prop_copy(defprop);
1663 wdg_prop_add(wdg, newprop);
1664 }
1659 } 1665 }
1666 eina_list_free(kl_list);
1660 1667
1661 Eo *pw = NULL; 1668 Eo *pw = NULL;
1662 if (IS_WIN(wdg)) pw = (Eo *)canvas_get(); 1669 if (IS_WIN(wdg)) pw = (Eo *)canvas_get();