Enlightenment CVS committal
Author : rbdpngn
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src
Modified Files:
ewl_entry.c ewl_entry.h ewl_textarea.c ewl_tree.c
Log Message:
Some minor changes in the tree, as well as an addition to the entry API.
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_entry.c,v
retrieving revision 1.51
retrieving revision 1.52
diff -u -3 -r1.51 -r1.52
--- ewl_entry.c 25 Mar 2003 18:36:08 -0000 1.51
+++ ewl_entry.c 29 Mar 2003 23:20:18 -0000 1.52
@@ -94,16 +94,13 @@
*/
ewl_callback_append(w, EWL_CALLBACK_CONFIGURE,
__ewl_entry_configure, NULL);
- ewl_callback_append(w, EWL_CALLBACK_KEY_DOWN, __ewl_entry_key_down,
- NULL);
- ewl_callback_append(w, EWL_CALLBACK_MOUSE_DOWN, __ewl_entry_mouse_down,
- NULL);
- ewl_callback_append(w, EWL_CALLBACK_MOUSE_MOVE, __ewl_entry_mouse_move,
- NULL);
+
ewl_callback_append(w, EWL_CALLBACK_SELECT, __ewl_entry_select, NULL);
ewl_callback_append(w, EWL_CALLBACK_DESELECT, __ewl_entry_deselect,
NULL);
+ ewl_entry_set_editable(e, TRUE);
+
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
@@ -146,6 +143,48 @@
w = EWL_WIDGET(e);
DRETURN_PTR(ewl_text_get_text(EWL_TEXT(e->text)), DLEVEL_STABLE);
+}
+
+/**
+ * ewl_entry_set_editable - change the ability to edit the text in an entry
+ * @e: then entry to change
+ * @edit: a boolean value indicating the ability to edit the entry
+ *
+ * Returns no value.
+ */
+void
+ewl_entry_set_editable(Ewl_Entry *e, unsigned int edit)
+{
+ Ewl_Widget *w;
+
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR("e", e);
+
+ if (e->editable == edit)
+ DRETURN(DLEVEL_STABLE);
+
+ w = EWL_WIDGET(e);
+
+ e->editable = edit;
+
+ if (edit) {
+ ewl_callback_append(w, EWL_CALLBACK_KEY_DOWN,
+ __ewl_entry_key_down, NULL);
+ ewl_callback_append(w, EWL_CALLBACK_MOUSE_DOWN,
+ __ewl_entry_mouse_down, NULL);
+ ewl_callback_append(w, EWL_CALLBACK_MOUSE_MOVE,
+ __ewl_entry_mouse_move, NULL);
+ }
+ else {
+ ewl_callback_del(w, EWL_CALLBACK_KEY_DOWN,
+ __ewl_entry_key_down);
+ ewl_callback_del(w, EWL_CALLBACK_MOUSE_DOWN,
+ __ewl_entry_mouse_down);
+ ewl_callback_del(w, EWL_CALLBACK_MOUSE_MOVE,
+ __ewl_entry_mouse_move);
+ }
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
}
/*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_entry.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -3 -r1.18 -r1.19
--- ewl_entry.h 3 Mar 2003 18:14:22 -0000 1.18
+++ ewl_entry.h 29 Mar 2003 23:20:19 -0000 1.19
@@ -13,11 +13,13 @@
Ewl_Widget *cursor;
int base_click;
+ int editable;
};
Ewl_Widget *ewl_entry_new(char *text);
void ewl_entry_init(Ewl_Entry * e, char *text);
void ewl_entry_set_text(Ewl_Entry * e, char *t);
char *ewl_entry_get_text(Ewl_Entry * e);
+void ewl_entry_set_editable(Ewl_Entry *e, unsigned int edit);
#endif /* __EWL_ENTRY_H__ */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_textarea.c,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -3 -r1.8 -r1.9
--- ewl_textarea.c 25 Mar 2003 18:36:18 -0000 1.8
+++ ewl_textarea.c 29 Mar 2003 23:20:19 -0000 1.9
@@ -188,19 +188,19 @@
/*
* Get the default style and color based on the theme.
*/
- snprintf(key, PATH_MAX, "%s/style");
+ snprintf(key, PATH_MAX, "%s/style", w->appearance);
style = ewl_theme_data_get_str(w, key);
- snprintf(key, PATH_MAX, "%s/r");
+ snprintf(key, PATH_MAX, "%s/r", w->appearance);
r = ewl_theme_data_get_int(w, key);
- snprintf(key, PATH_MAX, "%s/g");
+ snprintf(key, PATH_MAX, "%s/g", w->appearance);
g = ewl_theme_data_get_int(w, key);
- snprintf(key, PATH_MAX, "%s/b");
+ snprintf(key, PATH_MAX, "%s/b", w->appearance);
b = ewl_theme_data_get_int(w, key);
- snprintf(key, PATH_MAX, "%s/a");
+ snprintf(key, PATH_MAX, "%s/a", w->appearance);
a = ewl_theme_data_get_int(w, key);
/*
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/ewl_tree.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -3 -r1.5 -r1.6
--- ewl_tree.c 25 Mar 2003 18:36:20 -0000 1.5
+++ ewl_tree.c 29 Mar 2003 23:20:19 -0000 1.6
@@ -66,6 +66,8 @@
ewl_callback_append(EWL_WIDGET(tree), EWL_CALLBACK_CONFIGURE,
__ewl_tree_configure, NULL);
+ ewl_object_set_fill_policy(EWL_OBJECT(tree), EWL_FILL_POLICY_HSHRINK |
+ EWL_FILL_POLICY_HFILL);
tree->ncols = columns;
tree->colw = NEW(int, columns);
@@ -419,7 +421,7 @@
*/
ewl_object_request_geometry(child, CURRENT_X(w), CURRENT_Y(w),
CURRENT_W(w), ewl_object_get_preferred_h(child));
- x = CURRENT_X(w) + node->tree->indent;
+ x = CURRENT_X(w);/* + node->tree->indent; */
y = CURRENT_Y(w) + ewl_object_get_current_h(child);
width = CURRENT_W(w) - x + CURRENT_X(w);
-------------------------------------------------------
This SF.net email is sponsored by:
The Definitive IT and Networking Event. Be There!
NetWorld+Interop Las Vegas 2003 -- Register today!
http://ads.sourceforge.net/cgi-bin/redirect.pl?keyn0001en
_______________________________________________
enlightenment-cvs mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs