forked from enlightenment/enlightenment
parent
2d0970da9a
commit
c2a29811d5
52
src/bin/e.h
52
src/bin/e.h
|
@ -176,32 +176,32 @@ typedef struct _E_Rect E_Rect;
|
|||
while (0)
|
||||
|
||||
# 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) \
|
||||
{ \
|
||||
if (E_INTERSECTS(_x, _y, _w, _h, _cx, _cy, _cw, _ch)) \
|
||||
{ \
|
||||
if (_x < (_cx)) \
|
||||
{ \
|
||||
_w += _x - (_cx); \
|
||||
_x = (_cx); \
|
||||
if ((int)_w < 0) _w = 0; \
|
||||
} \
|
||||
if ((_x + _w) > ((_cx) + (_cw))) \
|
||||
_w = (_cx) + (_cw) - _x; \
|
||||
if (_y < (_cy)) \
|
||||
{ \
|
||||
_h += _y - (_cy); \
|
||||
_y = (_cy); \
|
||||
if ((int)_h < 0) _h = 0; \
|
||||
} \
|
||||
if ((_y + _h) > ((_cy) + (_ch))) \
|
||||
_h = (_cy) + (_ch) - _y; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_w = 0; _h = 0; \
|
||||
} \
|
||||
}
|
||||
# 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 ((int) _x < (int)(_cx)) \
|
||||
{ \
|
||||
_w += _x - (_cx); \
|
||||
_x = (_cx); \
|
||||
if ((int)_w < 0) _w = 0; \
|
||||
} \
|
||||
if ((int) (_x + _w) > (int) ((_cx) + (_cw))) \
|
||||
_w = (_cx) + (_cw) - _x; \
|
||||
if ((int) _y < (int) (_cy)) \
|
||||
{ \
|
||||
_h += _y - (_cy); \
|
||||
_y = (_cy); \
|
||||
if ((int)_h < 0) _h = 0; \
|
||||
} \
|
||||
if ((int) (_y + _h) > (int) ((_cy) + (_ch))) \
|
||||
_h = (_cy) + (_ch) - _y; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
_w = 0; _h = 0; \
|
||||
} \
|
||||
}
|
||||
|
||||
# define E_REMOTE_OPTIONS 1
|
||||
# define E_REMOTE_OUT 2
|
||||
|
|
|
@ -220,7 +220,7 @@ e_config_init(void)
|
|||
#define D _e_config_gadcon_edd
|
||||
E_CONFIG_VAL(D, T, name, STR);
|
||||
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_shelf_desk_edd = E_CONFIG_DD_NEW("E_Config_Shelf_Desk", E_Config_Shelf_Desk);
|
||||
|
|
|
@ -471,10 +471,10 @@ struct _E_Config_Desktop_Name
|
|||
|
||||
struct _E_Config_Gadcon
|
||||
{
|
||||
const char *name;
|
||||
int id;
|
||||
int zone;
|
||||
Eina_List *clients;
|
||||
const char *name;
|
||||
int id;
|
||||
unsigned int zone;
|
||||
Eina_List *clients;
|
||||
};
|
||||
|
||||
struct _E_Config_Gadcon_Client
|
||||
|
|
|
@ -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) \
|
||||
if (!_id) \
|
||||
{ \
|
||||
char buf[128]; \
|
||||
int num = 0; \
|
||||
_type *ci; \
|
||||
char *_buf; \
|
||||
int _num = 0; \
|
||||
_type *_ci; \
|
||||
if (_items) \
|
||||
{ \
|
||||
const char *p; \
|
||||
ci = eina_list_last(_items)->data; \
|
||||
p = strrchr (ci->id, '.'); \
|
||||
if (p) num = atoi (p + 1) + 1; \
|
||||
const char *_p; \
|
||||
_ci = eina_list_last(_items)->data; \
|
||||
_p = strrchr (_ci->id, '.'); \
|
||||
if (_p) _num = atoi (_p + 1) + 1; \
|
||||
} \
|
||||
snprintf (buf, sizeof (buf), "%s.%d", _gc_class.name, num); \
|
||||
_id = buf; \
|
||||
_buf = alloca(sizeof (char) * ((_gc_class.name ? strlen( _gc_class.name) : 6) + 11)); \
|
||||
sprintf (_buf, "%s.%d", _gc_class.name, _num); \
|
||||
_id = _buf; \
|
||||
} \
|
||||
else \
|
||||
{ \
|
||||
Eina_List *l; \
|
||||
_type *ci; \
|
||||
EINA_LIST_FOREACH(_items, l, ci) \
|
||||
if ((ci->id) && (!strcmp(ci->id, id))) return ci; \
|
||||
_type *_ci; \
|
||||
EINA_LIST_FOREACH(_items, l, _ci) \
|
||||
if ((_ci->id) && (!strcmp(_ci->id, _id))) return _ci; \
|
||||
}
|
||||
|
||||
#endif
|
||||
|
|
|
@ -142,14 +142,12 @@ _backlight_input_win_key_down_cb(void *data, int type __UNUSED__, void *event)
|
|||
else
|
||||
{
|
||||
Eina_List *l;
|
||||
E_Config_Binding_Key *bind;
|
||||
E_Config_Binding_Key *binding;
|
||||
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 (bind->action && strcmp(bind->action, "backlight")) continue;
|
||||
if (binding->action && strcmp(binding->action, "backlight")) continue;
|
||||
|
||||
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)
|
||||
mod |= E_BINDING_MODIFIER_WIN;
|
||||
|
||||
if (bind->key && (!strcmp(bind->key, ev->keyname)) &&
|
||||
((bind->modifiers == (int)mod) || (bind->any_mod)))
|
||||
if (binding->key && (!strcmp(binding->key, ev->keyname)) &&
|
||||
((binding->modifiers == mod) || (binding->any_mod)))
|
||||
{
|
||||
_backlight_popup_free(inst);
|
||||
break;
|
||||
|
|
|
@ -997,26 +997,25 @@ linux_acpi_cb_event_fd_active(void *data __UNUSED__,
|
|||
static void
|
||||
linux_acpi_init(void)
|
||||
{
|
||||
Eina_List *powers;
|
||||
Eina_List *bats;
|
||||
Eina_Iterator *powers;
|
||||
Eina_Iterator *bats;
|
||||
|
||||
bats = ecore_file_ls("/proc/acpi/battery");
|
||||
bats = eina_file_direct_ls("/proc/acpi/battery");
|
||||
if (bats)
|
||||
{
|
||||
char *name;
|
||||
Eina_File_Direct_Info *info;
|
||||
|
||||
have_power = 0;
|
||||
powers = ecore_file_ls("/proc/acpi/ac_adapter");
|
||||
powers = eina_file_direct_ls("/proc/acpi/ac_adapter");
|
||||
if (powers)
|
||||
{
|
||||
char *name;
|
||||
|
||||
EINA_LIST_FREE(powers, name)
|
||||
EINA_ITERATOR_FOREACH(powers, info)
|
||||
{
|
||||
char buf[4096];
|
||||
FILE *f;
|
||||
|
||||
snprintf(buf, sizeof(buf), "/proc/acpi/ac_adapter/%s/state", name);
|
||||
strcpy(buf, info->path);
|
||||
strcat(buf, "/state");
|
||||
f = fopen(buf, "r");
|
||||
if (f)
|
||||
{
|
||||
|
@ -1030,21 +1029,22 @@ linux_acpi_init(void)
|
|||
if (!strcmp(tmp, "on-line")) have_power = 1;
|
||||
free(tmp);
|
||||
}
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
free(name);
|
||||
}
|
||||
eina_iterator_free(powers);
|
||||
}
|
||||
|
||||
have_battery = 0;
|
||||
acpi_max_full = 0;
|
||||
acpi_max_design = 0;
|
||||
EINA_LIST_FREE(bats, name)
|
||||
EINA_ITERATOR_FOREACH(bats, info)
|
||||
{
|
||||
char buf[4096];
|
||||
FILE *f;
|
||||
|
||||
snprintf(buf, sizeof(buf), "/proc/acpi/battery/%s/info", name);
|
||||
strcpy(buf, info->path);
|
||||
strcat(buf, "/info");
|
||||
f = fopen(buf, "r");
|
||||
if (f)
|
||||
{
|
||||
|
@ -1076,9 +1076,9 @@ linux_acpi_init(void)
|
|||
}
|
||||
fclose(f);
|
||||
}
|
||||
|
||||
free(name);
|
||||
}
|
||||
|
||||
eina_iterator_free(bats);
|
||||
}
|
||||
if (!acpid)
|
||||
{
|
||||
|
|
|
@ -229,15 +229,15 @@ _battery_face_level_set(Evas_Object *battery, double level)
|
|||
}
|
||||
|
||||
static void
|
||||
_battery_face_time_set(Evas_Object *battery, int time)
|
||||
_battery_face_time_set(Evas_Object *battery, int t)
|
||||
{
|
||||
char buf[256];
|
||||
int hrs, mins;
|
||||
|
||||
if (time < 0) return;
|
||||
if (t < 0) return;
|
||||
|
||||
hrs = (time / 3600);
|
||||
mins = ((time) / 60 - (hrs * 60));
|
||||
hrs = (t / 3600);
|
||||
mins = ((t) / 60 - (hrs * 60));
|
||||
if (hrs < 0) hrs = 0;
|
||||
if (mins < 0) mins = 0;
|
||||
snprintf(buf, sizeof(buf), "%i:%02i", hrs, mins);
|
||||
|
@ -426,7 +426,7 @@ _battery_warning_popup_destroy(Instance *inst)
|
|||
}
|
||||
|
||||
static void
|
||||
_battery_warning_popup(Instance *inst, int time, double percent)
|
||||
_battery_warning_popup(Instance *inst, int t, double percent)
|
||||
{
|
||||
Evas *e = 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);
|
||||
}
|
||||
|
||||
_battery_face_time_set(inst->popup_battery, time);
|
||||
_battery_face_time_set(inst->popup_battery, t);
|
||||
_battery_face_level_set(inst->popup_battery, percent);
|
||||
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
|
||||
_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)
|
||||
e_powersave_mode_set(E_POWERSAVE_MODE_LOW);
|
||||
|
|
|
@ -199,7 +199,7 @@ static void
|
|||
_battery_udev_battery_update(const char *syspath, Battery *bat)
|
||||
{
|
||||
const char *test;
|
||||
double time, charge;
|
||||
double t, charge;
|
||||
|
||||
if (!bat)
|
||||
{
|
||||
|
@ -233,10 +233,10 @@ _battery_udev_battery_update(const char *syspath, Battery *bat)
|
|||
|
||||
charge = strtod(test, NULL);
|
||||
eina_stringshare_del(test);
|
||||
time = ecore_time_get();
|
||||
t = ecore_time_get();
|
||||
if ((bat->got_prop) && (charge != bat->current_charge))
|
||||
bat->charge_rate = ((charge - bat->current_charge) / (time - bat->last_update));
|
||||
bat->last_update = time;
|
||||
bat->charge_rate = ((charge - bat->current_charge) / (t - bat->last_update));
|
||||
bat->last_update = t;
|
||||
bat->current_charge = charge;
|
||||
bat->percent = 100 * (bat->current_charge / bat->last_full_charge);
|
||||
if (bat->got_prop)
|
||||
|
|
|
@ -485,11 +485,11 @@ _e_mod_comp_win_update(E_Comp_Win *cw)
|
|||
{
|
||||
for (i = 0; i < cw->rects_num; i++)
|
||||
{
|
||||
E_RECTS_CLIP_TO_RECT(cw->rects[i].x,
|
||||
cw->rects[i].y,
|
||||
cw->rects[i].width,
|
||||
cw->rects[i].height,
|
||||
0, 0, cw->w, cw->h);
|
||||
E_RECTS_CLIP_TO_RECT(cw->rects[i].x,
|
||||
cw->rects[i].y,
|
||||
cw->rects[i].width,
|
||||
cw->rects[i].height,
|
||||
0, 0, (int) cw->w, (int) cw->h);
|
||||
}
|
||||
}
|
||||
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++)
|
||||
E_RECTS_CLIP_TO_RECT(rects[i].x, rects[i].y,
|
||||
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))
|
||||
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)
|
||||
{
|
||||
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;
|
||||
_e_mod_comp_win_opacity_set(cw);
|
||||
return ECORE_CALLBACK_PASS_ON;
|
||||
|
|
|
@ -432,8 +432,8 @@ _load_mimes(E_Config_Dialog_Data *cfdata, char *file)
|
|||
FILE *f;
|
||||
char buf[4096], mimetype[4096], ext[4096];
|
||||
char *p, *pp;
|
||||
Config_Mime *mime;
|
||||
Config_Glob *glob;
|
||||
Config_Mime *config_mime;
|
||||
Config_Glob *config_glob;
|
||||
|
||||
if (!cfdata) return;
|
||||
|
||||
|
@ -458,32 +458,32 @@ _load_mimes(E_Config_Dialog_Data *cfdata, char *file)
|
|||
while (!isblank(*p) && (*p != 0) && (*p != '\n')) p++;
|
||||
strncpy(ext, pp, (p - pp));
|
||||
ext[p - pp] = 0;
|
||||
mime = _find_mime(cfdata, mimetype);
|
||||
if (!mime)
|
||||
config_mime = _find_mime(cfdata, mimetype);
|
||||
if (!config_mime)
|
||||
{
|
||||
mime = E_NEW(Config_Mime, 1);
|
||||
if (mime)
|
||||
config_mime = E_NEW(Config_Mime, 1);
|
||||
if (config_mime)
|
||||
{
|
||||
mime->mime = eina_stringshare_add(mimetype);
|
||||
if (!mime->mime)
|
||||
free(mime);
|
||||
config_mime->mime = eina_stringshare_add(mimetype);
|
||||
if (!config_mime->mime)
|
||||
free(config_mime);
|
||||
else
|
||||
{
|
||||
glob = E_NEW(Config_Glob, 1);
|
||||
glob->name = eina_stringshare_add(ext);
|
||||
mime->globs = eina_list_append(mime->globs, glob);
|
||||
cfdata->mimes = eina_list_append(cfdata->mimes, mime);
|
||||
config_glob = E_NEW(Config_Glob, 1);
|
||||
config_glob->name = eina_stringshare_add(ext);
|
||||
config_mime->globs = eina_list_append(config_mime->globs, config_glob);
|
||||
cfdata->mimes = eina_list_append(cfdata->mimes, config_mime);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
glob = _find_glob(mime, ext);
|
||||
if (!glob)
|
||||
config_glob = _find_glob(config_mime, ext);
|
||||
if (!config_glob)
|
||||
{
|
||||
glob = E_NEW(Config_Glob, 1);
|
||||
glob->name = eina_stringshare_add(ext);
|
||||
mime->globs = eina_list_append(mime->globs, glob);
|
||||
config_glob = E_NEW(Config_Glob, 1);
|
||||
config_glob->name = eina_stringshare_add(ext);
|
||||
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;
|
||||
char buf[4096], mimetype[4096], ext[4096];
|
||||
char *p, *pp;
|
||||
Config_Mime *mime;
|
||||
Config_Glob *glob;
|
||||
Config_Mime *config_mime;
|
||||
Config_Glob *config_glob;
|
||||
|
||||
if (!cfdata) return;
|
||||
|
||||
|
@ -525,32 +525,32 @@ _load_globs(E_Config_Dialog_Data *cfdata, char *file)
|
|||
p++;
|
||||
}
|
||||
*pp = 0;
|
||||
mime = _find_mime(cfdata, mimetype);
|
||||
if (!mime)
|
||||
config_mime = _find_mime(cfdata, mimetype);
|
||||
if (!config_mime)
|
||||
{
|
||||
mime = E_NEW(Config_Mime, 1);
|
||||
if (mime)
|
||||
config_mime = E_NEW(Config_Mime, 1);
|
||||
if (config_mime)
|
||||
{
|
||||
mime->mime = eina_stringshare_add(mimetype);
|
||||
if (!mime->mime)
|
||||
free(mime);
|
||||
config_mime->mime = eina_stringshare_add(mimetype);
|
||||
if (!config_mime->mime)
|
||||
free(config_mime);
|
||||
else
|
||||
{
|
||||
glob = E_NEW(Config_Glob, 1);
|
||||
glob->name = eina_stringshare_add(ext);
|
||||
mime->globs = eina_list_append(mime->globs, glob);
|
||||
cfdata->mimes = eina_list_append(cfdata->mimes, mime);
|
||||
config_glob = E_NEW(Config_Glob, 1);
|
||||
config_glob->name = eina_stringshare_add(ext);
|
||||
config_mime->globs = eina_list_append(config_mime->globs, config_glob);
|
||||
cfdata->mimes = eina_list_append(cfdata->mimes, config_mime);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
glob = _find_glob(mime, ext);
|
||||
if (!glob)
|
||||
config_glob = _find_glob(config_mime, ext);
|
||||
if (!config_glob)
|
||||
{
|
||||
glob = E_NEW(Config_Glob, 1);
|
||||
glob->name = eina_stringshare_add(ext);
|
||||
mime->globs = eina_list_append(mime->globs, glob);
|
||||
config_glob = E_NEW(Config_Glob, 1);
|
||||
config_glob->name = eina_stringshare_add(ext);
|
||||
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 *
|
||||
_find_glob(Config_Mime *mime, char *glob)
|
||||
_find_glob(Config_Mime *mime, char *globbing)
|
||||
{
|
||||
Config_Glob *g;
|
||||
Eina_List *l;
|
||||
|
@ -591,7 +591,7 @@ _find_glob(Config_Mime *mime, char *glob)
|
|||
EINA_LIST_FOREACH(mime->globs, l, g)
|
||||
{
|
||||
if (!g) continue;
|
||||
if (strcmp(g->name, glob)) continue;
|
||||
if (strcmp(g->name, globbing)) continue;
|
||||
return g;
|
||||
}
|
||||
return NULL;
|
||||
|
|
|
@ -131,17 +131,17 @@ _cb_sel_changed(void *data, Evas_Object *obj __UNUSED__, void *event __UNUSED__)
|
|||
E_Config_Dialog_Data *cfdata;
|
||||
Eina_List *sel;
|
||||
E_Fm2_Icon_Info *ici;
|
||||
const char *realpath;
|
||||
const char *real_path;
|
||||
char buff[PATH_MAX];
|
||||
|
||||
if (!(cfdata = data)) return;
|
||||
if (!(sel = e_widget_flist_selected_list_get(cfdata->o_list))) return;
|
||||
ici = sel->data;
|
||||
realpath = e_widget_flist_real_path_get(cfdata->o_list);
|
||||
if (!strcmp(realpath, "/"))
|
||||
real_path = e_widget_flist_real_path_get(cfdata->o_list);
|
||||
if (!strcmp(real_path, "/"))
|
||||
snprintf(buff, sizeof(buff), "/%s", ici->file);
|
||||
else
|
||||
snprintf(buff, sizeof(buff), "%s/%s", realpath, ici->file);
|
||||
snprintf(buff, sizeof(buff), "%s/%s", real_path, ici->file);
|
||||
eina_list_free(sel);
|
||||
if (ecore_file_is_dir(buff)) return;
|
||||
E_FREE(cfdata->bg);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
#include "e.h"
|
||||
|
||||
#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;
|
||||
Eina_List *l;
|
||||
char *label;
|
||||
int found = 0, n = -1;
|
||||
|
||||
|
||||
|
@ -1147,7 +1147,9 @@ _edge_grab_wnd_selection_apply(E_Config_Dialog_Data *cfdata)
|
|||
}
|
||||
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);
|
||||
free(label);
|
||||
}
|
||||
|
|
|
@ -547,7 +547,7 @@ _cb_files_selection_change(void *data, Evas_Object *obj __UNUSED__, void *event_
|
|||
E_Config_Dialog_Data *cfdata;
|
||||
Eina_List *selected;
|
||||
E_Fm2_Icon_Info *ici;
|
||||
const char *realpath;
|
||||
const char *real_path;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
cfdata = data;
|
||||
|
@ -562,11 +562,11 @@ _cb_files_selection_change(void *data, Evas_Object *obj __UNUSED__, void *event_
|
|||
}
|
||||
|
||||
ici = selected->data;
|
||||
realpath = e_fm2_real_path_get(cfdata->o_fm);
|
||||
if (!strcmp(realpath, "/"))
|
||||
real_path = e_fm2_real_path_get(cfdata->o_fm);
|
||||
if (!strcmp(real_path, "/"))
|
||||
snprintf(buf, sizeof(buf), "/%s", ici->file);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file);
|
||||
snprintf(buf, sizeof(buf), "%s/%s", real_path, ici->file);
|
||||
eina_list_free(selected);
|
||||
if (ecore_file_is_dir(buf)) return;
|
||||
cfdata->imc_current = eina_stringshare_add(buf);
|
||||
|
|
|
@ -92,18 +92,18 @@ static void
|
|||
_fill_data(E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
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;
|
||||
|
||||
b2 = E_NEW(E_Config_Binding_Acpi, 1);
|
||||
b2->context = bind->context;
|
||||
b2->type = bind->type;
|
||||
b2->status = bind->status;
|
||||
b2->action = eina_stringshare_ref(bind->action);
|
||||
b2->params = eina_stringshare_ref(bind->params);
|
||||
b2->context = binding->context;
|
||||
b2->type = binding->type;
|
||||
b2->status = binding->status;
|
||||
b2->action = eina_stringshare_ref(binding->action);
|
||||
b2->params = eina_stringshare_ref(binding->params);
|
||||
cfdata->bindings = eina_list_append(cfdata->bindings, b2);
|
||||
}
|
||||
}
|
||||
|
@ -112,14 +112,14 @@ static void
|
|||
_free_data(E_Config_Dialog *cfd __UNUSED__,
|
||||
E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
E_Config_Binding_Acpi *bind;
|
||||
E_Config_Binding_Acpi *binding;
|
||||
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 (bind->params) eina_stringshare_del(bind->params);
|
||||
E_FREE(bind);
|
||||
if (binding->action) eina_stringshare_del(binding->action);
|
||||
if (binding->params) eina_stringshare_del(binding->params);
|
||||
E_FREE(binding);
|
||||
}
|
||||
|
||||
/* free the handlers */
|
||||
|
@ -147,26 +147,26 @@ static int
|
|||
_basic_apply(E_Config_Dialog *cfd __UNUSED__,
|
||||
E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
E_Config_Binding_Acpi *bind, *b2;
|
||||
E_Config_Binding_Acpi *binding, *b2;
|
||||
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,
|
||||
bind->action, bind->params);
|
||||
if (bind->action) eina_stringshare_del(bind->action);
|
||||
if (bind->params) eina_stringshare_del(bind->params);
|
||||
E_FREE(bind);
|
||||
e_bindings_acpi_del(binding->context, binding->type, binding->status,
|
||||
binding->action, binding->params);
|
||||
if (binding->action) eina_stringshare_del(binding->action);
|
||||
if (binding->params) eina_stringshare_del(binding->params);
|
||||
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->context = bind->context;
|
||||
b2->type = bind->type;
|
||||
b2->status = bind->status;
|
||||
b2->action = eina_stringshare_ref(bind->action);
|
||||
b2->params = eina_stringshare_ref(bind->params);
|
||||
b2->context = binding->context;
|
||||
b2->type = binding->type;
|
||||
b2->status = binding->status;
|
||||
b2->action = eina_stringshare_ref(binding->action);
|
||||
b2->params = eina_stringshare_ref(binding->params);
|
||||
e_config->acpi_bindings =
|
||||
eina_list_append(e_config->acpi_bindings, b2);
|
||||
|
||||
|
@ -230,7 +230,7 @@ _fill_bindings(E_Config_Dialog_Data *cfdata)
|
|||
{
|
||||
Evas *evas;
|
||||
Eina_List *l;
|
||||
E_Config_Binding_Acpi *bind;
|
||||
E_Config_Binding_Acpi *binding;
|
||||
int i = -1, mw;
|
||||
|
||||
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_clear(cfdata->o_bindings);
|
||||
|
||||
EINA_LIST_FOREACH(cfdata->bindings, l, bind)
|
||||
EINA_LIST_FOREACH(cfdata->bindings, l, binding)
|
||||
{
|
||||
const char *lbl;
|
||||
char buff[32];
|
||||
|
@ -247,7 +247,7 @@ _fill_bindings(E_Config_Dialog_Data *cfdata)
|
|||
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,
|
||||
_cb_bindings_changed, cfdata, buff);
|
||||
|
@ -301,12 +301,12 @@ _fill_actions(E_Config_Dialog_Data *cfdata)
|
|||
static E_Config_Binding_Acpi *
|
||||
_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 (!(bind = eina_list_nth(cfdata->bindings, atoi(cfdata->bindex))))
|
||||
if (!(binding = eina_list_nth(cfdata->bindings, atoi(cfdata->bindex))))
|
||||
return NULL;
|
||||
return bind;
|
||||
return binding;
|
||||
}
|
||||
|
||||
static E_Action_Description *
|
||||
|
@ -341,55 +341,55 @@ _selected_action_get(E_Config_Dialog_Data *cfdata)
|
|||
}
|
||||
|
||||
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 (bind->type == E_ACPI_TYPE_AC_ADAPTER)
|
||||
if (binding->type == E_ACPI_TYPE_UNKNOWN) return NULL;
|
||||
if (binding->type == E_ACPI_TYPE_AC_ADAPTER)
|
||||
{
|
||||
if (bind->status == 0) return _("AC Adapter Unplugged");
|
||||
if (bind->status == 1) return _("AC Adapter Plugged");
|
||||
if (binding->status == 0) return _("AC Adapter Unplugged");
|
||||
if (binding->status == 1) return _("AC Adapter Plugged");
|
||||
return _("Ac Adapter");
|
||||
}
|
||||
if (bind->type == E_ACPI_TYPE_BATTERY)
|
||||
if (binding->type == E_ACPI_TYPE_BATTERY)
|
||||
return _("Battery");
|
||||
if (bind->type == E_ACPI_TYPE_BUTTON)
|
||||
if (binding->type == E_ACPI_TYPE_BUTTON)
|
||||
return _("Button");
|
||||
if (bind->type == E_ACPI_TYPE_FAN)
|
||||
if (binding->type == E_ACPI_TYPE_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 (bind->status == E_ACPI_LID_CLOSED) return _("Lid Closed");
|
||||
if (bind->status == E_ACPI_LID_OPEN) return _("Lid Opened");
|
||||
if (binding->status == E_ACPI_LID_UNKNOWN) return _("Lid Unknown");
|
||||
if (binding->status == E_ACPI_LID_CLOSED) return _("Lid Closed");
|
||||
if (binding->status == E_ACPI_LID_OPEN) return _("Lid Opened");
|
||||
return _("Lid");
|
||||
}
|
||||
if (bind->type == E_ACPI_TYPE_POWER)
|
||||
if (binding->type == E_ACPI_TYPE_POWER)
|
||||
return _("Power Button");
|
||||
if (bind->type == E_ACPI_TYPE_PROCESSOR)
|
||||
if (binding->type == E_ACPI_TYPE_PROCESSOR)
|
||||
return _("Processor");
|
||||
if (bind->type == E_ACPI_TYPE_SLEEP)
|
||||
if (binding->type == E_ACPI_TYPE_SLEEP)
|
||||
return _("Sleep Button");
|
||||
if (bind->type == E_ACPI_TYPE_THERMAL)
|
||||
if (binding->type == E_ACPI_TYPE_THERMAL)
|
||||
return _("Thermal");
|
||||
if (bind->type == E_ACPI_TYPE_VIDEO)
|
||||
if (binding->type == E_ACPI_TYPE_VIDEO)
|
||||
return _("Video");
|
||||
if (bind->type == E_ACPI_TYPE_WIFI)
|
||||
if (binding->type == E_ACPI_TYPE_WIFI)
|
||||
return _("Wifi");
|
||||
if (bind->type == E_ACPI_TYPE_HIBERNATE)
|
||||
if (binding->type == E_ACPI_TYPE_HIBERNATE)
|
||||
return _("Hibernate");
|
||||
if (bind->type == E_ACPI_TYPE_ZOOM_OUT)
|
||||
if (binding->type == E_ACPI_TYPE_ZOOM_OUT)
|
||||
return _("Zoom Out");
|
||||
if (bind->type == E_ACPI_TYPE_ZOOM_IN)
|
||||
if (binding->type == E_ACPI_TYPE_ZOOM_IN)
|
||||
return _("Zoom In");
|
||||
if (bind->type == E_ACPI_TYPE_BRIGHTNESS_DOWN)
|
||||
if (binding->type == E_ACPI_TYPE_BRIGHTNESS_DOWN)
|
||||
return _("Brightness Down");
|
||||
if (bind->type == E_ACPI_TYPE_BRIGHTNESS_UP)
|
||||
if (binding->type == E_ACPI_TYPE_BRIGHTNESS_UP)
|
||||
return _("Brightness Up");
|
||||
if (bind->type == E_ACPI_TYPE_ASSIST)
|
||||
if (binding->type == E_ACPI_TYPE_ASSIST)
|
||||
return _("Assist");
|
||||
if (bind->type == E_ACPI_TYPE_S1)
|
||||
if (binding->type == E_ACPI_TYPE_S1)
|
||||
return _("S1");
|
||||
if (bind->type == E_ACPI_TYPE_VAIO)
|
||||
if (binding->type == E_ACPI_TYPE_VAIO)
|
||||
return _("Vaio");
|
||||
|
||||
return _("Unknown");
|
||||
|
@ -399,14 +399,14 @@ static void
|
|||
_cb_bindings_changed(void *data)
|
||||
{
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
E_Config_Binding_Acpi *bind;
|
||||
E_Config_Binding_Acpi *binding;
|
||||
Eina_List *items;
|
||||
const E_Ilist_Item *item;
|
||||
int i = -1;
|
||||
|
||||
if (!(cfdata = data)) return;
|
||||
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_del, EINA_TRUE);
|
||||
|
@ -422,7 +422,7 @@ _cb_bindings_changed(void *data)
|
|||
|
||||
i++;
|
||||
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);
|
||||
break;
|
||||
}
|
||||
|
@ -432,12 +432,12 @@ static void
|
|||
_cb_actions_changed(void *data)
|
||||
{
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
E_Config_Binding_Acpi *bind;
|
||||
E_Config_Binding_Acpi *binding;
|
||||
E_Action_Description *dsc;
|
||||
|
||||
if (!(cfdata = data)) return;
|
||||
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_del, EINA_TRUE);
|
||||
|
@ -449,13 +449,13 @@ _cb_actions_changed(void *data)
|
|||
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));
|
||||
|
||||
if ((!dsc->editable) && (dsc->act_params))
|
||||
e_widget_entry_text_set(cfdata->o_params, dsc->act_params);
|
||||
else if (bind->params)
|
||||
e_widget_entry_text_set(cfdata->o_params, bind->params);
|
||||
else if (binding->params)
|
||||
e_widget_entry_text_set(cfdata->o_params, binding->params);
|
||||
else
|
||||
{
|
||||
if ((!dsc->param_example) || (!dsc->param_example[0]))
|
||||
|
@ -470,14 +470,14 @@ _cb_entry_changed(void *data,
|
|||
void *data2 __UNUSED__)
|
||||
{
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
E_Config_Binding_Acpi *bind;
|
||||
E_Config_Binding_Acpi *binding;
|
||||
E_Action_Description *dsc;
|
||||
|
||||
if (!(cfdata = data)) return;
|
||||
if (!(dsc = _selected_action_get(cfdata))) return;
|
||||
if (!dsc->editable) return;
|
||||
if (!(bind = _selected_binding_get(cfdata))) return;
|
||||
eina_stringshare_replace(&bind->params,
|
||||
if (!(binding = _selected_binding_get(cfdata))) return;
|
||||
eina_stringshare_replace(&binding->params,
|
||||
e_widget_entry_text_get(cfdata->o_params));
|
||||
}
|
||||
|
||||
|
@ -528,22 +528,22 @@ _cb_del_binding(void *data,
|
|||
void *data2 __UNUSED__)
|
||||
{
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
E_Config_Binding_Acpi *bind, *bind2;
|
||||
E_Config_Binding_Acpi *binding, *bind2;
|
||||
Eina_List *l;
|
||||
|
||||
if (!(cfdata = data)) return;
|
||||
if (!(bind = _selected_binding_get(cfdata))) return;
|
||||
if (!(binding = _selected_binding_get(cfdata))) return;
|
||||
|
||||
/* delete from e_config */
|
||||
EINA_LIST_FOREACH(e_config->acpi_bindings, l, bind2)
|
||||
{
|
||||
if ((bind->context == bind2->context) && (bind->type == bind2->type) &&
|
||||
(((bind->action) && (bind2->action) &&
|
||||
(!strcmp(bind->action, bind2->action))) ||
|
||||
((!bind->action) && (!bind2->action))) &&
|
||||
(((bind->params) && (bind2->params) &&
|
||||
(!strcmp(bind->params, bind2->params))) ||
|
||||
((!bind->params) && (!bind2->params))))
|
||||
if ((binding->context == bind2->context) && (binding->type == bind2->type) &&
|
||||
(((binding->action) && (bind2->action) &&
|
||||
(!strcmp(binding->action, bind2->action))) ||
|
||||
((!binding->action) && (!bind2->action))) &&
|
||||
(((binding->params) && (bind2->params) &&
|
||||
(!strcmp(binding->params, bind2->params))) ||
|
||||
((!binding->params) && (!bind2->params))))
|
||||
{
|
||||
if (bind2->action) eina_stringshare_del(bind2->action);
|
||||
if (bind2->params) eina_stringshare_del(bind2->params);
|
||||
|
@ -556,19 +556,19 @@ _cb_del_binding(void *data,
|
|||
}
|
||||
|
||||
/* delete from e_bindings */
|
||||
e_bindings_acpi_del(bind->context, bind->type, bind->status,
|
||||
bind->action, bind->params);
|
||||
e_bindings_acpi_del(binding->context, binding->type, binding->status,
|
||||
binding->action, binding->params);
|
||||
|
||||
/* delete from dialog list */
|
||||
EINA_LIST_FOREACH(cfdata->bindings, l, bind2)
|
||||
{
|
||||
if ((bind->context == bind2->context) && (bind->type == bind2->type) &&
|
||||
(((bind->action) && (bind2->action) &&
|
||||
(!strcmp(bind->action, bind2->action))) ||
|
||||
((!bind->action) && (!bind2->action))) &&
|
||||
(((bind->params) && (bind2->params) &&
|
||||
(!strcmp(bind->params, bind2->params))) ||
|
||||
((!bind->params) && (!bind2->params))))
|
||||
if ((binding->context == bind2->context) && (binding->type == bind2->type) &&
|
||||
(((binding->action) && (bind2->action) &&
|
||||
(!strcmp(binding->action, bind2->action))) ||
|
||||
((!binding->action) && (!bind2->action))) &&
|
||||
(((binding->params) && (bind2->params) &&
|
||||
(!strcmp(binding->params, bind2->params))) ||
|
||||
((!binding->params) && (!bind2->params))))
|
||||
{
|
||||
if (bind2->action) eina_stringshare_del(bind2->action);
|
||||
if (bind2->params) eina_stringshare_del(bind2->params);
|
||||
|
@ -625,7 +625,7 @@ _cb_acpi_event(void *data,
|
|||
{
|
||||
E_Event_Acpi *ev;
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
E_Config_Binding_Acpi *bind;
|
||||
E_Config_Binding_Acpi *binding;
|
||||
Ecore_Event_Handler *hdl;
|
||||
|
||||
ev = event;
|
||||
|
@ -646,12 +646,12 @@ _cb_acpi_event(void *data,
|
|||
e_acpi_events_thaw();
|
||||
|
||||
/* NB: This may need more testing/parsing for event status */
|
||||
bind = E_NEW(E_Config_Binding_Acpi, 1);
|
||||
bind->context = E_BINDING_CONTEXT_NONE;
|
||||
bind->type = ev->type;
|
||||
bind->status = ev->status;
|
||||
bind->action = eina_stringshare_add("dim_screen");
|
||||
bind->params = NULL;
|
||||
binding = E_NEW(E_Config_Binding_Acpi, 1);
|
||||
binding->context = E_BINDING_CONTEXT_NONE;
|
||||
binding->type = ev->type;
|
||||
binding->status = ev->status;
|
||||
binding->action = eina_stringshare_add("dim_screen");
|
||||
binding->params = NULL;
|
||||
|
||||
cfdata->bindings = eina_list_append(cfdata->bindings, bind);
|
||||
_fill_bindings(cfdata);
|
||||
|
|
|
@ -19,8 +19,8 @@ struct _E_Config_Dialog_Data
|
|||
double powersave_medium;
|
||||
double powersave_high;
|
||||
double powersave_extreme;
|
||||
int powersave_min;
|
||||
int powersave_max;
|
||||
E_Powersave_Mode powersave_min;
|
||||
E_Powersave_Mode powersave_max;
|
||||
};
|
||||
|
||||
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));
|
||||
cfdata->powersave_min = e_config->powersave.min;
|
||||
cfdata->powersave_max = e_config->powersave.max;
|
||||
rmin = e_widget_radio_group_new(&(cfdata->powersave_min));
|
||||
rmax = e_widget_radio_group_new(&(cfdata->powersave_max));
|
||||
rmin = e_widget_radio_group_new((int*) &(cfdata->powersave_min));
|
||||
rmax = e_widget_radio_group_new((int*) &(cfdata->powersave_max));
|
||||
|
||||
ol = e_widget_table_add(evas, 0);
|
||||
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;
|
||||
Evas_Object *o;
|
||||
int toggle;
|
||||
|
||||
cfdata = data;
|
||||
if (!cfdata) return;
|
||||
if (cfdata->powersave_min > cfdata->powersave_max)
|
||||
|
|
|
@ -165,7 +165,7 @@ arrangement_widget_rep_update(E_Config_Randr_Dialog_Output_Dialog_Data *odd)
|
|||
|
||||
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)
|
||||
{
|
||||
|
|
|
@ -31,7 +31,7 @@ orientation_widget_create_data(E_Config_Dialog_Data *cfdata)
|
|||
EINA_LIST_FOREACH(cfdata->output_dialog_data_list, iter, odd)
|
||||
{
|
||||
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;
|
||||
|
@ -169,7 +169,7 @@ orientation_widget_update_radio_buttons(E_Config_Randr_Dialog_Output_Dialog_Data
|
|||
{
|
||||
//enabled monitor
|
||||
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
|
||||
{
|
||||
|
|
|
@ -54,11 +54,11 @@ policy_widget_create_data(E_Config_Dialog_Data *data)
|
|||
else
|
||||
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;
|
||||
if (!oi) //Not of interest for dbg output
|
||||
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;
|
||||
|
@ -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)
|
||||
{
|
||||
if (odd->new_policy == Ecore_X_Randr_Unset)
|
||||
if (odd->new_policy == (Ecore_X_Randr_Output_Policy) Ecore_X_Randr_Unset)
|
||||
continue;
|
||||
if (odd->crtc)
|
||||
{
|
||||
EINA_LIST_FOREACH(odd->crtc->outputs, it2, oi)
|
||||
{
|
||||
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)
|
||||
|
@ -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)
|
||||
{
|
||||
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;
|
||||
if (odd->new_policy != odd->previous_policy)
|
||||
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);
|
||||
}
|
||||
|
||||
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
|
||||
switch (policy)
|
||||
{
|
||||
|
|
|
@ -1002,11 +1002,12 @@ _size_list_load(E_Config_Dialog_Data *cfdata, Eina_List *size_list, Evas_Font_Si
|
|||
static void
|
||||
_font_list_load(E_Config_Dialog_Data *cfdata, const char *cur_font)
|
||||
{
|
||||
int n;
|
||||
const char *f;
|
||||
Eina_List *next;
|
||||
Evas_Object *ob;
|
||||
Evas *evas;
|
||||
Evas_Coord w;
|
||||
int n;
|
||||
|
||||
ob = cfdata->gui.font_list;
|
||||
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 */
|
||||
if (cfdata->font_list)
|
||||
{
|
||||
Eina_List *next;
|
||||
|
||||
for (next = cfdata->font_list; next; next = next->next)
|
||||
EINA_LIST_FOREACH(cfdata->font_list, next, f)
|
||||
{
|
||||
const char *f;
|
||||
|
||||
f = next->data;
|
||||
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 */
|
||||
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))
|
||||
{
|
||||
e_widget_ilist_selected_set(ob, n);
|
||||
|
@ -1076,23 +1069,25 @@ static void
|
|||
_adv_style_cb_change(void *data, Evas_Object *obj __UNUSED__)
|
||||
{
|
||||
E_Config_Dialog_Data *cfdata;
|
||||
E_Ilist_Item *i;
|
||||
Eina_List *l;
|
||||
int n;
|
||||
int n = 0;
|
||||
|
||||
if (!(cfdata = data)) return;
|
||||
|
||||
/* 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;
|
||||
const char *tmp;
|
||||
|
||||
if (!(i = l->data)) continue;
|
||||
if (!i->selected) continue;
|
||||
|
||||
tc = eina_list_nth(cfdata->text_classes, n);
|
||||
tmp = eina_stringshare_ref(cfdata->cur_style);
|
||||
eina_stringshare_del(tc->style);
|
||||
tc->style = eina_stringshare_ref(cfdata->cur_style);
|
||||
tc->style = tmp;
|
||||
n++;
|
||||
}
|
||||
|
||||
_font_preview_update(cfdata);
|
||||
|
|
|
@ -80,7 +80,7 @@ _cb_files_selection_change(void *data, Evas_Object *obj __UNUSED__, void *event_
|
|||
E_Config_Dialog_Data *cfdata;
|
||||
Eina_List *selected;
|
||||
E_Fm2_Icon_Info *ici;
|
||||
const char *realpath;
|
||||
const char *real_path;
|
||||
char buf[4096];
|
||||
|
||||
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);
|
||||
if (!selected) return;
|
||||
ici = selected->data;
|
||||
realpath = e_fm2_real_path_get(cfdata->o_fm);
|
||||
if (!strcmp(realpath, "/"))
|
||||
real_path = e_fm2_real_path_get(cfdata->o_fm);
|
||||
if (!strcmp(real_path, "/"))
|
||||
snprintf(buf, sizeof(buf), "/%s", ici->file);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file);
|
||||
snprintf(buf, sizeof(buf), "%s/%s", real_path, ici->file);
|
||||
eina_list_free(selected);
|
||||
if (ecore_file_is_dir(buf)) return;
|
||||
E_FREE(cfdata->splash);
|
||||
|
|
|
@ -159,7 +159,7 @@ _cb_files_selection_change(void *data, Evas_Object *obj __UNUSED__, void *event_
|
|||
E_Config_Dialog_Data *cfdata;
|
||||
Eina_List *selected;
|
||||
E_Fm2_Icon_Info *ici;
|
||||
const char *realpath;
|
||||
const char *real_path;
|
||||
char buf[4096];
|
||||
|
||||
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;
|
||||
|
||||
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);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file);
|
||||
snprintf(buf, sizeof(buf), "%s/%s", real_path, ici->file);
|
||||
eina_list_free(selected);
|
||||
|
||||
if (ecore_file_is_dir(buf)) return;
|
||||
|
|
|
@ -199,18 +199,18 @@ _cb_files_selection_change(void *data, Evas_Object *obj __UNUSED__, void *event_
|
|||
E_Config_Dialog_Data *cfdata;
|
||||
Eina_List *selected;
|
||||
E_Fm2_Icon_Info *ici;
|
||||
const char *realpath;
|
||||
const char *real_path;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
cfdata = data;
|
||||
if (!cfdata->o_fm) return;
|
||||
if (!(selected = e_widget_flist_selected_list_get(cfdata->o_fm))) return;
|
||||
ici = selected->data;
|
||||
realpath = e_widget_flist_real_path_get(cfdata->o_fm);
|
||||
if (!strcmp(realpath, "/"))
|
||||
real_path = e_widget_flist_real_path_get(cfdata->o_fm);
|
||||
if (!strcmp(real_path, "/"))
|
||||
snprintf(buf, sizeof(buf), "/%s", ici->file);
|
||||
else
|
||||
snprintf(buf, sizeof(buf), "%s/%s", realpath, ici->file);
|
||||
snprintf(buf, sizeof(buf), "%s/%s", real_path, ici->file);
|
||||
eina_list_free(selected);
|
||||
if (ecore_file_is_dir(buf)) return;
|
||||
|
||||
|
|
|
@ -1942,14 +1942,12 @@ _evry_cb_key_down(void *data, int type __UNUSED__, void *event)
|
|||
else if (ev->modifiers)
|
||||
{
|
||||
Eina_List *l;
|
||||
E_Config_Binding_Key *bind;
|
||||
E_Config_Binding_Key *binding;
|
||||
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 (bind->action && strcmp(bind->action, "everything")) continue;
|
||||
if (binding->action && strcmp(binding->action, "everything")) continue;
|
||||
|
||||
mod = 0;
|
||||
|
||||
|
@ -1962,14 +1960,14 @@ _evry_cb_key_down(void *data, int type __UNUSED__, void *event)
|
|||
if (ev->modifiers & ECORE_EVENT_MODIFIER_WIN)
|
||||
mod |= E_BINDING_MODIFIER_WIN;
|
||||
|
||||
if (!(bind->key && (!strcmp(bind->key, ev->keyname)) &&
|
||||
(((unsigned int)bind->modifiers == mod) || (bind->any_mod))))
|
||||
if (!(binding->key && (!strcmp(binding->key, ev->keyname)) &&
|
||||
(((unsigned int)binding->modifiers == mod) || (binding->any_mod))))
|
||||
continue;
|
||||
|
||||
if (win->level > 0)
|
||||
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))
|
||||
{
|
||||
_evry_selectors_shift(win, 1);
|
||||
|
@ -1979,13 +1977,13 @@ _evry_cb_key_down(void *data, int type __UNUSED__, void *event)
|
|||
evry_hide(win, 1);
|
||||
|
||||
#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;
|
||||
Evry_Plugin *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)
|
||||
{
|
||||
|
|
|
@ -252,7 +252,7 @@ struct _Evry_Event_Action_Performed
|
|||
|
||||
#define EVRY_PLUGIN_MIN_QUERY(_p, _input) \
|
||||
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) { \
|
||||
Evry_Item *_it; \
|
||||
|
|
|
@ -106,22 +106,22 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
|||
min_fuzz = it->fuzzy_match;
|
||||
}
|
||||
|
||||
GET_ITEM(it, pp);
|
||||
GET_ITEM(itp, pp);
|
||||
|
||||
it->hi = NULL;
|
||||
itp->hi = NULL;
|
||||
/* TODO get better usage estimate */
|
||||
evry_history_item_usage_set(it, NULL, NULL);
|
||||
it->usage /= 100.0;
|
||||
evry_history_item_usage_set(itp, NULL, NULL);
|
||||
itp->usage /= 100.0;
|
||||
|
||||
if ((it->usage && max_usage) && (it->usage < max_usage))
|
||||
it->usage = max_usage;
|
||||
it->fuzzy_match = min_fuzz;
|
||||
if ((itp->usage && max_usage) && (itp->usage < max_usage))
|
||||
itp->usage = max_usage;
|
||||
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"));
|
||||
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 */
|
||||
|
@ -194,7 +194,7 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
|||
evry_history_item_usage_set(it, input, context);
|
||||
|
||||
if ((subj_sel) && (top_level) &&
|
||||
(!it->usage) && (inp_len < plugin->config->min_query))
|
||||
(!it->usage) && ((int) inp_len < plugin->config->min_query))
|
||||
continue;
|
||||
|
||||
items = eina_list_append(items, it);
|
||||
|
@ -206,7 +206,7 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
|||
{
|
||||
EINA_LIST_FOREACH (lp, l, pp)
|
||||
{
|
||||
int cnt = 1;
|
||||
cnt = 1;
|
||||
EINA_LIST_FOREACH (pp->items, ll, it)
|
||||
{
|
||||
if ((!subj_sel) || (it->usage < 0) ||
|
||||
|
@ -295,7 +295,7 @@ _begin(Evry_Plugin *plugin, const Evry_Item *it __UNUSED__)
|
|||
{
|
||||
Plugin *p;
|
||||
|
||||
GET_PLUGIN(base, plugin);
|
||||
/* GET_PLUGIN(base, plugin); */
|
||||
EVRY_PLUGIN_INSTANCE(p, plugin);
|
||||
|
||||
p->warning = evry_item_new(NULL, EVRY_PLUGIN(p), N_("No plugins loaded"), NULL, NULL);
|
||||
|
|
|
@ -4,9 +4,9 @@ static Evry_Action *act;
|
|||
static Ecore_X_Window clipboard_win = 0;
|
||||
|
||||
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_clipboard_set(clipboard_win, it->label, strlen(it->label));
|
||||
|
@ -15,7 +15,7 @@ _action(Evry_Action *act)
|
|||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
|
|
@ -379,14 +379,14 @@ _scan_end_func(void *data, Ecore_Thread *thread __UNUSED__)
|
|||
{
|
||||
EINA_LIST_FOREACH_SAFE (d->files, l, ll, item)
|
||||
{
|
||||
GET_FILE(file, item);
|
||||
GET_FILE(browse, item);
|
||||
|
||||
if (item->browseable)
|
||||
file->mime = _mime_dir;
|
||||
browse->mime = _mime_dir;
|
||||
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);
|
||||
_file_add(p, item);
|
||||
|
@ -676,10 +676,10 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
|||
|
||||
return 0;
|
||||
}
|
||||
int len = strlen(p->directory);
|
||||
len = (len == 1) ? len : len + 1;
|
||||
int lendir = p->directory ? strlen(p->directory) : 0;
|
||||
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))
|
||||
{
|
||||
|
@ -1071,7 +1071,7 @@ _recentf_fetch(Evry_Plugin *plugin, const char *input)
|
|||
GET_PLUGIN(p, plugin);
|
||||
Evry_Item_File *file;
|
||||
History_Types *ht;
|
||||
size_t len = (input ? strlen(input) : 0);
|
||||
int len = (input ? strlen(input) : 0);
|
||||
|
||||
IF_RELEASE(p->input);
|
||||
|
||||
|
|
|
@ -30,17 +30,17 @@ static void
|
|||
_finish(Evry_Plugin *plugin)
|
||||
{
|
||||
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);
|
||||
|
||||
EINA_LIST_FREE (p->categories, it)
|
||||
EINA_LIST_FREE (pl->categories, it)
|
||||
EVRY_ITEM_FREE(it);
|
||||
|
||||
E_FREE(p);
|
||||
E_FREE(pl);
|
||||
}
|
||||
|
||||
static Evas_Object *
|
||||
|
@ -62,7 +62,7 @@ _icon_get(Evry_Item *item, Evas *e __UNUSED__)
|
|||
static Evry_Plugin *
|
||||
_browse(Evry_Plugin *plugin, const Evry_Item *item)
|
||||
{
|
||||
Plugin *p;
|
||||
Plugin *pl;
|
||||
Eina_List *l;
|
||||
Settings_Item *it, *it2;
|
||||
|
||||
|
@ -71,8 +71,8 @@ _browse(Evry_Plugin *plugin, const Evry_Item *item)
|
|||
|
||||
it = (Settings_Item *)item;
|
||||
|
||||
EVRY_PLUGIN_INSTANCE(p, plugin);
|
||||
p->parent = EINA_TRUE;
|
||||
EVRY_PLUGIN_INSTANCE(pl, plugin);
|
||||
pl->parent = EINA_TRUE;
|
||||
|
||||
GET_PLUGIN(parent, item->plugin);
|
||||
|
||||
|
@ -81,36 +81,36 @@ _browse(Evry_Plugin *plugin, const Evry_Item *item)
|
|||
if (it2->ecat == it->ecat)
|
||||
{
|
||||
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 *
|
||||
_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
|
||||
_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;
|
||||
|
||||
if (!p->categories && !p->items)
|
||||
if (!pl->categories && !pl->items)
|
||||
{
|
||||
Settings_Item *it;
|
||||
Eina_List *l, *ll;
|
||||
|
@ -122,46 +122,46 @@ _fetch(Evry_Plugin *plugin, const char *input)
|
|||
if ((ecat->pri < 0) || (!ecat->items)) 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;
|
||||
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)
|
||||
{
|
||||
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->ecat = ecat;
|
||||
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)
|
||||
EVRY_PLUGIN_ITEMS_ADD(p, p->items, input, 1, 1);
|
||||
if (input || pl->parent)
|
||||
EVRY_PLUGIN_ITEMS_ADD(pl, pl->items, input, 1, 1);
|
||||
|
||||
return EVRY_PLUGIN_HAS_ITEMS(p);
|
||||
return EVRY_PLUGIN_HAS_ITEMS(pl);
|
||||
}
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
static int
|
||||
_action(Evry_Action *act)
|
||||
_action(Evry_Action *action)
|
||||
{
|
||||
char buf[1024];
|
||||
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);
|
||||
|
||||
|
|
|
@ -389,7 +389,7 @@ _place_items(Smart_Data *sd)
|
|||
{
|
||||
Eina_List *l;
|
||||
Item *it;
|
||||
int div;
|
||||
int divider;
|
||||
Evas_Coord x = 0, y = 0, ww, hh, mw = 0, mh = 0;
|
||||
|
||||
if (sd->view->mode == VIEW_MODE_LIST)
|
||||
|
@ -413,9 +413,9 @@ _place_items(Smart_Data *sd)
|
|||
|
||||
if ((w > 0) && (h > 0))
|
||||
{
|
||||
div = sd->w / w;
|
||||
if (div < 1) div = 1;
|
||||
ww = w + (sd->w - div * w) / div;
|
||||
divider = sd->w / w;
|
||||
if (divider < 1) divider = 1;
|
||||
ww = w + (sd->w - divider * w) / divider;
|
||||
hh = ((double)h / (double)w * (double)ww);
|
||||
}
|
||||
else
|
||||
|
@ -427,16 +427,16 @@ _place_items(Smart_Data *sd)
|
|||
else
|
||||
ww = 192;
|
||||
|
||||
div = sd->w / ww;
|
||||
if (div < 1) div = 1;
|
||||
ww += (sd->w - div * ww) / div;
|
||||
divider = sd->w / ww;
|
||||
if (divider < 1) divider = 1;
|
||||
ww += (sd->w - divider * ww) / divider;
|
||||
|
||||
div = sd->h / ww;
|
||||
if (div < 1) div = 1;
|
||||
hh = ww + (sd->h - div * ww) / div;
|
||||
divider = sd->h / ww;
|
||||
if (divider < 1) divider = 1;
|
||||
hh = ww + (sd->h - divider * ww) / divider;
|
||||
|
||||
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;
|
||||
Item *it;
|
||||
Evas_Coord xx, yy;
|
||||
double time;
|
||||
double t;
|
||||
|
||||
if (!sd)
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
|
@ -514,7 +514,7 @@ _e_smart_reconfigure_do(void *data)
|
|||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
time = ecore_time_get();
|
||||
t = ecore_time_get();
|
||||
|
||||
EINA_LIST_FOREACH (sd->items, l, it)
|
||||
{
|
||||
|
@ -536,7 +536,7 @@ _e_smart_reconfigure_do(void *data)
|
|||
}
|
||||
it->changed = EINA_FALSE;
|
||||
|
||||
if (ecore_time_get() - time > 0.03)
|
||||
if (ecore_time_get() - t > 0.03)
|
||||
return ECORE_CALLBACK_RENEW;
|
||||
}
|
||||
|
||||
|
@ -691,10 +691,10 @@ _pan_child_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
|
|||
}
|
||||
|
||||
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);
|
||||
sd->view = view;
|
||||
sd->view = v;
|
||||
}
|
||||
|
||||
static Item *
|
||||
|
@ -893,9 +893,9 @@ _clear_items(Evas_Object *obj)
|
|||
}
|
||||
|
||||
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);
|
||||
Item *it;
|
||||
if (!sd) return;
|
||||
|
@ -953,9 +953,9 @@ _update_frame(Evas_Object *obj)
|
|||
}
|
||||
|
||||
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);
|
||||
Item *v_it;
|
||||
Evry_Item *p_it;
|
||||
|
@ -975,7 +975,7 @@ _view_update(Evry_View *view)
|
|||
|
||||
if (!p)
|
||||
{
|
||||
_view_clear(view);
|
||||
_view_clear(ev);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1090,9 +1090,9 @@ _view_update(Evry_View *view)
|
|||
}
|
||||
|
||||
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);
|
||||
Eina_List *l = NULL, *ll;
|
||||
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)))
|
||||
{
|
||||
/* _view_update(view, -slide); */
|
||||
_view_update(view);
|
||||
_view_update(eview);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -1580,15 +1580,15 @@ _cb_list_show(void *data, Evas_Object *obj __UNUSED__, const char *emission __UN
|
|||
}
|
||||
|
||||
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;
|
||||
Ecore_Event_Handler *h;
|
||||
|
||||
v = E_NEW(View, 1);
|
||||
v->view = *view;
|
||||
v->view = *ev;
|
||||
v->state = s;
|
||||
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
|
||||
_view_destroy(Evry_View *view)
|
||||
_view_destroy(Evry_View *ev)
|
||||
{
|
||||
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->bg);
|
||||
|
|
|
@ -1243,7 +1243,7 @@ _e_fwin_changed(void *data,
|
|||
E_Fwin *fwin;
|
||||
E_Fwin_Page *page;
|
||||
Efreet_Desktop *ef;
|
||||
char buf[PATH_MAX], *ext;
|
||||
char buf[PATH_MAX];
|
||||
|
||||
page = data;
|
||||
fwin = page->fwin;
|
||||
|
@ -1417,14 +1417,14 @@ _e_fwin_cb_key_down(void *data,
|
|||
if (!strcmp(ev->key, "w"))
|
||||
{
|
||||
int count = eina_list_count(fwin->pages);
|
||||
E_Fwin_Page *page;
|
||||
E_Fwin_Page *pagew;
|
||||
|
||||
if (count > 2)
|
||||
{
|
||||
Eina_List *l;
|
||||
int i = 0;
|
||||
|
||||
page = fwin->cur_page;
|
||||
pagew = fwin->cur_page;
|
||||
if (fwin->page_index > 0)
|
||||
{
|
||||
if (fwin->tb_obj)
|
||||
|
@ -1438,10 +1438,10 @@ _e_fwin_cb_key_down(void *data,
|
|||
}
|
||||
if (fwin->tb_obj)
|
||||
e_widget_toolbar_item_remove(fwin->tb_obj, page->index);
|
||||
fwin->pages = eina_list_remove(fwin->pages, page);
|
||||
_e_fwin_page_free(page);
|
||||
EINA_LIST_FOREACH(fwin->pages, l, page)
|
||||
page->index = i++;
|
||||
fwin->pages = eina_list_remove(fwin->pages, pagew);
|
||||
_e_fwin_page_free(pagew);
|
||||
EINA_LIST_FOREACH(fwin->pages, l, pagew)
|
||||
pagew->index = i++;
|
||||
}
|
||||
else if (count > 1)
|
||||
{
|
||||
|
@ -1451,9 +1451,9 @@ _e_fwin_cb_key_down(void *data,
|
|||
fwin->page_index = 0;
|
||||
fwin->pages = eina_list_remove(fwin->pages, fwin->cur_page);
|
||||
_e_fwin_page_free(fwin->cur_page);
|
||||
page = fwin->pages->data;
|
||||
page->index = 0;
|
||||
_e_fwin_cb_page_change(fwin, page);
|
||||
pagew = fwin->pages->data;
|
||||
pagew->index = 0;
|
||||
_e_fwin_cb_page_change(fwin, pagew);
|
||||
_e_fwin_cb_resize(fwin->win);
|
||||
}
|
||||
else
|
||||
|
|
|
@ -468,7 +468,7 @@ static void
|
|||
_cb_dir_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
|
||||
{
|
||||
Instance *inst;
|
||||
const char *realpath;
|
||||
const char *real_path;
|
||||
char *path, *dir, *p;
|
||||
Eina_List *l, *ll, *sel = NULL;
|
||||
Evas_Object *btn;
|
||||
|
@ -476,7 +476,7 @@ _cb_dir_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS
|
|||
|
||||
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 */
|
||||
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;
|
||||
l = eina_list_next(sel);
|
||||
p = path = ecore_file_realpath(realpath);
|
||||
p = path = ecore_file_realpath(real_path);
|
||||
|
||||
while (p)
|
||||
{
|
||||
|
@ -566,7 +566,7 @@ _cb_dir_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS
|
|||
}
|
||||
|
||||
/* 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)
|
||||
{
|
||||
|
@ -578,12 +578,12 @@ _cb_dir_changed(void *data, Evas_Object *obj __UNUSED__, void *event_info __UNUS
|
|||
}
|
||||
}
|
||||
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->ignore_dir = 0;
|
||||
|
||||
if (!strcmp(realpath, "/"))
|
||||
if (!strcmp(real_path, "/"))
|
||||
edje_object_signal_emit(inst->o_base, "e,state,up,disabled", "e");
|
||||
else
|
||||
edje_object_signal_emit(inst->o_base, "e,state,up,enabled", "e");
|
||||
|
|
|
@ -293,8 +293,8 @@ _load_mimes(E_Config_Dialog_Data *cfdata, char *file)
|
|||
FILE *f;
|
||||
char buf[4096], mimetype[4096], ext[4096];
|
||||
char *p, *pp;
|
||||
Config_Mime *mime;
|
||||
Config_Glob *glob;
|
||||
Config_Mime *config_mime;
|
||||
Config_Glob *config_glob;
|
||||
|
||||
if (!cfdata) return;
|
||||
|
||||
|
@ -319,21 +319,21 @@ _load_mimes(E_Config_Dialog_Data *cfdata, char *file)
|
|||
while (!isblank(*p) && (*p != 0) && (*p != '\n')) p++;
|
||||
strncpy(ext, pp, (p - pp));
|
||||
ext[p - pp] = 0;
|
||||
mime = _find_mime(cfdata, mimetype);
|
||||
if (!mime)
|
||||
config_mime = _find_mime(cfdata, mimetype);
|
||||
if (!config_mime)
|
||||
{
|
||||
mime = E_NEW(Config_Mime, 1);
|
||||
if (mime)
|
||||
config_mime = E_NEW(Config_Mime, 1);
|
||||
if (config_mime)
|
||||
{
|
||||
mime->mime = eina_stringshare_add(mimetype);
|
||||
if (!mime->mime)
|
||||
free(mime);
|
||||
config_mime->mime = eina_stringshare_add(mimetype);
|
||||
if (!config_mime->mime)
|
||||
free(config_mime);
|
||||
else
|
||||
{
|
||||
glob = E_NEW(Config_Glob, 1);
|
||||
glob->name = eina_stringshare_add(ext);
|
||||
mime->globs = eina_list_append(mime->globs, glob);
|
||||
cfdata->mimes = eina_list_append(cfdata->mimes, mime);
|
||||
config_glob = E_NEW(Config_Glob, 1);
|
||||
config_glob->name = eina_stringshare_add(ext);
|
||||
config_mime->globs = eina_list_append(config_mime->globs, config_glob);
|
||||
cfdata->mimes = eina_list_append(cfdata->mimes, config_mime);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -349,8 +349,8 @@ _load_globs(E_Config_Dialog_Data *cfdata, char *file)
|
|||
FILE *f;
|
||||
char buf[4096], mimetype[4096], ext[4096];
|
||||
char *p, *pp;
|
||||
Config_Mime *mime;
|
||||
Config_Glob *glob;
|
||||
Config_Mime *config_mime;
|
||||
Config_Glob *config_glob;
|
||||
|
||||
if (!cfdata) return;
|
||||
|
||||
|
@ -376,32 +376,32 @@ _load_globs(E_Config_Dialog_Data *cfdata, char *file)
|
|||
p++;
|
||||
}
|
||||
*pp = 0;
|
||||
mime = _find_mime(cfdata, mimetype);
|
||||
if (!mime)
|
||||
config_mime = _find_mime(cfdata, mimetype);
|
||||
if (!config_mime)
|
||||
{
|
||||
mime = E_NEW(Config_Mime, 1);
|
||||
if (mime)
|
||||
config_mime = E_NEW(Config_Mime, 1);
|
||||
if (config_mime)
|
||||
{
|
||||
mime->mime = eina_stringshare_add(mimetype);
|
||||
if (!mime->mime)
|
||||
free(mime);
|
||||
config_mime->mime = eina_stringshare_add(mimetype);
|
||||
if (!config_mime->mime)
|
||||
free(config_mime);
|
||||
else
|
||||
{
|
||||
glob = E_NEW(Config_Glob, 1);
|
||||
glob->name = eina_stringshare_add(ext);
|
||||
mime->globs = eina_list_append(mime->globs, glob);
|
||||
cfdata->mimes = eina_list_append(cfdata->mimes, mime);
|
||||
config_glob = E_NEW(Config_Glob, 1);
|
||||
config_glob->name = eina_stringshare_add(ext);
|
||||
config_mime->globs = eina_list_append(config_mime->globs, config_glob);
|
||||
cfdata->mimes = eina_list_append(cfdata->mimes, config_mime);
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
glob = _find_glob(mime, ext);
|
||||
if (!glob)
|
||||
config_glob = _find_glob(config_mime, ext);
|
||||
if (!config_glob)
|
||||
{
|
||||
glob = E_NEW(Config_Glob, 1);
|
||||
glob->name = eina_stringshare_add(ext);
|
||||
mime->globs = eina_list_append(mime->globs, glob);
|
||||
config_glob = E_NEW(Config_Glob, 1);
|
||||
config_glob->name = eina_stringshare_add(ext);
|
||||
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 *
|
||||
_find_glob(Config_Mime *mime, char *glob)
|
||||
_find_glob(Config_Mime *mime, char *globing)
|
||||
{
|
||||
Config_Glob *g;
|
||||
Eina_List *l;
|
||||
|
@ -507,7 +507,7 @@ _find_glob(Config_Mime *mime, char *glob)
|
|||
EINA_LIST_FOREACH(mime->globs, l, g)
|
||||
{
|
||||
if (!g) continue;
|
||||
if (strcmp(g->name, glob)) continue;
|
||||
if (strcmp(g->name, globing)) continue;
|
||||
return g;
|
||||
}
|
||||
return NULL;
|
||||
|
|
|
@ -8,7 +8,7 @@ struct _E_Config_Dialog_Data
|
|||
/* general view mode */
|
||||
struct
|
||||
{
|
||||
int mode;
|
||||
E_Fm2_View_Mode mode;
|
||||
int open_dirs_in_place;
|
||||
int selector;
|
||||
int single_click;
|
||||
|
@ -217,7 +217,7 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__,
|
|||
|
||||
o = e_widget_list_add(evas, 0, 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); */
|
||||
/* e_widget_disabled_set(ob, 1); */
|
||||
/* e_widget_framelist_object_append(of, ob); */
|
||||
|
|
|
@ -827,40 +827,40 @@ _attach_menu(void *data __UNUSED__, E_Gadcon_Client *gcc, E_Menu *menu)
|
|||
static char *
|
||||
_get_bind_text(const char* action)
|
||||
{
|
||||
E_Binding_Key *bind;
|
||||
E_Binding_Key *binding;
|
||||
char b[256] = "";
|
||||
|
||||
bind = e_bindings_key_get(action);
|
||||
if ((bind) && (bind->key))
|
||||
binding = e_bindings_key_get(action);
|
||||
if ((binding) && (binding->key))
|
||||
{
|
||||
if ((bind->mod) & (E_BINDING_MODIFIER_CTRL))
|
||||
if ((binding->mod) & (E_BINDING_MODIFIER_CTRL))
|
||||
strcat(b, _("CTRL"));
|
||||
|
||||
if ((bind->mod) & (E_BINDING_MODIFIER_ALT))
|
||||
if ((binding->mod) & (E_BINDING_MODIFIER_ALT))
|
||||
{
|
||||
if (b[0]) strcat(b, " + ");
|
||||
strcat(b, _("ALT"));
|
||||
}
|
||||
|
||||
if ((bind->mod) & (E_BINDING_MODIFIER_SHIFT))
|
||||
if ((binding->mod) & (E_BINDING_MODIFIER_SHIFT))
|
||||
{
|
||||
if (b[0]) strcat(b, " + ");
|
||||
strcat(b, _("SHIFT"));
|
||||
}
|
||||
|
||||
if ((bind->mod) & (E_BINDING_MODIFIER_WIN))
|
||||
if ((binding->mod) & (E_BINDING_MODIFIER_WIN))
|
||||
{
|
||||
if (b[0]) strcat(b, " + ");
|
||||
strcat(b, _("WIN"));
|
||||
}
|
||||
|
||||
if ((bind->key) && (bind->key[0]))
|
||||
if ((binding->key) && (binding->key[0]))
|
||||
{
|
||||
char *l;
|
||||
|
||||
if (b[0]) strcat(b, " + ");
|
||||
l = strdup(bind->key);
|
||||
l[0] = (char)toupper(bind->key[0]);
|
||||
l = strdup(binding->key);
|
||||
l[0] = (char)toupper(binding->key[0]);
|
||||
strcat(b, l);
|
||||
free(l);
|
||||
}
|
||||
|
|
|
@ -3,8 +3,8 @@
|
|||
#include "e_mod_notify.h"
|
||||
|
||||
/* local function prototypes */
|
||||
static int _e_mod_notify_cb_add(E_Notification_Daemon *daemon __UNUSED__, E_Notification *n);
|
||||
static void _e_mod_notify_cb_del(E_Notification_Daemon *daemon __UNUSED__, unsigned int id);
|
||||
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 *d __UNUSED__, 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 Ind_Notify_Win *_e_mod_notify_merge(E_Notification *n);
|
||||
|
@ -52,7 +52,7 @@ e_mod_notify_shutdown(void)
|
|||
}
|
||||
|
||||
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;
|
||||
unsigned int replace;
|
||||
|
@ -105,7 +105,7 @@ _e_mod_notify_cb_add(E_Notification_Daemon *daemon __UNUSED__, E_Notification *n
|
|||
}
|
||||
|
||||
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;
|
||||
Ind_Notify_Win *nwin;
|
||||
|
|
|
@ -1216,7 +1216,7 @@ _e_kbd_int_layouts_list_update(E_Kbd_Int *ki)
|
|||
kil = E_NEW(E_Kbd_Int_Layout, 1);
|
||||
if (kil)
|
||||
{
|
||||
char *s, *p;
|
||||
char *s;
|
||||
FILE *f;
|
||||
|
||||
kil->path = path;
|
||||
|
@ -1241,7 +1241,6 @@ _e_kbd_int_layouts_list_update(E_Kbd_Int *ki)
|
|||
|
||||
while (fgets(buf, sizeof(buf), f))
|
||||
{
|
||||
int len;
|
||||
char str[4096];
|
||||
|
||||
if (!isok)
|
||||
|
|
|
@ -146,7 +146,7 @@ _e_mod_kbd_device_ignore_load_file(const char *file)
|
|||
|
||||
#ifdef HAVE_EEZE
|
||||
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;
|
||||
|
||||
|
|
|
@ -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_resize(E_Border *bd, int w, int h);
|
||||
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_indicator(E_Border *bd, E_Illume_Config_Zone *cz);
|
||||
static void _policy_zone_layout_quickpanel(E_Border *bd);
|
||||
|
@ -164,6 +163,7 @@ _policy_border_hide_below(E_Border *bd)
|
|||
}
|
||||
}
|
||||
|
||||
#if 0
|
||||
static void
|
||||
_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 */
|
||||
_policy_focus_home(bd->zone);
|
||||
}
|
||||
#endif
|
||||
|
||||
static void
|
||||
_policy_zone_layout_update(E_Zone *zone)
|
||||
|
|
|
@ -545,7 +545,7 @@ _find_channel_by_name(E_Mixer_App_Dialog_Data *app, const char *channel_name)
|
|||
|
||||
if (app->channels_infos)
|
||||
{
|
||||
struct channel_info *info = app->channels_infos->data;
|
||||
info = app->channels_infos->data;
|
||||
|
||||
header_input = !!info->has_capture;
|
||||
i = 1;
|
||||
|
|
|
@ -181,12 +181,14 @@ _mixer_gadget_configuration_free_foreach(const Eina_Hash *hash __UNUSED__, const
|
|||
return 1;
|
||||
}
|
||||
|
||||
#if 0
|
||||
static Eina_Bool
|
||||
_mixer_module_configuration_alert(void *data)
|
||||
{
|
||||
e_util_dialog_show(_("Mixer Settings Updated"), "%s", (char *)data);
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
#endif
|
||||
|
||||
static E_Mixer_Module_Config *
|
||||
_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;
|
||||
Eina_List *l;
|
||||
E_Config_Binding_Key *bind;
|
||||
E_Config_Binding_Key *binding;
|
||||
E_Binding_Modifier mod;
|
||||
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 (bind->action &&
|
||||
(strcmp(bind->action, "volume_increase") &&
|
||||
strcmp(bind->action, "volume_decrease") &&
|
||||
strcmp(bind->action, "volume_mute")))
|
||||
if (binding->action &&
|
||||
(strcmp(binding->action, "volume_increase") &&
|
||||
strcmp(binding->action, "volume_decrease") &&
|
||||
strcmp(binding->action, "volume_mute")))
|
||||
continue;
|
||||
|
||||
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)
|
||||
mod |= E_BINDING_MODIFIER_WIN;
|
||||
|
||||
if (bind->key && (!strcmp(bind->key, ev->keyname)) &&
|
||||
((bind->modifiers == mod) || (bind->any_mod)))
|
||||
if (binding->key && (!strcmp(binding->key, ev->keyname)) &&
|
||||
((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)
|
||||
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)
|
||||
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;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -253,12 +253,12 @@ static Eina_Bool
|
|||
fdh_func(Pulse *conn, Ecore_Fd_Handler *fdh)
|
||||
{
|
||||
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
|
||||
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_read = !!ecore_main_fd_handler_active_get(fdh, ECORE_FD_READ) * ECORE_FD_READ;
|
||||
pa_write = !!ecore_main_fd_handler_active_get(fdh, ECORE_FD_WRITE) * ECORE_FD_WRITE;
|
||||
rprev = eina_list_data_get(conn->iq);
|
||||
wprev = eina_list_data_get(conn->oq);
|
||||
|
||||
|
@ -285,7 +285,7 @@ fdh_func(Pulse *conn, Ecore_Fd_Handler *fdh)
|
|||
login_finish(conn, fdh);
|
||||
break;
|
||||
case PA_STATE_MOREAUTH:
|
||||
if (write)
|
||||
if (pa_write)
|
||||
{
|
||||
if (msg_send(conn, wprev))
|
||||
ecore_main_fd_handler_active_set(fdh, ECORE_FD_READ);
|
||||
|
@ -300,7 +300,7 @@ fdh_func(Pulse *conn, Ecore_Fd_Handler *fdh)
|
|||
}
|
||||
break;
|
||||
case PA_STATE_CONNECTED:
|
||||
if (write)
|
||||
if (pa_write)
|
||||
{
|
||||
if (wprev)
|
||||
{
|
||||
|
@ -316,7 +316,7 @@ fdh_func(Pulse *conn, Ecore_Fd_Handler *fdh)
|
|||
else
|
||||
ecore_main_fd_handler_active_set(conn->fdh, ECORE_FD_READ);
|
||||
}
|
||||
if (read)
|
||||
if (pa_read)
|
||||
{
|
||||
DBG("read");
|
||||
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);
|
||||
deserialize_tag(conn, command, tag);
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
@ -365,7 +365,7 @@ uint32_t
|
|||
pulse_cards_get(Pulse *conn)
|
||||
{
|
||||
Pulse_Tag *tag;
|
||||
int read;
|
||||
int pa_read;
|
||||
uint32_t type = PA_COMMAND_GET_CARD_INFO_LIST;
|
||||
|
||||
EINA_SAFETY_ON_NULL_RETURN_VAL(conn, 0);
|
||||
|
@ -376,8 +376,8 @@ pulse_cards_get(Pulse *conn)
|
|||
tag->tag_count = conn->tag_count;
|
||||
tag_simple_init(conn, tag, type, PA_TAG_U32);
|
||||
tag_finish(tag);
|
||||
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);
|
||||
pa_read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ;
|
||||
ecore_main_fd_handler_active_set(conn->fdh, pa_read | ECORE_FD_WRITE);
|
||||
conn->oq = eina_list_append(conn->oq, tag);
|
||||
eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type));
|
||||
return tag->tag_count;
|
||||
|
@ -396,7 +396,7 @@ uint32_t
|
|||
pulse_type_get(Pulse *conn, uint32_t idx, Eina_Bool source)
|
||||
{
|
||||
Pulse_Tag *tag;
|
||||
int read;
|
||||
int pa_read;
|
||||
uint32_t type = source ? PA_COMMAND_GET_SOURCE_INFO : PA_COMMAND_GET_SINK_INFO;
|
||||
|
||||
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_string(tag, NULL);
|
||||
tag_finish(tag);
|
||||
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);
|
||||
pa_read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ;
|
||||
ecore_main_fd_handler_active_set(conn->fdh, pa_read | ECORE_FD_WRITE);
|
||||
conn->oq = eina_list_append(conn->oq, tag);
|
||||
eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type));
|
||||
return tag->tag_count;
|
||||
|
@ -420,7 +420,7 @@ uint32_t
|
|||
pulse_types_get(Pulse *conn, Eina_Bool source)
|
||||
{
|
||||
Pulse_Tag *tag;
|
||||
int read;
|
||||
int pa_read;
|
||||
uint32_t type = source ? PA_COMMAND_GET_SOURCE_INFO_LIST : PA_COMMAND_GET_SINK_INFO_LIST;
|
||||
|
||||
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_simple_init(conn, tag, type, PA_TAG_U32);
|
||||
tag_finish(tag);
|
||||
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);
|
||||
pa_read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ;
|
||||
ecore_main_fd_handler_active_set(conn->fdh, pa_read | ECORE_FD_WRITE);
|
||||
conn->oq = eina_list_append(conn->oq, tag);
|
||||
eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type));
|
||||
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_Tag *tag;
|
||||
int read;
|
||||
int pa_read;
|
||||
uint32_t type = source ? PA_COMMAND_SET_SOURCE_MUTE : PA_COMMAND_SET_SINK_MUTE;
|
||||
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_bool(tag, !!mute);
|
||||
tag_finish(tag);
|
||||
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);
|
||||
pa_read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ;
|
||||
ecore_main_fd_handler_active_set(conn->fdh, pa_read | ECORE_FD_WRITE);
|
||||
conn->oq = eina_list_append(conn->oq, tag);
|
||||
eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type));
|
||||
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_Tag *tag;
|
||||
int read;
|
||||
int pa_read;
|
||||
uint32_t type = source ? PA_COMMAND_SET_SOURCE_MUTE : PA_COMMAND_SET_SINK_VOLUME;
|
||||
|
||||
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_volume(tag, channels, vol);
|
||||
tag_finish(tag);
|
||||
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);
|
||||
pa_read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ;
|
||||
ecore_main_fd_handler_active_set(conn->fdh, pa_read | ECORE_FD_WRITE);
|
||||
conn->oq = eina_list_append(conn->oq, tag);
|
||||
eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type));
|
||||
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_Tag *tag;
|
||||
int read;
|
||||
int pa_read;
|
||||
uint32_t type;
|
||||
|
||||
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_cvol(tag, &sink->volume);
|
||||
tag_finish(tag);
|
||||
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);
|
||||
pa_read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ;
|
||||
ecore_main_fd_handler_active_set(conn->fdh, pa_read | ECORE_FD_WRITE);
|
||||
conn->oq = eina_list_append(conn->oq, tag);
|
||||
eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type));
|
||||
return tag->tag_count;
|
||||
|
@ -530,7 +530,7 @@ uint32_t
|
|||
pulse_sink_port_set(Pulse *conn, Pulse_Sink *sink, const char *port)
|
||||
{
|
||||
Pulse_Tag *tag;
|
||||
int read;
|
||||
int pa_read;
|
||||
uint32_t type;
|
||||
Eina_List *l;
|
||||
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, port);
|
||||
tag_finish(tag);
|
||||
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);
|
||||
pa_read = !!ecore_main_fd_handler_active_get(conn->fdh, ECORE_FD_READ) * ECORE_FD_READ;
|
||||
ecore_main_fd_handler_active_set(conn->fdh, pa_read | ECORE_FD_WRITE);
|
||||
conn->oq = eina_list_append(conn->oq, tag);
|
||||
eina_hash_add(conn->tag_handlers, &tag->tag_count, (uintptr_t*)((uintptr_t)type));
|
||||
return tag->tag_count;
|
||||
|
@ -620,7 +620,7 @@ pulse_new(void)
|
|||
Pulse *conn;
|
||||
Eina_Iterator *it;
|
||||
const char *prev = NULL, *buf = NULL;;
|
||||
time_t time = 0;
|
||||
time_t t = 0;
|
||||
char *home, h[4096];
|
||||
const Eina_File_Direct_Info *info;
|
||||
|
||||
|
@ -653,14 +653,14 @@ pulse_new(void)
|
|||
buf = NULL;
|
||||
continue;
|
||||
}
|
||||
if (!time)
|
||||
if (!t)
|
||||
{
|
||||
time = st.st_atime;
|
||||
t = st.st_atime;
|
||||
prev = buf;
|
||||
buf = NULL;
|
||||
continue;
|
||||
}
|
||||
if (time > st.st_atime)
|
||||
if (t > st.st_atime)
|
||||
{
|
||||
eina_stringshare_del(buf);
|
||||
buf = NULL;
|
||||
|
@ -668,7 +668,7 @@ pulse_new(void)
|
|||
}
|
||||
eina_stringshare_del(prev);
|
||||
prev = buf;
|
||||
time = st.st_atime;
|
||||
t = st.st_atime;
|
||||
buf = NULL;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -494,7 +494,7 @@ e_mixer_system_set_volume(E_Mixer_System *self,
|
|||
int left,
|
||||
int right)
|
||||
{
|
||||
long range, min, max, div;
|
||||
long range, min, max, divide;
|
||||
int mode;
|
||||
|
||||
if ((!self) || (!channel))
|
||||
|
@ -502,10 +502,10 @@ e_mixer_system_set_volume(E_Mixer_System *self,
|
|||
|
||||
snd_mixer_handle_events(self);
|
||||
snd_mixer_selem_get_playback_volume_range(channel, &min, &max);
|
||||
div = 100 + min;
|
||||
if (div == 0)
|
||||
divide = 100 + min;
|
||||
if (divide == 0)
|
||||
{
|
||||
div = 1; /* no zero-division */
|
||||
divide = 1; /* no zero-division */
|
||||
min++;
|
||||
}
|
||||
|
||||
|
@ -516,13 +516,13 @@ e_mixer_system_set_volume(E_Mixer_System *self,
|
|||
mode = 0;
|
||||
if (left >= 0)
|
||||
{
|
||||
left = (((range * left) + (range / 2)) / div) - min;
|
||||
left = (((range * left) + (range / 2)) / divide) - min;
|
||||
mode |= 1;
|
||||
}
|
||||
|
||||
if (right >= 0)
|
||||
{
|
||||
right = (((range * right) + (range / 2)) / div) - min;
|
||||
right = (((range * right) + (range / 2)) / divide) - min;
|
||||
mode |= 2;
|
||||
}
|
||||
|
||||
|
|
|
@ -435,14 +435,14 @@ e_modapi_save(E_Module *m __UNUSED__)
|
|||
|
||||
/* Callbacks */
|
||||
static int
|
||||
_notification_cb_notify(E_Notification_Daemon *daemon __UNUSED__,
|
||||
_notification_cb_notify(E_Notification_Daemon *d __UNUSED__,
|
||||
E_Notification *n)
|
||||
{
|
||||
return _notification_notify(n);
|
||||
}
|
||||
|
||||
static void
|
||||
_notification_cb_close_notification(E_Notification_Daemon *daemon __UNUSED__,
|
||||
_notification_cb_close_notification(E_Notification_Daemon *d __UNUSED__,
|
||||
unsigned int id)
|
||||
{
|
||||
notification_popup_close(id);
|
||||
|
|
|
@ -1126,7 +1126,7 @@ _pager_window_desk_change(Pager *pager, E_Border *bd)
|
|||
if (pd)
|
||||
{
|
||||
Pager_Win *pw2 = NULL;
|
||||
E_Border *bd;
|
||||
E_Border *bd_above;
|
||||
|
||||
/* remove it from whatever desk it was on */
|
||||
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);
|
||||
e_layout_pack(pd->o_layout, pw->o_window);
|
||||
|
||||
bd = e_util_desk_border_above(pw->border);
|
||||
if (bd)
|
||||
pw2 = _pager_desk_window_find(pd, bd);
|
||||
bd_above = e_util_desk_border_above(pw->border);
|
||||
if (bd_above)
|
||||
pw2 = _pager_desk_window_find(pd, bd_above);
|
||||
if (pw2)
|
||||
e_layout_child_lower_below(pw->o_window, pw2->o_window);
|
||||
else
|
||||
|
@ -1162,12 +1162,12 @@ _pager_window_desk_change(Pager *pager, E_Border *bd)
|
|||
if (pw)
|
||||
{
|
||||
Pager_Win *pw2 = NULL;
|
||||
E_Border *bd;
|
||||
E_Border *bd_above;
|
||||
|
||||
pd->wins = eina_list_append(pd->wins, pw);
|
||||
bd = e_util_desk_border_above(pw->border);
|
||||
if (bd)
|
||||
pw2 = _pager_desk_window_find(pd, bd);
|
||||
bd_above = e_util_desk_border_above(pw->border);
|
||||
if (bd_above)
|
||||
pw2 = _pager_desk_window_find(pd, bd_above);
|
||||
if (pw2)
|
||||
e_layout_child_lower_below(pw->o_window, pw2->o_window);
|
||||
else
|
||||
|
@ -1186,12 +1186,12 @@ _pager_window_desk_change(Pager *pager, E_Border *bd)
|
|||
if (pw)
|
||||
{
|
||||
Pager_Win *pw2 = NULL;
|
||||
E_Border *bd;
|
||||
E_Border *bd_above;
|
||||
|
||||
pd->wins = eina_list_append(pd->wins, pw);
|
||||
bd = e_util_desk_border_above(pw->border);
|
||||
if (bd)
|
||||
pw2 = _pager_desk_window_find(pd, bd);
|
||||
bd_above = e_util_desk_border_above(pw->border);
|
||||
if (bd_above)
|
||||
pw2 = _pager_desk_window_find(pd, bd_above);
|
||||
if (pw2)
|
||||
e_layout_child_lower_below(pw->o_window, pw2->o_window);
|
||||
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);
|
||||
if (pd)
|
||||
{
|
||||
Pager_Win *pw;
|
||||
|
||||
pw = _pager_window_new(pd, ev->border);
|
||||
if (pw)
|
||||
{
|
||||
|
@ -2581,14 +2579,14 @@ _pager_popup_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event
|
|||
_pager_popup_hide(0);
|
||||
else
|
||||
{
|
||||
E_Config_Binding_Key *bind;
|
||||
E_Config_Binding_Key *binding;
|
||||
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;
|
||||
|
||||
if ((bind->action) && (strcmp(bind->action,"pager_switch")))
|
||||
if ((binding->action) && (strcmp(binding->action,"pager_switch")))
|
||||
continue;
|
||||
|
||||
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)
|
||||
mod |= E_BINDING_MODIFIER_WIN;
|
||||
|
||||
if (bind->key && (!strcmp(bind->key, ev->keyname)) &&
|
||||
((bind->modifiers == (int) mod)))
|
||||
if (binding->key && (!strcmp(binding->key, ev->keyname)) &&
|
||||
((binding->modifiers == mod)))
|
||||
{
|
||||
E_Action *act;
|
||||
|
||||
act = e_action_find(bind->action);
|
||||
act = e_action_find(binding->action);
|
||||
|
||||
if (act)
|
||||
{
|
||||
if (act->func.go_key)
|
||||
act->func.go_key(NULL, bind->params, ev);
|
||||
act->func.go_key(NULL, binding->params, ev);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -605,7 +605,7 @@ static void
|
|||
_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_Time time;
|
||||
Ecore_X_Time t;
|
||||
Ecore_X_Window_Attributes attr;
|
||||
const Eina_List *l;
|
||||
Icon *icon;
|
||||
|
@ -636,10 +636,10 @@ _systray_handle_request_dock(Instance *inst, Ecore_X_Event_Client_Message *ev)
|
|||
return;
|
||||
}
|
||||
|
||||
time = ecore_x_current_time_get();
|
||||
t = ecore_x_current_time_get();
|
||||
ecore_x_client_message32_send(win, _atom_xembed,
|
||||
ECORE_X_EVENT_MASK_NONE,
|
||||
time, XEMBED_EMBEDDED_NOTIFY, 0,
|
||||
t, XEMBED_EMBEDDED_NOTIFY, 0,
|
||||
inst->win.selection, 0);
|
||||
}
|
||||
|
||||
|
@ -1021,7 +1021,7 @@ static void
|
|||
_gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient)
|
||||
{
|
||||
Instance *inst = gcc->data;
|
||||
const char *signal;
|
||||
const char *sig;
|
||||
unsigned int systray_orient;
|
||||
|
||||
if (!inst)
|
||||
|
@ -1030,74 +1030,74 @@ _gc_orient(E_Gadcon_Client *gcc, E_Gadcon_Orient orient)
|
|||
switch (orient)
|
||||
{
|
||||
case E_GADCON_ORIENT_FLOAT:
|
||||
signal = "e,action,orient,float";
|
||||
sig = "e,action,orient,float";
|
||||
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
|
||||
break;
|
||||
case E_GADCON_ORIENT_HORIZ:
|
||||
signal = "e,action,orient,horiz";
|
||||
sig = "e,action,orient,horiz";
|
||||
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
|
||||
break;
|
||||
case E_GADCON_ORIENT_VERT:
|
||||
signal = "e,action,orient,vert";
|
||||
sig = "e,action,orient,vert";
|
||||
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT;
|
||||
break;
|
||||
case E_GADCON_ORIENT_LEFT:
|
||||
signal = "e,action,orient,left";
|
||||
sig = "e,action,orient,left";
|
||||
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT;
|
||||
break;
|
||||
case E_GADCON_ORIENT_RIGHT:
|
||||
signal = "e,action,orient,right";
|
||||
sig = "e,action,orient,right";
|
||||
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_VERT;
|
||||
break;
|
||||
case E_GADCON_ORIENT_TOP:
|
||||
signal = "e,action,orient,top";
|
||||
sig = "e,action,orient,top";
|
||||
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
|
||||
break;
|
||||
case E_GADCON_ORIENT_BOTTOM:
|
||||
signal = "e,action,orient,bottom";
|
||||
sig = "e,action,orient,bottom";
|
||||
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
|
||||
break;
|
||||
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;
|
||||
break;
|
||||
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;
|
||||
break;
|
||||
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;
|
||||
break;
|
||||
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;
|
||||
break;
|
||||
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;
|
||||
break;
|
||||
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;
|
||||
break;
|
||||
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;
|
||||
break;
|
||||
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;
|
||||
break;
|
||||
default:
|
||||
signal = "e,action,orient,horiz";
|
||||
sig = "e,action,orient,horiz";
|
||||
systray_orient = _NET_SYSTEM_TRAY_ORIENTATION_HORZ;
|
||||
}
|
||||
|
||||
ecore_x_window_prop_card32_set
|
||||
(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);
|
||||
_systray_size_apply(inst);
|
||||
}
|
||||
|
|
|
@ -43,7 +43,7 @@ get_vdesk(Eina_List *vdesks,
|
|||
*
|
||||
*/
|
||||
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);
|
||||
|
||||
|
@ -77,7 +77,7 @@ _create_data(E_Config_Dialog *cfd)
|
|||
}
|
||||
|
||||
static void
|
||||
_free_data(E_Config_Dialog *cfd,
|
||||
_free_data(E_Config_Dialog *cfd __UNUSED__,
|
||||
E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
eina_list_free(cfdata->config.vdesks);
|
||||
|
@ -141,7 +141,7 @@ _fill_zone_config(E_Zone *zone,
|
|||
|
||||
static void
|
||||
_cb_zone_change(void *data,
|
||||
Evas_Object *obj)
|
||||
Evas_Object *obj __UNUSED__)
|
||||
{
|
||||
int n;
|
||||
E_Config_Dialog_Data *cfdata = data;
|
||||
|
@ -158,7 +158,7 @@ _cb_zone_change(void *data,
|
|||
}
|
||||
|
||||
static Evas_Object *
|
||||
_basic_create_widgets(E_Config_Dialog *cfd,
|
||||
_basic_create_widgets(E_Config_Dialog *cfd __UNUSED__,
|
||||
Evas *evas,
|
||||
E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
|
@ -223,7 +223,7 @@ _basic_create_widgets(E_Config_Dialog *cfd,
|
|||
}
|
||||
|
||||
static int
|
||||
_basic_apply_data(E_Config_Dialog *cfd,
|
||||
_basic_apply_data(E_Config_Dialog *cfd __UNUSED__,
|
||||
E_Config_Dialog_Data *cfdata)
|
||||
{
|
||||
struct _Config_vdesk *vd;
|
||||
|
@ -307,7 +307,7 @@ _basic_apply_data(E_Config_Dialog *cfd,
|
|||
|
||||
E_Config_Dialog *
|
||||
e_int_config_tiling_module(E_Container *con,
|
||||
const char *params)
|
||||
const char *params __UNUSED__)
|
||||
{
|
||||
E_Config_Dialog *cfd;
|
||||
E_Config_Dialog_View *v;
|
||||
|
|
|
@ -271,8 +271,8 @@ _theme_edje_object_set_aux(Evas_Object *obj, const char *group)
|
|||
_theme_edje_object_set_aux(_obj, _group);
|
||||
|
||||
static Eina_Bool
|
||||
_info_hash_update(const Eina_Hash *hash, const void *key,
|
||||
void *data, void *fdata)
|
||||
_info_hash_update(const Eina_Hash *hash __UNUSED__, const void *key __UNUSED__,
|
||||
void *data, void *fdata __UNUSED__)
|
||||
{
|
||||
Tiling_Info *tinfo = data;
|
||||
|
||||
|
@ -499,9 +499,9 @@ end_special_input(void)
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
overlay_key_down(void *data,
|
||||
int type,
|
||||
void *event)
|
||||
overlay_key_down(void *data __UNUSED__,
|
||||
int type __UNUSED__,
|
||||
void *event)
|
||||
{
|
||||
Ecore_Event_Key *ev = event;
|
||||
Border_Extra *extra;
|
||||
|
@ -545,7 +545,7 @@ stop:
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
_timeout_cb(void *data)
|
||||
_timeout_cb(void *data __UNUSED__)
|
||||
{
|
||||
end_special_input();
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
|
@ -1137,8 +1137,8 @@ change_desk_conf(struct _Config_vdesk *newconf)
|
|||
}
|
||||
|
||||
static void
|
||||
_e_mod_action_add_stack_cb(E_Object *obj,
|
||||
const char *params)
|
||||
_e_mod_action_add_stack_cb(E_Object *obj __UNUSED__,
|
||||
const char *params __UNUSED__)
|
||||
{
|
||||
E_Desk *desk = get_current_desk();
|
||||
|
||||
|
@ -1152,8 +1152,8 @@ _e_mod_action_add_stack_cb(E_Object *obj,
|
|||
}
|
||||
|
||||
static void
|
||||
_e_mod_action_remove_stack_cb(E_Object *obj,
|
||||
const char *params)
|
||||
_e_mod_action_remove_stack_cb(E_Object *obj __UNUSED__,
|
||||
const char *params __UNUSED__)
|
||||
{
|
||||
E_Desk *desk = get_current_desk();
|
||||
|
||||
|
@ -1167,8 +1167,8 @@ _e_mod_action_remove_stack_cb(E_Object *obj,
|
|||
}
|
||||
|
||||
static void
|
||||
_e_mod_action_tg_stack_cb(E_Object *obj,
|
||||
const char *params)
|
||||
_e_mod_action_tg_stack_cb(E_Object *obj __UNUSED__,
|
||||
const char *params __UNUSED__)
|
||||
{
|
||||
E_Desk *desk = get_current_desk();
|
||||
|
||||
|
@ -1633,8 +1633,8 @@ toggle_floating(E_Border *bd)
|
|||
}
|
||||
|
||||
static void
|
||||
_e_mod_action_toggle_floating_cb(E_Object *obj,
|
||||
const char *params)
|
||||
_e_mod_action_toggle_floating_cb(E_Object *obj __UNUSED__,
|
||||
const char *params __UNUSED__)
|
||||
{
|
||||
end_special_input();
|
||||
|
||||
|
@ -1706,8 +1706,8 @@ _action_swap(E_Border *bd_1,
|
|||
}
|
||||
|
||||
static void
|
||||
_e_mod_action_swap_cb(E_Object *obj,
|
||||
const char *params)
|
||||
_e_mod_action_swap_cb(E_Object *obj __UNUSED__,
|
||||
const char *params __UNUSED__)
|
||||
{
|
||||
E_Desk *desk;
|
||||
E_Border *focused_bd;
|
||||
|
@ -2472,8 +2472,8 @@ _move_down_rows(void)
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
move_key_down(void *data,
|
||||
int type,
|
||||
move_key_down(void *data __UNUSED__,
|
||||
int type __UNUSED__,
|
||||
void *event)
|
||||
{
|
||||
Ecore_Event_Key *ev = event;
|
||||
|
@ -2531,8 +2531,8 @@ stop:
|
|||
}
|
||||
|
||||
static void
|
||||
_e_mod_action_move_cb(E_Object *obj,
|
||||
const char *params)
|
||||
_e_mod_action_move_cb(E_Object *obj __UNUSED__,
|
||||
const char *params __UNUSED__)
|
||||
{
|
||||
E_Desk *desk;
|
||||
E_Border *focused_bd;
|
||||
|
@ -2768,8 +2768,8 @@ _transition_move_rows(tiling_move_t direction)
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
_transition_overlay_key_down(void *data,
|
||||
int type,
|
||||
_transition_overlay_key_down(void *data __UNUSED__,
|
||||
int type __UNUSED__,
|
||||
void *event)
|
||||
{
|
||||
Ecore_Event_Key *ev = event;
|
||||
|
@ -3158,8 +3158,8 @@ _do_transition_overlay(void)
|
|||
}
|
||||
|
||||
static void
|
||||
_e_mod_action_adjust_transitions(E_Object *obj,
|
||||
const char *params)
|
||||
_e_mod_action_adjust_transitions(E_Object *obj __UNUSED__,
|
||||
const char *params __UNUSED__)
|
||||
{
|
||||
E_Desk *desk;
|
||||
|
||||
|
@ -3179,7 +3179,7 @@ _e_mod_action_adjust_transitions(E_Object *obj,
|
|||
/* Go {{{ */
|
||||
|
||||
static Eina_Bool
|
||||
_warp_timer(void *_)
|
||||
_warp_timer(void *data __UNUSED__)
|
||||
{
|
||||
if (_G.warp_timer) {
|
||||
double spd = TILING_WRAP_SPEED;
|
||||
|
@ -3205,7 +3205,7 @@ _warp_timer(void *_)
|
|||
}
|
||||
|
||||
static void
|
||||
_action_go(E_Border *_,
|
||||
_action_go(E_Border *data __UNUSED__,
|
||||
Border_Extra *extra_2)
|
||||
{
|
||||
E_Border *bd = extra_2->border;
|
||||
|
@ -3219,8 +3219,8 @@ _action_go(E_Border *_,
|
|||
}
|
||||
|
||||
static void
|
||||
_e_mod_action_go_cb(E_Object *obj,
|
||||
const char *params)
|
||||
_e_mod_action_go_cb(E_Object *obj __UNUSED__,
|
||||
const char *params __UNUSED__)
|
||||
{
|
||||
E_Desk *desk;
|
||||
|
||||
|
@ -3240,7 +3240,7 @@ _e_mod_action_go_cb(E_Object *obj,
|
|||
/* Hooks {{{*/
|
||||
|
||||
static void
|
||||
_pre_border_assign_hook(void *data,
|
||||
_pre_border_assign_hook(void *data __UNUSED__,
|
||||
E_Border *bd)
|
||||
{
|
||||
if (tiling_g.config->show_titles)
|
||||
|
@ -3429,7 +3429,7 @@ static void _move_or_resize(E_Border *bd)
|
|||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -3439,7 +3439,7 @@ _resize_hook(void *data, int type, E_Event_Border_Resize *event)
|
|||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -3449,7 +3449,7 @@ _move_hook(void *data, int type, E_Event_Border_Move*event)
|
|||
}
|
||||
|
||||
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;
|
||||
int stack = -1;
|
||||
|
@ -3493,7 +3493,7 @@ _add_hook(void *data, int type, E_Event_Border_Add *event)
|
|||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -3517,7 +3517,7 @@ _remove_hook(void *data, int type, E_Event_Border_Remove *event)
|
|||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -3537,7 +3537,7 @@ _iconify_hook(void *_, int type, E_Event_Border_Iconify *event)
|
|||
}
|
||||
|
||||
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;
|
||||
int stack = -1;
|
||||
|
@ -3568,21 +3568,21 @@ _uniconify_hook(void *_, int type, E_Event_Border_Uniconify *event)
|
|||
}
|
||||
|
||||
static Eina_Bool
|
||||
_stick_hook(void *data, int type, void *event)
|
||||
_stick_hook(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
||||
{
|
||||
DBG("TODO");
|
||||
return true;
|
||||
}
|
||||
|
||||
static Eina_Bool
|
||||
_unstick_hook(void *data, int type, void *event)
|
||||
_unstick_hook(void *data __UNUSED__, int type __UNUSED__, void *event __UNUSED__)
|
||||
{
|
||||
DBG("TODO");
|
||||
return true;
|
||||
}
|
||||
|
||||
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;
|
||||
|
||||
|
@ -3592,7 +3592,7 @@ _desk_show_hook(void *data, int type, void *event)
|
|||
}
|
||||
|
||||
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();
|
||||
|
||||
|
@ -3602,7 +3602,7 @@ _desk_before_show_hook(void *data, int type, void *event)
|
|||
}
|
||||
|
||||
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,
|
||||
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
|
||||
_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;
|
||||
E_Zone *zone;
|
||||
|
@ -3705,7 +3705,6 @@ EAPI E_Module_Api e_modapi =
|
|||
EAPI void *
|
||||
e_modapi_init(E_Module *m)
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
E_Desk *desk;
|
||||
|
||||
tiling_g.module = m;
|
||||
|
@ -3833,7 +3832,7 @@ e_modapi_init(E_Module *m)
|
|||
}
|
||||
|
||||
EAPI int
|
||||
e_modapi_shutdown(E_Module *m)
|
||||
e_modapi_shutdown(E_Module *m __UNUSED__)
|
||||
{
|
||||
|
||||
if (tiling_g.log_domain >= 0) {
|
||||
|
@ -3908,7 +3907,7 @@ e_modapi_shutdown(E_Module *m)
|
|||
}
|
||||
|
||||
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);
|
||||
|
||||
|
|
|
@ -396,6 +396,7 @@ e_winlist_prev(void)
|
|||
void
|
||||
e_winlist_left(E_Zone *zone)
|
||||
{
|
||||
E_Border *bd;
|
||||
Eina_List *l;
|
||||
E_Desk *desk;
|
||||
E_Border *bd_orig;
|
||||
|
@ -414,9 +415,8 @@ e_winlist_left(E_Zone *zone)
|
|||
|
||||
desk = e_desk_current_get(zone);
|
||||
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 delta_next;
|
||||
|
||||
|
@ -515,6 +515,7 @@ e_winlist_left(E_Zone *zone)
|
|||
void
|
||||
e_winlist_down(E_Zone *zone)
|
||||
{
|
||||
E_Border *bd;
|
||||
Eina_List *l;
|
||||
E_Desk *desk;
|
||||
E_Border *bd_orig;
|
||||
|
@ -533,9 +534,8 @@ e_winlist_down(E_Zone *zone)
|
|||
|
||||
desk = e_desk_current_get(zone);
|
||||
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 delta_next;
|
||||
|
||||
|
@ -634,6 +634,7 @@ e_winlist_down(E_Zone *zone)
|
|||
void
|
||||
e_winlist_up(E_Zone *zone)
|
||||
{
|
||||
E_Border *bd;
|
||||
Eina_List *l;
|
||||
E_Desk *desk;
|
||||
E_Border *bd_orig;
|
||||
|
@ -652,9 +653,8 @@ e_winlist_up(E_Zone *zone)
|
|||
|
||||
desk = e_desk_current_get(zone);
|
||||
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 delta_next;
|
||||
|
||||
|
@ -753,6 +753,7 @@ e_winlist_up(E_Zone *zone)
|
|||
void
|
||||
e_winlist_right(E_Zone *zone)
|
||||
{
|
||||
E_Border *bd;
|
||||
Eina_List *l;
|
||||
E_Desk *desk;
|
||||
E_Border *bd_orig;
|
||||
|
@ -771,9 +772,8 @@ e_winlist_right(E_Zone *zone)
|
|||
|
||||
desk = e_desk_current_get(zone);
|
||||
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 delta_next;
|
||||
|
||||
|
@ -1311,14 +1311,12 @@ _e_winlist_cb_key_down(void *data __UNUSED__, int type __UNUSED__, void *event)
|
|||
{
|
||||
E_Action *act;
|
||||
Eina_List *l;
|
||||
E_Config_Binding_Key *bind;
|
||||
E_Config_Binding_Key *binding;
|
||||
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 (bind->action && strcmp(bind->action, "winlist")) continue;
|
||||
if (binding->action && strcmp(binding->action, "winlist")) continue;
|
||||
|
||||
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)
|
||||
mod |= E_BINDING_MODIFIER_WIN;
|
||||
|
||||
if (bind->key && (!strcmp(bind->key, ev->keyname)) &&
|
||||
((bind->modifiers == mod) || (bind->any_mod)))
|
||||
if (binding->key && (!strcmp(binding->key, ev->keyname)) &&
|
||||
((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)
|
||||
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)
|
||||
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;
|
||||
E_Action *act;
|
||||
Eina_List *l;
|
||||
E_Config_Binding_Key *bind;
|
||||
E_Config_Binding_Key *binding;
|
||||
E_Binding_Modifier mod;
|
||||
|
||||
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 (bind->action && strcmp(bind->action,"winlist")) continue;
|
||||
if (binding->action && strcmp(binding->action,"winlist")) continue;
|
||||
mod = 0;
|
||||
|
||||
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)
|
||||
mod |= E_BINDING_MODIFIER_WIN;
|
||||
|
||||
if (bind->key && (!strcmp(bind->key, ev->keyname)) &&
|
||||
((bind->modifiers == mod) || (bind->any_mod)))
|
||||
if (binding->key && (!strcmp(binding->key, ev->keyname)) &&
|
||||
((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)
|
||||
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)
|
||||
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_Win *ww;
|
||||
E_Winlist_Win *lww;
|
||||
Eina_List *l;
|
||||
|
||||
if (!(ww = data)) return;
|
||||
if (!_wins) return;
|
||||
for (l = _wins; l; l = l->next)
|
||||
if (l->data == ww) break;
|
||||
EINA_LIST_FOREACH(_wins, l, lww)
|
||||
if (lww == ww) break;
|
||||
_e_winlist_deactivate();
|
||||
_win_selected = l;
|
||||
_e_winlist_show_active();
|
||||
|
|
|
@ -20,25 +20,21 @@ static int next_prev = 0;
|
|||
EAPI int
|
||||
e_wizard_init(void)
|
||||
{
|
||||
E_Manager *man;
|
||||
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;
|
||||
|
||||
man = l->data;
|
||||
for (l2 = man->containers; l2; l2 = l2->next)
|
||||
EINA_LIST_FOREACH(man->containers, l2, con)
|
||||
{
|
||||
E_Container *con;
|
||||
Eina_List *l3;
|
||||
E_Zone *zone;
|
||||
|
||||
con = l2->data;
|
||||
for (l3 = con->zones; l3; l3 = l3->next)
|
||||
EINA_LIST_FOREACH(con->zones, l3, zone)
|
||||
{
|
||||
E_Zone *zone;
|
||||
|
||||
zone = l3->data;
|
||||
if (!pop)
|
||||
pop = _e_wizard_main_new(zone);
|
||||
else
|
||||
|
@ -52,20 +48,19 @@ e_wizard_init(void)
|
|||
EAPI int
|
||||
e_wizard_shutdown(void)
|
||||
{
|
||||
E_Wizard_Page *pg;
|
||||
E_Object *eo;
|
||||
|
||||
if (pop)
|
||||
{
|
||||
e_object_del(E_OBJECT(pop));
|
||||
pop = NULL;
|
||||
}
|
||||
while (pops)
|
||||
{
|
||||
e_object_del(E_OBJECT(pops->data));
|
||||
pops = eina_list_remove_list(pops, pops);
|
||||
}
|
||||
while (pages)
|
||||
{
|
||||
e_wizard_page_del(pages->data);
|
||||
}
|
||||
|
||||
EINA_LIST_FREE(pops, eo)
|
||||
e_object_del(eo);
|
||||
EINA_LIST_FREE(pages, pg)
|
||||
e_wizard_page_del(pg);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
@ -108,20 +103,21 @@ e_wizard_apply(void)
|
|||
EAPI void
|
||||
e_wizard_next(void)
|
||||
{
|
||||
E_Wizard_Page *page;
|
||||
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->hide)
|
||||
curpage->hide(curpage);
|
||||
}
|
||||
curpage = l->next->data;
|
||||
curpage = eina_list_data_get(eina_list_next(l));
|
||||
if (!curpage->data)
|
||||
{
|
||||
if (curpage->init)
|
||||
|
@ -165,11 +161,11 @@ e_wizard_page_show(Evas_Object *obj)
|
|||
|
||||
EAPI E_Wizard_Page *
|
||||
e_wizard_page_add(void *handle,
|
||||
int (*init) (E_Wizard_Page *pg),
|
||||
int (*shutdown) (E_Wizard_Page *pg),
|
||||
int (*show) (E_Wizard_Page *pg),
|
||||
int (*hide) (E_Wizard_Page *pg),
|
||||
int (*apply) (E_Wizard_Page *pg)
|
||||
int (*init_cb) (E_Wizard_Page *pg),
|
||||
int (*shutdown_cb) (E_Wizard_Page *pg),
|
||||
int (*show_cb) (E_Wizard_Page *pg),
|
||||
int (*hide_cb) (E_Wizard_Page *pg),
|
||||
int (*apply_cb) (E_Wizard_Page *pg)
|
||||
)
|
||||
{
|
||||
E_Wizard_Page *pg;
|
||||
|
@ -180,11 +176,11 @@ e_wizard_page_add(void *handle,
|
|||
pg->handle = handle;
|
||||
pg->evas = pop->evas;
|
||||
|
||||
pg->init = init;
|
||||
pg->shutdown = shutdown;
|
||||
pg->show = show;
|
||||
pg->hide = hide;
|
||||
pg->apply = apply;
|
||||
pg->init = init_cb;
|
||||
pg->shutdown = shutdown_cb;
|
||||
pg->show = show_cb;
|
||||
pg->hide = hide_cb;
|
||||
pg->apply = apply_cb;
|
||||
|
||||
pages = eina_list_append(pages, pg);
|
||||
|
||||
|
@ -245,29 +241,29 @@ _e_wizard_next_eval(void)
|
|||
static E_Popup *
|
||||
_e_wizard_main_new(E_Zone *zone)
|
||||
{
|
||||
E_Popup *pop;
|
||||
E_Popup *popup;
|
||||
Evas_Object *o;
|
||||
Evas_Modifier_Mask mask;
|
||||
Eina_Bool kg;
|
||||
|
||||
pop = e_popup_new(zone, 0, 0, zone->w, zone->h);
|
||||
e_popup_layer_set(pop, 255);
|
||||
o = edje_object_add(pop->evas);
|
||||
popup = e_popup_new(zone, 0, 0, zone->w, zone->h);
|
||||
e_popup_layer_set(popup, 255);
|
||||
o = edje_object_add(popup->evas);
|
||||
|
||||
e_theme_edje_object_set(o, "base/theme/wizard", "e/wizard/main");
|
||||
evas_object_move(o, 0, 0);
|
||||
evas_object_resize(o, zone->w, zone->h);
|
||||
evas_object_show(o);
|
||||
edje_object_signal_callback_add(o, "e,action,next", "",
|
||||
_e_wizard_cb_next, pop);
|
||||
_e_wizard_cb_next, popup);
|
||||
o_bg = o;
|
||||
|
||||
o = evas_object_rectangle_add(pop->evas);
|
||||
o = evas_object_rectangle_add(popup->evas);
|
||||
mask = 0;
|
||||
kg = evas_object_key_grab(o, "Tab", mask, ~mask, 0);
|
||||
if (!kg)
|
||||
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);
|
||||
if (!kg)
|
||||
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)
|
||||
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,
|
||||
_e_wizard_cb_key_down, pop);
|
||||
_e_wizard_cb_key_down, popup);
|
||||
|
||||
/* set up next/prev buttons */
|
||||
edje_object_part_text_set(o_bg, "e.text.title", _("Welcome to Enlightenment"));
|
||||
edje_object_signal_emit(o_bg, "e,state,next,disable", "e");
|
||||
e_wizard_labels_update();
|
||||
|
||||
e_popup_edje_bg_object_set(pop, o_bg);
|
||||
e_popup_show(pop);
|
||||
if (!e_grabinput_get(ecore_evas_software_x11_window_get(pop->ecore_evas),
|
||||
1, ecore_evas_software_x11_window_get(pop->ecore_evas)))
|
||||
e_popup_edje_bg_object_set(popup, o_bg);
|
||||
e_popup_show(popup);
|
||||
if (!e_grabinput_get(ecore_evas_software_x11_window_get(popup->ecore_evas),
|
||||
1, ecore_evas_software_x11_window_get(popup->ecore_evas)))
|
||||
{
|
||||
e_object_del(E_OBJECT(pop));
|
||||
pop = NULL;
|
||||
e_object_del(E_OBJECT(popup));
|
||||
popup = NULL;
|
||||
}
|
||||
return pop;
|
||||
return popup;
|
||||
}
|
||||
|
||||
static E_Popup *
|
||||
_e_wizard_extra_new(E_Zone *zone)
|
||||
{
|
||||
E_Popup *pop;
|
||||
E_Popup *popup;
|
||||
Evas_Object *o;
|
||||
|
||||
pop = e_popup_new(zone, 0, 0, zone->w, zone->h);
|
||||
e_popup_layer_set(pop, 255);
|
||||
o = edje_object_add(pop->evas);
|
||||
popup = e_popup_new(zone, 0, 0, zone->w, zone->h);
|
||||
e_popup_layer_set(popup, 255);
|
||||
o = edje_object_add(popup->evas);
|
||||
e_theme_edje_object_set(o, "base/theme/wizard", "e/wizard/extra");
|
||||
evas_object_move(o, 0, 0);
|
||||
evas_object_resize(o, zone->w, zone->h);
|
||||
evas_object_show(o);
|
||||
e_popup_edje_bg_object_set(pop, o);
|
||||
e_popup_show(pop);
|
||||
return pop;
|
||||
e_popup_edje_bg_object_set(popup, o);
|
||||
e_popup_show(popup);
|
||||
return popup;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
|
@ -11,14 +11,14 @@ static int do_gl = 0;
|
|||
static int do_vsync = 0;
|
||||
|
||||
static int
|
||||
match_file_glob(FILE *f, const char *glob)
|
||||
match_file_glob(FILE *f, const char *globbing)
|
||||
{
|
||||
char buf[32768];
|
||||
int found = 0;
|
||||
|
||||
while (fgets(buf, sizeof(buf), f))
|
||||
{
|
||||
if (e_util_glob_match(buf, glob))
|
||||
if (e_util_glob_match(buf, globbing))
|
||||
{
|
||||
found = 1;
|
||||
break;
|
||||
|
@ -29,7 +29,7 @@ match_file_glob(FILE *f, const char *glob)
|
|||
}
|
||||
|
||||
static int
|
||||
match_xorg_log(const char *glob)
|
||||
match_xorg_log(const char *globbing)
|
||||
{
|
||||
FILE *f;
|
||||
int i;
|
||||
|
@ -41,7 +41,7 @@ match_xorg_log(const char *glob)
|
|||
f = fopen(buf, "rb");
|
||||
if (f)
|
||||
{
|
||||
if (match_file_glob(f, glob)) return 1;
|
||||
if (match_file_glob(f, globbing)) return 1;
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue