summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <juyung.seo@samsung.com>2014-01-08 11:16:41 +0900
committerDaniel Juyung Seo <juyung.seo@samsung.com>2014-01-08 11:26:15 +0900
commitc5106f30c562f513a5eb5d259ff246079fba7a4c (patch)
treec1d97999a1a7c424ff1d7f05a7e9f5ae9a178b5d
parentc132a7722180866bac994c602fead57c14e90941 (diff)
elementary_config: Refactor elementary config menu by merging Access, Select clear, and clouseau menu.
Having one checkbox per each tab does not look good. Split them when it is needed.
-rw-r--r--src/bin/config.c74
1 files changed, 12 insertions, 62 deletions
diff --git a/src/bin/config.c b/src/bin/config.c
index a29efd3a0..db94b68aa 100644
--- a/src/bin/config.c
+++ b/src/bin/config.c
@@ -951,27 +951,11 @@ _cf_caches(void *data,
951} 951}
952 952
953static void 953static void
954_cf_access(void *data, 954_cf_etc(void *data,
955 Evas_Object *obj EINA_UNUSED, 955 Evas_Object *obj EINA_UNUSED,
956 void *event_info EINA_UNUSED) 956 void *event_info EINA_UNUSED)
957{ 957{
958 _flip_to(data, "access"); 958 _flip_to(data,"etc");
959}
960
961static void
962_cf_selection(void *data,
963 Evas_Object *obj EINA_UNUSED,
964 void *event_info EINA_UNUSED)
965{
966 _flip_to(data, "selection");
967}
968
969static void
970_cf_debug(void *data,
971 Evas_Object *obj EINA_UNUSED,
972 void *event_info EINA_UNUSED)
973{
974 _flip_to(data, "debug");
975} 959}
976 960
977const char * 961const char *
@@ -1480,8 +1464,8 @@ _status_config_sizing(Evas_Object *win,
1480} 1464}
1481 1465
1482static void 1466static void
1483_status_config_access(Evas_Object *win, 1467_status_config_etc(Evas_Object *win,
1484 Evas_Object *naviframe) 1468 Evas_Object *naviframe)
1485{ 1469{
1486 Evas_Object *bx, *ck; 1470 Evas_Object *bx, *ck;
1487 1471
@@ -1489,10 +1473,10 @@ _status_config_access(Evas_Object *win,
1489 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0.0); 1473 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0.0);
1490 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, 0.5); 1474 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, 0.5);
1491 1475
1476 // access
1492 ck = elm_check_add(win); 1477 ck = elm_check_add(win);
1493 elm_object_tooltip_text_set(ck, "Set access mode"); 1478 elm_object_tooltip_text_set(ck, "Set access mode");
1494 elm_object_text_set(ck, "Enable Access Mode"); 1479 elm_object_text_set(ck, "Enable Access Mode");
1495 evas_object_data_set(win, "access_check", ck);
1496 evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0); 1480 evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
1497 evas_object_size_hint_align_set(ck, EVAS_HINT_FILL, 0.5); 1481 evas_object_size_hint_align_set(ck, EVAS_HINT_FILL, 0.5);
1498 elm_check_state_set(ck, elm_config_access_get()); 1482 elm_check_state_set(ck, elm_config_access_get());
@@ -1501,25 +1485,10 @@ _status_config_access(Evas_Object *win,
1501 1485
1502 evas_object_smart_callback_add(ck, "changed", ac_change, NULL); 1486 evas_object_smart_callback_add(ck, "changed", ac_change, NULL);
1503 1487
1504 evas_object_data_set(win, "access", bx); 1488 // selection
1505
1506 elm_naviframe_item_simple_push(naviframe, bx);
1507}
1508
1509static void
1510_status_config_selection(Evas_Object *win,
1511 Evas_Object *naviframe)
1512{
1513 Evas_Object *bx, *ck;
1514
1515 bx = elm_box_add(win);
1516 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0.0);
1517 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, 0.5);
1518
1519 ck = elm_check_add(win); 1489 ck = elm_check_add(win);
1520 elm_object_tooltip_text_set(ck, "Set selection mode"); 1490 elm_object_tooltip_text_set(ck, "Set selection mode");
1521 elm_object_text_set(ck, "Enable clear selection when unfocus"); 1491 elm_object_text_set(ck, "Enable clear selection when unfocus");
1522 evas_object_data_set(win, "selection_check", ck);
1523 evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0); 1492 evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
1524 evas_object_size_hint_align_set(ck, EVAS_HINT_FILL, 0.5); 1493 evas_object_size_hint_align_set(ck, EVAS_HINT_FILL, 0.5);
1525 elm_check_state_set(ck, elm_config_selection_unfocused_clear_get()); 1494 elm_check_state_set(ck, elm_config_selection_unfocused_clear_get());
@@ -1528,25 +1497,10 @@ _status_config_selection(Evas_Object *win,
1528 1497
1529 evas_object_smart_callback_add(ck, "changed", sel_change, NULL); 1498 evas_object_smart_callback_add(ck, "changed", sel_change, NULL);
1530 1499
1531 evas_object_data_set(win, "selection", bx); 1500 // clouseau
1532
1533 elm_naviframe_item_simple_push(naviframe, bx);
1534}
1535
1536static void
1537_status_config_debug(Evas_Object *win,
1538 Evas_Object *naviframe)
1539{
1540 Evas_Object *bx, *ck;
1541
1542 bx = elm_box_add(win);
1543 evas_object_size_hint_weight_set(bx, EVAS_HINT_EXPAND, 0.0);
1544 evas_object_size_hint_align_set(bx, EVAS_HINT_FILL, 0.5);
1545
1546 ck = elm_check_add(win); 1501 ck = elm_check_add(win);
1547 elm_object_tooltip_text_set(ck, "Set clouseau mode"); 1502 elm_object_tooltip_text_set(ck, "Set clouseau mode");
1548 elm_object_text_set(ck, "Enable clouseau"); 1503 elm_object_text_set(ck, "Enable clouseau");
1549 evas_object_data_set(win, "clouseau_check", ck);
1550 evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0); 1504 evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
1551 evas_object_size_hint_align_set(ck, EVAS_HINT_FILL, 0.5); 1505 evas_object_size_hint_align_set(ck, EVAS_HINT_FILL, 0.5);
1552 elm_check_state_set(ck, elm_config_clouseau_enabled_get()); 1506 elm_check_state_set(ck, elm_config_clouseau_enabled_get());
@@ -1555,7 +1509,7 @@ _status_config_debug(Evas_Object *win,
1555 1509
1556 evas_object_smart_callback_add(ck, "changed", dbg_change, NULL); 1510 evas_object_smart_callback_add(ck, "changed", dbg_change, NULL);
1557 1511
1558 evas_object_data_set(win, "debug", bx); 1512 evas_object_data_set(win, "etc", bx);
1559 1513
1560 elm_naviframe_item_simple_push(naviframe, bx); 1514 elm_naviframe_item_simple_push(naviframe, bx);
1561} 1515}
@@ -3533,9 +3487,7 @@ _status_config_full(Evas_Object *win,
3533 elm_toolbar_item_append(tb, "video-display", "Rendering", 3487 elm_toolbar_item_append(tb, "video-display", "Rendering",
3534 _cf_rendering, win); 3488 _cf_rendering, win);
3535 elm_toolbar_item_append(tb, "appointment-new", "Caches", _cf_caches, win); 3489 elm_toolbar_item_append(tb, "appointment-new", "Caches", _cf_caches, win);
3536 elm_toolbar_item_append(tb, "stock_spellcheck", "Access", _cf_access, win); 3490 elm_toolbar_item_append(tb, NULL, "Etc", _cf_etc, win);
3537 elm_toolbar_item_append(tb, "clear-selection-check", "Selection", _cf_selection, win);
3538 elm_toolbar_item_append(tb, "preferences-other", "Debug", _cf_debug, win);
3539 3491
3540 elm_box_pack_end(bx0, tb); 3492 elm_box_pack_end(bx0, tb);
3541 evas_object_show(tb); 3493 evas_object_show(tb);
@@ -3551,9 +3503,7 @@ _status_config_full(Evas_Object *win,
3551 _status_config_rendering(win, naviframe); 3503 _status_config_rendering(win, naviframe);
3552 _status_config_scrolling(win, naviframe); 3504 _status_config_scrolling(win, naviframe);
3553 _status_config_caches(win, naviframe); 3505 _status_config_caches(win, naviframe);
3554 _status_config_access(win, naviframe); 3506 _status_config_etc(win, naviframe);
3555 _status_config_selection(win, naviframe);
3556 _status_config_debug(win, naviframe);
3557 _status_config_sizing(win, naviframe); // Note: call this at the end. 3507 _status_config_sizing(win, naviframe); // Note: call this at the end.
3558 3508
3559 // FIXME uncomment after flip style fix, please 3509 // FIXME uncomment after flip style fix, please