Remove some dead assignments from elementary

SVN revision: 52763
This commit is contained in:
Bruno Dilly 2010-09-25 22:07:55 +00:00
parent b7ae7c772a
commit 89f23acadc
15 changed files with 10 additions and 46 deletions

View File

@ -185,7 +185,6 @@ _flip_to(Evas_Object *win, const char *name)
front_vis = elm_flip_front_get(fl);
if (front_vis)
{
front = elm_flip_content_front_get(fl);
back = elm_flip_content_back_get(fl);
elm_table_pack(holder, back, 0, 0, 1, 1);
evas_object_hide(back);
@ -195,7 +194,6 @@ _flip_to(Evas_Object *win, const char *name)
else
{
front = elm_flip_content_front_get(fl);
back = elm_flip_content_back_get(fl);
elm_table_pack(holder, front, 0, 0, 1, 1);
evas_object_hide(front);
// elm_table_unpack(holder, wid); // this should NOT be needed - but in evas_table/elm_table

View File

@ -64,9 +64,7 @@ static void
child_handler(int x, siginfo_t *info, void *data)
{
int status;
pid_t pid;
while ((pid = waitpid(-1, &status, WNOHANG)) > 0);
while (waitpid(-1, &status, WNOHANG) > 0);
}
static void
@ -88,13 +86,13 @@ static void
handle_run(int fd, unsigned long bytes)
{
unsigned char *buf = NULL;
int i, num;
int i;
char **argv = NULL;
char *cwd;
int argc;
buf = alloca(bytes);
if ((num = read(fd, buf, bytes)) < 0)
if (read(fd, buf, bytes) < 0)
{
close(fd);
return;

View File

@ -68,7 +68,6 @@ tim_cb(void *data)
evas_object_data_del(data, "timer");
tb = evas_object_data_get(data, "tb");
sc = evas_object_data_get(data, "sc");
mb = evas_object_data_get(data, "mb");
elm_object_scroll_freeze_push(sc);
evas_object_data_set(data, "dragging", (void *)(long)(1));
evas_object_color_set(data, 255, 255, 255, 255);
@ -142,7 +141,6 @@ ic_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
evas_object_data_del(obj, "dragging");
tb = evas_object_data_get(obj, "tb");
sc = evas_object_data_get(obj, "sc");
mb = evas_object_data_get(data, "mb");
elm_object_scroll_freeze_pop(sc);
tbx = (int)(long)evas_object_data_get(obj, "tbx");
tby = (int)(long)evas_object_data_get(obj, "tby");
@ -569,7 +567,6 @@ l3_tim_cb(void *data)
ly = evas_object_data_get(data, "ly");
ly2 = evas_object_data_get(data, "ly2");
sc = evas_object_data_get(data, "sc");
mb = evas_object_data_get(data, "mb");
elm_object_scroll_freeze_push(sc);
evas_object_data_set(data, "dragging", (void *)(long)1);
evas_object_color_set(data, 255, 255, 255, 255);
@ -652,7 +649,6 @@ l3_ic_up_cb(void *data, Evas *e, Evas_Object *obj, void *event_info)
evas_object_data_del(obj, "dragging");
ly = evas_object_data_get(obj, "ly");
sc = evas_object_data_get(obj, "sc");
mb = evas_object_data_get(data, "mb");
elm_object_scroll_freeze_pop(sc);
slx = (int)(long)evas_object_data_get(obj, "slx");
sly = (int)(long)evas_object_data_get(obj, "sly");

View File

@ -256,7 +256,6 @@ my_bt_add(void *data, Evas_Object *obj, void *event_info)
else
{
m_clas = itc_parking;
g_clas = itc_group_parking;
d = &data_parking;
}

View File

@ -654,13 +654,10 @@ response_handler_targets(struct _elm_cnp_selection *sel,
Ecore_X_Atom *atomlist;
Evas_Object *top;
int i,j;
int prio, selected;
targets = notify->data;
atomlist = (Ecore_X_Atom *)(targets->data.data);
prio = -1;
selected = -1;
/* Start from 1: Skip targets */
for (j = 1 ; j < CNP_N_ATOMS ; j ++)
{

View File

@ -299,7 +299,6 @@ _elm_win_recalc_job(void *data)
wd->deferred_recalc_job = NULL;
evas_object_geometry_get(wd->ent, NULL, NULL, &resw, &resh);
resh = 0;
minminw = 0;
edje_object_size_min_restricted_calc(wd->ent, &minw, &minh, 0, 0);
elm_coords_finger_size_adjust(1, &minw, 1, &minh);
minminw = minw;

View File

@ -1218,7 +1218,6 @@ _calc_job(void *data)
wd->show_item->block->w,
wd->show_item->h);
wd->show_item = NULL;
showme = 0;
}
}
if (minw_change)

View File

@ -291,7 +291,6 @@ _sel_eval(Evas_Object *obj, Evas_Coord evx, Evas_Coord evy)
Evas_Coord x, y, w, h, bx, by, bw, bh, xx, yy;
double cdv = 0.5;
Evas_Coord dist;
Eina_Bool change = EINA_FALSE;
char *label = NULL, *last = NULL;
int i;
if (!wd) return;
@ -340,7 +339,6 @@ _sel_eval(Evas_Object *obj, Evas_Coord evx, Evas_Coord evy)
if (it_closest) it_closest->selected = 1;
if (it_closest != it_last)
{
change = 1;
if (it_last)
{
const char *stacking, *selectraise;

View File

@ -44,7 +44,6 @@ _elm_win_recalc_job(void *data)
wd->deferred_recalc_job = NULL;
evas_object_geometry_get(wd->lbl, NULL, NULL, &resw, &resh);
resh = 0;
minminw = 0;
edje_object_size_min_restricted_calc(wd->lbl, &minw, &minh, 0, 0);
minminw = minw;
if (wd->wrap_w >= resw)
@ -140,10 +139,7 @@ _get_value_in_key_string(const char *oldstring, char *key, char **value)
starttag = curlocater;
endtag = curlocater + strlen(key);
if ((!endtag) || (*endtag != '='))
{
foundflag = 0;
return -1;
}
return -1;
firstindex = abs(oldstring - curlocater);
firstindex += strlen(key) + 1; // strlen("key") + strlen("=")
@ -581,14 +577,13 @@ elm_label_fontsize_set(Evas_Object *obj, int fontsize)
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
char *label, fontvalue[16];
char fontvalue[16];
int len;
if (!wd) return;
_elm_dangerous_call_check(__FUNCTION__);
len = strlen(wd->label);
if (len <= 0) return;
label = alloca(sizeof(char) * (len + 32));
sprintf(fontvalue, "%i", fontsize);
if (_stringshare_key_value_replace(&wd->label, "font_size", fontvalue, 0) == 0)
@ -653,14 +648,13 @@ elm_label_text_color_set(Evas_Object *obj, unsigned int r, unsigned int g, unsig
{
ELM_CHECK_WIDTYPE(obj, widtype);
Widget_Data *wd = elm_widget_data_get(obj);
char *label, colorstring[16];
char colorstring[16];
int len;
if (!wd) return;
_elm_dangerous_call_check(__FUNCTION__);
len = strlen(wd->label);
if (len <= 0) return;
label = alloca(sizeof(char) * (len + 32));
sprintf(colorstring, "#%02x%02x%02x%02x", r, g, b, a);
if (_stringshare_key_value_replace(&wd->label, "color", colorstring, 0) == 0)

View File

@ -658,7 +658,6 @@ _fix_items(Evas_Object *obj)
selectraise = edje_object_data_get(it->base.view, "selectraise");
if ((selectraise) && (!strcmp(selectraise, "on")))
evas_object_raise(it->base.view);
stacking = edje_object_data_get(it->base.view, "stacking");
}
it->fixed = EINA_TRUE;
it->is_even = it->even;

View File

@ -360,16 +360,12 @@ grid_load(Evas_Object *obj, Grid *g)
{
Widget_Data *wd = elm_widget_data_get(obj);
int x, y;
Evas_Coord ox, oy, ow, oh, cvx, cvy, cvw, cvh, gw, gh, ax, ay, tx, ty;
Evas_Coord ox, oy, ow, oh, cvx, cvy, cvw, cvh, gw, gh, tx, ty;
if (!wd) return;
evas_object_geometry_get(wd->pan_smart, &ox, &oy, &ow, &oh);
evas_output_viewport_get(evas_object_evas_get(wd->obj), &cvx, &cvy, &cvw, &cvh);
ax = 0;
ay = 0;
gw = wd->size.w;
gh = wd->size.h;
if (ow > gw) ax = (ow - gw) / 2;
if (oh > gh) ay = (oh - gh) / 2;
for (y = 0; y < g->gh; y++)
{
for (x = 0; x < g->gw; x++)
@ -394,8 +390,6 @@ grid_load(Evas_Object *obj, Grid *g)
yy = (gh * yy) / g->h;
hh = ((gh * (ty + hh)) / g->h) - yy;
}
// xx += ax;
// yy += ay;
if (ELM_RECTS_INTERSECT(xx - wd->pan_x + ox,
yy - wd->pan_y + oy,
ww, hh,

View File

@ -921,7 +921,6 @@ elm_widget_focus_jump(Evas_Object *obj, int forward)
if (elm_widget_focus_jump(sd->resize_obj, forward))
return 1;
/* it returned 0 - it got to the last item and is past it */
focus_next = 1;
}
}
}

View File

@ -408,8 +408,6 @@ _elm_win_eval_subobjs(Evas_Object *obj)
if (maxh == -1) maxh = h;
else if ((h > 0) && (h < maxh)) maxh = h;
}
if ((maxw >= 0) && (maxw < minw)) maxw = minw;
if ((maxh >= 0) && (maxh < minh)) maxh = minh;
if (!xx) maxw = minw;
else maxw = 32767;
if (!xy) maxh = minh;

View File

@ -4,15 +4,13 @@
static void
_smart_extents_calculate(Evas_Object *box, Evas_Object_Box_Data *priv, int horizontal, int homogeneous)
{
Evas_Coord minw, minh, maxw, maxh, mnw, mnh;
Evas_Coord minw, minh, mnw, mnh;
const Eina_List *l;
Evas_Object_Box_Option *opt;
/* FIXME: need to calc max */
minw = 0;
minh = 0;
maxw = -1;
maxh = -1;
if (homogeneous)
{
EINA_LIST_FOREACH(priv->children, l, opt)

View File

@ -2052,9 +2052,8 @@ static int
_smart_scrollbar_bar_v_visibility_adjust(Smart_Data *sd)
{
int scroll_v_vis_change = 0;
Evas_Coord w, h, vw, vh;
Evas_Coord h, vw, vh;
w = sd->child.w;
h = sd->child.h;
evas_object_geometry_get(sd->pan_obj, NULL, NULL, &vw, &vh);
if (sd->vbar_visible)
@ -2121,10 +2120,9 @@ static int
_smart_scrollbar_bar_h_visibility_adjust(Smart_Data *sd)
{
int scroll_h_vis_change = 0;
Evas_Coord w, h, vw, vh;
Evas_Coord w, vw, vh;
w = sd->child.w;
h = sd->child.h;
evas_object_geometry_get(sd->pan_obj, NULL, NULL, &vw, &vh);
if (sd->hbar_visible)
{