act = data;
IF_FREE(act->name);
free(act);
- return 0;
+ return 1;
}
bd->client.icccm.fetch.protocol = 1;
bd->client.mwm.fetch.hints = 1;
bd->client.border.changed = 1;
+
+ bd->client.netwm.pid = 0;
+ bd->client.netwm.desktop = 0;
+ bd->client.netwm.state.modal = 0;
+ bd->client.netwm.state.sticky = 0;
+ bd->client.netwm.state.shaded = 0;
+ bd->client.netwm.state.hidden = 0;
+ bd->client.netwm.state.maximized_v = 0;
+ bd->client.netwm.state.maximized_h = 0;
+ bd->client.netwm.state.skip_taskbar = 0;
+ bd->client.netwm.state.skip_pager = 0;
+ bd->client.netwm.state.fullscreen = 0;
+ bd->client.netwm.state.stacking = E_STACKING_NONE;
+ bd->client.netwm.type = ECORE_X_WINDOW_TYPE_NORMAL;
bd->client.w = att->w;
bd->client.h = att->h;
E_Container *con;
Ecore_X_Window win;
int x, y;
+ char *s;
con = e_container_current_get(man);
maxh = 0;
o = evas_object_image_add(e);
- evas_object_image_file_set(o, e_path_find(path_images, "e.png"), NULL);
+ s = e_path_find(path_images, "e.png");
+ evas_object_image_file_set(o, s, NULL);
+ IF_FREE(s);
evas_object_move(o, 16, 16);
evas_object_resize(o, 64, 64);
evas_object_image_fill_set(o, 0, 0, 64, 64);
if (error_h > man->h) error_h = man->h;
o = evas_object_image_add(e);
- evas_object_image_file_set(o, e_path_find(path_images, "button_out.png"), NULL);
+ s = e_path_find(path_images, "button_out.png");
+ evas_object_image_file_set(o, s, NULL);
+ IF_FREE(s);
evas_object_move(o, (error_w - 64) / 2, error_h - 16 - 32);
evas_object_resize(o, 64, 32);
evas_object_image_fill_set(o, 0, 0, 64, 32);
evas_object_show(o);
o = evas_object_image_add(e);
- evas_object_image_file_set(o, e_path_find(path_images, "error_bg.png"), NULL);
+ s = e_path_find(path_images, "error_bg.png");
+ evas_object_image_file_set(o, s, NULL);
+ IF_FREE(s);
evas_object_move(o, 0, 0);
evas_object_image_fill_set(o, 0, 0, error_w, error_h);
evas_object_resize(o, error_w, error_h);
{
Evas_Event_Mouse_Down *ev;
Ecore_Evas *ee;
-
+ char *s;
+
ev = event_info;
if (ev->button != 1) return;
ee = data;
- evas_object_image_file_set(obj, e_path_find(path_images, "button_in.png"), NULL);
+ s = e_path_find(path_images, "button_in.png");
+ evas_object_image_file_set(obj, s, NULL);
+ IF_FREE(s);
}
static void
Evas_Event_Mouse_Up *ev;
Ecore_Evas *ee;
Evas_Object *o;
+ char *s;
ev = event_info;
if (ev->button != 1) return;
ee = data;
- evas_object_image_file_set(obj, e_path_find(path_images, "button_out.png"), NULL);
+ s = e_path_find(path_images, "button_out.png");
+ evas_object_image_file_set(obj, s, NULL);
+ IF_FREE(s);
o = evas_object_name_find(ecore_evas_get(ee), "allocated");
if (o)
{
E_Menu *m;
E_Menu_Item *mi;
int disallow, seperator;
+ char *s;
E_OBJECT_CHECK_RETURN(gmc, NULL);
E_OBJECT_TYPE_CHECK_RETURN(gmc, E_GADMAN_CLIENT_TYPE, NULL);
e_menu_item_label_set(mi, _("Automatic Width"));
e_menu_item_check_set(mi, 1);
e_menu_item_toggle_set(mi, gmc->use_autow);
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "auto_width");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "auto_width");
+ IF_FREE(s);
e_menu_item_callback_set(mi, _e_gadman_cb_auto_width, gmc);
mi = e_menu_item_new(m);
e_menu_item_separator_set(mi, 1);
}
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Half Screen Width"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "half_width");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "half_width");
+ IF_FREE(s);
e_menu_item_callback_set(mi, _e_gadman_cb_half_width, gmc);
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Full Screen Width"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "full_width");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "full_width");
+ IF_FREE(s);
e_menu_item_callback_set(mi, _e_gadman_cb_full_width, gmc);
}
disallow = (gmc->policy & E_GADMAN_POLICY_EDGES)
seperator = 1;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Center Horizontally"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "center_horiz");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "center_horiz");
+ IF_FREE(s);
e_menu_item_callback_set(mi, _e_gadman_cb_center_horiz, gmc);
}
if (seperator)
e_menu_item_label_set(mi, _("Automatic Height"));
e_menu_item_check_set(mi, 1);
e_menu_item_toggle_set(mi, gmc->use_autoh);
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "auto_height");
+ s = e_path_find(path_icons, "default.edj"),
+ e_menu_item_icon_edje_set(mi, s, "auto_height");
+ IF_FREE(s);
e_menu_item_callback_set(mi, _e_gadman_cb_auto_height, gmc);
mi = e_menu_item_new(m);
e_menu_item_separator_set(mi, 1);
}
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Half Screen Height"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "half_height");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "half_height");
+ IF_FREE(s);
e_menu_item_callback_set(mi, _e_gadman_cb_half_height, gmc);
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Full Screen Height"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "full_height");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "full_height");
e_menu_item_callback_set(mi, _e_gadman_cb_full_height, gmc);
}
disallow = (gmc->policy & E_GADMAN_POLICY_EDGES)
seperator = 1;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Center Vertically"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "center_vert");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "center_vert");
+ IF_FREE(s);
e_menu_item_callback_set(mi, _e_gadman_cb_center_vert, gmc);
}
if (seperator)
ecore_x_netwm_client_list_stacking_set(m->root, 0, NULL);
}
}
-
+ IF_FREE(clients);
}
/* Client list is already in stacking order, so this function is nearly
ecore_x_netwm_client_list_stacking_set(m->root, 0, NULL);
}
}
-
+ IF_FREE(clients);
}
void
unsigned int current;
current = (bd->desk->y * bd->zone->desk_x_count) + bd->desk->x;
+ /* if valgrind complains here it is complaining bd->client.netwm.desktop
+ * is an uninitialised variable - but it isn't. it can't be. its part of
+ * a calloc()'d struct and thus has to have been set to 0. hell even
+ * e_border.c explicitly sets it to 0 on creation of the border object.
+ */
if (bd->client.netwm.desktop != current)
{
deskpos[0] = bd->desk->x;
int num;
Evas_Object *o;
Evas_List *l, *screens;
+ char *s;
num = 0;
roots = ecore_x_window_root_list(&num);
/* first screen */
if (l == screens)
{
- edje_object_file_set(o,
- /* FIXME: "init.edj" needs to come from config */
- e_path_find(path_init, "init.edj"),
- "init/splash");
+ /* FIXME: "init.edj" needs to come from config */
+ s = e_path_find(path_init, "init.edj"),
+ edje_object_file_set(o, s, "init/splash");
+ IF_FREE(s);
_e_init_object = o;
}
/* other screens */
else
- edje_object_file_set(o,
- /* FIXME: "init.edj" needs to come from config */
- e_path_find(path_init, "init.edj"),
- "init/extra_screen");
+ {
+ /* FIXME: "init.edj" needs to come from config */
+ s = e_path_find(path_init, "init.edj"),
+ edje_object_file_set(o, s, "init/extra_screen");
+ IF_FREE(s);
+ }
evas_object_move(o, scr->x, scr->y);
evas_object_resize(o, scr->w, scr->h);
evas_object_show(o);
else
{
o = edje_object_add(_e_init_evas);
- edje_object_file_set(o,
- /* FIXME: "init.edj" needs to come from config */
- e_path_find(path_init, "init.edj"),
- "init/splash");
+ /* FIXME: "init.edj" needs to come from config */
+ s = e_path_find(path_init, "init.edj"),
+ edje_object_file_set(o, s, "init/splash");
+ IF_FREE(s);
_e_init_object = o;
evas_object_move(o, 0, 0);
evas_object_resize(o, w, h);
E_Menu *m, *subm;
E_Menu_Item *mi;
Main_Data *dat;
+ char *s;
dat = calloc(1, sizeof(Main_Data));
m = e_menu_new();
dat->apps = subm;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Favorite Applications"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "favorites");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "favorites");
+ IF_FREE(s);
e_menu_item_submenu_set(mi, subm);
mi = e_menu_item_new(m);
dat->modules = subm;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Modules"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "module");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "module");
+ IF_FREE(s);
e_menu_item_submenu_set(mi, subm);
subm = e_int_menus_desktops_new();
dat->desktops = subm;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Desktops"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "desktops");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "desktops");
+ IF_FREE(s);
e_menu_item_submenu_set(mi, subm);
subm = e_int_menus_clients_new();
dat->clients = subm;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Windows"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "windows");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "windows");
+ IF_FREE(s);
e_menu_item_submenu_set(mi, subm);
subm = e_int_menus_gadgets_new();
dat->gadgets = subm;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Gadgets"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "gadgets");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "gadgets");
+ IF_FREE(s);
e_menu_item_submenu_set(mi, subm);
subm = e_int_menus_themes_new();
dat->themes = subm;
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Themes"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "theme");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "theme");
+ IF_FREE(s);
e_menu_item_submenu_set(mi, subm);
mi = e_menu_item_new(m);
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("About Enlightenment"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "e");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "e");
+ IF_FREE(s);
e_menu_item_callback_set(mi, _e_int_menus_main_about, NULL);
mi = e_menu_item_new(m);
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Restart Enlightenment"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "reset");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "reset");
+ IF_FREE(s);
e_menu_item_callback_set(mi, _e_int_menus_main_restart, NULL);
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Exit Enlightenment"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "power");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "power");
+ IF_FREE(s);
e_menu_item_callback_set(mi, _e_int_menus_main_exit, NULL);
return m;
}
Evas_List *l, *borders = NULL;
E_Menu *root;
E_Zone *zone = NULL;
+ char *s;
e_menu_pre_activate_callback_set(m, NULL, NULL);
root = e_menu_root_get(m);
mi = e_menu_item_new(m);
e_menu_item_label_set(mi, _("Cleanup Windows"));
- e_menu_item_icon_edje_set(mi,
- e_path_find(path_icons, "default.edj"),
- "windows");
+ s = e_path_find(path_icons, "default.edj");
+ e_menu_item_icon_edje_set(mi, s, "windows");
+ IF_FREE(s);
e_menu_item_callback_set(mi, _e_int_menus_clients_cleanup_cb, zone);
e_object_free_attach_func_set(E_OBJECT(m), _e_int_menus_clients_free_hook);
e_object_data_set(E_OBJECT(m), borders);
e_config->modules = evas_list_append(e_config->modules, em);
e_config_save_queue();
}
+ free(modpath);
return m;
}
static void _e_path_cache_free(E_Path *ep);
static Evas_Bool _e_path_cache_free_cb(Evas_Hash *hash, const char *key, void *data, void *fdata);
-/* local subsystem globals */
-static char _e_path_buf[PATH_MAX] = "";
-
/* externally accessible functions */
E_Path *
e_path_new(void)
{
Evas_List *l;
char *str;
+ char buf[PATH_MAX] = "";
E_OBJECT_CHECK_RETURN(ep, NULL);
E_OBJECT_TYPE_CHECK_RETURN(ep, E_PATH_TYPE, NULL);
if (!file) return NULL;
- _e_path_buf[0] = 0;
str = evas_hash_find(ep->hash, file);
- if (str)
- {
- strcpy(_e_path_buf, str);
- return _e_path_buf;
- }
+ if (str) return strdup(str);
/* Look in the default dir list */
for (l = ep->default_dir_list; l; l = l->next)
{
epd = l->data;
if (epd->dir)
{
- snprintf(_e_path_buf, sizeof(_e_path_buf), "%s/%s", epd->dir, file);
- rp = ecore_file_realpath(_e_path_buf);
+ snprintf(buf, sizeof(buf), "%s/%s", epd->dir, file);
+ rp = ecore_file_realpath(buf);
if ((rp) && (rp[0] != 0))
{
- strncpy(_e_path_buf, rp, sizeof(_e_path_buf) - 1);
- _e_path_buf[sizeof(_e_path_buf) - 1] = 0;
+ strncpy(buf, rp, sizeof(buf) - 1);
+ buf[sizeof(buf) - 1] = 0;
free(rp);
if (evas_hash_size(ep->hash) >= 512)
_e_path_cache_free(ep);
- ep->hash = evas_hash_add(ep->hash, file, strdup(_e_path_buf));
- return _e_path_buf;
+ ep->hash = evas_hash_add(ep->hash, file, strdup(buf));
+ return strdup(buf);
}
if (rp) free(rp);
}
epd = l->data;
if (epd->dir)
{
- snprintf(_e_path_buf, sizeof(_e_path_buf), "%s/%s", epd->dir, file);
- rp = ecore_file_realpath(_e_path_buf);
+ snprintf(buf, sizeof(buf), "%s/%s", epd->dir, file);
+ rp = ecore_file_realpath(buf);
if ((rp) && (rp[0] != 0))
{
- strncpy(_e_path_buf, rp, sizeof(_e_path_buf) - 1);
- _e_path_buf[sizeof(_e_path_buf) - 1] = 0;
+ strncpy(buf, rp, sizeof(buf) - 1);
+ buf[sizeof(buf) - 1] = 0;
free(rp);
if (evas_hash_size(ep->hash) >= 512)
_e_path_cache_free(ep);
- ep->hash = evas_hash_add(ep->hash, file, strdup(_e_path_buf));
- return _e_path_buf;
+ ep->hash = evas_hash_add(ep->hash, file, strdup(buf));
+ return strdup(buf);
}
if (rp) free(rp);
}
}
- return _e_path_buf;
+ return NULL;
}
void
epd = l->data;
if (epd->dir) evas_font_path_append(evas, epd->dir);
+ free(epd->dir);
+ free(epd);
}
+ if (dir_list) evas_list_free(dir_list);
}
/* compine default_list and and user_list int and easy to use list */
_e_path_cache_free_cb(Evas_Hash *hash __UNUSED__, const char *key __UNUSED__, void *data, void *fdata __UNUSED__)
{
free(data);
- return 0;
+ return 1;
}
int w, h;
Evas_Object *o;
int *pix;
+ char *s;
E_OBJECT_CHECK(E_OBJECT(con));
o = evas_object_image_add(con->bg_evas);
if (ecore_x_cursor_color_supported_get())
- evas_object_image_file_set(o, e_path_find(path_images, "pointer.png"), NULL);
+ {
+ s = e_path_find(path_images, "pointer.png");
+ evas_object_image_file_set(o, s, NULL);
+ IF_FREE(s);
+ }
else
- evas_object_image_file_set(o, e_path_find(path_images, "pointer_mono.png"), NULL);
+ {
+ s = e_path_find(path_images, "pointer_mono.png");
+ evas_object_image_file_set(o, s, NULL);
+ IF_FREE(s);
+ }
evas_object_image_size_get(o, &w, &h);
pix = evas_object_image_data_get(o, 0);
cur = ecore_x_cursor_new(con->win, pix, w, h, 0, 0);
Evas_Object *o;
int *pix;
Evas *e;
+ char *s;
e = ecore_evas_get(ee);
win = ecore_evas_software_x11_window_get(ee);
o = evas_object_image_add(e);
if (ecore_x_cursor_color_supported_get())
- evas_object_image_file_set(o, e_path_find(path_images, "pointer.png"), NULL);
+ {
+ s = e_path_find(path_images, "pointer.png");
+ evas_object_image_file_set(o, s, NULL);
+ IF_FREE(s);
+ }
else
- evas_object_image_file_set(o, e_path_find(path_images, "pointer_mono.png"), NULL);
+ {
+ s = e_path_find(path_images, "pointer_mono.png");
+ evas_object_image_file_set(o, s, NULL);
+ IF_FREE(s);
+ }
evas_object_image_size_get(o, &w, &h);
pix = evas_object_image_data_get(o, 0);
cur = ecore_x_cursor_new(win, pix, w, h, 0, 0);
if (str[0] != '/')
str = e_path_find(path_themes, str);
/* save cached value */
- if (str)
- res->cache = strdup(str);
+ if (str) res->cache = str;
}
if (str)
{
if (str[0] != '/')
str = e_path_find(path_themes, str);
/* save cached value */
- if (str)
- res->cache = strdup(str);
+ if (str) res->cache = str;
}
if (str)
{
_cpufreq_status_free(e->status);
free(e->set_exe_path);
-// while (e->conf->faces)
-// {
-// free(e->conf->faces->data);
-// e->conf->faces = evas_list_remove_list(e->conf->faces, e->conf->faces);
-// }
+ evas_list_free(e->conf->faces);
free(e->conf);
free(e);
}
ecore_timer_del(e->temperature_check_timer);
+ for (l = e->conf->faces; l; l = l->next)
+ free(l->data);
evas_list_free(e->conf->faces);
free(e->conf);
free(e);