more warnning fixes!

SVN revision: 47087
This commit is contained in:
Carsten Haitzler 2010-03-09 16:46:13 +00:00
parent 58f0a50c45
commit 8599a54123
5 changed files with 57 additions and 58 deletions

View File

@ -36,6 +36,7 @@ static void
_del_hook(Evas_Object *obj) _del_hook(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->prop_hdl) ecore_event_handler_del(wd->prop_hdl); if (wd->prop_hdl) ecore_event_handler_del(wd->prop_hdl);
free(wd); free(wd);
} }
@ -44,7 +45,7 @@ static void
_theme_hook(Evas_Object *obj) _theme_hook(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
_elm_theme_set(wd->base, "conformant", "base", elm_widget_style_get(obj)); _elm_theme_set(wd->base, "conformant", "base", elm_widget_style_get(obj));
if (wd->content) if (wd->content)
edje_object_part_swallow(wd->base, "elm.swallow.content", wd->content); edje_object_part_swallow(wd->base, "elm.swallow.content", wd->content);
@ -57,7 +58,7 @@ _sizing_eval(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord mw = -1, mh = -1; Evas_Coord mw = -1, mh = -1;
if (!wd) return;
edje_object_size_min_calc(wd->base, &mw, &mh); edje_object_size_min_calc(wd->base, &mw, &mh);
evas_object_size_hint_min_set(obj, mw, mh); evas_object_size_hint_min_set(obj, mw, mh);
evas_object_size_hint_max_set(obj, -1, -1); evas_object_size_hint_max_set(obj, -1, -1);
@ -67,6 +68,7 @@ static void
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info) _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
{ {
Widget_Data *wd = elm_widget_data_get(data); Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return;
_sizing_eval(data); _sizing_eval(data);
} }
@ -75,7 +77,7 @@ _sub_del(void *data, Evas_Object *obj, void *event_info)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
Evas_Object *sub = event_info; Evas_Object *sub = event_info;
if (!wd) return;
if (sub == wd->content) if (sub == wd->content)
{ {
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
@ -143,9 +145,8 @@ _prop_change(void *data, int type, void *event)
#ifdef HAVE_ELEMENTARY_X #ifdef HAVE_ELEMENTARY_X
Ecore_X_Event_Window_Property *ev; Ecore_X_Event_Window_Property *ev;
Widget_Data *wd = elm_widget_data_get(data); Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return 1;
ev = event; ev = event;
if (ev->atom == ECORE_X_ATOM_E_ILLUME_ZONE) if (ev->atom == ECORE_X_ATOM_E_ILLUME_ZONE)
{ {
Ecore_X_Window zone; Ecore_X_Window zone;
@ -278,7 +279,7 @@ elm_conformant_content_set(Evas_Object *obj, Evas_Object *content)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if ((wd->content != content) && (wd->content)) if ((wd->content != content) && (wd->content))
elm_widget_sub_object_del(obj, wd->content); elm_widget_sub_object_del(obj, wd->content);
wd->content = content; wd->content = content;

View File

@ -34,6 +34,7 @@ static void
_del_hook(Evas_Object *obj) _del_hook(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->animator) ecore_animator_del(wd->animator); if (wd->animator) ecore_animator_del(wd->animator);
free(wd); free(wd);
} }
@ -42,6 +43,7 @@ static void
_theme_hook(Evas_Object *obj) _theme_hook(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
_sizing_eval(obj); _sizing_eval(obj);
} }
@ -51,7 +53,7 @@ _sizing_eval(Evas_Object *obj)
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord minw = -1, minh = -1, minw2 = -1, minh2 = -1; Evas_Coord minw = -1, minh = -1, minw2 = -1, minh2 = -1;
Evas_Coord maxw = -1, maxh = -1, maxw2 = -1, maxh2 = -1; Evas_Coord maxw = -1, maxh = -1, maxw2 = -1, maxh2 = -1;
if (!wd) return;
if (wd->front.content) if (wd->front.content)
evas_object_size_hint_min_get(wd->front.content, &minw, &minh); evas_object_size_hint_min_get(wd->front.content, &minw, &minh);
if (wd->back.content) if (wd->back.content)
@ -74,6 +76,7 @@ static void
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info) _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
{ {
Widget_Data *wd = elm_widget_data_get(data); Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return;
_sizing_eval(data); _sizing_eval(data);
} }
@ -82,7 +85,7 @@ _sub_del(void *data, Evas_Object *obj, void *event_info)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
Evas_Object *sub = event_info; Evas_Object *sub = event_info;
if (!wd) return;
if (sub == wd->front.content) if (sub == wd->front.content)
{ {
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
@ -109,14 +112,14 @@ _flip(Evas_Object *obj)
Evas_Coord x, y, w, h; Evas_Coord x, y, w, h;
double p, deg; double p, deg;
Evas_Map *mf, *mb; Evas_Map *mf, *mb;
Evas_Coord cx, cy, cz, px, py, foc; Evas_Coord cx, cy, px, py, foc;
int lx, ly, lz, lr, lg, lb, lar, lag, lab; int lx, ly, lz, lr, lg, lb, lar, lag, lab;
if (!wd->animator) return 0; if (!wd->animator) return 0;
t = t / wd->len; t = t / wd->len;
if (t > 1.0) t = 1.0; if (t > 1.0) t = 1.0;
if (!wd) return 0;
evas_object_geometry_get(obj, &x, &y, &w, &h); evas_object_geometry_get(obj, &x, &y, &w, &h);
mf = evas_map_new(4); mf = evas_map_new(4);
evas_map_smooth_set(mf, 0); evas_map_smooth_set(mf, 0);
@ -225,6 +228,7 @@ _configure(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord x, y, w, h; Evas_Coord x, y, w, h;
if (!wd) return;
evas_object_geometry_get(obj, &x, &y, &w, &h); evas_object_geometry_get(obj, &x, &y, &w, &h);
if (wd->front.content) if (wd->front.content)
{ {
@ -321,7 +325,7 @@ elm_flip_content_front_set(Evas_Object *obj, Evas_Object *content)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->front.content == content) return; if (wd->front.content == content) return;
if ((wd->front.content != content) && (wd->front.content)) if ((wd->front.content != content) && (wd->front.content))
{ {
@ -360,7 +364,7 @@ elm_flip_content_back_set(Evas_Object *obj, Evas_Object *content)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->back.content == content) return; if (wd->back.content == content) return;
if ((wd->back.content != content) && (wd->back.content)) if ((wd->back.content != content) && (wd->back.content))
{ {
@ -397,8 +401,9 @@ elm_flip_content_back_set(Evas_Object *obj, Evas_Object *content)
EAPI Eina_Bool EAPI Eina_Bool
elm_flip_front_get(Evas_Object *obj) elm_flip_front_get(Evas_Object *obj)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return wd->state; return wd->state;
} }
@ -407,6 +412,7 @@ elm_flip_perspective_set(Evas_Object *obj, Evas_Coord foc, Evas_Coord x, Evas_Co
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
} }
EAPI void EAPI void
@ -414,6 +420,7 @@ elm_flip_go(Evas_Object *obj, Elm_Flip_Mode mode)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (!wd->animator) wd->animator = ecore_animator_add(_animate, obj); if (!wd->animator) wd->animator = ecore_animator_add(_animate, obj);
wd->mode = mode; wd->mode = mode;
wd->start = ecore_loop_time_get(); wd->start = ecore_loop_time_get();

View File

@ -1,8 +1,6 @@
#include <Elementary.h> #include <Elementary.h>
#include "elm_priv.h" #include "elm_priv.h"
#if 1 // working on it
/** /**
* @defgroup Mapbuf Mapbuf * @defgroup Mapbuf Mapbuf
* *
@ -29,33 +27,31 @@ static void _sub_del(void *data, Evas_Object *obj, void *event_info);
static void static void
_del_hook(Evas_Object *obj) _del_hook(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
free(wd); free(wd);
} }
static void static void
_theme_hook(Evas_Object *obj) _theme_hook(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
_sizing_eval(obj); _sizing_eval(obj);
} }
static void static void
_sizing_eval(Evas_Object *obj) _sizing_eval(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord minw = -1, minh = -1, minw2 = -1, minh2 = -1; Evas_Coord minw = -1, minh = -1;
Evas_Coord maxw = -1, maxh = -1, maxw2 = -1, maxh2 = -1; Evas_Coord maxw = -1, maxh = -1;
if (!wd) return;
if (wd->content) if (wd->content)
{ {
evas_object_size_hint_min_get(wd->content, &minw, &minh); evas_object_size_hint_min_get(wd->content, &minw, &minh);
evas_object_size_hint_max_get(wd->content, &maxw, &maxh); evas_object_size_hint_max_get(wd->content, &maxw, &maxh);
} }
evas_object_size_hint_min_set(obj, minw, minh); evas_object_size_hint_min_set(obj, minw, minh);
evas_object_size_hint_max_set(obj, maxw, maxh); evas_object_size_hint_max_set(obj, maxw, maxh);
} }
@ -63,18 +59,17 @@ _sizing_eval(Evas_Object *obj)
static void static void
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info) _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
{ {
Widget_Data *wd = elm_widget_data_get(data); Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return;
_sizing_eval(data); _sizing_eval(data);
} }
static void static void
_sub_del(void *data, Evas_Object *obj, void *event_info) _sub_del(void *data, Evas_Object *obj, void *event_info)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
Evas_Object *sub = event_info; Evas_Object *sub = event_info;
if (!wd) return;
if (sub == wd->content) if (sub == wd->content)
{ {
evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS, evas_object_event_callback_del_full(sub, EVAS_CALLBACK_CHANGED_SIZE_HINTS,
@ -87,15 +82,13 @@ _sub_del(void *data, Evas_Object *obj, void *event_info)
static void static void
_mapbuf(Evas_Object *obj) _mapbuf(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord x, y, w, h; Evas_Coord x, y, w, h;
if (!wd) return;
evas_object_geometry_get(obj, &x, &y, &w, &h); evas_object_geometry_get(obj, &x, &y, &w, &h);
if (wd->enabled) if (wd->enabled)
{ {
Evas_Map *m; Evas_Map *m;
Evas_Coord cx, cy, cz, px, py, foc;
m = evas_map_new(4); m = evas_map_new(4);
evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0); evas_map_util_points_populate_from_geometry(m, x, y, w, h, 0);
@ -117,8 +110,8 @@ _mapbuf(Evas_Object *obj)
static void static void
_configure(Evas_Object *obj) _configure(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->content) if (wd->content)
{ {
Evas_Coord x, y, w, h; Evas_Coord x, y, w, h;
@ -192,7 +185,7 @@ elm_mapbuf_content_set(Evas_Object *obj, Evas_Object *content)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->content == content) return; if (wd->content == content) return;
if ((wd->content != content) && (wd->content)) if ((wd->content != content) && (wd->content))
{ {
@ -217,6 +210,7 @@ elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->enabled == enabled) return; if (wd->enabled == enabled) return;
wd->enabled = enabled; wd->enabled = enabled;
_configure(obj); _configure(obj);
@ -225,8 +219,9 @@ elm_mapbuf_enabled_set(Evas_Object *obj, Eina_Bool enabled)
EAPI Eina_Bool EAPI Eina_Bool
elm_mapbuf_enabled_get(const Evas_Object *obj) elm_mapbuf_enabled_get(const Evas_Object *obj)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return wd->enabled; return wd->enabled;
} }
@ -235,6 +230,7 @@ elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->smooth == smooth) return; if (wd->smooth == smooth) return;
wd->smooth = smooth; wd->smooth = smooth;
_configure(obj); _configure(obj);
@ -243,8 +239,9 @@ elm_mapbuf_smooth_set(Evas_Object *obj, Eina_Bool smooth)
EAPI Eina_Bool EAPI Eina_Bool
elm_mapbuf_smooth_get(const Evas_Object *obj) elm_mapbuf_smooth_get(const Evas_Object *obj)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return wd->smooth; return wd->smooth;
} }
@ -253,6 +250,7 @@ elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->alpha == alpha) return; if (wd->alpha == alpha) return;
wd->alpha = alpha; wd->alpha = alpha;
_configure(obj); _configure(obj);
@ -261,9 +259,8 @@ elm_mapbuf_alpha_set(Evas_Object *obj, Eina_Bool alpha)
EAPI Eina_Bool EAPI Eina_Bool
elm_mapbuf_alpha_get(const Evas_Object *obj) elm_mapbuf_alpha_get(const Evas_Object *obj)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE;
return wd->alpha; return wd->alpha;
} }
#endif

View File

@ -20,19 +20,17 @@ static void _toggle_panel(void *data, Evas_Object *obj, const char *emission, co
static void static void
_del_hook(Evas_Object *obj) _del_hook(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
free(wd); free(wd);
} }
static void static void
_theme_hook(Evas_Object *obj) _theme_hook(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
int scale = 0; int scale = 0;
if (!wd) return;
scale = (elm_widget_scale_get(obj) * _elm_config->scale); scale = (elm_widget_scale_get(obj) * _elm_config->scale);
edje_object_scale_set(wd->scr, scale); edje_object_scale_set(wd->scr, scale);
_sizing_eval(obj); _sizing_eval(obj);
@ -41,12 +39,11 @@ _theme_hook(Evas_Object *obj)
static void static void
_sizing_eval(Evas_Object *obj) _sizing_eval(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord mw = -1, mh = -1; Evas_Coord mw = -1, mh = -1;
Evas_Coord vw = 0, vh = 0; Evas_Coord vw = 0, vh = 0;
Evas_Coord w, h; Evas_Coord w, h;
if (!wd) return;
evas_object_smart_calculate(wd->bx); evas_object_smart_calculate(wd->bx);
edje_object_size_min_calc(elm_smart_scroller_edje_object_get(wd->scr), edje_object_size_min_calc(elm_smart_scroller_edje_object_get(wd->scr),
&mw, &mh); &mw, &mh);
@ -70,10 +67,9 @@ _sizing_eval(Evas_Object *obj)
static void static void
_resize(void *data, Evas *evas, Evas_Object *obj, void *event) _resize(void *data, Evas *evas, Evas_Object *obj, void *event)
{ {
Widget_Data *wd = elm_widget_data_get(data); Widget_Data *wd = elm_widget_data_get(data);
Evas_Coord mw, mh, vw, vh, w, h; Evas_Coord mw, mh, vw, vh, w, h;
if (!wd) return;
elm_smart_scroller_child_viewport_size_get(wd->scr, &vw, &vh); elm_smart_scroller_child_viewport_size_get(wd->scr, &vw, &vh);
evas_object_size_hint_min_get(wd->bx, &mw, &mh); evas_object_size_hint_min_get(wd->bx, &mw, &mh);
evas_object_geometry_get(wd->bx, NULL, NULL, &w, &h); evas_object_geometry_get(wd->bx, NULL, NULL, &w, &h);
@ -87,16 +83,15 @@ static void
_layout(Evas_Object *o, Evas_Object_Box_Data *priv, void *data) _layout(Evas_Object *o, Evas_Object_Box_Data *priv, void *data)
{ {
Widget_Data *wd = data; Widget_Data *wd = data;
if (!wd) return;
_els_box_layout(o, priv, EINA_TRUE, EINA_FALSE); _els_box_layout(o, priv, EINA_TRUE, EINA_FALSE);
} }
static void static void
_toggle_panel(void *data, Evas_Object *obj, const char *emission, const char *source) _toggle_panel(void *data, Evas_Object *obj, const char *emission, const char *source)
{ {
Widget_Data *wd = elm_widget_data_get(data); Widget_Data *wd = elm_widget_data_get(data);
if (!wd) return;
if (wd->hidden) if (wd->hidden)
{ {
edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr), edje_object_signal_emit(elm_smart_scroller_edje_object_get(wd->scr),
@ -161,18 +156,18 @@ elm_panel_orient_set(Evas_Object *obj, Elm_Panel_Orient orient)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
wd->orient = orient; wd->orient = orient;
switch (orient) switch (orient)
{ {
case ELM_PANEL_ORIENT_TOP: case ELM_PANEL_ORIENT_TOP:
case ELM_PANEL_ORIENT_BOTTOM: case ELM_PANEL_ORIENT_BOTTOM:
break; break;
case ELM_PANEL_ORIENT_LEFT: case ELM_PANEL_ORIENT_LEFT:
elm_smart_scroller_theme_set(wd->scr, "panel", "base", "left"); elm_smart_scroller_theme_set(wd->scr, "panel", "base", "left");
case ELM_PANEL_ORIENT_RIGHT: case ELM_PANEL_ORIENT_RIGHT:
break; break;
default: default:
break; break;
} }
_sizing_eval(obj); _sizing_eval(obj);
@ -183,7 +178,7 @@ elm_panel_content_set(Evas_Object *obj, Evas_Object *content)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
evas_object_box_remove_all(wd->bx, EINA_TRUE); evas_object_box_remove_all(wd->bx, EINA_TRUE);
if (!content) return; if (!content) return;
evas_object_box_append(wd->bx, content); evas_object_box_append(wd->bx, content);

View File

@ -17,16 +17,16 @@ static void _sizing_eval(Evas_Object *obj);
static void static void
_del_hook(Evas_Object *obj) _del_hook(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
free(wd); free(wd);
} }
static void static void
_theme_hook(Evas_Object *obj) _theme_hook(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return;
if (wd->horizontal) if (wd->horizontal)
_elm_theme_set(wd->sep, "separator", "horizontal", elm_widget_style_get(obj)); _elm_theme_set(wd->sep, "separator", "horizontal", elm_widget_style_get(obj));
else else
@ -38,10 +38,9 @@ _theme_hook(Evas_Object *obj)
static void static void
_sizing_eval(Evas_Object *obj) _sizing_eval(Evas_Object *obj)
{ {
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1; Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1;
if (!wd) return;
edje_object_size_min_calc(wd->sep, &minw, &minh); edje_object_size_min_calc(wd->sep, &minw, &minh);
evas_object_size_hint_min_set(obj, minw, minh); evas_object_size_hint_min_set(obj, minw, minh);
evas_object_size_hint_max_set(obj, maxw, maxh); evas_object_size_hint_max_set(obj, maxw, maxh);
@ -89,7 +88,7 @@ elm_separator_horizontal_set(Evas_Object *obj, Eina_Bool horizontal)
EAPI Eina_Bool EAPI Eina_Bool
elm_separator_horizontal_get(Evas_Object *obj) elm_separator_horizontal_get(Evas_Object *obj)
{ {
ELM_CHECK_WIDTYPE(obj, widtype); ELM_CHECK_WIDTYPE(obj, widtype) EINA_FALSE;
Widget_Data *wd = elm_widget_data_get(obj); Widget_Data *wd = elm_widget_data_get(obj);
if (!wd) return EINA_FALSE; if (!wd) return EINA_FALSE;
return wd->horizontal; return wd->horizontal;