Fix city list too large prblem
authorGoo Lee <goo81.lee@samsung.com>
Sat, 25 Aug 2012 10:17:43 +0000 (19:17 +0900)
committerGoo Lee <goo81.lee@samsung.com>
Sat, 25 Aug 2012 10:17:43 +0000 (19:17 +0900)
include/worldclock_const.h
packaging/libug-worldclock-efl.spec
res/edc/worldclock_add.edc
res/theme/worldclock_theme.edc
src/CMakeLists.txt
src/worldclock_add_view.c

index 0d936ed..c5342af 100644 (file)
@@ -42,8 +42,8 @@
 
 #define WCL_EDJ_PATH                EDJDIR
 #define WCL_IMAGE_PATH              IMAGEDIR"/code"
-#define WCL_EDJ_NAME                WCL_EDJ_PATH"/worldclock.edj"
-#define WCL_THEME_NAME              WCL_EDJ_PATH"/worldclock_theme.edj"
+#define WCL_EDJ_NAME                WCL_EDJ_PATH"/ug_worldclock.edj"
+#define WCL_THEME_NAME              WCL_EDJ_PATH"/ug_worldclock_theme.edj"
 
 //#define WORLDCLOCK_FILE_PATH  "/opt/.worldclock.txt"
 #define WORLDCLOCK_DB           "/opt/dbspace/.worldclock.db"
@@ -67,8 +67,8 @@
 #define GRP_SEARCH              "search_area"
 #define GRP_CLOCK               "clock"
 #define GRP_DST                 "dst"
-#define GRP_ADD                 "add_layout"
-#define GRP_ADD2                "add_layout2"
+#define GRP_ADD                 "ug_add_layout"
+#define GRP_ADD2                "ug_add_layout2"
 #define GRP_SEGMENT_PANEL       "segment_panel_layout"
 #define GRP_POPUP               "popup"
 #define GRP_SELECT_ALL          "select_all"
index ed7aa89..c37f05e 100644 (file)
@@ -2,7 +2,7 @@
 Name:       libug-worldclock-efl
 Summary:    worldclock ug
 Version:    0.0.2
-Release:    38
+Release:    40
 Group:      utils
 License:    samsung
 Source0:    %{name}-%{version}.tar.gz
@@ -372,6 +372,6 @@ chmod 660 /opt/dbspace/.worldclock.db-journal
 %files
 %defattr(-,root,root,-)
 /opt/ug/lib/libug-worldclock-efl.so
-/opt/ug/res/edje/worldclock.edj
-/opt/ug/res/edje/worldclock_theme.edj
+/opt/ug/res/edje/ug_worldclock.edj
+/opt/ug/res/edje/ug_worldclock_theme.edj
 /opt/ug/res/locale/*/*/ug-worldclock-efl.mo
index 7936976..5609594 100644 (file)
@@ -19,7 +19,7 @@
 #define ADD_VIEW_HEIGHT   (HEIGHT-INDICATOR_H-NAVIGATION_BAR_H)
 
 group {
-       name: "add_layout";
+       name: "ug_add_layout";
 
        parts {
                /* background */
@@ -77,7 +77,7 @@ group {
 }
 
 group {
-       name: "add_layout2";
+       name: "ug_add_layout2";
 
        parts {
                /* background */
index b1e9f5f..a2f6426 100644 (file)
@@ -80,23 +80,6 @@ collections
         //data.item: "contents" "elm.swallow.city elm.swallow.country elm.swallow.gmt";
         data.item: "treesize" "20";
 
-        styles {
-            style {
-                name: "city_textblock_style";
-                base: "font="ADD_LIST_FONT" font_size="ADD_LIST_FONT_SIZE" color="ADD_LIST_TEXTBLOCK_COLOR" wrap=char text_class=list_item";
-                tag:  "br" "\n";
-                tag:  "ps" "ps";
-                tag:  "tab" "\t";
-            }
-            style {
-                name: "city_textblock_selected_style";
-                base: "font="ADD_LIST_FONT" font_size="ADD_LIST_FONT_SIZE" color="ADD_LIST_SELECTED_TEXTBLOCK_COLOR" wrap=char text_class=list_item";
-                tag:  "br" "\n";
-                tag:  "ps" "ps";
-                tag:  "tab" "\t";
-            }
-        }
-
         parts
         {
             part {
@@ -118,12 +101,12 @@ collections
                 mouse_events: 0;
                 description {
                     state: "default" 0.0;
-                    color: 249 249 249 255;
+                    color: 236 240 242 255;
                 }
                 description {
                     state: "selected" 0.0;
                     inherit: "default" 0.0;
-                    color: 199 185 164 255;
+                    color: 94 129 152 255;
                 }
             }
 
@@ -182,7 +165,7 @@ collections
             part {
                 name: "elm.text.city";
                 clip_to: "disclip";
-                type:           TEXTBLOCK;
+                type:           TEXT;
                 mouse_events:   0;
                 scale: 1;
                 description {
@@ -190,14 +173,13 @@ collections
                     rel1 { relative: 1.0 1.0; to_x: "elm.padding.left";     to_y: "elm.padding.top"; }
                     rel2 { relative: 0.0 1.0; to_x: "elm.padding.gmt.left"; to_y: "elm.text.gmt"; }
                     fixed: 1 0;
-                    //align: 0.0 0.5;
-                    //rel1{relative: (15/WIDTH) 0.0; }
+                   // align: 0.0 0.5;
+                   // rel1{relative: (15/WIDTH) 0.0; }
                     //rel2{relative: 1.0        0.6; }
                     color: ADD_LIST_COLOR;
                     text {
-                        style: "city_textblock_style";
-                        //font: ADD_LIST_FONT;
-                        //size: ADD_LIST_FONT_SIZE;
+                        font: ADD_LIST_FONT;
+                        size: ADD_LIST_FONT_SIZE;
                         min: 0 1;
                         align: 0.0 0.5;
                     }
@@ -205,8 +187,7 @@ collections
                 description {
                     state: "selected" 0.0;
                     inherit: "default" 0.0;
-                    text.style: "city_textblock_selected_style";
-                    //color: ADD_LIST_SELECTED_COLOR;
+                    color: ADD_LIST_SELECTED_COLOR;
                 }
             }
             part {
@@ -321,254 +302,5 @@ collections
             }
         }
     }
-
-    //worldclock_addview_list_black
-    group
-    {
-        name:  "elm/genlist/item/worldclock_addview_list_black/default";
-        alias: "elm/genlist/item_odd/worldclock_addview_list_black/default";
-        alias: "elm/genlist/item_compress/worldclock_addview_list_black/default";
-        alias: "elm/genlist/item_compress_odd/worldclock_addview_list_black/default";
-        data.item: "stacking" "above";
-        data.item: "selectraise" "on";
-        data.item: "texts" "elm.text.city elm.text.country elm.text.gmt";
-        //data.item: "contents" "elm.swallow.city elm.swallow.country elm.swallow.gmt";
-        data.item: "treesize" "20";
-
-        styles {
-            style {
-                name: "city_textblock_black_style";
-                base: "font="ADD_LIST_FONT" font_size="ADD_LIST_FONT_SIZE" color="ADD_LIST_TEXTBLOCK_COLOR_BLACK" wrap=char text_class=list_item";
-                tag:  "br" "\n";
-                tag:  "ps" "ps";
-                tag:  "tab" "\t";
-            }
-            style {
-                name: "city_textblock_black_selected_style";
-                base: "font="ADD_LIST_FONT" font_size="ADD_LIST_FONT_SIZE" color="ADD_LIST_SELECTED_TEXTBLOCK_COLOR_BLACK" wrap=char text_class=list_item";
-                tag:  "br" "\n";
-                tag:  "ps" "ps";
-                tag:  "tab" "\t";
-            }
-        }
-
-        parts
-        {
-            part {
-                name:   "event";
-                type:   RECT;
-                repeat_events: 1;
-                scale: 1;
-                description {
-                    min: 0 ADD_LIST_HEIGHT;
-                    state: "default" 0.0;
-                    color: COLOR_ADDVIEW_GENLIST_ITEM_BG_BLACK;
-                }
-            }
-
-            part {
-                name: "bg_image";
-                type: RECT;
-                clip_to: "disclip";
-                mouse_events: 0;
-                description { state: "default" 0.0;
-                   color: 0 0 0 255;
-                }
-                description { state: "selected" 0.0;
-                   inherit: "default" 0.0;
-                   color: 50 65 74 255;
-                }
-            }
-
-            WCL_GENLIST_PART_BOTTOM_LINE( COLOR_BOTTOM_LINE_BLACK )
-            WCL_GENLIST_PART_PADDING_TOP( ADD_LIST_PADDING_TOP )
-            WCL_GENLIST_PART_PADDING_BOTTOM( ADD_LIST_PADDING_BOTTOM )
-            WCL_GENLIST_PART_PADDING_LEFT( ADD_LIST_PADDING_LEFT   )
-            WCL_GENLIST_PART_PADDING_RIGHT( ADD_LIST_PADDING_RIGHT  )
-
-            part {
-                name: "elm.text.gmt";
-                clip_to: "disclip";
-                type:           TEXT;
-                mouse_events:   0;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    min: ADD_LIST_MIN_X ADD_LIST_MIN_Y;
-                    fixed: 1 1;
-                    rel1 { relative: 0.0 1.0; to_x: "elm.padding.right"; to_y: "elm.padding.top"; }
-                    rel2 { relative: 0.0 1.0; to_x: "elm.padding.right"; to_y: "elm.padding.top"; }
-                    align: 1.0 0.0;
-                    color: ADD_LIST_GMT_COLOR_BLACK;
-                    text {
-                        font: ADD_LIST_GMT_FONT;
-                        size: ADD_LIST_GMT_FONT_SIZE;
-                        min: 0 1;
-                        align: 1.0 0.5;
-                    }
-                }
-                description {
-                    state: "selected" 0.0;
-                    inherit: "default" 0.0;
-                    color: ADD_LIST_SELECTED_COLOR_BLACK;
-                }
-            }
-            part {
-                name: "elm.padding.gmt.left";
-                clip_to: "disclip";
-                type: RECT;
-                mouse_events: 0;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    min: 20 0;
-                    fixed: 1 0;
-                    rel1.to_x: "elm.text.gmt";
-                    rel2 { relative: 0.0 1.0; to_x: "elm.text.gmt"; }
-                    align: 1.0 0.5;
-                    visible: 0;
-                }
-            }
-
-            part {
-                name: "elm.text.city";
-                clip_to: "disclip";
-                type:           TEXT;
-                mouse_events:   0;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    //rel1 { relative: 1.0 1.0; to_x: "elm.padding.left";     to_y: "elm.padding.top"; }
-                    //rel2 { relative: 0.0 1.0; to_x: "elm.padding.gmt.left"; to_y: "elm.text.gmt"; }
-                    rel1{relative: (15/WIDTH) 0.0; }
-                    rel2{relative: 1.0        0.6; }
-                    align: 0.0 0.5;
-                    color: ADD_LIST_COLOR_BLACK;
-                    text {
-                        //style: "city_textblock_black_style";
-                        font: ADD_LIST_FONT;
-                        size: ADD_LIST_FONT_SIZE;
-                        min: 0 1;
-                        align: 0.0 0.5;
-                    }
-                }
-                description {
-                    state: "selected" 0.0;
-                    inherit: "default" 0.0;
-                    text.style: "city_textblock_black_selected_style";
-                    color: ADD_LIST_SELECTED_COLOR_BLACK;
-                }
-            }
-            part {
-                name: "elm.text.country";
-                clip_to: "disclip";
-                type:           TEXT;
-                mouse_events:   0;
-                scale: 1;
-                description {
-                    state: "default" 0.0;
-                    rel1 { relative: 1.0 1.0; to_x: "elm.padding.left";  to_y: "elm.text.city"; }
-                    rel2 { relative: 0.0 0.0; to_x: "elm.padding.right"; to_y: "elm.padding.bottom"; }
-                    color: ADD_LIST_SUB_COLOR_BLACK;
-                    text {
-                        font: ADD_LIST_SUB_FONT;
-                        size: ADD_LIST_SUB_FONT_SIZE;
-                        min: 0 1;
-                        align: 0.0 0.0;
-                    }
-                }
-                description {
-                    state: "selected" 0.0;
-                    inherit: "default" 0.0;
-                    color: ADD_LIST_SELECTED_COLOR_BLACK;
-                }
-            }
-
-            part
-            {
-                name: "elm.swallow.city";
-                clip_to: "disclip";
-                type: SWALLOW;
-                scale: 1;
-                description
-                {
-                    state: "default" 0.0;
-                    rel1{relative: (15/WIDTH) 0.0; }
-                    rel2{relative: 1.0        0.6; }
-                    fixed: 1 1;
-                    align: 0.0 0.5;
-                }
-            }
-            part
-            {
-                name: "elm.swallow.country";
-                clip_to: "disclip";
-                type: SWALLOW;
-                scale: 1;
-                description
-                {
-                    state: "default" 0.0;
-                    rel1{relative: (15/WIDTH)  0.6; }
-                    rel2{relative: 0.7         1.0; }
-                    fixed: 1 1;
-                    align: 0.0 0.0;
-                }
-            }
-            part
-            {
-                name: "elm.swallow.gmt";
-                clip_to: "disclip";
-                type: SWALLOW;
-                scale: 1;
-                description
-                {
-                    state: "default" 0.0;
-                    rel1{relative: 0.7              0.0; }
-                    rel2{relative: (465.0/WIDTH)    0.6; }
-                    //fixed: 1 1;
-                    align: 1.0 0.5;
-                }
-            }
-
-            WCL_GENLIST_PART_DISCLIP(COLOR_DISCLIP_DISABLE_COLOR)
-        }
-        programs
-        {
-            program {
-                name: "go_active";
-                signal: "elm,state,selected";
-                source: "elm";
-                action: STATE_SET "selected" 0.0;
-                target: "bg_image";
-                target: "elm.text.city";
-                target: "elm.text.country";
-                target: "elm.text.gmt";
-            }
-            program {
-                name: "go_passive";
-                signal: "elm,state,unselected";
-                source: "elm";
-                action: STATE_SET "default" 0.0;
-                target: "bg_image";
-                target: "elm.text.city";
-                target: "elm.text.country";
-                target: "elm.text.gmt";
-                transition: LINEAR 0.1;
-            }
-            program {
-                name: "go_disabled";
-                signal: "elm,state,disabled";
-                source: "elm";
-                action: STATE_SET "disabled" 0.0;
-                target: "disclip";
-            }
-            program { name: "go_enabled";
-                signal: "elm,state,enabled";
-                source: "elm";
-                action: STATE_SET "default" 0.0;
-                target: "disclip";
-            }
-        }
-    }
 }
 
