diff --git a/src/bin/e_container.c b/src/bin/e_container.c
index 35683bdac..65e04e92e 100644
--- a/src/bin/e_container.c
+++ b/src/bin/e_container.c
@@ -567,7 +567,7 @@ e_container_borders_count(E_Container *con)
EAPI void
e_container_border_add(E_Border *bd)
{
- int pos;
+ int pos = 0;
if (bd->layer == 0) pos = 0;
else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
@@ -584,44 +584,45 @@ e_container_border_add(E_Border *bd)
EAPI void
e_container_border_remove(E_Border *bd)
{
- int i, cl = 0;
+ int i;
+ if (!bd->zone) return;
/* FIXME: Could revert to old behaviour, ->layer is consistent
* with pos now. */
for (i = 0; i < 7; i++)
{
bd->zone->container->layers[i].clients =
evas_list_remove(bd->zone->container->layers[i].clients, bd);
- cl += evas_list_count(bd->zone->container->layers[i].clients);
}
- bd->zone->container->clients = cl;
+ bd->zone->container->clients--;
+ bd->zone = NULL;
}
EAPI void
e_container_window_raise(E_Container *con, Ecore_X_Window win, int layer)
{
- int pos;
+ int pos = 0;
- if (layer == 0) pos = 1;
- else if ((layer > 0) && (layer <= 50)) pos = 2;
- else if ((layer > 50) && (layer <= 100)) pos = 3;
- else if ((layer > 100) && (layer <= 150)) pos = 4;
- else if ((layer > 150) && (layer <= 200)) pos = 5;
- else pos = 6;
+ if (layer <= 0) pos = 0;
+ else if ((layer > 0) && (layer <= 50)) pos = 1;
+ else if ((layer > 50) && (layer <= 100)) pos = 2;
+ else if ((layer > 100) && (layer <= 150)) pos = 3;
+ else if ((layer > 150) && (layer <= 200)) pos = 4;
+ else pos = 5;
ecore_x_window_configure(win,
ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
0, 0, 0, 0, 0,
- con->layers[pos].win, ECORE_X_WINDOW_STACK_BELOW);
+ con->layers[pos + 1].win, ECORE_X_WINDOW_STACK_BELOW);
}
EAPI void
e_container_window_lower(E_Container *con, Ecore_X_Window win, int layer)
{
- int pos;
+ int pos = 0;
- if (layer == 0) pos = 0;
+ if (layer <= 0) pos = 0;
else if ((layer > 0) && (layer <= 50)) pos = 1;
else if ((layer > 50) && (layer <= 100)) pos = 2;
else if ((layer > 100) && (layer <= 150)) pos = 3;
@@ -640,7 +641,7 @@ e_container_border_raise(E_Border *bd)
{
E_Border *above = NULL;
Evas_List *l;
- int pos, i;
+ int pos = 0, i;
/* Remove from old layer */
for (i = 0; i < 7; i++)
@@ -650,24 +651,24 @@ e_container_border_raise(E_Border *bd)
}
/* Add to new layer */
- if (bd->layer == 0) pos = 1;
- else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 2;
- else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 3;
- else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 4;
- else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 5;
- else pos = 6;
+ if (bd->layer <= 0) pos = 0;
+ else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
+ else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
+ else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
+ else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 4;
+ else pos = 5;
ecore_x_window_configure(bd->win,
ECORE_X_WINDOW_CONFIGURE_MASK_SIBLING |
ECORE_X_WINDOW_CONFIGURE_MASK_STACK_MODE,
0, 0, 0, 0, 0,
- bd->zone->container->layers[pos].win, ECORE_X_WINDOW_STACK_BELOW);
+ bd->zone->container->layers[pos + 1].win, ECORE_X_WINDOW_STACK_BELOW);
- bd->zone->container->layers[pos - 1].clients =
- evas_list_append(bd->zone->container->layers[pos - 1].clients, bd);
+ bd->zone->container->layers[pos].clients =
+ evas_list_append(bd->zone->container->layers[pos].clients, bd);
/* Find the window below this one */
- l = evas_list_find_list(bd->zone->container->layers[pos - 1].clients, bd);
+ l = evas_list_find_list(bd->zone->container->layers[pos].clients, bd);
if (l->prev)
above = l->prev->data;
else
@@ -693,7 +694,7 @@ e_container_border_lower(E_Border *bd)
{
E_Border *below = NULL;
Evas_List *l;
- int pos, i;
+ int pos = 0, i;
/* Remove from old layer */
for (i = 0; i < 7; i++)
@@ -703,7 +704,7 @@ e_container_border_lower(E_Border *bd)
}
/* Add to new layer */
- if (bd->layer == 0) pos = 0;
+ if (bd->layer <= 0) pos = 0;
else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
@@ -743,23 +744,19 @@ e_container_border_lower(E_Border *bd)
EAPI void
e_container_border_stack_above(E_Border *bd, E_Border *above)
{
- int pos;
+ int pos = 0, i;
/* Remove from old layer */
- if (bd->layer == 0) pos = 0;
- else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
- else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
- else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
- else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 4;
- else pos = 5;
-
- bd->zone->container->layers[pos].clients =
- evas_list_remove(bd->zone->container->layers[pos].clients, bd);
+ for (i = 0; i < 7; i++)
+ {
+ bd->zone->container->layers[i].clients =
+ evas_list_remove(bd->zone->container->layers[i].clients, bd);
+ }
/* Add to new layer */
bd->layer = above->layer;
- if (bd->layer == 0) pos = 0;
+ if (bd->layer <= 0) pos = 0;
else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
@@ -779,23 +776,19 @@ e_container_border_stack_above(E_Border *bd, E_Border *above)
EAPI void
e_container_border_stack_below(E_Border *bd, E_Border *below)
{
- int pos;
+ int pos = 0, i;
/* Remove from old layer */
- if (bd->layer == 0) pos = 0;
- else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
- else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
- else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
- else if ((bd->layer > 150) && (bd->layer <= 200)) pos = 4;
- else pos = 5;
-
- bd->zone->container->layers[pos].clients =
- evas_list_remove(bd->zone->container->layers[pos].clients, bd);
+ for (i = 0; i < 7; i++)
+ {
+ bd->zone->container->layers[i].clients =
+ evas_list_remove(bd->zone->container->layers[i].clients, bd);
+ }
/* Add to new layer */
bd->layer = below->layer;
- if (bd->layer == 0) pos = 0;
+ if (bd->layer <= 0) pos = 0;
else if ((bd->layer > 0) && (bd->layer <= 50)) pos = 1;
else if ((bd->layer > 50) && (bd->layer <= 100)) pos = 2;
else if ((bd->layer > 100) && (bd->layer <= 150)) pos = 3;
@@ -939,7 +932,7 @@ _e_container_free(E_Container *con)
Evas_List *l, *tmp;
ecore_x_window_del(con->event_win);
- /* We can't use e_object_del here, because border adds a ref to itself
+ /* We can't use e_object_del here, because border adds a ref to itself
* when it is removed, and the ref is never unref'ed */
/* FIXME: had to disable this as it was freeing already freed items during
* looping (particularly remember/lock config dialogs). this is just
diff --git a/src/bin/e_fm.c b/src/bin/e_fm.c
index c472a12f1..98eb39b23 100644
--- a/src/bin/e_fm.c
+++ b/src/bin/e_fm.c
@@ -239,8 +239,8 @@ e_fm2_path_set(Evas_Object *obj, const char *dev, const char *path)
sd->config->view.selector = 1;
sd->config->view.single_click = 0;
sd->config->view.no_subdir_jump = 0;
- sd->config->icon.icon.w = 64;
- sd->config->icon.icon.h = 64;
+ sd->config->icon.icon.w = 128;
+ sd->config->icon.icon.h = 128;
sd->config->icon.list.w = 24;
sd->config->icon.list.h = 24;
sd->config->icon.fixed.w = 1;
diff --git a/src/bin/e_hints.c b/src/bin/e_hints.c
index 1dd2d03f3..e7f7f4afa 100644
--- a/src/bin/e_hints.c
+++ b/src/bin/e_hints.c
@@ -307,11 +307,11 @@ e_hints_client_stacking_set(void)
{
if (i >= num)
{
- e_error_message_show("e_hints.c: e_hints_client_stacking_set()
"
- "
"
- "Window list size greater than window count.
"
- "This is really bad.
"
- "Please report this.");
+ e_error_message_show("e_hints.c: e_hints_client_stacking_set()\n"
+ "\n"
+ "Window list size greater than window count.\n"
+ "This is really bad.\n"
+ "Please report this.\n");
break;
}
clients[i++] = b->win;
@@ -321,11 +321,11 @@ e_hints_client_stacking_set(void)
}
if (i < num)
{
- e_error_message_show("e_hints.c: e_hints_client_stacking_set()
"
- "
"
- "Window list size less than window count.
"
- "This is strange, but not harmful.
"
- "Please report this.");
+ e_error_message_show("e_hints.c: e_hints_client_stacking_set()\n"
+ "\n"
+ "Window list size less than window count.\n"
+ "This is strange, but not harmful.\n"
+ "Please report this.\n");
}
for (ml = e_manager_list(); ml; ml = ml->next)
{
diff --git a/src/bin/e_int_config_wallpaper_import.c b/src/bin/e_int_config_wallpaper_import.c
index 93e296c08..d3991bc55 100644
--- a/src/bin/e_int_config_wallpaper_import.c
+++ b/src/bin/e_int_config_wallpaper_import.c
@@ -138,7 +138,7 @@ e_int_config_wallpaper_import(E_Config_Dialog *parent)
}
ofm = e_widget_fsel_add(evas, fdev, fpath, NULL, NULL,
_import_cb_sel_selected, import,
- _import_cb_sel_change, import, 0
+ _import_cb_sel_change, import, 1
);
import->fsel_obj = ofm;
e_widget_list_object_append(o, ofm, 1, 1, 0.5);
diff --git a/src/bin/e_widget.c b/src/bin/e_widget.c
index abb6bf941..f4d441c30 100644
--- a/src/bin/e_widget.c
+++ b/src/bin/e_widget.c
@@ -116,8 +116,10 @@ EAPI void
e_widget_min_size_set(Evas_Object *obj, Evas_Coord minw, Evas_Coord minh)
{
API_ENTRY return;
- sd->minw = minw;
- sd->minh = minh;
+ if (minw >= 0)
+ sd->minw = minw;
+ if (minh >= 0)
+ sd->minh = minh;
}
EAPI void
diff --git a/src/bin/e_widget_fsel.c b/src/bin/e_widget_fsel.c
index 679d29f01..22449a332 100644
--- a/src/bin/e_widget_fsel.c
+++ b/src/bin/e_widget_fsel.c
@@ -28,6 +28,7 @@ struct _E_Widget_Data
Evas_Object *o_files_frame;
Evas_Object *o_files_fm;
Evas_Object *o_entry;
+ Evas_Coord preview_w, preview_h;
char *entry_text;
char *preview_size_text;
char *preview_owner_text;
@@ -41,6 +42,7 @@ struct _E_Widget_Data
int preview;
};
+static void _e_wid_fsel_preview_update(void *data, Evas_Object *obj, void *event_info);
static void _e_wid_fsel_preview_file(E_Widget_Data *wd);
static char *_e_wid_file_size_get(off_t st_size);
static char *_e_wid_file_user_get(uid_t st_uid);
@@ -244,64 +246,74 @@ e_widget_fsel_add(Evas *evas, const char *dev, const char *path, char *selected,
wd->o_preview_table = o;
e_widget_sub_object_add(obj, o);
- o = e_widget_preview_add(evas, 64, 64);
+ o = e_widget_preview_add(evas, 128, 128);
wd->o_preview_preview = o;
e_widget_sub_object_add(obj, o);
+ evas_object_smart_callback_add(o, "preview_update",
+ _e_wid_fsel_preview_update, wd);
e_widget_table_object_append(wd->o_preview_preview_table,
wd->o_preview_preview,
- 0, 0, 1, 1, 1, 1, 1, 1);
+ 0, 0, 1, 1, 0, 0, 1, 1);
o = e_widget_label_add(evas, "Size:");
wd->o_preview_size = o;
e_widget_sub_object_add(obj, o);
- e_widget_table_object_append(wd->o_preview_table, wd->o_preview_size,
+ e_widget_table_object_append(wd->o_preview_table,
+ wd->o_preview_size,
0, 0, 1, 1, 1, 1, 1, 1);
o = e_widget_entry_add(evas, &(wd->preview_size_text));
wd->o_preview_size_entry = o;
e_widget_sub_object_add(obj, o);
- e_widget_min_size_set(o, 100, 15);
+ e_widget_min_size_set(o, 100, -1);
e_widget_table_object_append(wd->o_preview_table,
- wd->o_preview_size_entry, 1, 0, 1, 1, 1, 1, 1, 1);
+ wd->o_preview_size_entry,
+ 1, 0, 1, 1, 1, 1, 1, 1);
o = e_widget_label_add(evas, "Owner:");
wd->o_preview_owner = o;
e_widget_sub_object_add(obj, o);
- e_widget_table_object_append(wd->o_preview_table, wd->o_preview_owner,
+ e_widget_table_object_append(wd->o_preview_table,
+ wd->o_preview_owner,
0, 1, 1, 1, 1, 1, 1, 1);
o = e_widget_entry_add(evas, &(wd->preview_owner_text));
wd->o_preview_owner_entry = o;
e_widget_sub_object_add(obj, o);
- e_widget_min_size_set(o, 100, 15);
+ e_widget_min_size_set(o, 100, -1);
e_widget_table_object_append(wd->o_preview_table,
- wd->o_preview_owner_entry, 1, 1, 1, 1, 1, 1, 1, 1);
+ wd->o_preview_owner_entry,
+ 1, 1, 1, 1, 1, 1, 1, 1);
o = e_widget_label_add(evas, "Permissions:");
wd->o_preview_perms = o;
e_widget_sub_object_add(obj, o);
- e_widget_table_object_append(wd->o_preview_table, wd->o_preview_perms,
+ e_widget_table_object_append(wd->o_preview_table,
+ wd->o_preview_perms,
0, 2, 1, 1, 1, 1, 1, 1);
-
+
o = e_widget_entry_add(evas, &(wd->preview_perms_text));
wd->o_preview_perms_entry = o;
e_widget_sub_object_add(obj, o);
- e_widget_min_size_set(o, 100, 15);
+ e_widget_min_size_set(o, 100, -1);
e_widget_table_object_append(wd->o_preview_table,
- wd->o_preview_perms_entry, 1, 2, 1, 1, 1, 1, 1, 1);
+ wd->o_preview_perms_entry,
+ 1, 2, 1, 1, 1, 1, 1, 1);
o = e_widget_label_add(evas, "Modified:");
wd->o_preview_time = o;
e_widget_sub_object_add(obj, o);
- e_widget_table_object_append(wd->o_preview_table, wd->o_preview_time,
+ e_widget_table_object_append(wd->o_preview_table,
+ wd->o_preview_time,
0, 3, 1, 1, 1, 1, 1, 1);
o = e_widget_entry_add(evas, &(wd->preview_time_text));
wd->o_preview_time_entry = o;
e_widget_sub_object_add(obj, o);
- e_widget_min_size_set(o, 100, 15);
+ e_widget_min_size_set(o, 100, -1);
e_widget_table_object_append(wd->o_preview_table,
- wd->o_preview_time_entry, 1, 3, 1, 1, 1, 1, 1, 1);
+ wd->o_preview_time_entry,
+ 1, 3, 1, 1, 1, 1, 1, 1);
}
@@ -388,13 +400,13 @@ e_widget_fsel_add(Evas *evas, const char *dev, const char *path, char *selected,
{
e_widget_frametable_object_append(wd->o_preview_frame,
wd->o_preview_preview_table,
- 0, 0, 1, 1, 1, 1, 1, 1);
+ 0, 0, 1, 1, 0, 0, 1, 1);
e_widget_frametable_object_append(wd->o_preview_frame,
wd->o_preview_table,
- 0, 1, 1, 1, 1, 1, 1, 1);
+ 0, 1, 1, 1, 0, 0, 0, 0);
e_widget_table_object_append(wd->o_table2,
wd->o_preview_frame,
- 2, 1, 1, 1, 1, 1, 1, 1);
+ 2, 1, 1, 1, 0, 1, 0, 1);
}
e_widget_table_object_append(wd->o_table, wd->o_table2,
@@ -451,10 +463,22 @@ e_widget_fsel_selection_path_get(Evas_Object *obj)
return wd->path;
}
+static void
+_e_wid_fsel_preview_update(void *data, Evas_Object *obj, void *event_info)
+{
+ E_Widget_Data *wd;
+ Evas_Coord w = 0, h = 0;
+
+ wd = data;
+ evas_object_geometry_get(obj, NULL, NULL, &w, &h);
+ e_widget_table_object_repack(wd->o_preview_preview_table,
+ wd->o_preview_preview,
+ 0, 0, 1, 1, 0, 0, 1, 1);
+}
+
static void
_e_wid_fsel_preview_file(E_Widget_Data *wd)
{
-// Evas_Coord mw = 0, mh = 0;
char *size, *owner, *perms, *time;
struct stat st;
@@ -465,14 +489,12 @@ _e_wid_fsel_preview_file(E_Widget_Data *wd)
perms = _e_wid_file_perms_get(st.st_mode, st.st_uid, st.st_gid);
time = _e_wid_file_time_get(st.st_mtime);
- e_widget_preview_thumb_set(wd->o_preview_preview, wd->path, "background", 120, 120);
+ e_widget_preview_thumb_set(wd->o_preview_preview, wd->path,
+ "background", 128, 128);
- /*e_table_unpack(wd->o_preview_preview);
- e_table_pack(wd->o_preview_preview_table, wd->o_preview_preview, 0, 0, 1, 1);
- e_widget_min_size_get(wd->o_preview_preview, &mw, &mh);
- e_table_pack_options_set(wd->o_preview_preview, 1, 1, 1, 1, 0.5, 0.5, mw, mh, 99999, 99999);
- e_table_min_size_get(wd->o_preview_preview_table, &mw, &mh);
- e_widget_min_size_set(wd->o_preview_preview_table, mw, mh);*/
+ e_widget_table_object_repack(wd->o_preview_preview_table,
+ wd->o_preview_preview,
+ 0, 0, 1, 1, 0, 0, 1, 1);
e_widget_entry_text_set(wd->o_preview_size_entry, size);
e_widget_entry_text_set(wd->o_preview_owner_entry, owner);
diff --git a/src/bin/e_widget_preview.c b/src/bin/e_widget_preview.c
index b2b7df36a..6aba9c1ed 100644
--- a/src/bin/e_widget_preview.c
+++ b/src/bin/e_widget_preview.c
@@ -6,7 +6,7 @@
typedef struct _E_Widget_Data E_Widget_Data;
struct _E_Widget_Data
{
- Evas_Object *o_frame, *img, *o_thumb;
+ Evas_Object *obj, *o_frame, *img, *o_thumb;
};
static void _e_wid_del_hook(Evas_Object *obj);
@@ -25,6 +25,8 @@ e_widget_preview_add(Evas *evas, int minw, int minh)
e_widget_del_hook_set(obj, _e_wid_del_hook);
wd = calloc(1, sizeof(E_Widget_Data));
+ wd->obj = obj;
+
o = edje_object_add(evas);
wd->o_frame = o;
e_theme_edje_object_set(o, "base/theme/widgets",
@@ -78,7 +80,10 @@ e_widget_preview_thumb_set(Evas_Object *obj, const char *file, const char *key,
evas_object_del(wd->img);
wd->img = e_thumb_icon_add(evas_object_evas_get(obj));
- e_thumb_icon_file_set(wd->img, file, key);
+ if (e_util_glob_case_match(file, "*.edj"))
+ e_thumb_icon_file_set(wd->img, file, "e/desktop/background");
+ else
+ e_thumb_icon_file_set(wd->img, file, NULL);
e_thumb_icon_size_set(wd->img, w, h);
e_thumb_icon_begin(wd->img);
evas_object_smart_callback_add(wd->img, "e_thumb_gen", _e_wid_preview_thumb_gen, wd);
@@ -96,7 +101,13 @@ _e_wid_preview_thumb_gen(void *data, Evas_Object *obj, void *event_info)
wd = data;
e_icon_size_get(wd->img, &w, &h);
- evas_object_resize(wd->o_frame, w, h);
+ edje_extern_object_min_size_set(wd->img, w, h);
+ edje_extern_object_max_size_set(wd->img, w, h);
+ edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->img);
+ edje_object_size_min_calc(wd->o_frame, &w, &h);
+ e_widget_min_size_set(wd->obj, w, h);
+ evas_object_resize(wd->obj, w, h);
+ evas_object_smart_callback_call(wd->obj, "preview_update", NULL);
}
EAPI int
diff --git a/src/bin/e_widget_table.c b/src/bin/e_widget_table.c
index 1cd4635be..adbf5c7bd 100644
--- a/src/bin/e_widget_table.c
+++ b/src/bin/e_widget_table.c
@@ -59,6 +59,28 @@ e_widget_table_object_append(Evas_Object *obj, Evas_Object *sobj, int col, int r
evas_object_show(sobj);
}
+EAPI void
+e_widget_table_object_repack(Evas_Object *obj, Evas_Object *sobj, int col, int row, int colspan, int rowspan, int fill_w, int fill_h, int expand_w, int expand_h)
+{
+ E_Widget_Data *wd;
+ Evas_Coord mw = 0, mh = 0;
+
+ wd = e_widget_data_get(obj);
+
+ e_table_unpack(sobj);
+ e_table_pack(wd->o_table, sobj, col, row, colspan, rowspan);
+ e_widget_min_size_get(sobj, &mw, &mh);
+ e_table_pack_options_set(sobj,
+ fill_w, fill_h, /* fill */
+ expand_w, expand_h, /* expand */
+ 0.5, 0.5, /* align */
+ mw, mh, /* min */
+ 99999, 99999 /* max */
+ );
+ e_table_min_size_get(wd->o_table, &mw, &mh);
+ e_widget_min_size_set(obj, mw, mh);
+}
+
static void
_e_wid_del_hook(Evas_Object *obj)
{
diff --git a/src/bin/e_widget_table.h b/src/bin/e_widget_table.h
index ed05b4dc7..2e905cd03 100644
--- a/src/bin/e_widget_table.h
+++ b/src/bin/e_widget_table.h
@@ -8,6 +8,7 @@
EAPI Evas_Object *e_widget_table_add(Evas *evas, int homogenous);
EAPI void e_widget_table_object_append(Evas_Object *obj, Evas_Object *sobj, int col, int row, int colspan, int rowspan, int fill_w, int fill_h, int expand_w, int expand_h);
-
+EAPI void e_widget_table_object_repack(Evas_Object *obj, Evas_Object *sobj, int col, int row, int colspan, int rowspan, int fill_w, int fill_h, int expand_w, int expand_h);
+
#endif
#endif