Enlightenment CVS committal
Author : pfritz
Project : e17
Module : libs/ewl
Dir : e17/libs/ewl/src/lib
Modified Files:
ewl_floater.c ewl_floater.h
Log Message:
- set the alignment to the former default value
- fix warnings
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_floater.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ewl_floater.c 1 Apr 2007 21:48:06 -0000 1.17
+++ ewl_floater.c 10 Apr 2007 23:42:09 -0000 1.18
@@ -55,8 +55,12 @@
ewl_box_orientation_set(EWL_BOX(w), EWL_ORIENTATION_VERTICAL);
ewl_object_fill_policy_set(EWL_OBJECT(w), EWL_FLAG_FILL_NORMAL);
+ ewl_object_alignment_set(EWL_OBJECT(w), EWL_FLAG_ALIGN_LEFT
+ | EWL_FLAG_ALIGN_TOP);
ewl_widget_appearance_set(w, EWL_FLOATER_TYPE);
ewl_widget_inherit(w, EWL_FLOATER_TYPE);
+ ewl_callback_prepend(w, EWL_CALLBACK_DESTROY,
+ ewl_floater_cb_destroy, NULL);
DRETURN_INT(TRUE, DLEVEL_STABLE);
}
@@ -80,8 +84,9 @@
if (f->follows) {
ewl_callback_del_with_data(f->follows, EWL_CALLBACK_CONFIGURE,
ewl_floater_cb_follow_configure, f);
- ewl_callback_del_with_data(EWL_WIDGET(f->follows),
EWL_CALLBACK_DESTROY,
- ewl_floater_cb_follow_destroy, f);
+ ewl_callback_del_with_data(EWL_WIDGET(f->follows),
+ EWL_CALLBACK_DESTROY,
+ ewl_floater_cb_follow_destroy, f);
}
/*
@@ -192,6 +197,27 @@
* @param ev_data: UNUSED
* @param user_data: UNUSED
* @return Returns no value
+ * @brief Callback when the floater widget is destroyed
+ */
+void
+ewl_floater_cb_destroy(Ewl_Widget *w, void *ev_data __UNUSED__,
+ void *user_data __UNUSED__)
+{
+ DENTER_FUNCTION(DLEVEL_STABLE);
+ DCHECK_PARAM_PTR("w", w);
+ DCHECK_TYPE("w", w, EWL_FLOATER_TYPE);
+
+ ewl_floater_follow_set(EWL_FLOATER(w), NULL);
+
+ DLEAVE_FUNCTION(DLEVEL_STABLE);
+}
+
+/**
+ * @internal
+ * @param w: The widget to work with
+ * @param ev_data: UNUSED
+ * @param user_data: UNUSED
+ * @return Returns no value
* @brief Use this to ensure the floater gets configured when the
* parent/window gets configured.
*/
@@ -261,14 +287,14 @@
* @brief Callback when the followed widget is destroyed
*/
void
-ewl_floater_cb_follow_destroy(Ewl_Widget *w, void *ev_data __UNUSED__,
- void *user_data __UNUSED__)
+ewl_floater_cb_follow_destroy(Ewl_Widget *w __UNUSED__ ,
+ void *ev_data __UNUSED__, void *user_data)
{
DENTER_FUNCTION(DLEVEL_STABLE);
- DCHECK_PARAM_PTR("w", w);
- DCHECK_TYPE("w", w, EWL_FLOATER_TYPE);
+ DCHECK_PARAM_PTR("user_data", user_data);
+ DCHECK_TYPE("user_data", user_data, EWL_FLOATER_TYPE);
- EWL_FLOATER(w)->follows = NULL;
+ EWL_FLOATER(user_data)->follows = NULL;
DLEAVE_FUNCTION(DLEVEL_STABLE);
}
===================================================================
RCS file: /cvs/e/e17/libs/ewl/src/lib/ewl_floater.h,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -3 -r1.17 -r1.18
--- ewl_floater.h 4 Mar 2007 00:52:01 -0000 1.17
+++ ewl_floater.h 10 Apr 2007 23:42:09 -0000 1.18
@@ -66,6 +66,7 @@
/*
* Internally used callbacks, override at your own risk.
*/
+void ewl_floater_cb_destroy(Ewl_Widget *w, void *ev_data, void *user_data);
void ewl_floater_cb_follow_configure(Ewl_Widget *w, void *ev_data,
void *user_data);
void ewl_floater_cb_follow_destroy(Ewl_Widget *w, void *ev_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
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs