Enlightenment CVS committal
Author : lordchaos
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_iconbox.c ewl_iconbox.h ewl_widget.c
Log Message:
* Caught an unchecked NULL in ewl_widget
* More iconbox cleanup
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_iconbox.c,v
retrieving revision 1.31
retrieving revision 1.32
diff -u -3 -r1.31 -r1.32
--- ewl_iconbox.c 15 Oct 2005 09:24:14 -0000 1.31
+++ ewl_iconbox.c 15 Oct 2005 09:39:39 -0000 1.32
@@ -57,14 +57,6 @@
}
-
-
-
-
-
-
-
-
void ewl_iconbox_inner_pane_calculate(Ewl_IconBox* ib)
{
@@ -387,6 +379,9 @@
/*Hide the entry, now that we have an enter */
ewl_widget_hide(ib->entry_floater);
+
+ /*Show the label again*/
+ ewl_widget_show(EWL_ICONBOX_ICON(ib->edit_icon)->w_label);
}
}
@@ -507,6 +502,7 @@
ewl_floater_position_set(EWL_FLOATER(ib->icon_box_parent->entry_floater),
x,y+ih);
ewl_widget_layer_set(EWL_WIDGET(ib->icon_box_parent->entry_floater), 1000);
ewl_widget_focus_send(EWL_WIDGET(ib->icon_box_parent->entry));
+ ewl_widget_hide(ib->w_label);
/* Record which icon's label we are editing */
ib->icon_box_parent->edit_icon = ib;
@@ -549,7 +545,6 @@
void ewl_iconbox_deselect_all(Ewl_IconBox* ib)
{
- return;
Ewl_IconBox_Icon* list_item;
ecore_list_goto_first(ib->ewl_iconbox_icon_list);
@@ -565,24 +560,7 @@
/*printf("Removing icon: %s", ewl_border_text_get(EWL_BORDER(icon)));*/
}
-void ewl_iconbox_icon_destroy_cb(Ewl_Widget *w, void *ev_data __UNUSED__,
- void *user_data __UNUSED__)
-{
-
- Ewl_IconBox_Icon* icon = EWL_ICONBOX_ICON(w);
-
- DENTER_FUNCTION(DLEVEL_STABLE);
- if (icon->label) {
- free(icon->label);
- }
- if (icon->label_compressed) {
- free(icon->label_compressed);
- }
- ewl_widget_destroy(EWL_ICONBOX_ICON(w)->floater);
-
- DLEAVE_FUNCTION(DLEVEL_STABLE);
-}
Ewl_IconBox_Icon* ewl_iconbox_icon_add(Ewl_IconBox* iconbox, char* name, char*
icon_file)
@@ -661,14 +639,6 @@
ewl_image_file_set(EWL_IMAGE(icon->image), filename, NULL);
- /*Make sure we're not too small now */
- /*Shouldn't the floater auto-resize?*/
-
- /*ewl_object_current_size_get(EWL_OBJECT(icon->image), &iw,&ih);
- ewl_object_current_size_get(EWL_OBJECT(icon->w_label), &lw, &lh);
- ewl_object_minimum_size_set(EWL_OBJECT(icon->floater), iw, ih+lh);*/
-
- /*Call the configure callback for the iconbox - it doesn't seem to do
this by itself*/
}
void ewl_iconbox_clear(Ewl_IconBox* ib)
@@ -710,6 +680,25 @@
ewl_iconbox_clear(ib);
}
+void ewl_iconbox_icon_destroy_cb(Ewl_Widget *w, void *ev_data __UNUSED__,
+ void *user_data __UNUSED__)
+{
+
+ Ewl_IconBox_Icon* icon = EWL_ICONBOX_ICON(w);
+
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ if (icon->label) {
+ free(icon->label);
+ }
+ if (icon->label_compressed) {
+ free(icon->label_compressed);
+ }
+
+ ewl_widget_destroy(EWL_ICONBOX_ICON(w)->floater);
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
/* ----------- */
void ewl_iconbox_arrange_cb(Ewl_Widget *w, void *ev_data, void *user_data)
{
@@ -862,8 +851,6 @@
ewl_widget_hide(ib->ewl_iconbox_context_menu);
ewl_widget_hide(ib->ewl_iconbox_view_menu);
-
- /*printf ("Start select at %d:%d\n", ev->x, ev->y);*/
ewl_object_custom_size_set(EWL_OBJECT(ib->select), 1, 1);
/* Put the floater at the position we started at */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_iconbox.h,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -3 -r1.10 -r1.11
--- ewl_iconbox.h 15 Oct 2005 09:24:14 -0000 1.10
+++ ewl_iconbox.h 15 Oct 2005 09:39:39 -0000 1.11
@@ -126,6 +126,7 @@
void ewl_iconbox_destroy_cb(Ewl_Widget *w, void *ev_data, void *user_data);
void ewl_iconbox_icon_mouse_down(Ewl_Widget *w, void *ev_data, void
*user_data);
void ewl_iconbox_icon_label_mouse_down_cb(Ewl_Widget *w, void *ev_data, void
*user_data);
+void ewl_iconbox_icon_destroy_cb(Ewl_Widget *w, void *ev_data ,void *user_data
);
/* Internal functions */
===================================================================
RCS file: /cvsroot/enlightenment/e17/libs/ewl/src/lib/ewl_widget.c,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -3 -r1.23 -r1.24
--- ewl_widget.c 14 Oct 2005 03:18:19 -0000 1.23
+++ ewl_widget.c 15 Oct 2005 09:39:39 -0000 1.24
@@ -1097,7 +1097,7 @@
DENTER_FUNCTION(DLEVEL_STABLE);
emb = ewl_embed_widget_find(w);
- w = ewl_embed_focused_widget_get(emb);
+ if (emb) w = ewl_embed_focused_widget_get(emb);
DRETURN_PTR(w, DLEVEL_STABLE);
}
-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs