Change indicator show/hide when composer is top
authorSoonmin Jung <sm0415.jung@samsung.com>
Wed, 6 Feb 2013 12:12:35 +0000 (21:12 +0900)
committerSoonmin Jung <sm0415.jung@samsung.com>
Wed, 6 Feb 2013 12:12:35 +0000 (21:12 +0900)
Change isvalidNumber logic

Change-Id: I7296edb0c16454179f55558cc4586a0e98319bf6

composer/src/ui-composer/msg-ui-composer-main.c
composer/src/util/msg-ui-composer-util.c

index 0efcd5f..72f415f 100755 (executable)
@@ -1365,15 +1365,20 @@ COMPOSER_RETURN_TYPE_E msg_ui_composer_rotate(MSG_COMPOSER_VIEW_DATA_S *cd, COMP
                if (rotate == COMPOSER_ROTATE_PORTRAIT || rotate == COMPOSER_ROTATE_PORTRAIT_UPSIDEDOWN) {
                        elm_layout_theme_set(cd->base, "layout", "application", "default");
 
-                       elm_win_indicator_mode_set(cd->main_window, ELM_WIN_INDICATOR_SHOW);
+                       if (!cd->loaded_ug)
+                               elm_win_indicator_mode_set(cd->main_window, ELM_WIN_INDICATOR_SHOW);
 
                        elm_box_horizontal_set(r->bx_main, EINA_FALSE);
                        elm_scroller_content_min_limit(r->sc, EINA_FALSE, EINA_TRUE);
                        evas_object_size_hint_max_set(r->sc, 9999, COMPOSER_RECIPIENT_PORTRAIT_HEIGHT_MAX);
                } else if (rotate == COMPOSER_ROTATE_LANDSCAPE || rotate == COMPOSER_ROTATE_LANDSCAPE_UPSIDEDOWN) {
                        elm_layout_theme_set(cd->base, "layout", "application", "noindicator");/*hide indicator in Landscape*/
-                       elm_win_indicator_mode_set(cd->main_window, ELM_WIN_INDICATOR_HIDE);
-                       D_MSG("hide indicator");
+
+                       if (!cd->loaded_ug) {
+                               elm_win_indicator_mode_set(cd->main_window, ELM_WIN_INDICATOR_HIDE);
+                               D_MSG("hide indicator");
+                       }
+
                        elm_box_horizontal_set(r->bx_main, EINA_TRUE);
                        elm_scroller_content_min_limit(r->sc, EINA_FALSE, EINA_FALSE);
                        evas_object_size_hint_max_set(r->sc, 9999, -1);
index 6553f58..f63da4e 100755 (executable)
@@ -202,6 +202,7 @@ Eina_Bool IsValidNumber(const char *address)
        }
 
        const char *oneChar = address;
+       int digitCount = 0;
 
        if (*oneChar == '+')
                ++oneChar;
@@ -214,9 +215,15 @@ Eina_Bool IsValidNumber(const char *address)
                if (!isdigit(*oneChar) && (*oneChar != '*') && (*oneChar != '#') && (*oneChar != '-'))
                        return EINA_FALSE;
 
+               if (isdigit(*oneChar))
+                       ++digitCount;
+
                ++oneChar;
        }
 
+       if (!digitCount)
+               return EINA_FALSE;
+
        D_LEAVE;
        return EINA_TRUE;
 }