send a signal to set theme according to orientation mode when a widget is created
authorJaeun Choi <jaeun12.choi@samsung.com>
Wed, 13 Mar 2013 06:09:08 +0000 (15:09 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Mon, 18 Mar 2013 04:21:21 +0000 (13:21 +0900)
(should be removed after eo is applied)

src/lib/elc_naviframe.c
src/lib/elc_popup.c
src/lib/elm_button.c
src/lib/elm_label.c
src/lib/elm_widget.c

index 8cd5389..35dbe28 100644 (file)
@@ -1446,6 +1446,8 @@ elm_naviframe_add(Evas_Object *parent)
    if (!elm_widget_sub_object_add(parent, obj))
      ERR("could not add %p as sub object of %p", obj, parent);
 
+   _elm_widget_orient_signal_emit(obj);
+
    return obj;
 }
 
index 95b1187..c4eabdb 100644 (file)
@@ -1599,6 +1599,8 @@ elm_popup_add(Evas_Object *parent)
    ELM_WIDGET_DATA_GET(obj, sd);
    sd->highlight_root = EINA_TRUE;
 
+   _elm_widget_orient_signal_emit(obj);
+
    return obj;
 }
 
index 71e831e..04cf8c5 100644 (file)
@@ -352,6 +352,8 @@ elm_button_add(Evas_Object *parent)
    if (!elm_widget_sub_object_add(parent, obj))
      ERR("could not add %p as sub object of %p", obj, parent);
 
+   _elm_widget_orient_signal_emit(obj);
+
    return obj;
 }
 
index 57235d8..6a1abe7 100644 (file)
@@ -445,6 +445,8 @@ elm_label_add(Evas_Object *parent)
    if (!elm_widget_sub_object_add(parent, obj))
      ERR("could not add %p as sub object of %p", obj, parent);
 
+   _elm_widget_orient_signal_emit(obj);
+
    return obj;
 }
 
index b28123d..28009e1 100644 (file)
@@ -3755,6 +3755,19 @@ elm_widget_display_mode_set(Evas_Object *obj, Evas_Display_Mode dispmode)
 
 }
 
+// temporary code. should be removed after eo is applied.
+EAPI void
+_elm_widget_orient_signal_emit(Evas_Object *obj)
+{
+   ELM_WIDGET_DATA_GET(obj, sd);
+   char buf[128];
+   if (sd->orient_mode > 0)
+     {
+        snprintf(buf, sizeof(buf), "elm,state,orient,%d", sd->orient_mode);
+        elm_widget_signal_emit(obj, buf, "elm");
+     }
+}
+
 /**
  * @internal
  *