You can subscribe to this list here.
| 2007 |
Jan
|
Feb
(6) |
Mar
(51) |
Apr
(27) |
May
(9) |
Jun
(8) |
Jul
(27) |
Aug
(8) |
Sep
(25) |
Oct
(5) |
Nov
(9) |
Dec
|
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(25) |
Feb
|
Mar
|
Apr
(34) |
May
(123) |
Jun
(60) |
Jul
(61) |
Aug
(13) |
Sep
|
Oct
|
Nov
(29) |
Dec
(27) |
| 2009 |
Jan
(19) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <do...@us...> - 2009-01-31 10:21:08
|
Revision: 548
http://enna.svn.sourceforge.net/enna/?rev=548&view=rev
Author: doursse
Date: 2009-01-31 10:21:03 +0000 (Sat, 31 Jan 2009)
Log Message:
-----------
formatting
Modified Paths:
--------------
trunk/wall-e/src/bin/wall.c
Modified: trunk/wall-e/src/bin/wall.c
===================================================================
--- trunk/wall-e/src/bin/wall.c 2009-01-31 10:11:41 UTC (rev 547)
+++ trunk/wall-e/src/bin/wall.c 2009-01-31 10:21:03 UTC (rev 548)
@@ -340,25 +340,26 @@
evas_object_del(priv->o_box);
EINA_LIST_FOREACH(priv->o_boxes, l, box)
{
- evas_object_del(box);
+ evas_object_del(box);
}
while(priv->items)
{
Walle_Picture_Item *pi;
- Evas_List *items;
- items = priv->items->data;
- priv->items = eina_list_remove_list(priv->items, priv->items);
- while(items)
- {
- pi = items->data;
- items = eina_list_remove_list(items, items);
- evas_object_del(pi->o_edje);
- evas_object_image_preload(pi->o_pict, 1);
- evas_object_del(pi->o_pict);
- free(pi);
- }
- eina_list_free(items);
+ Evas_List *items;
+
+ items = priv->items->data;
+ priv->items = eina_list_remove_list(priv->items, priv->items);
+ while(items)
+ {
+ pi = items->data;
+ items = eina_list_remove_list(items, items);
+ evas_object_del(pi->o_edje);
+ evas_object_image_preload(pi->o_pict, 1);
+ evas_object_del(pi->o_pict);
+ free(pi);
+ }
+ eina_list_free(items);
}
eina_list_free(priv->items);
free(priv);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2009-01-31 10:11:51
|
Revision: 547
http://enna.svn.sourceforge.net/enna/?rev=547&view=rev
Author: captainigloo
Date: 2009-01-31 10:11:41 +0000 (Sat, 31 Jan 2009)
Log Message:
-----------
* Fix segv on exit
* Fix a (big) bug in wall items creation
* printf--
Modified Paths:
--------------
trunk/wall-e/src/bin/wall.c
Modified: trunk/wall-e/src/bin/wall.c
===================================================================
--- trunk/wall-e/src/bin/wall.c 2009-01-28 22:39:41 UTC (rev 546)
+++ trunk/wall-e/src/bin/wall.c 2009-01-31 10:11:41 UTC (rev 547)
@@ -300,7 +300,6 @@
if (!pi) return;
- printf("Preload Cb\n");
edje_object_part_swallow(pi->o_edje, "walle.swallow.content", pi->o_pict);
evas_object_show(pi->o_pict);
edje_object_signal_emit(pi->o_edje, "walle,loading,stop", "walle");
@@ -340,18 +339,26 @@
evas_object_del(priv->o_box);
EINA_LIST_FOREACH(priv->o_boxes, l, box)
+ {
evas_object_del(box);
+ }
while(priv->items)
{
Walle_Picture_Item *pi;
-
- pi = (Walle_Picture_Item *)eina_list_data_get(priv->items);
- evas_object_del(pi->o_edje);
- evas_object_image_preload(pi->o_pict, 1);
- evas_object_del(pi->o_pict);
- free(pi);
+ Evas_List *items;
+ items = priv->items->data;
priv->items = eina_list_remove_list(priv->items, priv->items);
+ while(items)
+ {
+ pi = items->data;
+ items = eina_list_remove_list(items, items);
+ evas_object_del(pi->o_edje);
+ evas_object_image_preload(pi->o_pict, 1);
+ evas_object_del(pi->o_pict);
+ free(pi);
+ }
+ eina_list_free(items);
}
eina_list_free(priv->items);
free(priv);
@@ -432,7 +439,6 @@
items = eina_list_append(items, pi);
}
- priv->items = eina_list_append(priv->items, items);
priv->nb_items ++;
evas_object_event_callback_add(pi->o_edje, EVAS_CALLBACK_MOUSE_DOWN,
_wall_event_mouse_down_cb, pi);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2009-01-28 22:39:45
|
Revision: 546
http://enna.svn.sourceforge.net/enna/?rev=546&view=rev
Author: captainigloo
Date: 2009-01-28 22:39:41 +0000 (Wed, 28 Jan 2009)
Log Message:
-----------
cosmetic
Modified Paths:
--------------
trunk/wall-e/src/bin/walle.c
Modified: trunk/wall-e/src/bin/walle.c
===================================================================
--- trunk/wall-e/src/bin/walle.c 2009-01-28 22:38:54 UTC (rev 545)
+++ trunk/wall-e/src/bin/walle.c 2009-01-28 22:39:41 UTC (rev 546)
@@ -67,12 +67,8 @@
Walle *walle = data;
Evas_Coord ow, oh;
- printf("Scroller Resize, hint min size of wall\n");
evas_object_geometry_get(walle->o_scroll, NULL, NULL, &ow, &oh);
- //evas_object_size_hint_min_get(walle->o_scroll, &ow, &oh);
- printf("sizing eval %d %d\n", ow, oh);
evas_object_size_hint_min_set(walle->o_wall, ow, oh);
-
}
static void _walle_wall_populate(Walle *walle, const char *directory, const char *theme)
@@ -348,7 +344,7 @@
o = walle_wall_add(walle->evas);
walle_wall_lines_set(o, walle->config.lines);
elm_scroller_content_set(walle->o_scroll, o);
- evas_object_event_callback_add(walle->o_scroll, EVAS_CALLBACK_RESIZE, _walle_wall_cb_changed_size_hints, walle);
+ evas_object_event_callback_add(walle->o_scroll, EVAS_CALLBACK_RESIZE, _walle_wall_cb_resize, walle);
walle->o_wall = o;
_walle_wall_populate(walle, walle->config.path, walle->config.theme);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2009-01-28 22:39:04
|
Revision: 545
http://enna.svn.sourceforge.net/enna/?rev=545&view=rev
Author: captainigloo
Date: 2009-01-28 22:38:54 +0000 (Wed, 28 Jan 2009)
Log Message:
-----------
Add cb on scroller resize
Modified Paths:
--------------
trunk/wall-e/src/bin/walle.c
Modified: trunk/wall-e/src/bin/walle.c
===================================================================
--- trunk/wall-e/src/bin/walle.c 2009-01-28 18:52:23 UTC (rev 544)
+++ trunk/wall-e/src/bin/walle.c 2009-01-28 22:38:54 UTC (rev 545)
@@ -62,6 +62,19 @@
evas_object_image_fill_set(o_pict, 0, 0, width, height);
}
+static void _walle_wall_cb_resize(void *data, Evas *e, Evas_Object *obj, void *einfo)
+{
+ Walle *walle = data;
+ Evas_Coord ow, oh;
+
+ printf("Scroller Resize, hint min size of wall\n");
+ evas_object_geometry_get(walle->o_scroll, NULL, NULL, &ow, &oh);
+ //evas_object_size_hint_min_get(walle->o_scroll, &ow, &oh);
+ printf("sizing eval %d %d\n", ow, oh);
+ evas_object_size_hint_min_set(walle->o_wall, ow, oh);
+
+}
+
static void _walle_wall_populate(Walle *walle, const char *directory, const char *theme)
{
Evas_Object *o;
@@ -335,6 +348,7 @@
o = walle_wall_add(walle->evas);
walle_wall_lines_set(o, walle->config.lines);
elm_scroller_content_set(walle->o_scroll, o);
+ evas_object_event_callback_add(walle->o_scroll, EVAS_CALLBACK_RESIZE, _walle_wall_cb_changed_size_hints, walle);
walle->o_wall = o;
_walle_wall_populate(walle, walle->config.path, walle->config.theme);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2009-01-28 18:52:28
|
Revision: 544
http://enna.svn.sourceforge.net/enna/?rev=544&view=rev
Author: doursse
Date: 2009-01-28 18:52:23 +0000 (Wed, 28 Jan 2009)
Log Message:
-----------
update TODO
Modified Paths:
--------------
trunk/wall-e/TODO
Modified: trunk/wall-e/TODO
===================================================================
--- trunk/wall-e/TODO 2009-01-28 18:46:15 UTC (rev 543)
+++ trunk/wall-e/TODO 2009-01-28 18:52:23 UTC (rev 544)
@@ -3,9 +3,9 @@
Features:
---------
-* notification:
- when a file is added, try to load it and add it if
- it's an image
+* resize: adapt the size of the lines
+* fullscreen when an image is selected
+* config file with ecore_config
Actions:
--------
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2009-01-28 18:46:18
|
Revision: 543
http://enna.svn.sourceforge.net/enna/?rev=543&view=rev
Author: doursse
Date: 2009-01-28 18:46:15 +0000 (Wed, 28 Jan 2009)
Log Message:
-----------
add notification: when you add an image file to the directory,
that file is automatically added to the wall
Modified Paths:
--------------
trunk/wall-e/src/bin/wall-e.h
trunk/wall-e/src/bin/walle.c
Modified: trunk/wall-e/src/bin/wall-e.h
===================================================================
--- trunk/wall-e/src/bin/wall-e.h 2009-01-28 18:27:07 UTC (rev 542)
+++ trunk/wall-e/src/bin/wall-e.h 2009-01-28 18:46:15 UTC (rev 543)
@@ -18,6 +18,7 @@
Evas_Object *o_scroll;
Evas_Object *o_toolbar;
Eina_List *pictures;
+ Ecore_File_Monitor *monitor;
};
Walle *walle_init(int argc, char **argv);
Modified: trunk/wall-e/src/bin/walle.c
===================================================================
--- trunk/wall-e/src/bin/walle.c 2009-01-28 18:27:07 UTC (rev 542)
+++ trunk/wall-e/src/bin/walle.c 2009-01-28 18:46:15 UTC (rev 543)
@@ -60,7 +60,6 @@
/* callback when a picture is resized */
evas_object_geometry_get(o_pict, NULL, NULL, &width, &height);
evas_object_image_fill_set(o_pict, 0, 0, width, height);
-
}
static void _walle_wall_populate(Walle *walle, const char *directory, const char *theme)
@@ -80,7 +79,6 @@
file = ecore_list_first_goto(files);
while ((file = (char *)ecore_list_next(files)) != NULL)
{
-
sprintf(filename, "%s/%s", directory, file);
o = evas_object_image_add(walle->evas);
evas_object_image_file_set(o, filename, NULL);
@@ -103,11 +101,50 @@
default:
evas_object_del(o);
break;
+ }
+ }
+ ecore_list_destroy(files);
+}
+static void
+_walle_monitor_cb(void *data,
+ Ecore_File_Monitor *em,
+ Ecore_File_Event event,
+ const char *path)
+{
+ Walle *walle;
+
+ walle = (Walle *)data;
+
+ if (event == ECORE_FILE_EVENT_CREATED_FILE)
+ {
+ Evas_Object *o;
+ Evas_Coord ow, oh, w, h;
+
+ o = evas_object_image_add(walle->evas);
+ evas_object_image_file_set(o, path, NULL);
+ switch(evas_object_image_load_error_get(o))
+ {
+ case EVAS_LOAD_ERROR_NONE:
+ {
+ evas_object_event_callback_add(o, EVAS_CALLBACK_RESIZE, _walle_picture_cb_resize, o);
+ evas_object_image_size_get(o, &w, &h);
+ oh = 200;
+ ow = oh * (float)w/(float)h;
+ evas_object_image_load_size_set(o, ow, oh);
+ evas_object_image_fill_set(o, 0, 0, ow, oh);
+ evas_object_resize(o, ow, oh);
+ evas_object_size_hint_min_set(o, ow, oh);
+ walle_wall_append(walle->o_wall, o);
+ walle->pictures = eina_list_append(walle->pictures, o);
}
+ break;
+ default:
+ evas_object_del(o);
+ break;
+ }
}
- ecore_list_destroy(files);
}
@@ -230,6 +267,7 @@
free(walle->config.engine);
free(walle->config.path);
free(walle->config.theme);
+ ecore_file_monitor_del(walle->monitor);
free(walle);
}
@@ -238,10 +276,20 @@
{
Evas_Object *o;
+ /* monitoring */
+ walle->monitor = ecore_file_monitor_add(walle->config.path,
+ _walle_monitor_cb,
+ walle);
+ if (!walle->monitor)
+ return 0;
+
/* main window */
o = elm_win_add(NULL, "Wall-E", ELM_WIN_BASIC);
if (!o)
+ {
+ ecore_file_monitor_del(walle->monitor);
return 0;
+ }
elm_win_title_set(o, "Wall-E");
evas_object_smart_callback_add(o, "delete-request", _walle_win_del_cb, NULL);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2009-01-28 18:27:11
|
Revision: 542
http://enna.svn.sourceforge.net/enna/?rev=542&view=rev
Author: doursse
Date: 2009-01-28 18:27:07 +0000 (Wed, 28 Jan 2009)
Log Message:
-----------
fix loops
there is still an invalid free reported by valgrind
Modified Paths:
--------------
trunk/wall-e/src/bin/wall.c
Modified: trunk/wall-e/src/bin/wall.c
===================================================================
--- trunk/wall-e/src/bin/wall.c 2009-01-28 08:07:13 UTC (rev 541)
+++ trunk/wall-e/src/bin/wall.c 2009-01-28 18:27:07 UTC (rev 542)
@@ -169,9 +169,9 @@
void
walle_wall_lines_set(Evas_Object *obj, int nb_lines)
{
- Eina_List *l;
+ Eina_List *l;
Evas_Object *o_box;
- int i;
+ int i;
WALLE_WALL_DATA_GET_OR_RETURN(obj, priv);
@@ -180,12 +180,14 @@
priv->nb_lines = nb_lines;
- EINA_LIST_FOREACH(priv->o_boxes, l, o_box)
+ while (priv->o_boxes)
{
+ o_box = (Evas_Object *)eina_list_data_get(priv->o_boxes);
evas_object_del(o_box);
- priv->o_boxes = eina_list_remove(priv->o_boxes, o_box);
+ priv->o_boxes = eina_list_remove_list(priv->o_boxes, priv->o_boxes);
}
+ /* FIXME: should we destroy the list too ? */
priv->o_boxes = NULL;
for (i = 0; i < nb_lines; i++)
@@ -199,23 +201,28 @@
priv->o_boxes = eina_list_append(priv->o_boxes, o_box);
evas_object_show(o_box);
}
-
-
}
-static Walle_Picture_Item *_wall_selected_item_get( Walle_Wall_Data *priv, int *row,
- int *col)
+static Walle_Picture_Item *_wall_selected_item_get( Walle_Wall_Data *priv, int *row, int *col)
{
- Eina_List *l, *l2;
- int i, j;
+ Eina_List *l1;
+ Eina_List *items1;
+ int i;
+ int j;
- for (l = priv->items, i = 0; l; l = l->next, i++)
+ i = 0;
+ EINA_LIST_FOREACH(priv->items, l1, items1)
{
- Eina_List *items = l->data;
- for (l2 = items, j = 0; l2; l2 = l2->next, j++)
+ Eina_List *l2;
+ Eina_List *items2;
+
+ j = 0;
+ EINA_LIST_FOREACH(items1, l2, items2)
{
- Walle_Picture_Item *pi = l2->data;
+ Walle_Picture_Item *pi;
+
+ pi = (Walle_Picture_Item *)items2;
if (pi->selected)
{
if (row)
@@ -224,7 +231,9 @@
*col = j;
return pi;
}
+ j++;
}
+ i++;
}
if (row)
*row = -1;
@@ -240,7 +249,6 @@
return;
pi->selected = 0;
edje_object_signal_emit(pi->o_edje, "unselect", "walle");
-
}
static void _wall_item_select(Walle_Wall_Data *priv, Walle_Picture_Item *pi)
@@ -326,7 +334,6 @@
_wall_smart_del(Evas_Object *o)
{
Evas_Object *box;
- Walle_Picture_Item *pi;
Eina_List *l;
WALLE_WALL_DATA_GET(o, priv);
@@ -335,13 +342,16 @@
EINA_LIST_FOREACH(priv->o_boxes, l, box)
evas_object_del(box);
- EINA_LIST_FOREACH(priv->items, l, pi)
+ while(priv->items)
{
+ Walle_Picture_Item *pi;
+
+ pi = (Walle_Picture_Item *)eina_list_data_get(priv->items);
evas_object_del(pi->o_edje);
evas_object_image_preload(pi->o_pict, 1);
evas_object_del(pi->o_pict);
- priv->items = evas_list_remove(priv->items, pi);
free(pi);
+ priv->items = eina_list_remove_list(priv->items, priv->items);
}
eina_list_free(priv->items);
free(priv);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2009-01-28 08:07:20
|
Revision: 541
http://enna.svn.sourceforge.net/enna/?rev=541&view=rev
Author: doursse
Date: 2009-01-28 08:07:13 +0000 (Wed, 28 Jan 2009)
Log Message:
-----------
* factorize a bit the code (move walle init and set up to its own file)
* remove deletion of evas objects (useless, evas deletes them automatically)
Modified Paths:
--------------
trunk/wall-e/src/bin/Makefile.am
trunk/wall-e/src/bin/main.c
trunk/wall-e/src/bin/wall-e.h
Added Paths:
-----------
trunk/wall-e/src/bin/walle.c
Modified: trunk/wall-e/src/bin/Makefile.am
===================================================================
--- trunk/wall-e/src/bin/Makefile.am 2009-01-27 18:00:28 UTC (rev 540)
+++ trunk/wall-e/src/bin/Makefile.am 2009-01-28 08:07:13 UTC (rev 541)
@@ -4,7 +4,8 @@
wall_e_SOURCES = \
main.c \
-wall.c
+wall.c \
+walle.c
wall_e_CPPFLAGS = \
-I$(top_srcdir) \
Modified: trunk/wall-e/src/bin/main.c
===================================================================
--- trunk/wall-e/src/bin/main.c 2009-01-27 18:00:28 UTC (rev 540)
+++ trunk/wall-e/src/bin/main.c 2009-01-28 08:07:13 UTC (rev 541)
@@ -7,9 +7,8 @@
#include <string.h>
#include <Ecore.h>
-#include <Ecore_Data.h>
-#include <Ecore_File.h>
#include <Ecore_Evas.h>
+#include <Ecore_File.h>
#include <Edje.h>
#include <Elementary.h>
@@ -17,151 +16,25 @@
#include "wall-e.h"
#include "wall.h"
-static const Ecore_Getopt options = {
- "wall-e",
- "%prog [options]",
- "0.1.0",
- "(C) 2008 Enlightenment",
- "BSD\nThis is a 3 clause bsd bla bla",
- "a simple image viewer using enlightenment foundation libraries.\n"
- "Here is the text of the licence",
- 1,
- {
- ECORE_GETOPT_STORE_STR('e', "engine", "ecore-evas engine to use"),
- ECORE_GETOPT_CALLBACK_NOARGS('E', "list-engines", "list ecore-evas engines",
- ecore_getopt_callback_ecore_evas_list_engines, NULL),
- ECORE_GETOPT_STORE_DEF_BOOL('F', "fullscreen", "fullscreen mode", 0),
- ECORE_GETOPT_CALLBACK_ARGS('g', "geometry", "geometry to use in x:y:w:h form.", "X:Y:W:H",
- ecore_getopt_callback_geometry_parse, NULL),
- ECORE_GETOPT_STORE_STR('p', "path", "path to read the image files from"),
- ECORE_GETOPT_STORE_STR('t', "theme", "path to read the theme file from"),
- ECORE_GETOPT_STORE_INT('f', "fps", "frame per second"),
- ECORE_GETOPT_STORE_INT('l', "lines", "Number of lines to display"),
- ECORE_GETOPT_COUNT('v', "verbose", "be more verbose"),
- ECORE_GETOPT_VERSION('V', "version"),
- ECORE_GETOPT_COPYRIGHT('R', "copyright"),
- ECORE_GETOPT_LICENSE('L', "license"),
- ECORE_GETOPT_HELP('h', "help"),
- ECORE_GETOPT_SENTINEL
- }
-};
-
-static void _walle_win_del_cb(void *data, Evas_Object *obj, void *event_info)
-{
- elm_exit();
-}
-
static void _walle_wall_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *einfo)
{
Walle *walle;
- Evas_Coord x,y,w,h;
+ Evas_Coord w,h;
walle = data;
evas_object_geometry_get(walle->o_wall, NULL, NULL, NULL, &h);
evas_object_size_hint_min_get(walle->o_wall, &w, NULL);
evas_object_resize(walle->o_wall, w, h);
- }
-
-static void _walle_picture_cb_resize(void *data, Evas *e, Evas_Object *obj, void *einfo)
-{
- Evas_Coord w = 0, h = 0;
- Evas_Object *o_pict = data;
- /* callback when a picture is resized */
- evas_object_geometry_get(o_pict, NULL, NULL, &w, &h);
- evas_object_image_fill_set(o_pict, 0, 0, w, h);
-
}
-static void _populate_wall(Walle *walle, const char *directory, const char *theme)
-{
- Evas_Object *o;
- Evas_Coord ow, oh, w, h;
- Ecore_List *files = NULL;
- char *file = NULL;
- char filename[4096];
-
- if (!ecore_file_is_dir(directory) && ecore_file_dir_is_empty(directory))
- return;
- files = ecore_file_ls(directory);
- if (!files)
- return;
- ecore_list_sort(files, ECORE_COMPARE_CB(strcasecmp), ECORE_SORT_MIN);
- file = ecore_list_first_goto(files);
- while ((file = (char *)ecore_list_next(files)) != NULL)
- {
-
- sprintf(filename, "%s/%s", directory, file);
- o = evas_object_image_add(walle->evas);
- evas_object_image_file_set(o, filename, NULL);
- switch(evas_object_image_load_error_get(o))
- {
- case EVAS_LOAD_ERROR_NONE:
- {
- evas_object_event_callback_add(o, EVAS_CALLBACK_RESIZE, _walle_picture_cb_resize, o);
- evas_object_image_size_get(o, &w, &h);
- oh = 200;
- ow = oh * (float)w/(float)h;
- evas_object_image_load_size_set(o, ow, oh);
- evas_object_image_fill_set(o, 0, 0, ow, oh);
- evas_object_resize(o, ow, oh);
- evas_object_size_hint_min_set(o, ow, oh);
- walle_wall_append(walle->o_wall, o);
- walle->pictures = eina_list_append(walle->pictures, o);
- }
- break;
- default:
- evas_object_del(o);
- break;
-
- }
-
- }
- ecore_list_destroy(files);
-}
-
int
main(int argc, char *argv[])
{
- Eina_Rectangle geometry = {0, 0, 0, 0};
- Eina_List *l;
- Walle *walle = NULL;
- Evas_Object *o;
- char *engine = NULL;
- char *path = NULL;
- char *theme = NULL;
- int fps = 0;
- int lines = 2;
- int verbose = 0;
- unsigned char engines_listed = 0;
- unsigned char is_fullscreen = 0;
- unsigned char help = 0;
- int args;
- int i;
- Evas_Coord x,y,w,h;
- Ecore_Getopt_Value values[] = {
- ECORE_GETOPT_VALUE_STR(engine),
- ECORE_GETOPT_VALUE_BOOL(engines_listed),
- ECORE_GETOPT_VALUE_BOOL(is_fullscreen),
- ECORE_GETOPT_VALUE_PTR_CAST(geometry),
- ECORE_GETOPT_VALUE_STR(path),
- ECORE_GETOPT_VALUE_STR(theme),
- ECORE_GETOPT_VALUE_INT(fps),
- ECORE_GETOPT_VALUE_INT(lines),
- ECORE_GETOPT_VALUE_INT(verbose),
- ECORE_GETOPT_VALUE_NONE,
- ECORE_GETOPT_VALUE_NONE,
- ECORE_GETOPT_VALUE_NONE,
- ECORE_GETOPT_VALUE_BOOL(help),
- ECORE_GETOPT_VALUE_NONE
- };
+ Walle *walle;
- walle = (Walle*)calloc(1, sizeof(Walle));
- if (!walle)
- return EXIT_FAILURE;
-
if (!ecore_evas_init())
- goto free_walle;
+ return EXIT_FAILURE;
if (!ecore_file_init())
goto shutdown_ecore_evas;
@@ -171,149 +44,33 @@
elm_init(argc, argv);
+ walle = walle_init(argc, argv);
+ if (!walle)
+ goto shutdown_elm;
- ecore_app_args_set(argc, (const char **)argv);
+ if (!walle_gui_set(walle))
+ goto shutdown_walle;
- args = ecore_getopt_parse(&options, values, argc, argv);
- if (args < 0)
- {
- fputs("ERROR: could not parse options.\n", stderr);
- goto shutdown_edje;
- }
-
- if (help)
- goto shutdown_edje;
-
- if (engines_listed)
- goto shutdown_edje;
-
- if (is_fullscreen &&
- ((geometry.x != 0) ||
- (geometry.y != 0) ||
- (geometry.w != 0) ||
- (geometry.h != 0)))
- {
- fputs("ERROR: could not set fulllscreen and geometry at same time.\n", stderr);
- goto shutdown_edje;
- }
-
- if (!is_fullscreen &&
- (geometry.x == 0) &&
- (geometry.y == 0) &&
- (geometry.w == 0) &&
- (geometry.h == 0))
- {
- geometry.w = 640;
- geometry.h = 480;
- }
-
- if (!path)
- goto shutdown_edje;
-
- if (!theme)
- {
- theme = getenv("WALLE_THEME");
- if (!theme)
- theme = PACKAGE_DATA_DIR "/data/default.edj";
- }
-
- if (fps != 0)
- ecore_animator_frametime_set(1.0 / (double)fps);
-
- walle->app_w = geometry.w;
- walle->app_h = geometry.h;
-
- walle->o_win = elm_win_add(NULL, "Wall-E", ELM_WIN_BASIC);
- /* Retrieve Evas frome Main Window */
- walle->evas = evas_object_evas_get(walle->o_win);
-
- /* Set Delete window callbak */
- evas_object_smart_callback_add(walle->o_win, "delete-request", _walle_win_del_cb, NULL);
- /* Set Window Title */
- elm_win_title_set(walle->o_win, "Wall-E");
-
-
- /* Create main edje object */
- o = edje_object_add(walle->evas);
- edje_object_file_set(o, theme, "wall-e");
- evas_object_show(o);
- evas_object_size_hint_weight_set(o, 1.0, 1.0);
- walle->o_edje = o;
-
-
- /* Resize win with app_w et app_h */
- elm_win_resize_object_add(walle->o_win, walle->o_edje);
- evas_object_resize(walle->o_edje, walle->app_w, walle->app_h);
-
-
- o = elm_scroller_add(walle->o_win);
- evas_object_show(o);
- edje_object_part_swallow(walle->o_edje, "walle.swallow.content", o);
- walle->o_scroll = o;
-
- o = elm_toolbar_add(walle->o_win);
- evas_object_size_hint_weight_set(o, 0.0, 0.0);
- evas_object_size_hint_align_set(o, -1.0, 0.0);
-
- walle->o_toolbar = o;
-
- o = elm_icon_add(walle->o_win);
- elm_icon_file_set(o, theme, "walle/icon/resize");
- elm_toolbar_item_add(walle->o_toolbar, o, "Resize", NULL, NULL);
-
- o = elm_icon_add(walle->o_win);
- elm_icon_file_set(o, theme, "walle/icon/rotate");
- elm_toolbar_item_add(walle->o_toolbar, o, "Rotate", NULL, NULL);
-
- o = elm_icon_add(walle->o_win);
- elm_icon_file_set(o, theme, "walle/icon/config");
- elm_toolbar_item_add(walle->o_toolbar, o, "Configuration", NULL, NULL);
-
-
- evas_object_size_hint_min_set(walle->o_toolbar, -1, -1);
- edje_object_part_swallow(walle->o_edje, "walle.swallow.toolbar", walle->o_toolbar);
-
- o = walle_wall_add(walle->evas);
- walle_wall_lines_set(o, lines);
- walle->o_wall = o;
-
- _populate_wall(walle, path, theme);
-
- elm_scroller_content_set(walle->o_scroll, o);
-
- /* Finally show window */
- evas_object_resize(walle->o_win, 600, 480);
- evas_object_show(walle->o_win);
-
elm_run();
- /* Free all object created */
- evas_object_del(walle->o_edje);
- evas_object_del(walle->o_toolbar);
- evas_object_del(walle->o_wall);
-
- EINA_LIST_FOREACH(walle->pictures, l, o)
- {
- evas_object_del(o);
- }
-
+ walle_shutdown(walle);
elm_shutdown();
edje_shutdown();
ecore_file_shutdown();
ecore_evas_shutdown();
- free(walle);
-
return EXIT_SUCCESS;
+ shutdown_walle:
+ walle_shutdown(walle);
+ shutdown_elm:
+ elm_shutdown();
shutdown_edje:
edje_shutdown();
shutdown_ecore_file:
ecore_file_shutdown();
shutdown_ecore_evas:
ecore_evas_shutdown();
- free_walle:
- free(walle);
return EXIT_FAILURE;
}
Modified: trunk/wall-e/src/bin/wall-e.h
===================================================================
--- trunk/wall-e/src/bin/wall-e.h 2009-01-27 18:00:28 UTC (rev 540)
+++ trunk/wall-e/src/bin/wall-e.h 2009-01-28 08:07:13 UTC (rev 541)
@@ -2,12 +2,26 @@
struct _Walle
{
- Evas *evas;
+ struct {
+ char *engine;
+ char *path;
+ char *theme;
+ Evas_Coord width;
+ Evas_Coord height;
+ int fps;
+ int lines;
+ } config;
+ Evas *evas;
Evas_Object *o_win;
Evas_Object *o_edje;
Evas_Object *o_wall;
Evas_Object *o_scroll;
Evas_Object *o_toolbar;
- Evas_Coord app_w, app_h;
- Eina_List *pictures;
+ Eina_List *pictures;
};
+
+Walle *walle_init(int argc, char **argv);
+
+void walle_shutdown(Walle *walle);
+
+int walle_gui_set(Walle *walle);
Added: trunk/wall-e/src/bin/walle.c
===================================================================
--- trunk/wall-e/src/bin/walle.c (rev 0)
+++ trunk/wall-e/src/bin/walle.c 2009-01-28 08:07:13 UTC (rev 541)
@@ -0,0 +1,299 @@
+#ifdef HAVE_CONFIG_H
+# include <config.h>
+#endif
+
+
+#include <stdlib.h>
+
+#include <Ecore_Data.h>
+#include <Ecore_Getopt.h>
+#include <Ecore_File.h>
+
+#include <Elementary.h>
+
+#include "wall-e.h"
+#include "wall.h"
+
+static const Ecore_Getopt options = {
+ "wall-e",
+ "%prog [options]",
+ "0.1.0",
+ "(C) 2008 Enlightenment",
+ "BSD\nThis is a 3 clause bsd bla bla",
+ "a simple image viewer using enlightenment foundation libraries.\n"
+ "Here is the text of the licence",
+ 1,
+ {
+ ECORE_GETOPT_STORE_STR('e', "engine", "ecore-evas engine to use"),
+ ECORE_GETOPT_CALLBACK_NOARGS('E', "list-engines", "list ecore-evas engines",
+ ecore_getopt_callback_ecore_evas_list_engines, NULL),
+ ECORE_GETOPT_STORE_DEF_BOOL('F', "fullscreen", "fullscreen mode", 0),
+ ECORE_GETOPT_CALLBACK_ARGS('g', "geometry", "geometry to use in x:y:w:h form.", "X:Y:W:H",
+ ecore_getopt_callback_geometry_parse, NULL),
+ ECORE_GETOPT_STORE_STR('p', "path", "path to read the image files from"),
+ ECORE_GETOPT_STORE_STR('t', "theme", "path to read the theme file from"),
+ ECORE_GETOPT_STORE_INT('f', "fps", "frame per second"),
+ ECORE_GETOPT_STORE_INT('l', "lines", "Number of lines to display"),
+ ECORE_GETOPT_COUNT('v', "verbose", "be more verbose"),
+ ECORE_GETOPT_VERSION('V', "version"),
+ ECORE_GETOPT_COPYRIGHT('R', "copyright"),
+ ECORE_GETOPT_LICENSE('L', "license"),
+ ECORE_GETOPT_HELP('h', "help"),
+ ECORE_GETOPT_SENTINEL
+ }
+};
+
+static void _walle_win_del_cb(void *data, Evas_Object *obj, void *event_info)
+{
+ elm_exit();
+}
+
+static void _walle_picture_cb_resize(void *data, Evas *e, Evas_Object *obj, void *einfo)
+{
+ Evas_Object *o_pict;
+ Evas_Coord width;
+ Evas_Coord height;
+
+ o_pict = (Evas_Object *)data;
+ width = 0;
+ height = 0;
+ /* callback when a picture is resized */
+ evas_object_geometry_get(o_pict, NULL, NULL, &width, &height);
+ evas_object_image_fill_set(o_pict, 0, 0, width, height);
+
+}
+
+static void _walle_wall_populate(Walle *walle, const char *directory, const char *theme)
+{
+ Evas_Object *o;
+ Evas_Coord ow, oh, w, h;
+ Ecore_List *files = NULL;
+ char *file = NULL;
+ char filename[4096];
+
+ if (!ecore_file_is_dir(directory) && ecore_file_dir_is_empty(directory))
+ return;
+ files = ecore_file_ls(directory);
+ if (!files)
+ return;
+ ecore_list_sort(files, ECORE_COMPARE_CB(strcasecmp), ECORE_SORT_MIN);
+ file = ecore_list_first_goto(files);
+ while ((file = (char *)ecore_list_next(files)) != NULL)
+ {
+
+ sprintf(filename, "%s/%s", directory, file);
+ o = evas_object_image_add(walle->evas);
+ evas_object_image_file_set(o, filename, NULL);
+ switch(evas_object_image_load_error_get(o))
+ {
+ case EVAS_LOAD_ERROR_NONE:
+ {
+ evas_object_event_callback_add(o, EVAS_CALLBACK_RESIZE, _walle_picture_cb_resize, o);
+ evas_object_image_size_get(o, &w, &h);
+ oh = 200;
+ ow = oh * (float)w/(float)h;
+ evas_object_image_load_size_set(o, ow, oh);
+ evas_object_image_fill_set(o, 0, 0, ow, oh);
+ evas_object_resize(o, ow, oh);
+ evas_object_size_hint_min_set(o, ow, oh);
+ walle_wall_append(walle->o_wall, o);
+ walle->pictures = eina_list_append(walle->pictures, o);
+ }
+ break;
+ default:
+ evas_object_del(o);
+ break;
+
+ }
+
+ }
+ ecore_list_destroy(files);
+}
+
+
+Walle *
+walle_init(int argc, char **argv)
+{
+ Eina_Rectangle geometry = {0, 0, 0, 0};
+ char *engine = NULL;
+ char *path = NULL;
+ char *theme = NULL;
+ int fps = 0;
+ int lines = 2;
+ int verbose = 0;
+ int args;
+ unsigned char help = 0;
+ unsigned char engines_listed = 0;
+ unsigned char is_fullscreen = 0;
+ Ecore_Getopt_Value values[] = {
+ ECORE_GETOPT_VALUE_STR(engine),
+ ECORE_GETOPT_VALUE_BOOL(engines_listed),
+ ECORE_GETOPT_VALUE_BOOL(is_fullscreen),
+ ECORE_GETOPT_VALUE_PTR_CAST(geometry),
+ ECORE_GETOPT_VALUE_STR(path),
+ ECORE_GETOPT_VALUE_STR(theme),
+ ECORE_GETOPT_VALUE_INT(fps),
+ ECORE_GETOPT_VALUE_INT(lines),
+ ECORE_GETOPT_VALUE_INT(verbose),
+ ECORE_GETOPT_VALUE_NONE,
+ ECORE_GETOPT_VALUE_NONE,
+ ECORE_GETOPT_VALUE_NONE,
+ ECORE_GETOPT_VALUE_BOOL(help),
+ ECORE_GETOPT_VALUE_NONE
+ };
+
+ Walle *walle;
+
+ ecore_app_args_set(argc, (const char **)argv);
+
+ args = ecore_getopt_parse(&options, values, argc, argv);
+ if (args < 0)
+ {
+ fprintf(stderr, "[Wall-e] ERROR: could not parse options.\n");
+ return NULL;
+ }
+
+ /* parse the options */
+
+ if (help)
+ return NULL;
+
+ if (engines_listed)
+ return NULL;
+
+ if (!engine)
+ {
+ fprintf(stderr, "[Wall-e] ERROR: could not set engine.\n");
+ return NULL;
+ }
+
+ if (!path)
+ {
+ fprintf(stderr, "[Wall-e] ERROR: could not set path.\n");
+ return NULL;
+ }
+
+ if (!theme)
+ {
+ theme = getenv("WALLE_THEME");
+ if (!theme)
+ theme = PACKAGE_DATA_DIR "/data/default.edj";
+ }
+
+ if (is_fullscreen &&
+ ((geometry.x != 0) ||
+ (geometry.y != 0) ||
+ (geometry.w != 0) ||
+ (geometry.h != 0)))
+ {
+ fprintf(stderr, "[Wall-e] ERROR: could not set fulllscreen and geometry at same time.\n");
+ return NULL;
+ }
+
+ if (!is_fullscreen &&
+ (geometry.x == 0) &&
+ (geometry.y == 0) &&
+ (geometry.w == 0) &&
+ (geometry.h == 0))
+ {
+ geometry.w = 640;
+ geometry.h = 480;
+ }
+
+ if (fps != 0)
+ ecore_animator_frametime_set(1.0 / (double)fps);
+
+ /* we set our Walle object */
+
+ walle = (Walle *)calloc(1, sizeof(Walle));
+ if (!walle)
+ return NULL;
+
+ /* config */
+ walle->config.engine = strdup(engine);
+ walle->config.path = strdup(path);
+ walle->config.theme = strdup(theme);
+ walle->config.width = geometry.w;
+ walle->config.height = geometry.h;
+ walle->config.fps = fps;
+ walle->config.lines = lines;
+
+ return walle;
+}
+
+void
+walle_shutdown(Walle *walle)
+{
+ if (!walle)
+ return;
+
+ free(walle->config.engine);
+ free(walle->config.path);
+ free(walle->config.theme);
+ free(walle);
+}
+
+int
+walle_gui_set(Walle *walle)
+{
+ Evas_Object *o;
+
+ /* main window */
+ o = elm_win_add(NULL, "Wall-E", ELM_WIN_BASIC);
+ if (!o)
+ return 0;
+
+ elm_win_title_set(o, "Wall-E");
+ evas_object_smart_callback_add(o, "delete-request", _walle_win_del_cb, NULL);
+ walle->o_win = o;
+
+ walle->evas = evas_object_evas_get(walle->o_win);
+
+ /* main edje object */
+ o = edje_object_add(walle->evas);
+ edje_object_file_set(o, walle->config.theme, "wall-e");
+ evas_object_size_hint_weight_set(o, 1.0, 1.0);
+ elm_win_resize_object_add(walle->o_win, o);
+ evas_object_show(o);
+ walle->o_edje = o;
+
+ /* scroller */
+ o = elm_scroller_add(walle->o_win);
+ edje_object_part_swallow(walle->o_edje, "walle.swallow.content", o);
+ evas_object_show(o);
+ walle->o_scroll = o;
+
+ /* toolbar */
+ o = elm_toolbar_add(walle->o_win);
+ evas_object_size_hint_weight_set(o, 0.0, 0.0);
+ evas_object_size_hint_align_set(o, -1.0, 0.0);
+ evas_object_size_hint_min_set(o, -1, -1);
+ edje_object_part_swallow(walle->o_edje, "walle.swallow.toolbar", o);
+ walle->o_toolbar = o;
+
+ o = elm_icon_add(walle->o_win);
+ elm_icon_file_set(o, walle->config.theme, "walle/icon/resize");
+ elm_toolbar_item_add(walle->o_toolbar, o, "Resize", NULL, NULL);
+
+ o = elm_icon_add(walle->o_win);
+ elm_icon_file_set(o, walle->config.theme, "walle/icon/rotate");
+ elm_toolbar_item_add(walle->o_toolbar, o, "Rotate", NULL, NULL);
+
+ o = elm_icon_add(walle->o_win);
+ elm_icon_file_set(o, walle->config.theme, "walle/icon/config");
+ elm_toolbar_item_add(walle->o_toolbar, o, "Configuration", NULL, NULL);
+
+ /* another brick in the wall */
+ o = walle_wall_add(walle->evas);
+ walle_wall_lines_set(o, walle->config.lines);
+ elm_scroller_content_set(walle->o_scroll, o);
+ walle->o_wall = o;
+
+ _walle_wall_populate(walle, walle->config.path, walle->config.theme);
+
+ /* resize and show window */
+ evas_object_resize(walle->o_win, walle->config.width, walle->config.height);
+ evas_object_show(walle->o_win);
+
+ return 1;
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2009-01-27 18:00:31
|
Revision: 540
http://enna.svn.sourceforge.net/enna/?rev=540&view=rev
Author: doursse
Date: 2009-01-27 18:00:28 +0000 (Tue, 27 Jan 2009)
Log Message:
-----------
fix order ot the _shutdown() functions
Modified Paths:
--------------
trunk/wall-e/src/bin/main.c
Modified: trunk/wall-e/src/bin/main.c
===================================================================
--- trunk/wall-e/src/bin/main.c 2009-01-27 17:44:00 UTC (rev 539)
+++ trunk/wall-e/src/bin/main.c 2009-01-27 18:00:28 UTC (rev 540)
@@ -297,10 +297,10 @@
evas_object_del(o);
}
+ elm_shutdown();
edje_shutdown();
ecore_file_shutdown();
ecore_evas_shutdown();
- elm_shutdown();
free(walle);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2009-01-27 17:44:03
|
Revision: 539
http://enna.svn.sourceforge.net/enna/?rev=539&view=rev
Author: captainigloo
Date: 2009-01-27 17:44:00 +0000 (Tue, 27 Jan 2009)
Log Message:
-----------
Free object created in main
Modified Paths:
--------------
trunk/wall-e/src/bin/main.c
trunk/wall-e/src/bin/wall.c
Modified: trunk/wall-e/src/bin/main.c
===================================================================
--- trunk/wall-e/src/bin/main.c 2009-01-27 17:35:49 UTC (rev 538)
+++ trunk/wall-e/src/bin/main.c 2009-01-27 17:44:00 UTC (rev 539)
@@ -289,6 +289,8 @@
/* Free all object created */
evas_object_del(walle->o_edje);
+ evas_object_del(walle->o_toolbar);
+ evas_object_del(walle->o_wall);
EINA_LIST_FOREACH(walle->pictures, l, o)
{
Modified: trunk/wall-e/src/bin/wall.c
===================================================================
--- trunk/wall-e/src/bin/wall.c 2009-01-27 17:35:49 UTC (rev 538)
+++ trunk/wall-e/src/bin/wall.c 2009-01-27 17:44:00 UTC (rev 539)
@@ -340,10 +340,11 @@
evas_object_del(pi->o_edje);
evas_object_image_preload(pi->o_pict, 1);
evas_object_del(pi->o_pict);
+ priv->items = evas_list_remove(priv->items, pi);
+ free(pi);
}
-
-
-
+ eina_list_free(priv->items);
+ free(priv);
}
static Evas_Smart *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2009-01-27 17:35:51
|
Revision: 538
http://enna.svn.sourceforge.net/enna/?rev=538&view=rev
Author: captainigloo
Date: 2009-01-27 17:35:49 +0000 (Tue, 27 Jan 2009)
Log Message:
-----------
Set walle strucutre mem to 0 at startup
Modified Paths:
--------------
trunk/wall-e/src/bin/main.c
Modified: trunk/wall-e/src/bin/main.c
===================================================================
--- trunk/wall-e/src/bin/main.c 2009-01-27 17:32:24 UTC (rev 537)
+++ trunk/wall-e/src/bin/main.c 2009-01-27 17:35:49 UTC (rev 538)
@@ -156,7 +156,7 @@
ECORE_GETOPT_VALUE_NONE
};
- walle = (Walle*)malloc(sizeof(Walle));
+ walle = (Walle*)calloc(1, sizeof(Walle));
if (!walle)
return EXIT_FAILURE;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2009-01-27 17:32:27
|
Revision: 537
http://enna.svn.sourceforge.net/enna/?rev=537&view=rev
Author: captainigloo
Date: 2009-01-27 17:32:24 +0000 (Tue, 27 Jan 2009)
Log Message:
-----------
Free Wall Picture items
Modified Paths:
--------------
trunk/wall-e/src/bin/wall.c
Modified: trunk/wall-e/src/bin/wall.c
===================================================================
--- trunk/wall-e/src/bin/wall.c 2009-01-27 17:21:32 UTC (rev 536)
+++ trunk/wall-e/src/bin/wall.c 2009-01-27 17:32:24 UTC (rev 537)
@@ -322,6 +322,30 @@
evas_object_move(priv->o_box, x, y);
}
+static void
+_wall_smart_del(Evas_Object *o)
+{
+ Evas_Object *box;
+ Walle_Picture_Item *pi;
+ Eina_List *l;
+
+ WALLE_WALL_DATA_GET(o, priv);
+
+ evas_object_del(priv->o_box);
+ EINA_LIST_FOREACH(priv->o_boxes, l, box)
+ evas_object_del(box);
+
+ EINA_LIST_FOREACH(priv->items, l, pi)
+ {
+ evas_object_del(pi->o_edje);
+ evas_object_image_preload(pi->o_pict, 1);
+ evas_object_del(pi->o_pict);
+ }
+
+
+
+}
+
static Evas_Smart *
_wall_smart_class_new(void)
{
@@ -333,6 +357,7 @@
api.add = _wall_smart_add;
api.resize = _wall_smart_resize;
api.move = _wall_smart_move;
+ api.del = _wall_smart_del;
}
return evas_smart_class_new(&api);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <do...@us...> - 2009-01-27 17:21:35
|
Revision: 536
http://enna.svn.sourceforge.net/enna/?rev=536&view=rev
Author: doursse
Date: 2009-01-27 17:21:32 +0000 (Tue, 27 Jan 2009)
Log Message:
-----------
free the list of image files
Modified Paths:
--------------
trunk/wall-e/src/bin/main.c
Modified: trunk/wall-e/src/bin/main.c
===================================================================
--- trunk/wall-e/src/bin/main.c 2009-01-27 17:20:00 UTC (rev 535)
+++ trunk/wall-e/src/bin/main.c 2009-01-27 17:21:32 UTC (rev 536)
@@ -84,6 +84,8 @@
if (!ecore_file_is_dir(directory) && ecore_file_dir_is_empty(directory))
return;
files = ecore_file_ls(directory);
+ if (!files)
+ return;
ecore_list_sort(files, ECORE_COMPARE_CB(strcasecmp), ECORE_SORT_MIN);
file = ecore_list_first_goto(files);
while ((file = (char *)ecore_list_next(files)) != NULL)
@@ -115,6 +117,7 @@
}
}
+ ecore_list_destroy(files);
}
int
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2009-01-27 17:20:09
|
Revision: 535
http://enna.svn.sourceforge.net/enna/?rev=535&view=rev
Author: captainigloo
Date: 2009-01-27 17:20:00 +0000 (Tue, 27 Jan 2009)
Log Message:
-----------
free evas object before shutdow evas
Modified Paths:
--------------
trunk/wall-e/src/bin/main.c
Modified: trunk/wall-e/src/bin/main.c
===================================================================
--- trunk/wall-e/src/bin/main.c 2009-01-27 17:18:50 UTC (rev 534)
+++ trunk/wall-e/src/bin/main.c 2009-01-27 17:20:00 UTC (rev 535)
@@ -286,16 +286,17 @@
/* Free all object created */
evas_object_del(walle->o_edje);
- edje_shutdown();
- ecore_file_shutdown();
- ecore_evas_shutdown();
- elm_shutdown();
EINA_LIST_FOREACH(walle->pictures, l, o)
{
evas_object_del(o);
}
+ edje_shutdown();
+ ecore_file_shutdown();
+ ecore_evas_shutdown();
+ elm_shutdown();
+
free(walle);
return EXIT_SUCCESS;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2009-01-27 17:18:51
|
Revision: 534
http://enna.svn.sourceforge.net/enna/?rev=534&view=rev
Author: captainigloo
Date: 2009-01-27 17:18:50 +0000 (Tue, 27 Jan 2009)
Log Message:
-----------
Free Pictures objects
Modified Paths:
--------------
trunk/wall-e/src/bin/main.c
trunk/wall-e/src/bin/wall-e.h
Modified: trunk/wall-e/src/bin/main.c
===================================================================
--- trunk/wall-e/src/bin/main.c 2009-01-27 17:05:30 UTC (rev 533)
+++ trunk/wall-e/src/bin/main.c 2009-01-27 17:18:50 UTC (rev 534)
@@ -105,6 +105,7 @@
evas_object_resize(o, ow, oh);
evas_object_size_hint_min_set(o, ow, oh);
walle_wall_append(walle->o_wall, o);
+ walle->pictures = eina_list_append(walle->pictures, o);
}
break;
default:
@@ -120,6 +121,7 @@
main(int argc, char *argv[])
{
Eina_Rectangle geometry = {0, 0, 0, 0};
+ Eina_List *l;
Walle *walle = NULL;
Evas_Object *o;
char *engine = NULL;
@@ -288,6 +290,12 @@
ecore_file_shutdown();
ecore_evas_shutdown();
elm_shutdown();
+
+ EINA_LIST_FOREACH(walle->pictures, l, o)
+ {
+ evas_object_del(o);
+ }
+
free(walle);
return EXIT_SUCCESS;
Modified: trunk/wall-e/src/bin/wall-e.h
===================================================================
--- trunk/wall-e/src/bin/wall-e.h 2009-01-27 17:05:30 UTC (rev 533)
+++ trunk/wall-e/src/bin/wall-e.h 2009-01-27 17:18:50 UTC (rev 534)
@@ -9,4 +9,5 @@
Evas_Object *o_scroll;
Evas_Object *o_toolbar;
Evas_Coord app_w, app_h;
+ Eina_List *pictures;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2009-01-27 17:05:33
|
Revision: 533
http://enna.svn.sourceforge.net/enna/?rev=533&view=rev
Author: captainigloo
Date: 2009-01-27 17:05:30 +0000 (Tue, 27 Jan 2009)
Log Message:
-----------
Fix segv on exit (thanks Cedric :))
Modified Paths:
--------------
trunk/wall-e/src/bin/wall.c
Modified: trunk/wall-e/src/bin/wall.c
===================================================================
--- trunk/wall-e/src/bin/wall.c 2009-01-27 17:04:14 UTC (rev 532)
+++ trunk/wall-e/src/bin/wall.c 2009-01-27 17:05:30 UTC (rev 533)
@@ -77,6 +77,8 @@
priv = evas_object_smart_data_get(obj);
+ if (!priv) return;
+
evas_object_size_hint_min_get(priv->o_box, &minw, &minh);
evas_object_size_hint_max_get(priv->o_box, &maxw, &maxh);
evas_object_size_hint_min_set(obj, minw, minh);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2009-01-27 17:04:18
|
Revision: 532
http://enna.svn.sourceforge.net/enna/?rev=532&view=rev
Author: captainigloo
Date: 2009-01-27 17:04:14 +0000 (Tue, 27 Jan 2009)
Log Message:
-----------
Fix picture show, don't need to show picture while they are not preloaded
Modified Paths:
--------------
trunk/wall-e/src/bin/main.c
trunk/wall-e/src/bin/wall.c
Modified: trunk/wall-e/src/bin/main.c
===================================================================
--- trunk/wall-e/src/bin/main.c 2009-01-26 22:28:11 UTC (rev 531)
+++ trunk/wall-e/src/bin/main.c 2009-01-27 17:04:14 UTC (rev 532)
@@ -102,8 +102,6 @@
ow = oh * (float)w/(float)h;
evas_object_image_load_size_set(o, ow, oh);
evas_object_image_fill_set(o, 0, 0, ow, oh);
- evas_object_image_preload(o, 0);
- evas_object_show(o);
evas_object_resize(o, ow, oh);
evas_object_size_hint_min_set(o, ow, oh);
walle_wall_append(walle->o_wall, o);
Modified: trunk/wall-e/src/bin/wall.c
===================================================================
--- trunk/wall-e/src/bin/wall.c 2009-01-26 22:28:11 UTC (rev 531)
+++ trunk/wall-e/src/bin/wall.c 2009-01-27 17:04:14 UTC (rev 532)
@@ -374,6 +374,7 @@
edje_object_signal_emit(pi->o_edje, "walle,loading,start", "walle");
pi->o_pict = child;
+ evas_object_image_preload(pi->o_pict, 0);
evas_object_geometry_get(child, NULL, NULL, &ow, &oh);
edje_extern_object_min_size_set(pi->o_edje, ow, oh);
evas_object_size_hint_min_set(child, 0, 0);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2009-01-26 23:08:22
|
Revision: 531
http://enna.svn.sourceforge.net/enna/?rev=531&view=rev
Author: captainigloo
Date: 2009-01-26 22:28:11 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
add loading image and theme
Modified Paths:
--------------
trunk/wall-e/data/theme/default/default.edc
trunk/wall-e/src/bin/wall.c
Added Paths:
-----------
trunk/wall-e/data/theme/default/loading-1.png
trunk/wall-e/data/theme/default/loading-2.png
trunk/wall-e/data/theme/default/loading-3.png
trunk/wall-e/data/theme/default/loading-4.png
trunk/wall-e/data/theme/default/loading-5.png
trunk/wall-e/data/theme/default/loading-6.png
trunk/wall-e/data/theme/default/loading-7.png
trunk/wall-e/data/theme/default/loading-8.png
trunk/wall-e/data/theme/default/loading-9.png
Modified: trunk/wall-e/data/theme/default/default.edc
===================================================================
--- trunk/wall-e/data/theme/default/default.edc 2009-01-26 22:11:13 UTC (rev 530)
+++ trunk/wall-e/data/theme/default/default.edc 2009-01-26 22:28:11 UTC (rev 531)
@@ -91,6 +91,15 @@
image: "frame_1.png" COMP;
image: "frame_2.png" COMP;
image: "dia_grad.png" COMP;
+ image: "loading-1.png" COMP;
+ image: "loading-2.png" COMP;
+ image: "loading-3.png" COMP;
+ image: "loading-4.png" COMP;
+ image: "loading-5.png" COMP;
+ image: "loading-6.png" COMP;
+ image: "loading-7.png" COMP;
+ image: "loading-8.png" COMP;
+ image: "loading-9.png" COMP;
}
parts {
part { name: "base0";
@@ -150,27 +159,84 @@
rel2.relative: 1.4 1.4;
}
}
+ part {
+ name: "loading";
+ mouse_events: 0;
+ description {
+ state: "default" 0.0;
+ visible: 0;
+ color: 255 255 255 0;
+ max: 32 32;
+ aspect: 1.0 1.0;
+ aspect_preference: BOTH;
+ rel1.to: "walle.swallow.content";
+ rel2.to: "walle.swallow.content";
+ image {
+ tween: "loading-1.png";
+ tween: "loading-2.png";
+ tween: "loading-3.png";
+ tween: "loading-4.png";
+ tween: "loading-5.png";
+ tween: "loading-6.png";
+ tween: "loading-7.png";
+ tween: "loading-8.png";
+ normal: "loading-9.png";
+ }
+ }
+ description {
+ state: "visible" 0.0;
+ inherit: "default" 0.0;
+ visible: 1;
+ color: 255 255 255 255;
+ }
+ }
}
programs
{
program
- { name: "sel";
+ {
+ name: "sel";
signal: "select";
- source: "enna";
+ source: "walle";
action: STATE_SET "select" 0.0;
transition: DECELERATE 0.3;
target: "over";
}
program
- { name: "unsel";
+ {
+ name: "unsel";
signal: "unselect";
- source: "enna";
+ source: "walle";
action: STATE_SET "default" 0.0;
transition: ACCELERATE 0.2;
target: "over";
}
+ program {
+ name: "loading_start";
+ signal: "walle,loading,start";
+ source: "walle";
+ action: STATE_SET "visible" 0.0;
+ transition: LINEAR 0.3333;
+ target: "loading";
+ after: "loading_start";
+ }
+ program {
+ name: "loading,stop";
+ signal: "walle,loading,stop";
+ source: "walle";
+ action: ACTION_STOP;
+ target: "loading_start";
+ }
+ program {
+ name: "loading,stop2";
+ signal: "walle,loading,stop";
+ source: "walle";
+ action: STATE_SET "default" 0.0;
+ target: "loading";
+ transition: ACCELERATE 0.5;
+ }
}
}
GROUP_ICON("icon_resize.png", "walle/icon/resize")
Added: trunk/wall-e/data/theme/default/loading-1.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/loading-1.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/wall-e/data/theme/default/loading-2.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/loading-2.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/wall-e/data/theme/default/loading-3.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/loading-3.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/wall-e/data/theme/default/loading-4.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/loading-4.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/wall-e/data/theme/default/loading-5.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/loading-5.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/wall-e/data/theme/default/loading-6.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/loading-6.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/wall-e/data/theme/default/loading-7.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/loading-7.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/wall-e/data/theme/default/loading-8.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/loading-8.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/wall-e/data/theme/default/loading-9.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/loading-9.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/wall-e/src/bin/wall.c
===================================================================
--- trunk/wall-e/src/bin/wall.c 2009-01-26 22:11:13 UTC (rev 530)
+++ trunk/wall-e/src/bin/wall.c 2009-01-26 22:28:11 UTC (rev 531)
@@ -293,6 +293,7 @@
printf("Preload Cb\n");
edje_object_part_swallow(pi->o_edje, "walle.swallow.content", pi->o_pict);
evas_object_show(pi->o_pict);
+ edje_object_signal_emit(pi->o_edje, "walle,loading,stop", "walle");
}
static void
@@ -370,22 +371,17 @@
/* FIXME change this to retrieve theme filename from config option */
edje_object_file_set(pi->o_edje, PACKAGE_DATA_DIR"/data/default.edj", "walle/picture/item");
evas_object_show(pi->o_edje);
+ edje_object_signal_emit(pi->o_edje, "walle,loading,start", "walle");
pi->o_pict = child;
- //evas_object_hide(child);
evas_object_geometry_get(child, NULL, NULL, &ow, &oh);
-
edje_extern_object_min_size_set(pi->o_edje, ow, oh);
-
evas_object_size_hint_min_set(child, 0, 0);
-
n = priv->nb_items % priv->nb_lines;
pi->row = n;
o_box = eina_list_nth(priv->o_boxes, n);
-
elm_box_pack_end(o_box, pi->o_edje);
-
items = eina_list_nth(priv->items, n);
if (!items)
{
@@ -398,13 +394,9 @@
}
priv->items = eina_list_append(priv->items, items);
-
-
priv->nb_items ++;
-
evas_object_event_callback_add(pi->o_edje, EVAS_CALLBACK_MOUSE_DOWN,
_wall_event_mouse_down_cb, pi);
-
evas_object_event_callback_add(pi->o_pict, EVAS_CALLBACK_IMAGE_PRELOADED,
_walle_event_image_preload_cb, pi);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2009-01-26 23:08:02
|
Revision: 530
http://enna.svn.sourceforge.net/enna/?rev=530&view=rev
Author: captainigloo
Date: 2009-01-26 22:11:13 +0000 (Mon, 26 Jan 2009)
Log Message:
-----------
Add preload Callback
Modified Paths:
--------------
trunk/wall-e/src/bin/wall.c
Modified: trunk/wall-e/src/bin/wall.c
===================================================================
--- trunk/wall-e/src/bin/wall.c 2008-12-31 15:43:02 UTC (rev 529)
+++ trunk/wall-e/src/bin/wall.c 2009-01-26 22:11:13 UTC (rev 530)
@@ -202,7 +202,7 @@
}
-static Walle_Picture_Item *_wall_selected_item_get( Walle_Wall_Data *priv, int *row,
+static Walle_Picture_Item *_wall_selected_item_get( Walle_Wall_Data *priv, int *row,
int *col)
{
Eina_List *l, *l2;
@@ -237,7 +237,7 @@
if (!pi || !priv)
return;
pi->selected = 0;
- edje_object_signal_emit(pi->o_edje, "unselect", "enna");
+ edje_object_signal_emit(pi->o_edje, "unselect", "walle");
}
@@ -250,7 +250,7 @@
evas_object_raise(pi->o_edje);
evas_object_raise(eina_list_nth(pi->priv->o_boxes, pi->row));
- edje_object_signal_emit(pi->o_edje, "select", "enna");
+ edje_object_signal_emit(pi->o_edje, "select", "walle");
priv->row_sel = pi->row;
}
@@ -283,8 +283,18 @@
_wall_item_select(pi->priv, pi);
}
+static void
+_walle_event_image_preload_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+{
+ Walle_Picture_Item *pi = data;
+ if (!pi) return;
+ printf("Preload Cb\n");
+ edje_object_part_swallow(pi->o_edje, "walle.swallow.content", pi->o_pict);
+ evas_object_show(pi->o_pict);
+}
+
static void
_wall_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h)
{
@@ -297,7 +307,6 @@
{
evas_object_resize(o_box, w, h/priv->nb_lines);
}
-
evas_object_resize(priv->o_box, w, h);
evas_object_size_hint_min_get(priv->o_box, &w, &h);
evas_object_size_hint_min_set(o, w, h);
@@ -363,14 +372,14 @@
evas_object_show(pi->o_edje);
pi->o_pict = child;
-
+ //evas_object_hide(child);
evas_object_geometry_get(child, NULL, NULL, &ow, &oh);
edje_extern_object_min_size_set(pi->o_edje, ow, oh);
evas_object_size_hint_min_set(child, 0, 0);
- edje_object_part_swallow(pi->o_edje, "walle.swallow.content", child);
+
n = priv->nb_items % priv->nb_lines;
pi->row = n;
o_box = eina_list_nth(priv->o_boxes, n);
@@ -392,8 +401,10 @@
priv->nb_items ++;
+
evas_object_event_callback_add(pi->o_edje, EVAS_CALLBACK_MOUSE_DOWN,
_wall_event_mouse_down_cb, pi);
-
+ evas_object_event_callback_add(pi->o_pict, EVAS_CALLBACK_IMAGE_PRELOADED,
+ _walle_event_image_preload_cb, pi);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2008-12-31 15:43:09
|
Revision: 529
http://enna.svn.sourceforge.net/enna/?rev=529&view=rev
Author: captainigloo
Date: 2008-12-31 15:43:02 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
debug --
Modified Paths:
--------------
trunk/wall-e/src/bin/main.c
trunk/wall-e/src/bin/wall.c
Modified: trunk/wall-e/src/bin/main.c
===================================================================
--- trunk/wall-e/src/bin/main.c 2008-12-31 15:41:18 UTC (rev 528)
+++ trunk/wall-e/src/bin/main.c 2008-12-31 15:43:02 UTC (rev 529)
@@ -58,12 +58,10 @@
walle = data;
- printf("Size hints changed\n");
evas_object_geometry_get(walle->o_wall, NULL, NULL, NULL, &h);
evas_object_size_hint_min_get(walle->o_wall, &w, NULL);
evas_object_resize(walle->o_wall, w, h);
- printf("size hint : wall : %d %d %d %d\n", x, y, w, h);
-}
+ }
static void _walle_picture_cb_resize(void *data, Evas *e, Evas_Object *obj, void *einfo)
{
@@ -71,7 +69,6 @@
Evas_Object *o_pict = data;
/* callback when a picture is resized */
evas_object_geometry_get(o_pict, NULL, NULL, &w, &h);
- printf("picture resize : %dx%d\n", w, h);
evas_object_image_fill_set(o_pict, 0, 0, w, h);
}
@@ -93,7 +90,6 @@
{
sprintf(filename, "%s/%s", directory, file);
- printf("filename : %s\n", filename);
o = evas_object_image_add(walle->evas);
evas_object_image_file_set(o, filename, NULL);
switch(evas_object_image_load_error_get(o))
@@ -114,7 +110,6 @@
}
break;
default:
- printf("Unable to load file %s\n", filename);
evas_object_del(o);
break;
Modified: trunk/wall-e/src/bin/wall.c
===================================================================
--- trunk/wall-e/src/bin/wall.c 2008-12-31 15:41:18 UTC (rev 528)
+++ trunk/wall-e/src/bin/wall.c 2008-12-31 15:43:02 UTC (rev 529)
@@ -87,7 +87,6 @@
if ((maxw >= 0) && (w > maxw)) w = maxw;
if ((maxh >= 0) && (h > maxh)) h = maxh;
evas_object_resize(obj, w, h);
- printf("sizing eval\n");
}
static void
@@ -261,7 +260,7 @@
{
Walle_Picture_Item *pi, *ppi;
int row, col;
- printf("Mouse Down\n");
+
pi = data;
ppi = _wall_selected_item_get(pi->priv, &row, &col);
@@ -366,7 +365,6 @@
pi->o_pict = child;
evas_object_geometry_get(child, NULL, NULL, &ow, &oh);
- printf("child size %d %d\n", ow, oh);
edje_extern_object_min_size_set(pi->o_edje, ow, oh);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2008-12-31 15:41:38
|
Revision: 528
http://enna.svn.sourceforge.net/enna/?rev=528&view=rev
Author: captainigloo
Date: 2008-12-31 15:41:18 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
send activate signal when picture is activated
Modified Paths:
--------------
trunk/wall-e/src/bin/wall.c
Modified: trunk/wall-e/src/bin/wall.c
===================================================================
--- trunk/wall-e/src/bin/wall.c 2008-12-31 15:31:01 UTC (rev 527)
+++ trunk/wall-e/src/bin/wall.c 2008-12-31 15:41:18 UTC (rev 528)
@@ -10,6 +10,7 @@
{
Evas_Object_Smart_Clipped_Data base;
const Evas_Smart_Class *api;
+ Evas_Object *o_smart;
Evas_Object *o_box;
Eina_List *o_boxes;
Eina_List *items;
@@ -117,8 +118,8 @@
_parent_sc.add(o);
priv->nb_lines = 1;
+ priv->o_smart = o;
-
priv->o_box = elm_box_add(o);
elm_box_horizontal_set(priv->o_box, 0);
elm_box_homogenous_set(priv->o_box, 1);
@@ -270,7 +271,11 @@
_wall_item_unselect(pi->priv, ppi);
}
else if (ppi == pi)
+ {
+ /* Item already selected send activate callback */
+ evas_object_smart_callback_call (pi->priv->o_smart, "activate", pi);
return;
+ }
evas_object_raise(eina_list_nth(pi->priv->o_boxes,pi->row));
evas_object_raise(pi->o_edje);
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2008-12-31 15:31:04
|
Revision: 527
http://enna.svn.sourceforge.net/enna/?rev=527&view=rev
Author: captainigloo
Date: 2008-12-31 15:31:01 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
cosmetic reindent
Modified Paths:
--------------
trunk/wall-e/data/theme/default/default.edc
Modified: trunk/wall-e/data/theme/default/default.edc
===================================================================
--- trunk/wall-e/data/theme/default/default.edc 2008-12-31 15:27:03 UTC (rev 526)
+++ trunk/wall-e/data/theme/default/default.edc 2008-12-31 15:31:01 UTC (rev 527)
@@ -174,7 +174,7 @@
}
}
GROUP_ICON("icon_resize.png", "walle/icon/resize")
- GROUP_ICON("icon_rotate.png", "walle/icon/rotate")
- GROUP_ICON("icon_config.png", "walle/icon/config")
+ GROUP_ICON("icon_rotate.png", "walle/icon/rotate")
+ GROUP_ICON("icon_config.png", "walle/icon/config")
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2008-12-31 15:27:15
|
Revision: 526
http://enna.svn.sourceforge.net/enna/?rev=526&view=rev
Author: captainigloo
Date: 2008-12-31 15:27:03 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
Better theme
Modified Paths:
--------------
trunk/wall-e/data/theme/default/default.edc
trunk/wall-e/src/bin/wall.c
Added Paths:
-----------
trunk/wall-e/data/theme/default/dia_grad.png
trunk/wall-e/data/theme/default/frame_1.png
Modified: trunk/wall-e/data/theme/default/default.edc
===================================================================
--- trunk/wall-e/data/theme/default/default.edc 2008-12-31 11:53:41 UTC (rev 525)
+++ trunk/wall-e/data/theme/default/default.edc 2008-12-31 15:27:03 UTC (rev 526)
@@ -6,9 +6,30 @@
}
*/
-images {
- image: "frame_2.png" COMP;
-}
+#define GROUP_ICON(icon_file, icon_name) \
+ images { \
+ image: icon_file RAW; \
+ } \
+ group { \
+ name: icon_name; \
+ parts { \
+ part { \
+ name: "icon"; \
+ description { \
+ state: "default" 0.0; \
+ rel1 { \
+ relative: 0 0; \
+ } \
+ rel2 { \
+ relative: 1.0 1.0; \
+ } \
+ image { \
+ normal: icon_file; \
+ } \
+ } \
+ } \
+ } \
+} \
collections {
@@ -30,7 +51,7 @@
mouse_events: 0;
description {
state: "default" 0.0;
- color: 255 255 255 255;
+ color: 100 100 100 255;
}
}
@@ -63,115 +84,74 @@
}
}
}
- programs {
- program {
-
- }
- }
}
-
- group
- {
- name: "walle/picture/item";
- parts
- {
- part
- { name: "fg";
- mouse_events: 0;
- description
- { state: "default" 0.0;
- visible: 0;
- color: 255 255 255 0;
- rel1.to: "bg";
- rel2.to: "bg";
- rel1.offset: -15 -15;
- rel2.offset: 31 31;
-
- image
- {
+ ///////////////////////////////////////////////////////////////////////////////
+ group { name: "walle/picture/item";
+ images {
+ image: "frame_1.png" COMP;
+ image: "frame_2.png" COMP;
+ image: "dia_grad.png" COMP;
+ }
+ parts {
+ part { name: "base0";
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ image.normal: "dia_grad.png";
+ rel1.to: "over";
+ rel2.to: "over";
+ fill {
+ smooth: 0;
+ size {
+ relative: 0.0 1.0;
+ offset: 64 0;
+ }
+ }
+ }
+ }
+ part { name: "base";
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.to: "over";
+ rel2.to: "over";
+ image {
normal: "frame_2.png";
border: 5 5 32 26;
- middle: 0;;
+ middle: 0;
}
+ fill.smooth : 0;
}
- description
- { state: "select" 0.0;
- inherit: "default" 0.0;
- visible: 1;
- color: 255 255 255 255;
+ }
+ part { name: "walle.swallow.content";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ rel1.offset: 8 8;
+ rel1.to: "over";
+ rel2.offset: -9 -9;
+ rel2.to: "over";
}
}
- part
- {
- name: "bg";
- type: RECT;
- mouse_events: 0;
- description
- {
- state: "default" 0.0;
- color: 255 255 255 0;
- rel1
- {
- relative: 0.0 0.0;
- offset: 10 10;
+
+ part { name: "over";
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ rel1.offset: 4 4;
+ rel2.offset: -5 -5;
+ image {
+ normal: "frame_1.png";
+ border: 2 2 28 22;
+ middle: 0;
}
- rel2
- {
- relative: 1.0 1.0;
- offset: -11 -11;
- }
+ fill.smooth : 0;
}
- description
- {
- state: "select" 0.0;
+ description{ state: "select" 0.0;
+
inherit: "default" 0.0;
- rel1
- {
- relative: -0.4 0.4;
- }
- rel2
- {
- relative: 1.4 1.4;
- }
+ rel1.relative: -0.4 -0.4;
+ rel2.relative: 1.4 1.4;
}
}
- part { name: "base";
- mouse_events: 0;
- description { state: "default" 0.0;
- image {
- normal: "frame_2.png";
- border: 5 5 32 26;
- middle: 0;
- }
- fill.smooth : 0;
- }
- }
- part { name: "walle.swallow.content";
- type: SWALLOW;
- description { state: "default" 0.0;
- rel1 {
- to: "bg";
- offset: 8 2;
- }
- rel2.offset: -9 -9;
- rel2.to: "bg";
- }
- }
- part
- {
- name: "event";
- type: RECT;
- mouse_events: 1;
- repeat_events : 1;
- description
- {
- state: "default" 0.0;
- color: 0 0 0 0;
- rel1.to: "bg";
- rel2.to: "bg";
- }
- }
}
+
programs
{
@@ -180,48 +160,21 @@
signal: "select";
source: "enna";
action: STATE_SET "select" 0.0;
- transition: LINEAR 0.2;
- target: "bg";
- target: "fg";
+ transition: DECELERATE 0.3;
+ target: "over";
}
program
{ name: "unsel";
signal: "unselect";
source: "enna";
action: STATE_SET "default" 0.0;
- transition: LINEAR 0.1;
- target: "bg";
- target: "fg";
+ transition: ACCELERATE 0.2;
+ target: "over";
}
}
}
-#define GROUP_ICON(icon_file, icon_name) \
-images { \
- image: icon_file RAW; \
-} \
-group { \
- name: icon_name; \
- parts { \
- part { \
- name: "icon"; \
- description { \
- state: "default" 0.0; \
- rel1 { \
- relative: 0 0; \
- } \
- rel2 { \
- relative: 1.0 1.0; \
- } \
- image { \
- normal: icon_file; \
- } \
- } \
- } \
- } \
+ GROUP_ICON("icon_resize.png", "walle/icon/resize")
+ GROUP_ICON("icon_rotate.png", "walle/icon/rotate")
+ GROUP_ICON("icon_config.png", "walle/icon/config")
}
-GROUP_ICON("icon_resize.png", "walle/icon/resize")
-GROUP_ICON("icon_rotate.png", "walle/icon/rotate")
-GROUP_ICON("icon_config.png", "walle/icon/config")
-}
-
Added: trunk/wall-e/data/theme/default/dia_grad.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/dia_grad.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/wall-e/data/theme/default/frame_1.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/frame_1.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Modified: trunk/wall-e/src/bin/wall.c
===================================================================
--- trunk/wall-e/src/bin/wall.c 2008-12-31 11:53:41 UTC (rev 525)
+++ trunk/wall-e/src/bin/wall.c 2008-12-31 15:27:03 UTC (rev 526)
@@ -12,8 +12,10 @@
const Evas_Smart_Class *api;
Evas_Object *o_box;
Eina_List *o_boxes;
+ Eina_List *items;
unsigned int nb_lines;
unsigned int nb_items;
+ int row_sel;
unsigned char vertical : 1;
};
@@ -57,7 +59,7 @@
static void _sizing_eval(Evas_Object *obj);
static void _changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info);
-static void _walle_wall_smart_add(Evas_Object *o);
+static void _wall_smart_add(Evas_Object *o);
static void
_changed_size_hints(void *data, Evas *e, Evas_Object *obj, void *event_info)
@@ -88,7 +90,7 @@
}
static void
-_walle_wall_smart_add(Evas_Object *o)
+_wall_smart_add(Evas_Object *o)
{
Walle_Wall_Data *priv;
Evas_Object *o_box;
@@ -198,16 +200,89 @@
}
+
+
+static Walle_Picture_Item *_wall_selected_item_get( Walle_Wall_Data *priv, int *row,
+ int *col)
+{
+ Eina_List *l, *l2;
+ int i, j;
+
+ for (l = priv->items, i = 0; l; l = l->next, i++)
+ {
+ Eina_List *items = l->data;
+ for (l2 = items, j = 0; l2; l2 = l2->next, j++)
+ {
+ Walle_Picture_Item *pi = l2->data;
+ if (pi->selected)
+ {
+ if (row)
+ *row = i;
+ if (col)
+ *col = j;
+ return pi;
+ }
+ }
+ }
+ if (row)
+ *row = -1;
+ if (col)
+ *col = -1;
+
+ return NULL;
+}
+
+static void _wall_item_unselect(Walle_Wall_Data *priv, Walle_Picture_Item *pi)
+{
+ if (!pi || !priv)
+ return;
+ pi->selected = 0;
+ edje_object_signal_emit(pi->o_edje, "unselect", "enna");
+
+}
+
+static void _wall_item_select(Walle_Wall_Data *priv, Walle_Picture_Item *pi)
+{
+ if (!pi)
+ return;
+
+ pi->selected = 1;
+ evas_object_raise(pi->o_edje);
+ evas_object_raise(eina_list_nth(pi->priv->o_boxes, pi->row));
+
+ edje_object_signal_emit(pi->o_edje, "select", "enna");
+
+ priv->row_sel = pi->row;
+}
+
static void
-_walle_wall_event_mouse_down_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
+_wall_event_mouse_down_cb(void *data, Evas *evas, Evas_Object *obj, void *event_info)
{
+ Walle_Picture_Item *pi, *ppi;
+ int row, col;
printf("Mouse Down\n");
+ pi = data;
+
+ ppi = _wall_selected_item_get(pi->priv, &row, &col);
+ if (ppi && ppi != pi)
+ {
+ ppi->selected = 0;
+ _wall_item_unselect(pi->priv, ppi);
+ }
+ else if (ppi == pi)
+ return;
+
+ evas_object_raise(eina_list_nth(pi->priv->o_boxes,pi->row));
+ evas_object_raise(pi->o_edje);
+ pi->selected = 1;
+ pi->priv->row_sel = pi->row;
+ _wall_item_select(pi->priv, pi);
}
static void
-_walle_wall_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h)
+_wall_smart_resize(Evas_Object *o, Evas_Coord w, Evas_Coord h)
{
Eina_List *l;
Evas_Object *o_box;
@@ -225,23 +300,23 @@
}
static void
-_walle_wall_smart_move(Evas_Object *o, Evas_Coord x, Evas_Coord y)
+_wall_smart_move(Evas_Object *o, Evas_Coord x, Evas_Coord y)
{
WALLE_WALL_DATA_GET(o, priv);
evas_object_move(priv->o_box, x, y);
}
static Evas_Smart *
-_walle_wall_smart_class_new(void)
+_wall_smart_class_new(void)
{
static Evas_Smart_Class api = {"Walle_Wall", EVAS_SMART_CLASS_VERSION};
if (!_parent_sc.name)
{
evas_object_smart_clipped_smart_set(&_parent_sc);
- api.add = _walle_wall_smart_add;
- api.resize = _walle_wall_smart_resize;
- api.move = _walle_wall_smart_move;
+ api.add = _wall_smart_add;
+ api.resize = _wall_smart_resize;
+ api.move = _wall_smart_move;
}
return evas_smart_class_new(&api);
@@ -254,7 +329,7 @@
Evas_Object *o;
if (!smart)
- smart = _walle_wall_smart_class_new();
+ smart = _wall_smart_class_new();
o = evas_object_smart_add(evas, smart);
return o;
@@ -270,6 +345,7 @@
Evas_Object *o_box;
Walle_Picture_Item *pi;
Evas_Coord ow, oh;
+ Eina_List *items = NULL;
WALLE_WALL_DATA_GET_OR_RETURN(o, priv);
@@ -298,9 +374,23 @@
elm_box_pack_end(o_box, pi->o_edje);
+ items = eina_list_nth(priv->items, n);
+ if (!items)
+ {
+ items = eina_list_append(items, pi);
+ priv->items = eina_list_append(priv->items, items);
+ }
+ else
+ {
+ items = eina_list_append(items, pi);
+ }
+
+ priv->items = eina_list_append(priv->items, items);
+
+
priv->nb_items ++;
evas_object_event_callback_add(pi->o_edje, EVAS_CALLBACK_MOUSE_DOWN,
- _walle_wall_event_mouse_down_cb, pi);
+ _wall_event_mouse_down_cb, pi);
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2008-12-31 12:22:24
|
Revision: 524
http://enna.svn.sourceforge.net/enna/?rev=524&view=rev
Author: captainigloo
Date: 2008-12-31 11:52:38 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
* Add toolbar
* Switch to b_and_w theme (moshi could be added later)
* Remove unused file
Modified Paths:
--------------
trunk/wall-e/data/theme/default/Makefile.am
trunk/wall-e/data/theme/default/default.edc
trunk/wall-e/data/theme/default/shadow.png
trunk/wall-e/src/bin/main.c
trunk/wall-e/src/bin/wall-e.h
Added Paths:
-----------
trunk/wall-e/data/theme/default/frame_2.png
trunk/wall-e/data/theme/default/icon_config.png
trunk/wall-e/data/theme/default/icon_down_arrow.png
trunk/wall-e/data/theme/default/icon_resize.png
trunk/wall-e/data/theme/default/icon_rotate.png
Removed Paths:
-------------
trunk/wall-e/data/theme/default/background.png
trunk/wall-e/data/theme/default/bt_sm_base2.png
trunk/wall-e/data/theme/default/bt_sm_hilight.png
trunk/wall-e/data/theme/default/bt_sm_shine.png
trunk/wall-e/data/theme/default/button_options_closed.png
trunk/wall-e/data/theme/default/hbar.png
trunk/wall-e/data/theme/default/motif_bottom.png
trunk/wall-e/data/theme/default/motif_top.png
trunk/wall-e/data/theme/default/picture_bg.png
trunk/wall-e/data/theme/default/sb_runnerh.png
trunk/wall-e/data/theme/default/sb_runnerv.png
trunk/wall-e/data/theme/default/shelf_inset.png
trunk/wall-e/data/theme/default/vbar.png
Modified: trunk/wall-e/data/theme/default/Makefile.am
===================================================================
--- trunk/wall-e/data/theme/default/Makefile.am 2008-12-31 09:45:13 UTC (rev 523)
+++ trunk/wall-e/data/theme/default/Makefile.am 2008-12-31 11:52:38 UTC (rev 524)
@@ -7,18 +7,7 @@
files_DATA = default.edj
EXTRA_DIST = \
-default.edc \
-background.png \
-motif_top.png \
-motif_bottom.png \
-bg_shadow.png \
-button_options_closed.png \
-shelf_inset.png \
-bt_sm_base2.png \
-bt_sm_shine.png \
-bt_sm_hilight.png \
-sb_runnerh.png \
-sb_runnerv.png
+default.edc
default.edj: Makefile $(EXTRA_DIST)
$(EDJE_CC) $(EDJE_FLAGS) \
Deleted: trunk/wall-e/data/theme/default/background.png
===================================================================
(Binary files differ)
Deleted: trunk/wall-e/data/theme/default/bt_sm_base2.png
===================================================================
(Binary files differ)
Deleted: trunk/wall-e/data/theme/default/bt_sm_hilight.png
===================================================================
(Binary files differ)
Deleted: trunk/wall-e/data/theme/default/bt_sm_shine.png
===================================================================
(Binary files differ)
Deleted: trunk/wall-e/data/theme/default/button_options_closed.png
===================================================================
(Binary files differ)
Modified: trunk/wall-e/data/theme/default/default.edc
===================================================================
--- trunk/wall-e/data/theme/default/default.edc 2008-12-31 09:45:13 UTC (rev 523)
+++ trunk/wall-e/data/theme/default/default.edc 2008-12-31 11:52:38 UTC (rev 524)
@@ -7,15 +7,7 @@
*/
images {
- image: "vbar.png" COMP;
- image: "background.png" COMP;
- image: "motif_top.png" COMP;
- image: "motif_bottom.png" COMP;
- image: "hbar.png" COMP;
- image: "bg_shadow.png" COMP;
- image: "button_options_closed.png" COMP;
- image: "picture_bg.png" COMP;
- image: "shadow.png" COMP;
+ image: "frame_2.png" COMP;
}
collections {
@@ -38,57 +30,10 @@
mouse_events: 0;
description {
state: "default" 0.0;
- color: 0 0 0 255;
- }
- }
- /* Background image */
- part{
- name: "bg_img";
- description {
- state: "default" 0.0;
color: 255 255 255 255;
- image.normal: "background.png";
- fill {
- smooth: 0;
- size {
- relative: 0 0;
- offset: 32 32;
- }
- }
}
}
- /* Top flame */
- part {
- name: "bg_motif_top";
- description {
- state: "default" 0.0;
- color: 255 255 255 255;
- image.normal: "motif_top.png";
- rel1 { relative: 0.0 0.0; offset: -5 -20; }
- rel2 { relative: 0.0 0.0; offset: 246 173; }
- }
- }
- /* Bottom Flame */
- part {
- name: "bg_motif_bottom";
- description {
- state: "default" 0.0;
- image.normal: "motif_bottom.png";
- rel1 { relative: 1.0 1.0; offset: -246 -277; }
- rel2 { relative: 1.0 1.0; offset: 5 20; }
- }
- }
- /* Border shadow */
- part {
- name: "bg_shadow";
- description {
- state: "default" 0.0;
- image.normal: "bg_shadow.png";
- image.border: 40 40 40 40;
- }
- }
-
/* Wall swallow */
part {
name: "walle.swallow.content";
@@ -97,48 +42,23 @@
description {
state: "default" 0.0;
color: 0 0 0 255;
- rel1.relative: 0 1;
- rel1.to: "top_panel_bg";
+ //rel1.relative: 0 1;
+
rel2.relative: 1 0;
- rel2.to: "bottom_panel_bg";
+ rel2.to: "walle.swallow.toolbar";
}
}
- /* Top panel */
- part {
- name: "top_panel_bg";
- type: RECT;
- mouse_events: 0;
- description {
- state: "default" 0.0;
- visible: 0;
- color: 255 255 255 0;
- rel1.relative: 0 0;
- rel2.relative: 1 0;
- rel2.offset: 0 18;
- }
- }
- part {
- name: "button_options_closed";
- description {
- min: 132 18;
- max: 132 18;
- state: "default" 0.0;
- align: 0.5 0;
- rel1.to: "top_panel_bg";
- rel2.to: "top_panel_bg";
- image.normal: "button_options_closed.png";
- }
- }
+
/* Bottom panel */
part {
- name: "bottom_panel_bg";
- type: RECT;
- mouse_events: 0;
+ name: "walle.swallow.toolbar";
+ type: SWALLOW;
+ mouse_events: 1;
description {
state: "default" 0.0;
- color: 255 255 255 128;
+ color: 0 255 255 255;
rel1.relative: 0 1;
- rel1.offset: 0 -32;
+ rel1.offset: 0 -65;
rel2.relative: 1 1;
}
}
@@ -166,10 +86,12 @@
rel2.to: "bg";
rel1.offset: -15 -15;
rel2.offset: 31 31;
+
image
{
- normal: "picture_bg.png";
- border: 15 31 15 31;
+ normal: "frame_2.png";
+ border: 5 5 32 26;
+ middle: 0;;
}
}
description
@@ -213,52 +135,28 @@
}
}
}
- part {
- name: "shadow_picture";
- type: IMAGE;
- mouse_events: 0;
- //clip_to: "bg";
- description
- {
- state: "default" 0.0;
- visible: 1;
- color: 255 255 255 255;
- rel1 { relative: 0.0 0.0; to: "walle.swallow.content"; }
- rel2 { relative: 1.0 1.0; to: "walle.swallow.content"; offset: 13 13; }
- image.normal: "shadow.png";
- image.border: 14 14 14 14;
- }
- description
- {
- state: "select" 0.0;
- inherit: "default" 0.0;
- visible: 0;
- color: 255 255 255 0;
- }
- }
- part
- {
- name: "walle.swallow.content";
- type: SWALLOW;
- mouse_events: 0;
- //clip_to: "bg";
- description
- {
- state: "default" 0.0;
- rel1
- {
- relative: 0.0 0.0;
+ part { name: "base";
+ mouse_events: 0;
+ description { state: "default" 0.0;
+ image {
+ normal: "frame_2.png";
+ border: 5 5 32 26;
+ middle: 0;
+ }
+ fill.smooth : 0;
+ }
+ }
+ part { name: "walle.swallow.content";
+ type: SWALLOW;
+ description { state: "default" 0.0;
+ rel1 {
to: "bg";
- //offset: 10 10;
- }
- rel2
- {
- relative: 1.0 1.0;
- to: "bg";
- //offset: -11 -11;
- }
- }
- }
+ offset: 8 2;
+ }
+ rel2.offset: -9 -9;
+ rel2.to: "bg";
+ }
+ }
part
{
name: "event";
@@ -285,7 +183,6 @@
transition: LINEAR 0.2;
target: "bg";
target: "fg";
- target: "shadow_picture";
}
program
{ name: "unsel";
@@ -295,9 +192,36 @@
transition: LINEAR 0.1;
target: "bg";
target: "fg";
- target: "shadow_picture";
}
}
}
+#define GROUP_ICON(icon_file, icon_name) \
+images { \
+ image: icon_file RAW; \
+} \
+group { \
+ name: icon_name; \
+ parts { \
+ part { \
+ name: "icon"; \
+ description { \
+ state: "default" 0.0; \
+ rel1 { \
+ relative: 0 0; \
+ } \
+ rel2 { \
+ relative: 1.0 1.0; \
+ } \
+ image { \
+ normal: icon_file; \
+ } \
+ } \
+ } \
+ } \
}
+GROUP_ICON("icon_resize.png", "walle/icon/resize")
+GROUP_ICON("icon_rotate.png", "walle/icon/rotate")
+GROUP_ICON("icon_config.png", "walle/icon/config")
+}
+
Added: trunk/wall-e/data/theme/default/frame_2.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/frame_2.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/wall-e/data/theme/default/hbar.png
===================================================================
(Binary files differ)
Added: trunk/wall-e/data/theme/default/icon_config.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/icon_config.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/wall-e/data/theme/default/icon_down_arrow.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/icon_down_arrow.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/wall-e/data/theme/default/icon_resize.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/icon_resize.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Added: trunk/wall-e/data/theme/default/icon_rotate.png
===================================================================
(Binary files differ)
Property changes on: trunk/wall-e/data/theme/default/icon_rotate.png
___________________________________________________________________
Added: svn:mime-type
+ application/octet-stream
Deleted: trunk/wall-e/data/theme/default/motif_bottom.png
===================================================================
(Binary files differ)
Deleted: trunk/wall-e/data/theme/default/motif_top.png
===================================================================
(Binary files differ)
Deleted: trunk/wall-e/data/theme/default/picture_bg.png
===================================================================
(Binary files differ)
Deleted: trunk/wall-e/data/theme/default/sb_runnerh.png
===================================================================
(Binary files differ)
Deleted: trunk/wall-e/data/theme/default/sb_runnerv.png
===================================================================
(Binary files differ)
Modified: trunk/wall-e/data/theme/default/shadow.png
===================================================================
(Binary files differ)
Deleted: trunk/wall-e/data/theme/default/shelf_inset.png
===================================================================
(Binary files differ)
Deleted: trunk/wall-e/data/theme/default/vbar.png
===================================================================
(Binary files differ)
Modified: trunk/wall-e/src/bin/main.c
===================================================================
--- trunk/wall-e/src/bin/main.c 2008-12-31 09:45:13 UTC (rev 523)
+++ trunk/wall-e/src/bin/main.c 2008-12-31 11:52:38 UTC (rev 524)
@@ -253,7 +253,28 @@
edje_object_part_swallow(walle->o_edje, "walle.swallow.content", o);
walle->o_scroll = o;
+ o = elm_toolbar_add(walle->o_win);
+ evas_object_size_hint_weight_set(o, 0.0, 0.0);
+ evas_object_size_hint_align_set(o, -1.0, 0.0);
+ walle->o_toolbar = o;
+
+ o = elm_icon_add(walle->o_win);
+ elm_icon_file_set(o, theme, "walle/icon/resize");
+ elm_toolbar_item_add(walle->o_toolbar, o, "Resize", NULL, NULL);
+
+ o = elm_icon_add(walle->o_win);
+ elm_icon_file_set(o, theme, "walle/icon/rotate");
+ elm_toolbar_item_add(walle->o_toolbar, o, "Rotate", NULL, NULL);
+
+ o = elm_icon_add(walle->o_win);
+ elm_icon_file_set(o, theme, "walle/icon/config");
+ elm_toolbar_item_add(walle->o_toolbar, o, "Configuration", NULL, NULL);
+
+
+ evas_object_size_hint_min_set(walle->o_toolbar, -1, -1);
+ edje_object_part_swallow(walle->o_edje, "walle.swallow.toolbar", walle->o_toolbar);
+
o = walle_wall_add(walle->evas);
walle_wall_lines_set(o, lines);
walle->o_wall = o;
Modified: trunk/wall-e/src/bin/wall-e.h
===================================================================
--- trunk/wall-e/src/bin/wall-e.h 2008-12-31 09:45:13 UTC (rev 523)
+++ trunk/wall-e/src/bin/wall-e.h 2008-12-31 11:52:38 UTC (rev 524)
@@ -7,5 +7,6 @@
Evas_Object *o_edje;
Evas_Object *o_wall;
Evas_Object *o_scroll;
+ Evas_Object *o_toolbar;
Evas_Coord app_w, app_h;
};
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <cap...@us...> - 2008-12-31 12:22:21
|
Revision: 525
http://enna.svn.sourceforge.net/enna/?rev=525&view=rev
Author: captainigloo
Date: 2008-12-31 11:53:41 +0000 (Wed, 31 Dec 2008)
Log Message:
-----------
remove unused image files
Removed Paths:
-------------
trunk/wall-e/data/theme/default/bg_shadow.png
trunk/wall-e/data/theme/default/shadow.png
Deleted: trunk/wall-e/data/theme/default/bg_shadow.png
===================================================================
(Binary files differ)
Deleted: trunk/wall-e/data/theme/default/shadow.png
===================================================================
(Binary files differ)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|