mail[Wesnoth-commits] r40189 - in /trunk/src: events.hpp gui/auxiliary/event/handler.cpp


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by koraq on December 11, 2009 - 21:29:
Author: mordante
Date: Fri Dec 11 21:29:48 2009
New Revision: 40189

URL: http://svn.gna.org/viewcvs/wesnoth?rev=40189&view=rev
Log:
Remove the old hover event.

Modified:
    trunk/src/events.hpp
    trunk/src/gui/auxiliary/event/handler.cpp

Modified: trunk/src/events.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/events.hpp?rev=40189&r1=40188&r2=40189&view=diff
==============================================================================
--- trunk/src/events.hpp (original)
+++ trunk/src/events.hpp Fri Dec 11 21:29:48 2009
@@ -20,11 +20,10 @@
 
 //our user-defined double-click event type
 #define DOUBLE_CLICK_EVENT SDL_USEREVENT
-#define HOVER_EVENT (SDL_USEREVENT + 1)
+#define TIMER_EVENT (SDL_USEREVENT + 1)
 #define HOVER_REMOVE_POPUP_EVENT (SDL_USEREVENT + 2)
 #define DRAW_EVENT (SDL_USEREVENT + 3)
 #define CLOSE_WINDOW_EVENT (SDL_USEREVENT + 4)
-#define TIMER_EVENT (SDL_USEREVENT + 5)
 
 namespace events
 {

Modified: trunk/src/gui/auxiliary/event/handler.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/auxiliary/event/handler.cpp?rev=40189&r1=40188&r2=40189&view=diff
==============================================================================
--- trunk/src/gui/auxiliary/event/handler.cpp (original)
+++ trunk/src/gui/auxiliary/event/handler.cpp Fri Dec 11 21:29:48 2009
@@ -149,14 +149,6 @@
 
        /***** Handlers *****/
 
-       /**
-        * Fires a hover event.
-        *
-        * @param caller                 The distributor for which to fire the
-        *                               event.
-        */
-       void hover(void* caller);
-
        /** Fires a draw event. */
        void draw();
 
@@ -295,10 +287,6 @@
                                        , event.button.button);
                        break;
 
-               case HOVER_EVENT:
-                       hover(event.user.data1);
-                       break;
-
                case HOVER_REMOVE_POPUP_EVENT:
 //                     remove_popup();
                        break;
@@ -398,31 +386,6 @@
                delete event_context;
                event_context = NULL;
        }
-}
-
-void thandler::hover(void* caller)
-{
-       DBG_GUI_E << "Firing: " << SHOW_HOVER_TOOLTIP << ".\n";
-
-       /*
-        * Although the caller should be a valid widget, we won't blindly 
trust
-        * this to be true. Instead test whether it's a valid widget before 
firing.
-        * Since the parameter is a twidget* we need to cast the dispatcher 
to a
-        * widget.
-        */
-
-       foreach(tdispatcher* dispatcher, dispatchers_) {
-               twidget* widget = dynamic_cast<twidget*>(dispatcher);
-               if(widget == caller) {
-                       assert(widget);
-                       dispatcher->fire(SHOW_HOVER_TOOLTIP, *widget, NULL);
-                       return;
-               }
-       }
-
-       ERR_GUI_E << "While firing " << SHOW_HOVER_TOOLTIP
-                       << " encountered an invalid dispatcher address "
-                       << caller << ".\n";
 }
 
 void thandler::draw()




Related Messages


Powered by MHonArc, Updated Fri Dec 11 21:40:05 2009