Enlightenment CVS committal

Author  : codewarrior
Project : e17
Module  : proto

Dir     : e17/proto/etk/src/lib


Modified Files:
        etk_filechooser_widget.c etk_tooltips.c etk_tooltips.h 
        etk_tree.c 


Log Message:
- tooltip behaves better now
- reflect changes in filechooser test


===================================================================
RCS file: 
/cvsroot/enlightenment/e17/proto/etk/src/lib/etk_filechooser_widget.c,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -3 -r1.9 -r1.10
--- etk_filechooser_widget.c    9 Mar 2006 16:36:03 -0000       1.9
+++ etk_filechooser_widget.c    16 Mar 2006 10:46:00 -0000      1.10
@@ -538,7 +538,7 @@
    
    _etk_filechooser_timer = NULL;
    
-   if (!(fcw = ETK_FILECHOOSER_WIDGET(data)))
+   if (!(fcw = ETK_FILECHOOSER_WIDGET(data)) || !_etk_filechooser_tooltip_text)
      return 0;
    
    etk_tooltips_tip_set(ETK_WIDGET(fcw), _etk_filechooser_tooltip_text);
@@ -570,7 +570,7 @@
 static void _etk_filechooser_files_tree_row_mouse_out_cb(Etk_Object *object, 
Etk_Tree_Row *row, void *data)
 {
    Etk_Filechooser_Widget *fcw;
-   
+      
    if (!(fcw = ETK_FILECHOOSER_WIDGET(data)))
      return;   
    
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_tooltips.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -3 -r1.6 -r1.7
--- etk_tooltips.c      12 Mar 2006 00:17:26 -0000      1.6
+++ etk_tooltips.c      16 Mar 2006 10:46:00 -0000      1.7
@@ -114,6 +114,7 @@
    {
       if(text == NULL)
       {
+        etk_tooltips_pop_down();
         _etk_tooltips_hash = evas_hash_del(_etk_tooltips_hash, key, tip_text);
         etk_signal_disconnect("mouse_in", ETK_OBJECT(widget), 
ETK_CALLBACK(_etk_tooltips_mouse_in_cb));
         etk_signal_disconnect("mouse_out", ETK_OBJECT(widget), 
ETK_CALLBACK(_etk_tooltips_mouse_out_cb));
@@ -169,6 +170,18 @@
    return NULL;
 }
 
+/*
+ * @brief Get wether the toolip is hidden / visible
+ * @return True is it is, false otherwise
+ */
+Etk_Bool etk_tooltips_tip_visible()
+{
+   if(!_etk_tooltips_enabled || !ETK_IS_WINDOW(_etk_tooltips_window))
+     return ETK_FALSE;
+   
+   return etk_widget_is_visible(_etk_tooltips_window);   
+}
+
 /**
  * @brief Instantly pop up the tooltip if applicable
  * @param widget the widget we want to pop up on
@@ -239,8 +252,9 @@
 /* Timer callback, pops up the tooltip */
 static int _etk_tooltips_timer_cb(void *data)
 {
-   if(!_etk_tooltips_timer || !_etk_tooltips_cur_object) 
+   if(!_etk_tooltips_timer || !_etk_tooltips_cur_object ||!_etk_tooltips_label)
      return 0;
+
    etk_tooltips_pop_up(ETK_WIDGET(_etk_tooltips_cur_object));
    return 0;
 }
@@ -251,7 +265,10 @@
    if(!_etk_tooltips_enabled)
      return;
    
-   etk_tooltips_pop_down();
+   if(_etk_tooltips_timer != NULL)
+     ecore_timer_del(_etk_tooltips_timer);
+      
+   etk_tooltips_pop_down();      
 }
 
 /* Callback for when the mouse moves on the widget */
@@ -260,8 +277,14 @@
    if(!_etk_tooltips_enabled)
      return;
    
+   if(!ETK_IS_WINDOW(_etk_tooltips_window))
+     return;
+   
+   if(etk_widget_is_visible(_etk_tooltips_window))
+     return;
+   
    if(_etk_tooltips_timer != NULL)     
-     ecore_timer_del(_etk_tooltips_timer);     
+     ecore_timer_del(_etk_tooltips_timer);
    
    etk_tooltips_pop_down();
    _etk_tooltips_cur_object = object;
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_tooltips.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -3 -r1.2 -r1.3
--- etk_tooltips.h      6 Mar 2006 22:49:12 -0000       1.2
+++ etk_tooltips.h      16 Mar 2006 10:46:00 -0000      1.3
@@ -17,6 +17,9 @@
 
 void etk_tooltips_tip_set(Etk_Widget *widget, const char *text);
 const char *etk_tooltips_tip_get(Etk_Widget *widget);
+
+Etk_Bool etk_tooltips_tip_visible();
+
 void etk_tooltips_pop_up(Etk_Widget *widget);
 void etk_tooltips_pop_down();
   
===================================================================
RCS file: /cvsroot/enlightenment/e17/proto/etk/src/lib/etk_tree.c,v
retrieving revision 1.57
retrieving revision 1.58
diff -u -3 -r1.57 -r1.58
--- etk_tree.c  14 Mar 2006 11:42:13 -0000      1.57
+++ etk_tree.c  16 Mar 2006 10:46:00 -0000      1.58
@@ -61,7 +61,8 @@
    ETK_TREE_ROW_EXPANDED_SIGNAL,
    ETK_TREE_ROW_COLLAPSED_SIGNAL,
    ETK_TREE_ROW_MOUSE_IN_SIGNAL,
-   ETK_TREE_ROW_MOUSE_OUT_SIGNAL,     
+   ETK_TREE_ROW_MOUSE_OUT_SIGNAL,
+   ETK_TREE_ROW_MOUSE_MOVE_SIGNAL,     
    ETK_TREE_SELECT_ALL_SIGNAL,
    ETK_TREE_UNSELECT_ALL_SIGNAL,
    ETK_TREE_NUM_SIGNALS
@@ -179,6 +180,7 @@
       _etk_tree_signals[ETK_TREE_ROW_COLLAPSED_SIGNAL] = 
etk_signal_new("row_collapsed", tree_type, -1, etk_marshaller_VOID__POINTER, 
NULL, NULL);
       _etk_tree_signals[ETK_TREE_ROW_MOUSE_IN_SIGNAL] = 
etk_signal_new("row_mouse_in", tree_type, -1, etk_marshaller_VOID__POINTER, 
NULL, NULL);
       _etk_tree_signals[ETK_TREE_ROW_MOUSE_OUT_SIGNAL] = 
etk_signal_new("row_mouse_out", tree_type, -1, etk_marshaller_VOID__POINTER, 
NULL, NULL);
+      _etk_tree_signals[ETK_TREE_ROW_MOUSE_MOVE_SIGNAL] = 
etk_signal_new("row_mouse_move", tree_type, -1, etk_marshaller_VOID__POINTER, 
NULL, NULL);      
       _etk_tree_signals[ETK_TREE_SELECT_ALL_SIGNAL] = 
etk_signal_new("select_all", tree_type, -1, etk_marshaller_VOID__VOID, NULL, 
NULL);
       _etk_tree_signals[ETK_TREE_UNSELECT_ALL_SIGNAL] = 
etk_signal_new("unselect_all", tree_type, -1, etk_marshaller_VOID__VOID, NULL, 
NULL);
 
@@ -2038,6 +2040,8 @@
       drag = (ETK_WIDGET(row_objects->row->tree))->drag;      
       etk_drag_begin(ETK_DRAG(drag));
    }
+   else
+     etk_signal_emit(_etk_tree_signals[ETK_TREE_ROW_MOUSE_MOVE_SIGNAL], 
ETK_OBJECT(row_objects->row->tree), NULL, row_objects->row, &ev);
 }
 
 /* Called when the mouse moves into a row */




-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs

Reply via email to