Enlightenment CVS committal
Author : essiene
Project : e17
Module : proto
Dir : e17/proto/entrance_edit_gui/src/widgets
Modified Files:
Entrance_Widgets.h Makefile.am ew_dialog.c
Added Files:
ew_button.c ew_button.h
Log Message:
- Added ew_button a generic button.
- Use ew_button internally in ew_dialog. Clean things up a bit. That baby is
looking saner by the minute.
- Use ew_button to spruce up theme and background 'browse' dialogs. Now all we
need is a fileselector. Anyone for sale? I'll give LInuxTitan's left pinkie :P
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/Entrance_Widgets.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- Entrance_Widgets.h 15 Aug 2006 00:51:53 -0000 1.5
+++ Entrance_Widgets.h 15 Aug 2006 02:36:45 -0000 1.6
@@ -3,7 +3,6 @@
#include <Etk.h>
-
#include "ew.h"
#include "ew_dialog.h"
#include "ew_group.h"
@@ -14,10 +13,6 @@
#include "ew_messagebox.h"
#include "ew_label.h"
#include "ew_entry.h"
-
-
-
-
-
+#include "ew_button.h"
#endif
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/Makefile.am,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- Makefile.am 15 Aug 2006 00:51:53 -0000 1.6
+++ Makefile.am 15 Aug 2006 02:36:45 -0000 1.7
@@ -19,7 +19,8 @@
\
ew_image.h \
ew_label.h \
- ew_entry.h
+ ew_entry.h \
+ ew_button.h
libentrance_widgets_ladir = $(prefix)/include
@@ -36,6 +37,7 @@
ew_messagebox.c \
ew_label.c \
ew_entry.c \
+ ew_button.c \
$(libentrance_widgets_la_HEADERS)
libentrance_widgets_la_LIBADD = @etk_libs@
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/ew_dialog.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -3 -r1.4 -r1.5
--- ew_dialog.c 14 Aug 2006 17:08:55 -0000 1.4
+++ ew_dialog.c 15 Aug 2006 02:36:45 -0000 1.5
@@ -2,6 +2,7 @@
#include "Entrance_Widgets.h"
static void _ew_cb_destroy(void *);
+static void _ew_dialog_add_bottom(Entrance_Dialog d, Entrance_Widget ew);
Entrance_Dialog
_ew_dialog_new()
@@ -50,12 +51,7 @@
etk_widget_show_all(ew->owner);
}
-/*void
-ew_dialog_add(Entrance_Dialog d, Entrance_Widget ew)
-{
- if(d && ew)
- etk_box_pack_start(ETK_BOX(d->box), ew->box, ETK_TRUE,
ETK_TRUE, 0);
-}*/
+
Entrance_Widget
ew_dialog_group_add(Entrance_Dialog d, const char *title, int direction)
@@ -71,28 +67,39 @@
return ew;
}
+/*void
+ew_dialog_add(Entrance_Dialog d, Entrance_Widget ew)
+{
+ if(d && ew)
+ etk_box_pack_start(ETK_BOX(d->box), ew->box, ETK_TRUE,
ETK_TRUE, 0);
+}*/
+
+
+void
+ew_dialog_button_add(Entrance_Dialog ew, const char *title, void
(*func)(void*, void*), void *data)
+{
+ /*TODO: poke all buttons into an ecore_list*/
+ Entrance_Widget button = ew_button_new(title, func, data);
+ _ew_dialog_add_bottom(ew, button);
+}
+
+
void
ew_dialog_close_button_add(Entrance_Dialog ew, void (*func)(void *, void*),
void *data)
{
- Etk_Widget *button = etk_button_new_with_label(_("Close"));
- etk_signal_connect("clicked", ETK_OBJECT(button), ETK_CALLBACK(func),
data);
- etk_box_pack_start(ETK_BOX(ew->hbox), button, ETK_TRUE, ETK_TRUE, 0);
+ ew_dialog_button_add(ew, _("Close"), func, data);
}
void
ew_dialog_apply_button_add(Entrance_Dialog ew, void (*func)(void *, void*),
void *data)
{
- Etk_Widget *button = etk_button_new_with_label(_("Apply"));
- etk_signal_connect("clicked", ETK_OBJECT(button), ETK_CALLBACK(func),
data);
- etk_box_pack_start(ETK_BOX(ew->hbox), button, ETK_TRUE, ETK_TRUE, 0);
+ ew_dialog_button_add(ew, _("Apply"), func, data);
}
void
ew_dialog_ok_button_add(Entrance_Dialog ew, void (*func)(void *, void*), void
*data)
{
- Etk_Widget *button = etk_button_new_with_label(_("Ok"));
- etk_signal_connect("clicked", ETK_OBJECT(button), ETK_CALLBACK(func),
data);
- etk_box_pack_start(ETK_BOX(ew->hbox), button, ETK_TRUE, ETK_TRUE, 0);
+ ew_dialog_button_add(ew, _("Ok"), func, data);
}
void
@@ -107,3 +114,11 @@
{
ew_main_quit();
}
+
+static void
+_ew_dialog_add_bottom(Entrance_Dialog d, Entrance_Widget ew)
+{
+ if(d && ew)
+ etk_box_pack_start(ETK_BOX(d->hbox), ew->owner, ETK_TRUE,
ETK_TRUE, 0);
+}
+
-------------------------------------------------------------------------
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