forked from enlightenment/enlightenment
Cleanup.
- Remove unused variables. - Add const where needed. - Add return values. SVN revision: 26002
This commit is contained in:
parent
bed170b77c
commit
4e81527304
|
@ -364,8 +364,8 @@ struct _E_Config_Shelf
|
|||
|
||||
struct _E_Config_Mime_Icon
|
||||
{
|
||||
char *mime;
|
||||
char *icon;
|
||||
const char *mime;
|
||||
const char *icon;
|
||||
};
|
||||
|
||||
EAPI int e_config_init(void);
|
||||
|
|
|
@ -60,7 +60,7 @@ e_eap_edit_show(E_Container *con, E_App *a)
|
|||
E_Config_Dialog_View *v;
|
||||
E_App_Edit *editor;
|
||||
|
||||
if (!con) return;
|
||||
if (!con) return NULL;
|
||||
|
||||
editor = E_OBJECT_ALLOC(E_App_Edit, E_EAP_EDIT_TYPE, _e_eap_edit_free);
|
||||
if (!editor) return NULL;
|
||||
|
@ -273,7 +273,7 @@ _e_eap_edit_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dial
|
|||
{
|
||||
E_App_Edit *editor;
|
||||
E_App *eap;
|
||||
Evas_Object *ol, *o, *mt;
|
||||
Evas_Object *ol, *o;
|
||||
Evas_Object *entry;
|
||||
|
||||
editor = data->editor;
|
||||
|
|
|
@ -908,7 +908,7 @@ _e_editable_cursor_update(Evas_Object *editable)
|
|||
E_Editable_Smart_Data *sd;
|
||||
Evas_Object *text_obj;
|
||||
Evas_Coord tx, ty;
|
||||
Evas_Coord cx, cy, cw, ch;
|
||||
Evas_Coord cx, cy, ch;
|
||||
|
||||
if ((!editable) || (!(sd = evas_object_smart_data_get(editable))))
|
||||
return;
|
||||
|
@ -939,7 +939,7 @@ _e_editable_selection_update(Evas_Object *editable)
|
|||
E_Editable_Smart_Data *sd;
|
||||
Evas_Object *text_obj;
|
||||
Evas_Coord tx, ty;
|
||||
Evas_Coord cx, cy, cw, ch;
|
||||
Evas_Coord cx, cy;
|
||||
Evas_Coord sx, sy, sw, sh;
|
||||
int start_pos, end_pos;
|
||||
|
||||
|
|
|
@ -383,7 +383,6 @@ _e_entry_x_selection_notify_handler(void *data, int type, void *event)
|
|||
Evas_Object *entry;
|
||||
E_Entry_Smart_Data *sd;
|
||||
Ecore_X_Event_Selection_Notify *ev;
|
||||
Ecore_X_Selection_Data *selection_data;
|
||||
Evas_Object *editable;
|
||||
int cursor_pos, selection_pos;
|
||||
int start_pos, end_pos;
|
||||
|
|
|
@ -432,7 +432,7 @@ static void
|
|||
_e_exebuf_exec_term(void)
|
||||
{
|
||||
char tmp[EXEBUFLEN];
|
||||
char *active_cmd;
|
||||
const char *active_cmd;
|
||||
|
||||
if (exe_sel)
|
||||
{
|
||||
|
|
|
@ -160,7 +160,7 @@ static void _e_fm2_typebuf_history_next(Evas_Object *obj);
|
|||
static void _e_fm2_typebuf_run(Evas_Object *obj);
|
||||
static void _e_fm2_typebuf_match(Evas_Object *obj);
|
||||
static void _e_fm2_typebuf_complete(Evas_Object *obj);
|
||||
static void _e_fm2_typebuf_char_append(Evas_Object *obj, char *ch);
|
||||
static void _e_fm2_typebuf_char_append(Evas_Object *obj, const char *ch);
|
||||
static void _e_fm2_typebuf_char_backspace(Evas_Object *obj);
|
||||
|
||||
static void _e_fm2_cb_dnd_enter(void *data, const char *type, void *event);
|
||||
|
@ -1855,7 +1855,7 @@ _e_fm2_icon_desktop_url_eval(const char *val)
|
|||
static int
|
||||
_e_fm2_icon_desktop_load(E_Fm2_Icon *ic)
|
||||
{
|
||||
char buf[4096], key[256], val[4096];
|
||||
char buf[4096];
|
||||
Ecore_Desktop *desktop;
|
||||
|
||||
if (ic->info.pseudo_link)
|
||||
|
@ -2289,7 +2289,7 @@ _e_fm2_typebuf_complete(Evas_Object *obj)
|
|||
}
|
||||
|
||||
static void
|
||||
_e_fm2_typebuf_char_append(Evas_Object *obj, char *ch)
|
||||
_e_fm2_typebuf_char_append(Evas_Object *obj, const char *ch)
|
||||
{
|
||||
E_Fm2_Smart_Data *sd;
|
||||
char *ts;
|
||||
|
@ -2343,7 +2343,7 @@ _e_fm2_dnd_drop_into_show(E_Fm2_Icon *ic)
|
|||
|
||||
/* FIXME: prototype + reposition + implement */
|
||||
static void
|
||||
_e_fm2_dnd_drop_into_hide(Evas_Object *obj)
|
||||
_e_fm2_dnd_drop_into_hide(E_Fm2_Icon *ic)
|
||||
{
|
||||
}
|
||||
|
||||
|
@ -2355,7 +2355,7 @@ _e_fm2_dnd_drop_between_show(E_Fm2_Icon *ic, int after)
|
|||
|
||||
/* FIXME: prototype + reposition + implement */
|
||||
static void
|
||||
_e_fm2_dnd_drop_between_hide(Evas_Object *obj)
|
||||
_e_fm2_dnd_drop_between_hide(E_Fm2_Icon *ic)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
@ -57,7 +57,6 @@ typedef struct _E_Layout_Item_Container E_Layout_Item_Container;
|
|||
static void _e_gadcon_client_current_position_sync(E_Gadcon_Client *gcc);
|
||||
static void _e_gadcon_layout_smart_sync_clients(E_Gadcon *gc);
|
||||
static void _e_gadcon_layout_smart_gadcon_position_shrinked_mode(E_Smart_Data *sd);
|
||||
static void _e_gadcon_layout_smart_gadcon_clients_save(E_Smart_Data *sd);
|
||||
static void _e_gadcon_layout_smart_gadcons_asked_position_set(E_Smart_Data *sd);
|
||||
static Evas_List *_e_gadcon_layout_smart_gadcons_wrap(E_Smart_Data *sd);
|
||||
static void _e_gadcon_layout_smart_gadcons_position(E_Smart_Data *sd, Evas_List **list);
|
||||
|
@ -1005,8 +1004,7 @@ static void
|
|||
_e_gadcon_client_cb_menu_autoscroll(void *data, E_Menu *m, E_Menu_Item *mi)
|
||||
{
|
||||
E_Gadcon_Client *gcc;
|
||||
E_Gadcon *gc;
|
||||
|
||||
|
||||
gcc = data;
|
||||
e_gadcon_layout_freeze(gcc->gadcon->o_container);
|
||||
if (gcc->autoscroll) gcc->autoscroll = 0;
|
||||
|
@ -2338,8 +2336,8 @@ _e_gadcon_layout_smart_item_del_hook(void *data, Evas *e, Evas_Object *obj, void
|
|||
static void
|
||||
_e_gadcon_layout_smart_reconfigure(E_Smart_Data *sd)
|
||||
{
|
||||
Evas_Coord x, y, w, h, xx, yy;
|
||||
Evas_List *l, *l2;
|
||||
Evas_Coord xx, yy;
|
||||
Evas_List *l;
|
||||
int min, mino, cur;
|
||||
Evas_List *list = NULL;
|
||||
E_Gadcon_Layout_Item *bi;
|
||||
|
@ -2766,7 +2764,6 @@ static int
|
|||
_e_gadcon_layout_smart_width_smart_sort_reverse_cb(void *d1, void *d2)
|
||||
{
|
||||
E_Gadcon_Layout_Item *bi, *bi2;
|
||||
int v1, v2;
|
||||
|
||||
bi = evas_object_data_get(d1, "e_gadcon_layout_data");
|
||||
bi2 = evas_object_data_get(d2, "e_gadcon_layout_data");
|
||||
|
@ -3201,7 +3198,6 @@ _e_gadcon_layout_smart_gadcons_asked_position_set(E_Smart_Data *sd)
|
|||
{
|
||||
E_Gadcon_Layout_Item *bi;
|
||||
Evas_List *l;
|
||||
int xx, yy;
|
||||
|
||||
for (l = sd->items; l; l = l->next)
|
||||
{
|
||||
|
@ -3637,7 +3633,7 @@ _e_gadcon_layout_smart_gadcons_position(E_Smart_Data *sd, Evas_List **list)
|
|||
if (!l2) l2 = *list;
|
||||
else l2 = l2->next;
|
||||
|
||||
for (l2; l2 != l; l2 = l2->next)
|
||||
for (; l2 != l; l2 = l2->next)
|
||||
{
|
||||
lc = l2->data;
|
||||
lc->pos = new_pos;
|
||||
|
|
|
@ -399,7 +399,6 @@ _cb_button_add(void *data1, void *data2)
|
|||
E_Fm2_Icon_Info *ici;
|
||||
const char *realpath;
|
||||
char buf[4096];
|
||||
E_App *a, *parent;
|
||||
|
||||
cfdata = data1;
|
||||
if (!cfdata->gui.o_fm_all) return;
|
||||
|
@ -498,10 +497,8 @@ static Evas_Object *
|
|||
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
struct _E_Config_Once *once = NULL;
|
||||
Evas_Object *o, *of, *ob, *ot, *ilist, *mt;
|
||||
Evas_List *l;
|
||||
Evas_Object *o, *of, *ob, *ot, *mt;
|
||||
E_Fm2_Config fmc_all, fmc;
|
||||
int i;
|
||||
|
||||
if (cfdata->cfd->data)
|
||||
once = cfdata->cfd->data;
|
||||
|
@ -674,7 +671,6 @@ _move_file_up_in_order(const char *order, const char *file)
|
|||
{
|
||||
char buf[4096];
|
||||
Evas_List *list = NULL, *l;
|
||||
int ret = 0;
|
||||
FILE *f;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/.order", order);
|
||||
|
@ -734,7 +730,6 @@ _move_file_down_in_order(const char *order, const char *file)
|
|||
{
|
||||
char buf[4096], *last;
|
||||
Evas_List *list = NULL, *l;
|
||||
int ret = 0;
|
||||
FILE *f;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/.order", order);
|
||||
|
@ -805,7 +800,6 @@ _append_to_order(const char *order, const char *file)
|
|||
{
|
||||
char buf[4096];
|
||||
Evas_List *list = NULL, *l;
|
||||
int ret = 0;
|
||||
FILE *f;
|
||||
|
||||
snprintf(buf, sizeof(buf), "%s/.order", order);
|
||||
|
|
|
@ -272,7 +272,6 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
|
|||
{
|
||||
Evas_Object *o, *ilist;
|
||||
Evas_List *l;
|
||||
E_Fm2_Config fmc;
|
||||
int i;
|
||||
|
||||
o = e_widget_list_add(evas, 1, 0);
|
||||
|
|
|
@ -445,7 +445,6 @@ _auto_apply_changes(E_Config_Dialog_Data *cfdata)
|
|||
{
|
||||
char *n;
|
||||
const char *action;
|
||||
int i;
|
||||
E_Config_Binding_Mouse *eb;
|
||||
E_Config_Binding_Wheel *bw;
|
||||
|
||||
|
@ -669,7 +668,6 @@ _update_buttons(E_Config_Dialog_Data *cfdata)
|
|||
static void
|
||||
_update_binding_context(E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
int found = 0;
|
||||
char *n;
|
||||
E_Config_Binding_Mouse *eb;
|
||||
E_Config_Binding_Wheel *bw;
|
||||
|
@ -845,7 +843,6 @@ _action_change_cb(void *data)
|
|||
static void
|
||||
_binding_change_cb(void *data)
|
||||
{
|
||||
char *n;
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
|
||||
cfdata = data;
|
||||
|
@ -853,7 +850,7 @@ _binding_change_cb(void *data)
|
|||
_auto_apply_changes(cfdata);
|
||||
|
||||
if (cfdata->locals.cur) free(cfdata->locals.cur);
|
||||
cfdata->locals.cur == NULL;
|
||||
cfdata->locals.cur = NULL;
|
||||
|
||||
if (cfdata->locals.binding[0])
|
||||
cfdata->locals.cur = strdup(cfdata->locals.binding);
|
||||
|
@ -1000,7 +997,6 @@ _delete_mouse_binding_cb(void *data, void *data2)
|
|||
static void
|
||||
_restore_default_cb(void *data, void *data2)
|
||||
{
|
||||
Evas_List *l;
|
||||
E_Config_Binding_Mouse *eb;
|
||||
E_Config_Binding_Wheel *bw;
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
|
@ -1101,10 +1097,9 @@ _restore_default_cb(void *data, void *data2)
|
|||
static int
|
||||
_grab_mouse_down_cb(void *data, int type, void *event)
|
||||
{
|
||||
Evas_List *l;
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
E_Config_Binding_Mouse *eb;
|
||||
int mod = E_BINDING_MODIFIER_NONE, found = 0;
|
||||
int mod = E_BINDING_MODIFIER_NONE;
|
||||
Ecore_X_Event_Mouse_Button_Down *ev = event;
|
||||
|
||||
cfdata = data;
|
||||
|
@ -1152,11 +1147,10 @@ _grab_mouse_down_cb(void *data, int type, void *event)
|
|||
}
|
||||
static int _grab_mouse_wheel_cb(void *data, int type, void *event)
|
||||
{
|
||||
Evas_List *l;
|
||||
E_Config_Binding_Wheel *bw;
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
Ecore_X_Event_Mouse_Wheel *ev = event;
|
||||
int mod = E_BINDING_MODIFIER_NONE, found = 0;
|
||||
int mod = E_BINDING_MODIFIER_NONE;
|
||||
|
||||
cfdata = data;
|
||||
|
||||
|
@ -1223,6 +1217,7 @@ _grab_key_down_cb(void *data, int type, void *event)
|
|||
{
|
||||
_grab_wnd_hide_cb(cfdata);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
static void
|
||||
_grab_wnd_hide_cb(E_Config_Dialog_Data *cfdata)
|
||||
|
|
|
@ -4,7 +4,6 @@ static void *_create_data(E_Config_Dialog *cfd);
|
|||
static void _free_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static int _basic_apply_data(E_Config_Dialog *cfd, E_Config_Dialog_Data *cfdata);
|
||||
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata);
|
||||
static void _load_inits(E_Config_Dialog *cfd, Evas_Object *il);
|
||||
void _ilist_cb_init_selected(void *data);
|
||||
|
||||
struct _E_Config_Dialog_Data
|
||||
|
|
|
@ -240,8 +240,7 @@ _theme_import_cb_ok(void *data, void *data2)
|
|||
const char *file;
|
||||
char *homedir;
|
||||
char buf[4096];
|
||||
int is_theme;
|
||||
|
||||
|
||||
win = data;
|
||||
import = win->data;
|
||||
if (!import) return;
|
||||
|
|
|
@ -570,7 +570,6 @@ _e_int_menus_apps_drag(void *data, E_Menu *m, E_Menu_Item *mi)
|
|||
E_Drag *drag;
|
||||
Evas_Object *o = NULL;
|
||||
Evas_Coord x, y, w, h;
|
||||
const char *file = NULL, *part = NULL;
|
||||
const char *drag_types[] = { "enlightenment/eapp" };
|
||||
|
||||
evas_object_geometry_get(mi->icon_object,
|
||||
|
|
Loading…
Reference in New Issue