summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2013-01-16 11:27:03 +0000
committerChunEon Park <hermet@hermet.pe.kr>2013-01-16 11:27:03 +0000
commitd961dc73a7bd35e8d09336ce3fd85146c22ae9f4 (patch)
treebbb91d581f4503fae905be5586e8f8e8d4f1e154
parent8e4b6a6d19a9a87c55b653dfb4b39aa9f28dcb9d (diff)
elementary/conformant - allocate dummy parts objects in conformant only when their swallow parts are actually exists. these conformant parts are not necessary in most cases since they are closely depenent on the platform feature.
SVN revision: 82877
-rw-r--r--ChangeLog5
-rw-r--r--NEWS2
-rw-r--r--src/lib/elm_conform.c91
3 files changed, 68 insertions, 30 deletions
diff --git a/ChangeLog b/ChangeLog
index 629396894..527e7da04 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -915,3 +915,8 @@
9152013-01-16 Jaeun Choi 9152013-01-16 Jaeun Choi
916 916
917 * Fix bug where index is not re-filled if autohide disabled 917 * Fix bug where index is not re-filled if autohide disabled
918
9192013-01-16 ChunEon Park (Hermet)
920
921 * allocate conformant part dummy objects only when the swallow parts are existed actually. since these parts are really dependent on the platform, in most case they don't need all parts at the same time.
922
diff --git a/NEWS b/NEWS
index d5fd296e3..d62e7c6e5 100644
--- a/NEWS
+++ b/NEWS
@@ -52,6 +52,8 @@ Improvements:
52 * Setting the same font size of the others widgets for the dayselector. 52 * Setting the same font size of the others widgets for the dayselector.
53 * Added a separated spinner for year on calendar. 53 * Added a separated spinner for year on calendar.
54 * Don't link anymore with E_DBus at build time. 54 * Don't link anymore with E_DBus at build time.
55 * allocate conformant part dummy objects only when the swallow parts
56 are existed actually. since these parts are really dependent on the platform, in most case they don't need all parts at the same time.
55 57
56Fixes: 58Fixes:
57 59
diff --git a/src/lib/elm_conform.c b/src/lib/elm_conform.c
index 4c1a13bbb..940dd29fa 100644
--- a/src/lib/elm_conform.c
+++ b/src/lib/elm_conform.c
@@ -211,54 +211,78 @@ static void
211_conformant_parts_swallow(Evas_Object *obj) 211_conformant_parts_swallow(Evas_Object *obj)
212{ 212{
213 Evas *e; 213 Evas *e;
214 Elm_Widget_Smart_Data *wd;
214 215
215 ELM_CONFORMANT_DATA_GET(obj, sd); 216 ELM_CONFORMANT_DATA_GET(obj, sd);
216 217
218 wd = eo_data_get(obj, ELM_OBJ_WIDGET_CLASS);
217 e = evas_object_evas_get(obj); 219 e = evas_object_evas_get(obj);
218 220
219 sd->scroller = NULL; 221 sd->scroller = NULL;
220 222
221 //Indicator
222 //Indicator swallow can occur Only indicator show or rotation change
223
224 //Virtual Keyboard 223 //Virtual Keyboard
225 if (!sd->virtualkeypad) 224 if (edje_object_part_exists(wd->resize_obj, "elm.swallow.virtualkeypad"))
226 { 225 {
227 sd->virtualkeypad = evas_object_rectangle_add(e); 226 if (!sd->virtualkeypad)
228 elm_widget_sub_object_add(obj, sd->virtualkeypad); 227 {
229 evas_object_size_hint_max_set(sd->virtualkeypad, -1, 0); 228 sd->virtualkeypad = evas_object_rectangle_add(e);
230 } 229 elm_widget_sub_object_add(obj, sd->virtualkeypad);
231 else 230 evas_object_size_hint_max_set(sd->virtualkeypad, -1, 0);
232 _conformant_part_sizing_eval(obj, ELM_CONFORMANT_VIRTUAL_KEYPAD_PART); 231 }
232 else
233 _conformant_part_sizing_eval(obj, ELM_CONFORMANT_VIRTUAL_KEYPAD_PART);
233 234
234 evas_object_color_set(sd->virtualkeypad, 0, 0, 0, 0); 235 evas_object_color_set(sd->virtualkeypad, 0, 0, 0, 0);
235 elm_layout_content_set(obj, "elm.swallow.virtualkeypad", sd->virtualkeypad); 236 elm_layout_content_set(obj, "elm.swallow.virtualkeypad",
237 sd->virtualkeypad);
238 }
239 else if (sd->virtualkeypad)
240 {
241 evas_object_del(sd->virtualkeypad);
242 sd->virtualkeypad = NULL;
243 }
236 244
237 //Clipboard 245 //Clipboard
238 if (!sd->clipboard) 246 if (edje_object_part_exists(wd->resize_obj, "elm.swallow.clipboard"))
239 { 247 {
240 sd->clipboard = evas_object_rectangle_add(e); 248 if (!sd->clipboard)
241 evas_object_size_hint_min_set(sd->clipboard, -1, 0); 249 {
242 evas_object_size_hint_max_set(sd->clipboard, -1, 0); 250 sd->clipboard = evas_object_rectangle_add(e);
243 } 251 evas_object_size_hint_min_set(sd->clipboard, -1, 0);
244 else 252 evas_object_size_hint_max_set(sd->clipboard, -1, 0);
245 _conformant_part_sizing_eval(obj, ELM_CONFORMANT_CLIPBOARD_PART); 253 }
254 else
255 _conformant_part_sizing_eval(obj, ELM_CONFORMANT_CLIPBOARD_PART);
246 256
247 evas_object_color_set(sd->clipboard, 0, 0, 0, 0); 257 evas_object_color_set(sd->clipboard, 0, 0, 0, 0);
248 elm_layout_content_set(obj, "elm.swallow.clipboard", sd->clipboard); 258 elm_layout_content_set(obj, "elm.swallow.clipboard", sd->clipboard);
259 }
260 else if (sd->clipboard)
261 {
262 evas_object_del(sd->clipboard);
263 sd->clipboard = NULL;
264 }
249 265
250 //Softkey 266 //Softkey
251 if (!sd->softkey) 267 if (edje_object_part_exists(wd->resize_obj, "elm.swallow.softkey"))
252 { 268 {
253 sd->softkey = evas_object_rectangle_add(e); 269 if (!sd->softkey)
254 evas_object_size_hint_min_set(sd->softkey, -1, 0); 270 {
255 evas_object_size_hint_max_set(sd->softkey, -1, 0); 271 sd->softkey = evas_object_rectangle_add(e);
256 } 272 evas_object_size_hint_min_set(sd->softkey, -1, 0);
257 else 273 evas_object_size_hint_max_set(sd->softkey, -1, 0);
258 _conformant_part_sizing_eval(obj, ELM_CONFORMANT_SOFTKEY_PART); 274 }
275 else
276 _conformant_part_sizing_eval(obj, ELM_CONFORMANT_SOFTKEY_PART);
259 277
260 evas_object_color_set(sd->softkey, 0, 0, 0, 0); 278 evas_object_color_set(sd->softkey, 0, 0, 0, 0);
261 elm_layout_content_set(obj, "elm.swallow.softkey", sd->softkey); 279 elm_layout_content_set(obj, "elm.swallow.softkey", sd->softkey);
280 }
281 else if (sd->softkey)
282 {
283 evas_object_del(sd->softkey);
284 sd->softkey = NULL;
285 }
262} 286}
263 287
264static Eina_Bool 288static Eina_Bool
@@ -424,9 +448,16 @@ static void
424_indicator_mode_set(Evas_Object *conformant, Elm_Win_Indicator_Mode indmode) 448_indicator_mode_set(Evas_Object *conformant, Elm_Win_Indicator_Mode indmode)
425{ 449{
426 Evas_Object *old_indi = NULL; 450 Evas_Object *old_indi = NULL;
451 Elm_Widget_Smart_Data *wd;
452
427 ELM_CONFORMANT_DATA_GET(conformant, sd); 453 ELM_CONFORMANT_DATA_GET(conformant, sd);
454 wd = eo_data_get(obj, ELM_OBJ_WIDGET_CLASS);
455
428 sd->indmode = indmode; 456 sd->indmode = indmode;
429 457
458 if (!edje_object_part_exists(wd->resize_obj, "elm.swallow.indicator"))
459 return;
460
430 if (indmode == ELM_WIN_INDICATOR_SHOW) 461 if (indmode == ELM_WIN_INDICATOR_SHOW)
431 { 462 {
432 old_indi = elm_layout_content_get(conformant, "elm.swallow.indicator"); 463 old_indi = elm_layout_content_get(conformant, "elm.swallow.indicator");