forked from enlightenment/enlightenment
* remove a bunch of unused variables
* scrollbars should not need to know the dir the view they are part of is in, because that can change without further notice. Access the dir through scrollbar->view->model->dir and replace the dir with the name of the view for named callbacks SVN revision: 6040
This commit is contained in:
parent
e0996f9fa7
commit
be25ab672d
|
@ -382,7 +382,6 @@ void
|
|||
e_iconbar_realize(E_Iconbar * ib)
|
||||
{
|
||||
Evas_List l;
|
||||
double x, y, w, h;
|
||||
|
||||
D_ENTER;
|
||||
D("realize iconbar\n");
|
||||
|
@ -521,7 +520,7 @@ e_iconbar_fix(E_Iconbar * ib)
|
|||
&x, &y, &w, &h))
|
||||
{
|
||||
D("Error: no geometry for iconbar, must not exist, clean it up.\n");
|
||||
e_object_unref(ib);
|
||||
e_object_unref(E_OBJECT (ib));
|
||||
D_RETURN;
|
||||
}
|
||||
|
||||
|
|
|
@ -610,7 +610,7 @@ static E_Menu *
|
|||
e_build_menu_iconified_borders_build(E_Build_Menu * bm)
|
||||
{
|
||||
E_Menu *menu = NULL;
|
||||
Evas_List l, entries = NULL;
|
||||
Evas_List l;
|
||||
|
||||
D_ENTER;
|
||||
|
||||
|
|
|
@ -81,7 +81,8 @@ e_scrollbar_setup_bits(E_Scrollbar * sb)
|
|||
if (sb->direction == 1)
|
||||
{
|
||||
/* load from the current dir's layout */
|
||||
snprintf(buf, PATH_MAX, "%s/.e_layout/scroll_base_v.bits.db", sb->dir);
|
||||
snprintf(buf, PATH_MAX, "%s/.e_layout/scroll_base_v.bits.db",
|
||||
sb->view->model->dir);
|
||||
sb->base = ebits_load(buf);
|
||||
|
||||
/* if not loaded, load defaults */
|
||||
|
@ -93,7 +94,8 @@ e_scrollbar_setup_bits(E_Scrollbar * sb)
|
|||
}
|
||||
|
||||
/* load from current dir's layout */
|
||||
snprintf(buf, PATH_MAX, "%s/.e_layout/scroll_bar_v.bits.db", sb->dir);
|
||||
snprintf(buf, PATH_MAX, "%s/.e_layout/scroll_bar_v.bits.db",
|
||||
sb->view->model->dir);
|
||||
sb->bar = ebits_load(buf);
|
||||
|
||||
/* if not loaded, load defaults */
|
||||
|
@ -107,7 +109,8 @@ e_scrollbar_setup_bits(E_Scrollbar * sb)
|
|||
else
|
||||
{
|
||||
/* load from the current dir's layout */
|
||||
snprintf(buf, PATH_MAX, "%s/.e_layout/scroll_base_h.bits.db", sb->dir);
|
||||
snprintf(buf, PATH_MAX, "%s/.e_layout/scroll_base_h.bits.db",
|
||||
sb->view->model->dir);
|
||||
sb->base = ebits_load(buf);
|
||||
|
||||
/* if not loaded, load defaults */
|
||||
|
@ -119,7 +122,8 @@ e_scrollbar_setup_bits(E_Scrollbar * sb)
|
|||
}
|
||||
|
||||
/* load from current dir's layout */
|
||||
snprintf(buf, PATH_MAX, "%s/.e_layout/scroll_bar_h.bits.db", sb->dir);
|
||||
snprintf(buf, PATH_MAX, "%s/.e_layout/scroll_bar_h.bits.db",
|
||||
sb->view->model->dir);
|
||||
sb->bar = ebits_load(buf);
|
||||
|
||||
/* if not loaded, load defaults */
|
||||
|
@ -203,7 +207,8 @@ e_sb_base_down_cb(void *data, Ebits_Object o, char *class, int bt, int x, int y,
|
|||
sb->scroll_step = -16;
|
||||
sb->scroll_speed = 0.01;
|
||||
|
||||
snprintf(name, PATH_MAX, "scroll_up.%i.%s", sb->direction, sb->dir);
|
||||
snprintf(name, PATH_MAX, "scroll_up.%i.%s", sb->direction,
|
||||
sb->view->name);
|
||||
ecore_add_event_timer(name, sb->scroll_speed, e_sb_scroll_timer, 0, sb);
|
||||
}
|
||||
|
||||
|
@ -212,7 +217,8 @@ e_sb_base_down_cb(void *data, Ebits_Object o, char *class, int bt, int x, int y,
|
|||
sb->scroll_step = 16;
|
||||
sb->scroll_speed = 0.01;
|
||||
|
||||
snprintf(name, PATH_MAX, "scroll_down.%i.%s", sb->direction, sb->dir);
|
||||
snprintf(name, PATH_MAX, "scroll_down.%i.%s", sb->direction,
|
||||
sb->view->name);
|
||||
ecore_add_event_timer(name, sb->scroll_speed, e_sb_scroll_timer, 0, sb);
|
||||
}
|
||||
|
||||
|
@ -235,12 +241,12 @@ e_sb_base_down_cb(void *data, Ebits_Object o, char *class, int bt, int x, int y,
|
|||
{
|
||||
sb->scroll_step = -sb->scroll_step;
|
||||
snprintf(name, PATH_MAX, "scroll_up.%i.%s", sb->direction,
|
||||
sb->dir);
|
||||
sb->view->name);
|
||||
}
|
||||
else /* scroll down (or right) */
|
||||
{
|
||||
snprintf(name, PATH_MAX, "scroll_down.%i.%s", sb->direction,
|
||||
sb->dir);
|
||||
sb->view->name);
|
||||
}
|
||||
|
||||
/* scroll once in the chosen direction */
|
||||
|
@ -314,7 +320,8 @@ e_sb_base_up_cb(void *data, Ebits_Object o, char *class, int bt, int x, int y,
|
|||
{
|
||||
sb->scroll_step = 0;
|
||||
|
||||
snprintf(name, PATH_MAX, "scroll_up.%i.%s", sb->direction, sb->dir);
|
||||
snprintf(name, PATH_MAX, "scroll_up.%i.%s", sb->direction,
|
||||
sb->view->name);
|
||||
ecore_del_event_timer(name);
|
||||
}
|
||||
|
||||
|
@ -322,7 +329,8 @@ e_sb_base_up_cb(void *data, Ebits_Object o, char *class, int bt, int x, int y,
|
|||
{
|
||||
sb->scroll_step = 0;
|
||||
|
||||
snprintf(name, PATH_MAX, "scroll_down.%i.%s", sb->direction, sb->dir);
|
||||
snprintf(name, PATH_MAX, "scroll_down.%i.%s", sb->direction,
|
||||
sb->view->name);
|
||||
ecore_del_event_timer(name);
|
||||
}
|
||||
|
||||
|
@ -332,14 +340,14 @@ e_sb_base_up_cb(void *data, Ebits_Object o, char *class, int bt, int x, int y,
|
|||
{
|
||||
sb->scroll_step = 0;
|
||||
snprintf(name, PATH_MAX, "scroll_up.%i.%s", sb->direction,
|
||||
sb->dir);
|
||||
sb->view->name);
|
||||
ecore_del_event_timer(name);
|
||||
}
|
||||
else if (sb->scroll_step > 0)
|
||||
{
|
||||
sb->scroll_step = 0;
|
||||
snprintf(name, PATH_MAX, "scroll_down.%i.%s", sb->direction,
|
||||
sb->dir);
|
||||
sb->view->name);
|
||||
ecore_del_event_timer(name);
|
||||
}
|
||||
}
|
||||
|
@ -396,7 +404,7 @@ e_sb_bar_up_cb(void *data, Ebits_Object o, char *class, int bt, int x, int y,
|
|||
sb->mouse_down = 0;
|
||||
else
|
||||
D_RETURN;
|
||||
|
||||
|
||||
sb->view->changed = 1;
|
||||
|
||||
D_RETURN;
|
||||
|
@ -484,7 +492,8 @@ e_sb_scroll_timer(int val, void *data)
|
|||
if (sb->val < 0)
|
||||
sb->val = 0;
|
||||
|
||||
snprintf(name, PATH_MAX, "scroll_up.%i.%s", sb->direction, sb->dir);
|
||||
snprintf(name, PATH_MAX, "scroll_up.%i.%s", sb->direction,
|
||||
sb->view->name);
|
||||
ecore_add_event_timer(name, sb->scroll_speed, e_sb_scroll_timer, 0, sb);
|
||||
}
|
||||
|
||||
|
@ -494,7 +503,8 @@ e_sb_scroll_timer(int val, void *data)
|
|||
if ((sb->val + sb->range) > sb->max)
|
||||
sb->val = sb->max - sb->range;
|
||||
|
||||
snprintf(name, PATH_MAX, "scroll_down.%i.%s", sb->direction, sb->dir);
|
||||
snprintf(name, PATH_MAX, "scroll_down.%i.%s", sb->direction,
|
||||
sb->view->name);
|
||||
ecore_add_event_timer(name, sb->scroll_speed, e_sb_scroll_timer, 0, sb);
|
||||
}
|
||||
|
||||
|
@ -523,7 +533,6 @@ e_scrollbar_new(E_View * v)
|
|||
e_object_init(E_OBJECT(sb), (E_Cleanup_Func) e_scrollbar_cleanup);
|
||||
|
||||
sb->view = v;
|
||||
e_strdup(sb->dir, v->model->dir);
|
||||
|
||||
sb->range = 1.0;
|
||||
sb->max = 1.0;
|
||||
|
@ -547,11 +556,10 @@ e_scrollbar_cleanup(E_Scrollbar * sb)
|
|||
if (sb->bar)
|
||||
ebits_free(sb->bar);
|
||||
}
|
||||
IF_FREE(sb->dir);
|
||||
|
||||
snprintf(name, PATH_MAX, "scroll_up.%i.%s", sb->direction, sb->dir);
|
||||
snprintf(name, PATH_MAX, "scroll_up.%i.%s", sb->direction, sb->view->name);
|
||||
ecore_del_event_timer(name);
|
||||
snprintf(name, PATH_MAX, "scroll_down.%i.%s", sb->direction, sb->dir);
|
||||
snprintf(name, PATH_MAX, "scroll_down.%i.%s", sb->direction, sb->view->name);
|
||||
ecore_del_event_timer(name);
|
||||
|
||||
e_object_cleanup(E_OBJECT(sb));
|
||||
|
|
|
@ -25,7 +25,6 @@ struct _E_Scrollbar
|
|||
double range;
|
||||
|
||||
E_View *view;
|
||||
char *dir;
|
||||
Evas evas;
|
||||
|
||||
Ebits_Object bar;
|
||||
|
|
|
@ -2166,7 +2166,6 @@ e_dnd_data_request(Ecore_Event * ev)
|
|||
* Atom destination_atom;
|
||||
* } Ecore_Event_Dnd_Data_Request;
|
||||
*/
|
||||
Evas_List l;
|
||||
E_View *v;
|
||||
Evas_List ll;
|
||||
char *data = NULL;
|
||||
|
|
|
@ -3,13 +3,12 @@
|
|||
#include "util.h"
|
||||
|
||||
static void e_view_layout_cleanup(E_View_Layout *layout);
|
||||
static int e_view_layout_add_element(E_View_Layout *layout, char *name);
|
||||
|
||||
E_View_Layout *
|
||||
e_view_layout_new(E_View *v)
|
||||
{
|
||||
E_View_Layout *layout;
|
||||
Ebits_Object bits;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
D_ENTER;
|
||||
|
||||
|
@ -116,7 +115,7 @@ e_view_layout_realize(E_View_Layout *layout)
|
|||
D_RETURN;
|
||||
}
|
||||
|
||||
int
|
||||
static int
|
||||
e_view_layout_add_element(E_View_Layout *layout, char *name)
|
||||
{
|
||||
E_View_Layout_Element *el;
|
||||
|
|
Loading…
Reference in New Issue