Add some checks etc to separator widget

SVN revision: 42007
This commit is contained in:
Daniel Kolesa 2009-08-26 07:46:11 +00:00
parent 17339236d3
commit 265154f763
2 changed files with 5 additions and 1 deletions

View File

@ -33,7 +33,7 @@ SNAP=`echo $PACKAGE_VERSION | awk -F. '{printf("%s", $4);}'`
version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN" version_info=`expr $VMAJ + $VMIN`":$VMIC:$VMIN"
AC_SUBST(version_info) AC_SUBST(version_info)
release="ver-pre-svn-04" release="ver-svn-03"
case "$host_os" in case "$host_os" in
mingw32ce* | cegcc*) mingw32ce* | cegcc*)
MODULE_ARCH="$host_os-$host_cpu" MODULE_ARCH="$host_os-$host_cpu"

View File

@ -54,6 +54,7 @@ elm_separator_add(Evas_Object *parent)
wd = ELM_NEW(Widget_Data); wd = ELM_NEW(Widget_Data);
e = evas_object_evas_get(parent); e = evas_object_evas_get(parent);
obj = elm_widget_add(e); obj = elm_widget_add(e);
wd->horizontal = EINA_FALSE;
elm_widget_type_set(obj, "separator"); elm_widget_type_set(obj, "separator");
elm_widget_sub_object_add(parent, obj); elm_widget_sub_object_add(parent, obj);
elm_widget_data_set(obj, wd); elm_widget_data_set(obj, wd);
@ -72,15 +73,18 @@ EAPI void
elm_separator_horizontal_set(Evas_Object *obj, Eina_Bool horizontal) elm_separator_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
horizontal = !!horizontal; horizontal = !!horizontal;
if (wd->horizontal == horizontal) return; if (wd->horizontal == horizontal) return;
wd->horizontal = horizontal; wd->horizontal = horizontal;
_theme_hook(obj); _theme_hook(obj);
_sizing_eval(obj);
} }
EAPI Eina_Bool EAPI Eina_Bool
elm_separator_horizontal_get(Evas_Object *obj) elm_separator_horizontal_get(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
return wd->horizontal; return wd->horizontal;
} }