mail[Wesnoth-commits] r40192 - in /trunk/src/gui/widgets: window.cpp window.hpp


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

Header


Content

Posted by koraq on December 11, 2009 - 22:05:
Author: mordante
Date: Fri Dec 11 22:05:31 2009
New Revision: 40192

URL: http://svn.gna.org/viewcvs/wesnoth?rev=40192&view=rev
Log:
Remove twindow::set_event_loop_pre_callback().

This was a kind of ugly hack, which is no longer needed since r40190.

Modified:
    trunk/src/gui/widgets/window.cpp
    trunk/src/gui/widgets/window.hpp

Modified: trunk/src/gui/widgets/window.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/window.cpp?rev=40192&r1=40191&r2=40192&view=diff
==============================================================================
--- trunk/src/gui/widgets/window.cpp (original)
+++ trunk/src/gui/widgets/window.cpp Fri Dec 11 22:05:31 2009
@@ -248,7 +248,6 @@
        , escape_disabled_(false)
        , linked_size_()
        , dirty_list_()
-       , event_loop_pre_cb_()
 #ifdef DEBUG_WINDOW_LAYOUT_GRAPHS
        , debug_layout_(new tdebug_layout_graph(this))
 #endif
@@ -472,10 +471,6 @@
                // Start our loop drawing will happen here as well.
                for(status_ = SHOWING; status_ != REQUEST_CLOSE; ) {
                        // process installed callback if valid, to allow e.g. 
network polling
-                       // @todo use a cleaner way of getting external events
-                       if (event_loop_pre_cb_) {
-                               event_loop_pre_cb_();
-                       }
                        events::pump();
                        // Add a delay so we don't keep spinning if there's 
no event.
                        SDL_Delay(10);

Modified: trunk/src/gui/widgets/window.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/window.hpp?rev=40192&r1=40191&r2=40192&view=diff
==============================================================================
--- trunk/src/gui/widgets/window.hpp (original)
+++ trunk/src/gui/widgets/window.hpp Fri Dec 11 22:05:31 2009
@@ -339,13 +339,6 @@
        static void set_sunset(const unsigned interval)
                { sunset_ = interval ? interval : 5; }
 
-       /**
-        * Set the callback that will be called in the event processing loop 
of
-        * show() right before the actual event processing.
-        */
-       void set_event_loop_pre_callback(boost::function<void ()> cb) {
-               event_loop_pre_cb_ = cb;
-       }
 private:
 
        /** Needed so we can change what's drawn on the screen. */
@@ -543,12 +536,6 @@
        std::vector<std::vector<twidget*> > dirty_list_;
 
        /**
-        * The callback function called before each iteration in the main 
event
-        * processing loop.
-        */
-       boost::function<void ()> event_loop_pre_cb_;
-
-       /**
         * Finishes the initialization of the grid.
         *
         * @param content_grid        The new contents for the content grid.




Related Messages


Powered by MHonArc, Updated Fri Dec 11 22:20:16 2009