[elementary] Fix warnings. 02/167302/3
authorMyoungwoon Roy, Kim <myoungwoon.kim@samsung.com>
Wed, 17 Jan 2018 02:20:22 +0000 (11:20 +0900)
committerGerrit Code Review <gerrit@review.ap-northeast-2.compute.internal>
Wed, 17 Jan 2018 03:47:19 +0000 (03:47 +0000)
Original commit: 5bc8bced58157f29589d55af35ab1d96663bc3b2

Change-Id: I976d2405215e3c8d854d1beb574780a426581bd4

src/lib/elementary/efl_access.c
src/lib/elementary/efl_ui_win.c
src/lib/elementary/elm_calendar.c
src/lib/elementary/elm_cnp.c
src/lib/elementary/elm_glview.c
src/lib/elementary/elm_object.h
src/lib/elementary/elm_spinner.c

index 1c4027a..81cdd2b 100644 (file)
@@ -355,7 +355,7 @@ EOLIAN const char *
 _efl_access_name_get(Eo *obj EINA_UNUSED, Efl_Access_Data *pd)
 {
    //TIZEN_ONLY(20190922): add name callback, description callback.
-   char *ret = NULL;
+   const char *ret = NULL;
    if (pd->name_cb_item.cb)
      ret = pd->name_cb_item.cb((void *)pd->name_cb_item.data, (Evas_Object *)obj);
    if (ret)
index ae2cc06..47d2b14 100644 (file)
@@ -1719,6 +1719,7 @@ _elm_win_state_change(Ecore_Evas *ee)
 {
    Efl_Ui_Win_Data *sd = _elm_win_associate_get(ee);
    Evas_Object *obj;
+   int w, h;
    Eina_Bool ch_withdrawn = EINA_FALSE;
    Eina_Bool ch_sticky = EINA_FALSE;
    Eina_Bool ch_iconified = EINA_FALSE;
@@ -1797,7 +1798,7 @@ _elm_win_state_change(Ecore_Evas *ee)
    //
    // TIZEN_ONLY(20150707): elm_conform for wayland, and signal if parts are changed
 #ifdef HAVE_ELEMENTARY_WL2
-   int x = 0, y = 0, w = 0, h = 0;
+   int x = 0, y = 0;
    if (sd->legacy.indmode != (Elm_Win_Indicator_Mode)ecore_wl2_window_indicator_state_get(sd->wl.win))
      {
         sd->legacy.indmode = (Elm_Win_Indicator_Mode)ecore_wl2_window_indicator_state_get(sd->wl.win);
@@ -8137,6 +8138,8 @@ elm_win_xwindow_get(const Evas_Object *obj)
 #ifdef HAVE_ELEMENTARY_X
    if (sd->x.xwin) return sd->x.xwin;
    if (sd->parent) return elm_win_xwindow_get(sd->parent);
+#else
+   (void)sd;
 #endif
    return 0;
 }
@@ -9179,10 +9182,10 @@ elm_win_main_menu_get(Evas_Object *obj)
    _elm_menu_menu_bar_set(sd->main_menu, EINA_TRUE);
 
 #ifdef HAVE_ELEMENTARY_X
+   Eina_Bool use_dbus = EINA_FALSE;
+
    if (!_elm_config->disable_external_menu && sd->x.xwin) use_dbus = EINA_TRUE;
-#endif
 
-#ifdef HAVE_ELEMENTARY_X
    if (use_dbus && _elm_dbus_menu_register(sd->main_menu))
      {
         _elm_dbus_menu_app_menu_register(sd->x.xwin, sd->main_menu,
index d4e450a..ce6a55b 100644 (file)
@@ -473,7 +473,7 @@ _flush_calendar_composite_elements(Evas_Object *obj, Elm_Calendar_Data *sd)
 static char *
 _localized_access_info_cb(void *data, Evas_Object *obj EINA_UNUSED)
 {
-   if (data) return data;
+   if (data) return ((char *)E_(data));
    return NULL;
 }
 
@@ -510,7 +510,7 @@ _atspi_expose_objects(Evas_Object *obj, Eina_Bool is_atspi)
    if (is_atspi)
      {
         //TIZEN_ONLY(20160720): Exposing calendar's month name in accessibility tree.
-        Evas_Object *part, *access;
+        Evas_Object *part;
         part = (Evas_Object*)edje_object_part_object_get(elm_layout_edje_get(obj), MONTH_ACCESS_PART);
         elm_access_object_unregister(part);
         if (part)
index ee909f2..e942363 100644 (file)
@@ -3095,6 +3095,7 @@ _wl_selection_receive(void *data, int type EINA_UNUSED, void *event)
         sdata.x = sdata.y = 0;
         sdata.format = ready->format;
         sdata.data = ev->data;
+        cnp_debug("selected format(%d), data(%s)", sdata.format, (char *)sdata.data);
         sdata.len = ev->len;
         sdata.action = _wl_to_elm(ecore_wl2_offer_action_get(ready->offer));
         ready->drop_cb(ready->drop_cb_data,
index 9978f0f..24b5a2d 100644 (file)
@@ -53,7 +53,8 @@ _glview_update_surface(Evas_Object *obj)
    ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd);
    if (!sd) return;
 
-   evas_gl_make_current(sd->evasgl, NULL, NULL);
+   //TIZEN ONLY(20161110): Deletes evas_gl_make_current because of memory leak
+   //evas_gl_make_current(sd->evasgl, NULL, NULL);
 
    if (sd->surface)
      {
index 8b402c6..f05dacb 100644 (file)
@@ -630,8 +630,6 @@ EAPI const char* elm_object_scroll_item_valign_get(const Evas_Object *obj);
  * TIZEN_ONLY_FEATURE: apply Tizen's color_class features.                         *
  ***********************************************************************************/
 /**
- * @internal
- *
  * @brief Set the color of color class for the Elementary widgets.
  *
  * @note These color values are expected to be premultiplied by @p a.
@@ -646,12 +644,14 @@ EAPI const char* elm_object_scroll_item_valign_get(const Evas_Object *obj);
  * @since 1.19
  *
  * @ingroup General
+ *
+ * @if MOBILE @since_tizen 3.0
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI Eina_Bool        elm_color_class_color_set(const char *color_class, int r, int g, int b, int a);
 
 /**
- * @internal
- *
  * @brief Get the color of color class for the Elementary widgets.
  *
  * @note These color values are expected to be premultiplied by @p a.
@@ -666,12 +666,14 @@ EAPI Eina_Bool        elm_color_class_color_set(const char *color_class, int r,
  * @since 1.19
  *
  * @ingroup General
+ *
+ * @if MOBILE @since_tizen 3.0
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI Eina_Bool        elm_color_class_color_get(const char *color_class, int *r, int *g, int *b, int *a);
 
 /**
- * @internal
- *
  * @brief Set the second color of color class for the Elementary widgets.
  *
  * The second color is commonly used for outline of text.
@@ -687,12 +689,14 @@ EAPI Eina_Bool        elm_color_class_color_get(const char *color_class, int *r,
  * @since 1.19
  *
  * @ingroup General
+ *
+ * @if MOBILE @since_tizen 3.0
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI Eina_Bool        elm_color_class_color2_set(const char *color_class, int r, int g, int b, int a);
 
 /**
- * @internal
- *
  * @brief Get the second color of color class for the Elementary widgets.
  *
  * The second color is commonly used for outline of text.
@@ -708,12 +712,14 @@ EAPI Eina_Bool        elm_color_class_color2_set(const char *color_class, int r,
  * @since 1.19
  *
  * @ingroup General
+ *
+ * @if MOBILE @since_tizen 3.0
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI Eina_Bool        elm_color_class_color2_get(const char *color_class, int *r, int *g, int *b, int *a);
 
 /**
- * @internal
- *
  * @brief Set the third color of color class for the Elementary widgets.
  *
  * The third color is commonly used for shadow of text.
@@ -729,12 +735,14 @@ EAPI Eina_Bool        elm_color_class_color2_get(const char *color_class, int *r
  * @since 1.19
  *
  * @ingroup General
+ *
+ * @if MOBILE @since_tizen 3.0
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI Eina_Bool        elm_color_class_color3_set(const char *color_class, int r, int g, int b, int a);
 
 /**
- * @internal
- *
  * @brief Get the third color of color class for the Elementary widgets.
  *
  * The third color is commonly used for shadow of text.
@@ -750,12 +758,14 @@ EAPI Eina_Bool        elm_color_class_color3_set(const char *color_class, int r,
  * @since 1.19
  *
  * @ingroup General
+ *
+ * @if MOBILE @since_tizen 3.0
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI Eina_Bool        elm_color_class_color3_get(const char *color_class, int *r, int *g, int *b, int *a);
 
 /**
- * @internal
- *
  * @brief Set the color of color class for a given widget.
  *
  * @note These color values are expected to be premultiplied by @p a.
@@ -770,12 +780,14 @@ EAPI Eina_Bool        elm_color_class_color3_get(const char *color_class, int *r
  * @since 1.19
  *
  * @ingroup General
+ *
+ * @if MOBILE @since_tizen 3.0
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI Eina_Bool        elm_object_color_class_color_set(Evas_Object *obj, const char *color_class, int r, int g, int b, int a);
 
 /**
- * @internal
- *
  * @brief Get the color of color class for a given widget.
  *
  * @note These color values are expected to be premultiplied by @p a.
@@ -790,12 +802,14 @@ EAPI Eina_Bool        elm_object_color_class_color_set(Evas_Object *obj, const c
  * @since 1.19
  *
  * @ingroup General
+ *
+ * @if MOBILE @since_tizen 3.0
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI Eina_Bool        elm_object_color_class_color_get(Evas_Object *obj, const char *color_class, int *r, int *g, int *b, int *a);
 
 /**
- * @internal
- *
  * @brief Set the second color of color class for a given widget.
  *
  * The second color is commonly used for outline of text.
@@ -812,12 +826,14 @@ EAPI Eina_Bool        elm_object_color_class_color_get(Evas_Object *obj, const c
  * @since 1.19
  *
  * @ingroup General
+ *
+ * @if MOBILE @since_tizen 3.0
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI Eina_Bool        elm_object_color_class_color2_set(Evas_Object *obj, const char *color_class, int r, int g, int b, int a);
 
 /**
- * @internal
- *
  * @brief Get the second color of color class for a given widget.
  *
  * The second color is commonly used for outline of text.
@@ -834,12 +850,14 @@ EAPI Eina_Bool        elm_object_color_class_color2_set(Evas_Object *obj, const
  * @since 1.19
  *
  * @ingroup General
+ *
+ * @if MOBILE @since_tizen 3.0
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI Eina_Bool        elm_object_color_class_color2_get(Evas_Object *obj, const char *color_class, int *r, int *g, int *b, int *a);
 
 /**
- * @internal
- *
  * @brief Set the third color of color class for a given widget.
  *
  * The third color is commonly used for shadow of text.
@@ -856,12 +874,14 @@ EAPI Eina_Bool        elm_object_color_class_color2_get(Evas_Object *obj, const
  * @since 1.19
  *
  * @ingroup General
+ *
+ * @if MOBILE @since_tizen 3.0
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI Eina_Bool        elm_object_color_class_color3_set(Evas_Object *obj, const char *color_class, int r, int g, int b, int a);
 
 /**
- * @internal
- *
  * @brief Get the third color of color class for a given widget.
  *
  * The third color is commonly used for shadow of text.
@@ -878,6 +898,10 @@ EAPI Eina_Bool        elm_object_color_class_color3_set(Evas_Object *obj, const
  * @since 1.19
  *
  * @ingroup General
+ *
+ * @if MOBILE @since_tizen 3.0
+ * @elseif WEARABLE @since_tizen 3.0
+ * @endif
  */
 EAPI Eina_Bool        elm_object_color_class_color3_get(Evas_Object *obj, const char *color_class, int *r, int *g, int *b, int *a);
 /*******
index 09d5fb6..d41e2ff 100644 (file)
@@ -420,6 +420,12 @@ _entry_value_apply(Evas_Object *obj)
    str = elm_object_text_get(sd->ent);
    if (!str) return;
 
+   //TIZEN_ONLY(20161007): If user set special value as number. spinner value
+   //                      should not set as special value.
+   const char *special_value = elm_spinner_special_value_get(obj, sd->val);
+   if (special_value && !strcmp(special_value, str)) return;
+   //
+
    val = strtod(str, &end);
    if (((*end != '\0') && (!isspace(*end))) || (fabs(val - sd->val) < DBL_EPSILON)) return;
    elm_spinner_value_set(obj, val);