e: massiv warning cleanup !

SVN revision: 70756
This commit is contained in:
Cedric BAIL 2012-05-04 09:38:52 +00:00
parent 2d0970da9a
commit c2a29811d5
50 changed files with 653 additions and 667 deletions

View File

@ -176,32 +176,32 @@ typedef struct _E_Rect E_Rect;
while (0) while (0)
# define E_CLAMP(x, min, max) (x < min ? min : (x > max ? max : x)) # define E_CLAMP(x, min, max) (x < min ? min : (x > max ? max : x))
# define E_RECTS_CLIP_TO_RECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch) \ # define E_RECTS_CLIP_TO_RECT(_x, _y, _w, _h, _cx, _cy, _cw, _ch) \
{ \ { \
if (E_INTERSECTS(_x, _y, _w, _h, _cx, _cy, _cw, _ch)) \ if (E_INTERSECTS(_x, _y, _w, _h, _cx, _cy, _cw, _ch)) \
{ \ { \
if (_x < (_cx)) \ if ((int) _x < (int)(_cx)) \
{ \ { \
_w += _x - (_cx); \ _w += _x - (_cx); \
_x = (_cx); \ _x = (_cx); \
if ((int)_w < 0) _w = 0; \ if ((int)_w < 0) _w = 0; \
} \ } \
if ((_x + _w) > ((_cx) + (_cw))) \ if ((int) (_x + _w) > (int) ((_cx) + (_cw))) \
_w = (_cx) + (_cw) - _x; \ _w = (_cx) + (_cw) - _x; \
if (_y < (_cy)) \ if ((int) _y < (int) (_cy)) \
{ \ { \
_h += _y - (_cy); \ _h += _y - (_cy); \
_y = (_cy); \ _y = (_cy); \
if ((int)_h < 0) _h = 0; \ if ((int)_h < 0) _h = 0; \
} \ } \
if ((_y + _h) > ((_cy) + (_ch))) \ if ((int) (_y + _h) > (int) ((_cy) + (_ch))) \
_h = (_cy) + (_ch) - _y; \ _h = (_cy) + (_ch) - _y; \
} \ } \
else \ else \
{ \ { \
_w = 0; _h = 0; \ _w = 0; _h = 0; \
} \ } \
} }
# define E_REMOTE_OPTIONS 1 # define E_REMOTE_OPTIONS 1
# define E_REMOTE_OUT 2 # define E_REMOTE_OUT 2

View File

@ -220,7 +220,7 @@ e_config_init(void)
#define D _e_config_gadcon_edd #define D _e_config_gadcon_edd
E_CONFIG_VAL(D, T, name, STR); E_CONFIG_VAL(D, T, name, STR);
E_CONFIG_VAL(D, T, id, INT); E_CONFIG_VAL(D, T, id, INT);
E_CONFIG_VAL(D, T, zone, INT); E_CONFIG_VAL(D, T, zone, UINT);
E_CONFIG_LIST(D, T, clients, _e_config_gadcon_client_edd); E_CONFIG_LIST(D, T, clients, _e_config_gadcon_client_edd);
_e_config_shelf_desk_edd = E_CONFIG_DD_NEW("E_Config_Shelf_Desk", E_Config_Shelf_Desk); _e_config_shelf_desk_edd = E_CONFIG_DD_NEW("E_Config_Shelf_Desk", E_Config_Shelf_Desk);

View File

@ -471,10 +471,10 @@ struct _E_Config_Desktop_Name
struct _E_Config_Gadcon struct _E_Config_Gadcon
{ {
const char *name; const char *name;
int id; int id;
int zone; unsigned int zone;
Eina_List *clients; Eina_List *clients;
}; };
struct _E_Config_Gadcon_Client struct _E_Config_Gadcon_Client

View File

@ -318,25 +318,26 @@ EAPI void e_gadcon_client_add_location_menu(E_Gadcon_Client *gcc, E_Menu *menu);
#define GADCON_CLIENT_CONFIG_GET(_type, _items, _gc_class, _id) \ #define GADCON_CLIENT_CONFIG_GET(_type, _items, _gc_class, _id) \
if (!_id) \ if (!_id) \
{ \ { \
char buf[128]; \ char *_buf; \
int num = 0; \ int _num = 0; \
_type *ci; \ _type *_ci; \
if (_items) \ if (_items) \
{ \ { \
const char *p; \ const char *_p; \
ci = eina_list_last(_items)->data; \ _ci = eina_list_last(_items)->data; \
p = strrchr (ci->id, '.'); \ _p = strrchr (_ci->id, '.'); \
if (p) num = atoi (p + 1) + 1; \ if (_p) _num = atoi (_p + 1) + 1; \
} \ } \
snprintf (buf, sizeof (buf), "%s.%d", _gc_class.name, num); \ _buf = alloca(sizeof (char) * ((_gc_class.name ? strlen( _gc_class.name) : 6) + 11)); \
_id = buf; \ sprintf (_buf, "%s.%d", _gc_class.name, _num); \
_id = _buf; \
} \ } \
else \ else \
{ \ { \
Eina_List *l; \ Eina_List *l; \
_type *ci; \ _type *_ci; \
EINA_LIST_FOREACH(_items, l, ci) \ EINA_LIST_FOREACH(_items, l, _ci) \
if ((ci->id) && (!strcmp(ci->id, id))) return ci; \ if ((_ci->id) && (!strcmp(_ci->id, _id))) return _ci; \
} }
#endif #endif

View File

@ -142,14 +142,12 @@ _backlight_input_win_key_down_cb(void *data, int type __UNUSED__, void *event)
else else
{ {
Eina_List *l; Eina_List *l;
E_Config_Binding_Key *bind; E_Config_Binding_Key *binding;
E_Binding_Modifier mod; E_Binding_Modifier mod;
for (l = e_config->key_bindings; l; l = l->next) EINA_LIST_FOREACH(e_config->key_bindings, l, binding)
{ {
bind = l->data; if (binding->action && strcmp(binding->action, "backlight")) continue;
if (bind->action && strcmp(bind->action, "backlight")) continue;
mod = 0; mod = 0;
@ -162,8 +160,8 @@ _backlight_input_win_key_down_cb(void *data, int type __UNUSED__, void *event)
if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN)
mod |= E_BINDING_MODIFIER_WIN; mod |= E_BINDING_MODIFIER_WIN;
if (bind->key && (!strcmp(bind->key, ev->keyname)) && if (binding->key && (!strcmp(binding->key, ev->keyname)) &&
((bind->modifiers == (int)mod) || (bind->any_mod))) ((binding->modifiers == mod) || (binding->any_mod)))
{ {
_backlight_popup_free(inst); _backlight_popup_free(inst);
break; break;

View File

@ -997,26 +997,25 @@ linux_acpi_cb_event_fd_active(void *data __UNUSED__,
static void static void
linux_acpi_init(void) linux_acpi_init(void)
{ {
Eina_List *powers; Eina_Iterator *powers;
Eina_List *bats; Eina_Iterator *bats;
bats = ecore_file_ls("/proc/acpi/battery"); bats = eina_file_direct_ls("/proc/acpi/battery");
if (bats) if (bats)
{ {
char *name; Eina_File_Direct_Info *info;
have_power = 0; have_power = 0;
powers = ecore_file_ls("/proc/acpi/ac_adapter"); powers = eina_file_direct_ls("/proc/acpi/ac_adapter");
if (powers) if (powers)
{ {
char *name; EINA_ITERATOR_FOREACH(powers, info)
EINA_LIST_FREE(powers, name)
{ {
char buf[4096]; char buf[4096];
FILE *f; FILE *f;
snprintf(buf, sizeof(buf), "/proc/acpi/ac_adapter/%s/state", name); strcpy(buf, info->path);
strcat(buf, "/state");
f = fopen(buf, "r"); f = fopen(buf, "r");
if (f) if (f)
{ {
@ -1030,21 +1029,22 @@ linux_acpi_init(void)
if (!strcmp(tmp, "on-line")) have_power = 1; if (!strcmp(tmp, "on-line")) have_power = 1;
free(tmp); free(tmp);
} }
fclose(f);
} }
free(name);
} }
eina_iterator_free(powers);
} }
have_battery = 0; have_battery = 0;
acpi_max_full = 0; acpi_max_full = 0;
acpi_max_design = 0; acpi_max_design = 0;
EINA_LIST_FREE(bats, name) EINA_ITERATOR_FOREACH(bats, info)
{ {
char buf[4096]; char buf[4096];
FILE *f; FILE *f;
snprintf(buf, sizeof(buf), "/proc/acpi/battery/%s/info", name); strcpy(buf, info->path);
strcat(buf, "/info");
f = fopen(buf, "r"); f = fopen(buf, "r");
if (f) if (f)
{ {
@ -1076,9 +1076,9 @@ linux_acpi_init(void)
} }
fclose(f); fclose(f);
} }
free(name);
} }
eina_iterator_free(bats);
} }
if (!acpid) if (!acpid)
{ {

View File

@ -229,15 +229,15 @@ _battery_face_level_set(Evas_Object *battery, double level)
} }
static void static void
_battery_face_time_set(Evas_Object *battery, int time) _battery_face_time_set(Evas_Object *battery, int t)
{ {
char buf[256]; char buf[256];
int hrs, mins; int hrs, mins;
if (time < 0) return; if (t < 0) return;
hrs = (time / 3600); hrs = (t / 3600);
mins = ((time) / 60 - (hrs * 60)); mins = ((t) / 60 - (hrs * 60));
if (hrs < 0) hrs = 0; if (hrs < 0) hrs = 0;
if (mins < 0) mins = 0; if (mins < 0) mins = 0;
snprintf(buf, sizeof(buf), "%i:%02i", hrs, mins); snprintf(buf, sizeof(buf), "%i:%02i", hrs, mins);
@ -426,7 +426,7 @@ _battery_warning_popup_destroy(Instance *inst)
} }
static void static void
_battery_warning_popup(Instance *inst, int time, double percent) _battery_warning_popup(Instance *inst, int t, double percent)
{ {
Evas *e = NULL; Evas *e = NULL;
Evas_Object *rect = NULL, *popup_bg = NULL; Evas_Object *rect = NULL, *popup_bg = NULL;
@ -499,7 +499,7 @@ _battery_warning_popup(Instance *inst, int time, double percent)
evas_object_show(rect); evas_object_show(rect);
} }
_battery_face_time_set(inst->popup_battery, time); _battery_face_time_set(inst->popup_battery, t);
_battery_face_level_set(inst->popup_battery, percent); _battery_face_level_set(inst->popup_battery, percent);
edje_object_signal_emit(inst->popup_battery, "e,state,discharging", "e"); edje_object_signal_emit(inst->popup_battery, "e,state,discharging", "e");
@ -513,7 +513,7 @@ _battery_warning_popup(Instance *inst, int time, double percent)
} }
static Eina_Bool static Eina_Bool
_powersave_cb_config_update(void *data, int type, void *event) _powersave_cb_config_update(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
{ {
if (!battery_config->have_battery) if (!battery_config->have_battery)
e_powersave_mode_set(E_POWERSAVE_MODE_LOW); e_powersave_mode_set(E_POWERSAVE_MODE_LOW);

View File

@ -199,7 +199,7 @@ static void
_battery_udev_battery_update(const char *syspath, Battery *bat) _battery_udev_battery_update(const char *syspath, Battery *bat)
{ {
const char *test; const char *test;
double time, charge; double t, charge;
if (!bat) if (!bat)
{ {
@ -233,10 +233,10 @@ _battery_udev_battery_update(const char *syspath, Battery *bat)
charge = strtod(test, NULL); charge = strtod(test, NULL);
eina_stringshare_del(test); eina_stringshare_del(test);
time = ecore_time_get(); t = ecore_time_get();
if ((bat->got_prop) && (charge != bat->current_charge)) if ((bat->got_prop) && (charge != bat->current_charge))
bat->charge_rate = ((charge - bat->current_charge) / (time - bat->last_update)); bat->charge_rate = ((charge - bat->current_charge) / (t - bat->last_update));
bat->last_update = time; bat->last_update = t;
bat->current_charge = charge; bat->current_charge = charge;
bat->percent = 100 * (bat->current_charge / bat->last_full_charge); bat->percent = 100 * (bat->current_charge / bat->last_full_charge);
if (bat->got_prop) if (bat->got_prop)

View File

@ -485,11 +485,11 @@ _e_mod_comp_win_update(E_Comp_Win *cw)
{ {
for (i = 0; i < cw->rects_num; i++) for (i = 0; i < cw->rects_num; i++)
{ {
E_RECTS_CLIP_TO_RECT(cw->rects[i].x, E_RECTS_CLIP_TO_RECT(cw->rects[i].x,
cw->rects[i].y, cw->rects[i].y,
cw->rects[i].width, cw->rects[i].width,
cw->rects[i].height, cw->rects[i].height,
0, 0, cw->w, cw->h); 0, 0, (int) cw->w, (int) cw->h);
} }
} }
if (!_e_mod_comp_win_shaped_check(cw, cw->rects, cw->rects_num)) if (!_e_mod_comp_win_shaped_check(cw, cw->rects, cw->rects_num))
@ -1810,7 +1810,7 @@ _e_mod_comp_win_add(E_Comp *c,
for (i = 0; i < num; i++) for (i = 0; i < num; i++)
E_RECTS_CLIP_TO_RECT(rects[i].x, rects[i].y, E_RECTS_CLIP_TO_RECT(rects[i].x, rects[i].y,
rects[i].width, rects[i].height, rects[i].width, rects[i].height,
0, 0, att.w, att.h); 0, 0, (int) att.w, (int) att.h);
if (_e_mod_comp_shaped_check(att.w, att.h, rects, num)) if (_e_mod_comp_shaped_check(att.w, att.h, rects, num))
cw->shape_changed = 1; cw->shape_changed = 1;
@ -2648,7 +2648,7 @@ _e_mod_comp_message(void *data __UNUSED__,
if (ev->message_type == ECORE_X_ATOM_NET_WM_WINDOW_OPACITY) if (ev->message_type == ECORE_X_ATOM_NET_WM_WINDOW_OPACITY)
{ {
E_Comp_Win *cw = _e_mod_comp_win_find(ev->win); cw = _e_mod_comp_win_find(ev->win);
if (!cw) return ECORE_CALLBACK_PASS_ON; if (!cw) return ECORE_CALLBACK_PASS_ON;
_e_mod_comp_win_opacity_set(cw); _e_mod_comp_win_opacity_set(cw);
return ECORE_CALLBACK_PASS_ON; return ECORE_CALLBACK_PASS_ON;

View File

@ -432,8 +432,8 @@ _load_mimes(E_Config_Dialog_Data *cfdata, char *file)
FILE *f; FILE *f;
char buf[4096], mimetype[4096], ext[4096]; char buf[4096], mimetype[4096], ext[4096];
char *p, *pp; char *p, *pp;
Config_Mime *mime; Config_Mime *config_mime;
Config_Glob *glob; Config_Glob *config_glob;
if (!cfdata) return; if (!cfdata) return;
@ -458,32 +458,32 @@ _load_mimes(E_Config_Dialog_Data *cfdata, char *file)
while (!isblank(*p) && (*p != 0) && (*p != '\n')) p++; while (!isblank(*p) && (*p != 0) && (*p != '\n')) p++;
strncpy(ext, pp, (p - pp)); strncpy(ext, pp, (p - pp));
ext[p - pp] = 0; ext[p - pp] = 0;
mime = _find_mime(cfdata, mimetype); config_mime = _find_mime(cfdata, mimetype);
if (!mime) if (!config_mime)
{ {
mime = E_NEW(Config_Mime, 1); config_mime = E_NEW(Config_Mime, 1);
if (mime) if (config_mime)
{ {
mime->mime = eina_stringshare_add(mimetype); config_mime->mime = eina_stringshare_add(mimetype);
if (!mime->mime) if (!config_mime->mime)
free(mime); free(config_mime);
else else
{ {
glob = E_NEW(Config_Glob, 1); config_glob = E_NEW(Config_Glob, 1);
glob->name = eina_stringshare_add(ext); config_glob->name = eina_stringshare_add(ext);
mime->globs = eina_list_append(mime->globs, glob); config_mime->globs = eina_list_append(config_mime->globs, config_glob);
cfdata->mimes = eina_list_append(cfdata->mimes, mime); cfdata->mimes = eina_list_append(cfdata->mimes, config_mime);
} }
} }
} }
else else
{ {
glob = _find_glob(mime, ext); config_glob = _find_glob(config_mime, ext);
if (!glob) if (!config_glob)
{ {
glob = E_NEW(Config_Glob, 1); config_glob = E_NEW(Config_Glob, 1);
glob->name = eina_stringshare_add(ext); config_glob->name = eina_stringshare_add(ext);
mime->globs = eina_list_append(mime->globs, glob); config_mime->globs = eina_list_append(config_mime->globs, config_glob);
} }
} }
} }
@ -498,8 +498,8 @@ _load_globs(E_Config_Dialog_Data *cfdata, char *file)
FILE *f; FILE *f;
char buf[4096], mimetype[4096], ext[4096]; char buf[4096], mimetype[4096], ext[4096];
char *p, *pp; char *p, *pp;
Config_Mime *mime; Config_Mime *config_mime;
Config_Glob *glob; Config_Glob *config_glob;
if (!cfdata) return; if (!cfdata) return;
@ -525,32 +525,32 @@ _load_globs(E_Config_Dialog_Data *cfdata, char *file)
p++; p++;
} }
*pp = 0; *pp = 0;
mime = _find_mime(cfdata, mimetype); config_mime = _find_mime(cfdata, mimetype);
if (!mime) if (!config_mime)
{ {
mime = E_NEW(Config_Mime, 1); config_mime = E_NEW(Config_Mime, 1);
if (mime) if (config_mime)
{ {
mime->mime = eina_stringshare_add(mimetype); config_mime->mime = eina_stringshare_add(mimetype);
if (!mime->mime) if (!config_mime->mime)
free(mime); free(config_mime);
else else
{ {
glob = E_NEW(Config_Glob, 1); config_glob = E_NEW(Config_Glob, 1);
glob->name = eina_stringshare_add(ext); config_glob->name = eina_stringshare_add(ext);
mime->globs = eina_list_append(mime->globs, glob); config_mime->globs = eina_list_append(config_mime->globs, config_glob);
cfdata->mimes = eina_list_append(cfdata->mimes, mime); cfdata->mimes = eina_list_append(cfdata->mimes, config_mime);
} }
} }
} }
else else
{ {
glob = _find_glob(mime, ext); config_glob = _find_glob(config_mime, ext);
if (!glob) if (!config_glob)
{ {
glob = E_NEW(Config_Glob, 1); config_glob = E_NEW(Config_Glob, 1);
glob->name = eina_stringshare_add(ext); config_glob->name = eina_stringshare_add(ext);
mime->globs = eina_list_append(mime->globs, glob); config_mime->globs = eina_list_append(config_mime->globs, config_glob);
} }
} }
} }
@ -582,7 +582,7 @@ _find_mime(E_Config_Dialog_Data *cfdata, char *mime)
} }
static Config_Glob * static Config_Glob *
_find_glob(Config_Mime *mime, char *glob) _find_glob(Config_Mime *mime, char *globbing)
{ {
Config_Glob *g; Config_Glob *g;
Eina_List *l; Eina_List *l;
@ -591,7 +591,7 @@ _find_glob(Config_Mime *mime, char *glob)
EINA_LIST_FOREACH(mime->globs, l, g) EINA_LIST_FOREACH(mime->globs, l, g)
{ {
if (!g) continue; if (!g) continue;
if (strcmp(g->name, glob)) continue; if (strcmp(g->name, globbing)) continue;
return g; return g;
} }
return NULL; return NULL;

View File

@ -131,17 +131,17 @@ _cb_sel_changed(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
E_Config_Dialog_Data *cfdata; E_Config_Dialog_Data *cfdata;
Eina_List *sel; Eina_List *sel;
E_Fm2_Icon_Info *ici; E_Fm2_Icon_Info *ici;
const char *realpath; const char *real_path;
char buff[PATH_MAX]; char buff[PATH_MAX];
if (!(cfdata = data)) return; if (!(cfdata = data)) return;
if (!(sel = e_widget_flist_selected_list_get(cfdata->o_list))) return; if (!(sel = e_widget_flist_selected_list_get(cfdata->o_list))) return;
ici = sel->data; ici = sel->data;
realpath = e_widget_flist_real_path_get(cfdata->o_list); real_path = e_widget_flist_real_path_get(cfdata->o_list);
if (!strcmp(realpath, "/")) if (!strcmp(real_path, "/"))
snprintf(buff, sizeof(buff), "/%s", ici->file); snprintf(buff, sizeof(buff), "/%s", ici->file);
else else
snprintf(buff, sizeof(buff), "%s/%s", realpath, ici->file); snprintf(buff, sizeof(buff), "%s/%s", real_path, ici->file);
eina_list_free(sel); eina_list_free(sel);
if (ecore_file_is_dir(buff)) return; if (ecore_file_is_dir(buff)) return;
E_FREE(cfdata->bg); E_FREE(cfdata->bg);

View File

@ -1,3 +1,4 @@
#include "e.h" #include "e.h"
#define TEXT_NONE_ACTION_EDGE _("<None>") #define TEXT_NONE_ACTION_EDGE _("<None>")
@ -1049,7 +1050,6 @@ _edge_grab_wnd_selection_apply(E_Config_Dialog_Data *cfdata)
{ {
E_Config_Binding_Edge *bi = NULL, *bi2 = NULL; E_Config_Binding_Edge *bi = NULL, *bi2 = NULL;
Eina_List *l; Eina_List *l;
char *label;
int found = 0, n = -1; int found = 0, n = -1;
@ -1147,7 +1147,9 @@ _edge_grab_wnd_selection_apply(E_Config_Dialog_Data *cfdata)
} }
else if (bi) else if (bi)
{ {
label = _edge_binding_text_get(bi->edge, bi->delay, bi->modifiers); char *label;
label = _edge_binding_text_get(bi->edge, bi->delay, bi->modifiers);
e_widget_ilist_nth_label_set(cfdata->gui.o_binding_list, n, label); e_widget_ilist_nth_label_set(cfdata->gui.o_binding_list, n, label);
free(label); free(label);
} }

View File

@ -547,7 +547,7 @@ _cb_files_selection_change(void *data, Evas_Object *obj __UNUSED__, void *event_
E_Config_Dialog_Data *cfdata; E_Config_Dialog_Data *cfdata;
Eina_List *selected; Eina_List *selected;
E_Fm2_Icon_Info *ici; E_Fm2_Icon_Info *ici;
const char *realpath; const char *real_path;
char buf[PATH_MAX]; char buf[PATH_MAX];
cfdata = data; cfdata = data;
@ -562,11 +562,11 @@ _cb_files_selection_change(void *data, Evas_Object *obj __UNUSED__, void *event_
} }
ici = selected->data; ici = selected->data;
realpath = e_fm2_real_path_get(cfdata->o_fm); real_path = e_fm2_real_path_get(cfdata->o_fm);
if (!strcmp(realpath, "/")) if (!strcmp(real_path, "/"))
snprintf(buf, sizeof(buf), "/%s", ici->file); snprintf(buf, sizeof(buf), "/%s", ici->file);
else else
snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file); snprintf(buf, sizeof(buf), "%s/%s", real_path, ici->file);
eina_list_free(selected); eina_list_free(selected);
if (ecore_file_is_dir(buf)) return; if (ecore_file_is_dir(buf)) return;
cfdata->imc_current = eina_stringshare_add(buf); cfdata->imc_current = eina_stringshare_add(buf);

View File

@ -92,18 +92,18 @@ static void
_fill_data(E_Config_Dialog_Data *cfdata) _fill_data(E_Config_Dialog_Data *cfdata)
{ {
Eina_List *l; Eina_List *l;
E_Config_Binding_Acpi *bind; E_Config_Binding_Acpi *binding;
EINA_LIST_FOREACH(e_config->acpi_bindings, l, bind) EINA_LIST_FOREACH(e_config->acpi_bindings, l, binding)
{ {
E_Config_Binding_Acpi *b2; E_Config_Binding_Acpi *b2;
b2 = E_NEW(E_Config_Binding_Acpi, 1); b2 = E_NEW(E_Config_Binding_Acpi, 1);
b2->context = bind->context; b2->context = binding->context;
b2->type = bind->type; b2->type = binding->type;
b2->status = bind->status; b2->status = binding->status;
b2->action = eina_stringshare_ref(bind->action); b2->action = eina_stringshare_ref(binding->action);
b2->params = eina_stringshare_ref(bind->params); b2->params = eina_stringshare_ref(binding->params);
cfdata->bindings = eina_list_append(cfdata->bindings, b2); cfdata->bindings = eina_list_append(cfdata->bindings, b2);
} }
} }
@ -112,14 +112,14 @@ static void
_free_data(E_Config_Dialog *cfd __UNUSED__, _free_data(E_Config_Dialog *cfd __UNUSED__,
E_Config_Dialog_Data *cfdata) E_Config_Dialog_Data *cfdata)
{ {
E_Config_Binding_Acpi *bind; E_Config_Binding_Acpi *binding;
Ecore_Event_Handler *hdl; Ecore_Event_Handler *hdl;
EINA_LIST_FREE(cfdata->bindings, bind) EINA_LIST_FREE(cfdata->bindings, binding)
{ {
if (bind->action) eina_stringshare_del(bind->action); if (binding->action) eina_stringshare_del(binding->action);
if (bind->params) eina_stringshare_del(bind->params); if (binding->params) eina_stringshare_del(binding->params);
E_FREE(bind); E_FREE(binding);
} }
/* free the handlers */ /* free the handlers */
@ -147,26 +147,26 @@ static int
_basic_apply(E_Config_Dialog *cfd __UNUSED__, _basic_apply(E_Config_Dialog *cfd __UNUSED__,
E_Config_Dialog_Data *cfdata) E_Config_Dialog_Data *cfdata)
{ {
E_Config_Binding_Acpi *bind, *b2; E_Config_Binding_Acpi *binding, *b2;
Eina_List *l; Eina_List *l;
EINA_LIST_FREE(e_config->acpi_bindings, bind) EINA_LIST_FREE(e_config->acpi_bindings, binding)
{ {
e_bindings_acpi_del(bind->context, bind->type, bind->status, e_bindings_acpi_del(binding->context, binding->type, binding->status,
bind->action, bind->params); binding->action, binding->params);
if (bind->action) eina_stringshare_del(bind->action); if (binding->action) eina_stringshare_del(binding->action);
if (bind->params) eina_stringshare_del(bind->params); if (binding->params) eina_stringshare_del(binding->params);
E_FREE(bind); E_FREE(binding);
} }
EINA_LIST_FOREACH(cfdata->bindings, l, bind) EINA_LIST_FOREACH(cfdata->bindings, l, binding)
{ {
b2 = E_NEW(E_Config_Binding_Acpi, 1); b2 = E_NEW(E_Config_Binding_Acpi, 1);
b2->context = bind->context; b2->context = binding->context;
b2->type = bind->type; b2->type = binding->type;
b2->status = bind->status; b2->status = binding->status;
b2->action = eina_stringshare_ref(bind->action); b2->action = eina_stringshare_ref(binding->action);
b2->params = eina_stringshare_ref(bind->params); b2->params = eina_stringshare_ref(binding->params);
e_config->acpi_bindings = e_config->acpi_bindings =
eina_list_append(e_config->acpi_bindings, b2); eina_list_append(e_config->acpi_bindings, b2);
@ -230,7 +230,7 @@ _fill_bindings(E_Config_Dialog_Data *cfdata)
{ {
Evas *evas; Evas *evas;
Eina_List *l; Eina_List *l;
E_Config_Binding_Acpi *bind; E_Config_Binding_Acpi *binding;
int i = -1, mw; int i = -1, mw;
evas = evas_object_evas_get(cfdata->o_bindings); evas = evas_object_evas_get(cfdata->o_bindings);
@ -239,7 +239,7 @@ _fill_bindings(E_Config_Dialog_Data *cfdata)
e_widget_ilist_freeze(cfdata->o_bindings); e_widget_ilist_freeze(cfdata->o_bindings);
e_widget_ilist_clear(cfdata->o_bindings); e_widget_ilist_clear(cfdata->o_bindings);
EINA_LIST_FOREACH(cfdata->bindings, l, bind) EINA_LIST_FOREACH(cfdata->bindings, l, binding)
{ {
const char *lbl; const char *lbl;
char buff[32]; char buff[32];
@ -247,7 +247,7 @@ _fill_bindings(E_Config_Dialog_Data *cfdata)
i++; i++;
snprintf(buff, sizeof(buff), "%d", i); snprintf(buff, sizeof(buff), "%d", i);
lbl = _binding_label_get(bind); lbl = _binding_label_get(binding);
e_widget_ilist_append(cfdata->o_bindings, NULL, lbl, e_widget_ilist_append(cfdata->o_bindings, NULL, lbl,
_cb_bindings_changed, cfdata, buff); _cb_bindings_changed, cfdata, buff);
@ -301,12 +301,12 @@ _fill_actions(E_Config_Dialog_Data *cfdata)
static E_Config_Binding_Acpi * static E_Config_Binding_Acpi *
_selected_binding_get(E_Config_Dialog_Data *cfdata) _selected_binding_get(E_Config_Dialog_Data *cfdata)
{ {
E_Config_Binding_Acpi *bind; E_Config_Binding_Acpi *binding;
if ((!cfdata) || (!cfdata->bindex)) return NULL; if ((!cfdata) || (!cfdata->bindex)) return NULL;
if (!(bind = eina_list_nth(cfdata->bindings, atoi(cfdata->bindex)))) if (!(binding = eina_list_nth(cfdata->bindings, atoi(cfdata->bindex))))
return NULL; return NULL;
return bind; return binding;
} }
static E_Action_Description * static E_Action_Description *
@ -341,55 +341,55 @@ _selected_action_get(E_Config_Dialog_Data *cfdata)
} }
static const char * static const char *
_binding_label_get(E_Config_Binding_Acpi *bind) _binding_label_get(E_Config_Binding_Acpi *binding)
{ {
if (bind->type == E_ACPI_TYPE_UNKNOWN) return NULL; if (binding->type == E_ACPI_TYPE_UNKNOWN) return NULL;
if (bind->type == E_ACPI_TYPE_AC_ADAPTER) if (binding->type == E_ACPI_TYPE_AC_ADAPTER)
{ {
if (bind->status == 0) return _("AC Adapter Unplugged"); if (binding->status == 0) return _("AC Adapter Unplugged");
if (bind->status == 1) return _("AC Adapter Plugged"); if (binding->status == 1) return _("AC Adapter Plugged");
return _("Ac Adapter"); return _("Ac Adapter");
} }
if (bind->type == E_ACPI_TYPE_BATTERY) if (binding->type == E_ACPI_TYPE_BATTERY)
return _("Battery"); return _("Battery");
if (bind->type == E_ACPI_TYPE_BUTTON) if (binding->type == E_ACPI_TYPE_BUTTON)
return _("Button"); return _("Button");
if (bind->type == E_ACPI_TYPE_FAN) if (binding->type == E_ACPI_TYPE_FAN)
return _("Fan"); return _("Fan");
if (bind->type == E_ACPI_TYPE_LID) if (binding->type == E_ACPI_TYPE_LID)
{ {
if (bind->status == E_ACPI_LID_UNKNOWN) return _("Lid Unknown"); if (binding->status == E_ACPI_LID_UNKNOWN) return _("Lid Unknown");
if (bind->status == E_ACPI_LID_CLOSED) return _("Lid Closed"); if (binding->status == E_ACPI_LID_CLOSED) return _("Lid Closed");
if (bind->status == E_ACPI_LID_OPEN) return _("Lid Opened"); if (binding->status == E_ACPI_LID_OPEN) return _("Lid Opened");
return _("Lid"); return _("Lid");
} }
if (bind->type == E_ACPI_TYPE_POWER) if (binding->type == E_ACPI_TYPE_POWER)
return _("Power Button"); return _("Power Button");
if (bind->type == E_ACPI_TYPE_PROCESSOR) if (binding->type == E_ACPI_TYPE_PROCESSOR)
return _("Processor"); return _("Processor");
if (bind->type == E_ACPI_TYPE_SLEEP) if (binding->type == E_ACPI_TYPE_SLEEP)
return _("Sleep Button"); return _("Sleep Button");
if (bind->type == E_ACPI_TYPE_THERMAL) if (binding->type == E_ACPI_TYPE_THERMAL)
return _("Thermal"); return _("Thermal");
if (bind->type == E_ACPI_TYPE_VIDEO) if (binding->type == E_ACPI_TYPE_VIDEO)
return _("Video"); return _("Video");
if (bind->type == E_ACPI_TYPE_WIFI) if (binding->type == E_ACPI_TYPE_WIFI)
return _("Wifi"); return _("Wifi");
if (bind->type == E_ACPI_TYPE_HIBERNATE) if (binding->type == E_ACPI_TYPE_HIBERNATE)
return _("Hibernate"); return _("Hibernate");
if (bind->type == E_ACPI_TYPE_ZOOM_OUT) if (binding->type == E_ACPI_TYPE_ZOOM_OUT)
return _("Zoom Out"); return _("Zoom Out");
if (bind->type == E_ACPI_TYPE_ZOOM_IN) if (binding->type == E_ACPI_TYPE_ZOOM_IN)
return _("Zoom In"); return _("Zoom In");
if (bind->type == E_ACPI_TYPE_BRIGHTNESS_DOWN) if (binding->type == E_ACPI_TYPE_BRIGHTNESS_DOWN)
return _("Brightness Down"); return _("Brightness Down");
if (bind->type == E_ACPI_TYPE_BRIGHTNESS_UP) if (binding->type == E_ACPI_TYPE_BRIGHTNESS_UP)
return _("Brightness Up"); return _("Brightness Up");
if (bind->type == E_ACPI_TYPE_ASSIST) if (binding->type == E_ACPI_TYPE_ASSIST)
return _("Assist"); return _("Assist");
if (bind->type == E_ACPI_TYPE_S1) if (binding->type == E_ACPI_TYPE_S1)
return _("S1"); return _("S1");
if (bind->type == E_ACPI_TYPE_VAIO) if (binding->type == E_ACPI_TYPE_VAIO)
return _("Vaio"); return _("Vaio");
return _("Unknown"); return _("Unknown");
@ -399,14 +399,14 @@ static void
_cb_bindings_changed(void *data) _cb_bindings_changed(void *data)
{ {
E_Config_Dialog_Data *cfdata; E_Config_Dialog_Data *cfdata;
E_Config_Binding_Acpi *bind; E_Config_Binding_Acpi *binding;
Eina_List *items; Eina_List *items;
const E_Ilist_Item *item; const E_Ilist_Item *item;
int i = -1; int i = -1;
if (!(cfdata = data)) return; if (!(cfdata = data)) return;
e_widget_entry_clear(cfdata->o_params); e_widget_entry_clear(cfdata->o_params);
if (!(bind = _selected_binding_get(cfdata))) if (!(binding = _selected_binding_get(cfdata)))
{ {
e_widget_disabled_set(cfdata->o_params, EINA_TRUE); e_widget_disabled_set(cfdata->o_params, EINA_TRUE);
e_widget_disabled_set(cfdata->o_del, EINA_TRUE); e_widget_disabled_set(cfdata->o_del, EINA_TRUE);
@ -422,7 +422,7 @@ _cb_bindings_changed(void *data)
i++; i++;
if (!(val = e_widget_ilist_item_value_get(item))) continue; if (!(val = e_widget_ilist_item_value_get(item))) continue;
if (strcmp(val, bind->action)) continue; if (strcmp(val, binding->action)) continue;
e_widget_ilist_selected_set(cfdata->o_actions, i); e_widget_ilist_selected_set(cfdata->o_actions, i);
break; break;
} }
@ -432,12 +432,12 @@ static void
_cb_actions_changed(void *data) _cb_actions_changed(void *data)
{ {
E_Config_Dialog_Data *cfdata; E_Config_Dialog_Data *cfdata;
E_Config_Binding_Acpi *bind; E_Config_Binding_Acpi *binding;
E_Action_Description *dsc; E_Action_Description *dsc;
if (!(cfdata = data)) return; if (!(cfdata = data)) return;
e_widget_entry_clear(cfdata->o_params); e_widget_entry_clear(cfdata->o_params);
if (!(bind = _selected_binding_get(cfdata))) if (!(binding = _selected_binding_get(cfdata)))
{ {
e_widget_disabled_set(cfdata->o_params, EINA_TRUE); e_widget_disabled_set(cfdata->o_params, EINA_TRUE);
e_widget_disabled_set(cfdata->o_del, EINA_TRUE); e_widget_disabled_set(cfdata->o_del, EINA_TRUE);
@ -449,13 +449,13 @@ _cb_actions_changed(void *data)
return; return;
} }
eina_stringshare_replace(&bind->action, dsc->act_cmd); eina_stringshare_replace(&binding->action, dsc->act_cmd);
e_widget_disabled_set(cfdata->o_params, !(dsc->editable)); e_widget_disabled_set(cfdata->o_params, !(dsc->editable));
if ((!dsc->editable) && (dsc->act_params)) if ((!dsc->editable) && (dsc->act_params))
e_widget_entry_text_set(cfdata->o_params, dsc->act_params); e_widget_entry_text_set(cfdata->o_params, dsc->act_params);
else if (bind->params) else if (binding->params)
e_widget_entry_text_set(cfdata->o_params, bind->params); e_widget_entry_text_set(cfdata->o_params, binding->params);
else else
{ {
if ((!dsc->param_example) || (!dsc->param_example[0])) if ((!dsc->param_example) || (!dsc->param_example[0]))
@ -470,14 +470,14 @@ _cb_entry_changed(void *data,
void *data2 __UNUSED__) void *data2 __UNUSED__)
{ {
E_Config_Dialog_Data *cfdata; E_Config_Dialog_Data *cfdata;
E_Config_Binding_Acpi *bind; E_Config_Binding_Acpi *binding;
E_Action_Description *dsc; E_Action_Description *dsc;
if (!(cfdata = data)) return; if (!(cfdata = data)) return;
if (!(dsc = _selected_action_get(cfdata))) return; if (!(dsc = _selected_action_get(cfdata))) return;
if (!dsc->editable) return; if (!dsc->editable) return;
if (!(bind = _selected_binding_get(cfdata))) return; if (!(binding = _selected_binding_get(cfdata))) return;
eina_stringshare_replace(&bind->params, eina_stringshare_replace(&binding->params,
e_widget_entry_text_get(cfdata->o_params)); e_widget_entry_text_get(cfdata->o_params));
} }
@ -528,22 +528,22 @@ _cb_del_binding(void *data,
void *data2 __UNUSED__) void *data2 __UNUSED__)
{ {
E_Config_Dialog_Data *cfdata; E_Config_Dialog_Data *cfdata;
E_Config_Binding_Acpi *bind, *bind2; E_Config_Binding_Acpi *binding, *bind2;
Eina_List *l; Eina_List *l;
if (!(cfdata = data)) return; if (!(cfdata = data)) return;
if (!(bind = _selected_binding_get(cfdata))) return; if (!(binding = _selected_binding_get(cfdata))) return;
/* delete from e_config */ /* delete from e_config */
EINA_LIST_FOREACH(e_config->acpi_bindings, l, bind2) EINA_LIST_FOREACH(e_config->acpi_bindings, l, bind2)
{ {
if ((bind->context == bind2->context) && (bind->type == bind2->type) && if ((binding->context == bind2->context) && (binding->type == bind2->type) &&
(((bind->action) && (bind2->action) && (((binding->action) && (bind2->action) &&
(!strcmp(bind->action, bind2->action))) || (!strcmp(binding->action, bind2->action))) ||
((!bind->action) && (!bind2->action))) && ((!binding->action) && (!bind2->action))) &&
(((bind->params) && (bind2->params) && (((binding->params) && (bind2->params) &&
(!strcmp(bind->params, bind2->params))) || (!strcmp(binding->params, bind2->params))) ||
((!bind->params) && (!bind2->params)))) ((!binding->params) && (!bind2->params))))
{ {
if (bind2->action) eina_stringshare_del(bind2->action); if (bind2->action) eina_stringshare_del(bind2->action);
if (bind2->params) eina_stringshare_del(bind2->params); if (bind2->params) eina_stringshare_del(bind2->params);
@ -556,19 +556,19 @@ _cb_del_binding(void *data,
} }
/* delete from e_bindings */ /* delete from e_bindings */
e_bindings_acpi_del(bind->context, bind->type, bind->status, e_bindings_acpi_del(binding->context, binding->type, binding->status,
bind->action, bind->params); binding->action, binding->params);
/* delete from dialog list */ /* delete from dialog list */
EINA_LIST_FOREACH(cfdata->bindings, l, bind2) EINA_LIST_FOREACH(cfdata->bindings, l, bind2)
{ {
if ((bind->context == bind2->context) && (bind->type == bind2->type) && if ((binding->context == bind2->context) && (binding->type == bind2->type) &&
(((bind->action) && (bind2->action) && (((binding->action) && (bind2->action) &&
(!strcmp(bind->action, bind2->action))) || (!strcmp(binding->action, bind2->action))) ||
((!bind->action) && (!bind2->action))) && ((!binding->action) && (!bind2->action))) &&
(((bind->params) && (bind2->params) && (((binding->params) && (bind2->params) &&
(!strcmp(bind->params, bind2->params))) || (!strcmp(binding->params, bind2->params))) ||
((!bind->params) && (!bind2->params)))) ((!binding->params) && (!bind2->params))))
{ {
if (bind2->action) eina_stringshare_del(bind2->action); if (bind2->action) eina_stringshare_del(bind2->action);
if (bind2->params) eina_stringshare_del(bind2->params); if (bind2->params) eina_stringshare_del(bind2->params);
@ -625,7 +625,7 @@ _cb_acpi_event(void *data,
{ {
E_Event_Acpi *ev; E_Event_Acpi *ev;
E_Config_Dialog_Data *cfdata; E_Config_Dialog_Data *cfdata;
E_Config_Binding_Acpi *bind; E_Config_Binding_Acpi *binding;
Ecore_Event_Handler *hdl; Ecore_Event_Handler *hdl;
ev = event; ev = event;
@ -646,12 +646,12 @@ _cb_acpi_event(void *data,
e_acpi_events_thaw(); e_acpi_events_thaw();
/* NB: This may need more testing/parsing for event status */ /* NB: This may need more testing/parsing for event status */
bind = E_NEW(E_Config_Binding_Acpi, 1); binding = E_NEW(E_Config_Binding_Acpi, 1);
bind->context = E_BINDING_CONTEXT_NONE; binding->context = E_BINDING_CONTEXT_NONE;
bind->type = ev->type; binding->type = ev->type;
bind->status = ev->status; binding->status = ev->status;
bind->action = eina_stringshare_add("dim_screen"); binding->action = eina_stringshare_add("dim_screen");
bind->params = NULL; binding->params = NULL;
cfdata->bindings = eina_list_append(cfdata->bindings, bind); cfdata->bindings = eina_list_append(cfdata->bindings, bind);
_fill_bindings(cfdata); _fill_bindings(cfdata);

View File

@ -19,8 +19,8 @@ struct _E_Config_Dialog_Data
double powersave_medium; double powersave_medium;
double powersave_high; double powersave_high;
double powersave_extreme; double powersave_extreme;
int powersave_min; E_Powersave_Mode powersave_min;
int powersave_max; E_Powersave_Mode powersave_max;
}; };
E_Config_Dialog * E_Config_Dialog *
@ -110,8 +110,8 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
otb = e_widget_toolbook_add(evas, (24 * e_scale), (24 * e_scale)); otb = e_widget_toolbook_add(evas, (24 * e_scale), (24 * e_scale));
cfdata->powersave_min = e_config->powersave.min; cfdata->powersave_min = e_config->powersave.min;
cfdata->powersave_max = e_config->powersave.max; cfdata->powersave_max = e_config->powersave.max;
rmin = e_widget_radio_group_new(&(cfdata->powersave_min)); rmin = e_widget_radio_group_new((int*) &(cfdata->powersave_min));
rmax = e_widget_radio_group_new(&(cfdata->powersave_max)); rmax = e_widget_radio_group_new((int*) &(cfdata->powersave_max));
ol = e_widget_table_add(evas, 0); ol = e_widget_table_add(evas, 0);
ob = e_widget_label_add(evas, _("Min")); ob = e_widget_label_add(evas, _("Min"));
@ -360,7 +360,7 @@ _cb_max_changed(void *data, Evas_Object *obj __UNUSED__)
{ {
E_Config_Dialog_Data *cfdata; E_Config_Dialog_Data *cfdata;
Evas_Object *o; Evas_Object *o;
int toggle;
cfdata = data; cfdata = data;
if (!cfdata) return; if (!cfdata) return;
if (cfdata->powersave_min > cfdata->powersave_max) if (cfdata->powersave_min > cfdata->powersave_max)

View File

@ -165,7 +165,7 @@ arrangement_widget_rep_update(E_Config_Randr_Dialog_Output_Dialog_Data *odd)
if (odd->crtc) if (odd->crtc)
{ {
orientation = (odd->new_orientation != Ecore_X_Randr_Unset) ? odd->new_orientation : odd->previous_orientation; orientation = (odd->new_orientation != (Ecore_X_Randr_Orientation) Ecore_X_Randr_Unset) ? odd->new_orientation : odd->previous_orientation;
} }
switch (orientation) switch (orientation)
{ {

View File

@ -31,7 +31,7 @@ orientation_widget_create_data(E_Config_Dialog_Data *cfdata)
EINA_LIST_FOREACH(cfdata->output_dialog_data_list, iter, odd) EINA_LIST_FOREACH(cfdata->output_dialog_data_list, iter, odd)
{ {
odd->new_orientation = Ecore_X_Randr_Unset; odd->new_orientation = Ecore_X_Randr_Unset;
odd->previous_orientation = odd->crtc ? odd->crtc->current_orientation : Ecore_X_Randr_Unset; odd->previous_orientation = odd->crtc ? odd->crtc->current_orientation : (Ecore_X_Randr_Orientation) Ecore_X_Randr_Unset;
} }
return EINA_TRUE; return EINA_TRUE;
@ -169,7 +169,7 @@ orientation_widget_update_radio_buttons(E_Config_Randr_Dialog_Output_Dialog_Data
{ {
//enabled monitor //enabled monitor
supported_oris = odd->crtc->orientations; supported_oris = odd->crtc->orientations;
ori = (odd->new_orientation != Ecore_X_Randr_Unset) ? odd->new_orientation : odd->crtc->current_orientation; ori = (odd->new_orientation != (Ecore_X_Randr_Orientation) Ecore_X_Randr_Unset) ? odd->new_orientation : odd->crtc->current_orientation;
} }
else else
{ {

View File

@ -54,11 +54,11 @@ policy_widget_create_data(E_Config_Dialog_Data *data)
else else
oi = odd->output; oi = odd->output;
odd->previous_policy = oi ? oi->policy : Ecore_X_Randr_Unset; odd->previous_policy = oi ? oi->policy : (Ecore_X_Randr_Orientation) Ecore_X_Randr_Unset;
odd->new_policy = Ecore_X_Randr_Unset; odd->new_policy = Ecore_X_Randr_Unset;
if (!oi) //Not of interest for dbg output if (!oi) //Not of interest for dbg output
continue; continue;
fprintf(stderr, "CONF_RANDR: Read in policy of %d as %s.\n", oi->xid, ((odd->previous_policy != Ecore_X_Randr_Unset) ? _POLICIES_STRINGS[odd->previous_policy - 1] : "unset")); fprintf(stderr, "CONF_RANDR: Read in policy of %d as %s.\n", oi->xid, ((odd->previous_policy != (Ecore_X_Randr_Output_Policy) Ecore_X_Randr_Unset) ? _POLICIES_STRINGS[odd->previous_policy - 1] : "unset"));
} }
return EINA_TRUE; return EINA_TRUE;
@ -210,14 +210,14 @@ policy_widget_basic_apply_data(E_Config_Dialog *cfd __UNUSED__, E_Config_Dialog_
EINA_LIST_FOREACH(cfdata->output_dialog_data_list, it, odd) EINA_LIST_FOREACH(cfdata->output_dialog_data_list, it, odd)
{ {
if (odd->new_policy == Ecore_X_Randr_Unset) if (odd->new_policy == (Ecore_X_Randr_Output_Policy) Ecore_X_Randr_Unset)
continue; continue;
if (odd->crtc) if (odd->crtc)
{ {
EINA_LIST_FOREACH(odd->crtc->outputs, it2, oi) EINA_LIST_FOREACH(odd->crtc->outputs, it2, oi)
{ {
oi->policy = odd->new_policy; oi->policy = odd->new_policy;
fprintf(stderr, "CONF_RANDR: 'New display attached'-policy for output %d set to %s.\n", odd->output ? odd->output->xid : NULL, _POLICIES_STRINGS[odd->new_policy - 1]); fprintf(stderr, "CONF_RANDR: 'New display attached'-policy for output %d set to %s.\n", odd->output ? odd->output->xid : 0, _POLICIES_STRINGS[odd->new_policy - 1]);
} }
} }
else if (odd->output) else if (odd->output)
@ -240,7 +240,8 @@ policy_widget_basic_check_changed(E_Config_Dialog *cfd __UNUSED__, E_Config_Dial
EINA_LIST_FOREACH(cfdata->output_dialog_data_list, it, odd) EINA_LIST_FOREACH(cfdata->output_dialog_data_list, it, odd)
{ {
if ((odd->new_policy == Ecore_X_Randr_Unset) || (odd->previous_policy == Ecore_X_Randr_Unset)) if ((odd->new_policy == (Ecore_X_Randr_Output_Policy) Ecore_X_Randr_Unset) ||
(odd->previous_policy == (Ecore_X_Randr_Output_Policy) Ecore_X_Randr_Unset))
continue; continue;
if (odd->new_policy != odd->previous_policy) if (odd->new_policy != odd->previous_policy)
return EINA_TRUE; return EINA_TRUE;
@ -276,7 +277,7 @@ policy_widget_update_radio_buttons(E_Config_Randr_Dialog_Output_Dialog_Data *odd
e_widget_disabled_set(e_config_runtime_info->gui.widgets.policy.radio_none, EINA_FALSE); e_widget_disabled_set(e_config_runtime_info->gui.widgets.policy.radio_none, EINA_FALSE);
} }
policy = (odd->new_policy != Ecore_X_Randr_Unset) ? odd->new_policy : odd->previous_policy; policy = (odd->new_policy != (Ecore_X_Randr_Output_Policy) Ecore_X_Randr_Unset) ? odd->new_policy : odd->previous_policy;
//toggle the switch of the currently used policies //toggle the switch of the currently used policies
switch (policy) switch (policy)
{ {

View File

@ -1002,11 +1002,12 @@ _size_list_load(E_Config_Dialog_Data *cfdata, Eina_List *size_list, Evas_Font_Si
static void static void
_font_list_load(E_Config_Dialog_Data *cfdata, const char *cur_font) _font_list_load(E_Config_Dialog_Data *cfdata, const char *cur_font)
{ {
int n; const char *f;
Eina_List *next; Eina_List *next;
Evas_Object *ob; Evas_Object *ob;
Evas *evas; Evas *evas;
Evas_Coord w; Evas_Coord w;
int n;
ob = cfdata->gui.font_list; ob = cfdata->gui.font_list;
evas = evas_object_evas_get(ob); evas = evas_object_evas_get(ob);
@ -1036,13 +1037,8 @@ _font_list_load(E_Config_Dialog_Data *cfdata, const char *cur_font)
/* Load the list */ /* Load the list */
if (cfdata->font_list) if (cfdata->font_list)
{ {
Eina_List *next; EINA_LIST_FOREACH(cfdata->font_list, next, f)
for (next = cfdata->font_list; next; next = next->next)
{ {
const char *f;
f = next->data;
e_widget_ilist_append(ob, NULL, f, NULL, NULL, f); e_widget_ilist_append(ob, NULL, f, NULL, NULL, f);
} }
} }
@ -1058,11 +1054,8 @@ _font_list_load(E_Config_Dialog_Data *cfdata, const char *cur_font)
/* Select Current Font */ /* Select Current Font */
n = 0; n = 0;
for (next = cfdata->font_list; next; next = next->next) EINA_LIST_FOREACH(cfdata->font_list, next, f)
{ {
const char *f;
f = next->data;
if (!strcasecmp(f, cur_font)) if (!strcasecmp(f, cur_font))
{ {
e_widget_ilist_selected_set(ob, n); e_widget_ilist_selected_set(ob, n);
@ -1076,23 +1069,25 @@ static void
_adv_style_cb_change(void *data, Evas_Object *obj __UNUSED__) _adv_style_cb_change(void *data, Evas_Object *obj __UNUSED__)
{ {
E_Config_Dialog_Data *cfdata; E_Config_Dialog_Data *cfdata;
E_Ilist_Item *i;
Eina_List *l; Eina_List *l;
int n; int n = 0;
if (!(cfdata = data)) return; if (!(cfdata = data)) return;
/* Setup the new style name */ /* Setup the new style name */
for (n = 0, l = e_widget_ilist_items_get(cfdata->gui.class_list); l; l = l->next, n++) EINA_LIST_FOREACH(e_widget_ilist_items_get(cfdata->gui.class_list), l, i)
{ {
E_Ilist_Item *i;
CFText_Class *tc; CFText_Class *tc;
const char *tmp;
if (!(i = l->data)) continue;
if (!i->selected) continue; if (!i->selected) continue;
tc = eina_list_nth(cfdata->text_classes, n); tc = eina_list_nth(cfdata->text_classes, n);
tmp = eina_stringshare_ref(cfdata->cur_style);
eina_stringshare_del(tc->style); eina_stringshare_del(tc->style);
tc->style = eina_stringshare_ref(cfdata->cur_style); tc->style = tmp;
n++;
} }
_font_preview_update(cfdata); _font_preview_update(cfdata);

View File

@ -80,7 +80,7 @@ _cb_files_selection_change(void *data, Evas_Object *obj __UNUSED__, void *event_
E_Config_Dialog_Data *cfdata; E_Config_Dialog_Data *cfdata;
Eina_List *selected; Eina_List *selected;
E_Fm2_Icon_Info *ici; E_Fm2_Icon_Info *ici;
const char *realpath; const char *real_path;
char buf[4096]; char buf[4096];
cfdata = data; cfdata = data;
@ -88,11 +88,11 @@ _cb_files_selection_change(void *data, Evas_Object *obj __UNUSED__, void *event_
selected = e_fm2_selected_list_get(cfdata->o_fm); selected = e_fm2_selected_list_get(cfdata->o_fm);
if (!selected) return; if (!selected) return;
ici = selected->data; ici = selected->data;
realpath = e_fm2_real_path_get(cfdata->o_fm); real_path = e_fm2_real_path_get(cfdata->o_fm);
if (!strcmp(realpath, "/")) if (!strcmp(real_path, "/"))
snprintf(buf, sizeof(buf), "/%s", ici->file); snprintf(buf, sizeof(buf), "/%s", ici->file);
else else
snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file); snprintf(buf, sizeof(buf), "%s/%s", real_path, ici->file);
eina_list_free(selected); eina_list_free(selected);
if (ecore_file_is_dir(buf)) return; if (ecore_file_is_dir(buf)) return;
E_FREE(cfdata->splash); E_FREE(cfdata->splash);

View File

@ -159,7 +159,7 @@ _cb_files_selection_change(void *data, Evas_Object *obj __UNUSED__, void *event_
E_Config_Dialog_Data *cfdata; E_Config_Dialog_Data *cfdata;
Eina_List *selected; Eina_List *selected;
E_Fm2_Icon_Info *ici; E_Fm2_Icon_Info *ici;
const char *realpath; const char *real_path;
char buf[4096]; char buf[4096];
cfdata = data; cfdata = data;
@ -168,12 +168,12 @@ _cb_files_selection_change(void *data, Evas_Object *obj __UNUSED__, void *event_
if (!(selected = e_widget_flist_selected_list_get(cfdata->o_fm))) return; if (!(selected = e_widget_flist_selected_list_get(cfdata->o_fm))) return;
ici = selected->data; ici = selected->data;
realpath = e_widget_flist_real_path_get(cfdata->o_fm); real_path = e_widget_flist_real_path_get(cfdata->o_fm);
if (!strcmp(realpath, "/")) if (!strcmp(real_path, "/"))
snprintf(buf, sizeof(buf), "/%s", ici->file); snprintf(buf, sizeof(buf), "/%s", ici->file);
else else
snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file); snprintf(buf, sizeof(buf), "%s/%s", real_path, ici->file);
eina_list_free(selected); eina_list_free(selected);
if (ecore_file_is_dir(buf)) return; if (ecore_file_is_dir(buf)) return;

View File

@ -199,18 +199,18 @@ _cb_files_selection_change(void *data, Evas_Object *obj __UNUSED__, void *event_
E_Config_Dialog_Data *cfdata; E_Config_Dialog_Data *cfdata;
Eina_List *selected; Eina_List *selected;
E_Fm2_Icon_Info *ici; E_Fm2_Icon_Info *ici;
const char *realpath; const char *real_path;
char buf[PATH_MAX]; char buf[PATH_MAX];
cfdata = data; cfdata = data;
if (!cfdata->o_fm) return; if (!cfdata->o_fm) return;
if (!(selected = e_widget_flist_selected_list_get(cfdata->o_fm))) return; if (!(selected = e_widget_flist_selected_list_get(cfdata->o_fm))) return;
ici = selected->data; ici = selected->data;
realpath = e_widget_flist_real_path_get(cfdata->o_fm); real_path = e_widget_flist_real_path_get(cfdata->o_fm);
if (!strcmp(realpath, "/")) if (!strcmp(real_path, "/"))
snprintf(buf, sizeof(buf), "/%s", ici->file); snprintf(buf, sizeof(buf), "/%s", ici->file);
else else
snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file); snprintf(buf, sizeof(buf), "%s/%s", real_path, ici->file);
eina_list_free(selected); eina_list_free(selected);
if (ecore_file_is_dir(buf)) return; if (ecore_file_is_dir(buf)) return;

View File

@ -1942,14 +1942,12 @@ _evry_cb_key_down(void *data, int type __UNUSED__, void *event)
else if (ev->modifiers) else if (ev->modifiers)
{ {
Eina_List *l; Eina_List *l;
E_Config_Binding_Key *bind; E_Config_Binding_Key *binding;
E_Binding_Modifier mod; E_Binding_Modifier mod;
for (l = e_config->key_bindings; l; l = l->next) EINA_LIST_FOREACH(e_config->key_bindings, l, binding)
{ {
bind = l->data; if (binding->action && strcmp(binding->action, "everything")) continue;
if (bind->action && strcmp(bind->action, "everything")) continue;
mod = 0; mod = 0;
@ -1962,14 +1960,14 @@ _evry_cb_key_down(void *data, int type __UNUSED__, void *event)
if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN)
mod |= E_BINDING_MODIFIER_WIN; mod |= E_BINDING_MODIFIER_WIN;
if (!(bind->key && (!strcmp(bind->key, ev->keyname)) && if (!(binding->key && (!strcmp(binding->key, ev->keyname)) &&
(((unsigned int)bind->modifiers == mod) || (bind->any_mod)))) (((unsigned int)binding->modifiers == mod) || (binding->any_mod))))
continue; continue;
if (win->level > 0) if (win->level > 0)
return ECORE_CALLBACK_PASS_ON; return ECORE_CALLBACK_PASS_ON;
if (!(bind->params) && (CUR_SEL == OBJ_SEL) && if (!(binding->params) && (CUR_SEL == OBJ_SEL) &&
((CUR_SEL)->state && (CUR_SEL)->state->cur_item)) ((CUR_SEL)->state && (CUR_SEL)->state->cur_item))
{ {
_evry_selectors_shift(win, 1); _evry_selectors_shift(win, 1);
@ -1979,13 +1977,13 @@ _evry_cb_key_down(void *data, int type __UNUSED__, void *event)
evry_hide(win, 1); evry_hide(win, 1);
#if 0 /* FIXME this causes segv when triggering a plugin keybinding twice */ #if 0 /* FIXME this causes segv when triggering a plugin keybinding twice */
if (win && CUR_SEL && bind->params) if (win && CUR_SEL && binding->params)
{ {
Eina_List *ll; Eina_List *ll;
Evry_Plugin *p; Evry_Plugin *p;
EINA_LIST_FOREACH ((SUBJ_SEL)->plugins, ll, p) EINA_LIST_FOREACH ((SUBJ_SEL)->plugins, ll, p)
if (!strcmp(bind->params, p->name)) break; if (!strcmp(binding->params, p->name)) break;
if (p) if (p)
{ {

View File

@ -252,7 +252,7 @@ struct _Evry_Event_Action_Performed
#define EVRY_PLUGIN_MIN_QUERY(_p, _input) \ #define EVRY_PLUGIN_MIN_QUERY(_p, _input) \
if (!(EVRY_PLUGIN(_p)->config->min_query) || \ if (!(EVRY_PLUGIN(_p)->config->min_query) || \
(_input && (strlen(_input) >= EVRY_PLUGIN(_p)->config->min_query))) (_input && ((int) strlen(_input) >= EVRY_PLUGIN(_p)->config->min_query)))
#define EVRY_PLUGIN_ITEMS_CLEAR(_p) { \ #define EVRY_PLUGIN_ITEMS_CLEAR(_p) { \
Evry_Item *_it; \ Evry_Item *_it; \

View File

@ -106,22 +106,22 @@ _fetch(Evry_Plugin *plugin, const char *input)
min_fuzz = it->fuzzy_match; min_fuzz = it->fuzzy_match;
} }
GET_ITEM(it, pp); GET_ITEM(itp, pp);
it->hi = NULL; itp->hi = NULL;
/* TODO get better usage estimate */ /* TODO get better usage estimate */
evry_history_item_usage_set(it, NULL, NULL); evry_history_item_usage_set(itp, NULL, NULL);
it->usage /= 100.0; itp->usage /= 100.0;
if ((it->usage && max_usage) && (it->usage < max_usage)) if ((itp->usage && max_usage) && (itp->usage < max_usage))
it->usage = max_usage; itp->usage = max_usage;
it->fuzzy_match = min_fuzz; itp->fuzzy_match = min_fuzz;
IF_RELEASE(it->detail); IF_RELEASE(itp->detail);
snprintf(buf, sizeof(buf), "%d %s", eina_list_count(pp->items), _("Items")); snprintf(buf, sizeof(buf), "%d %s", eina_list_count(pp->items), _("Items"));
it->detail = eina_stringshare_add(buf); itp->detail = eina_stringshare_add(buf);
items = eina_list_append(items, it); items = eina_list_append(items, itp);
} }
/* only one plugin: show items */ /* only one plugin: show items */
@ -194,7 +194,7 @@ _fetch(Evry_Plugin *plugin, const char *input)
evry_history_item_usage_set(it, input, context); evry_history_item_usage_set(it, input, context);
if ((subj_sel) && (top_level) && if ((subj_sel) && (top_level) &&
(!it->usage) && (inp_len < plugin->config->min_query)) (!it->usage) && ((int) inp_len < plugin->config->min_query))
continue; continue;
items = eina_list_append(items, it); items = eina_list_append(items, it);
@ -206,7 +206,7 @@ _fetch(Evry_Plugin *plugin, const char *input)
{ {
EINA_LIST_FOREACH (lp, l, pp) EINA_LIST_FOREACH (lp, l, pp)
{ {
int cnt = 1; cnt = 1;
EINA_LIST_FOREACH (pp->items, ll, it) EINA_LIST_FOREACH (pp->items, ll, it)
{ {
if ((!subj_sel) || (it->usage < 0) || if ((!subj_sel) || (it->usage < 0) ||
@ -295,7 +295,7 @@ _begin(Evry_Plugin *plugin, const Evry_Item *it __UNUSED__)
{ {
Plugin *p; Plugin *p;
GET_PLUGIN(base, plugin); /* GET_PLUGIN(base, plugin); */
EVRY_PLUGIN_INSTANCE(p, plugin); EVRY_PLUGIN_INSTANCE(p, plugin);
p->warning = evry_item_new(NULL, EVRY_PLUGIN(p), N_("No plugins loaded"), NULL, NULL); p->warning = evry_item_new(NULL, EVRY_PLUGIN(p), N_("No plugins loaded"), NULL, NULL);

View File

@ -4,9 +4,9 @@ static Evry_Action *act;
static Ecore_X_Window clipboard_win = 0; static Ecore_X_Window clipboard_win = 0;
static int static int
_action(Evry_Action *act) _action(Evry_Action *action)
{ {
const Evry_Item *it = act->it1.item; const Evry_Item *it = action->it1.item;
ecore_x_selection_primary_set(clipboard_win, it->label, strlen(it->label)); ecore_x_selection_primary_set(clipboard_win, it->label, strlen(it->label));
ecore_x_selection_clipboard_set(clipboard_win, it->label, strlen(it->label)); ecore_x_selection_clipboard_set(clipboard_win, it->label, strlen(it->label));
@ -15,7 +15,7 @@ _action(Evry_Action *act)
} }
static int static int
_check_item(Evry_Action *act __UNUSED__, const Evry_Item *it) _check_item(Evry_Action *action __UNUSED__, const Evry_Item *it)
{ {
return it && it->label && (strlen(it->label) > 0); return it && it->label && (strlen(it->label) > 0);
} }

View File

@ -379,14 +379,14 @@ _scan_end_func(void *data, Ecore_Thread *thread __UNUSED__)
{ {
EINA_LIST_FOREACH_SAFE (d->files, l, ll, item) EINA_LIST_FOREACH_SAFE (d->files, l, ll, item)
{ {
GET_FILE(file, item); GET_FILE(browse, item);
if (item->browseable) if (item->browseable)
file->mime = _mime_dir; browse->mime = _mime_dir;
else if (ht) else if (ht)
_cache_mime_get(ht, file); _cache_mime_get(ht, browse);
if (file->mime) if (browse->mime)
{ {
d->files = eina_list_remove_list(d->files, l); d->files = eina_list_remove_list(d->files, l);
_file_add(p, item); _file_add(p, item);
@ -676,10 +676,10 @@ _fetch(Evry_Plugin *plugin, const char *input)
return 0; return 0;
} }
int len = strlen(p->directory); int lendir = p->directory ? strlen(p->directory) : 0;
len = (len == 1) ? len : len + 1; lendir = (lendir <= 1) ? lendir : lendir + 1;
p->input = eina_stringshare_add(input + len); p->input = eina_stringshare_add(input + lendir);
} }
else if (p->directory && input && !strncmp(input, "..", 2)) else if (p->directory && input && !strncmp(input, "..", 2))
{ {
@ -1071,7 +1071,7 @@ _recentf_fetch(Evry_Plugin *plugin, const char *input)
GET_PLUGIN(p, plugin); GET_PLUGIN(p, plugin);
Evry_Item_File *file; Evry_Item_File *file;
History_Types *ht; History_Types *ht;
size_t len = (input ? strlen(input) : 0); int len = (input ? strlen(input) : 0);
IF_RELEASE(p->input); IF_RELEASE(p->input);

View File

@ -30,17 +30,17 @@ static void
_finish(Evry_Plugin *plugin) _finish(Evry_Plugin *plugin)
{ {
Settings_Item *it; Settings_Item *it;
GET_PLUGIN(p, plugin); GET_PLUGIN(pl, plugin);
EVRY_PLUGIN_ITEMS_CLEAR(p); EVRY_PLUGIN_ITEMS_CLEAR(pl);
EINA_LIST_FREE (p->items, it) EINA_LIST_FREE (pl->items, it)
EVRY_ITEM_FREE(it); EVRY_ITEM_FREE(it);
EINA_LIST_FREE (p->categories, it) EINA_LIST_FREE (pl->categories, it)
EVRY_ITEM_FREE(it); EVRY_ITEM_FREE(it);
E_FREE(p); E_FREE(pl);
} }
static Evas_Object * static Evas_Object *
@ -62,7 +62,7 @@ _icon_get(Evry_Item *item, Evas *e __UNUSED__)
static Evry_Plugin * static Evry_Plugin *
_browse(Evry_Plugin *plugin, const Evry_Item *item) _browse(Evry_Plugin *plugin, const Evry_Item *item)
{ {
Plugin *p; Plugin *pl;
Eina_List *l; Eina_List *l;
Settings_Item *it, *it2; Settings_Item *it, *it2;
@ -71,8 +71,8 @@ _browse(Evry_Plugin *plugin, const Evry_Item *item)
it = (Settings_Item *)item; it = (Settings_Item *)item;
EVRY_PLUGIN_INSTANCE(p, plugin); EVRY_PLUGIN_INSTANCE(pl, plugin);
p->parent = EINA_TRUE; pl->parent = EINA_TRUE;
GET_PLUGIN(parent, item->plugin); GET_PLUGIN(parent, item->plugin);
@ -81,36 +81,36 @@ _browse(Evry_Plugin *plugin, const Evry_Item *item)
if (it2->ecat == it->ecat) if (it2->ecat == it->ecat)
{ {
EVRY_ITEM_REF(it2); EVRY_ITEM_REF(it2);
p->items = eina_list_append(p->items, it2); pl->items = eina_list_append(pl->items, it2);
} }
} }
return EVRY_PLUGIN(p); return EVRY_PLUGIN(pl);
} }
static Evry_Plugin * static Evry_Plugin *
_begin(Evry_Plugin *plugin, const Evry_Item *item __UNUSED__) _begin(Evry_Plugin *plugin, const Evry_Item *item __UNUSED__)
{ {
Plugin *p; Plugin *pl;
EVRY_PLUGIN_INSTANCE(p, plugin); EVRY_PLUGIN_INSTANCE(pl, plugin);
return EVRY_PLUGIN(p); return EVRY_PLUGIN(pl);
} }
static int static int
_fetch(Evry_Plugin *plugin, const char *input) _fetch(Evry_Plugin *plugin, const char *input)
{ {
size_t len = input ? strlen(input) : 0; int len = input ? strlen(input) : 0;
GET_PLUGIN(p, plugin); GET_PLUGIN(pl, plugin);
EVRY_PLUGIN_ITEMS_CLEAR(p); EVRY_PLUGIN_ITEMS_CLEAR(pl);
if ((!p->parent) && (len < plugin->config->min_query)) if ((!pl->parent) && (len < plugin->config->min_query))
return 0; return 0;
if (!p->categories && !p->items) if (!pl->categories && !pl->items)
{ {
Settings_Item *it; Settings_Item *it;
Eina_List *l, *ll; Eina_List *l, *ll;
@ -122,46 +122,46 @@ _fetch(Evry_Plugin *plugin, const char *input)
if ((ecat->pri < 0) || (!ecat->items)) continue; if ((ecat->pri < 0) || (!ecat->items)) continue;
if (!strcmp(ecat->cat, "system")) continue; if (!strcmp(ecat->cat, "system")) continue;
it = EVRY_ITEM_NEW(Settings_Item, p, ecat->label, _icon_get, NULL); it = EVRY_ITEM_NEW(Settings_Item, pl, ecat->label, _icon_get, NULL);
it->ecat = ecat; it->ecat = ecat;
EVRY_ITEM(it)->browseable = EINA_TRUE; EVRY_ITEM(it)->browseable = EINA_TRUE;
p->categories = eina_list_append(p->categories, it); pl->categories = eina_list_append(pl->categories, it);
EINA_LIST_FOREACH (ecat->items, ll, eci) EINA_LIST_FOREACH (ecat->items, ll, eci)
{ {
if (eci->pri < 0) continue; if (eci->pri < 0) continue;
it = EVRY_ITEM_NEW(Settings_Item, p, eci->label, _icon_get, NULL); it = EVRY_ITEM_NEW(Settings_Item, pl, eci->label, _icon_get, NULL);
it->eci = eci; it->eci = eci;
it->ecat = ecat; it->ecat = ecat;
EVRY_ITEM_DETAIL_SET(it, ecat->label); EVRY_ITEM_DETAIL_SET(it, ecat->label);
p->items = eina_list_append(p->items, it); pl->items = eina_list_append(pl->items, it);
} }
} }
} }
EVRY_PLUGIN_ITEMS_ADD(p, p->categories, input, 1, 1); EVRY_PLUGIN_ITEMS_ADD(pl, pl->categories, input, 1, 1);
if (input || p->parent) if (input || pl->parent)
EVRY_PLUGIN_ITEMS_ADD(p, p->items, input, 1, 1); EVRY_PLUGIN_ITEMS_ADD(pl, pl->items, input, 1, 1);
return EVRY_PLUGIN_HAS_ITEMS(p); return EVRY_PLUGIN_HAS_ITEMS(pl);
} }
static int static int
_action_check(Evry_Action *act __UNUSED__, const Evry_Item *item) _action_check(Evry_Action *action __UNUSED__, const Evry_Item *item)
{ {
return !!(((Settings_Item *)item)->eci); return !!(((Settings_Item *)item)->eci);
} }
static int static int
_action(Evry_Action *act) _action(Evry_Action *action)
{ {
char buf[1024]; char buf[1024];
Settings_Item *it; Settings_Item *it;
it = (Settings_Item *)act->it1.item; it = (Settings_Item *)action->it1.item;
snprintf(buf, sizeof(buf), "%s/%s", it->ecat->cat, it->eci->item); snprintf(buf, sizeof(buf), "%s/%s", it->ecat->cat, it->eci->item);

View File

@ -389,7 +389,7 @@ _place_items(Smart_Data *sd)
{ {
Eina_List *l; Eina_List *l;
Item *it; Item *it;
int div; int divider;
Evas_Coord x = 0, y = 0, ww, hh, mw = 0, mh = 0; Evas_Coord x = 0, y = 0, ww, hh, mw = 0, mh = 0;
if (sd->view->mode == VIEW_MODE_LIST) if (sd->view->mode == VIEW_MODE_LIST)
@ -413,9 +413,9 @@ _place_items(Smart_Data *sd)
if ((w > 0) && (h > 0)) if ((w > 0) && (h > 0))
{ {
div = sd->w / w; divider = sd->w / w;
if (div < 1) div = 1; if (divider < 1) divider = 1;
ww = w + (sd->w - div * w) / div; ww = w + (sd->w - divider * w) / divider;
hh = ((double)h / (double)w * (double)ww); hh = ((double)h / (double)w * (double)ww);
} }
else else
@ -427,16 +427,16 @@ _place_items(Smart_Data *sd)
else else
ww = 192; ww = 192;
div = sd->w / ww; divider = sd->w / ww;
if (div < 1) div = 1; if (divider < 1) divider = 1;
ww += (sd->w - div * ww) / div; ww += (sd->w - divider * ww) / divider;
div = sd->h / ww; divider = sd->h / ww;
if (div < 1) div = 1; if (divider < 1) divider = 1;
hh = ww + (sd->h - div * ww) / div; hh = ww + (sd->h - divider * ww) / divider;
if (hh > ww) if (hh > ww)
hh = ww + (sd->h - (div + 1) * ww) / (div + 1); hh = ww + (sd->h - (divider + 1) * ww) / (divider + 1);
} }
} }
@ -490,7 +490,7 @@ _e_smart_reconfigure_do(void *data)
Eina_List *l; Eina_List *l;
Item *it; Item *it;
Evas_Coord xx, yy; Evas_Coord xx, yy;
double time; double t;
if (!sd) if (!sd)
return ECORE_CALLBACK_CANCEL; return ECORE_CALLBACK_CANCEL;
@ -514,7 +514,7 @@ _e_smart_reconfigure_do(void *data)
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;
} }
time = ecore_time_get(); t = ecore_time_get();
EINA_LIST_FOREACH (sd->items, l, it) EINA_LIST_FOREACH (sd->items, l, it)
{ {
@ -536,7 +536,7 @@ _e_smart_reconfigure_do(void *data)
} }
it->changed = EINA_FALSE; it->changed = EINA_FALSE;
if (ecore_time_get() - time > 0.03) if (ecore_time_get() - t > 0.03)
return ECORE_CALLBACK_RENEW; return ECORE_CALLBACK_RENEW;
} }
@ -691,10 +691,10 @@ _pan_child_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
} }
static void static void
_pan_view_set(Evas_Object *obj, View *view) _pan_view_set(Evas_Object *obj, View *v)
{ {
Smart_Data *sd = evas_object_smart_data_get(obj); Smart_Data *sd = evas_object_smart_data_get(obj);
sd->view = view; sd->view = v;
} }
static Item * static Item *
@ -893,9 +893,9 @@ _clear_items(Evas_Object *obj)
} }
static void static void
_view_clear(Evry_View *view) _view_clear(Evry_View *ev)
{ {
View *v = (View *)view; View *v = (View *)ev;
Smart_Data *sd = evas_object_smart_data_get(v->span); Smart_Data *sd = evas_object_smart_data_get(v->span);
Item *it; Item *it;
if (!sd) return; if (!sd) return;
@ -953,9 +953,9 @@ _update_frame(Evas_Object *obj)
} }
static int static int
_view_update(Evry_View *view) _view_update(Evry_View *ev)
{ {
GET_VIEW(v, view); GET_VIEW(v, ev);
Smart_Data *sd = evas_object_smart_data_get(v->span); Smart_Data *sd = evas_object_smart_data_get(v->span);
Item *v_it; Item *v_it;
Evry_Item *p_it; Evry_Item *p_it;
@ -975,7 +975,7 @@ _view_update(Evry_View *view)
if (!p) if (!p)
{ {
_view_clear(view); _view_clear(ev);
return 1; return 1;
} }
@ -1090,9 +1090,9 @@ _view_update(Evry_View *view)
} }
static int static int
_cb_key_down(Evry_View *view, const Ecore_Event_Key *ev) _cb_key_down(Evry_View *eview, const Ecore_Event_Key *ev)
{ {
View *v = (View *)view; View *v = (View *)eview;
Smart_Data *sd = evas_object_smart_data_get(v->span); Smart_Data *sd = evas_object_smart_data_get(v->span);
Eina_List *l = NULL, *ll; Eina_List *l = NULL, *ll;
Item *it = NULL; Item *it = NULL;
@ -1234,7 +1234,7 @@ _cb_key_down(Evry_View *view, const Ecore_Event_Key *ev)
if ((slide = v->tabs->key_down(v->tabs, ev))) if ((slide = v->tabs->key_down(v->tabs, ev)))
{ {
/* _view_update(view, -slide); */ /* _view_update(view, -slide); */
_view_update(view); _view_update(eview);
return 1; return 1;
} }
@ -1580,15 +1580,15 @@ _cb_list_show(void *data, Evas_Object *obj __UNUSED__, const char *emission __UN
} }
static Evry_View * static Evry_View *
_view_create(Evry_View *view, const Evry_State *s, const Evas_Object *swallow) _view_create(Evry_View *ev, const Evry_State *s, const Evas_Object *swallow)
{ {
GET_VIEW(parent, view); GET_VIEW(parent, ev);
View *v; View *v;
Ecore_Event_Handler *h; Ecore_Event_Handler *h;
v = E_NEW(View, 1); v = E_NEW(View, 1);
v->view = *view; v->view = *ev;
v->state = s; v->state = s;
v->evas = evas_object_evas_get(swallow); v->evas = evas_object_evas_get(swallow);
@ -1661,13 +1661,13 @@ _view_create(Evry_View *view, const Evry_State *s, const Evas_Object *swallow)
} }
static void static void
_view_destroy(Evry_View *view) _view_destroy(Evry_View *ev)
{ {
Ecore_Event_Handler *h; Ecore_Event_Handler *h;
GET_VIEW(v, view); GET_VIEW(v, ev);
_view_clear(view); _view_clear(ev);
evas_object_del(v->span); evas_object_del(v->span);
evas_object_del(v->bg); evas_object_del(v->bg);

View File

@ -1243,7 +1243,7 @@ _e_fwin_changed(void *data,
E_Fwin *fwin; E_Fwin *fwin;
E_Fwin_Page *page; E_Fwin_Page *page;
Efreet_Desktop *ef; Efreet_Desktop *ef;
char buf[PATH_MAX], *ext; char buf[PATH_MAX];
page = data; page = data;
fwin = page->fwin; fwin = page->fwin;
@ -1417,14 +1417,14 @@ _e_fwin_cb_key_down(void *data,
if (!strcmp(ev->key, "w")) if (!strcmp(ev->key, "w"))
{ {
int count = eina_list_count(fwin->pages); int count = eina_list_count(fwin->pages);
E_Fwin_Page *page; E_Fwin_Page *pagew;
if (count > 2) if (count > 2)
{ {
Eina_List *l; Eina_List *l;
int i = 0; int i = 0;
page = fwin->cur_page; pagew = fwin->cur_page;
if (fwin->page_index > 0) if (fwin->page_index > 0)
{ {
if (fwin->tb_obj) if (fwin->tb_obj)
@ -1438,10 +1438,10 @@ _e_fwin_cb_key_down(void *data,
} }
if (fwin->tb_obj) if (fwin->tb_obj)
e_widget_toolbar_item_remove(fwin->tb_obj, page->index); e_widget_toolbar_item_remove(fwin->tb_obj, page->index);
fwin->pages = eina_list_remove(fwin->pages, page); fwin->pages = eina_list_remove(fwin->pages, pagew);
_e_fwin_page_free(page); _e_fwin_page_free(pagew);
EINA_LIST_FOREACH(fwin->pages, l, page) EINA_LIST_FOREACH(fwin->pages, l, pagew)
page->index = i++; pagew->index = i++;
} }
else if (count > 1) else if (count > 1)
{ {
@ -1451,9 +1451,9 @@ _e_fwin_cb_key_down(void *data,
fwin->page_index = 0; fwin->page_index = 0;
fwin->pages = eina_list_remove(fwin->pages, fwin->cur_page); fwin->pages = eina_list_remove(fwin->pages, fwin->cur_page);
_e_fwin_page_free(fwin->cur_page); _e_fwin_page_free(fwin->cur_page);
page = fwin->pages->data; pagew = fwin->pages->data;
page->index = 0; pagew->index = 0;
_e_fwin_cb_page_change(fwin, page); _e_fwin_cb_page_change(fwin, pagew);
_e_fwin_cb_resize(fwin->win); _e_fwin_cb_resize(fwin->win);
} }
else else

View File

@ -468,7 +468,7 @@ static void
_cb_dir_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__) _cb_dir_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
{ {
Instance *inst; Instance *inst;
const char *realpath; const char *real_path;
char *path, *dir, *p; char *path, *dir, *p;
Eina_List *l, *ll, *sel = NULL; Eina_List *l, *ll, *sel = NULL;
Evas_Object *btn; Evas_Object *btn;
@ -476,7 +476,7 @@ _cb_dir_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS
inst = data; inst = data;
if (!(realpath = e_fm2_real_path_get(inst->o_fm))) return; if (!(real_path = e_fm2_real_path_get(inst->o_fm))) return;
/* update pathbar */ /* update pathbar */
if (!inst->l_buttons) if (!inst->l_buttons)
@ -484,7 +484,7 @@ _cb_dir_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS
sel = inst->l_buttons; sel = inst->l_buttons;
l = eina_list_next(sel); l = eina_list_next(sel);
p = path = ecore_file_realpath(realpath); p = path = ecore_file_realpath(real_path);
while (p) while (p)
{ {
@ -566,7 +566,7 @@ _cb_dir_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS
} }
/* update history */ /* update history */
if ((!inst->ignore_dir) && (eina_list_data_get(inst->current) != realpath)) if ((!inst->ignore_dir) && (eina_list_data_get(inst->current) != real_path))
{ {
if (inst->current) if (inst->current)
{ {
@ -578,12 +578,12 @@ _cb_dir_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS
} }
} }
inst->history = inst->history =
eina_list_prepend(inst->history, eina_stringshare_ref(realpath)); eina_list_prepend(inst->history, eina_stringshare_ref(real_path));
inst->current = inst->history; inst->current = inst->history;
} }
inst->ignore_dir = 0; inst->ignore_dir = 0;
if (!strcmp(realpath, "/")) if (!strcmp(real_path, "/"))
edje_object_signal_emit(inst->o_base, "e,state,up,disabled", "e"); edje_object_signal_emit(inst->o_base, "e,state,up,disabled", "e");
else else
edje_object_signal_emit(inst->o_base, "e,state,up,enabled", "e"); edje_object_signal_emit(inst->o_base, "e,state,up,enabled", "e");

View File

@ -293,8 +293,8 @@ _load_mimes(E_Config_Dialog_Data *cfdata, char *file)
FILE *f; FILE *f;
char buf[4096], mimetype[4096], ext[4096]; char buf[4096], mimetype[4096], ext[4096];
char *p, *pp; char *p, *pp;
Config_Mime *mime; Config_Mime *config_mime;
Config_Glob *glob; Config_Glob *config_glob;
if (!cfdata) return; if (!cfdata) return;
@ -319,21 +319,21 @@ _load_mimes(E_Config_Dialog_Data *cfdata, char *file)
while (!isblank(*p) && (*p != 0) && (*p != '\n')) p++; while (!isblank(*p) && (*p != 0) && (*p != '\n')) p++;
strncpy(ext, pp, (p - pp)); strncpy(ext, pp, (p - pp));
ext[p - pp] = 0; ext[p - pp] = 0;
mime = _find_mime(cfdata, mimetype); config_mime = _find_mime(cfdata, mimetype);
if (!mime) if (!config_mime)
{ {
mime = E_NEW(Config_Mime, 1); config_mime = E_NEW(Config_Mime, 1);
if (mime) if (config_mime)
{ {
mime->mime = eina_stringshare_add(mimetype); config_mime->mime = eina_stringshare_add(mimetype);
if (!mime->mime) if (!config_mime->mime)
free(mime); free(config_mime);
else else
{ {
glob = E_NEW(Config_Glob, 1); config_glob = E_NEW(Config_Glob, 1);
glob->name = eina_stringshare_add(ext); config_glob->name = eina_stringshare_add(ext);
mime->globs = eina_list_append(mime->globs, glob); config_mime->globs = eina_list_append(config_mime->globs, config_glob);
cfdata->mimes = eina_list_append(cfdata->mimes, mime); cfdata->mimes = eina_list_append(cfdata->mimes, config_mime);
} }
} }
} }
@ -349,8 +349,8 @@ _load_globs(E_Config_Dialog_Data *cfdata, char *file)
FILE *f; FILE *f;
char buf[4096], mimetype[4096], ext[4096]; char buf[4096], mimetype[4096], ext[4096];
char *p, *pp; char *p, *pp;
Config_Mime *mime; Config_Mime *config_mime;
Config_Glob *glob; Config_Glob *config_glob;
if (!cfdata) return; if (!cfdata) return;
@ -376,32 +376,32 @@ _load_globs(E_Config_Dialog_Data *cfdata, char *file)
p++; p++;
} }
*pp = 0; *pp = 0;
mime = _find_mime(cfdata, mimetype); config_mime = _find_mime(cfdata, mimetype);
if (!mime) if (!config_mime)
{ {
mime = E_NEW(Config_Mime, 1); config_mime = E_NEW(Config_Mime, 1);
if (mime) if (config_mime)
{ {
mime->mime = eina_stringshare_add(mimetype); config_mime->mime = eina_stringshare_add(mimetype);
if (!mime->mime) if (!config_mime->mime)
free(mime); free(config_mime);
else else
{ {
glob = E_NEW(Config_Glob, 1); config_glob = E_NEW(Config_Glob, 1);
glob->name = eina_stringshare_add(ext); config_glob->name = eina_stringshare_add(ext);
mime->globs = eina_list_append(mime->globs, glob); config_mime->globs = eina_list_append(config_mime->globs, config_glob);
cfdata->mimes = eina_list_append(cfdata->mimes, mime); cfdata->mimes = eina_list_append(cfdata->mimes, config_mime);
} }
} }
} }
else else
{ {
glob = _find_glob(mime, ext); config_glob = _find_glob(config_mime, ext);
if (!glob) if (!config_glob)
{ {
glob = E_NEW(Config_Glob, 1); config_glob = E_NEW(Config_Glob, 1);
glob->name = eina_stringshare_add(ext); config_glob->name = eina_stringshare_add(ext);
mime->globs = eina_list_append(mime->globs, glob); config_mime->globs = eina_list_append(config_mime->globs, config_glob);
} }
} }
} }
@ -498,7 +498,7 @@ _find_mime(E_Config_Dialog_Data *cfdata, char *mime)
} }
static Config_Glob * static Config_Glob *
_find_glob(Config_Mime *mime, char *glob) _find_glob(Config_Mime *mime, char *globing)
{ {
Config_Glob *g; Config_Glob *g;
Eina_List *l; Eina_List *l;
@ -507,7 +507,7 @@ _find_glob(Config_Mime *mime, char *glob)
EINA_LIST_FOREACH(mime->globs, l, g) EINA_LIST_FOREACH(mime->globs, l, g)
{ {
if (!g) continue; if (!g) continue;
if (strcmp(g->name, glob)) continue; if (strcmp(g->name, globing)) continue;
return g; return g;
} }
return NULL; return NULL;

View File

@ -8,7 +8,7 @@ struct _E_Config_Dialog_Data
/* general view mode */ /* general view mode */
struct struct
{ {
int mode; E_Fm2_View_Mode mode;
int open_dirs_in_place; int open_dirs_in_place;
int selector; int selector;
int single_click; int single_click;
@ -217,7 +217,7 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__,
o = e_widget_list_add(evas, 0, 0); o = e_widget_list_add(evas, 0, 0);
of = e_widget_framelist_add(evas, _("View Mode"), 0); of = e_widget_framelist_add(evas, _("View Mode"), 0);
rg = e_widget_radio_group_new(&(cfdata->view.mode)); rg = e_widget_radio_group_new((int*)&(cfdata->view.mode));
/* ob = e_widget_radio_add(evas, _("Icons"), 0, rg); */ /* ob = e_widget_radio_add(evas, _("Icons"), 0, rg); */
/* e_widget_disabled_set(ob, 1); */ /* e_widget_disabled_set(ob, 1); */
/* e_widget_framelist_object_append(of, ob); */ /* e_widget_framelist_object_append(of, ob); */

View File

@ -827,40 +827,40 @@ _attach_menu(void *data __UNUSED__, E_Gadcon_Client *gcc, E_Menu *menu)
static char * static char *
_get_bind_text(const char* action) _get_bind_text(const char* action)
{ {
E_Binding_Key *bind; E_Binding_Key *binding;
char b[256] = ""; char b[256] = "";
bind = e_bindings_key_get(action); binding = e_bindings_key_get(action);
if ((bind) && (bind->key)) if ((binding) && (binding->key))
{ {
if ((bind->mod) & (E_BINDING_MODIFIER_CTRL)) if ((binding->mod) & (E_BINDING_MODIFIER_CTRL))
strcat(b, _("CTRL")); strcat(b, _("CTRL"));
if ((bind->mod) & (E_BINDING_MODIFIER_ALT)) if ((binding->mod) & (E_BINDING_MODIFIER_ALT))
{ {
if (b[0]) strcat(b, " + "); if (b[0]) strcat(b, " + ");
strcat(b, _("ALT")); strcat(b, _("ALT"));
} }
if ((bind->mod) & (E_BINDING_MODIFIER_SHIFT)) if ((binding->mod) & (E_BINDING_MODIFIER_SHIFT))
{ {
if (b[0]) strcat(b, " + "); if (b[0]) strcat(b, " + ");
strcat(b, _("SHIFT")); strcat(b, _("SHIFT"));
} }
if ((bind->mod) & (E_BINDING_MODIFIER_WIN)) if ((binding->mod) & (E_BINDING_MODIFIER_WIN))
{ {
if (b[0]) strcat(b, " + "); if (b[0]) strcat(b, " + ");
strcat(b, _("WIN")); strcat(b, _("WIN"));
} }
if ((bind->key) && (bind->key[0])) if ((binding->key) && (binding->key[0]))
{ {
char *l; char *l;
if (b[0]) strcat(b, " + "); if (b[0]) strcat(b, " + ");
l = strdup(bind->key); l = strdup(binding->key);
l[0] = (char)toupper(bind->key[0]); l[0] = (char)toupper(binding->key[0]);
strcat(b, l); strcat(b, l);
free(l); free(l);
} }

View File

@ -3,8 +3,8 @@
#include "e_mod_notify.h" #include "e_mod_notify.h"
/* local function prototypes */ /* local function prototypes */
static int _e_mod_notify_cb_add(E_Notification_Daemon *daemon __UNUSED__, E_Notification *n); static int _e_mod_notify_cb_add(E_Notification_Daemon *d __UNUSED__, E_Notification *n);
static void _e_mod_notify_cb_del(E_Notification_Daemon *daemon __UNUSED__, unsigned int id); static void _e_mod_notify_cb_del(E_Notification_Daemon *d __UNUSED__, unsigned int id);
static Ind_Notify_Win *_e_mod_notify_find(unsigned int id); static Ind_Notify_Win *_e_mod_notify_find(unsigned int id);
static void _e_mod_notify_refresh(Ind_Notify_Win *nwin); static void _e_mod_notify_refresh(Ind_Notify_Win *nwin);
static Ind_Notify_Win *_e_mod_notify_merge(E_Notification *n); static Ind_Notify_Win *_e_mod_notify_merge(E_Notification *n);
@ -52,7 +52,7 @@ e_mod_notify_shutdown(void)
} }
static int static int
_e_mod_notify_cb_add(E_Notification_Daemon *daemon __UNUSED__, E_Notification *n) _e_mod_notify_cb_add(E_Notification_Daemon *d __UNUSED__, E_Notification *n)
{ {
Ind_Notify_Win *nwin; Ind_Notify_Win *nwin;
unsigned int replace; unsigned int replace;
@ -105,7 +105,7 @@ _e_mod_notify_cb_add(E_Notification_Daemon *daemon __UNUSED__, E_Notification *n
} }
static void static void
_e_mod_notify_cb_del(E_Notification_Daemon *daemon __UNUSED__, unsigned int id) _e_mod_notify_cb_del(E_Notification_Daemon *d __UNUSED__, unsigned int id)
{ {
const Eina_List *l; const Eina_List *l;
Ind_Notify_Win *nwin; Ind_Notify_Win *nwin;

View File

@ -1216,7 +1216,7 @@ _e_kbd_int_layouts_list_update(E_Kbd_Int *ki)
kil = E_NEW(E_Kbd_Int_Layout, 1); kil = E_NEW(E_Kbd_Int_Layout, 1);
if (kil) if (kil)
{ {
char *s, *p; char *s;
FILE *f; FILE *f;
kil->path = path; kil->path = path;
@ -1241,7 +1241,6 @@ _e_kbd_int_layouts_list_update(E_Kbd_Int *ki)
while (fgets(buf, sizeof(buf), f)) while (fgets(buf, sizeof(buf), f))
{ {
int len;
char str[4096]; char str[4096];
if (!isok) if (!isok)

View File

@ -146,7 +146,7 @@ _e_mod_kbd_device_ignore_load_file(const char *file)
#ifdef HAVE_EEZE #ifdef HAVE_EEZE
static void static void
_e_mod_kbd_device_udev_event(const char *device, Eeze_Udev_Event event, void *data __UNUSED__, Eeze_Udev_Watch *watch __UNUSED__) _e_mod_kbd_device_udev_event(const char *device, Eeze_Udev_Event event, void *data __UNUSED__, Eeze_Udev_Watch *w __UNUSED__)
{ {
if ((!device) || (!event)) return; if ((!device) || (!event)) return;

View File

@ -7,7 +7,6 @@ static void _policy_border_set_focus(E_Border *bd);
static void _policy_border_move(E_Border *bd, int x, int y); static void _policy_border_move(E_Border *bd, int x, int y);
static void _policy_border_resize(E_Border *bd, int w, int h); static void _policy_border_resize(E_Border *bd, int w, int h);
static void _policy_border_hide_below(E_Border *bd); static void _policy_border_hide_below(E_Border *bd);
static void _policy_border_show_below(E_Border *bd);
static void _policy_zone_layout_update(E_Zone *zone); static void _policy_zone_layout_update(E_Zone *zone);
static void _policy_zone_layout_indicator(E_Border *bd, E_Illume_Config_Zone *cz); static void _policy_zone_layout_indicator(E_Border *bd, E_Illume_Config_Zone *cz);
static void _policy_zone_layout_quickpanel(E_Border *bd); static void _policy_zone_layout_quickpanel(E_Border *bd);
@ -164,6 +163,7 @@ _policy_border_hide_below(E_Border *bd)
} }
} }
#if 0
static void static void
_policy_border_show_below(E_Border *bd) _policy_border_show_below(E_Border *bd)
{ {
@ -243,6 +243,7 @@ _policy_border_show_below(E_Border *bd)
/* Fallback to focusing home if all above fails */ /* Fallback to focusing home if all above fails */
_policy_focus_home(bd->zone); _policy_focus_home(bd->zone);
} }
#endif
static void static void
_policy_zone_layout_update(E_Zone *zone) _policy_zone_layout_update(E_Zone *zone)

View File

@ -545,7 +545,7 @@ _find_channel_by_name(E_Mixer_App_Dialog_Data *app, const char *channel_name)
if (app->channels_infos) if (app->channels_infos)
{ {
struct channel_info *info = app->channels_infos->data; info = app->channels_infos->data;
header_input = !!info->has_capture; header_input = !!info->has_capture;
i = 1; i = 1;

View File

@ -181,12 +181,14 @@ _mixer_gadget_configuration_free_foreach(const Eina_Hash *hash __UNUSED__, const
return 1; return 1;
} }
#if 0
static Eina_Bool static Eina_Bool
_mixer_module_configuration_alert(void *data) _mixer_module_configuration_alert(void *data)
{ {
e_util_dialog_show(_("Mixer Settings Updated"), "%s", (char *)data); e_util_dialog_show(_("Mixer Settings Updated"), "%s", (char *)data);
return ECORE_CALLBACK_CANCEL; return ECORE_CALLBACK_CANCEL;
} }
#endif
static E_Mixer_Module_Config * static E_Mixer_Module_Config *
_mixer_module_configuration_new(void) _mixer_module_configuration_new(void)
@ -506,18 +508,16 @@ _mixer_popup_input_window_key_down_cb(void *data, int type __UNUSED__, void *eve
{ {
E_Action *act; E_Action *act;
Eina_List *l; Eina_List *l;
E_Config_Binding_Key *bind; E_Config_Binding_Key *binding;
E_Binding_Modifier mod; E_Binding_Modifier mod;
Eina_Bool handled = EINA_FALSE; Eina_Bool handled = EINA_FALSE;
for (l = e_config->key_bindings; l; l = l->next) EINA_LIST_FOREACH(e_config->key_bindings, l, binding)
{ {
bind = l->data; if (binding->action &&
(strcmp(binding->action, "volume_increase") &&
if (bind->action && strcmp(binding->action, "volume_decrease") &&
(strcmp(bind->action, "volume_increase") && strcmp(binding->action, "volume_mute")))
strcmp(bind->action, "volume_decrease") &&
strcmp(bind->action, "volume_mute")))
continue; continue;
mod = 0; mod = 0;
@ -531,14 +531,14 @@ _mixer_popup_input_window_key_down_cb(void *data, int type __UNUSED__, void *eve
if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN)
mod |= E_BINDING_MODIFIER_WIN; mod |= E_BINDING_MODIFIER_WIN;
if (bind->key && (!strcmp(bind->key, ev->keyname)) && if (binding->key && (!strcmp(binding->key, ev->keyname)) &&
((bind->modifiers == mod) || (bind->any_mod))) ((binding->modifiers == mod) || (binding->any_mod)))
{ {
if (!(act = e_action_find(bind->action))) continue; if (!(act = e_action_find(binding->action))) continue;
if (act->func.go_key) if (act->func.go_key)
act->func.go_key(E_OBJECT(inst->gcc->gadcon->zone), bind->params, ev); act->func.go_key(E_OBJECT(inst->gcc->gadcon->zone), binding->params, ev);
else if (act->func.go) else if (act->func.go)
act->func.go(E_OBJECT(inst->gcc->gadcon->zone), bind->params); act->func.go(E_OBJECT(inst->gcc->gadcon->zone), binding->params);
handled = EINA_TRUE; handled = EINA_TRUE;
} }
} }

View File

@ -253,12 +253,12 @@ static Eina_Bool
fdh_func(Pulse *conn, Ecore_Fd_Handler *fdh) fdh_func(Pulse *conn, Ecore_Fd_Handler *fdh)
{ {
Pulse_Tag *rprev, *wprev; Pulse_Tag *rprev, *wprev;
int read, write; int pa_read, pa_write;
if (conn->watching) read = ECORE_FD_READ; if (conn->watching) pa_read = ECORE_FD_READ;
else else
read = !!ecore_main_fd_handler_active_get(fdh, ECORE_FD_READ) * ECORE_FD_READ; pa_read = !!ecore_main_fd_handler_active_get(fdh, ECORE_FD_READ) * ECORE_FD_READ;
write = !!ecore_main_fd_handler_active_get(fdh, ECORE_FD_WRITE) * ECORE_FD_WRITE; pa_write = !!ecore_main_fd_handler_active_get(fdh, ECORE_FD_WRITE) * ECORE_FD_WRITE;
rprev = eina_list_data_get(conn->iq); rprev = eina_list_data_get(conn->iq);
wprev = eina_list_data_get(conn->oq); wprev = eina_list_data_get(conn->oq);
@ -285,7 +285,7 @@ fdh_func(Pulse *conn, Ecore_Fd_Handler *fdh)
login_finish(conn, fdh); login_finish(conn, fdh);
break; break;
case PA_STATE_MOREAUTH: case PA_STATE_MOREAUTH:
if (write) if (pa_write)
{ {
if (msg_send(conn, wprev)) if (msg_send(conn, wprev))
ecore_main_fd_handler_active_set(fdh, ECORE_FD_READ); ecore_main_fd_handler_active_set(fdh, ECORE_FD_READ);
@ -300,7 +300,7 @@ fdh_func(Pulse *conn, Ecore_Fd_Handler *fdh)
} }
break; break;
case PA_STATE_CONNECTED: case PA_STATE_CONNECTED:
if (write) if (pa_write)
{ {
if (wprev) if (wprev)
{ {
@ -316,7 +316,7 @@ fdh_func(Pulse *conn, Ecore_Fd_Handler *fdh)
else else
ecore_main_fd_handler_active_set(conn->fdh, ECORE_FD_READ); ecore_main_fd_handler_active_set(conn->fdh, ECORE_FD_READ);
} }
if (read) if (pa_read)
{ {
DBG("read"); DBG("read");
if ((!rprev) || (!rprev->auth) || (rprev->pos < rprev->dsize)) if ((!rprev) || (!rprev->auth) || (rprev->pos < rprev->dsize))
@ -330,7 +330,7 @@ fdh_func(Pulse *conn, Ecore_Fd_Handler *fdh)
eina_hash_del_by_key(conn->tag_handlers, &tag->tag_count); eina_hash_del_by_key(conn->tag_handlers, &tag->tag_count);
deserialize_tag(conn, command, tag); deserialize_tag(conn, command, tag);
if (!eina_list_count(conn->oq)) if (!eina_list_count(conn->oq))
ecore_main_fd_handler_active_set(conn->fdh, write | conn->watching * ECORE_FD_READ); ecore_main_fd_handler_active_set(conn->fdh, pa_write | conn->watching * ECORE_FD_READ);
pulse_tag_free(tag); pulse_tag_free(tag);
} }
} }
@ -365,7 +365,7 @@ uint32_t
pulse_cards_get(Pulse *conn) pulse_cards_get(Pulse *conn)
{ {
Pulse_Tag *tag; Pulse_Tag *tag;
int read; int pa_read;
uint32_t type = PA_COMMAND_GET_CARD_INFO_LIST; uint32_t type = PA_COMMAND_GET_CARD_INFO_LIST;
EINA_SAFETY_ON_NULL_RETURN_VAL(conn, 0); EINA_SAFETY_ON_NULL_RETURN_VAL(conn, 0);
@ -376,8 +376,8 @@ pulse_cards_get(Pulse *conn)
tag->tag_count = conn->tag_count; tag->tag_count = conn->tag_count;
tag_simple_init(conn, tag, type, PA_TAG_U32); tag_simple_init(conn, tag, type, PA_TAG_U32);
tag_finish(tag); tag_finish(tag);
read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ; pa_read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ;
ecore_main_fd_handler_active_set(conn->fdh, read | ECORE_FD_WRITE); ecore_main_fd_handler_active_set(conn->fdh, pa_read | ECORE_FD_WRITE);
conn->oq = eina_list_append(conn->oq, tag); conn->oq = eina_list_append(conn->oq, tag);
eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type)); eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type));
return tag->tag_count; return tag->tag_count;
@ -396,7 +396,7 @@ uint32_t
pulse_type_get(Pulse *conn, uint32_t idx, Eina_Bool source) pulse_type_get(Pulse *conn, uint32_t idx, Eina_Bool source)
{ {
Pulse_Tag *tag; Pulse_Tag *tag;
int read; int pa_read;
uint32_t type = source ? PA_COMMAND_GET_SOURCE_INFO : PA_COMMAND_GET_SINK_INFO; uint32_t type = source ? PA_COMMAND_GET_SOURCE_INFO : PA_COMMAND_GET_SINK_INFO;
EINA_SAFETY_ON_NULL_RETURN_VAL(conn, 0); EINA_SAFETY_ON_NULL_RETURN_VAL(conn, 0);
@ -409,8 +409,8 @@ pulse_type_get(Pulse *conn, uint32_t idx, Eina_Bool source)
tag_uint32(tag, idx); tag_uint32(tag, idx);
tag_string(tag, NULL); tag_string(tag, NULL);
tag_finish(tag); tag_finish(tag);
read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ; pa_read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ;
ecore_main_fd_handler_active_set(conn->fdh, read | ECORE_FD_WRITE); ecore_main_fd_handler_active_set(conn->fdh, pa_read | ECORE_FD_WRITE);
conn->oq = eina_list_append(conn->oq, tag); conn->oq = eina_list_append(conn->oq, tag);
eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type)); eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type));
return tag->tag_count; return tag->tag_count;
@ -420,7 +420,7 @@ uint32_t
pulse_types_get(Pulse *conn, Eina_Bool source) pulse_types_get(Pulse *conn, Eina_Bool source)
{ {
Pulse_Tag *tag; Pulse_Tag *tag;
int read; int pa_read;
uint32_t type = source ? PA_COMMAND_GET_SOURCE_INFO_LIST : PA_COMMAND_GET_SINK_INFO_LIST; uint32_t type = source ? PA_COMMAND_GET_SOURCE_INFO_LIST : PA_COMMAND_GET_SINK_INFO_LIST;
EINA_SAFETY_ON_NULL_RETURN_VAL(conn, 0); EINA_SAFETY_ON_NULL_RETURN_VAL(conn, 0);
@ -431,8 +431,8 @@ pulse_types_get(Pulse *conn, Eina_Bool source)
tag->tag_count = conn->tag_count; tag->tag_count = conn->tag_count;
tag_simple_init(conn, tag, type, PA_TAG_U32); tag_simple_init(conn, tag, type, PA_TAG_U32);
tag_finish(tag); tag_finish(tag);
read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ; pa_read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ;
ecore_main_fd_handler_active_set(conn->fdh, read | ECORE_FD_WRITE); ecore_main_fd_handler_active_set(conn->fdh, pa_read | ECORE_FD_WRITE);
conn->oq = eina_list_append(conn->oq, tag); conn->oq = eina_list_append(conn->oq, tag);
eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type)); eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type));
return tag->tag_count; return tag->tag_count;
@ -442,7 +442,7 @@ uint32_t
pulse_type_mute_set(Pulse *conn, uint32_t sink_num, Eina_Bool mute, Eina_Bool source) pulse_type_mute_set(Pulse *conn, uint32_t sink_num, Eina_Bool mute, Eina_Bool source)
{ {
Pulse_Tag *tag; Pulse_Tag *tag;
int read; int pa_read;
uint32_t type = source ? PA_COMMAND_SET_SOURCE_MUTE : PA_COMMAND_SET_SINK_MUTE; uint32_t type = source ? PA_COMMAND_SET_SOURCE_MUTE : PA_COMMAND_SET_SINK_MUTE;
Eina_Hash *h; Eina_Hash *h;
@ -457,8 +457,8 @@ pulse_type_mute_set(Pulse *conn, uint32_t sink_num, Eina_Bool mute, Eina_Bool so
tag_string(tag, NULL); tag_string(tag, NULL);
tag_bool(tag, !!mute); tag_bool(tag, !!mute);
tag_finish(tag); tag_finish(tag);
read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ; pa_read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ;
ecore_main_fd_handler_active_set(conn->fdh, read | ECORE_FD_WRITE); ecore_main_fd_handler_active_set(conn->fdh, pa_read | ECORE_FD_WRITE);
conn->oq = eina_list_append(conn->oq, tag); conn->oq = eina_list_append(conn->oq, tag);
eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type)); eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type));
h = (source) ? pulse_sources : pulse_sinks; h = (source) ? pulse_sources : pulse_sinks;
@ -476,7 +476,7 @@ uint32_t
pulse_type_volume_set(Pulse *conn, uint32_t sink_num, uint8_t channels, double vol, Eina_Bool source) pulse_type_volume_set(Pulse *conn, uint32_t sink_num, uint8_t channels, double vol, Eina_Bool source)
{ {
Pulse_Tag *tag; Pulse_Tag *tag;
int read; int pa_read;
uint32_t type = source ? PA_COMMAND_SET_SOURCE_MUTE : PA_COMMAND_SET_SINK_VOLUME; uint32_t type = source ? PA_COMMAND_SET_SOURCE_MUTE : PA_COMMAND_SET_SINK_VOLUME;
EINA_SAFETY_ON_NULL_RETURN_VAL(conn, 0); EINA_SAFETY_ON_NULL_RETURN_VAL(conn, 0);
@ -490,8 +490,8 @@ pulse_type_volume_set(Pulse *conn, uint32_t sink_num, uint8_t channels, double v
tag_string(tag, NULL); tag_string(tag, NULL);
tag_volume(tag, channels, vol); tag_volume(tag, channels, vol);
tag_finish(tag); tag_finish(tag);
read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ; pa_read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ;
ecore_main_fd_handler_active_set(conn->fdh, read | ECORE_FD_WRITE); ecore_main_fd_handler_active_set(conn->fdh, pa_read | ECORE_FD_WRITE);
conn->oq = eina_list_append(conn->oq, tag); conn->oq = eina_list_append(conn->oq, tag);
eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type)); eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type));
return tag->tag_count; return tag->tag_count;
@ -501,7 +501,7 @@ uint32_t
pulse_sink_channel_volume_set(Pulse *conn, Pulse_Sink *sink, uint32_t id, double vol) pulse_sink_channel_volume_set(Pulse *conn, Pulse_Sink *sink, uint32_t id, double vol)
{ {
Pulse_Tag *tag; Pulse_Tag *tag;
int read; int pa_read;
uint32_t type; uint32_t type;
EINA_SAFETY_ON_NULL_RETURN_VAL(conn, 0); EINA_SAFETY_ON_NULL_RETURN_VAL(conn, 0);
@ -519,8 +519,8 @@ pulse_sink_channel_volume_set(Pulse *conn, Pulse_Sink *sink, uint32_t id, double
tag_string(tag, NULL); tag_string(tag, NULL);
tag_cvol(tag, &sink->volume); tag_cvol(tag, &sink->volume);
tag_finish(tag); tag_finish(tag);
read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ; pa_read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ;
ecore_main_fd_handler_active_set(conn->fdh, read | ECORE_FD_WRITE); ecore_main_fd_handler_active_set(conn->fdh, pa_read | ECORE_FD_WRITE);
conn->oq = eina_list_append(conn->oq, tag); conn->oq = eina_list_append(conn->oq, tag);
eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type)); eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type));
return tag->tag_count; return tag->tag_count;
@ -530,7 +530,7 @@ uint32_t
pulse_sink_port_set(Pulse *conn, Pulse_Sink *sink, const char *port) pulse_sink_port_set(Pulse *conn, Pulse_Sink *sink, const char *port)
{ {
Pulse_Tag *tag; Pulse_Tag *tag;
int read; int pa_read;
uint32_t type; uint32_t type;
Eina_List *l; Eina_List *l;
const char *p; const char *p;
@ -555,8 +555,8 @@ pulse_sink_port_set(Pulse *conn, Pulse_Sink *sink, const char *port)
tag_string(tag, sink->name); tag_string(tag, sink->name);
tag_string(tag, port); tag_string(tag, port);
tag_finish(tag); tag_finish(tag);
read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ; pa_read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ;
ecore_main_fd_handler_active_set(conn->fdh, read | ECORE_FD_WRITE); ecore_main_fd_handler_active_set(conn->fdh, pa_read | ECORE_FD_WRITE);
conn->oq = eina_list_append(conn->oq, tag); conn->oq = eina_list_append(conn->oq, tag);
eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type)); eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type));
return tag->tag_count; return tag->tag_count;
@ -620,7 +620,7 @@ pulse_new(void)
Pulse *conn; Pulse *conn;
Eina_Iterator *it; Eina_Iterator *it;
const char *prev = NULL, *buf = NULL;; const char *prev = NULL, *buf = NULL;;
time_t time = 0; time_t t = 0;
char *home, h[4096]; char *home, h[4096];
const Eina_File_Direct_Info *info; const Eina_File_Direct_Info *info;
@ -653,14 +653,14 @@ pulse_new(void)
buf = NULL; buf = NULL;
continue; continue;
} }
if (!time) if (!t)
{ {
time = st.st_atime; t = st.st_atime;
prev = buf; prev = buf;
buf = NULL; buf = NULL;
continue; continue;
} }
if (time > st.st_atime) if (t > st.st_atime)
{ {
eina_stringshare_del(buf); eina_stringshare_del(buf);
buf = NULL; buf = NULL;
@ -668,7 +668,7 @@ pulse_new(void)
} }
eina_stringshare_del(prev); eina_stringshare_del(prev);
prev = buf; prev = buf;
time = st.st_atime; t = st.st_atime;
buf = NULL; buf = NULL;
} }
} }

View File

@ -494,7 +494,7 @@ e_mixer_system_set_volume(E_Mixer_System *self,
int left, int left,
int right) int right)
{ {
long range, min, max, div; long range, min, max, divide;
int mode; int mode;
if ((!self) || (!channel)) if ((!self) || (!channel))
@ -502,10 +502,10 @@ e_mixer_system_set_volume(E_Mixer_System *self,
snd_mixer_handle_events(self); snd_mixer_handle_events(self);
snd_mixer_selem_get_playback_volume_range(channel, &min, &max); snd_mixer_selem_get_playback_volume_range(channel, &min, &max);
div = 100 + min; divide = 100 + min;
if (div == 0) if (divide == 0)
{ {
div = 1; /* no zero-division */ divide = 1; /* no zero-division */
min++; min++;
} }
@ -516,13 +516,13 @@ e_mixer_system_set_volume(E_Mixer_System *self,
mode = 0; mode = 0;
if (left >= 0) if (left >= 0)
{ {
left = (((range * left) + (range / 2)) / div) - min; left = (((range * left) + (range / 2)) / divide) - min;
mode |= 1; mode |= 1;
} }
if (right >= 0) if (right >= 0)
{ {
right = (((range * right) + (range / 2)) / div) - min; right = (((range * right) + (range / 2)) / divide) - min;
mode |= 2; mode |= 2;
} }

View File

@ -435,14 +435,14 @@ e_modapi_save(E_Module *m __UNUSED__)
/* Callbacks */ /* Callbacks */
static int static int
_notification_cb_notify(E_Notification_Daemon *daemon __UNUSED__, _notification_cb_notify(E_Notification_Daemon *d __UNUSED__,
E_Notification *n) E_Notification *n)
{ {
return _notification_notify(n); return _notification_notify(n);
} }
static void static void
_notification_cb_close_notification(E_Notification_Daemon *daemon __UNUSED__, _notification_cb_close_notification(E_Notification_Daemon *d __UNUSED__,
unsigned int id) unsigned int id)
{ {
notification_popup_close(id); notification_popup_close(id);

View File

@ -1126,7 +1126,7 @@ _pager_window_desk_change(Pager *pager, E_Border *bd)
if (pd) if (pd)
{ {
Pager_Win *pw2 = NULL; Pager_Win *pw2 = NULL;
E_Border *bd; E_Border *bd_above;
/* remove it from whatever desk it was on */ /* remove it from whatever desk it was on */
pw->desk->wins = eina_list_remove(pw->desk->wins, pw); pw->desk->wins = eina_list_remove(pw->desk->wins, pw);
@ -1137,9 +1137,9 @@ _pager_window_desk_change(Pager *pager, E_Border *bd)
pd->wins = eina_list_append(pd->wins, pw); pd->wins = eina_list_append(pd->wins, pw);
e_layout_pack(pd->o_layout, pw->o_window); e_layout_pack(pd->o_layout, pw->o_window);
bd = e_util_desk_border_above(pw->border); bd_above = e_util_desk_border_above(pw->border);
if (bd) if (bd_above)
pw2 = _pager_desk_window_find(pd, bd); pw2 = _pager_desk_window_find(pd, bd_above);
if (pw2) if (pw2)
e_layout_child_lower_below(pw->o_window, pw2->o_window); e_layout_child_lower_below(pw->o_window, pw2->o_window);
else else
@ -1162,12 +1162,12 @@ _pager_window_desk_change(Pager *pager, E_Border *bd)
if (pw) if (pw)
{ {
Pager_Win *pw2 = NULL; Pager_Win *pw2 = NULL;
E_Border *bd; E_Border *bd_above;
pd->wins = eina_list_append(pd->wins, pw); pd->wins = eina_list_append(pd->wins, pw);
bd = e_util_desk_border_above(pw->border); bd_above = e_util_desk_border_above(pw->border);
if (bd) if (bd_above)
pw2 = _pager_desk_window_find(pd, bd); pw2 = _pager_desk_window_find(pd, bd_above);
if (pw2) if (pw2)
e_layout_child_lower_below(pw->o_window, pw2->o_window); e_layout_child_lower_below(pw->o_window, pw2->o_window);
else else
@ -1186,12 +1186,12 @@ _pager_window_desk_change(Pager *pager, E_Border *bd)
if (pw) if (pw)
{ {
Pager_Win *pw2 = NULL; Pager_Win *pw2 = NULL;
E_Border *bd; E_Border *bd_above;
pd->wins = eina_list_append(pd->wins, pw); pd->wins = eina_list_append(pd->wins, pw);
bd = e_util_desk_border_above(pw->border); bd_above = e_util_desk_border_above(pw->border);
if (bd) if (bd_above)
pw2 = _pager_desk_window_find(pd, bd); pw2 = _pager_desk_window_find(pd, bd_above);
if (pw2) if (pw2)
e_layout_child_lower_below(pw->o_window, pw2->o_window); e_layout_child_lower_below(pw->o_window, pw2->o_window);
else else
@ -1524,8 +1524,6 @@ _pager_cb_event_border_property(void *data __UNUSED__, int type __UNUSED__, void
pd = _pager_desk_find(p, ev->border->desk); pd = _pager_desk_find(p, ev->border->desk);
if (pd) if (pd)
{ {
Pager_Win *pw;
pw = _pager_window_new(pd, ev->border); pw = _pager_window_new(pd, ev->border);
if (pw) if (pw)
{ {
@ -2581,14 +2579,14 @@ _pager_popup_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event
_pager_popup_hide(0); _pager_popup_hide(0);
else else
{ {
E_Config_Binding_Key *bind; E_Config_Binding_Key *binding;
Eina_List *l; Eina_List *l;
EINA_LIST_FOREACH(e_config->key_bindings, l, bind) EINA_LIST_FOREACH(e_config->key_bindings, l, binding)
{ {
E_Binding_Modifier mod = 0; E_Binding_Modifier mod = 0;
if ((bind->action) && (strcmp(bind->action,"pager_switch"))) if ((binding->action) && (strcmp(binding->action,"pager_switch")))
continue; continue;
if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT)
@ -2600,17 +2598,17 @@ _pager_popup_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event
if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN)
mod |= E_BINDING_MODIFIER_WIN; mod |= E_BINDING_MODIFIER_WIN;
if (bind->key && (!strcmp(bind->key, ev->keyname)) && if (binding->key && (!strcmp(binding->key, ev->keyname)) &&
((bind->modifiers == (int) mod))) ((binding->modifiers == mod)))
{ {
E_Action *act; E_Action *act;
act = e_action_find(bind->action); act = e_action_find(binding->action);
if (act) if (act)
{ {
if (act->func.go_key) if (act->func.go_key)
act->func.go_key(NULL, bind->params, ev); act->func.go_key(NULL, binding->params, ev);
} }
} }
} }

View File

@ -605,7 +605,7 @@ static void
_systray_handle_request_dock(Instance *inst, Ecore_X_Event_Client_Message *ev) _systray_handle_request_dock(Instance *inst, Ecore_X_Event_Client_Message *ev)
{ {
Ecore_X_Window win = (Ecore_X_Window)ev->data.l[2]; Ecore_X_Window win = (Ecore_X_Window)ev->data.l[2];
Ecore_X_Time time; Ecore_X_Time t;
Ecore_X_Window_Attributes attr; Ecore_X_Window_Attributes attr;
const Eina_List *l; const Eina_List *l;
Icon *icon; Icon *icon;
@ -636,10 +636,10 @@ _systray_handle_request_dock(Instance *inst, Ecore_X_Event_Client_Message *ev)
return; return;
} }
time = ecore_x_current_time_get(); t = ecore_x_current_time_get();
ecore_x_client_message32_send(win, _atom_xembed, ecore_x_client_message32_send(win, _atom_xembed,
ECORE_X_EVENT_MASK_NONE, ECORE_X_EVENT_MASK_NONE,
time, XEMBED_EMBEDDED_NOTIFY, 0, t, XEMBED_EMBEDDED_NOTIFY, 0,
inst->win.selection, 0); inst->win.selection, 0);
} }
@ -1021,7 +1021,7 @@ static void
_gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient) _gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient)
{ {
Instance *inst = gcc->data; Instance *inst = gcc->data;
const char *signal; const char *sig;
unsigned int systray_orient; unsigned int systray_orient;
if (!inst) if (!inst)
@ -1030,74 +1030,74 @@ _gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient)
switch (orient) switch (orient)
{ {
case E_GADCON_ORIENT_FLOAT: case E_GADCON_ORIENT_FLOAT:
signal = "e,action,orient,float"; sig = "e,action,orient,float";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
break; break;
case E_GADCON_ORIENT_HORIZ: case E_GADCON_ORIENT_HORIZ:
signal = "e,action,orient,horiz"; sig = "e,action,orient,horiz";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
break; break;
case E_GADCON_ORIENT_VERT: case E_GADCON_ORIENT_VERT:
signal = "e,action,orient,vert"; sig = "e,action,orient,vert";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT;
break; break;
case E_GADCON_ORIENT_LEFT: case E_GADCON_ORIENT_LEFT:
signal = "e,action,orient,left"; sig = "e,action,orient,left";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT;
break; break;
case E_GADCON_ORIENT_RIGHT: case E_GADCON_ORIENT_RIGHT:
signal = "e,action,orient,right"; sig = "e,action,orient,right";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT;
break; break;
case E_GADCON_ORIENT_TOP: case E_GADCON_ORIENT_TOP:
signal = "e,action,orient,top"; sig = "e,action,orient,top";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
break; break;
case E_GADCON_ORIENT_BOTTOM: case E_GADCON_ORIENT_BOTTOM:
signal = "e,action,orient,bottom"; sig = "e,action,orient,bottom";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
break; break;
case E_GADCON_ORIENT_CORNER_TL: case E_GADCON_ORIENT_CORNER_TL:
signal = "e,action,orient,corner_tl"; sig = "e,action,orient,corner_tl";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
break; break;
case E_GADCON_ORIENT_CORNER_TR: case E_GADCON_ORIENT_CORNER_TR:
signal = "e,action,orient,corner_tr"; sig = "e,action,orient,corner_tr";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
break; break;
case E_GADCON_ORIENT_CORNER_BL: case E_GADCON_ORIENT_CORNER_BL:
signal = "e,action,orient,corner_bl"; sig = "e,action,orient,corner_bl";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
break; break;
case E_GADCON_ORIENT_CORNER_BR: case E_GADCON_ORIENT_CORNER_BR:
signal = "e,action,orient,corner_br"; sig = "e,action,orient,corner_br";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
break; break;
case E_GADCON_ORIENT_CORNER_LT: case E_GADCON_ORIENT_CORNER_LT:
signal = "e,action,orient,corner_lt"; sig = "e,action,orient,corner_lt";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT;
break; break;
case E_GADCON_ORIENT_CORNER_RT: case E_GADCON_ORIENT_CORNER_RT:
signal = "e,action,orient,corner_rt"; sig = "e,action,orient,corner_rt";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT;
break; break;
case E_GADCON_ORIENT_CORNER_LB: case E_GADCON_ORIENT_CORNER_LB:
signal = "e,action,orient,corner_lb"; sig = "e,action,orient,corner_lb";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT;
break; break;
case E_GADCON_ORIENT_CORNER_RB: case E_GADCON_ORIENT_CORNER_RB:
signal = "e,action,orient,corner_rb"; sig = "e,action,orient,corner_rb";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT;
break; break;
default: default:
signal = "e,action,orient,horiz"; sig = "e,action,orient,horiz";
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ; systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
} }
ecore_x_window_prop_card32_set ecore_x_window_prop_card32_set
(inst->win.selection, _atom_st_orient, &systray_orient, 1); (inst->win.selection, _atom_st_orient, &systray_orient, 1);
edje_object_signal_emit(inst->ui.gadget, signal, _sig_source); edje_object_signal_emit(inst->ui.gadget, sig, _sig_source);
edje_object_message_signal_process(inst->ui.gadget); edje_object_message_signal_process(inst->ui.gadget);
_systray_size_apply(inst); _systray_size_apply(inst);
} }

View File

@ -43,7 +43,7 @@ get_vdesk(Eina_List *vdesks,
* *
*/ */
static void * static void *
_create_data(E_Config_Dialog *cfd) _create_data(E_Config_Dialog *cfd __UNUSED__)
{ {
E_Config_Dialog_Data *cfdata = E_NEW(E_Config_Dialog_Data, 1); E_Config_Dialog_Data *cfdata = E_NEW(E_Config_Dialog_Data, 1);
@ -77,7 +77,7 @@ _create_data(E_Config_Dialog *cfd)
} }
static void static void
_free_data(E_Config_Dialog *cfd, _free_data(E_Config_Dialog *cfd __UNUSED__,
E_Config_Dialog_Data *cfdata) E_Config_Dialog_Data *cfdata)
{ {
eina_list_free(cfdata->config.vdesks); eina_list_free(cfdata->config.vdesks);
@ -141,7 +141,7 @@ _fill_zone_config(E_Zone *zone,
static void static void
_cb_zone_change(void *data, _cb_zone_change(void *data,
Evas_Object *obj) Evas_Object *obj __UNUSED__)
{ {
int n; int n;
E_Config_Dialog_Data *cfdata = data; E_Config_Dialog_Data *cfdata = data;
@ -158,7 +158,7 @@ _cb_zone_change(void *data,
} }
static Evas_Object * static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd, _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__,
Evas *evas, Evas *evas,
E_Config_Dialog_Data *cfdata) E_Config_Dialog_Data *cfdata)
{ {
@ -223,7 +223,7 @@ _basic_create_widgets(E_Config_Dialog *cfd,
} }
static int static int
_basic_apply_data(E_Config_Dialog *cfd, _basic_apply_data(E_Config_Dialog *cfd __UNUSED__,
E_Config_Dialog_Data *cfdata) E_Config_Dialog_Data *cfdata)
{ {
struct _Config_vdesk *vd; struct _Config_vdesk *vd;
@ -307,7 +307,7 @@ _basic_apply_data(E_Config_Dialog *cfd,
E_Config_Dialog * E_Config_Dialog *
e_int_config_tiling_module(E_Container *con, e_int_config_tiling_module(E_Container *con,
const char *params) const char *params __UNUSED__)
{ {
E_Config_Dialog *cfd; E_Config_Dialog *cfd;
E_Config_Dialog_View *v; E_Config_Dialog_View *v;

View File

@ -271,8 +271,8 @@ _theme_edje_object_set_aux(Evas_Object *obj, const char *group)
_theme_edje_object_set_aux(_obj, _group); _theme_edje_object_set_aux(_obj, _group);
static Eina_Bool static Eina_Bool
_info_hash_update(const Eina_Hash *hash, const void *key, _info_hash_update(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__,
void *data, void *fdata) void *data, void *fdata __UNUSED__)
{ {
Tiling_Info *tinfo = data; Tiling_Info *tinfo = data;
@ -499,9 +499,9 @@ end_special_input(void)
} }
static Eina_Bool static Eina_Bool
overlay_key_down(void *data, overlay_key_down(void *data __UNUSED__,
int type, int type __UNUSED__,
void *event) void *event)
{ {
Ecore_Event_Key *ev = event; Ecore_Event_Key *ev = event;
Border_Extra *extra; Border_Extra *extra;
@ -545,7 +545,7 @@ stop:
} }
static Eina_Bool static Eina_Bool
_timeout_cb(void *data) _timeout_cb(void *data __UNUSED__)
{ {
end_special_input(); end_special_input();
return ECORE_CALLBACK_CANCEL; return ECORE_CALLBACK_CANCEL;
@ -1137,8 +1137,8 @@ change_desk_conf(struct _Config_vdesk *newconf)
} }
static void static void
_e_mod_action_add_stack_cb(E_Object *obj, _e_mod_action_add_stack_cb(E_Object *obj __UNUSED__,
const char *params) const char *params __UNUSED__)
{ {
E_Desk *desk = get_current_desk(); E_Desk *desk = get_current_desk();
@ -1152,8 +1152,8 @@ _e_mod_action_add_stack_cb(E_Object *obj,
} }
static void static void
_e_mod_action_remove_stack_cb(E_Object *obj, _e_mod_action_remove_stack_cb(E_Object *obj __UNUSED__,
const char *params) const char *params __UNUSED__)
{ {
E_Desk *desk = get_current_desk(); E_Desk *desk = get_current_desk();
@ -1167,8 +1167,8 @@ _e_mod_action_remove_stack_cb(E_Object *obj,
} }
static void static void
_e_mod_action_tg_stack_cb(E_Object *obj, _e_mod_action_tg_stack_cb(E_Object *obj __UNUSED__,
const char *params) const char *params __UNUSED__)
{ {
E_Desk *desk = get_current_desk(); E_Desk *desk = get_current_desk();
@ -1633,8 +1633,8 @@ toggle_floating(E_Border *bd)
} }
static void static void
_e_mod_action_toggle_floating_cb(E_Object *obj, _e_mod_action_toggle_floating_cb(E_Object *obj __UNUSED__,
const char *params) const char *params __UNUSED__)
{ {
end_special_input(); end_special_input();
@ -1706,8 +1706,8 @@ _action_swap(E_Border *bd_1,
} }
static void static void
_e_mod_action_swap_cb(E_Object *obj, _e_mod_action_swap_cb(E_Object *obj __UNUSED__,
const char *params) const char *params __UNUSED__)
{ {
E_Desk *desk; E_Desk *desk;
E_Border *focused_bd; E_Border *focused_bd;
@ -2472,8 +2472,8 @@ _move_down_rows(void)
} }
static Eina_Bool static Eina_Bool
move_key_down(void *data, move_key_down(void *data __UNUSED__,
int type, int type __UNUSED__,
void *event) void *event)
{ {
Ecore_Event_Key *ev = event; Ecore_Event_Key *ev = event;
@ -2531,8 +2531,8 @@ stop:
} }
static void static void
_e_mod_action_move_cb(E_Object *obj, _e_mod_action_move_cb(E_Object *obj __UNUSED__,
const char *params) const char *params __UNUSED__)
{ {
E_Desk *desk; E_Desk *desk;
E_Border *focused_bd; E_Border *focused_bd;
@ -2768,8 +2768,8 @@ _transition_move_rows(tiling_move_t direction)
} }
static Eina_Bool static Eina_Bool
_transition_overlay_key_down(void *data, _transition_overlay_key_down(void *data __UNUSED__,
int type, int type __UNUSED__,
void *event) void *event)
{ {
Ecore_Event_Key *ev = event; Ecore_Event_Key *ev = event;
@ -3158,8 +3158,8 @@ _do_transition_overlay(void)
} }
static void static void
_e_mod_action_adjust_transitions(E_Object *obj, _e_mod_action_adjust_transitions(E_Object *obj __UNUSED__,
const char *params) const char *params __UNUSED__)
{ {
E_Desk *desk; E_Desk *desk;
@ -3179,7 +3179,7 @@ _e_mod_action_adjust_transitions(E_Object *obj,
/* Go {{{ */ /* Go {{{ */
static Eina_Bool static Eina_Bool
_warp_timer(void *_) _warp_timer(void *data __UNUSED__)
{ {
if (_G.warp_timer) { if (_G.warp_timer) {
double spd = TILING_WRAP_SPEED; double spd = TILING_WRAP_SPEED;
@ -3205,7 +3205,7 @@ _warp_timer(void *_)
} }
static void static void
_action_go(E_Border *_, _action_go(E_Border *data __UNUSED__,
Border_Extra *extra_2) Border_Extra *extra_2)
{ {
E_Border *bd = extra_2->border; E_Border *bd = extra_2->border;
@ -3219,8 +3219,8 @@ _action_go(E_Border *_,
} }
static void static void
_e_mod_action_go_cb(E_Object *obj, _e_mod_action_go_cb(E_Object *obj __UNUSED__,
const char *params) const char *params __UNUSED__)
{ {
E_Desk *desk; E_Desk *desk;
@ -3240,7 +3240,7 @@ _e_mod_action_go_cb(E_Object *obj,
/* Hooks {{{*/ /* Hooks {{{*/
static void static void
_pre_border_assign_hook(void *data, _pre_border_assign_hook(void *data __UNUSED__,
E_Border *bd) E_Border *bd)
{ {
if (tiling_g.config->show_titles) if (tiling_g.config->show_titles)
@ -3429,7 +3429,7 @@ static void _move_or_resize(E_Border *bd)
} }
static Eina_Bool static Eina_Bool
_resize_hook(void *data, int type, E_Event_Border_Resize *event) _resize_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Resize *event)
{ {
E_Border *bd = event->border; E_Border *bd = event->border;
@ -3439,7 +3439,7 @@ _resize_hook(void *data, int type, E_Event_Border_Resize *event)
} }
static Eina_Bool static Eina_Bool
_move_hook(void *data, int type, E_Event_Border_Move*event) _move_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Move*event)
{ {
E_Border *bd = event->border; E_Border *bd = event->border;
@ -3449,7 +3449,7 @@ _move_hook(void *data, int type, E_Event_Border_Move*event)
} }
static Eina_Bool static Eina_Bool
_add_hook(void *data, int type, E_Event_Border_Add *event) _add_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Add *event)
{ {
E_Border *bd = event->border; E_Border *bd = event->border;
int stack = -1; int stack = -1;
@ -3493,7 +3493,7 @@ _add_hook(void *data, int type, E_Event_Border_Add *event)
} }
static Eina_Bool static Eina_Bool
_remove_hook(void *data, int type, E_Event_Border_Remove *event) _remove_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Remove *event)
{ {
E_Border *bd = event->border; E_Border *bd = event->border;
@ -3517,7 +3517,7 @@ _remove_hook(void *data, int type, E_Event_Border_Remove *event)
} }
static bool static bool
_iconify_hook(void *_, int type, E_Event_Border_Iconify *event) _iconify_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Iconify *event)
{ {
E_Border *bd = event->border; E_Border *bd = event->border;
@ -3537,7 +3537,7 @@ _iconify_hook(void *_, int type, E_Event_Border_Iconify *event)
} }
static bool static bool
_uniconify_hook(void *_, int type, E_Event_Border_Uniconify *event) _uniconify_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Uniconify *event)
{ {
E_Border *bd = event->border; E_Border *bd = event->border;
int stack = -1; int stack = -1;
@ -3568,21 +3568,21 @@ _uniconify_hook(void *_, int type, E_Event_Border_Uniconify *event)
} }
static Eina_Bool static Eina_Bool
_stick_hook(void *data, int type, void *event) _stick_hook(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
{ {
DBG("TODO"); DBG("TODO");
return true; return true;
} }
static Eina_Bool static Eina_Bool
_unstick_hook(void *data, int type, void *event) _unstick_hook(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
{ {
DBG("TODO"); DBG("TODO");
return true; return true;
} }
static Eina_Bool static Eina_Bool
_desk_show_hook(void *data, int type, void *event) _desk_show_hook(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
{ {
_G.currently_switching_desktop = 0; _G.currently_switching_desktop = 0;
@ -3592,7 +3592,7 @@ _desk_show_hook(void *data, int type, void *event)
} }
static Eina_Bool static Eina_Bool
_desk_before_show_hook(void *data, int type, void *event) _desk_before_show_hook(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
{ {
end_special_input(); end_special_input();
@ -3602,7 +3602,7 @@ _desk_before_show_hook(void *data, int type, void *event)
} }
static bool static bool
_desk_set_hook(void *data, int type, E_Event_Border_Desk_Set *ev) _desk_set_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Border_Desk_Set *ev)
{ {
DBG("%p: from (%d,%d) to (%d,%d)", ev->border, DBG("%p: from (%d,%d) to (%d,%d)", ev->border,
ev->desk->x, ev->desk->y, ev->desk->x, ev->desk->y,
@ -3632,7 +3632,7 @@ _desk_set_hook(void *data, int type, E_Event_Border_Desk_Set *ev)
} }
static bool static bool
_container_resize_hook(void *_, int type, E_Event_Container_Resize *ev) _container_resize_hook(void *data __UNUSED__, int type __UNUSED__, E_Event_Container_Resize *ev)
{ {
Eina_List *l; Eina_List *l;
E_Zone *zone; E_Zone *zone;
@ -3705,7 +3705,6 @@ EAPI E_Module_Api e_modapi =
EAPI void * EAPI void *
e_modapi_init(E_Module *m) e_modapi_init(E_Module *m)
{ {
char buf[PATH_MAX];
E_Desk *desk; E_Desk *desk;
tiling_g.module = m; tiling_g.module = m;
@ -3833,7 +3832,7 @@ e_modapi_init(E_Module *m)
} }
EAPI int EAPI int
e_modapi_shutdown(E_Module *m) e_modapi_shutdown(E_Module *m __UNUSED__)
{ {
if (tiling_g.log_domain >= 0) { if (tiling_g.log_domain >= 0) {
@ -3908,7 +3907,7 @@ e_modapi_shutdown(E_Module *m)
} }
EAPI int EAPI int
e_modapi_save(E_Module *m) e_modapi_save(E_Module *m __UNUSED__)
{ {
e_config_domain_save("module.tiling", _G.config_edd, tiling_g.config); e_config_domain_save("module.tiling", _G.config_edd, tiling_g.config);

View File

@ -396,6 +396,7 @@ e_winlist_prev(void)
void void
e_winlist_left(E_Zone *zone) e_winlist_left(E_Zone *zone)
{ {
E_Border *bd;
Eina_List *l; Eina_List *l;
E_Desk *desk; E_Desk *desk;
E_Border *bd_orig; E_Border *bd_orig;
@ -414,9 +415,8 @@ e_winlist_left(E_Zone *zone)
desk = e_desk_current_get(zone); desk = e_desk_current_get(zone);
e_border_focus_track_freeze(); e_border_focus_track_freeze();
for (l = e_border_focus_stack_get(); l; l = l->next) EINA_LIST_FOREACH(e_border_focus_stack_get(), l, bd)
{ {
E_Border *bd = l->data;
int center_next; int center_next;
int delta_next; int delta_next;
@ -515,6 +515,7 @@ e_winlist_left(E_Zone *zone)
void void
e_winlist_down(E_Zone *zone) e_winlist_down(E_Zone *zone)
{ {
E_Border *bd;
Eina_List *l; Eina_List *l;
E_Desk *desk; E_Desk *desk;
E_Border *bd_orig; E_Border *bd_orig;
@ -533,9 +534,8 @@ e_winlist_down(E_Zone *zone)
desk = e_desk_current_get(zone); desk = e_desk_current_get(zone);
e_border_focus_track_freeze(); e_border_focus_track_freeze();
for (l = e_border_focus_stack_get(); l; l = l->next) EINA_LIST_FOREACH(e_border_focus_stack_get(), l, bd)
{ {
E_Border *bd = l->data;
int center_next; int center_next;
int delta_next; int delta_next;
@ -634,6 +634,7 @@ e_winlist_down(E_Zone *zone)
void void
e_winlist_up(E_Zone *zone) e_winlist_up(E_Zone *zone)
{ {
E_Border *bd;
Eina_List *l; Eina_List *l;
E_Desk *desk; E_Desk *desk;
E_Border *bd_orig; E_Border *bd_orig;
@ -652,9 +653,8 @@ e_winlist_up(E_Zone *zone)
desk = e_desk_current_get(zone); desk = e_desk_current_get(zone);
e_border_focus_track_freeze(); e_border_focus_track_freeze();
for (l = e_border_focus_stack_get(); l; l = l->next) EINA_LIST_FOREACH(e_border_focus_stack_get(), l, bd)
{ {
E_Border *bd = l->data;
int center_next; int center_next;
int delta_next; int delta_next;
@ -753,6 +753,7 @@ e_winlist_up(E_Zone *zone)
void void
e_winlist_right(E_Zone *zone) e_winlist_right(E_Zone *zone)
{ {
E_Border *bd;
Eina_List *l; Eina_List *l;
E_Desk *desk; E_Desk *desk;
E_Border *bd_orig; E_Border *bd_orig;
@ -771,9 +772,8 @@ e_winlist_right(E_Zone *zone)
desk = e_desk_current_get(zone); desk = e_desk_current_get(zone);
e_border_focus_track_freeze(); e_border_focus_track_freeze();
for (l = e_border_focus_stack_get(); l; l = l->next) EINA_LIST_FOREACH(e_border_focus_stack_get(), l, bd)
{ {
E_Border *bd = l->data;
int center_next; int center_next;
int delta_next; int delta_next;
@ -1311,14 +1311,12 @@ _e_winlist_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
{ {
E_Action *act; E_Action *act;
Eina_List *l; Eina_List *l;
E_Config_Binding_Key *bind; E_Config_Binding_Key *binding;
E_Binding_Modifier mod; E_Binding_Modifier mod;
for (l = e_config->key_bindings; l; l = l->next) EINA_LIST_FOREACH(e_config->key_bindings, l, binding)
{ {
bind = l->data; if (binding->action && strcmp(binding->action, "winlist")) continue;
if (bind->action && strcmp(bind->action, "winlist")) continue;
mod = 0; mod = 0;
@ -1331,14 +1329,14 @@ _e_winlist_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN)
mod |= E_BINDING_MODIFIER_WIN; mod |= E_BINDING_MODIFIER_WIN;
if (bind->key && (!strcmp(bind->key, ev->keyname)) && if (binding->key && (!strcmp(binding->key, ev->keyname)) &&
((bind->modifiers == mod) || (bind->any_mod))) ((binding->modifiers == mod) || (binding->any_mod)))
{ {
if (!(act = e_action_find(bind->action))) continue; if (!(act = e_action_find(binding->action))) continue;
if (act->func.go_key) if (act->func.go_key)
act->func.go_key(E_OBJECT(_winlist->zone), bind->params, ev); act->func.go_key(E_OBJECT(_winlist->zone), binding->params, ev);
else if (act->func.go) else if (act->func.go)
act->func.go(E_OBJECT(_winlist->zone), bind->params); act->func.go(E_OBJECT(_winlist->zone), binding->params);
} }
} }
} }
@ -1351,7 +1349,7 @@ _e_winlist_cb_key_up(void *data __UNUSED__, int type __UNUSED__, void *event)
Ecore_Event_Key *ev; Ecore_Event_Key *ev;
E_Action *act; E_Action *act;
Eina_List *l; Eina_List *l;
E_Config_Binding_Key *bind; E_Config_Binding_Key *binding;
E_Binding_Modifier mod; E_Binding_Modifier mod;
ev = event; ev = event;
@ -1395,10 +1393,9 @@ _e_winlist_cb_key_up(void *data __UNUSED__, int type __UNUSED__, void *event)
} }
} }
for (l = e_config->key_bindings; l; l = l->next) EINA_LIST_FOREACH(e_config->key_bindings, l, binding)
{ {
bind = l->data; if (binding->action && strcmp(binding->action,"winlist")) continue;
if (bind->action && strcmp(bind->action,"winlist")) continue;
mod = 0; mod = 0;
if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT) if (ev->modifiers & ECORE_EVENT_MODIFIER_SHIFT)
@ -1410,14 +1407,14 @@ _e_winlist_cb_key_up(void *data __UNUSED__, int type __UNUSED__, void *event)
if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN) if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN)
mod |= E_BINDING_MODIFIER_WIN; mod |= E_BINDING_MODIFIER_WIN;
if (bind->key && (!strcmp(bind->key, ev->keyname)) && if (binding->key && (!strcmp(binding->key, ev->keyname)) &&
((bind->modifiers == mod) || (bind->any_mod))) ((binding->modifiers == mod) || (binding->any_mod)))
{ {
if (!(act = e_action_find(bind->action))) continue; if (!(act = e_action_find(binding->action))) continue;
if (act->func.end_key) if (act->func.end_key)
act->func.end_key(E_OBJECT(_winlist->zone), bind->params, ev); act->func.end_key(E_OBJECT(_winlist->zone), binding->params, ev);
else if (act->func.end) else if (act->func.end)
act->func.end(E_OBJECT(_winlist->zone), bind->params); act->func.end(E_OBJECT(_winlist->zone), binding->params);
} }
} }
@ -1587,12 +1584,13 @@ static void
_e_winlist_cb_item_mouse_in(void *data, Evas *evas, Evas_Object *obj, void *event_info) _e_winlist_cb_item_mouse_in(void *data, Evas *evas, Evas_Object *obj, void *event_info)
{ {
E_Winlist_Win *ww; E_Winlist_Win *ww;
E_Winlist_Win *lww;
Eina_List *l; Eina_List *l;
if (!(ww = data)) return; if (!(ww = data)) return;
if (!_wins) return; if (!_wins) return;
for (l = _wins; l; l = l->next) EINA_LIST_FOREACH(_wins, l, lww)
if (l->data == ww) break; if (lww == ww) break;
_e_winlist_deactivate(); _e_winlist_deactivate();
_win_selected = l; _win_selected = l;
_e_winlist_show_active(); _e_winlist_show_active();

View File

@ -20,25 +20,21 @@ static int next_prev = 0;
EAPI int EAPI int
e_wizard_init(void) e_wizard_init(void)
{ {
E_Manager *man;
Eina_List *l; Eina_List *l;
for (l = e_manager_list(); l; l = l->next) EINA_LIST_FOREACH(e_manager_list(), l, man)
{ {
E_Manager *man; E_Container *con;
Eina_List *l2; Eina_List *l2;
man = l->data; EINA_LIST_FOREACH(man->containers, l2, con)
for (l2 = man->containers; l2; l2 = l2->next)
{ {
E_Container *con;
Eina_List *l3; Eina_List *l3;
E_Zone *zone;
con = l2->data; EINA_LIST_FOREACH(con->zones, l3, zone)
for (l3 = con->zones; l3; l3 = l3->next)
{ {
E_Zone *zone;
zone = l3->data;
if (!pop) if (!pop)
pop = _e_wizard_main_new(zone); pop = _e_wizard_main_new(zone);
else else
@ -52,20 +48,19 @@ e_wizard_init(void)
EAPI int EAPI int
e_wizard_shutdown(void) e_wizard_shutdown(void)
{ {
E_Wizard_Page *pg;
E_Object *eo;
if (pop) if (pop)
{ {
e_object_del(E_OBJECT(pop)); e_object_del(E_OBJECT(pop));
pop = NULL; pop = NULL;
} }
while (pops)
{ EINA_LIST_FREE(pops, eo)
e_object_del(E_OBJECT(pops->data)); e_object_del(eo);
pops = eina_list_remove_list(pops, pops); EINA_LIST_FREE(pages, pg)
} e_wizard_page_del(pg);
while (pages)
{
e_wizard_page_del(pages->data);
}
return 1; return 1;
} }
@ -108,20 +103,21 @@ e_wizard_apply(void)
EAPI void EAPI void
e_wizard_next(void) e_wizard_next(void)
{ {
E_Wizard_Page *page;
Eina_List *l; Eina_List *l;
for (l = pages; l; l = l->next) EINA_LIST_FOREACH(pages, l, page)
{ {
if (l->data == curpage) if (page == curpage)
{ {
if (l->next) if (eina_list_next(l))
{ {
if (curpage) if (curpage)
{ {
if (curpage->hide) if (curpage->hide)
curpage->hide(curpage); curpage->hide(curpage);
} }
curpage = l->next->data; curpage = eina_list_data_get(eina_list_next(l));
if (!curpage->data) if (!curpage->data)
{ {
if (curpage->init) if (curpage->init)
@ -165,11 +161,11 @@ e_wizard_page_show(Evas_Object *obj)
EAPI E_Wizard_Page * EAPI E_Wizard_Page *
e_wizard_page_add(void *handle, e_wizard_page_add(void *handle,
int (*init) (E_Wizard_Page *pg), int (*init_cb) (E_Wizard_Page *pg),
int (*shutdown) (E_Wizard_Page *pg), int (*shutdown_cb) (E_Wizard_Page *pg),
int (*show) (E_Wizard_Page *pg), int (*show_cb) (E_Wizard_Page *pg),
int (*hide) (E_Wizard_Page *pg), int (*hide_cb) (E_Wizard_Page *pg),
int (*apply) (E_Wizard_Page *pg) int (*apply_cb) (E_Wizard_Page *pg)
) )
{ {
E_Wizard_Page *pg; E_Wizard_Page *pg;
@ -180,11 +176,11 @@ e_wizard_page_add(void *handle,
pg->handle = handle; pg->handle = handle;
pg->evas = pop->evas; pg->evas = pop->evas;
pg->init = init; pg->init = init_cb;
pg->shutdown = shutdown; pg->shutdown = shutdown_cb;
pg->show = show; pg->show = show_cb;
pg->hide = hide; pg->hide = hide_cb;
pg->apply = apply; pg->apply = apply_cb;
pages = eina_list_append(pages, pg); pages = eina_list_append(pages, pg);
@ -245,29 +241,29 @@ _e_wizard_next_eval(void)
static E_Popup * static E_Popup *
_e_wizard_main_new(E_Zone *zone) _e_wizard_main_new(E_Zone *zone)
{ {
E_Popup *pop; E_Popup *popup;
Evas_Object *o; Evas_Object *o;
Evas_Modifier_Mask mask; Evas_Modifier_Mask mask;
Eina_Bool kg; Eina_Bool kg;
pop = e_popup_new(zone, 0, 0, zone->w, zone->h); popup = e_popup_new(zone, 0, 0, zone->w, zone->h);
e_popup_layer_set(pop, 255); e_popup_layer_set(popup, 255);
o = edje_object_add(pop->evas); o = edje_object_add(popup->evas);
e_theme_edje_object_set(o, "base/theme/wizard", "e/wizard/main"); e_theme_edje_object_set(o, "base/theme/wizard", "e/wizard/main");
evas_object_move(o, 0, 0); evas_object_move(o, 0, 0);
evas_object_resize(o, zone->w, zone->h); evas_object_resize(o, zone->w, zone->h);
evas_object_show(o); evas_object_show(o);
edje_object_signal_callback_add(o, "e,action,next", "", edje_object_signal_callback_add(o, "e,action,next", "",
_e_wizard_cb_next, pop); _e_wizard_cb_next, popup);
o_bg = o; o_bg = o;
o = evas_object_rectangle_add(pop->evas); o = evas_object_rectangle_add(popup->evas);
mask = 0; mask = 0;
kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0); kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0);
if (!kg) if (!kg)
fprintf(stderr,"ERROR: unable to redirect \"Tab\" key events to object %p.\n", o); fprintf(stderr,"ERROR: unable to redirect \"Tab\" key events to object %p.\n", o);
mask = evas_key_modifier_mask_get(pop->evas, "Shift"); mask = evas_key_modifier_mask_get(popup->evas, "Shift");
kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0); kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0);
if (!kg) if (!kg)
fprintf(stderr,"ERROR: unable to redirect \"Tab\" key events to object %p.\n", o); fprintf(stderr,"ERROR: unable to redirect \"Tab\" key events to object %p.\n", o);
@ -280,40 +276,40 @@ _e_wizard_main_new(E_Zone *zone)
if (!kg) if (!kg)
fprintf(stderr,"ERROR: unable to redirect \"KP_Enter\" key events to object %p.\n", o); fprintf(stderr,"ERROR: unable to redirect \"KP_Enter\" key events to object %p.\n", o);
evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN, evas_object_event_callback_add(o, EVAS_CALLBACK_KEY_DOWN,
_e_wizard_cb_key_down, pop); _e_wizard_cb_key_down, popup);
/* set up next/prev buttons */ /* set up next/prev buttons */
edje_object_part_text_set(o_bg, "e.text.title", _("Welcome to Enlightenment")); edje_object_part_text_set(o_bg, "e.text.title", _("Welcome to Enlightenment"));
edje_object_signal_emit(o_bg, "e,state,next,disable", "e"); edje_object_signal_emit(o_bg, "e,state,next,disable", "e");
e_wizard_labels_update(); e_wizard_labels_update();
e_popup_edje_bg_object_set(pop, o_bg); e_popup_edje_bg_object_set(popup, o_bg);
e_popup_show(pop); e_popup_show(popup);
if (!e_grabinput_get(ecore_evas_software_x11_window_get(pop->ecore_evas), if (!e_grabinput_get(ecore_evas_software_x11_window_get(popup->ecore_evas),
1, ecore_evas_software_x11_window_get(pop->ecore_evas))) 1, ecore_evas_software_x11_window_get(popup->ecore_evas)))
{ {
e_object_del(E_OBJECT(pop)); e_object_del(E_OBJECT(popup));
pop = NULL; popup = NULL;
} }
return pop; return popup;
} }
static E_Popup * static E_Popup *
_e_wizard_extra_new(E_Zone *zone) _e_wizard_extra_new(E_Zone *zone)
{ {
E_Popup *pop; E_Popup *popup;
Evas_Object *o; Evas_Object *o;
pop = e_popup_new(zone, 0, 0, zone->w, zone->h); popup = e_popup_new(zone, 0, 0, zone->w, zone->h);
e_popup_layer_set(pop, 255); e_popup_layer_set(popup, 255);
o = edje_object_add(pop->evas); o = edje_object_add(popup->evas);
e_theme_edje_object_set(o, "base/theme/wizard", "e/wizard/extra"); e_theme_edje_object_set(o, "base/theme/wizard", "e/wizard/extra");
evas_object_move(o, 0, 0); evas_object_move(o, 0, 0);
evas_object_resize(o, zone->w, zone->h); evas_object_resize(o, zone->w, zone->h);
evas_object_show(o); evas_object_show(o);
e_popup_edje_bg_object_set(pop, o); e_popup_edje_bg_object_set(popup, o);
e_popup_show(pop); e_popup_show(popup);
return pop; return popup;
} }
static void static void

View File

@ -11,14 +11,14 @@ static int do_gl = 0;
static int do_vsync = 0; static int do_vsync = 0;
static int static int
match_file_glob(FILE *f, const char *glob) match_file_glob(FILE *f, const char *globbing)
{ {
char buf[32768]; char buf[32768];
int found = 0; int found = 0;
while (fgets(buf, sizeof(buf), f)) while (fgets(buf, sizeof(buf), f))
{ {
if (e_util_glob_match(buf, glob)) if (e_util_glob_match(buf, globbing))
{ {
found = 1; found = 1;
break; break;
@ -29,7 +29,7 @@ match_file_glob(FILE *f, const char *glob)
} }
static int static int
match_xorg_log(const char *glob) match_xorg_log(const char *globbing)
{ {
FILE *f; FILE *f;
int i; int i;
@ -41,7 +41,7 @@ match_xorg_log(const char *glob)
f = fopen(buf, "rb"); f = fopen(buf, "rb");
if (f) if (f)
{ {
if (match_file_glob(f, glob)) return 1; if (match_file_glob(f, globbing)) return 1;
} }
} }
return 0; return 0;