Author: mordante
Date: Thu May 21 18:50:04 2009
New Revision: 35799

URL: http://svn.gna.org/viewcvs/wesnoth?rev=35799&view=rev
Log:
Remove the unused function twindow::layout2.

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=35799&r1=35798&r2=35799&view=diff
==============================================================================
--- trunk/src/gui/widgets/window.cpp (original)
+++ trunk/src/gui/widgets/window.cpp Thu May 21 18:50:04 2009
@@ -622,58 +622,6 @@
        assert(linked_size_.find(id) != linked_size_.end());
 
        linked_size_[id].widgets.push_back(widget);
-}
-
-void twindow::layout2(
-               const unsigned maximum_width, const unsigned maximum_height)
-{
-       /**
-        * @todo The following features are not done yet:
-        * - Linked widget support.
-        */
-
-       DBG_GUI_L << "twindow " << __func__ << ": maximum size "
-                       << maximum_width << ',' << maximum_height << ".\n";
-
-       layout_init2(true);
-
-       bool done = false;
-       unsigned run = 1;
-       while(!done) {
-               done = true;
-
-               tpoint size = get_best_size();
-               generate_dot_file("get_initial_best_size-"
-                               + lexical_cast<std::string>(run), LAYOUT);
-
-               try {
-
-                       /***** Does the width fit in the available width? *****/
-                       if(size.x > static_cast<int>(maximum_width)) {
-                               layout_fit_width(maximum_width, FORCE);
-                               size = get_best_size();
-                               generate_dot_file("layout_fit_width-"
-                                               + 
lexical_cast<std::string>(run), LAYOUT);
-                               assert(size.x <= 
static_cast<int>(maximum_width));
-                       }
-
-                       /***** Does the height fit in the available height? 
*****/
-                       // This part hasn't been implemented yet.
-#if 0
-                       if(size.y > maximum_height) {
-                               layout_fit_height(maximum_height);
-                               size = get_best_size();
-                               generate_dot_file("layout_fit_height-"
-                                               + 
lexical_cast<std::string>(run), LAYOUT);
-                               assert(size.y <= maximum_height);
-                       }
-#endif
-               } catch(trelayout_exception&) {
-                       layout_init2(false);
-                       done = false;
-                       ++run;
-               }
-       }
 }
 
 void twindow::NEW_layout()

Modified: trunk/src/gui/widgets/window.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/window.hpp?rev=35799&r1=35798&r2=35799&view=diff
==============================================================================
--- trunk/src/gui/widgets/window.hpp (original)
+++ trunk/src/gui/widgets/window.hpp Thu May 21 18:50:04 2009
@@ -456,20 +456,6 @@
        /**
         * Layouts the window.
         *
-        * This is a new routine which will be used as fallback when the normal
-        * layout engine fails. In 1.7 this will become the real layout engine.
-        *
-        * @deprecated Will be removed after the new layout algorithm is
-        * implemented.
-        *
-        * @param maximum_width       The maximum width of the window.
-        * @param maximum_height      The maximum height of the window.
-        */
-       void layout2(const unsigned maximum_width, const unsigned 
maximum_height);
-
-       /**
-        * Layouts the window.
-        *
         * This part does the pre and post processing for the actual layout
         * algorithm.
         *


_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits

Reply via email to