elfe: big cleanup, remove all warnings found with -Wall -W and remove dead code
SVN revision: 58718
This commit is contained in:
parent
077f4ca900
commit
beb5b0526e
|
@ -29,12 +29,10 @@ struct _Elfe_Grid_Item
|
|||
};
|
||||
|
||||
static Elm_Gengrid_Item_Class app_itc;
|
||||
static Efreet_Menu *menus;
|
||||
|
||||
static void _populate_items_cb(void *data, Evas_Object *obj, void *event_info);
|
||||
|
||||
static char *
|
||||
_label_get(void *data, Evas_Object *obj, const char *part)
|
||||
_label_get(void *data, Evas_Object *obj __UNUSED__, const char *part __UNUSED__)
|
||||
{
|
||||
|
||||
Elfe_Grid_Item *gitem = data;
|
||||
|
@ -49,7 +47,6 @@ _label_get(void *data, Evas_Object *obj, const char *part)
|
|||
static Evas_Object *
|
||||
_icon_get(void *data, Evas_Object *obj, const char *part)
|
||||
{
|
||||
const char *path;
|
||||
Evas_Object *ic = NULL;
|
||||
Elfe_Grid_Item *gitem = data;
|
||||
|
||||
|
@ -74,9 +71,8 @@ _icon_get(void *data, Evas_Object *obj, const char *part)
|
|||
|
||||
|
||||
static void
|
||||
_gl_longpress(void *data, Evas_Object *obj, void *event_info)
|
||||
_gl_longpress(void *data, Evas_Object *obj __UNUSED__, void *event_info)
|
||||
{
|
||||
Evas_Object *popup;
|
||||
Elfe_Grid_Item *gitem;
|
||||
Elfe_Allapps *allapps = data;
|
||||
Elm_Gengrid_Item *it = event_info;
|
||||
|
@ -92,7 +88,7 @@ _gl_longpress(void *data, Evas_Object *obj, void *event_info)
|
|||
}
|
||||
|
||||
static void
|
||||
_widget_longpress(void *data, Evas_Object *obj, void *event_info)
|
||||
_widget_longpress(void *data, Evas_Object *obj __UNUSED__, void *event_info)
|
||||
{
|
||||
const char *name = event_info;
|
||||
Elfe_Allapps *allapps = data;
|
||||
|
@ -105,7 +101,7 @@ _widget_longpress(void *data, Evas_Object *obj, void *event_info)
|
|||
}
|
||||
|
||||
static void
|
||||
_item_selected(void *data, Evas_Object *obj, void *event_info)
|
||||
_item_selected(void *data, Evas_Object *obj __UNUSED__, void *event_info)
|
||||
{
|
||||
Elfe_Grid_Item *gitem = data;
|
||||
Elm_Gengrid_Item *it = event_info;
|
||||
|
@ -155,12 +151,11 @@ _add_items(Elfe_Allapps *allapps, Efreet_Menu *entry)
|
|||
}
|
||||
|
||||
static void
|
||||
_obj_resize_cb(void *data , Evas *e , Evas_Object *obj, void *event_info )
|
||||
_obj_resize_cb(void *data , Evas *e __UNUSED__ , Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Evas_Coord w, h;
|
||||
Evas_Coord size = 0;
|
||||
Elfe_Allapps *allapps = data;
|
||||
Evas_Coord ow, oh;
|
||||
Evas_Coord ow;
|
||||
|
||||
evas_object_geometry_get(allapps->box, NULL, NULL, &w, &h);
|
||||
|
||||
|
@ -175,7 +170,7 @@ _obj_resize_cb(void *data , Evas *e , Evas_Object *obj, void *event_info )
|
|||
}
|
||||
|
||||
static void
|
||||
_obj_del_cb(void *data , Evas *e , Evas_Object *obj, void *event_info )
|
||||
_obj_del_cb(void *data , Evas *e __UNUSED__ , Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elfe_Allapps *allapps = data;
|
||||
Elfe_Grid_Item *it;
|
||||
|
@ -191,7 +186,7 @@ _obj_del_cb(void *data , Evas *e , Evas_Object *obj, void *event_info )
|
|||
}
|
||||
|
||||
static void
|
||||
_apps_clicked_cb(void *data , Evas_Object *obj, void *event_info)
|
||||
_apps_clicked_cb(void *data , Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elfe_Allapps *allapps = data;
|
||||
Evas_Object *bt;
|
||||
|
@ -211,7 +206,7 @@ _apps_clicked_cb(void *data , Evas_Object *obj, void *event_info)
|
|||
|
||||
|
||||
static void
|
||||
_widgets_clicked_cb(void *data , Evas_Object *obj, void *event_info)
|
||||
_widgets_clicked_cb(void *data , Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elfe_Allapps *allapps = data;
|
||||
Evas_Object *bt;
|
||||
|
@ -230,7 +225,7 @@ _widgets_clicked_cb(void *data , Evas_Object *obj, void *event_info)
|
|||
|
||||
|
||||
static void
|
||||
_config_clicked_cb(void *data , Evas_Object *obj, void *event_info)
|
||||
_config_clicked_cb(void *data , Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elfe_Allapps *allapps = data;
|
||||
Evas_Object *bt;
|
||||
|
@ -252,12 +247,9 @@ Evas_Object *
|
|||
elfe_allapps_add(Evas_Object *parent)
|
||||
{
|
||||
Elfe_Allapps *allapps;
|
||||
Evas_Object *list;
|
||||
char *path;
|
||||
Evas_Object *ic;
|
||||
Evas_Object *bt;
|
||||
Evas_Object *sep;
|
||||
Eina_List *l;
|
||||
|
||||
/* Fixme create an edje layout instead of a box */
|
||||
|
||||
|
|
|
@ -37,38 +37,12 @@ struct _Elfe_Desktop
|
|||
|
||||
static Elfe_Desktop *desk;
|
||||
|
||||
static void
|
||||
_scroller_edge_left_cb(void *data , Evas_Object *obj, void *event_info )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
_scroller_edge_right_cb(void *data , Evas_Object *obj, void *event_info )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_scroller_scroll_cb(void *data , Evas_Object *obj, void *event_info )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
static void
|
||||
_scroller_scroll_anim_start_cb(void *data , Evas_Object *obj, void *event_info )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
_scroller_scroll_anim_stop_cb(void *data , Evas_Object *obj, void *event_info )
|
||||
_scroller_scroll_anim_stop_cb(void *data , Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elfe_Desktop *desk = data;
|
||||
Evas_Coord x, y, w, h;
|
||||
int num;
|
||||
int i;
|
||||
|
||||
|
||||
|
@ -90,18 +64,6 @@ _scroller_scroll_anim_stop_cb(void *data , Evas_Object *obj, void *event_info )
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
_scroller_scroll_drag_start_cb(void *data , Evas_Object *obj, void *event_info )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
_scroller_scroll_drag_stop_cb(void *data , Evas_Object *obj, void *event_info )
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_longpress_timer_cb(void *data)
|
||||
{
|
||||
|
@ -124,10 +86,9 @@ _longpress_timer_cb(void *data)
|
|||
}
|
||||
|
||||
static void
|
||||
_scroller_mouse_move_cb(void *data,Evas *evas, Evas_Object *obj, void *event_info)
|
||||
_scroller_mouse_move_cb(void *data,Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elfe_Desktop *desk = data;
|
||||
Evas_Event_Mouse_Move *ev = event_info;
|
||||
|
||||
if (!desk->on_hold)
|
||||
{
|
||||
|
@ -143,7 +104,7 @@ _scroller_mouse_move_cb(void *data,Evas *evas, Evas_Object *obj, void *event_inf
|
|||
|
||||
|
||||
static void
|
||||
_scroller_mouse_up_cb(void *data,Evas *evas, Evas_Object *obj, void *event_info)
|
||||
_scroller_mouse_up_cb(void *data,Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elfe_Desktop *desk = data;
|
||||
|
||||
|
@ -157,10 +118,9 @@ _scroller_mouse_up_cb(void *data,Evas *evas, Evas_Object *obj, void *event_info)
|
|||
|
||||
|
||||
static void
|
||||
_scroller_mouse_down_cb(void *data,Evas *evas, Evas_Object *obj, void *event_info)
|
||||
_scroller_mouse_down_cb(void *data,Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elfe_Desktop *desk = data;
|
||||
Evas_Event_Mouse_Down *ev = event_info;
|
||||
|
||||
if (!desk->edit_mode)
|
||||
{
|
||||
|
@ -176,7 +136,7 @@ _scroller_mouse_down_cb(void *data,Evas *evas, Evas_Object *obj, void *event_inf
|
|||
|
||||
|
||||
static void
|
||||
_cb_object_resize(void *data , Evas *e , Evas_Object *obj, void *event_info )
|
||||
_cb_object_resize(void *data , Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
|
||||
{
|
||||
Elfe_Desktop *desk = data;
|
||||
Evas_Coord x, y, w, h;
|
||||
|
@ -202,7 +162,7 @@ _cb_object_resize(void *data , Evas *e , Evas_Object *obj, void *event_info )
|
|||
|
||||
|
||||
static void
|
||||
_icon_mouse_move_cb(void *data,Evas *evas, Evas_Object *obj, void *event_info)
|
||||
_icon_mouse_move_cb(void *data,Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
|
||||
{
|
||||
Elfe_Desktop *desk = data;
|
||||
Evas_Event_Mouse_Move *ev = event_info;
|
||||
|
@ -213,10 +173,9 @@ _icon_mouse_move_cb(void *data,Evas *evas, Evas_Object *obj, void *event_info)
|
|||
|
||||
|
||||
static void
|
||||
_icon_mouse_up_cb(void *data,Evas *evas, Evas_Object *obj, void *event_info)
|
||||
_icon_mouse_up_cb(void *data __UNUSED__, Evas *evas __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info)
|
||||
{
|
||||
|
||||
Elfe_Desktop *desktop = data;
|
||||
Evas_Event_Mouse_Up *ev = event_info;
|
||||
|
||||
printf("icon mouse up\n");
|
||||
|
@ -322,13 +281,14 @@ _gadget_longpressed_cb(void *data , Evas_Object *obj, void *event_info)
|
|||
}
|
||||
|
||||
static void*
|
||||
_app_exec_cb(void *data, Efreet_Desktop *desktop, char *command, int remaining)
|
||||
_app_exec_cb(void *data __UNUSED__, Efreet_Desktop *desktop __UNUSED__, char *command, int remaining __UNUSED__)
|
||||
{
|
||||
ecore_exe_run(command, NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
_allapps_item_selected_cb(void *data , Evas_Object *obj, void *event_info)
|
||||
_allapps_item_selected_cb(void *data , Evas_Object *obj __UNUSED__, void *event_info)
|
||||
{
|
||||
Efreet_Menu *menu = event_info;
|
||||
Evas_Object *o_edje;
|
||||
|
@ -342,7 +302,7 @@ _allapps_item_selected_cb(void *data , Evas_Object *obj, void *event_info)
|
|||
}
|
||||
|
||||
static void
|
||||
_dock_allapps_clicked_cb(void *data , Evas_Object *obj, void *event_info )
|
||||
_dock_allapps_clicked_cb(void *data , Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elfe_Desktop *desk = data;
|
||||
Evas_Object *o_edje;
|
||||
|
@ -398,10 +358,9 @@ elfe_desktop_gadget_add(Evas_Object *obj, const char *name, Evas_Coord x, Evas_C
|
|||
Evas_Object *
|
||||
elfe_desktop_add(Evas_Object *parent, E_Zone *zone)
|
||||
{
|
||||
Evas_Object *tb, *pad, *bx, *ly;
|
||||
Evas_Object *tb, *pad, *bx;
|
||||
|
||||
int i;
|
||||
Evas_Coord x, y, w, h;
|
||||
const char *desktop_name;
|
||||
Evas_Object *gad;
|
||||
char buf[4096];
|
||||
|
@ -504,13 +463,7 @@ elfe_desktop_add(Evas_Object *parent, E_Zone *zone)
|
|||
/* evas_object_size_hint_min_set(desk->dock, 0, 80); */
|
||||
/* evas_object_size_hint_max_set(desk->dock, 9999, 80); */
|
||||
|
||||
evas_object_smart_callback_add(desk->sc, "edge,left", _scroller_edge_left_cb, desk);
|
||||
evas_object_smart_callback_add(desk->sc, "edge,right", _scroller_edge_right_cb, desk);
|
||||
evas_object_smart_callback_add(desk->sc, "scroll", _scroller_scroll_cb, desk);
|
||||
evas_object_smart_callback_add(desk->sc, "scroll,anim,start", _scroller_scroll_anim_start_cb, desk);
|
||||
evas_object_smart_callback_add(desk->sc, "scroll,anim,stop", _scroller_scroll_anim_stop_cb, desk);
|
||||
evas_object_smart_callback_add(desk->sc, "scroll,drag,start", _scroller_scroll_drag_start_cb, desk);
|
||||
evas_object_smart_callback_add(desk->sc, "scroll,drag,stop", _scroller_scroll_drag_stop_cb, desk);
|
||||
|
||||
evas_object_event_callback_add(desk->sc, EVAS_CALLBACK_MOUSE_MOVE, _scroller_mouse_move_cb, desk);
|
||||
evas_object_event_callback_add(desk->sc, EVAS_CALLBACK_MOUSE_UP, _scroller_mouse_up_cb, desk);
|
||||
|
|
|
@ -31,7 +31,6 @@ _gadget_add(Elfe_Desktop_Item *dit, const char *name, E_Gadcon *gc)
|
|||
{
|
||||
Evas_Object *item;
|
||||
E_Gadcon_Client_Class *cc = NULL;
|
||||
Eina_List *l;
|
||||
E_Gadcon_Client *gcc = NULL;
|
||||
|
||||
if (!gc) return NULL;
|
||||
|
@ -61,13 +60,14 @@ _gadget_add(Elfe_Desktop_Item *dit, const char *name, E_Gadcon *gc)
|
|||
}
|
||||
|
||||
static void*
|
||||
_app_exec_cb(void *data, Efreet_Desktop *desktop, char *command, int remaining)
|
||||
_app_exec_cb(void *data __UNUSED__, Efreet_Desktop *desktop __UNUSED__, char *command, int remaining __UNUSED__)
|
||||
{
|
||||
ecore_exe_run(command, NULL);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
_clicked_signal_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
|
||||
_clicked_signal_cb(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
|
||||
{
|
||||
Elfe_Desktop_Item *dit = data;
|
||||
|
||||
|
@ -79,7 +79,7 @@ _clicked_signal_cb(void *data, Evas_Object *obj, const char *emission, const cha
|
|||
}
|
||||
|
||||
static void
|
||||
_delete_signal_cb(void *data, Evas_Object *obj, const char *emission, const char *source)
|
||||
_delete_signal_cb(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
|
||||
{
|
||||
Elfe_Desktop_Item *dit = data;
|
||||
|
||||
|
@ -90,7 +90,7 @@ _delete_signal_cb(void *data, Evas_Object *obj, const char *emission, const char
|
|||
|
||||
|
||||
static Evas_Object *
|
||||
_app_add(Elfe_Desktop_Item *dit, const char *name)
|
||||
_app_add(Elfe_Desktop_Item *dit, const char *name __UNUSED__)
|
||||
{
|
||||
Evas_Object *item;
|
||||
Evas_Object *icon;
|
||||
|
@ -167,7 +167,7 @@ elfe_desktop_item_edit_mode_set(Evas_Object *obj, Eina_Bool mode)
|
|||
}
|
||||
|
||||
static void
|
||||
_obj_del_cb(void *data , Evas *e , Evas_Object *obj, void *event_info )
|
||||
_obj_del_cb(void *data , Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elfe_Desktop_Item *dit = data;
|
||||
|
||||
|
|
|
@ -7,6 +7,6 @@ Evas_Object *elfe_desktop_item_add(Evas_Object *parent,
|
|||
Elfe_Desktop_Item_Type type,
|
||||
E_Gadcon *gc);
|
||||
void elfe_desktop_item_pos_get(Evas_Object *obj, int *col, int *row);
|
||||
|
||||
void elfe_desktop_item_edit_mode_set(Evas_Object *obj, Eina_Bool mode);
|
||||
|
||||
#endif /* _DESKTOP_ITEM_H_ */
|
||||
|
|
|
@ -68,18 +68,19 @@ _xy_to_pos(Elfe_Desktop_Page *page, Evas_Coord x, Evas_Coord y,
|
|||
}
|
||||
|
||||
static void
|
||||
_gadcon_populate_class(void *data, E_Gadcon *gc, const E_Gadcon_Client_Class *cc)
|
||||
_gadcon_populate_class(void *data __UNUSED__, E_Gadcon *gc __UNUSED__, const E_Gadcon_Client_Class *cc __UNUSED__)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
_gadcon_client_add(void *data, const E_Gadcon_Client_Class *cc)
|
||||
_gadcon_client_add(void *data __UNUSED__, const E_Gadcon_Client_Class *cc __UNUSED__)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void
|
||||
_gadcon_client_remove(void *data, E_Gadcon_Client *gcc)
|
||||
_gadcon_client_remove(void *data __UNUSED__, E_Gadcon_Client *gcc __UNUSED__)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -119,13 +120,8 @@ _gadcon_add(Evas *e,
|
|||
return gc;
|
||||
}
|
||||
|
||||
static void _gadcon_del(E_Gadcon *gc)
|
||||
{
|
||||
/* FIXME delete gadcon */
|
||||
}
|
||||
|
||||
static void
|
||||
_item_delete_cb(void *data , Evas_Object *obj, void *event_info)
|
||||
_item_delete_cb(void *data , Evas_Object *obj __UNUSED__, void *event_info)
|
||||
{
|
||||
Evas_Object *item = event_info;
|
||||
Elfe_Desktop_Page *page = data;
|
||||
|
@ -176,13 +172,12 @@ _populate_page(Elfe_Desktop_Page *page)
|
|||
}
|
||||
|
||||
static void
|
||||
_page_resize_cb(void *data , Evas *e , Evas_Object *obj, void *event_info )
|
||||
_page_resize_cb(void *data , Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elfe_Desktop_Page *page = data;
|
||||
Evas_Coord x, y, w, h;
|
||||
Evas_Coord ow, oh;
|
||||
Evas_Object *item;
|
||||
Eina_List *l;
|
||||
int col = 0, row = 0;
|
||||
Eina_Iterator *iter;
|
||||
Eina_Matrixsparse_Cell *cell;
|
||||
|
@ -285,7 +280,6 @@ elfe_desktop_page_edit_mode_set(Evas_Object *obj, Eina_Bool mode)
|
|||
{
|
||||
Elfe_Desktop_Page *page = evas_object_data_get(obj, "desktop_page");;
|
||||
Evas_Object *item;
|
||||
Eina_List *l;
|
||||
Eina_Iterator *iter;
|
||||
Eina_Matrixsparse_Cell *cell;
|
||||
|
||||
|
|
|
@ -3,5 +3,10 @@
|
|||
|
||||
Evas_Object *elfe_desktop_page_add(Evas_Object *parent, E_Zone *zone,
|
||||
int page, const char *desktop_name);
|
||||
|
||||
Eina_Bool elfe_desktop_page_pos_is_free(Evas_Object *obj, int row, int col);
|
||||
void elfe_desktop_page_item_gadget_add(Evas_Object *obj, const char *name,
|
||||
Evas_Coord x, Evas_Coord y);
|
||||
void elfe_desktop_page_item_app_add(Evas_Object *obj, Efreet_Menu *menu,
|
||||
Evas_Coord x, Evas_Coord y);
|
||||
void elfe_desktop_page_edit_mode_set(Evas_Object *obj, Eina_Bool mode);
|
||||
#endif /* _DESKTOP_PAGE_H_ */
|
||||
|
|
39
src/dock.c
39
src/dock.c
|
@ -20,35 +20,11 @@ struct _Elfe_Dock
|
|||
static void _allapps_icon_add(Elfe_Dock *dock, const char *name);
|
||||
|
||||
static void
|
||||
_pos_to_geom(Elfe_Dock *dock,
|
||||
int row, int col,
|
||||
Evas_Coord *x, Evas_Coord *y,
|
||||
Evas_Coord *w, Evas_Coord *h)
|
||||
{
|
||||
Evas_Coord ox, oy, ow, oh;
|
||||
|
||||
if(!dock)
|
||||
return;
|
||||
|
||||
evas_object_geometry_get(dock->edje, &ox, &oy, &ow, &oh);
|
||||
|
||||
if (elfe_home_cfg->cols && w)
|
||||
*w = ow / elfe_home_cfg->cols;
|
||||
if (h)
|
||||
*h = oh;
|
||||
|
||||
if (x && w)
|
||||
*x = col * *w;
|
||||
if (y && h)
|
||||
*y = 0;
|
||||
}
|
||||
|
||||
static void
|
||||
_xy_to_pos(Elfe_Dock *dock, Evas_Coord x, Evas_Coord y,
|
||||
_xy_to_pos(Elfe_Dock *dock, Evas_Coord x, Evas_Coord y __UNUSED__,
|
||||
int *col)
|
||||
{
|
||||
Evas_Coord ow, oh;
|
||||
Evas_Coord w = 0, h = 0;
|
||||
Evas_Coord w = 0;
|
||||
|
||||
if(!dock)
|
||||
return;
|
||||
|
@ -66,7 +42,7 @@ _xy_to_pos(Elfe_Dock *dock, Evas_Coord x, Evas_Coord y,
|
|||
|
||||
|
||||
static void
|
||||
_item_delete_cb(void *data , Evas_Object *obj, void *event_info)
|
||||
_item_delete_cb(void *data , Evas_Object *obj __UNUSED__, void *event_info)
|
||||
{
|
||||
Evas_Object *item = event_info;
|
||||
Elfe_Dock *dock = data;
|
||||
|
@ -82,7 +58,7 @@ _item_delete_cb(void *data , Evas_Object *obj, void *event_info)
|
|||
|
||||
|
||||
static void
|
||||
_app_icon_clicked_cb(void *data , Evas_Object *obj, void *event_info )
|
||||
_app_icon_clicked_cb(void *data , Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Elfe_Dock *dock = data;
|
||||
|
||||
|
@ -121,8 +97,6 @@ _populate_dock(Elfe_Dock *dock)
|
|||
Evas_Object *item;
|
||||
Eina_List *l;
|
||||
|
||||
Evas_Coord x = 0, y = 0, w = 0, h = 0;
|
||||
|
||||
EINA_LIST_FOREACH(elfe_home_cfg->dock_items, l, dic)
|
||||
{
|
||||
|
||||
|
@ -150,7 +124,6 @@ elfe_dock_edit_mode_set(Evas_Object *obj, Eina_Bool mode)
|
|||
{
|
||||
Elfe_Dock *dock = evas_object_data_get(obj, "dock");;
|
||||
Evas_Object *item;
|
||||
Eina_List *l;
|
||||
Eina_Iterator *iter;
|
||||
Eina_Matrixsparse_Cell *cell;
|
||||
|
||||
|
@ -181,7 +154,6 @@ elfe_dock_item_app_add(Evas_Object *obj, Efreet_Menu *menu,
|
|||
{
|
||||
Elfe_Dock *dock = evas_object_data_get(obj, "dock");
|
||||
Evas_Object *item;
|
||||
Evas_Coord ox = 0, oy = 0, ow = 0, oh = 0;
|
||||
int col = 0;
|
||||
|
||||
_xy_to_pos(dock, x, y, &col);
|
||||
|
@ -214,9 +186,6 @@ Evas_Object *
|
|||
elfe_dock_add(Evas_Object *parent)
|
||||
{
|
||||
Elfe_Dock *dock;
|
||||
Evas_Object *bx;
|
||||
Evas_Object *ic;
|
||||
int i;
|
||||
|
||||
dock = calloc(1, sizeof(Elfe_Dock));
|
||||
if (!dock)
|
||||
|
|
|
@ -5,13 +5,6 @@
|
|||
#include "elfe_config.h"
|
||||
|
||||
/* local function prototypes */
|
||||
static void *_elfe_home_config_create(E_Config_Dialog *cfd);
|
||||
static void _elfe_home_config_free(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_elfe_home_config_ui(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static void _elfe_home_config_changed(void *data, Evas_Object *obj, void *event);
|
||||
static void _elfe_home_config_slider_changed(void *data, Evas_Object *obj);
|
||||
static void _elfe_home_config_click_changed(void *data, Evas_Object *obj, void *event);
|
||||
static Eina_Bool _elfe_home_config_change_timeout(void *data);
|
||||
|
||||
/* local variables */
|
||||
EAPI Elfe_Home_Config *elfe_home_cfg = NULL;
|
||||
|
@ -22,11 +15,9 @@ Ecore_Timer *_elfe_home_config_change_timer = NULL;
|
|||
Evas_Object *delay_label, *delay_slider;
|
||||
|
||||
/* public functions */
|
||||
int
|
||||
elfe_home_config_init(E_Module *m)
|
||||
int
|
||||
elfe_home_config_init(E_Module *m)
|
||||
{
|
||||
Eina_List *l;
|
||||
|
||||
conf_desktop_item_edd = E_CONFIG_DD_NEW("Elfe_Desktop_Item_Cfg", Elfe_Desktop_Item_Config);
|
||||
|
||||
#undef T
|
||||
|
@ -92,8 +83,8 @@ elfe_home_config_init(E_Module *m)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
elfe_home_config_shutdown(void)
|
||||
int
|
||||
elfe_home_config_shutdown(void)
|
||||
{
|
||||
e_configure_registry_item_del("illume/elfe");
|
||||
e_configure_registry_category_del("illume");
|
||||
|
@ -107,8 +98,8 @@ elfe_home_config_shutdown(void)
|
|||
return 1;
|
||||
}
|
||||
|
||||
int
|
||||
elfe_home_config_save(void)
|
||||
int
|
||||
elfe_home_config_save(void)
|
||||
{
|
||||
printf("<<<<<<<<<<<<<<<<<<<<<<<<<<<< CONFIG SAVE\n");
|
||||
e_config_domain_save("module.elfe", conf_edd, elfe_home_cfg);
|
||||
|
@ -116,57 +107,6 @@ elfe_home_config_save(void)
|
|||
}
|
||||
|
||||
/* local functions */
|
||||
static void *
|
||||
_elfe_home_config_create(E_Config_Dialog *cfd __UNUSED__)
|
||||
{
|
||||
return NULL;
|
||||
}
|
||||
|
||||
static void
|
||||
_elfe_home_config_free(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_Data *cfdata __UNUSED__)
|
||||
{
|
||||
elfe_home_win_cfg_update();
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
_elfe_home_config_ui(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data *cfdata __UNUSED__)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
static void
|
||||
_elfe_home_config_changed(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
|
||||
{
|
||||
if (_elfe_home_config_change_timer)
|
||||
ecore_timer_del(_elfe_home_config_change_timer);
|
||||
_elfe_home_config_change_timer =
|
||||
ecore_timer_add(0.5, _elfe_home_config_change_timeout, data);
|
||||
}
|
||||
|
||||
static void
|
||||
_elfe_home_config_slider_changed(void *data, Evas_Object *obj __UNUSED__)
|
||||
{
|
||||
if (_elfe_home_config_change_timer)
|
||||
ecore_timer_del(_elfe_home_config_change_timer);
|
||||
_elfe_home_config_change_timer =
|
||||
ecore_timer_add(0.5, _elfe_home_config_change_timeout, data);
|
||||
}
|
||||
|
||||
static void
|
||||
_elfe_home_config_click_changed(void *data, Evas_Object *obj, void *event)
|
||||
{
|
||||
_elfe_home_config_changed(data, obj, event);
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_elfe_home_config_change_timeout(void *data __UNUSED__)
|
||||
{
|
||||
elfe_home_win_cfg_update();
|
||||
e_config_save_queue();
|
||||
_elfe_home_config_change_timer = NULL;
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
||||
void elfe_home_config_desktop_item_add(int desktop,
|
||||
Elfe_Desktop_Item_Type type,
|
||||
int row, int col,
|
||||
|
|
|
@ -54,7 +54,8 @@ void elfe_home_config_desktop_item_add(int desktop,
|
|||
Evas_Coord x, Evas_Coord y,
|
||||
Evas_Coord w, Evas_Coord h,
|
||||
const char *name);
|
||||
|
||||
void elfe_home_config_desktop_item_del(int desktop,
|
||||
int row, int col);
|
||||
|
||||
extern EAPI Elfe_Home_Config *elfe_home_cfg;
|
||||
|
||||
|
|
|
@ -5,10 +5,8 @@
|
|||
#include "utils.h"
|
||||
|
||||
static void
|
||||
_list_longpress(void *data, Evas_Object *obj, void *event_info)
|
||||
_list_longpress(void *data, Evas_Object *obj __UNUSED__, void *event_info)
|
||||
{
|
||||
Evas_Object *ic;
|
||||
E_Gadcon_Client_Class *gcc = NULL;
|
||||
const char *name;
|
||||
Elm_List_Item *it = event_info;
|
||||
|
||||
|
@ -26,7 +24,7 @@ elfe_gadget_list_add(Evas_Object *obj)
|
|||
Evas_Object *list;
|
||||
E_Gadcon_Client_Class *gcc = NULL;
|
||||
Eina_List *l;
|
||||
Evas_Object *icon = NULL, *end;
|
||||
Evas_Object *icon = NULL;
|
||||
const char *lbl = NULL;
|
||||
|
||||
list = elm_list_add(obj);
|
||||
|
|
49
src/main.c
49
src/main.c
|
@ -32,21 +32,11 @@ static Elfe_Home_Win *hwin;
|
|||
static void _elfe_home_win_new(E_Zone *zone);
|
||||
static void _elfe_home_win_cb_free(Elfe_Home_Win *hwin);
|
||||
static void _elfe_home_win_cb_resize(E_Win *win);
|
||||
|
||||
static Eina_Bool _elfe_home_update_deferred(void *data __UNUSED__);
|
||||
static Eina_Bool _elfe_home_desktop_cache_update(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__);
|
||||
static Eina_Bool _elfe_home_cb_border_add(void *data __UNUSED__, int type __UNUSED__, void *event);
|
||||
static Eina_Bool _elfe_home_cb_border_del(void *data __UNUSED__, int type __UNUSED__, void *event);
|
||||
static Eina_Bool _elfe_home_cb_exe_del(void *data __UNUSED__, int type __UNUSED__, void *event);
|
||||
static Eina_Bool _elfe_home_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void *event);
|
||||
static Eina_Bool _elfe_home_cb_prop_change(void *data __UNUSED__, int type __UNUSED__, void *event);
|
||||
static Eina_Bool _elfe_home_cb_bg_change(void *data __UNUSED__, int type __UNUSED__, void *event);
|
||||
static Eina_Bool _elfe_home_cb_bg_change(void *data __UNUSED__, int type, void *event __UNUSED__);
|
||||
|
||||
/* local variables */
|
||||
static Eina_List *hwins = NULL;
|
||||
static Eina_List *hdls = NULL;
|
||||
static Eina_List *exes = NULL;
|
||||
static Ecore_Timer *defer = NULL;
|
||||
|
||||
/* public functions */
|
||||
EAPI E_Module_Api e_modapi = { E_MODULE_API_VERSION, "Illume Home" };
|
||||
|
@ -134,7 +124,6 @@ _elfe_home_win_new(E_Zone *zone)
|
|||
char buf[PATH_MAX];
|
||||
const char *bgfile;
|
||||
Elm_Theme *theme;
|
||||
Evas_Object *winlist;
|
||||
Evas_Object *o_edje;
|
||||
const char *file;
|
||||
|
||||
|
@ -235,42 +224,6 @@ _elfe_home_win_cb_resize(E_Win *win)
|
|||
if (hwin->layout) evas_object_resize(hwin->layout, win->w, win->h);
|
||||
}
|
||||
|
||||
|
||||
static Eina_Bool
|
||||
_elfe_home_cb_client_message(void *data __UNUSED__, int type __UNUSED__, void *event)
|
||||
{
|
||||
Ecore_X_Event_Client_Message *ev;
|
||||
|
||||
ev = event;
|
||||
if (ev->message_type == ECORE_X_ATOM_E_ILLUME_HOME_NEW)
|
||||
{
|
||||
E_Zone *zone;
|
||||
|
||||
zone = e_util_zone_window_find(ev->win);
|
||||
if (zone->black_win != ev->win) return ECORE_CALLBACK_PASS_ON;
|
||||
_elfe_home_win_new(zone);
|
||||
}
|
||||
else if (ev->message_type == ECORE_X_ATOM_E_ILLUME_HOME_DEL)
|
||||
{
|
||||
E_Border *bd;
|
||||
Eina_List *l;
|
||||
Elfe_Home_Win *hwin;
|
||||
|
||||
if (!(bd = e_border_find_by_client_window(ev->win))) return ECORE_CALLBACK_PASS_ON;
|
||||
EINA_LIST_FOREACH(hwins, l, hwin)
|
||||
{
|
||||
if (hwin->win->border == bd)
|
||||
{
|
||||
hwins = eina_list_remove_list(hwins, hwins);
|
||||
e_object_del(E_OBJECT(hwin));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
}
|
||||
|
||||
|
||||
static Eina_Bool
|
||||
_elfe_home_cb_bg_change(void *data __UNUSED__, int type, void *event __UNUSED__)
|
||||
{
|
||||
|
|
|
@ -190,7 +190,7 @@ e_winilist_optimial_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
|
|||
|
||||
/* internal calls */
|
||||
static void
|
||||
_cb_item_sel(void *data, Evas_Object *obj, void *event_info)
|
||||
_cb_item_sel(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Data *d;
|
||||
|
||||
|
@ -202,7 +202,7 @@ _cb_item_sel(void *data, Evas_Object *obj, void *event_info)
|
|||
}
|
||||
|
||||
static void
|
||||
_cb_special_sel(void *data, Evas_Object *obj, void *event_info)
|
||||
_cb_special_sel(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Special *s;
|
||||
|
||||
|
@ -278,7 +278,6 @@ static void
|
|||
_cb_object_resize(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
|
||||
{
|
||||
Data *d;
|
||||
Evas_Coord lw, lh, vw, vh;
|
||||
|
||||
d = evas_object_data_get(obj, "..[winilist]");
|
||||
if (!d) return;
|
||||
|
@ -288,7 +287,6 @@ _cb_object_resize(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, v
|
|||
static void
|
||||
_refill(Data *d)
|
||||
{
|
||||
Evas_Coord w, h, lw, lh, vw, vh;
|
||||
Eina_List *borders, *l, *l2, *l3;
|
||||
|
||||
borders = e_border_client_list();
|
||||
|
|
Loading…
Reference in New Issue