Enlightenment CVS committal
Author : rhapsodhy
Project : e17
Module : proto
Dir : e17/proto/entrance_edit_gui/src/widgets
Modified Files:
_ew_list.c ew.c ew.h ew_dialog.c ew_edjelist.c ew_entry.c
ew_fileselector.c ew_textlist.c
Log Message:
Freeing won't be problem from now, and as essiene asked i renamed the struct's
variables.
Now they represent the object they belong to.
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/_ew_list.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- _ew_list.c 23 Aug 2006 19:11:25 -0000 1.8
+++ _ew_list.c 24 Aug 2006 12:58:14 -0000 1.9
@@ -19,7 +19,7 @@
etk_tree_headers_visible_set(ETK_TREE(ew->owner), ETK_FALSE);
etk_tree_row_height_set(ETK_TREE(ew->owner), r_h);
- ew->col = NULL;
+ ew->list_col = NULL;
return ew;
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/ew.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ew.c 23 Aug 2006 19:11:25 -0000 1.3
+++ ew.c 24 Aug 2006 12:58:14 -0000 1.4
@@ -8,19 +8,19 @@
}
void
-ew_main()
+ew_main(void)
{
etk_main();
}
void
-ew_main_quit()
+ew_main_quit(void)
{
etk_main_quit();
}
int
-ew_shutdown()
+ew_shutdown(void)
{
return etk_shutdown();
}
@@ -33,15 +33,30 @@
{
ew->owner = NULL;
ew->box = NULL;
- ew->hbox = NULL;
ew->label = NULL;
- ew->control = NULL;
- ew->col = NULL;
+ ew->dialog_hbox = NULL;
+ ew->entry_control = NULL;
+ ew->list_col = NULL;
ew->preview_smart = NULL;
ew->extra = NULL;
}
return ew;
+}
+
+void
+ew_widget_destroy(Entrance_Widget ew) {
+ EW_FREE(ew);
+}
+
+void
+ew_widget_extra_set(Entrance_Widget w, void *extra) {
+ w->extra = extra;
+}
+
+void *
+ew_widget_extra_get(Entrance_Widget w) {
+ return w->extra;
}
/* privates */
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/ew.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ew.h 23 Aug 2006 19:11:25 -0000 1.3
+++ ew.h 24 Aug 2006 12:58:14 -0000 1.4
@@ -4,32 +4,33 @@
typedef struct _Entrance_Widget {
Etk_Widget *owner;
Etk_Widget *box;
- Etk_Widget *hbox;
Etk_Widget *label;
- Etk_Widget *control;
+ Etk_Widget *dialog_hbox;
+ Etk_Widget *entry_control;
- Etk_Tree_Col *col;
+ Etk_Tree_Col *list_col;
Evas_Object *preview_smart;
void *extra;
} *Entrance_Widget;
+#define _EW_FREE(ew) if(ew) \
+{ \
+ etk_object_destroy(ETK_OBJECT(ew)); \
+ free(ew); \
+}
-#define EW_FREE(ew) if(1) \
+#define EW_FREE(ew) if(ew) \
{ \
- if(ew) \
- { \
- if(ew->owner) { free(ew->owner); } \
- if(ew->box) { free(ew->box); } \
- if(ew->hbox) { free(ew->hbox); } \
- if(ew->label) { free(ew->label); } \
- if(ew->control) { free(ew->control); } \
- if(ew->col) { free(ew->col); } \
- if(ew->preview_smart) { free(ew->preview_smart); } \
- if(ew->extra) { free(ew->extra) } \
+ if(ew->owner) { _EW_FREE(ew->owner); } \
+ if(ew->box) { _EW_FREE(ew->box); } \
+ if(ew->label) { _EW_FREE(ew->label); } \
+ if(ew->dialog_hbox) { _EW_FREE(ew->dialog_hbox); } \
+ if(ew->entry_control) { _EW_FREE(ew->entry_control); } \
+ if(ew->list_col) { _EW_FREE(ew->list_col); } \
+ if(ew->preview_smart) { _EW_FREE(ew->preview_smart); } \
+ if(ew->extra) { free(ew->extra); } \
free(ew); \
- } \
-} \
-else \
+}
#define EW_FALSE 0
#define EW_TRUE 1
@@ -41,5 +42,7 @@
Entrance_Widget ew_new(void);
void ew_widget_destroy(Entrance_Widget);
+void ew_widget_extra_set(Entrance_Widget, void *);
+void *ew_widget_extra_get(Entrance_Widget);
#endif
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/ew_dialog.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ew_dialog.c 23 Aug 2006 19:11:25 -0000 1.10
+++ ew_dialog.c 24 Aug 2006 12:58:14 -0000 1.11
@@ -88,7 +88,7 @@
void
ew_dialog_destroy(Entrance_Widget ew)
{
- etk_object_destroy(ETK_OBJECT(ew->owner));
+ ew_widget_destroy(ew);
}
/*privates*/
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/ew_edjelist.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ew_edjelist.c 23 Aug 2006 19:11:25 -0000 1.3
+++ ew_edjelist.c 24 Aug 2006 12:58:14 -0000 1.4
@@ -13,7 +13,7 @@
return NULL;
}
- ew->col = etk_tree_col_new(ETK_TREE(ew->owner), NULL,
etk_tree_model_icon_text_new(ETK_TREE(ew->owner), ETK_TREE_FROM_EDJE), c_w);
+ ew->list_col = etk_tree_col_new(ETK_TREE(ew->owner), NULL,
etk_tree_model_icon_text_new(ETK_TREE(ew->owner), ETK_TREE_FROM_EDJE), c_w);
return _ew_list_buildtree(ew);
}
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/ew_entry.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ew_entry.c 23 Aug 2006 19:11:25 -0000 1.12
+++ ew_entry.c 24 Aug 2006 12:58:14 -0000 1.13
@@ -11,7 +11,7 @@
}
ew->owner = etk_hbox_new(0, 10);
- ew->control = etk_entry_new();
+ ew->entry_control = etk_entry_new();
if(ispassword)
@@ -23,7 +23,7 @@
etk_box_append(ETK_BOX(ew->owner), ew->label, ETK_BOX_START,
ETK_BOX_EXPAND_FILL, 0);
}
- etk_box_append(ETK_BOX(ew->owner), ew->control, ETK_BOX_START,
ETK_BOX_EXPAND_FILL, 0);
+ etk_box_append(ETK_BOX(ew->owner), ew->entry_control, ETK_BOX_START,
ETK_BOX_EXPAND_FILL, 0);
if(text)
{
ew_entry_set(ew, text);
@@ -34,26 +34,26 @@
const char*
ew_entry_get(Entrance_Widget ew)
{
- return etk_entry_text_get(ETK_ENTRY(ew->control));
+ return etk_entry_text_get(ETK_ENTRY(ew->entry_control));
}
void
ew_entry_set(Entrance_Widget ew, const char *text)
{
if(ew)
- etk_entry_text_set(ETK_ENTRY(ew->control), text);
+ etk_entry_text_set(ETK_ENTRY(ew->entry_control), text);
}
void
ew_entry_password_set(Entrance_Widget ew)
{
if(ew)
- etk_entry_password_mode_set(ETK_ENTRY(ew->control), ETK_TRUE);
+ etk_entry_password_mode_set(ETK_ENTRY(ew->entry_control),
ETK_TRUE);
}
void
ew_entry_password_clear(Entrance_Widget ew)
{
if(ew)
- etk_entry_password_mode_set(ETK_ENTRY(ew->control), ETK_FALSE);
+ etk_entry_password_mode_set(ETK_ENTRY(ew->entry_control),
ETK_FALSE);
}
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/ew_fileselector.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- ew_fileselector.c 23 Aug 2006 19:11:25 -0000 1.2
+++ ew_fileselector.c 24 Aug 2006 12:58:14 -0000 1.3
@@ -4,15 +4,15 @@
ew_fileselector_new(const char *title, const char *directory, int multiple,
int showdot,
void (*response)(void *, int, void *), void *data) {
Entrance_Widget dialog = ew_notice_new(title);
- dialog->hbox = etk_filechooser_widget_new();
+ dialog->dialog_hbox = etk_filechooser_widget_new();
if(directory)
-
etk_filechooser_widget_current_folder_set(ETK_FILECHOOSER_WIDGET(dialog->hbox),
directory);
+
etk_filechooser_widget_current_folder_set(ETK_FILECHOOSER_WIDGET(dialog->dialog_hbox),
directory);
-
etk_filechooser_widget_select_multiple_set(ETK_FILECHOOSER_WIDGET(dialog->hbox),
multiple);
-
etk_filechooser_widget_show_hidden_set(ETK_FILECHOOSER_WIDGET(dialog->hbox),
showdot);
+
etk_filechooser_widget_select_multiple_set(ETK_FILECHOOSER_WIDGET(dialog->dialog_hbox),
multiple);
+
etk_filechooser_widget_show_hidden_set(ETK_FILECHOOSER_WIDGET(dialog->dialog_hbox),
showdot);
- etk_box_append(ETK_BOX(dialog->box), dialog->hbox, ETK_BOX_START,
ETK_BOX_EXPAND_FILL, 0);
+ etk_box_append(ETK_BOX(dialog->box), dialog->dialog_hbox,
ETK_BOX_START, ETK_BOX_EXPAND_FILL, 0);
ew_notice_cancel_button_add(dialog, response, data);
ew_notice_ok_button_add(dialog, NULL, NULL);
@@ -22,10 +22,10 @@
const char *
ew_fileselector_file_get(Entrance_Widget dialog) {
- return
etk_filechooser_widget_selected_file_get(ETK_FILECHOOSER_WIDGET(dialog->hbox));
+ return
etk_filechooser_widget_selected_file_get(ETK_FILECHOOSER_WIDGET(dialog->dialog_hbox));
}
Evas_List *
ew_fileselector_file_list_get(Entrance_Widget dialog) {
- return
etk_filechooser_widget_selected_files_get(ETK_FILECHOOSER_WIDGET(dialog->hbox));
+ return
etk_filechooser_widget_selected_files_get(ETK_FILECHOOSER_WIDGET(dialog->dialog_hbox));
}
===================================================================
RCS file: /cvs/e/e17/proto/entrance_edit_gui/src/widgets/ew_textlist.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -3 -r1.3 -r1.4
--- ew_textlist.c 23 Aug 2006 19:11:25 -0000 1.3
+++ ew_textlist.c 24 Aug 2006 12:58:14 -0000 1.4
@@ -13,7 +13,7 @@
return NULL;
}
- ew->col = etk_tree_col_new(ETK_TREE(ew->owner), NULL,
etk_tree_model_text_new(ETK_TREE(ew->owner)), c_w);
+ ew->list_col = etk_tree_col_new(ETK_TREE(ew->owner), NULL,
etk_tree_model_text_new(ETK_TREE(ew->owner)), c_w);
return _ew_list_buildtree(ew);
}
-------------------------------------------------------------------------
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