index bd8ba2b..737a95d 100644 (file)
@@ -51,19 +51,20 @@ INSTALL(TARGETS ${PROJECT_NAME} DESTINATION ${UGLIBDIR})
 
 
 # make worldclock.edj
-ADD_CUSTOM_TARGET(worldclock.edj
+ADD_CUSTOM_TARGET(ug_worldclock.edj
                COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../res/images
-               ${CMAKE_CURRENT_SOURCE_DIR}/../res/edc/worldclock.edc ${CMAKE_BINARY_DIR}/worldclock.edj
+               ${CMAKE_CURRENT_SOURCE_DIR}/../res/edc/worldclock.edc ${CMAKE_BINARY_DIR}/ug_worldclock.edj
                DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../res/edc/worldclock.edc )
-ADD_DEPENDENCIES(${PROJECT_NAME} worldclock.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} ug_worldclock.edj)
 # install edj file
-INSTALL(FILES ${CMAKE_BINARY_DIR}/worldclock.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/ug_worldclock.edj DESTINATION ${EDJDIR})
 
-# make worldclock_theme.edj
-ADD_CUSTOM_TARGET(worldclock_theme.edj
+# make ug_worldclock_theme.edj
+ADD_CUSTOM_TARGET(ug_worldclock_theme.edj
                COMMAND edje_cc -id ${CMAKE_CURRENT_SOURCE_DIR}/../res/theme
-               ${CMAKE_CURRENT_SOURCE_DIR}/../res/theme/worldclock_theme.edc ${CMAKE_BINARY_DIR}/worldclock_theme.edj
+               ${CMAKE_CURRENT_SOURCE_DIR}/../res/theme/worldclock_theme.edc
+               ${CMAKE_BINARY_DIR}/ug_worldclock_theme.edj
                DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/../res/theme/worldclock_theme.edc )
-ADD_DEPENDENCIES(${PROJECT_NAME} worldclock_theme.edj)
+ADD_DEPENDENCIES(${PROJECT_NAME} ug_worldclock_theme.edj)
 # install edj file
-INSTALL(FILES ${CMAKE_BINARY_DIR}/worldclock_theme.edj DESTINATION ${EDJDIR})
+INSTALL(FILES ${CMAKE_BINARY_DIR}/ug_worldclock_theme.edj DESTINATION ${EDJDIR})
index 9c6c44c..f356360 100644 (file)
@@ -683,16 +683,6 @@ static Evas_Object *__ugview_genlist_add(Evas_Object * parent, void *data)
        // To use multiline textblock/entry/editfield in genlist, set height_for_width mode
        // then the item's height is calculated while the item's width fits to genlist width.
        elm_genlist_mode_set(genlist, EINA_TRUE);
-
-       // set selected theme
-       char *theme_name = vconf_get_str(SETTING_THEME_SELECTED_THEME);
-       if (theme_name) {
-               g_ts.item_style = "worldclock_addview_list_black";
-       }
-       if (theme_name) {
-               free(theme_name);
-               theme_name = NULL;
-       }
        CLK_FUN_END();
        return genlist;
 }
@@ -1227,6 +1217,7 @@ static Evas_Object *__ugview_searchbar_add(Evas_Object * parent, void *data)
                             "cancel_button");
        elm_object_part_content_set(parent, "searchbar", searchbar_layout);
        entry = elm_entry_add(searchbar_layout);
+       elm_entry_prediction_allow_set(entry, EINA_FALSE);
        elm_entry_scrollable_set(entry, EINA_TRUE);
        elm_entry_single_line_set(entry, EINA_TRUE);
        elm_object_part_content_set(searchbar_layout, "elm.swallow.content",