Enlightenment CVS committal

Author  : dj2
Project : e17
Module  : libs/ewl

Dir     : e17/libs/ewl/src/lib


Modified Files:
        ewl_statusbar.c ewl_statusbar.h 


Log Message:
- cleanup the statusbar stack on destroy

===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_statusbar.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -3 -r1.7 -r1.8
--- ewl_statusbar.c     12 Jan 2006 18:21:19 -0000      1.7
+++ ewl_statusbar.c     22 Dec 2006 19:50:36 -0000      1.8
@@ -76,6 +76,9 @@
 
        sb->stack = ecore_list_new();
 
+       ewl_callback_append(EWL_WIDGET(sb), EWL_CALLBACK_DESTROY, 
+                                       ewl_statusbar_cb_destroy, NULL);
+
        DRETURN_INT(TRUE, DLEVEL_STABLE);
 }
 
@@ -310,6 +313,22 @@
                ewl_widget_show(current);
 
        sb->current = current;
+
+       DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+void
+ewl_statusbar_cb_destroy(Ewl_Widget *w, void *ev __UNUSED__, 
+                                       void *data __UNUSED__)
+{
+       Ewl_Statusbar *sb;
+
+       DENTER_FUNCTION(DLEVEL_STABLE);
+       DCHECK_PARAM_PTR("w", w);
+
+       sb = w;
+
+       IF_FREE_LIST(sb->stack);
 
        DLEAVE_FUNCTION(DLEVEL_STABLE);
 }
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_statusbar.h,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -3 -r1.12 -r1.13
--- ewl_statusbar.h     4 Dec 2006 07:16:39 -0000       1.12
+++ ewl_statusbar.h     22 Dec 2006 19:50:36 -0000      1.13
@@ -64,6 +64,11 @@
 void            ewl_statusbar_push(Ewl_Statusbar *sb, char *txt);
 void            ewl_statusbar_pop(Ewl_Statusbar *sb);
 
+/*
+ * Internal functions
+ */
+void ewl_statusbar_cb_destroy(Ewl_Widget *w, void *ev, void *data);
+
 /**
  * @}
  */



-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
enlightenment-cvs mailing list
enlightenment-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to