elementary/panes - added exception handlings

SVN revision: 64009
This commit is contained in:
ChunEon Park 2011-10-12 05:23:26 +00:00
parent 4b18c1f56a
commit 1f80b885cb
1 changed files with 10 additions and 5 deletions

View File

@ -102,9 +102,7 @@ static Eina_Bool
_elm_panes_focus_next_hook(const Evas_Object *obj, Elm_Focus_Direction dir, Evas_Object **next)
{
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd)
return EINA_FALSE;
if (!wd) return EINA_FALSE;
double w, h;
edje_object_part_drag_value_get(wd->panes, "elm.bar", &w, &h);
@ -265,6 +263,7 @@ elm_panes_content_left_set(Evas_Object *obj, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->contents.left)
{
evas_object_del(wd->contents.left);
@ -283,6 +282,7 @@ elm_panes_content_right_set(Evas_Object *obj, Evas_Object *content)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->contents.right)
{
evas_object_del(wd->contents.right);
@ -301,6 +301,7 @@ elm_panes_content_left_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) NULL;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return NULL;
return wd->contents.left;
}
@ -347,6 +348,7 @@ elm_panes_content_left_size_get(const Evas_Object *obj)
Widget_Data *wd = elm_widget_data_get(obj);
double w, h;
if (!wd) return 0;
edje_object_part_drag_value_get(wd->panes, "elm.bar", &w, &h);
if (wd->horizontal) return h;
else return w;
@ -357,7 +359,7 @@ elm_panes_content_left_size_set(Evas_Object *obj, double size)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (size < 0.0) size = 0.0;
else if (size > 1.0) size = 1.0;
if (wd->horizontal)
@ -371,7 +373,7 @@ elm_panes_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
wd->horizontal = horizontal;
_theme_hook(obj);
elm_panes_content_left_size_set(obj, 0.5);
@ -382,6 +384,7 @@ elm_panes_horizontal_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return wd->horizontal;
}
@ -390,6 +393,7 @@ elm_panes_fixed_set(Evas_Object *obj, Eina_Bool fixed)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
wd->fixed = !!fixed;
if (wd->fixed == EINA_TRUE)
edje_object_signal_emit(wd->panes, "elm.panes.fixed", "elm");
@ -402,5 +406,6 @@ elm_panes_fixed_get(const Evas_Object *obj)
{
ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return wd->fixed;
}