Enlightenment CVS committal
Author : essiene
Project : e17
Module : proto
Dir : e17/proto/entrance_edit_gui/src/gui
Modified Files:
Egui.h Makefile.am background.c egui_graphics_selector.c
main.c theme.c
Log Message:
- Added bunch of smart objects to help with preview
- Updated autofoo to pull in evas, ecore, edje dependencies into the build
process since i have smart objects now.
- Added ew_preview currently based on etk_canvas (i wonder how the ewl
counterpart works)
- HOORAY! preview widget works properly. There is still one todo related to
it... but it works even. Now, one TODO i was actually scared of is Dead...
0xDEADBEEF it has become! Thanks to all who took time to explain all them brain
bending concepts to moi. Codewarrior... you drink beer? ;;)
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/gui/Egui.h,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- Egui.h 18 Aug 2006 04:51:53 -0000 1.9
+++ Egui.h 23 Aug 2006 02:10:49 -0000 1.10
@@ -27,6 +27,7 @@
void egui_behavior_dialog_show(void);
void egui_sessions_dialog_show(void);
void egui_x_settings_dialog_show(void);
+void egui_preview_show(void);
void egui_gs_dialog_show(Egui_Graphics_Selector);
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/gui/Makefile.am,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- Makefile.am 18 Aug 2006 04:51:53 -0000 1.12
+++ Makefile.am 23 Aug 2006 02:10:49 -0000 1.13
@@ -17,12 +17,15 @@
entrance_edit_gui_CFLAGS = \
-I$(top_srcdir)/src/widgets \
+ -I$(top_srcdir)/src/smarts \
@etk_cflags@ \
@entrance_edit_cflags@
entrance_edit_gui_LDFLAGS = \
- -L$(top_srcdir)/src/widgets
+ -L$(top_srcdir)/src/widgets \
+ -L$(top_srcdir)/src/smarts
entrance_edit_gui_LDADD = \
-lentrance_widgets \
+ -lentrance_smarts \
@entrance_edit_libs@
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/gui/background.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- background.c 16 Aug 2006 01:05:52 -0000 1.8
+++ background.c 23 Aug 2006 02:10:49 -0000 1.9
@@ -21,5 +21,4 @@
};
egui_gs_dialog_show(background_egs);
-
}
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/gui/egui_graphics_selector.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- egui_graphics_selector.c 16 Aug 2006 19:21:31 -0000 1.10
+++ egui_graphics_selector.c 23 Aug 2006 02:10:49 -0000 1.11
@@ -1,10 +1,17 @@
#include <limits.h>
+#include <Evas.h>
#include <Ecore_File.h>
#include <Ecore_Data.h>
#include <Entrance_Edit.h>
#include <Entrance_Widgets.h>
+#include <Entrance_Smart.h>
#include "Egui.h"
+#define PREVIEW_WIDTH 320
+#define PREVIEW_HEIGHT 240
+#define PREVIEW_V_WIDTH 1024
+#define PREVIEW_V_HEIGHT 768
+
static void _gs_cb_selected(void);
static void _gs_cb_ok(void *, void *);
static void _gs_cb_apply(void *, void *);
@@ -18,7 +25,7 @@
static void _gs_load_preview(const char *);
static Entrance_Dialog win;
-static Entrance_Widget img_preview;
+static Entrance_Preview img_preview;
static Entrance_Widget pointer_preview;
static Entrance_List list_thumbs;
static Entrance_Entry browse_entry;
@@ -41,16 +48,14 @@
group_preview = ew_dialog_group_add(win, _("Preview"), EW_GROUP_VERTICAL);
- img_preview = ew_image_new(320, 240);
+ img_preview = ew_preview_new(PREVIEW_WIDTH, PREVIEW_HEIGHT);
ew_group_add(group_preview, img_preview);
group_graphics = ew_dialog_group_add(win, egs.list_title,
EW_GROUP_VERTICAL);
- list_thumbs = ew_textlist_new(NULL, 320, 140, 20, 90);
-
- char *first = _gs_populate_list();
- _gs_load_preview(first);
+ list_thumbs = ew_textlist_new(NULL, PREVIEW_WIDTH, 140, 20, 90);
+
ew_group_add(group_graphics, list_thumbs);
char t[PATH_MAX];
@@ -79,6 +84,10 @@
ew_dialog_ok_button_add(win, _gs_cb_ok, NULL);
ew_dialog_show(win);
+
+
+ char *first = _gs_populate_list();
+ _gs_load_preview(first);
}
static void
@@ -191,7 +200,21 @@
_gs_load_preview(const char *graphic)
{
char *file = _gs_get_path(graphic);
- ew_image_edje_load(img_preview, file, egs.preview_edje_part);
+ Evas *evas = ew_preview_evas_get(img_preview, PREVIEW_WIDTH,
PREVIEW_HEIGHT, PREVIEW_V_WIDTH, PREVIEW_V_HEIGHT);
+
+ /*TODO: currently, i'm just grabbing *file and displaying blindly, which
mean, I won't be able to
+ * preview different background and themes, the below commented code
should be filled out to
+ * pick up the most recently selected combo of bg and theme, and use
that instead*/
+
+ /*char *bg_path = _gs_get_bg_path();
+ char *theme_path = _gs_get_theme_path();*/
+
+ Evas_Object *es = es_new(evas);
+ es_background_edje_set(es, file);
+ es_main_edje_set(es, file);
+ evas_object_resize(es, PREVIEW_V_WIDTH, PREVIEW_V_HEIGHT);
+ evas_object_show(es);
+
free(file);
/*FIXME: selecting the first row doesn't work - maybe we select first row
while adding elements to the list:(*/
/*ew_list_first_row_select(list_thumbs);*/
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/gui/main.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- main.c 18 Aug 2006 05:13:14 -0000 1.12
+++ main.c 23 Aug 2006 02:10:49 -0000 1.13
@@ -1,5 +1,6 @@
#include <Entrance_Widgets.h>
#include <Entrance_Edit.h>
+#include <Entrance_Smart.h>
#include "Egui.h"
#include "config.h"
@@ -15,6 +16,7 @@
ecore_init();
entrance_edit_init(NULL);
ew_init(&argc, &argv);
+ entrance_smart_init();
_main_dialog_show();
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/gui/theme.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- theme.c 16 Aug 2006 01:05:52 -0000 1.9
+++ theme.c 23 Aug 2006 02:10:49 -0000 1.10
@@ -20,5 +20,7 @@
1
};
+
egui_gs_dialog_show(theme_egs);
+
}
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs