aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-01-15 12:03:28 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-01-15 12:13:53 +0900
commit3ea6a3569d6294cd5367a3795bd0c9e8ec5c3a29 (patch)
tree7dfc23386fd0caa6564dca3dfd3ec36c8e31a44e /src
parentconvert e_conf to use elm_layout for min sizing updates (diff)
downloadenlightenment-3ea6a3569d6294cd5367a3795bd0c9e8ec5c3a29.tar.gz
revert all the ui breakes in e - going the wrong direction in the
first place anyway. shoudl replace the entire dialgo one at a time by an elm version not try and stuff elm widgets into where e widgets used to be. this doesnt improve e's config dialogs, just makes them buggy as all hell in the name of a move to elm. Revert "e_widget_button -> elm_button conversion" This reverts commit b1c976d80d282d02832e8951d9e3c3fe113871fc. Revert "update widget size hints when setting a resize object" This reverts commit fdab0218b264d143c960aad806e3a4ff0ee20678. Revert "remove no-longer-necessary size hinting in list widgets" This reverts commit 21479f50192fb5a9c4204a90e1fe1e93a33a5e9e. Revert "e_widget_textblock -> elm_entry conversion" This reverts commit 8fe2f00f75068ccc03432ea43ba9fb13aed7dada. Revert "e frame -> elm_frame conversion" This reverts commit e9da6a02fc18cb6edc41633a2dfc688891a51764. Revert "remove unnecessary size hinting" This reverts commit b596623efd8a46d232ade1942c6638b3641013d1. Revert "e_label -> elm_label conversion" This reverts commit 049b31867912865e1357c83122c7419c09f4bb80. Revert "set evas size hint min in widget min size" This reverts commit 2f09aa2fda3ee06aae33af53f255c0eab770b57e. Revert "e_table -> elm_table conversion" This reverts commit 643401298201db2eea3c99e0ad725b016362fc49. Revert "remove unused vars" This reverts commit b19e706b23c0890312f2fc3bb1665a0eb4aab9e6.
Diffstat (limited to 'src')
-rw-r--r--src/bin/Makefile.mk2
-rw-r--r--src/bin/e_config_dialog.c14
-rw-r--r--src/bin/e_desktop_editor.c6
-rw-r--r--src/bin/e_exec.c2
-rw-r--r--src/bin/e_fm_prop.c8
-rw-r--r--src/bin/e_includes.h1
-rw-r--r--src/bin/e_int_client_prop.c12
-rw-r--r--src/bin/e_int_client_remember.c6
-rw-r--r--src/bin/e_int_config_comp.c2
-rw-r--r--src/bin/e_int_config_comp_match.c6
-rw-r--r--src/bin/e_int_config_modules.c2
-rw-r--r--src/bin/e_int_gadcon_config.c6
-rw-r--r--src/bin/e_int_shelf_config.c2
-rw-r--r--src/bin/e_table.c980
-rw-r--r--src/bin/e_table.h20
-rw-r--r--src/bin/e_widget.c4
-rw-r--r--src/bin/e_widget_button.c86
-rw-r--r--src/bin/e_widget_config_list.c2
-rw-r--r--src/bin/e_widget_csel.c4
-rw-r--r--src/bin/e_widget_entry.c1
-rw-r--r--src/bin/e_widget_filepreview.c24
-rw-r--r--src/bin/e_widget_framelist.c26
-rw-r--r--src/bin/e_widget_frametable.c93
-rw-r--r--src/bin/e_widget_fsel.c4
-rw-r--r--src/bin/e_widget_label.c20
-rw-r--r--src/bin/e_widget_list.c6
-rw-r--r--src/bin/e_widget_table.c67
-rw-r--r--src/bin/e_widget_table.h4
-rw-r--r--src/bin/e_widget_textblock.c56
-rw-r--r--src/bin/e_widget_toolbook.c2
-rw-r--r--src/modules/backlight/e_mod_main.c2
-rw-r--r--src/modules/battery/e_mod_config.c4
-rw-r--r--src/modules/clock/e_mod_config.c2
-rw-r--r--src/modules/clock/e_mod_main.c2
-rw-r--r--src/modules/conf_applications/e_int_config_apps.c6
-rw-r--r--src/modules/conf_applications/e_int_config_apps_personal.c2
-rw-r--r--src/modules/conf_applications/e_int_config_defapps.c4
-rw-r--r--src/modules/conf_bindings/e_int_config_acpibindings.c2
-rw-r--r--src/modules/conf_bindings/e_int_config_edgebindings.c2
-rw-r--r--src/modules/conf_bindings/e_int_config_keybindings.c2
-rw-r--r--src/modules/conf_bindings/e_int_config_mousebindings.c2
-rw-r--r--src/modules/conf_bindings/e_int_config_signalbindings.c2
-rw-r--r--src/modules/conf_dialogs/e_int_config_profiles.c2
-rw-r--r--src/modules/conf_display/e_int_config_desklock.c4
-rw-r--r--src/modules/conf_display/e_int_config_desklock_fsel.c4
-rw-r--r--src/modules/conf_intl/e_int_config_imc.c6
-rw-r--r--src/modules/conf_intl/e_int_config_intl.c4
-rw-r--r--src/modules/conf_paths/e_int_config_env.c2
-rw-r--r--src/modules/conf_paths/e_int_config_paths.c2
-rw-r--r--src/modules/conf_performance/e_int_config_powermanagement.c2
-rw-r--r--src/modules/conf_shelves/e_int_config_shelf.c2
-rw-r--r--src/modules/conf_theme/e_int_config_fonts.c6
-rw-r--r--src/modules/conf_theme/e_int_config_scale.c2
-rw-r--r--src/modules/conf_theme/e_int_config_theme.c6
-rw-r--r--src/modules/conf_theme/e_int_config_transitions.c2
-rw-r--r--src/modules/conf_theme/e_int_config_wallpaper.c12
-rw-r--r--src/modules/everything/evry_config.c4
-rw-r--r--src/modules/gadman/e_mod_config.c2
-rw-r--r--src/modules/ibar/e_mod_config.c2
-rw-r--r--src/modules/lokker/lokker.c34
-rw-r--r--src/modules/mixer/conf_gadget.c2
-rw-r--r--src/modules/mixer/e_mod_main.c2
-rw-r--r--src/modules/packagekit/e_mod_packagekit.c2
-rw-r--r--src/modules/pager/e_mod_main.c14
-rw-r--r--src/modules/pager_plain/e_mod_main.c14
-rw-r--r--src/modules/quickaccess/e_mod_config.c12
-rw-r--r--src/modules/teamwork/e_mod_config.c2
-rw-r--r--src/modules/xkbswitch/e_mod_config.c2
68 files changed, 1431 insertions, 217 deletions
diff --git a/src/bin/Makefile.mk b/src/bin/Makefile.mk
index c3a552f6b..cb34f3684 100644
--- a/src/bin/Makefile.mk
+++ b/src/bin/Makefile.mk
@@ -153,6 +153,7 @@ src/bin/e_slidesel.h \
src/bin/e_spectrum.h \
src/bin/e_startup.h \
src/bin/e_sys.h \
+src/bin/e_table.h \
src/bin/e_test.h \
src/bin/e_theme_about.h \
src/bin/e_theme.h \
@@ -317,6 +318,7 @@ src/bin/e_slidesel.c \
src/bin/e_spectrum.c \
src/bin/e_startup.c \
src/bin/e_sys.c \
+src/bin/e_table.c \
src/bin/e_test.c \
src/bin/e_theme_about.c \
src/bin/e_theme.c \
diff --git a/src/bin/e_config_dialog.c b/src/bin/e_config_dialog.c
index 969c348da..8e60ffe4d 100644
--- a/src/bin/e_config_dialog.c
+++ b/src/bin/e_config_dialog.c
@@ -173,22 +173,13 @@ _e_config_dialog_free(E_Config_Dialog *cfd)
}
static void
-_e_config_hints(void *data, Evas *e EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
-{
- int w, h;
-
- edje_object_size_min_calc(data, &w, &h);
- evas_object_size_hint_min_set(data, w, h);
-}
-
-static void
_e_config_dialog_go(E_Config_Dialog *cfd, E_Config_Dialog_CFData_Type type)
{
Evas *evas;
E_Dialog *pdia;
Evas_Object *o, *ob, *sf;
+ Evas_Coord mw = 0, mh = 0;
char buf[256];
- int mw = -1, mh = -1;
void *cfdata;
pdia = cfd->dia;
@@ -278,9 +269,8 @@ _e_config_dialog_go(E_Config_Dialog *cfd, E_Config_Dialog_CFData_Type type)
}
}
- evas_object_event_callback_add(o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _e_config_hints, cfd->dia->bg_object);
- e_widget_on_change_hook_set(o, _e_config_dialog_cb_changed, cfd);
e_widget_size_min_get(o, &mw, &mh);
+ e_widget_on_change_hook_set(o, _e_config_dialog_cb_changed, cfd);
e_dialog_content_set(cfd->dia, o, mw, mh);
if (!pdia) /* dialog window was created in this function call - need to create buttons once */
diff --git a/src/bin/e_desktop_editor.c b/src/bin/e_desktop_editor.c
index c75e4f554..bc2d020b9 100644
--- a/src/bin/e_desktop_editor.c
+++ b/src/bin/e_desktop_editor.c
@@ -702,7 +702,7 @@ _e_desktop_edit_basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas
otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
o = e_widget_label_add(evas, _("Name"));
e_widget_table_object_append(ot, o, 0, 0, 1, 1, 1, 1, 0, 0);
@@ -750,7 +750,7 @@ _e_desktop_edit_basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas
/* e_widget_size_min_get(ol, &mw, &mh); */
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
editor->img_widget = e_widget_button_add
(evas, "", NULL, _e_desktop_editor_cb_icon_select, cfdata, editor);
@@ -770,7 +770,7 @@ _e_desktop_edit_basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas
e_widget_toolbook_page_append
(otb, NULL, _("Icon"), ot, 0, 0, 0, 0, 0.5, 0.5);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
o = e_widget_label_add(evas, _("Generic Name"));
e_widget_table_object_append(ot, o, 0, 0, 1, 1, 1, 1, 0, 0);
diff --git a/src/bin/e_exec.c b/src/bin/e_exec.c
index 09e852679..a1140b0e9 100644
--- a/src/bin/e_exec.c
+++ b/src/bin/e_exec.c
@@ -1076,7 +1076,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_D
_fill_data(cfdata);
o = e_widget_list_add(evas, 0, 0);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
ob = e_widget_label_add(evas, cfdata->label);
e_widget_list_object_append(o, ob, 1, 1, 0.5);
diff --git a/src/bin/e_fm_prop.c b/src/bin/e_fm_prop.c
index e6ea7ba28..5b1da9ab7 100644
--- a/src/bin/e_fm_prop.c
+++ b/src/bin/e_fm_prop.c
@@ -384,9 +384,9 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
win = cfd->dia->win;
snprintf(buf, sizeof(buf), "%s/%s",
cfdata->location, cfdata->fi->file);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
ob = e_widget_label_add(evas, _("Name:"));
e_widget_table_object_append(ot, ob, 0, 0, 1, 1, 1, 0, 1, 0);
@@ -480,7 +480,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
of = e_widget_frametable_add(evas, _("Preview"), 0);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
ob = e_widget_preview_add(evas, 128, 128);
cfdata->gui.preview = ob;
cfdata->gui.preview_table = ot;
@@ -572,7 +572,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
/* generate the core widget layout for an advanced dialog */
Evas_Object *o;
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
return o;
}
diff --git a/src/bin/e_includes.h b/src/bin/e_includes.h
index a39351e00..12d359062 100644
--- a/src/bin/e_includes.h
+++ b/src/bin/e_includes.h
@@ -30,6 +30,7 @@
#include "e_startup.h"
#include "e_signals.h"
#include "e_xinerama.h"
+#include "e_table.h"
#include "e_layout.h"
#include "e_font.h"
#include "e_intl.h"
diff --git a/src/bin/e_int_client_prop.c b/src/bin/e_int_client_prop.c
index 7ef85f02a..27f0aa4b0 100644
--- a/src/bin/e_int_client_prop.c
+++ b/src/bin/e_int_client_prop.c
@@ -444,7 +444,7 @@ _ec_icccm_create(E_Dialog *dia, void *data __UNUSED__)
evas = evas_object_evas_get(dia->win);
otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
STR_ENTRY(_("Title"), 0, 0, icccm.title);
STR_ENTRY(_("Name"), 0, 1, icccm.name);
STR_ENTRY(_("Class"), 0, 2, icccm.class);
@@ -453,14 +453,14 @@ _ec_icccm_create(E_Dialog *dia, void *data __UNUSED__)
STR_ENTRY(_("Role"), 0, 5, icccm.role);
e_widget_toolbook_page_append(otb, NULL, _("General"), o, 1, 1, 1, 1, 0.5, 0.0);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
STR_ENTRY(_("Minimum Size"), 0, 6, icccm.min);
STR_ENTRY(_("Maximum Size"), 0, 7, icccm.max);
STR_ENTRY(_("Base Size"), 0, 8, icccm.base);
STR_ENTRY(_("Resize Steps"), 0, 9, icccm.step);
e_widget_toolbook_page_append(otb, NULL, _("Sizing"), o, 1, 1, 1, 1, 0.5, 0.0);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
STR_ENTRY(_("Aspect Ratio"), 2, 0, icccm.aspect);
STR_ENTRY(_("Initial State"), 2, 1, icccm.initial_state);
STR_ENTRY(_("State"), 2, 2, icccm.state);
@@ -472,7 +472,7 @@ _ec_icccm_create(E_Dialog *dia, void *data __UNUSED__)
STR_ENTRY(_("Command"), 2, 8, icccm.command);
e_widget_toolbook_page_append(otb, NULL, _("States"), o, 1, 1, 1, 1, 0.5, 0.0);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
CHK_ENTRY(_("Take Focus"), 0, 11, icccm.take_focus);
CHK_ENTRY(_("Accepts Focus"), 0, 12, icccm.accepts_focus);
CHK_ENTRY(_("Urgent"), 0, 13, icccm.urgent);
@@ -499,13 +499,13 @@ _ec_netwm_create(E_Dialog *dia, void *data __UNUSED__)
evas = evas_object_evas_get(dia->win);
otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
STR_ENTRY(_("Name"), 0, 1, netwm.name);
STR_ENTRY(_("Icon Name"), 0, 2, netwm.icon_name);
STR_ENTRY(_("Stacking"), 0, 3, netwm.stacking);
e_widget_toolbook_page_append(otb, NULL, _("General"), o, 1, 1, 1, 1, 0.5, 0.0);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
CHK_ENTRY(_("Modal"), 0, 4, netwm.modal);
CHK_ENTRY(_("Sticky"), 0, 5, netwm.sticky);
CHK_ENTRY(_("Shaded"), 0, 6, netwm.shaded);
diff --git a/src/bin/e_int_client_remember.c b/src/bin/e_int_client_remember.c
index 75f37a05d..202c3fafd 100644
--- a/src/bin/e_int_client_remember.c
+++ b/src/bin/e_int_client_remember.c
@@ -737,7 +737,8 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
}
e_widget_toolbook_page_append(o, NULL, _("Identifiers"), of, 1, 1, 1, 1, 0.5, 0.0);
- of = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ of = e_widget_table_add(evas, 0);
+ e_widget_table_freeze(of);
ob = e_widget_check_add(evas, _("Position"),
&(cfdata->remember.apply_pos));
e_widget_table_object_append(of, ob, 0, 0, 1, 1, 1, 0, 1, 0);
@@ -794,7 +795,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
e_widget_table_object_append(of, ob, 0, 9, 2, 1, 1, 0, 1, 0);
e_widget_toolbook_page_append(o, NULL, _("Properties"), of, 1, 1, 1, 1, 0.5, 0.0);
- of = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ of = e_widget_table_add(evas, 0);
ob = e_widget_check_add(evas, _("Match only one window"),
&(cfdata->remember.apply_first_only));
e_widget_table_object_append(of, ob, 0, 0, 1, 1, 1, 0, 1, 0);
@@ -813,6 +814,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
&(cfdata->remember.apply_run));
e_widget_table_object_append(of, ob, 0, 3, 1, 1, 1, 0, 1, 0);
}
+ e_widget_table_thaw(of);
e_widget_toolbook_page_append(o, NULL, _("Options"), of, 1, 1, 1, 1, 0.5, 0.0);
e_widget_toolbook_page_show(o, 0);
diff --git a/src/bin/e_int_config_comp.c b/src/bin/e_int_config_comp.c
index a017dd80f..9df33532f 100644
--- a/src/bin/e_int_config_comp.c
+++ b/src/bin/e_int_config_comp.c
@@ -544,7 +544,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED,
orec0 = evas_object_rectangle_add(evas);
evas_object_name_set(orec0, "style_shadows");
- tab = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ tab = e_widget_table_add(evas, 0);
otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
///////////////////////////////////////////
diff --git a/src/bin/e_int_config_comp_match.c b/src/bin/e_int_config_comp_match.c
index 30786f47a..6a3d09d21 100644
--- a/src/bin/e_int_config_comp_match.c
+++ b/src/bin/e_int_config_comp_match.c
@@ -342,7 +342,7 @@ _create_edit_frame(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdat
tb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
- tab2 = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ tab2 = e_widget_table_add(evas, 0);
if (cfdata->edit_il == cfdata->borders_il)
{
if (m->match.title) m->title = strdup(m->match.title);
@@ -439,7 +439,7 @@ _create_edit_frame(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdat
m->modal = m->match.modal;
row = 0;
- tab2 = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ tab2 = e_widget_table_add(evas, 0);
lb = e_widget_label_add(evas, _("Unused"));
e_widget_table_object_append(tab2, lb, 1, row, 1, 1, 0, 0, 0, 0);
lb = e_widget_label_add(evas, _("On"));
@@ -678,7 +678,7 @@ _create_match_editor(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfd
Match_Config *m;
Eina_List *l;
- tab = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ tab = e_widget_table_add(evas, 0);
il = e_widget_ilist_add(evas, 16, 16, NULL);
e_widget_size_min_set(il, 160, 100);
diff --git a/src/bin/e_int_config_modules.c b/src/bin/e_int_config_modules.c
index 7ebf166f0..28238b68a 100644
--- a/src/bin/e_int_config_modules.c
+++ b/src/bin/e_int_config_modules.c
@@ -177,7 +177,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
cfdata->evas = evas_object_evas_get(cfd->dia->win);
- of = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ of = e_widget_table_add(evas, 0);
cfdata->o_toolbar = e_widget_toolbar_add(evas, 32 * e_scale, 32 * e_scale);
e_widget_toolbar_scrollable_set(cfdata->o_toolbar, 1);
diff --git a/src/bin/e_int_gadcon_config.c b/src/bin/e_int_gadcon_config.c
index 6251c11b8..a3f3d3398 100644
--- a/src/bin/e_int_gadcon_config.c
+++ b/src/bin/e_int_gadcon_config.c
@@ -681,7 +681,7 @@ _advanced_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
cfdata->basic.o_list = NULL;
otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
////////////////////////////////////////////////////////////
- ot = e_widget_table_add(e_win_evas_win_get(evas), EINA_FALSE);
+ ot = e_widget_table_add(evas, EINA_FALSE);
cfdata->advanced.o_list =
e_widget_ilist_add(evas, (24 * e_scale), (24 * e_scale), &cfdata->sel);
@@ -701,7 +701,7 @@ _advanced_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
e_widget_toolbook_page_append(otb, NULL, _("Loaded Gadgets"), ot, 1, 1, 1, 1, 0.5, 0.0);
////////////////////////////////////////////////////////////
// ot = e_widget_list_add(evas, 0, 0);
- ot = e_widget_table_add(e_win_evas_win_get(evas), EINA_FALSE);
+ ot = e_widget_table_add(evas, EINA_FALSE);
cfdata->class_list =
e_widget_ilist_add(evas, (24 * e_scale), (24 * e_scale), NULL);
@@ -736,7 +736,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
int mw;
cfdata->advanced.o_list = cfdata->class_list = NULL;
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
cfdata->basic.o_list = e_widget_ilist_add(evas, 24, 24, NULL);
e_widget_ilist_multi_select_set(cfdata->basic.o_list, EINA_TRUE);
diff --git a/src/bin/e_int_shelf_config.c b/src/bin/e_int_shelf_config.c
index c8ab81ba8..f16e814ea 100644
--- a/src/bin/e_int_shelf_config.c
+++ b/src/bin/e_int_shelf_config.c
@@ -164,7 +164,7 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data
1, 0, 1, 0, 0.5, 0.0);
/* position */
- ol = e_widget_table_add(e_win_evas_win_get(evas), 1);
+ ol = e_widget_table_add(evas, 1);
rg = e_widget_radio_group_new(&(cfdata->orient));
ow = e_widget_radio_icon_add(evas, NULL, "preferences-position-left",
24, 24, E_GADCON_ORIENT_LEFT, rg);
diff --git a/src/bin/e_table.c b/src/bin/e_table.c
new file mode 100644
index 000000000..0290299d6
--- /dev/null
+++ b/src/bin/e_table.c
@@ -0,0 +1,980 @@
+#include "e.h"
+
+typedef struct _E_Smart_Data E_Smart_Data;
+typedef struct _E_Table_Item E_Table_Item;
+
+struct _E_Smart_Data
+{
+ Evas_Coord x, y, w, h;
+ Evas_Object *obj;
+ Evas_Object *clip;
+ int frozen;
+ unsigned char changed : 1;
+ unsigned char homogenous : 1;
+ Eina_List *items;
+ struct
+ {
+ Evas_Coord w, h;
+ } min, max;
+ struct
+ {
+ double x, y;
+ } align;
+ struct
+ {
+ int cols, rows;
+ } size;
+};
+
+struct _E_Table_Item
+{
+ E_Smart_Data *sd;
+ int col, row, colspan, rowspan;
+ unsigned char fill_w : 1;
+ unsigned char fill_h : 1;
+ unsigned char expand_w : 1;
+ unsigned char expand_h : 1;
+ struct
+ {
+ Evas_Coord w, h;
+ } min, max;
+ struct
+ {
+ double x, y;
+ } align;
+ Evas_Object *obj;
+};
+
+/* local subsystem functions */
+static E_Table_Item *_e_table_smart_adopt(E_Smart_Data *sd, Evas_Object *obj);
+static void _e_table_smart_disown(Evas_Object *obj);
+static void _e_table_smart_item_del_hook(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void _e_table_smart_reconfigure(E_Smart_Data *sd);
+static void _e_table_smart_extents_calcuate(E_Smart_Data *sd);
+
+static void _e_table_smart_init(void);
+static void _e_table_smart_add(Evas_Object *obj);
+static void _e_table_smart_del(Evas_Object *obj);
+static void _e_table_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y);
+static void _e_table_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h);
+static void _e_table_smart_show(Evas_Object *obj);
+static void _e_table_smart_hide(Evas_Object *obj);
+static void _e_table_smart_color_set(Evas_Object *obj, int r, int g, int b, int a);
+static void _e_table_smart_clip_set(Evas_Object *obj, Evas_Object *clip);
+static void _e_table_smart_clip_unset(Evas_Object *obj);
+
+/* local subsystem globals */
+static Evas_Smart *_e_smart = NULL;
+
+/* externally accessible functions */
+EAPI Evas_Object *
+e_table_add(Evas *evas)
+{
+ _e_table_smart_init();
+ return evas_object_smart_add(evas, _e_smart);
+}
+
+EAPI int
+e_table_freeze(Evas_Object *obj)
+{
+ E_Smart_Data *sd;
+
+ if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0);
+ sd = evas_object_smart_data_get(obj);
+ sd->frozen++;
+ return sd->frozen;
+}
+
+EAPI int
+e_table_thaw(Evas_Object *obj)
+{
+ E_Smart_Data *sd;
+
+ if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERR(0);
+ sd = evas_object_smart_data_get(obj);
+ sd->frozen--;
+ if (sd->frozen <= 0) _e_table_smart_reconfigure(sd);
+ return sd->frozen;
+}
+
+EAPI void
+e_table_homogenous_set(Evas_Object *obj, int homogenous)
+{
+ E_Smart_Data *sd;
+
+ if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR();
+ sd = evas_object_smart_data_get(obj);
+ if (sd->homogenous == homogenous) return;
+ sd->homogenous = homogenous;
+ sd->changed = 1;
+ if (sd->frozen <= 0) _e_table_smart_reconfigure(sd);
+}
+
+EAPI void
+e_table_pack(Evas_Object *obj, Evas_Object *child, int col, int row, int colspan, int rowspan)
+{
+ E_Smart_Data *sd;
+ E_Table_Item *ti;
+
+ if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR();
+ sd = evas_object_smart_data_get(obj);
+ _e_table_smart_adopt(sd, child);
+ sd->items = eina_list_append(sd->items, child);
+ ti = evas_object_data_get(child, "e_table_data");
+ if (ti)
+ {
+ ti->col = col;
+ ti->row = row;
+ ti->colspan = colspan;
+ ti->rowspan = rowspan;
+ if (sd->size.cols < (col + colspan)) sd->size.cols = col + colspan;
+ if (sd->size.rows < (row + rowspan)) sd->size.rows = row + rowspan;
+ }
+ sd->changed = 1;
+ if (sd->frozen <= 0) _e_table_smart_reconfigure(sd);
+}
+
+EAPI void
+e_table_pack_options_set(Evas_Object *obj, int fill_w, int fill_h, int expand_w, int expand_h, double align_x, double align_y, Evas_Coord min_w, Evas_Coord min_h, Evas_Coord max_w, Evas_Coord max_h)
+{
+ E_Table_Item *ti;
+
+ ti = evas_object_data_get(obj, "e_table_data");
+ if (!ti) return;
+ ti->fill_w = fill_w;
+ ti->fill_h = fill_h;
+ ti->expand_w = expand_w;
+ ti->expand_h = expand_h;
+ ti->align.x = align_x;
+ ti->align.y = align_y;
+ ti->min.w = min_w;
+ ti->min.h = min_h;
+ ti->max.w = max_w;
+ ti->max.h = max_h;
+ ti->sd->changed = 1;
+ if (ti->sd->frozen <= 0) _e_table_smart_reconfigure(ti->sd);
+}
+
+EAPI void
+e_table_unpack(Evas_Object *obj)
+{
+ E_Table_Item *ti;
+ E_Smart_Data *sd;
+
+ ti = evas_object_data_get(obj, "e_table_data");
+ if (!ti) return;
+ sd = ti->sd;
+ sd->items = eina_list_remove(sd->items, obj);
+ _e_table_smart_disown(obj);
+ sd->changed = 1;
+ if (sd->frozen <= 0) _e_table_smart_reconfigure(sd);
+}
+
+EAPI void
+e_table_col_row_size_get(Evas_Object *obj, int *cols, int *rows)
+{
+ E_Smart_Data *sd;
+
+ if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR();
+ sd = evas_object_smart_data_get(obj);
+ if (sd->changed) _e_table_smart_extents_calcuate(sd);
+ if (cols) *cols = sd->size.cols;
+ if (rows) *rows = sd->size.rows;
+}
+
+EAPI void
+e_table_size_min_get(Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh)
+{
+ E_Smart_Data *sd;
+
+ if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR();
+ sd = evas_object_smart_data_get(obj);
+ if (sd->changed) _e_table_smart_extents_calcuate(sd);
+ if (minw) *minw = sd->min.w;
+ if (minh) *minh = sd->min.h;
+}
+
+EAPI void
+e_table_size_max_get(Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh)
+{
+ E_Smart_Data *sd;
+
+ if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR();
+ sd = evas_object_smart_data_get(obj);
+ if (sd->changed) _e_table_smart_extents_calcuate(sd);
+ if (maxw) *maxw = sd->max.w;
+ if (maxh) *maxh = sd->max.h;
+}
+
+EAPI void
+e_table_align_get(Evas_Object *obj, double *ax, double *ay)
+{
+ E_Smart_Data *sd;
+
+ if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR();
+ sd = evas_object_smart_data_get(obj);
+ if (ax) *ax = sd->align.x;
+ if (ay) *ay = sd->align.y;
+}
+
+EAPI void
+e_table_align_set(Evas_Object *obj, double ax, double ay)
+{
+ E_Smart_Data *sd;
+
+ if (evas_object_smart_smart_get(obj) != _e_smart) SMARTERRNR();
+ sd = evas_object_smart_data_get(obj);
+ if ((sd->align.x == ax) && (sd->align.y == ay)) return;
+ sd->align.x = ax;
+ sd->align.y = ay;
+ sd->changed = 1;
+ if (sd->frozen <= 0) _e_table_smart_reconfigure(sd);
+}
+
+/* local subsystem functions */
+static E_Table_Item *
+_e_table_smart_adopt(E_Smart_Data *sd, Evas_Object *obj)
+{
+ E_Table_Item *ti;
+
+ ti = calloc(1, sizeof(E_Table_Item));
+ if (!ti) return NULL;
+ ti->sd = sd;
+ ti->obj = obj;
+ /* defaults */
+ ti->col = 0;
+ ti->row = 0;
+ ti->colspan = 1;
+ ti->rowspan = 1;
+ ti->fill_w = 0;
+ ti->fill_h = 0;
+ ti->expand_w = 0;
+ ti->expand_h = 0;
+ ti->align.x = 0.5;
+ ti->align.y = 0.5;
+ ti->min.w = 0;
+ ti->min.h = 0;
+ ti->max.w = 0;
+ ti->max.h = 0;
+ evas_object_clip_set(obj, sd->clip);
+// evas_object_stack_above(obj, sd->obj);
+ evas_object_smart_member_add(obj, ti->sd->obj);
+ evas_object_data_set(obj, "e_table_data", ti);
+ evas_object_event_callback_add(obj, EVAS_CALLBACK_FREE,
+ _e_table_smart_item_del_hook, NULL);
+// evas_object_stack_below(obj, sd->obj);
+ if ((!evas_object_visible_get(sd->clip)) &&
+ (evas_object_visible_get(sd->obj)))
+ evas_object_show(sd->clip);
+ return ti;
+}
+
+static void
+_e_table_smart_disown(Evas_Object *obj)
+{
+ E_Table_Item *ti;
+
+ ti = evas_object_data_get(obj, "e_table_data");
+ if (!ti) return;
+ if (!ti->sd->items)
+ {
+ if (evas_object_visible_get(ti->sd->clip))
+ evas_object_hide(ti->sd->clip);
+ }
+ evas_object_event_callback_del(obj,
+ EVAS_CALLBACK_FREE,
+ _e_table_smart_item_del_hook);
+ evas_object_smart_member_del(obj);
+ evas_object_data_del(obj, "e_table_data");
+ free(ti);
+}
+
+static void
+_e_table_smart_item_del_hook(void *data __UNUSED__, Evas *e __UNUSED__, Evas_Object *obj, void *event_info __UNUSED__)
+{
+ e_table_unpack(obj);
+}
+
+static void
+_e_table_smart_reconfigure(E_Smart_Data *sd)
+{
+ Evas_Coord x, y, w, h, xx, yy;
+ Eina_List *l;
+ Evas_Object *obj;
+ int minw, minh, expandw, expandh;
+
+ if (!sd->changed) return;
+
+ w = sd->w;
+ h = sd->h;
+
+ _e_table_smart_extents_calcuate(sd);
+
+ minw = sd->min.w;
+ minh = sd->min.h;
+ expandw = 0;
+ expandh = 0;
+ if (w < minw) w = minw;
+ if (h < minh) h = minh;
+ EINA_LIST_FOREACH(sd->items, l, obj)
+ {
+ E_Table_Item *ti;
+
+ ti = evas_object_data_get(obj, "e_table_data");
+ if (ti->expand_w) expandw++;
+ if (ti->expand_h) expandh++;
+ }
+ if (expandw == 0)
+ {
+ w = minw;
+ }
+ if (expandh == 0)
+ {
+ h = minh;
+ }
+ x = sd->x;
+ y = sd->y;
+ if (sd->homogenous)
+ {
+ EINA_LIST_FOREACH(sd->items, l, obj)
+ {
+ E_Table_Item *ti;
+ Evas_Coord ww, hh, ow, oh;
+
+ ti = evas_object_data_get(obj, "e_table_data");
+
+ xx = x + ((ti->col) * (w / (Evas_Coord)sd->size.cols));
+ yy = y + ((ti->row) * (h / (Evas_Coord)sd->size.rows));
+ ww = ((w / (Evas_Coord)sd->size.cols) * (ti->colspan));
+ hh = ((h / (Evas_Coord)sd->size.rows) * (ti->rowspan));
+ ow = ti->min.w;
+ if (ti->expand_w) ow = ww;
+ if ((ti->max.w >= 0) && (ti->max.w < ow)) ow = ti->max.w;
+ oh = ti->min.h;
+ if (ti->expand_h) oh = hh;
+ if ((ti->max.h >= 0) && (ti->max.h < oh)) oh = ti->max.h;
+ evas_object_move(obj,
+ xx + (Evas_Coord)(((double)(ww - ow)) * ti->align.x),
+ yy + (Evas_Coord)(((double)(hh - oh)) * ti->align.y));
+ evas_object_resize(obj, ow, oh);
+ }
+ }
+ else
+ {
+ int i, ex, tot, need, num, dif, left, nx;
+ EINA_LIST_FOREACH(sd->items, l, obj)
+ {
+ E_Table_Item *ti;
+
+ ti = evas_object_data_get(obj, "e_table_data");
+ if (sd->size.cols < (ti->col + ti->colspan))
+ sd->size.cols = ti->col + ti->colspan;
+ if (sd->size.rows < (ti->row + ti->rowspan))
+ sd->size.rows = ti->row + ti->rowspan;
+ }
+ if ((sd->size.cols > 0) && (sd->size.rows > 0))
+ {
+ int *cols, *rows, *colsx, *rowsx;
+
+ cols = calloc(sd->size.cols, sizeof(int));
+ rows = calloc(sd->size.rows, sizeof(int));
+ colsx = calloc(sd->size.cols, sizeof(int));
+ rowsx = calloc(sd->size.rows, sizeof(int));
+
+ EINA_LIST_FOREACH(sd->items, l, obj)
+ {
+ E_Table_Item *ti;
+
+ ti = evas_object_data_get(obj, "e_table_data");
+ for (i = ti->col; i < (ti->col + ti->colspan); i++)
+ colsx[i] |= ti->expand_w;
+ for (i = ti->row; i < (ti->row + ti->rowspan); i++)
+ rowsx[i] |= ti->expand_h;
+ }
+
+ EINA_LIST_FOREACH(sd->items, l, obj)
+ {
+ E_Table_Item *ti;
+
+ ti = evas_object_data_get(obj, "e_table_data");
+
+ /* handle horizontal */
+ ex = 0;
+ tot = 0;
+ num = ti->colspan;
+ for (i = ti->col; i < (ti->col + num); i++)
+ {
+ if (colsx[i]) ex++;
+ tot += cols[i];
+ }
+ need = ti->min.w;
+ if (tot < need)
+ {
+ dif = need - tot;
+ left = dif;
+ if (ex == 0)
+ {
+ nx = num;
+ for (i = ti->col; i < (ti->col + num); i++)
+ {
+ if (nx > 1)
+ {
+ cols[i] += dif / num;
+ left -= dif / num;
+ }
+ else
+ {
+ cols[i] += left;
+ left = 0;
+ }
+ nx--;
+ }
+ }
+ else
+ {
+ nx = ex;
+ for (i = ti->col; i < (ti->col + num); i++)
+ {
+ if (colsx[i])
+ {
+ if (nx > 1)
+ {
+ cols[i] += dif / ex;
+ left -= dif / ex;
+ }
+ else
+ {
+ cols[i] += left;
+ left = 0;
+ }
+ nx--;
+ }
+ }
+ }
+ }
+
+ /* handle vertical */
+ ex = 0;
+ tot = 0;
+ num = ti->rowspan;
+ for (i = ti->row; i < (ti->row + num); i++)
+ {
+ if (rowsx[i]) ex++;
+ tot += rows[i];
+ }
+ need = ti->min.h;
+ if (tot < need)
+ {
+ dif = need - tot;
+ left = dif;
+ if (ex == 0)
+ {
+ nx = num;
+ for (i = ti->row; i < (ti->row + num); i++)
+ {
+ if (nx > 1)
+ {
+ rows[i] += dif / num;
+ left -= dif / num;
+ }
+ else
+ {
+ rows[i] += left;
+ left = 0;
+ }
+ nx--;
+ }
+ }
+ else
+ {
+ nx = ex;
+ for (i = ti->row; i < (ti->row + num); i++)
+ {
+ if (rowsx[i])
+ {
+ if (nx > 1)
+ {
+ rows[i] += dif / ex;
+ left -= dif / ex;
+ }
+ else
+ {
+ rows[i] += left;
+ left = 0;
+ }
+ nx--;
+ }
+ }
+ }
+ }
+ }
+
+ ex = 0;
+ for (i = 0; i < sd->size.cols; i++) {
+ if (colsx[i])
+ ex++;
+ }
+ tot = 0;
+ for (i = 0; i < sd->size.cols; i++)
+ tot += cols[i];
+ dif = w - tot;
+ if ((ex > 0) && (dif > 0))
+ {
+ int exl;
+
+ left = dif;
+ exl = ex;
+ for (i = 0; i < sd->size.cols; i++)
+ {
+ if (colsx[i])
+ {
+ if (exl == 1)
+ {
+ cols[i] += left;
+ exl--;
+ left = 0;
+ }
+ else
+ {
+ cols[i] += dif / ex;
+ exl--;
+ left -= dif / ex;
+ }
+ }
+ }
+ }
+
+ ex = 0;
+ for (i = 0; i < sd->size.rows; i++) {
+ if (rowsx[i])
+ ex++;
+ }
+ tot = 0;
+ for (i = 0; i < sd->size.rows; i++)
+ tot += rows[i];
+ dif = h - tot;
+ if ((ex > 0) && (dif > 0))
+ {
+ int exl;
+
+ left = dif;
+ exl = ex;
+ for (i = 0; i < sd->size.rows; i++)
+ {
+ if (rowsx[i])
+ {
+ if (exl == 1)
+ {
+ rows[i] += left;
+ exl--;
+ left = 0;
+ }
+ else
+ {
+ rows[i] += dif / ex;
+ exl--;
+ left -= dif / ex;
+ }
+ }
+ }
+ }
+
+ EINA_LIST_FOREACH(sd->items, l, obj)
+ {
+ E_Table_Item *ti;
+ Evas_Coord ww, hh, ow, oh, idx;
+
+ ti = evas_object_data_get(obj, "e_table_data");
+
+ xx = x;
+ for (idx = 0; idx < ti->col; idx++)
+ xx += cols[idx];
+ ww = 0;
+ for (idx = ti->col; idx < (ti->col + ti->colspan); idx++)
+ ww += cols[idx];
+ yy = y;
+ for (idx = 0; idx < ti->row; idx++)
+ yy += rows[idx];
+ hh = 0;
+ for (idx = ti->row; idx < (ti->row + ti->rowspan); idx++)
+ hh += rows[idx];
+
+ ow = ti->min.w;
+ if (ti->fill_w) ow = ww;
+ if ((ti->max.w >= 0) && (ti->max.w < ow)) ow = ti->max.w;
+ oh = ti->min.h;
+ if (ti->fill_h) oh = hh;
+ if ((ti->max.h >= 0) && (ti->max.h < oh)) oh = ti->max.h;
+ evas_object_move(obj,
+ xx + (Evas_Coord)(((double)(ww - ow)) * ti->align.x),
+ yy + (Evas_Coord)(((double)(hh - oh)) * ti->align.y));
+ evas_object_resize(obj, ow, oh);
+ }
+ free(rows);
+ free(cols);
+ free(rowsx);
+ free(colsx);
+ }
+ }
+ sd->changed = 0;
+}
+
+static void
+_e_table_smart_extents_calcuate(E_Smart_Data *sd)
+{
+ Eina_List *l;
+ Evas_Object *obj;
+ int minw, minh;
+
+ sd->max.w = -1; /* max < 0 == unlimited */
+ sd->max.h = -1;
+ sd->size.cols = 0;
+ sd->size.rows = 0;
+
+ minw = 0;
+ minh = 0;
+ if (sd->homogenous)
+ {
+ EINA_LIST_FOREACH(sd->items, l, obj)
+ {
+ E_Table_Item *ti;
+ int mw, mh;
+
+ ti = evas_object_data_get(obj, "e_table_data");
+ if (sd->size.cols < (ti->col + ti->colspan))
+ sd->size.cols = ti->col + ti->colspan;
+ if (sd->size.rows < (ti->row + ti->rowspan))
+ sd->size.rows = ti->row + ti->rowspan;
+ mw = (ti->min.w + (ti->colspan - 1)) / ti->colspan;
+ mh = (ti->min.h + (ti->rowspan - 1)) / ti->rowspan;
+ if (minw < mw) minw = mw;
+ if (minh < mh) minh = mh;
+ }
+ minw *= sd->size.cols;
+ minh *= sd->size.rows;
+ }
+ else
+ {
+ int i, ex, tot, need, num, dif, left, nx;
+ EINA_LIST_FOREACH(sd->items, l, obj)
+ {
+ E_Table_Item *ti;
+
+ ti = evas_object_data_get(obj, "e_table_data");
+ if (sd->size.cols < (ti->col + ti->colspan))
+ sd->size.cols = ti->col + ti->colspan;
+ if (sd->size.rows < (ti->row + ti->rowspan))
+ sd->size.rows = ti->row + ti->rowspan;
+ }
+ if ((sd->size.cols > 0) && (sd->size.rows > 0))
+ {
+ int *cols, *rows, *colsx, *rowsx;
+
+ cols = calloc(sd->size.cols, sizeof(int));
+ rows = calloc(sd->size.rows, sizeof(int));
+ colsx = calloc(sd->size.cols, sizeof(int));
+ rowsx = calloc(sd->size.rows, sizeof(int));
+
+ EINA_LIST_FOREACH(sd->items, l, obj)
+ {
+ E_Table_Item *ti;
+
+ ti = evas_object_data_get(obj, "e_table_data");
+ for (i = ti->col; i < (ti->col + ti->colspan); i++)
+ colsx[i] |= ti->expand_w;
+ for (i = ti->row; i < (ti->row + ti->rowspan); i++)
+ rowsx[i] |= ti->expand_h;
+ }
+
+ EINA_LIST_FOREACH(sd->items, l, obj)
+ {
+ E_Table_Item *ti;
+
+ ti = evas_object_data_get(obj, "e_table_data");
+
+ /* handle horizontal */
+ ex = 0;
+ tot = 0;
+ num = ti->colspan;
+ for (i = ti->col; i < (ti->col + num); i++)
+ {
+ if (colsx[i]) ex++;
+ tot += cols[i];
+ }
+ need = ti->min.w;
+ if (tot < need)
+ {
+ dif = need - tot;
+ left = dif;
+ if (ex == 0)
+ {
+ nx = num;
+ for (i = ti->col; i < (ti->col + num); i++)
+ {
+ if (nx > 1)
+ {
+ cols[i] += dif / num;
+ left -= dif / num;
+ }
+ else
+ {
+ cols[i] += left;
+ left = 0;
+ }
+ nx--;
+ }
+ }
+ else
+ {
+ nx = ex;
+ for (i = ti->col; i < (ti->col + num); i++)
+ {
+ if (colsx[i])
+ {
+ if (nx > 1)
+ {
+ cols[i] += dif / ex;
+ left -= dif / ex;
+ }
+ else
+ {
+ cols[i] += left;
+ left = 0;
+ }
+ nx--;
+ }
+ }
+ }
+ }
+
+ /* handle vertical */
+ ex = 0;
+ tot = 0;
+ num = ti->rowspan;
+ for (i = ti->row; i < (ti->row + num); i++)
+ {
+ if (rowsx[i]) ex++;
+ tot += rows[i];
+ }
+ need = ti->min.h;
+ if (tot < need)
+ {
+ dif = need - tot;
+ left = dif;
+ if (ex == 0)
+ {
+ nx = num;
+ for (i = ti->row; i < (ti->row + num); i++)
+ {
+ if (nx > 1)
+ {
+ rows[i] += dif / num;
+ left -= dif / num;
+ }
+ else
+ {
+ rows[i] += left;
+ left = 0;
+ }
+ nx--;
+ }
+ }
+ else
+ {
+ nx = ex;
+ for (i = ti->row; i < (ti->row + num); i++)
+ {
+ if (rowsx[i])
+ {
+ if (nx > 1)
+ {
+ rows[i] += dif / ex;
+ left -= dif / ex;
+ }
+ else
+ {
+ rows[i] += left;
+ left = 0;
+ }
+ nx--;
+ }
+ }
+ }
+ }
+ }
+ for (i = 0; i < sd->size.cols; i++)
+ minw += cols[i];
+ for (i = 0; i < sd->size.rows; i++)
+ minh += rows[i];
+ free(rows);
+ free(cols);
+ free(rowsx);
+ free(colsx);
+ }
+ }
+ sd->min.w = minw;
+ sd->min.h = minh;
+}
+
+static void
+_e_table_smart_init(void)
+{
+ if (_e_smart) return;
+ {
+ static const Evas_Smart_Class sc =
+ {
+ "e_table",
+ EVAS_SMART_CLASS_VERSION,
+ _e_table_smart_add,
+ _e_table_smart_del,
+ _e_table_smart_move,
+ _e_table_smart_resize,
+ _e_table_smart_show,
+ _e_table_smart_hide,
+ _e_table_smart_color_set,
+ _e_table_smart_clip_set,
+ _e_table_smart_clip_unset,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL,
+ NULL
+ };
+ _e_smart = evas_smart_class_new(&sc);
+ }
+}
+
+static void
+_e_table_smart_add(Evas_Object *obj)
+{
+ E_Smart_Data *sd;
+
+ sd = calloc(1, sizeof(E_Smart_Data));
+ if (!sd) return;
+ sd->obj = obj;
+ sd->x = 0;
+ sd->y = 0;
+ sd->w = 0;
+ sd->h = 0;
+ sd->clip = evas_object_rectangle_add(evas_object_evas_get(obj));
+ evas_object_smart_member_add(sd->clip, obj);
+ evas_object_move(sd->clip, -100002, -100002);
+ evas_object_resize(sd->clip, 200004, 200004);
+ evas_object_color_set(sd->clip, 255, 255, 255, 255);
+ evas_object_smart_data_set(obj, sd);
+}
+
+static void
+_e_table_smart_del(Evas_Object *obj)
+{
+ E_Smart_Data *sd;
+
+ sd = evas_object_smart_data_get(obj);
+ if (!sd) return;
+ e_table_freeze(obj);
+ while (sd->items)
+ {
+ Evas_Object *child;
+
+ child = eina_list_data_get(sd->items);
+ e_table_unpack(child);
+ }
+ e_table_thaw(obj);
+ evas_object_del(sd->clip);
+ free(sd);
+}
+
+static void
+_e_table_smart_move(Evas_Object *obj, Evas_Coord x, Evas_Coord y)
+{
+ E_Smart_Data *sd;
+
+ sd = evas_object_smart_data_get(obj);
+ if (!sd) return;
+ if ((x == sd->x) && (y == sd->y)) return;
+ if ((x == sd->x) && (y == sd->y)) return;
+ {
+ Eina_List *l;
+ Evas_Object *item;
+ Evas_Coord dx, dy;
+
+ dx = x - sd->x;
+ dy = y - sd->y;
+ EINA_LIST_FOREACH(sd->items, l, item)
+ {
+ Evas_Coord ox, oy;
+
+ evas_object_geometry_get(item, &ox, &oy, NULL, NULL);
+ evas_object_move(item, ox + dx, oy + dy);
+ }
+ }
+ sd->x = x;
+ sd->y = y;
+}
+
+static void
+_e_table_smart_resize(Evas_Object *obj, Evas_Coord w, Evas_Coord h)
+{
+ E_Smart_Data *sd;
+
+ sd = evas_object_smart_data_get(obj);
+ if (!sd) return;
+ if ((w == sd->w) && (h == sd->h)) return;
+ sd->w = w;
+ sd->h = h;
+ sd->changed = 1;
+ _e_table_smart_reconfigure(sd);
+}
+
+static void
+_e_table_smart_show(Evas_Object *obj)
+{
+ E_Smart_Data *sd;
+
+ sd = evas_object_smart_data_get(obj);
+ if (!sd) return;
+ if (sd->items) evas_object_show(sd->clip);
+}
+
+static void
+_e_table_smart_hide(Evas_Object *obj)
+{
+ E_Smart_Data *sd;
+
+ sd = evas_object_smart_data_get(obj);
+ if (!sd) return;
+ evas_object_hide(sd->clip);
+}
+
+static void
+_e_table_smart_color_set(Evas_Object *obj, int r, int g, int b, int a)
+{
+ E_Smart_Data *sd;
+
+ sd = evas_object_smart_data_get(obj);
+ if (!sd) return;
+ evas_object_color_set(sd->clip, r, g, b, a);
+}
+
+static void
+_e_table_smart_clip_set(Evas_Object *obj, Evas_Object *clip)
+{
+ E_Smart_Data *sd;
+
+ sd = evas_object_smart_data_get(obj);
+ if (!sd) return;
+ evas_object_clip_set(sd->clip, clip);
+}
+
+static void
+_e_table_smart_clip_unset(Evas_Object *obj)
+{
+ E_Smart_Data *sd;
+
+ sd = evas_object_smart_data_get(obj);
+ if (!sd) return;
+ evas_object_clip_unset(sd->clip);
+}
+
diff --git a/src/bin/e_table.h b/src/bin/e_table.h
new file mode 100644
index 000000000..9d21830de
--- /dev/null
+++ b/src/bin/e_table.h
@@ -0,0 +1,20 @@
+#ifdef E_TYPEDEFS
+#else
+#ifndef E_TABLE_H
+#define E_TABLE_H
+
+EAPI Evas_Object *e_table_add (Evas *evas);
+EAPI int e_table_freeze (Evas_Object *obj);
+EAPI int e_table_thaw (Evas_Object *obj);
+EAPI void e_table_homogenous_set (Evas_Object *obj, int homogenous);
+EAPI void e_table_pack (Evas_Object *obj, Evas_Object *child, int col, int row, int colspan, int rowspan);
+EAPI void e_table_pack_options_set (Evas_Object *obj, int fill_w, int fill_h, int expand_w, int expand_h, double align_x, double align_y, Evas_Coord min_w, Evas_Coord min_h, Evas_Coord max_w, Evas_Coord max_h);
+EAPI void e_table_unpack (Evas_Object *obj);
+EAPI void e_table_col_row_size_get (Evas_Object *obj, int *cols, int *rows);
+EAPI void e_table_size_min_get (Evas_Object *obj, Evas_Coord *minw, Evas_Coord *minh);
+EAPI void e_table_size_max_get (Evas_Object *obj, Evas_Coord *maxw, Evas_Coord *maxh);
+EAPI void e_table_align_get (Evas_Object *obj, double *ax, double *ay);
+EAPI void e_table_align_set (Evas_Object *obj, double ax, double ay);
+
+#endif
+#endif
diff --git a/src/bin/e_widget.c b/src/bin/e_widget.c
index 6328b1daa..91aa71681 100644
--- a/src/bin/e_widget.c
+++ b/src/bin/e_widget.c
@@ -133,7 +133,6 @@ e_widget_size_min_set(Evas_Object *obj, Evas_Coord minw, Evas_Coord minh)
API_ENTRY return;
if (minw >= 0) sd->minw = minw;
if (minh >= 0) sd->minh = minh;
- evas_object_size_hint_min_set(obj, minw, minh);
}
EAPI void
@@ -195,13 +194,10 @@ e_widget_sub_object_del(Evas_Object *obj, Evas_Object *sobj)
EAPI void
e_widget_resize_object_set(Evas_Object *obj, Evas_Object *sobj)
{
- int w, h;
API_ENTRY return;
if (sd->resize_obj) evas_object_smart_member_del(sd->resize_obj);
sd->resize_obj = sobj;
evas_object_event_callback_add(sobj, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _e_widget_hint, obj);
- evas_object_size_hint_min_get(sobj, &w, &h);
- evas_object_size_hint_min_set(obj, w, h);
evas_object_smart_member_add(sobj, obj);
_e_smart_reconfigure(sd);
}
diff --git a/src/bin/e_widget_button.c b/src/bin/e_widget_button.c
index db46639b8..fd3045121 100644
--- a/src/bin/e_widget_button.c
+++ b/src/bin/e_widget_button.c
@@ -1,5 +1,12 @@
#include "e.h"
+typedef enum _E_Widget_Button_Type E_Widget_Button_Type;
+enum _E_Widget_Button_Type
+{
+ E_WIDGET_BUTTON_TEXT = 1 << 0,
+ E_WIDGET_BUTTON_ICON = 1 << 1
+};
+
typedef struct _E_Widget_Data E_Widget_Data;
struct _E_Widget_Data
{
@@ -8,14 +15,16 @@ struct _E_Widget_Data
void (*func)(void *data, void *data2);
void *data;
void *data2;
+ E_Widget_Button_Type type;
};
static void _e_wid_del_hook(Evas_Object *obj);
static void _e_wid_focus_hook(Evas_Object *obj);
static void _e_wid_activate_hook(Evas_Object *obj);
static void _e_wid_disable_hook(Evas_Object *obj);
-static void _click(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED);
+static void _e_wid_signal_cb1(void *data, Evas_Object *obj, const char *emission, const char *source);
static void _e_wid_focus_steal(void *data, Evas *e, Evas_Object *obj, void *event_info);
+static void _e_wid_button_state_send(E_Widget_Data *wd);
/* local subsystem functions */
/* externally accessible functions */
@@ -24,6 +33,7 @@ e_widget_button_add(Evas *evas, const char *label, const char *icon, void (*func
{
Evas_Object *obj, *o;
E_Widget_Data *wd;
+ Evas_Coord mw, mh;
obj = e_widget_add(evas);
@@ -37,12 +47,16 @@ e_widget_button_add(Evas *evas, const char *label, const char *icon, void (*func
wd->data2 = data2;
e_widget_data_set(obj, wd);
- o = elm_button_add(e_win_evas_win_get(evas));
- evas_object_smart_callback_add(o, "clicked", _click, obj);
+ o = edje_object_add(evas);
wd->o_button = o;
+ e_theme_edje_object_set(o, "base/theme/widgets",
+ "e/widgets/button");
+ edje_object_signal_callback_add(o, "e,action,click", "",
+ _e_wid_signal_cb1, obj);
if ((label) && (label[0] != 0))
{
- elm_object_text_set(o, label);
+ edje_object_part_text_set(o, "e.text.label", label);
+ wd->type |= E_WIDGET_BUTTON_TEXT;
}
e_widget_sub_object_add(obj, o);
@@ -56,11 +70,16 @@ e_widget_button_add(Evas *evas, const char *label, const char *icon, void (*func
o = e_icon_add(evas);
wd->o_icon = o;
e_util_icon_theme_set(o, icon);
- elm_object_content_set(wd->o_button, o);
+ edje_object_part_swallow(wd->o_button, "e.swallow.icon", o);
e_widget_sub_object_add(obj, o);
evas_object_show(o);
+ wd->type |= E_WIDGET_BUTTON_ICON;
}
+ _e_wid_button_state_send(wd);
+ edje_object_size_min_calc(wd->o_button, &mw, &mh);
+ e_widget_size_min_set(obj, mw, mh);
+
return obj;
}
@@ -68,32 +87,48 @@ EAPI void
e_widget_button_label_set(Evas_Object *obj, const char *label)
{
E_Widget_Data *wd;
+ int mw, mh;
wd = e_widget_data_get(obj);
- elm_object_text_set(wd->o_button, label);
+ edje_object_part_text_set(wd->o_button, "e.text.label", label);
+ if ((label) && (label[0] != 0))
+ wd->type |= E_WIDGET_BUTTON_TEXT;
+ else
+ wd->type &= ~E_WIDGET_BUTTON_TEXT;
+ _e_wid_button_state_send(wd);
+ edje_object_size_min_calc(wd->o_button, &mw, &mh);
+ e_widget_size_min_set(obj, mw, mh);
}
EAPI void
e_widget_button_icon_set(Evas_Object *obj, Evas_Object *icon)
{
E_Widget_Data *wd;
+ int mw, mh;
wd = e_widget_data_get(obj);
if (wd->o_icon)
{
e_widget_sub_object_del(obj, wd->o_icon);
evas_object_hide(wd->o_icon);
- elm_object_content_unset(wd->o_button);
+ edje_object_part_unswallow(wd->o_button, wd->o_icon);
evas_object_del(wd->o_icon);
wd->o_icon = NULL;
}
if (icon)
{
wd->o_icon = icon;
- elm_object_content_set(wd->o_button, icon);
+ edje_object_part_swallow(wd->o_button, "e.swallow.icon", icon);
+ evas_object_pass_events_set(icon, 1);
evas_object_show(icon);
e_widget_sub_object_add(obj, icon);
+ wd->type |= E_WIDGET_BUTTON_ICON;
}
+ else
+ wd->type &= ~E_WIDGET_BUTTON_ICON;
+ _e_wid_button_state_send(wd);
+ edje_object_size_min_calc(wd->o_button, &mw, &mh);
+ e_widget_size_min_set(obj, mw, mh);
}
static void
@@ -111,7 +146,16 @@ _e_wid_focus_hook(Evas_Object *obj)
E_Widget_Data *wd;
wd = e_widget_data_get(obj);
- elm_object_focus_set(wd->o_button, e_widget_focus_get(obj));
+ if (e_widget_focus_get(obj))
+ {
+ edje_object_signal_emit(wd->o_button, "e,state,focused", "e");
+ evas_object_focus_set(wd->o_button, 1);
+ }
+ else
+ {
+ edje_object_signal_emit(wd->o_button, "e,state,unfocused", "e");
+ evas_object_focus_set(wd->o_button, 0);
+ }
}
static void
@@ -129,11 +173,14 @@ _e_wid_disable_hook(Evas_Object *obj)
E_Widget_Data *wd;
wd = e_widget_data_get(obj);
- elm_object_disabled_set(wd->o_button, e_widget_disabled_get(obj));
+ if (e_widget_disabled_get(obj))
+ edje_object_signal_emit(wd->o_button, "e,state,disabled", "e");
+ else
+ edje_object_signal_emit(wd->o_button, "e,state,enabled", "e");
}
static void
-_click(void *data, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
+_e_wid_signal_cb1(void *data, Evas_Object *obj __UNUSED__, const char *emission __UNUSED__, const char *source __UNUSED__)
{
Evas_Object *wid;
@@ -149,3 +196,20 @@ _e_wid_focus_steal(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__,
{
e_widget_focus_steal(data);
}
+
+static void
+_e_wid_button_state_send(E_Widget_Data *wd)
+{
+ if ((!wd) || (!wd->o_button)) return;
+ if (wd->type & E_WIDGET_BUTTON_TEXT)
+ {
+ if (wd->type & E_WIDGET_BUTTON_ICON)
+ edje_object_signal_emit(wd->o_button, "e,state,combo", "e");
+ else
+ edje_object_signal_emit(wd->o_button, "e,state,text", "e");
+ }
+ else if (wd->type & E_WIDGET_BUTTON_ICON)
+ edje_object_signal_emit(wd->o_button, "e,state,icon", "e");
+ edje_object_message_signal_process(wd->o_button);
+}
+
diff --git a/src/bin/e_widget_config_list.c b/src/bin/e_widget_config_list.c
index 4537a20d4..f0d67deff 100644
--- a/src/bin/e_widget_config_list.c
+++ b/src/bin/e_widget_config_list.c
@@ -44,7 +44,7 @@ e_widget_config_list_add(Evas *evas, Evas_Object * (*func_entry_add)(Evas_Object
wd = E_NEW(E_Widget_Data, 1);
e_widget_data_set(obj, wd);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
wd->gui.table = o;
e_widget_sub_object_add(obj, o);
diff --git a/src/bin/e_widget_csel.c b/src/bin/e_widget_csel.c
index f56488fe8..68ce6172c 100644
--- a/src/bin/e_widget_csel.c
+++ b/src/bin/e_widget_csel.c
@@ -204,11 +204,11 @@ e_widget_csel_add(Evas *evas, E_Color *color, Eina_Bool alpha_enabled)
wd->obj = obj;
e_widget_data_set(obj, wd);
- table = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ table = e_widget_table_add(evas, 0);
e_widget_sub_object_add(obj, table);
e_widget_resize_object_set(obj, table);
- frame = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ frame = e_widget_table_add(evas, 0);
e_widget_sub_object_add(obj, frame);
grp = e_widget_radio_group_new(&wd->mode);
diff --git a/src/bin/e_widget_entry.c b/src/bin/e_widget_entry.c
index ea58130cc..21dd5aeb8 100644
--- a/src/bin/e_widget_entry.c
+++ b/src/bin/e_widget_entry.c
@@ -62,6 +62,7 @@ e_widget_entry_add(Evas_Object *parent, char **text_location, void (*func)(void
wd->o_entry = o;
evas_object_size_hint_min_get(wd->o_entry, &minw, &minh);
e_widget_size_min_set(obj, minw, minh);
+ evas_object_size_hint_min_set(obj, minw, minh);
elm_object_text_set(o, NULL);
e_widget_sub_object_add(obj, o);
diff --git a/src/bin/e_widget_filepreview.c b/src/bin/e_widget_filepreview.c
index c150217aa..365ddbd5f 100644
--- a/src/bin/e_widget_filepreview.c
+++ b/src/bin/e_widget_filepreview.c
@@ -271,7 +271,7 @@ _e_wid_fprev_preview_video_opened(E_Widget_Data *wd, Evas_Object *obj, void *eve
static void
_e_wid_fprev_preview_video_resize(E_Widget_Data *wd, Evas_Object *obj, void *event_info __UNUSED__)
{
- int w, h;
+ int w, h, mw, mh;
char buf[128];
emotion_object_size_get(obj, &w, &h);
@@ -279,7 +279,8 @@ _e_wid_fprev_preview_video_resize(E_Widget_Data *wd, Evas_Object *obj, void *eve
snprintf(buf, sizeof(buf), "%dx%d", w, h);
e_widget_entry_text_set(wd->o_preview_resolution_entry, buf);
if (!wd->clamp_video) return;
- evas_object_size_hint_max_set(wd->o_preview_preview, w, h);
+ e_widget_size_min_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, w, h);
}
static void
@@ -306,7 +307,7 @@ _e_wid_fprev_preview_video_widgets(E_Widget_Data *wd)
win = e_win_evas_win_get(evas);
_e_wid_fprev_clear_widgets(wd);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
wd->o_preview_properties_table = o;
#define WIDROW(lab, labob, entob, entw) \
@@ -325,7 +326,7 @@ _e_wid_fprev_preview_video_widgets(E_Widget_Data *wd)
y++; \
} while (0)
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
e_widget_size_min_set(o, wd->w, wd->h);
e_widget_table_object_append(wd->o_preview_properties_table,
o, 0, 0, 2, 2, 1, 1, 1, 1);
@@ -389,7 +390,7 @@ _e_wid_fprev_preview_fs_widgets(E_Widget_Data *wd, Eina_Bool mount_point)
win = e_win_evas_win_get(evas);
_e_wid_fprev_clear_widgets(wd);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
wd->o_preview_properties_table = o;
#define WIDROW(lab, labob, entob, entw) \
@@ -445,7 +446,7 @@ _e_wid_fprev_preview_file_widgets(E_Widget_Data *wd, Eina_Bool dir, Eina_Bool tx
win = e_win_evas_win_get(evas);
_e_wid_fprev_clear_widgets(wd);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
wd->o_preview_preview_table = o;
e_widget_size_min_set(o, 32, 32);
@@ -453,7 +454,7 @@ _e_wid_fprev_preview_file_widgets(E_Widget_Data *wd, Eina_Bool dir, Eina_Bool tx
wd->o_preview_preview_table,
0, 1, 0.5);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
wd->o_preview_properties_table = o;
wd->is_dir = dir;
wd->is_txt = txt;
@@ -1179,14 +1180,6 @@ _e_wid_fprev_cb_mod(E_Widget_Data *wd, int type __UNUSED__, Eio_Monitor_Event *e
return ECORE_CALLBACK_RENEW;
}
-static void
-_fileprev_hints(void *data, Evas *e EINA_UNUSED, Evas_Object *obj, void *event_info EINA_UNUSED)
-{
- int w, h;
- evas_object_size_hint_min_get(obj, &w, &h);
- e_widget_size_min_set(data, w, h);
-}
-
EAPI Evas_Object *
e_widget_filepreview_add(Evas *evas, int w, int h, int horiz)
{
@@ -1205,7 +1198,6 @@ e_widget_filepreview_add(Evas *evas, int w, int h, int horiz)
o = e_widget_list_add(evas, 0, horiz);
wd->o_preview_list = o;
- evas_object_event_callback_add(o, EVAS_CALLBACK_CHANGED_SIZE_HINTS, _fileprev_hints, obj);
e_widget_resize_object_set(obj, o);
e_widget_sub_object_add(obj, o);
diff --git a/src/bin/e_widget_framelist.c b/src/bin/e_widget_framelist.c
index ba80db22e..29fd11c4c 100644
--- a/src/bin/e_widget_framelist.c
+++ b/src/bin/e_widget_framelist.c
@@ -15,10 +15,10 @@ static void _e_wid_disable_hook(Evas_Object *obj);
EAPI Evas_Object *
e_widget_framelist_add(Evas *evas, const char *label, int horiz)
{
- Evas_Object *obj, *o, *win;
+ Evas_Object *obj, *o;
E_Widget_Data *wd;
+ Evas_Coord mw = 0, mh = 0;
- win = e_win_evas_win_get(evas);
obj = e_widget_add(evas);
e_widget_del_hook_set(obj, _e_wid_del_hook);
@@ -26,21 +26,26 @@ e_widget_framelist_add(Evas *evas, const char *label, int horiz)
wd = calloc(1, sizeof(E_Widget_Data));
e_widget_data_set(obj, wd);
- o = elm_frame_add(win);
+ o = edje_object_add(evas);
wd->o_frame = o;
- elm_object_text_set(o, label);
+ e_theme_edje_object_set(o, "base/theme/widgets",
+ "e/widgets/frame");
+ edje_object_part_text_set(o, "e.text.label", label);
evas_object_show(o);
e_widget_sub_object_add(obj, o);
e_widget_resize_object_set(obj, o);
- o = elm_box_add(win);
+ o = elm_box_add(obj);
wd->o_box = o;
elm_box_horizontal_set(o, horiz);
elm_box_homogeneous_set(o, 0);
- elm_object_content_set(wd->o_frame, o);
+ edje_object_part_swallow(wd->o_frame, "e.swallow.content", o);
e_widget_sub_object_add(obj, o);
evas_object_show(o);
+ edje_object_size_min_calc(wd->o_frame, &mw, &mh);
+ e_widget_size_min_set(obj, mw, mh);
+
return obj;
}
@@ -61,6 +66,9 @@ e_widget_framelist_object_append_full(Evas_Object *obj, Evas_Object *sobj, int f
evas_object_size_hint_min_set(sobj, min_w, min_h);
evas_object_size_hint_max_set(sobj, max_w, max_h);
elm_box_recalculate(wd->o_box);
+ edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->o_box);
+ edje_object_size_min_calc(wd->o_frame, &mw, &mh);
+ e_widget_size_min_set(obj, mw, mh);
e_widget_sub_object_add(obj, sobj);
evas_object_show(sobj);
}
@@ -69,13 +77,19 @@ EAPI void
e_widget_framelist_object_append(Evas_Object *obj, Evas_Object *sobj)
{
E_Widget_Data *wd;
+ Evas_Coord mw = 0, mh = 0;
wd = e_widget_data_get(obj);
elm_box_pack_end(wd->o_box, sobj);
+ e_widget_size_min_get(sobj, &mw, &mh);
E_EXPAND(sobj);
E_FILL(sobj);
+ evas_object_size_hint_min_set(sobj, mw, mh);
elm_box_recalculate(wd->o_box);
+ edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->o_box);
+ edje_object_size_min_calc(wd->o_frame, &mw, &mh);
+ e_widget_size_min_set(obj, mw, mh);
e_widget_sub_object_add(obj, sobj);
evas_object_show(sobj);
}
diff --git a/src/bin/e_widget_frametable.c b/src/bin/e_widget_frametable.c
index ec12c0b1c..2434acf25 100644
--- a/src/bin/e_widget_frametable.c
+++ b/src/bin/e_widget_frametable.c
@@ -3,7 +3,6 @@
typedef struct _E_Widget_Data E_Widget_Data;
struct _E_Widget_Data
{
- Evas_Object *obj;
Evas_Object *o_frame, *o_table;
};
@@ -18,6 +17,7 @@ e_widget_frametable_add(Evas *evas, const char *label, int homogenous)
{
Evas_Object *obj, *o;
E_Widget_Data *wd;
+ Evas_Coord mw, mh;
obj = e_widget_add(evas);
@@ -25,56 +25,101 @@ e_widget_frametable_add(Evas *evas, const char *label, int homogenous)
e_widget_disable_hook_set(obj, _e_wid_disable_hook);
wd = calloc(1, sizeof(E_Widget_Data));
e_widget_data_set(obj, wd);
- wd->obj = obj;
- o = elm_frame_add(e_win_evas_win_get(evas));
+ o = edje_object_add(evas);
wd->o_frame = o;
- elm_object_text_set(o, label);
+ e_theme_edje_object_set(o, "base/theme/widgets",
+ "e/widgets/frame");
+ edje_object_part_text_set(o, "e.text.label", label);
evas_object_show(o);
e_widget_sub_object_add(obj, o);
e_widget_resize_object_set(obj, o);
- o = elm_table_add(e_win_evas_win_get(evas));
+ o = e_table_add(evas);
wd->o_table = o;
- elm_table_homogeneous_set(o, homogenous);
- elm_object_content_set(wd->o_frame, o);
+ e_table_homogenous_set(o, homogenous);
+ edje_object_part_swallow(wd->o_frame, "e.swallow.content", o);
e_widget_sub_object_add(obj, o);
evas_object_show(o);
+ edje_object_size_min_calc(wd->o_frame, &mw, &mh);
+ e_widget_size_min_set(obj, mw, mh);
+
return obj;
}
EAPI void
e_widget_frametable_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)
{
- e_widget_frametable_object_append_full(obj, sobj, col, row, colspan, rowspan, fill_w, fill_h, expand_w, expand_h, 0.5, 0.5, -1, -1, -1, -1);
+ E_Widget_Data *wd;
+ Evas_Coord mw = 0, mh = 0;
+
+ wd = e_widget_data_get(obj);
+
+ e_table_pack(wd->o_table, sobj, col, row, colspan, rowspan);
+ e_widget_size_min_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_size_min_get(wd->o_table, &mw, &mh);
+ evas_object_size_hint_min_set(wd->o_table, mw, mh);
+ edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->o_table);
+ edje_object_size_min_calc(wd->o_frame, &mw, &mh);
+ e_widget_size_min_set(obj, mw, mh);
+ e_widget_sub_object_add(obj, sobj);
+ evas_object_show(sobj);
}
EAPI void
e_widget_frametable_object_append_full(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, double align_x, double align_y, Evas_Coord min_w, Evas_Coord min_h, Evas_Coord max_w, Evas_Coord max_h)
{
E_Widget_Data *wd = e_widget_data_get(obj);
-
- if ((min_w > 0) || (min_h > 0))
- evas_object_size_hint_min_set(sobj, min_w, min_h);
- if ((max_w > 0) || (max_h > 0))
- evas_object_size_hint_max_set(sobj, max_w, max_h);
- if (fill_w) align_x = -1;
- if (fill_h) align_y = -1;
- E_ALIGN(sobj, align_x, align_y);
- E_WEIGHT(sobj, expand_w, expand_h);
- elm_table_pack(wd->o_table, sobj, col, row, colspan, rowspan);
+ Evas_Coord mw = 0, mh = 0;
+
+ e_table_pack(wd->o_table, sobj, col, row, colspan, rowspan);
+ e_table_pack_options_set(sobj,
+ fill_w, fill_h,
+ expand_w, expand_h,
+ align_x, align_y,
+ min_w, min_h,
+ max_w, max_h
+ );
+ e_table_size_min_get(wd->o_table, &mw, &mh);
+ evas_object_size_hint_min_set(wd->o_table, mw, mh);
+ edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->o_table);
+ edje_object_size_min_calc(wd->o_frame, &mw, &mh);
+ e_widget_size_min_set(obj, mw, mh);
e_widget_sub_object_add(obj, sobj);
evas_object_show(sobj);
}
EAPI void
-e_widget_frametable_object_repack(Evas_Object *obj EINA_UNUSED, 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_frametable_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)
{
- if (fill_w || fill_h)
- E_ALIGN(sobj, fill_w ? -1 : 0.5, fill_h ? -1 : 0.5);
- E_WEIGHT(sobj, expand_w, expand_h);
- elm_table_pack_set(sobj, col, row, colspan, rowspan);
+ 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_size_min_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_size_min_get(wd->o_table, &mw, &mh);
+ evas_object_size_hint_min_set(wd->o_table, mw, mh);
+ edje_object_part_swallow(wd->o_frame, "e.swallow.content", wd->o_table);
+ edje_object_size_min_calc(wd->o_frame, &mw, &mh);
+ e_widget_size_min_set(obj, mw, mh);
}
EAPI void
@@ -83,7 +128,7 @@ e_widget_frametable_content_align_set(Evas_Object *obj, double halign, double va
E_Widget_Data *wd;
wd = e_widget_data_get(obj);
- elm_table_align_set(wd->o_table, halign, valign);
+ e_table_align_set(wd->o_table, halign, valign);
}
EAPI void
diff --git a/src/bin/e_widget_fsel.c b/src/bin/e_widget_fsel.c
index df4df3258..0061da113 100644
--- a/src/bin/e_widget_fsel.c
+++ b/src/bin/e_widget_fsel.c
@@ -323,12 +323,12 @@ e_widget_fsel_add(Evas *evas, const char *dev, const char *path, char *selected,
wd->chg_data = chg_data;
wd->preview = preview;
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
wd->o_table = o;
e_widget_sub_object_add(obj, o);
e_widget_resize_object_set(obj, o);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
wd->o_table2 = o;
o = e_widget_button_add(evas, _("Add to Favorites"), "bookmark-new",
diff --git a/src/bin/e_widget_label.c b/src/bin/e_widget_label.c
index 3dc4acec1..cf6dd444b 100644
--- a/src/bin/e_widget_label.c
+++ b/src/bin/e_widget_label.c
@@ -22,6 +22,7 @@ EAPI Evas_Object *
e_widget_label_add(Evas *evas, const char *label)
{
Evas_Object *obj, *o;
+ Evas_Coord mw, mh;
E_Widget_Data *wd;
obj = e_widget_add(evas);
@@ -30,13 +31,17 @@ e_widget_label_add(Evas *evas, const char *label)
wd = calloc(1, sizeof(E_Widget_Data));
e_widget_data_set(obj, wd);
- o = elm_label_add(e_win_evas_win_get(evas));
+ o = edje_object_add(evas);
+ e_theme_edje_object_set(o, "base/theme/widgets",
+ "e/widgets/label");
wd->text = o;
+ edje_object_part_text_set(o, "e.text.label", label);
evas_object_show(o);
+ edje_object_size_min_calc(o, &mw, &mh);
e_widget_can_focus_set(obj, 0);
+ e_widget_size_min_set(obj, mw, mh);
e_widget_sub_object_add(obj, o);
e_widget_resize_object_set(obj, o);
- elm_object_text_set(o, label);
return obj;
}
@@ -51,9 +56,13 @@ EAPI void
e_widget_label_text_set(Evas_Object *obj, const char *text)
{
E_Widget_Data *wd;
+ Evas_Coord mw, mh;
wd = e_widget_data_get(obj);
- elm_object_text_set(wd->text, text);
+ edje_object_part_text_set(wd->text, "e.text.label", text);
+ edje_object_size_min_calc(wd->text, &mw, &mh);
+ evas_object_size_hint_min_set(wd->text, mw, mh);
+ e_widget_size_min_set(obj, mw, mh);
}
static void
@@ -71,6 +80,9 @@ _e_wid_disable_hook(Evas_Object *obj)
E_Widget_Data *wd;
wd = e_widget_data_get(obj);
- elm_object_disabled_set(wd->text, e_widget_disabled_get(obj));
+ if (e_widget_disabled_get(obj))
+ edje_object_signal_emit(wd->text, "e,state,disabled", "e");
+ else
+ edje_object_signal_emit(wd->text, "e,state,enabled", "e");
}
diff --git a/src/bin/e_widget_list.c b/src/bin/e_widget_list.c
index 581c684d7..84853f99a 100644
--- a/src/bin/e_widget_list.c
+++ b/src/bin/e_widget_list.c
@@ -61,6 +61,8 @@ e_widget_list_object_prepend(Evas_Object *obj, Evas_Object *sobj, int fill, int
wd = e_widget_data_get(obj);
mw = mh = 0;
+ e_widget_size_min_get(sobj, &mw, &mh);
+ evas_object_size_hint_min_set(sobj, mw, mh);
if (fill) align = -1;
if (elm_box_horizontal_get(wd->o_box) == 1)
{
@@ -99,6 +101,8 @@ e_widget_list_object_append(Evas_Object *obj, Evas_Object *sobj, int fill, int e
wd = e_widget_data_get(obj);
mw = mh = 0;
+ e_widget_size_min_get(sobj, &mw, &mh);
+ evas_object_size_hint_min_set(sobj, mw, mh);
if (fill) align = -1;
if (elm_box_horizontal_get(wd->o_box) == 1)
{
@@ -127,6 +131,8 @@ e_widget_list_object_repack(Evas_Object *obj, Evas_Object *sobj, int fill, int e
wd = e_widget_data_get(obj);
mw = mh = 0;
+ e_widget_size_min_get(sobj, &mw, &mh);
+ evas_object_size_hint_min_set(sobj, mw, mh);
if (fill) align = -1;
if (elm_box_horizontal_get(wd->o_box) == 1)
{
diff --git a/src/bin/e_widget_table.c b/src/bin/e_widget_table.c
index 95849ec8e..54d2231df 100644
--- a/src/bin/e_widget_table.c
+++ b/src/bin/e_widget_table.c
@@ -12,20 +12,20 @@ static void _e_wid_del_hook(Evas_Object *obj);
/* externally accessible functions */
EAPI Evas_Object *
-e_widget_table_add(Evas_Object *parent, int homogenous)
+e_widget_table_add(Evas *evas, int homogenous)
{
Evas_Object *obj, *o;
E_Widget_Data *wd;
- obj = e_widget_add(evas_object_evas_get(parent));
+ obj = e_widget_add(evas);
e_widget_del_hook_set(obj, _e_wid_del_hook);
wd = calloc(1, sizeof(E_Widget_Data));
e_widget_data_set(obj, wd);
- o = elm_table_add(parent);
+ o = e_table_add(evas);
wd->o_table = o;
- elm_table_homogeneous_set(o, homogenous);
+ e_table_homogenous_set(o, homogenous);
evas_object_show(o);
e_widget_sub_object_add(obj, o);
e_widget_resize_object_set(obj, o);
@@ -46,35 +46,70 @@ EAPI void
e_widget_table_object_align_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, double ax, double ay)
{
E_Widget_Data *wd;
+ Evas_Coord mw = 0, mh = 0;
wd = e_widget_data_get(obj);
- if (fill_w) ax = -1;
- if (fill_h) ay = -1;
- E_ALIGN(sobj, ax, ay);
- E_WEIGHT(sobj, expand_w, expand_h);
- elm_table_pack(wd->o_table, sobj, col, row, colspan, rowspan);
+ e_table_pack(wd->o_table, sobj, col, row, colspan, rowspan);
+ e_widget_size_min_get(sobj, &mw, &mh);
+ e_table_pack_options_set(sobj,
+ fill_w, fill_h, /* fill */
+ expand_w, expand_h, /* expand */
+ ax, ay, /* align */
+ mw, mh, /* min */
+ 99999, 99999 /* max */
+ );
+ e_table_size_min_get(wd->o_table, &mw, &mh);
+ e_widget_size_min_set(obj, mw, mh);
e_widget_sub_object_add(obj, sobj);
evas_object_show(sobj);
}
EAPI void
-e_widget_table_object_repack(Evas_Object *obj EINA_UNUSED, 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_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)
{
- if (fill_w || fill_h)
- E_ALIGN(sobj, fill_w ? -1 : 0.5, fill_h ? -1 : 0.5);
- E_WEIGHT(sobj, expand_w, expand_h);
- elm_table_pack_set(sobj, col, row, colspan, rowspan);
+ 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_size_min_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_size_min_get(wd->o_table, &mw, &mh);
+ e_widget_size_min_set(obj, mw, mh);
}
EAPI void
e_widget_table_unpack(Evas_Object *obj, Evas_Object *sobj)
{
+ e_widget_sub_object_del(obj, sobj);
+ e_table_unpack(sobj);
+}
+
+EAPI void
+e_widget_table_freeze(Evas_Object *obj)
+{
E_Widget_Data *wd;
wd = e_widget_data_get(obj);
- e_widget_sub_object_del(obj, sobj);
- elm_table_unpack(wd->o_table, sobj);
+ e_table_freeze(wd->o_table);
+}
+
+EAPI void
+e_widget_table_thaw(Evas_Object *obj)
+{
+ E_Widget_Data *wd;
+
+ wd = e_widget_data_get(obj);
+ e_table_thaw(wd->o_table);
}
static void
diff --git a/src/bin/e_widget_table.h b/src/bin/e_widget_table.h
index f4c2a7196..239834272 100644
--- a/src/bin/e_widget_table.h
+++ b/src/bin/e_widget_table.h
@@ -3,11 +3,13 @@
#ifndef E_WIDGET_TABLE_H
#define E_WIDGET_TABLE_H
-EAPI Evas_Object *e_widget_table_add(Evas_Object *parent, int homogenous);
+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_align_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, double ax, double ay);
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);
EAPI void e_widget_table_unpack(Evas_Object *obj, Evas_Object *sobj);
+EAPI void e_widget_table_freeze(Evas_Object *obj);
+EAPI void e_widget_table_thaw(Evas_Object *obj);
#endif
#endif
diff --git a/src/bin/e_widget_textblock.c b/src/bin/e_widget_textblock.c
index ecd3e1487..e7f0760b8 100644
--- a/src/bin/e_widget_textblock.c
+++ b/src/bin/e_widget_textblock.c
@@ -3,11 +3,12 @@
typedef struct _E_Widget_Data E_Widget_Data;
struct _E_Widget_Data
{
- Evas_Object *o_widget, *o_entry;
+ Evas_Object *o_widget, *o_scrollframe, *o_textblock;
};
static void _e_wid_del_hook(Evas_Object *obj);
static void _e_wid_focus_hook(Evas_Object *obj);
+static void _e_wid_cb_scrollframe_resize(void *data, Evas *e, Evas_Object *obj, void *event_info);
static void _e_wid_focus_steal(void *data, Evas *e, Evas_Object *obj, void *event_info);
/* externally accessible functions */
@@ -24,14 +25,23 @@ e_widget_textblock_add(Evas *evas)
wd = calloc(1, sizeof(E_Widget_Data));
e_widget_data_set(obj, wd);
- wd->o_entry = o = elm_entry_add(e_win_evas_win_get(evas));
- elm_entry_scrollable_set(o, 1);
- elm_entry_editable_set(o, 0);
+ o = e_scrollframe_add(evas);
+ wd->o_scrollframe = o;
evas_object_show(o);
e_widget_sub_object_add(obj, o);
e_widget_resize_object_set(obj, o);
evas_object_event_callback_add(o, EVAS_CALLBACK_MOUSE_DOWN, _e_wid_focus_steal, obj);
+ o = edje_object_add(evas);
+ e_theme_edje_object_set(o, "base/theme/widgets",
+ "e/widgets/textblock");
+ wd->o_textblock = o;
+ evas_object_event_callback_add(wd->o_scrollframe, EVAS_CALLBACK_RESIZE, _e_wid_cb_scrollframe_resize, wd);
+ evas_object_event_callback_add(wd->o_textblock, EVAS_CALLBACK_RESIZE, _e_wid_cb_scrollframe_resize, wd);
+ e_scrollframe_child_set(wd->o_scrollframe, o);
+ e_widget_sub_object_add(obj, o);
+ evas_object_show(o);
+
evas_object_resize(obj, 32, 32);
e_widget_size_min_set(obj, 32, 32);
return obj;
@@ -41,9 +51,18 @@ EAPI void
e_widget_textblock_markup_set(Evas_Object *obj, const char *text)
{
E_Widget_Data *wd;
+ Evas_Coord mw, mh, vw, vh;
wd = e_widget_data_get(obj);
- elm_entry_entry_set(wd->o_entry, text);
+
+ evas_object_resize(wd->o_textblock, 0, 0);
+
+ edje_object_part_text_set(wd->o_textblock, "e.textblock.text", text);
+ e_scrollframe_child_viewport_size_get(wd->o_scrollframe, &vw, &vh);
+ edje_object_size_min_restricted_calc(wd->o_textblock, &mw, &mh, vw, 0);
+ if (vw > mw) mw = vw;
+ if (vh > mh) mh = vh;
+ evas_object_resize(wd->o_textblock, mw, mh);
}
EAPI void
@@ -112,7 +131,7 @@ e_widget_textblock_plain_set(Evas_Object *obj, const char *text)
else *d = *p;
}
*d = 0;
- elm_entry_entry_set(obj, markup);
+ e_widget_textblock_markup_set(obj, markup);
}
static void
@@ -130,7 +149,30 @@ _e_wid_focus_hook(Evas_Object *obj)
E_Widget_Data *wd;
wd = e_widget_data_get(obj);
- elm_object_focus_set(wd->o_entry, e_widget_focus_get(obj));
+ if (e_widget_focus_get(obj))
+ {
+ edje_object_signal_emit(e_scrollframe_edje_object_get(wd->o_scrollframe), "e,state,focused", "e");
+ evas_object_focus_set(wd->o_scrollframe, 1);
+ }
+ else
+ {
+ edje_object_signal_emit(e_scrollframe_edje_object_get(wd->o_scrollframe), "e,state,unfocused", "e");
+ evas_object_focus_set(wd->o_scrollframe, 0);
+ }
+}
+
+static void
+_e_wid_cb_scrollframe_resize(void *data, Evas *e __UNUSED__, Evas_Object *obj __UNUSED__, void *event_info __UNUSED__)
+{
+ E_Widget_Data *wd;
+ Evas_Coord mw, mh, vw, vh;
+
+ wd = data;
+ e_scrollframe_child_viewport_size_get(wd->o_scrollframe, &vw, &vh);
+ edje_object_size_min_restricted_calc(wd->o_textblock, &mw, &mh, vw, 0);
+ if (vw > mw) mw = vw;
+ if (vh > mh) mh = vh;
+ evas_object_resize(wd->o_textblock, mw, mh);
}
static void
diff --git a/src/bin/e_widget_toolbook.c b/src/bin/e_widget_toolbook.c
index 725266d0b..115b455b4 100644
--- a/src/bin/e_widget_toolbook.c
+++ b/src/bin/e_widget_toolbook.c
@@ -23,7 +23,7 @@ e_widget_toolbook_add(Evas *evas, int icon_w, int icon_h)
e_widget_data_set(obj, wd);
wd->o_widget = obj;
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
e_widget_resize_object_set(obj, o);
evas_object_show(o);
e_widget_sub_object_add(obj, o);
diff --git a/src/modules/backlight/e_mod_main.c b/src/modules/backlight/e_mod_main.c
index 5a431e65f..2b63d1665 100644
--- a/src/modules/backlight/e_mod_main.c
+++ b/src/modules/backlight/e_mod_main.c
@@ -198,7 +198,7 @@ _backlight_popup_new(Instance *inst)
inst->popup = e_gadcon_popup_new(inst->gcc, 0);
evas = e_comp_get(inst->popup)->evas;
- inst->o_table = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ inst->o_table = e_widget_table_add(evas, 0);
o = e_widget_slider_add(evas, 0, 0, NULL, 0.1, 1.0, 0.05, 0, &(inst->val), NULL, 100);
evas_object_smart_callback_add(o, "changed", _slider_cb, inst);
diff --git a/src/modules/battery/e_mod_config.c b/src/modules/battery/e_mod_config.c
index f0bc3ed02..3ab08e9fb 100644
--- a/src/modules/battery/e_mod_config.c
+++ b/src/modules/battery/e_mod_config.c
@@ -230,7 +230,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_D
otb = e_widget_toolbook_add(evas, (48 * e_scale), (48 * e_scale));
/* Use Sliders for both cfg options */
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
ob = e_widget_label_add(evas, _("Check every:"));
e_widget_table_object_append(o, ob, 0, 0, 1, 1, 1, 0, 1, 0);
@@ -255,7 +255,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_D
e_widget_toolbook_page_append(otb, NULL, _("Polling"), o, 1, 0, 1, 0,
0.5, 0.0);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
ob = e_widget_check_add(evas, _("Show low battery alert"),
&(cfdata->show_alert));
e_widget_on_change_hook_set(ob, _cb_show_alert_changed, cfdata);
diff --git a/src/modules/clock/e_mod_config.c b/src/modules/clock/e_mod_config.c
index bfa139433..50ac863dc 100644
--- a/src/modules/clock/e_mod_config.c
+++ b/src/modules/clock/e_mod_config.c
@@ -78,7 +78,7 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__,
strftime(daynames[i], sizeof(daynames[i]), "%A", &tm);
}
- tab = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ tab = e_widget_table_add(evas, 0);
of = e_widget_frametable_add(evas, _("Clock"), 0);
diff --git a/src/modules/clock/e_mod_main.c b/src/modules/clock/e_mod_main.c
index 323898823..93d49bad9 100644
--- a/src/modules/clock/e_mod_main.c
+++ b/src/modules/clock/e_mod_main.c
@@ -317,7 +317,7 @@ _clock_popup_new(Instance *inst)
inst->popup = e_gadcon_popup_new(inst->gcc, 0);
evas = e_comp_get(inst->popup)->evas;
- inst->o_table = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ inst->o_table = e_widget_table_add(evas, 0);
oi = edje_object_add(evas);
inst->o_popclock = oi;
diff --git a/src/modules/conf_applications/e_int_config_apps.c b/src/modules/conf_applications/e_int_config_apps.c
index 170981cb3..b13ea562a 100644
--- a/src/modules/conf_applications/e_int_config_apps.c
+++ b/src/modules/conf_applications/e_int_config_apps.c
@@ -254,7 +254,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
if (cfdata->data->show_autostart)
{
/* XDG autostart page */
- ot = e_widget_table_add(e_win_evas_win_get(evas), EINA_FALSE);
+ ot = e_widget_table_add(evas, EINA_FALSE);
cfdata->apps_xdg.o_list = e_widget_ilist_add(evas, 24, 24, NULL);
e_widget_ilist_multi_select_set(cfdata->apps_xdg.o_list, EINA_TRUE);
e_widget_size_min_get(cfdata->apps_xdg.o_list, &mw, NULL);
@@ -280,7 +280,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
}
/* Selection page */
- ot = e_widget_table_add(e_win_evas_win_get(evas), EINA_FALSE);
+ ot = e_widget_table_add(evas, EINA_FALSE);
cfdata->apps_user.o_list = e_widget_ilist_add(evas, 24, 24, NULL);
e_widget_ilist_multi_select_set(cfdata->apps_user.o_list, EINA_TRUE);
e_widget_size_min_get(cfdata->apps_user.o_list, &mw, NULL);
@@ -299,7 +299,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
1, 1, 1, 1, 0.5, 0.0);
/* Order page */
- ot = e_widget_table_add(e_win_evas_win_get(evas), EINA_FALSE);
+ ot = e_widget_table_add(evas, EINA_FALSE);
cfdata->o_list = e_widget_ilist_add(evas, 24, 24, NULL);
_fill_order_list(cfdata);
e_widget_table_object_append(ot, cfdata->o_list, 0, 0, 3, 1, 1, 1, 1, 1);
diff --git a/src/modules/conf_applications/e_int_config_apps_personal.c b/src/modules/conf_applications/e_int_config_apps_personal.c
index dc6bbc81c..1c16cd9c0 100644
--- a/src/modules/conf_applications/e_int_config_apps_personal.c
+++ b/src/modules/conf_applications/e_int_config_apps_personal.c
@@ -75,7 +75,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
e_dialog_resizable_set(cfd->dia, 1);
- of = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ of = e_widget_table_add(evas, 0);
li = e_widget_ilist_add(evas, 24, 24, NULL);
cfdata->obj.list = li;
diff --git a/src/modules/conf_applications/e_int_config_defapps.c b/src/modules/conf_applications/e_int_config_defapps.c
index 5a371887d..ff73716c1 100644
--- a/src/modules/conf_applications/e_int_config_defapps.c
+++ b/src/modules/conf_applications/e_int_config_defapps.c
@@ -292,7 +292,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
e_dialog_resizable_set(cfd->dia, 1);
otb = e_widget_toolbook_add(evas, 24, 24);
- ot = e_widget_table_add(e_win_evas_win_get(evas), EINA_FALSE);
+ ot = e_widget_table_add(evas, EINA_FALSE);
ob = e_widget_label_add(evas, _("Custom Browser Command"));
e_widget_table_object_append(ot, ob, 0, 0, 1, 1, 1, 1, 0, 0);
@@ -330,7 +330,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
e_widget_toolbook_page_append(otb, NULL, _("Core"), ot,
1, 1, 1, 1, 0.5, 0.0);
- ot = e_widget_table_add(e_win_evas_win_get(evas), EINA_FALSE);
+ ot = e_widget_table_add(evas, EINA_FALSE);
of = e_widget_framelist_add(evas, _("Types"), 0);
il = e_widget_ilist_add(evas, 24, 24, &(cfdata->selmime));
diff --git a/src/modules/conf_bindings/e_int_config_acpibindings.c b/src/modules/conf_bindings/e_int_config_acpibindings.c
index e94174815..ac3a259ee 100644
--- a/src/modules/conf_bindings/e_int_config_acpibindings.c
+++ b/src/modules/conf_bindings/e_int_config_acpibindings.c
@@ -205,7 +205,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
e_widget_frametable_object_append(of, ow, 1, 1, 1, 1, 1, 0, 1, 0);
e_widget_list_object_append(ol, of, 1, 1, 0.5);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
of = e_widget_framelist_add(evas, _("Action"), 0);
ow = e_widget_ilist_add(evas, (24 * e_scale), (24 * e_scale), NULL);
cfdata->o_actions = ow;
diff --git a/src/modules/conf_bindings/e_int_config_edgebindings.c b/src/modules/conf_bindings/e_int_config_edgebindings.c
index c697b5720..ace403ee0 100644
--- a/src/modules/conf_bindings/e_int_config_edgebindings.c
+++ b/src/modules/conf_bindings/e_int_config_edgebindings.c
@@ -274,7 +274,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
e_widget_frametable_object_append(of, ob, 0, 3, 2, 1, 1, 0, 1, 0);
e_widget_list_object_append(ol, of, 1, 1, 0.5);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
of = e_widget_framelist_add(evas, _("Action"), 0);
ob = e_widget_ilist_add(evas, 24, 24, &(cfdata->locals.action));
cfdata->gui.o_action_list = ob;
diff --git a/src/modules/conf_bindings/e_int_config_keybindings.c b/src/modules/conf_bindings/e_int_config_keybindings.c
index 43a615c5e..d4e013b5b 100644
--- a/src/modules/conf_bindings/e_int_config_keybindings.c
+++ b/src/modules/conf_bindings/e_int_config_keybindings.c
@@ -253,7 +253,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
e_widget_frametable_object_append(of, ob, 0, 3, 2, 1, 1, 0, 1, 0);
e_widget_list_object_append(o, of, 1, 1, 0.5);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
of = e_widget_framelist_add(evas, _("Action"), 0);
ob = e_widget_ilist_add(evas, 24, 24, &(cfdata->locals.action));
cfdata->gui.o_action_list = ob;
diff --git a/src/modules/conf_bindings/e_int_config_mousebindings.c b/src/modules/conf_bindings/e_int_config_mousebindings.c
index 4a5d24245..36180c70b 100644
--- a/src/modules/conf_bindings/e_int_config_mousebindings.c
+++ b/src/modules/conf_bindings/e_int_config_mousebindings.c
@@ -308,7 +308,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
e_widget_frametable_object_append(ot, ob, 0, 3, 2, 1, 1, 0, 1, 0);
e_widget_list_object_append(o, ot, 1, 1, 0.5);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
of = e_widget_framelist_add(evas, _("Action"), 0);
ob = e_widget_ilist_add(evas, 24, 24, &(cfdata->locals.action));
cfdata->gui.o_action_list = ob;
diff --git a/src/modules/conf_bindings/e_int_config_signalbindings.c b/src/modules/conf_bindings/e_int_config_signalbindings.c
index 41b7527f5..29290cf39 100644
--- a/src/modules/conf_bindings/e_int_config_signalbindings.c
+++ b/src/modules/conf_bindings/e_int_config_signalbindings.c
@@ -798,7 +798,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
e_widget_frametable_object_append(of, ob, 0, 3, 2, 1, 1, 0, 1, 0);
e_widget_list_object_append(ol, of, 1, 1, 0.5);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
of = e_widget_framelist_add(evas, _("Action"), 0);
ob = e_widget_ilist_add(evas, 24, 24, &(cfdata->locals.action));
cfdata->gui.o_action_list = ob;
diff --git a/src/modules/conf_dialogs/e_int_config_profiles.c b/src/modules/conf_dialogs/e_int_config_profiles.c
index 4defb0cdb..0477d2f5d 100644
--- a/src/modules/conf_dialogs/e_int_config_profiles.c
+++ b/src/modules/conf_dialogs/e_int_config_profiles.c
@@ -129,7 +129,7 @@ _create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Da
99999, 99999 /* max */
);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
ob = e_widget_button_add(evas, _("Add"), "list-add", _cb_add, cfdata, NULL);
e_widget_table_object_append(ot, ob, 0, 0, 1, 1, 1, 1, 0, 0);
cfdata->o_delete = e_widget_button_add(evas, _("Delete"), "list-remove",
diff --git a/src/modules/conf_display/e_int_config_desklock.c b/src/modules/conf_display/e_int_config_desklock.c
index 8134fcfca..f4d51671d 100644
--- a/src/modules/conf_display/e_int_config_desklock.c
+++ b/src/modules/conf_display/e_int_config_desklock.c
@@ -382,7 +382,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
/* Wallpapers */
ol = e_widget_list_add(evas, 0, 0);
- of = e_widget_table_add(e_win_evas_win_get(evas), 1);
+ of = e_widget_table_add(evas, 1);
rg = e_widget_radio_group_new((int *)&(cfdata->bg_method));
ow = e_widget_radio_add(evas, _("Theme Defined"),
E_DESKLOCK_BACKGROUND_METHOD_THEME_DESKLOCK, rg);
@@ -402,7 +402,7 @@ _basic_create(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cfdata)
e_widget_table_object_append(of, ow, 1, 1, 1, 1, 1, 0, 1, 0);
e_widget_list_object_append(ol, of, 1, 1, 0.5);
- cfdata->gui.o_table = e_widget_table_add(e_win_evas_win_get(evas), 1);
+ cfdata->gui.o_table = e_widget_table_add(evas, 1);
EINA_LIST_FOREACH(e_comp->zones, l, zone)
{
diff --git a/src/modules/conf_display/e_int_config_desklock_fsel.c b/src/modules/conf_display/e_int_config_desklock_fsel.c
index b642e5351..5d6f85581 100644
--- a/src/modules/conf_display/e_int_config_desklock_fsel.c
+++ b/src/modules/conf_display/e_int_config_desklock_fsel.c
@@ -90,8 +90,8 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data
cfdata->bg = NULL;
rg = e_widget_radio_group_new(&(cfdata->fmdir));
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
- rt = e_widget_table_add(e_win_evas_win_get(evas), 1);
+ ot = e_widget_table_add(evas, 0);
+ rt = e_widget_table_add(evas, 1);
ow = e_widget_radio_add(evas, _("Personal"), 0, rg);
evas_object_smart_callback_add(ow, "changed", _cb_radio_changed, cfdata);
diff --git a/src/modules/conf_intl/e_int_config_imc.c b/src/modules/conf_intl/e_int_config_imc.c
index 5baf0801c..68f9a4076 100644
--- a/src/modules/conf_intl/e_int_config_imc.c
+++ b/src/modules/conf_intl/e_int_config_imc.c
@@ -807,8 +807,8 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
o = e_widget_list_add(evas, 0, 1);
rg = e_widget_radio_group_new(&(cfdata->fmdir));
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
- rt = e_widget_table_add(e_win_evas_win_get(evas), 1);
+ ot = e_widget_table_add(evas, 0);
+ rt = e_widget_table_add(evas, 1);
ow = e_widget_radio_add(evas, _("Personal"), 0, rg);
cfdata->o_personal = ow;
@@ -875,7 +875,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
e_widget_table_object_append(ot, of, 0, 2, 1, 1, 1, 1, 1, 1);
e_widget_list_object_append(o, ot, 1, 1, 0.0);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
ow = e_widget_check_add(evas, _("Use No Input Method"),
&(cfdata->imc_disable));
diff --git a/src/modules/conf_intl/e_int_config_intl.c b/src/modules/conf_intl/e_int_config_intl.c
index 53e8cf31e..8038aa54b 100644
--- a/src/modules/conf_intl/e_int_config_intl.c
+++ b/src/modules/conf_intl/e_int_config_intl.c
@@ -1020,7 +1020,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
cfdata->evas = evas;
e_dialog_resizable_set(cfd->dia, 1);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
of = e_widget_framelist_add(evas, _("Language Selector"), 0);
ob = e_widget_ilist_add(evas, 16, 16, &(cfdata->cur_blang));
e_widget_size_min_set(ob, 100, 80);
@@ -1110,7 +1110,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data
e_dialog_resizable_set(cfd->dia, 1);
_intl_current_locale_setup(cfdata);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
of = e_widget_framelist_add(evas, _("Language Selector"), 1);
diff --git a/src/modules/conf_paths/e_int_config_env.c b/src/modules/conf_paths/e_int_config_env.c
index 9f7c850ff..5d355dc84 100644
--- a/src/modules/conf_paths/e_int_config_env.c
+++ b/src/modules/conf_paths/e_int_config_env.c
@@ -281,7 +281,7 @@ _basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, E_Config_Dialog_Data *cf
e_dialog_resizable_set(cfd->dia, 1);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
ol = e_widget_ilist_add(evas, 0, 0, NULL);
cfdata->gui.list = ol;
diff --git a/src/modules/conf_paths/e_int_config_paths.c b/src/modules/conf_paths/e_int_config_paths.c
index 808f77279..ea918a41d 100644
--- a/src/modules/conf_paths/e_int_config_paths.c
+++ b/src/modules/conf_paths/e_int_config_paths.c
@@ -159,7 +159,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
int i;
e_dialog_resizable_set(cfd->dia, 1);
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
of = e_widget_framelist_add(evas, _("Enlightenment Paths"), 0);
ob = e_widget_ilist_add(evas, 0, 0, NULL);
diff --git a/src/modules/conf_performance/e_int_config_powermanagement.c b/src/modules/conf_performance/e_int_config_powermanagement.c
index 4d1b6739f..ce0fc8a18 100644
--- a/src/modules/conf_performance/e_int_config_powermanagement.c
+++ b/src/modules/conf_performance/e_int_config_powermanagement.c
@@ -113,7 +113,7 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data
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(e_win_evas_win_get(evas), 0);
+ ol = e_widget_table_add(evas, 0);
y = 0;
ob = e_widget_label_add(evas,
diff --git a/src/modules/conf_shelves/e_int_config_shelf.c b/src/modules/conf_shelves/e_int_config_shelf.c
index b8de9d0b9..89d9e3cac 100644
--- a/src/modules/conf_shelves/e_int_config_shelf.c
+++ b/src/modules/conf_shelves/e_int_config_shelf.c
@@ -133,7 +133,7 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data
e_widget_framelist_object_append(of, cfdata->o_list);
e_widget_list_object_append(ol, of, 1, 1, 0.5);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
cfdata->o_add = ow = e_widget_button_add(evas, _("Add"), "list-add", _cb_add, cfdata, NULL);
e_widget_table_object_append(ot, ow, 0, 0, 1, 1, 1, 1, 0, 0);
cfdata->o_delete = e_widget_button_add(evas, _("Delete"), "list-remove",
diff --git a/src/modules/conf_theme/e_int_config_fonts.c b/src/modules/conf_theme/e_int_config_fonts.c
index df8d388c3..0736ebb5e 100644
--- a/src/modules/conf_theme/e_int_config_fonts.c
+++ b/src/modules/conf_theme/e_int_config_fonts.c
@@ -423,7 +423,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
cfdata->evas = evas;
e_dialog_resizable_set(cfd->dia, 1);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
cfdata->gui.class_list = NULL;
@@ -638,7 +638,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_
otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
of = e_widget_frametable_add(evas, _("Font Classes"), 0);
ob = e_widget_ilist_add(evas, 16, 16, NULL);
cfdata->gui.class_list = ob;
@@ -688,7 +688,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_
e_widget_toolbook_page_append(otb, NULL, _("General Settings"),
ot, 1, 1, 1, 1, 0.5, 0.0);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
of = e_widget_frametable_add(evas, _("Hinting"), 0);
rg = e_widget_radio_group_new(&(cfdata->hinting));
option_enable = evas_font_hinting_can_hint(evas, EVAS_FONT_HINTING_BYTECODE);
diff --git a/src/modules/conf_theme/e_int_config_scale.c b/src/modules/conf_theme/e_int_config_scale.c
index d7655ff01..3f5699c06 100644
--- a/src/modules/conf_theme/e_int_config_scale.c
+++ b/src/modules/conf_theme/e_int_config_scale.c
@@ -223,7 +223,7 @@ _basic_create(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dialog_Data
int dpi = 0, x = 0, y = 0;
_fill_data(cfdata);
- o = e_widget_table_add(e_win_evas_win_get(evas), 1);
+ o = e_widget_table_add(evas, 1);
#ifndef HAVE_WAYLAND_ONLY
dpi = ecore_x_dpi_get();
diff --git a/src/modules/conf_theme/e_int_config_theme.c b/src/modules/conf_theme/e_int_config_theme.c
index 026bdbead..c51937b7b 100644
--- a/src/modules/conf_theme/e_int_config_theme.c
+++ b/src/modules/conf_theme/e_int_config_theme.c
@@ -668,9 +668,9 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
z = e_zone_current_get(e_comp_get(NULL));
e_dialog_resizable_set(cfd->dia, 1);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
- ol = e_widget_table_add(e_win_evas_win_get(evas), 0);
- il = e_widget_table_add(e_win_evas_win_get(evas), 1);
+ ot = e_widget_table_add(evas, 0);
+ ol = e_widget_table_add(evas, 0);
+ il = e_widget_table_add(evas, 1);
rg = e_widget_radio_group_new(&(cfdata->fmdir));
o = e_widget_radio_add(evas, _("Personal"), 0, rg);
diff --git a/src/modules/conf_theme/e_int_config_transitions.c b/src/modules/conf_theme/e_int_config_transitions.c
index 59167bd38..d14901b15 100644
--- a/src/modules/conf_theme/e_int_config_transitions.c
+++ b/src/modules/conf_theme/e_int_config_transitions.c
@@ -168,7 +168,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
zone = e_zone_current_get(e_comp_get(NULL));
- o = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ o = e_widget_table_add(evas, 0);
of = e_widget_framelist_add(evas, _("Events"), 0);
il = e_widget_ilist_add(evas, 48, 48, NULL);
diff --git a/src/modules/conf_theme/e_int_config_wallpaper.c b/src/modules/conf_theme/e_int_config_wallpaper.c
index 0e2f4fb13..ea4ca8a41 100644
--- a/src/modules/conf_theme/e_int_config_wallpaper.c
+++ b/src/modules/conf_theme/e_int_config_wallpaper.c
@@ -416,8 +416,8 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
o = e_widget_list_add(evas, 0, 1);
rg = e_widget_radio_group_new(&(cfdata->fmdir));
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
- rt = e_widget_table_add(e_win_evas_win_get(evas), 1);
+ ot = e_widget_table_add(evas, 0);
+ rt = e_widget_table_add(evas, 1);
/* create dir radios */
ow = e_widget_radio_add(evas, _("Personal"), 0, rg);
@@ -461,7 +461,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
e_widget_table_object_append(ot, ow, 0, 2, 1, 1, 1, 1, 1, 1);
e_widget_list_object_append(o, ot, 1, 1, 0.0);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
ow = e_widget_check_add(evas, _("Use Theme Wallpaper"),
&cfdata->use_theme_bg);
cfdata->o_theme_bg = ow;
@@ -570,8 +570,8 @@ _adv_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *
o = e_widget_list_add(evas, 0, 1);
rg = e_widget_radio_group_new(&(cfdata->fmdir));
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
- rt = e_widget_table_add(e_win_evas_win_get(evas), 1);
+ ot = e_widget_table_add(evas, 0);
+ rt = e_widget_table_add(evas, 1);
/* create dir radios */
ow = e_widget_radio_add(evas, _("Personal"), 0, rg);
@@ -608,7 +608,7 @@ _adv_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data *
e_widget_table_object_append(ot, ow, 0, 2, 1, 1, 1, 1, 1, 1);
e_widget_list_object_append(o, ot, 1, 1, 0.0);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
ow = e_widget_check_add(evas, _("Use Theme Wallpaper"),
&cfdata->use_theme_bg);
cfdata->o_theme_bg = ow;
diff --git a/src/modules/everything/evry_config.c b/src/modules/everything/evry_config.c
index eb5d8a01e..d80249d40 100644
--- a/src/modules/everything/evry_config.c
+++ b/src/modules/everything/evry_config.c
@@ -358,7 +358,7 @@ _create_plugin_page(E_Config_Dialog_Data *cfdata __UNUSED__, Evas *e, Plugin_Pag
Evas_Object *o, *of, *ob;
E_Radio_Group *rg;
- ob = e_widget_table_add(e_win_evas_win_get(e), 0);
+ ob = e_widget_table_add(e, 0);
of = e_widget_frametable_add(e, _("Available Plugins"), 0);
page->list = e_widget_ilist_add(e, 24, 24, NULL);
e_widget_on_change_hook_set(page->list, _list_select_cb, page);
@@ -450,7 +450,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *e, E_Config_Dialog
otb = e_widget_toolbook_add(e, 48 * e_scale, 48 * e_scale);
- o = e_widget_table_add(e_win_evas_win_get(e), 0);
+ o = e_widget_table_add(e, 0);
/// GENERAL SETTNGS ///
of = e_widget_framelist_add(e, _("Default View"), 0);
diff --git a/src/modules/gadman/e_mod_config.c b/src/modules/gadman/e_mod_config.c
index 06c35fb8f..ad520547f 100644
--- a/src/modules/gadman/e_mod_config.c
+++ b/src/modules/gadman/e_mod_config.c
@@ -202,7 +202,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
e_widget_toolbook_page_append(otb, NULL, _("Layers"), o, 1, 1, 1, 1, 0.5, 0.0);
/////////////////////////////////////////////////////////////////////
- ft = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ft = e_widget_table_add(evas, 0);
//Background mode
of = e_widget_frametable_add(evas, _("Mode"), 0);
diff --git a/src/modules/ibar/e_mod_config.c b/src/modules/ibar/e_mod_config.c
index 437dc6b93..7d7b17bb0 100644
--- a/src/modules/ibar/e_mod_config.c
+++ b/src/modules/ibar/e_mod_config.c
@@ -110,7 +110,7 @@ _basic_create_widgets(E_Config_Dialog *cfd __UNUSED__, Evas *evas, E_Config_Dial
e_widget_size_min_set(ol, 140, 140);
e_widget_frametable_object_append(of, ol, 0, 0, 1, 2, 1, 1, 1, 0);
- ot = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ot = e_widget_table_add(evas, 0);
ob = e_widget_button_add(evas, _("Add"), "list-add", _cb_add, cfdata, NULL);
e_widget_table_object_append(ot, ob, 0, 0, 1, 1, 1, 1, 1, 0);
ob = e_widget_button_add(evas, _("Delete"), "list-remove", _cb_del, cfdata, NULL);
diff --git a/src/modules/lokker/lokker.c b/src/modules/lokker/lokker.c
index 038784f7a..56a35ed26 100644
--- a/src/modules/lokker/lokker.c
+++ b/src/modules/lokker/lokker.c
@@ -211,6 +211,7 @@ _pin_click(void *data EINA_UNUSED, Evas_Object *obj, const char *sig EINA_UNUSED
static void
_pin_box_add(Lokker_Popup *lp)
{
+ int mw, mh;
Evas *evas;
Evas_Object *table, *o, *o2;
int x, a = 0, b = 0;
@@ -223,9 +224,10 @@ _pin_box_add(Lokker_Popup *lp)
"e/desklock/pin_box");
edje_object_part_text_set(lp->login_box, "e.text.title",
_("Please enter your PIN"));
- table = elm_table_add(e_win_evas_win_get(evas));
+ table = e_table_add(evas);
e_comp_object_util_del_list_append(lp->login_box, table);
- elm_table_homogeneous_set(table, 1);
+ e_table_homogenous_set(table, 1);
+ e_table_freeze(table);
for (x = 1; x < 11; x++)
{
char buf[8];
@@ -238,10 +240,9 @@ _pin_box_add(Lokker_Popup *lp)
evas_object_show(o);
edje_object_signal_callback_add(o, "e,action,click", "*", _pin_click, lp);
if (x == 10) a = 1;
- evas_object_size_hint_min_set(o, 48 * e_scale, 48 * e_scale);
- evas_object_size_hint_max_set(o, 48 * e_scale, 48 * e_scale);
- E_FILL(o);
- elm_table_pack(table, o, a, b, 1, 1);
+ e_table_pack(table, o, a, b, 1, 1);
+ e_table_pack_options_set(o, 1, 1, 0, 0, 0.5, 0.5,
+ 48 * e_scale, 48 * e_scale, 48 * e_scale, 48 * e_scale);
if (++a >= 3)
{
a = 0;
@@ -261,10 +262,9 @@ _pin_box_add(Lokker_Popup *lp)
evas_object_show(o2);
evas_object_show(o);
edje_object_signal_callback_add(o, "e,action,click", "*", _pin_click, lp);
- evas_object_size_hint_min_set(o, 48 * e_scale, 48 * e_scale);
- evas_object_size_hint_max_set(o, 48 * e_scale, 48 * e_scale);
- E_FILL(o);
- elm_table_pack(table, o, 0, 3, 1, 1);
+ e_table_pack(table, o, 0, 3, 1, 1);
+ e_table_pack_options_set(o, 1, 1, 0, 0, 0.5, 0.5,
+ 48 * e_scale, 48 * e_scale, 48 * e_scale, 48 * e_scale);
/* login */
o = edje_object_add(evas);
@@ -278,13 +278,19 @@ _pin_box_add(Lokker_Popup *lp)
evas_object_show(o2);
evas_object_show(o);
edje_object_signal_callback_add(o, "e,action,click", "*", _pin_click, lp);
- evas_object_size_hint_min_set(o, 48 * e_scale, 48 * e_scale);
- evas_object_size_hint_max_set(o, 48 * e_scale, 48 * e_scale);
- E_FILL(o);
- elm_table_pack(table, o, 2, 3, 1, 1);
+ e_table_pack(table, o, 2, 3, 1, 1);
+ e_table_pack_options_set(o, 1, 1, 0, 0, 0.5, 0.5,
+ 48 * e_scale, 48 * e_scale, 48 * e_scale, 48 * e_scale);
+ e_table_thaw(table);
evas_object_show(table);
+ e_table_size_min_get(table, &mw, &mh);
+ evas_object_size_hint_min_set(table, mw, mh);
+ evas_object_size_hint_max_set(table, mw, mh);
edje_object_part_swallow(lp->login_box, "e.swallow.buttons", table);
+ edje_object_size_min_calc(lp->login_box, &mw, &mh);
+ evas_object_size_hint_min_set(lp->login_box, mw, mh);
+ evas_object_size_hint_max_set(lp->login_box, mw, mh);
}
static void
diff --git a/src/modules/mixer/conf_gadget.c b/src/modules/mixer/conf_gadget.c
index b4151ebb8..f99d5e132 100644
--- a/src/modules/mixer/conf_gadget.c
+++ b/src/modules/mixer/conf_gadget.c
@@ -345,7 +345,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
e_dialog_resizable_set(cfd->dia, 1);
- cfdata->ui.table = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ cfdata->ui.table = e_widget_table_add(evas, 0);
_basic_create_general(evas, cfdata);
_basic_create_cards(evas, cfdata);
_basic_create_channels(evas, cfdata);
diff --git a/src/modules/mixer/e_mod_main.c b/src/modules/mixer/e_mod_main.c
index 03f2db570..77b017296 100644
--- a/src/modules/mixer/e_mod_main.c
+++ b/src/modules/mixer/e_mod_main.c
@@ -548,7 +548,7 @@ _mixer_popup_new(E_Mixer_Instance *inst)
inst->popup = e_gadcon_popup_new(inst->gcc, 0);
evas = e_comp_get(inst->gcc)->evas;
- inst->ui.table = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ inst->ui.table = e_widget_table_add(evas, 0);
inst->ui.label = e_widget_label_add(evas, inst->conf->channel_name);
e_widget_table_object_append(inst->ui.table, inst->ui.label,
diff --git a/src/modules/packagekit/e_mod_packagekit.c b/src/modules/packagekit/e_mod_packagekit.c
index e7ad73b64..aa07844e1 100644
--- a/src/modules/packagekit/e_mod_packagekit.c
+++ b/src/modules/packagekit/e_mod_packagekit.c
@@ -180,7 +180,7 @@ packagekit_popup_new(E_PackageKit_Instance *inst)
inst->popup = e_gadcon_popup_new(inst->gcc, EINA_FALSE);
evas = e_comp_get(inst->popup)->evas;
- table = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ table = e_widget_table_add(evas, 0);
inst->popup_label = e_widget_label_add(evas, NULL);
e_widget_table_object_append(table, inst->popup_label, 0,0, 1,1, 1,0,1,0);
diff --git a/src/modules/pager/e_mod_main.c b/src/modules/pager/e_mod_main.c
index 2a3c97ee8..66818621b 100644
--- a/src/modules/pager/e_mod_main.c
+++ b/src/modules/pager/e_mod_main.c
@@ -357,9 +357,9 @@ _pager_new(Evas *evas, E_Zone *zone, E_Gadcon *gc)
p = E_NEW(Pager, 1);
p->inst = NULL;
p->popup = NULL;
- p->o_table = elm_table_add(e_win_evas_win_get(evas));
+ p->o_table = e_table_add(evas);
evas_object_event_callback_add(p->o_table, EVAS_CALLBACK_RESIZE, _pager_resize, p);
- elm_table_homogeneous_set(p->o_table, 1);
+ e_table_homogenous_set(p->o_table, 1);
p->zone = zone;
_pager_fill(p, gc);
pagers = eina_list_append(pagers, p);
@@ -409,6 +409,7 @@ _pager_fill(Pager *p, E_Gadcon *gc)
}
e_zone_desk_count_get(p->zone, &(p->xnum), &(p->ynum));
if (p->ynum != 1) p->invert = EINA_FALSE;
+ e_table_freeze(p->o_table);
for (x = 0; x < p->xnum; x++)
{
for (y = 0; y < p->ynum; y++)
@@ -429,6 +430,7 @@ _pager_fill(Pager *p, E_Gadcon *gc)
}
}
}
+ e_table_thaw(p->o_table);
}
static void
@@ -469,13 +471,11 @@ _pager_desk_new(Pager *p, E_Desk *desk, int xpos, int ypos, Eina_Bool invert)
edje_object_signal_emit(o, "e,name,show", "e");
edje_object_size_min_calc(o, &w, &h);
- evas_object_size_hint_min_set(o, w, h);
- E_EXPAND(o);
- E_FILL(o);
if (invert)
- elm_table_pack(p->o_table, o, ypos, xpos, 1, 1);
+ e_table_pack(p->o_table, o, ypos, xpos, 1, 1);
else
- elm_table_pack(p->o_table, o, xpos, ypos, 1, 1);
+ e_table_pack(p->o_table, o, xpos, ypos, 1, 1);
+ e_table_pack_options_set(o, 1, 1, 1, 1, 0.5, 0.5, w, h, -1, -1);
evo = (Evas_Object *)edje_object_part_object_get(o, "e.eventarea");
if (!evo) evo = o;
diff --git a/src/modules/pager_plain/e_mod_main.c b/src/modules/pager_plain/e_mod_main.c
index b7d3aba23..5fc37142b 100644
--- a/src/modules/pager_plain/e_mod_main.c
+++ b/src/modules/pager_plain/e_mod_main.c
@@ -306,8 +306,8 @@ _pager_new(Evas *evas, E_Zone *zone, E_Gadcon *gc)
p = E_NEW(Pager, 1);
p->inst = NULL;
p->popup = NULL;
- p->o_table = elm_table_add(e_win_evas_win_get(evas));
- elm_table_homogeneous_set(p->o_table, 1);
+ p->o_table = e_table_add(evas);
+ e_table_homogenous_set(p->o_table, 1);
p->zone = zone;
_pager_fill(p, gc);
pagers = eina_list_append(pagers, p);
@@ -356,6 +356,7 @@ _pager_fill(Pager *p, E_Gadcon *gc)
}
e_zone_desk_count_get(p->zone, &(p->xnum), &(p->ynum));
if (p->ynum != 1) p->invert = EINA_FALSE;
+ e_table_freeze(p->o_table);
for (x = 0; x < p->xnum; x++)
{
for (y = 0; y < p->ynum; y++)
@@ -376,6 +377,7 @@ _pager_fill(Pager *p, E_Gadcon *gc)
}
}
}
+ e_table_thaw(p->o_table);
}
static void
@@ -453,13 +455,11 @@ _pager_desk_new(Pager *p, E_Desk *desk, int xpos, int ypos, Eina_Bool invert)
}
edje_object_size_min_calc(o, &w, &h);
- E_EXPAND(o);
- E_FILL(o);
- evas_object_size_hint_min_set(o, w, h);
if (invert)
- elm_table_pack(p->o_table, o, ypos, xpos, 1, 1);
+ e_table_pack(p->o_table, o, ypos, xpos, 1, 1);
else
- elm_table_pack(p->o_table, o, xpos, ypos, 1, 1);
+ e_table_pack(p->o_table, o, xpos, ypos, 1, 1);
+ e_table_pack_options_set(o, 1, 1, 1, 1, 0.5, 0.5, w, h, -1, -1);
evo = (Evas_Object *)edje_object_part_object_get(o, "e.eventarea");
if (!evo) evo = o;
diff --git a/src/modules/quickaccess/e_mod_config.c b/src/modules/quickaccess/e_mod_config.c
index 5db0dc1b7..9a749f6e8 100644
--- a/src/modules/quickaccess/e_mod_config.c
+++ b/src/modules/quickaccess/e_mod_config.c
@@ -237,7 +237,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_
int w, h;
e_dialog_resizable_set(cfd->dia, 1);
- tab = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ tab = e_widget_table_add(evas, 0);
evas_object_name_set(tab, "dia_table");
otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
@@ -252,7 +252,8 @@ _advanced_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_
e_widget_toolbook_page_append(otb, NULL, _("Behavior"), ol, 1, 1, 1, 1, 0.5, 0.5);
/////////////////////////////////////////////////////////////////
- ol = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ol = e_widget_table_add(evas, 0);
+ e_widget_table_freeze(ol);
cfdata->o_list_entry = ob = e_widget_ilist_add(evas, 0, 0, &cfdata->entry);
evas_event_freeze(evas_object_evas_get(ob));
@@ -277,10 +278,12 @@ _advanced_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_
e_widget_table_object_append(ol, ob, 1, 1, 1, 1, 1, 1, 0, 0);
+ e_widget_table_thaw(ol);
e_widget_toolbook_page_append(otb, NULL, _("Entries"), ol, 1, 1, 1, 1, 0.5, 0.5);
/////////////////////////////////////////////////////////////////
- ol = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ ol = e_widget_table_add(evas, 0);
+ e_widget_table_freeze(ol);
cfdata->o_list_transient = ob = e_widget_ilist_add(evas, 0, 0, &cfdata->entry);
evas_event_freeze(evas_object_evas_get(ob));
@@ -304,6 +307,7 @@ _advanced_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_
ob = e_widget_button_add(evas, _("Delete"), "edit-delete", _list_delete, cfdata, cfdata->o_list_transient);
e_widget_table_object_append(ol, ob, 1, 1, 1, 1, 1, 1, 0, 0);
+ e_widget_table_thaw(ol);
e_widget_toolbook_page_append(otb, NULL, _("Transients"), ol, 1, 1, 1, 1, 0.5, 0.5);
/////////////////////////////////////////////////////////////////
@@ -322,7 +326,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dia
e_dialog_resizable_set(cfd->dia, 1);
cfdata->o_list_entry = cfdata->o_list_transient = NULL;
- tab = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ tab = e_widget_table_add(evas, 0);
evas_object_name_set(tab, "dia_table");
otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
diff --git a/src/modules/teamwork/e_mod_config.c b/src/modules/teamwork/e_mod_config.c
index d40ef7b81..ec73bd780 100644
--- a/src/modules/teamwork/e_mod_config.c
+++ b/src/modules/teamwork/e_mod_config.c
@@ -69,7 +69,7 @@ _basic_create_widgets(E_Config_Dialog *cfd EINA_UNUSED,
{
Evas_Object *ob, *ol, *otb, *tab, *oc;
- tab = e_widget_table_add(e_win_evas_win_get(evas), 0);
+ tab = e_widget_table_add(evas, 0);
otb = e_widget_toolbook_add(evas, 48 * e_scale, 48 * e_scale);
diff --git a/src/modules/xkbswitch/e_mod_config.c b/src/modules/xkbswitch/e_mod_config.c
index 36b544d44..07ccdd040 100644
--- a/src/modules/xkbswitch/e_mod_config.c
+++ b/src/modules/xkbswitch/e_mod_config.c
@@ -297,7 +297,7 @@ _basic_create(E_Config_Dialog *cfd EINA_UNUSED, Evas *evas, E_Config_Dialog_Data
cfdata->used_list = configs;
/* Holds the buttons */
- buttons = e_widget_table_add(e_win_evas_win_get(evas), 1);
+ buttons = e_widget_table_add(evas, 1);
cfdata->btn_up = e_widget_button_add(evas, _("Up"), "go-up", _cb_up, cfdata, NULL);
e_widget_disabled_set(cfdata->btn_up, EINA_TRUE);
e_widget_table_object_append(buttons, cfdata->btn_up, 0, 0, 1, 1, 1, 1, 1, 0);