Author: mordante
Date: Tue Jun 24 21:20:59 2008
New Revision: 27491

URL: http://svn.gna.org/viewcvs/wesnoth?rev=27491&view=rev
Log:
Since the window load it's definition during it's construction it also needs
to know it's definition, so that's send to the constructor as well. Now the
window does honour the requested definition.

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

Modified: trunk/src/gui/widgets/window.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/window.cpp?rev=27491&r1=27490&r2=27491&view=diff
==============================================================================
--- trunk/src/gui/widgets/window.cpp (original)
+++ trunk/src/gui/widgets/window.cpp Tue Jun 24 21:20:59 2008
@@ -55,7 +55,8 @@
                const int x, const int y, const int w, const int h,
                const bool automatic_placement, 
                const unsigned horizontal_placement,
-               const unsigned vertical_placement) :
+               const unsigned vertical_placement,
+               const std::string& definition) :
        tpanel(),
        tevent_handler(),
        video_(video),
@@ -70,6 +71,7 @@
        vertical_placement_(vertical_placement)
 {
        // We load the config in here as exception.
+       set_definition(definition);
        load_config();
 
        set_size(::create_rect(x, y, w, h));

Modified: trunk/src/gui/widgets/window.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/window.hpp?rev=27491&r1=27490&r2=27491&view=diff
==============================================================================
--- trunk/src/gui/widgets/window.hpp (original)
+++ trunk/src/gui/widgets/window.hpp Tue Jun 24 21:20:59 2008
@@ -59,7 +59,8 @@
                const int x, const int y, const int w, const int h,
                const bool automatic_placement, 
                const unsigned horizontal_placement,
-               const unsigned vertical_placement);
+               const unsigned vertical_placement,
+               const std::string& definition);
 
        // show the window
        // The flip function is the disp_.flip() if ommitted the video_flip() 
is used

Modified: trunk/src/gui/widgets/window_builder.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/window_builder.cpp?rev=27491&r1=27490&r2=27491&view=diff
==============================================================================
--- trunk/src/gui/widgets/window_builder.cpp (original)
+++ trunk/src/gui/widgets/window_builder.cpp Tue Jun 24 21:20:59 2008
@@ -300,7 +300,8 @@
        twindow window(video, 
                definition->x, definition->y, definition->width, 
definition->height, 
                definition->automatic_placement, 
-               definition->horizontal_placement, 
definition->vertical_placement);
+               definition->horizontal_placement, 
definition->vertical_placement,
+               definition->definition);
 
        log_scope2(gui, "Window builder: building grid for window");
 


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

Reply via email to