summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2013-01-16 11:31:40 +0000
committerChunEon Park <hermet@hermet.pe.kr>2013-01-16 11:31:40 +0000
commitd2744e8d9bf703582e5942b4ada1f4969a632007 (patch)
tree9f1e71b48e25aa86f98b185362f080780372420a
parentd961dc73a7bd35e8d09336ce3fd85146c22ae9f4 (diff)
elementary/conformant - removed duplicated string data
SVN revision: 82878
-rw-r--r--src/lib/elm_conform.c35
1 files changed, 20 insertions, 15 deletions
diff --git a/src/lib/elm_conform.c b/src/lib/elm_conform.c
index 940dd29fa..5a880cb72 100644
--- a/src/lib/elm_conform.c
+++ b/src/lib/elm_conform.c
@@ -24,6 +24,12 @@ static char CONFORMANT_KEY[] = "_elm_conform_key";
24static char *sub_type[SUB_TYPE_COUNT] = { "elm_scroller", "elm_genlist" }; 24static char *sub_type[SUB_TYPE_COUNT] = { "elm_scroller", "elm_genlist" };
25#endif 25#endif
26 26
27
28static const char INDICATOR_PART[] = "elm.swallow.indicator";
29static const char VIRTUALKEYPAD_PART[] = "elm.swallow.viertualkeypad";
30static const char CLIPBOARD_PART[] = "elm.swallow.clipboard";
31static const char SOFTKEY_PART[] = "elm.swallow.softkey";
32
27static const char SIG_VIRTUALKEYPAD_STATE_ON[] = "virtualkeypad,state,on"; 33static const char SIG_VIRTUALKEYPAD_STATE_ON[] = "virtualkeypad,state,on";
28static const char SIG_VIRTUALKEYPAD_STATE_OFF[] = "virtualkeypad,state,off"; 34static const char SIG_VIRTUALKEYPAD_STATE_OFF[] = "virtualkeypad,state,off";
29static const char SIG_CLIPBOARD_STATE_ON[] = "clipboard,state,on"; 35static const char SIG_CLIPBOARD_STATE_ON[] = "clipboard,state,on";
@@ -221,7 +227,7 @@ _conformant_parts_swallow(Evas_Object *obj)
221 sd->scroller = NULL; 227 sd->scroller = NULL;
222 228
223 //Virtual Keyboard 229 //Virtual Keyboard
224 if (edje_object_part_exists(wd->resize_obj, "elm.swallow.virtualkeypad")) 230 if (edje_object_part_exists(wd->resize_obj, VIRTUALKEYPAD_PART))
225 { 231 {
226 if (!sd->virtualkeypad) 232 if (!sd->virtualkeypad)
227 { 233 {
@@ -233,8 +239,7 @@ _conformant_parts_swallow(Evas_Object *obj)
233 _conformant_part_sizing_eval(obj, ELM_CONFORMANT_VIRTUAL_KEYPAD_PART); 239 _conformant_part_sizing_eval(obj, ELM_CONFORMANT_VIRTUAL_KEYPAD_PART);
234 240
235 evas_object_color_set(sd->virtualkeypad, 0, 0, 0, 0); 241 evas_object_color_set(sd->virtualkeypad, 0, 0, 0, 0);
236 elm_layout_content_set(obj, "elm.swallow.virtualkeypad", 242 elm_layout_content_set(obj, VIRTUALKEYPAD_PART, sd->virtualkeypad);
237 sd->virtualkeypad);
238 } 243 }
239 else if (sd->virtualkeypad) 244 else if (sd->virtualkeypad)
240 { 245 {
@@ -243,7 +248,7 @@ _conformant_parts_swallow(Evas_Object *obj)
243 } 248 }
244 249
245 //Clipboard 250 //Clipboard
246 if (edje_object_part_exists(wd->resize_obj, "elm.swallow.clipboard")) 251 if (edje_object_part_exists(wd->resize_obj, CLIPBOARD_PART))
247 { 252 {
248 if (!sd->clipboard) 253 if (!sd->clipboard)
249 { 254 {
@@ -255,7 +260,7 @@ _conformant_parts_swallow(Evas_Object *obj)
255 _conformant_part_sizing_eval(obj, ELM_CONFORMANT_CLIPBOARD_PART); 260 _conformant_part_sizing_eval(obj, ELM_CONFORMANT_CLIPBOARD_PART);
256 261
257 evas_object_color_set(sd->clipboard, 0, 0, 0, 0); 262 evas_object_color_set(sd->clipboard, 0, 0, 0, 0);
258 elm_layout_content_set(obj, "elm.swallow.clipboard", sd->clipboard); 263 elm_layout_content_set(obj, CLIPBOARD_PART, sd->clipboard);
259 } 264 }
260 else if (sd->clipboard) 265 else if (sd->clipboard)
261 { 266 {
@@ -264,7 +269,7 @@ _conformant_parts_swallow(Evas_Object *obj)
264 } 269 }
265 270
266 //Softkey 271 //Softkey
267 if (edje_object_part_exists(wd->resize_obj, "elm.swallow.softkey")) 272 if (edje_object_part_exists(wd->resize_obj, SOFTKEY_PART))
268 { 273 {
269 if (!sd->softkey) 274 if (!sd->softkey)
270 { 275 {
@@ -276,7 +281,7 @@ _conformant_parts_swallow(Evas_Object *obj)
276 _conformant_part_sizing_eval(obj, ELM_CONFORMANT_SOFTKEY_PART); 281 _conformant_part_sizing_eval(obj, ELM_CONFORMANT_SOFTKEY_PART);
277 282
278 evas_object_color_set(sd->softkey, 0, 0, 0, 0); 283 evas_object_color_set(sd->softkey, 0, 0, 0, 0);
279 elm_layout_content_set(obj, "elm.swallow.softkey", sd->softkey); 284 elm_layout_content_set(obj, SOFTKEY_PART, sd->softkey);
280 } 285 }
281 else if (sd->softkey) 286 else if (sd->softkey)
282 { 287 {
@@ -455,12 +460,12 @@ _indicator_mode_set(Evas_Object *conformant, Elm_Win_Indicator_Mode indmode)
455 460
456 sd->indmode = indmode; 461 sd->indmode = indmode;
457 462
458 if (!edje_object_part_exists(wd->resize_obj, "elm.swallow.indicator")) 463 if (!edje_object_part_exists(wd->resize_obj, INDICATOR_PART))
459 return; 464 return;
460 465
461 if (indmode == ELM_WIN_INDICATOR_SHOW) 466 if (indmode == ELM_WIN_INDICATOR_SHOW)
462 { 467 {
463 old_indi = elm_layout_content_get(conformant, "elm.swallow.indicator"); 468 old_indi = elm_layout_content_get(conformant, INDICATOR_PART);
464 469
465 //create new indicator 470 //create new indicator
466 if (!old_indi) 471 if (!old_indi)
@@ -473,7 +478,7 @@ _indicator_mode_set(Evas_Object *conformant, Elm_Win_Indicator_Mode indmode)
473 if (!sd->landscape_indicator) return; 478 if (!sd->landscape_indicator) return;
474 479
475 evas_object_show(sd->landscape_indicator); 480 evas_object_show(sd->landscape_indicator);
476 elm_layout_content_set(conformant, "elm.swallow.indicator", sd->landscape_indicator); 481 elm_layout_content_set(conformant, INDICATOR_PART, sd->landscape_indicator);
477 } 482 }
478 else 483 else
479 { 484 {
@@ -483,7 +488,7 @@ _indicator_mode_set(Evas_Object *conformant, Elm_Win_Indicator_Mode indmode)
483 if (!sd->portrait_indicator) return; 488 if (!sd->portrait_indicator) return;
484 489
485 evas_object_show(sd->portrait_indicator); 490 evas_object_show(sd->portrait_indicator);
486 elm_layout_content_set(conformant, "elm.swallow.indicator", sd->portrait_indicator); 491 elm_layout_content_set(conformant, INDICATOR_PART, sd->portrait_indicator);
487 } 492 }
488 493
489 } 494 }
@@ -491,7 +496,7 @@ _indicator_mode_set(Evas_Object *conformant, Elm_Win_Indicator_Mode indmode)
491 } 496 }
492 else 497 else
493 { 498 {
494 old_indi = elm_layout_content_get(conformant, "elm.swallow.indicator"); 499 old_indi = elm_layout_content_get(conformant, INDICATOR_PART);
495 if (old_indi) 500 if (old_indi)
496 { 501 {
497 evas_object_hide(old_indi); 502 evas_object_hide(old_indi);
@@ -550,7 +555,7 @@ _on_rotation_changed(void *data,
550 if (rot == sd->rot) return; 555 if (rot == sd->rot) return;
551 556
552 sd->rot = rot; 557 sd->rot = rot;
553 old_indi = elm_layout_content_unset(conformant, "elm.swallow.indicator"); 558 old_indi = elm_layout_content_unset(conformant, INDICATOR_PART);
554 /* this means ELM_WIN_INDICATOR_SHOW never be set.we don't need to change indicator type*/ 559 /* this means ELM_WIN_INDICATOR_SHOW never be set.we don't need to change indicator type*/
555 if (!old_indi) return; 560 if (!old_indi) return;
556 evas_object_hide(old_indi); 561 evas_object_hide(old_indi);
@@ -564,7 +569,7 @@ _on_rotation_changed(void *data,
564 569
565 evas_object_show(sd->landscape_indicator); 570 evas_object_show(sd->landscape_indicator);
566 evas_object_data_set(sd->landscape_indicator, CONFORMANT_KEY, (void *) (intptr_t) rot); 571 evas_object_data_set(sd->landscape_indicator, CONFORMANT_KEY, (void *) (intptr_t) rot);
567 elm_layout_content_set(conformant, "elm.swallow.indicator", sd->landscape_indicator); 572 elm_layout_content_set(conformant, INDICATOR_PART, sd->landscape_indicator);
568 } 573 }
569 else 574 else
570 { 575 {
@@ -575,7 +580,7 @@ _on_rotation_changed(void *data,
575 580
576 evas_object_show(sd->portrait_indicator); 581 evas_object_show(sd->portrait_indicator);
577 evas_object_data_set(sd->portrait_indicator, CONFORMANT_KEY, (void *) (intptr_t) rot); 582 evas_object_data_set(sd->portrait_indicator, CONFORMANT_KEY, (void *) (intptr_t) rot);
578 elm_layout_content_set(conformant, "elm.swallow.indicator", sd->portrait_indicator); 583 elm_layout_content_set(conformant, INDICATOR_PART, sd->portrait_indicator);
579 } 584 }
580} 585}
581 586