aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorCarsten Haitzler <raster@rasterman.com>2005-11-06 03:40:24 +0000
committerCarsten Haitzler <raster@rasterman.com>2005-11-06 03:40:24 +0000
commit0b320cb218c93579b5e33969d1e1e2868b516392 (patch)
tree17c90fb8db2812e7636df8c763f0aceaeb2921c8 /src
parentilist cd's have some extra params. (diff)
downloadenlightenment-0b320cb218c93579b5e33969d1e1e2868b516392.tar.gz
use elipsis for fileman icons.
some ilist work. more to come. SVN revision: 18327
Diffstat (limited to 'src')
-rw-r--r--src/bin/e_apps.c4
-rw-r--r--src/bin/e_dialog.c23
-rw-r--r--src/bin/e_dialog.h3
-rw-r--r--src/bin/e_file_dialog.c2
-rw-r--r--src/bin/e_icon.c2
-rw-r--r--src/bin/e_scrollframe.c1
-rw-r--r--src/bin/e_test.c18
7 files changed, 47 insertions, 6 deletions
diff --git a/src/bin/e_apps.c b/src/bin/e_apps.c
index 69893dc99..c005d4add 100644
--- a/src/bin/e_apps.c
+++ b/src/bin/e_apps.c
@@ -77,7 +77,7 @@ static Evas_List *_e_apps_start_pending = NULL;
" image: \"%s\" COMP;\n" \
"}\n" \
"collections {\n" \
-" group {\n" \
+" group {\n" \
" name: \"icon\";\n" \
" max: %s %s;\n" \
" parts {\n" \
@@ -1430,7 +1430,7 @@ _e_app_cb_monitor(void *data, Ecore_File_Monitor *em,
if (!app->scanned)
return;
- file = ecore_file_get_file((char *)path);
+ file = (char *)ecore_file_get_file((char *)path);
if (!strcmp(file, ".order"))
{
if ((event == ECORE_FILE_EVENT_CREATED_FILE)
diff --git a/src/bin/e_dialog.c b/src/bin/e_dialog.c
index 8585cab6b..4b4fba8dc 100644
--- a/src/bin/e_dialog.c
+++ b/src/bin/e_dialog.c
@@ -151,6 +151,24 @@ e_dialog_content_set(E_Dialog *dia, Evas_Object *obj, Evas_Coord minw, Evas_Coor
}
void
+e_dialog_resizable_set(E_Dialog *dia, int resizable)
+{
+ dia->resizable = resizable;
+ if (dia->win)
+ {
+ if (resizable)
+ {
+ e_win_size_max_set(dia->win, 99999, 99999);
+ }
+ else
+ {
+ e_win_resize(dia->win, dia->min_w, dia->min_h);
+ e_win_size_max_set(dia->win, dia->min_w, dia->min_h);
+ }
+ }
+}
+
+void
e_dialog_show(E_Dialog *dia)
{
Evas_Coord mw, mh;
@@ -173,7 +191,10 @@ e_dialog_show(E_Dialog *dia)
evas_object_resize(dia->bg_object, mw, mh);
e_win_resize(dia->win, mw, mh);
e_win_size_min_set(dia->win, mw, mh);
- e_win_size_max_set(dia->win, mw, mh);
+ dia->min_w = mw;
+ dia->min_h = mh;
+ if (!dia->resizable) e_win_size_max_set(dia->win, mw, mh);
+ else e_win_size_max_set(dia->win, 99999, 99999);
e_win_show(dia->win);
if (!e_widget_focus_get(dia->box_object))
diff --git a/src/bin/e_dialog.h b/src/bin/e_dialog.h
index 6f4a0fabf..12c1540c4 100644
--- a/src/bin/e_dialog.h
+++ b/src/bin/e_dialog.h
@@ -25,6 +25,8 @@ struct _E_Dialog
Evas_Object *event_object;
Evas_List *buttons;
void *data;
+ int min_w, min_h;
+ unsigned char resizable : 1;
};
EAPI E_Dialog *e_dialog_new (E_Container *con);
@@ -35,6 +37,7 @@ EAPI void e_dialog_title_set (E_Dialog *dia, char *title);
EAPI void e_dialog_text_set (E_Dialog *dia, char *text);
EAPI void e_dialog_icon_set (E_Dialog *dia, char *icon, Evas_Coord size);
EAPI void e_dialog_content_set (E_Dialog *dia, Evas_Object *obj, Evas_Coord minw, Evas_Coord minh);
+EAPI void e_dialog_resizable_set (E_Dialog *dia, int resizable);
EAPI void e_dialog_show (E_Dialog *dia);
#endif
diff --git a/src/bin/e_file_dialog.c b/src/bin/e_file_dialog.c
index 7a2e3bf2c..dff741c7f 100644
--- a/src/bin/e_file_dialog.c
+++ b/src/bin/e_file_dialog.c
@@ -69,8 +69,8 @@ e_file_dialog_new(E_Container *con)
void
e_file_dialog_show(E_File_Dialog *dia)
{
+ e_dialog_resizable_set(dia->dia, 1);
e_dialog_show(dia->dia);
- e_win_size_max_set(dia->dia->win, 9999, 9999);
}
void
diff --git a/src/bin/e_icon.c b/src/bin/e_icon.c
index 1acb69815..9c9b391fa 100644
--- a/src/bin/e_icon.c
+++ b/src/bin/e_icon.c
@@ -80,7 +80,7 @@ e_icon_file_get(Evas_Object *obj)
sd = evas_object_smart_data_get(obj);
if (!strcmp(evas_object_type_get(sd->obj), "edje"))
{
- edje_object_file_get(sd->obj, &file, NULL);
+ edje_object_file_get(sd->obj, (const char **)&file, NULL);
return file;
}
evas_object_image_file_get(sd->obj, &file, NULL);
diff --git a/src/bin/e_scrollframe.c b/src/bin/e_scrollframe.c
index e0b1e290c..d94e5c832 100644
--- a/src/bin/e_scrollframe.c
+++ b/src/bin/e_scrollframe.c
@@ -217,6 +217,7 @@ void
e_scrollframe_child_viewport_size_get(Evas_Object *obj, Evas_Coord *w, Evas_Coord *h)
{
API_ENTRY return;
+ edje_object_calc_force(sd->edje_obj);
evas_object_geometry_get(sd->pan_obj, NULL, NULL, w, h);
}
diff --git a/src/bin/e_test.c b/src/bin/e_test.c
index 9ebb28b2a..fd73df999 100644
--- a/src/bin/e_test.c
+++ b/src/bin/e_test.c
@@ -411,6 +411,20 @@ _e_test_sel(void *data, void *data2)
}
static void
+_e_test_resize(void *data, Evas *e, Evas_Object *obj, void *event_info)
+{
+ Evas_Coord mw, mh, vw, vh, w, h;
+
+ e_scrollframe_child_viewport_size_get(obj, &vw, &vh);
+ e_ilist_min_size_get(data, &mw, &mh);
+ evas_object_geometry_get(data, NULL, NULL, &w, &h);
+ if (vw >= mw)
+ {
+ if (w != vw) evas_object_resize(data, vw, h);
+ }
+}
+
+static void
_e_test_internal(E_Container *con)
{
E_Dialog *dia;
@@ -464,14 +478,16 @@ _e_test_internal(E_Container *con)
evas_object_show(o);
o2 = e_scrollframe_add(dia->win->evas);
+ evas_object_event_callback_add(o2, EVAS_CALLBACK_RESIZE, _e_test_resize, o);
evas_object_resize(o2, mw, 150);
evas_object_show(o2);
e_scrollframe_child_set(o2, o);
e_scrollframe_child_viewport_size_get(o2, &vw, &vh);
- e_dialog_content_set(dia, o2, mw + (mw - vw), 150);
+ e_dialog_content_set(dia, o2, 200, 150);
e_dialog_button_add(dia, "OK", NULL, NULL, NULL);
e_win_centered_set(dia->win, 1);
+ e_dialog_resizable_set(dia, 1);
e_dialog_show(dia);
tmp.ilist = o;