Author: fendrin
Date: Sun Nov 22 07:34:42 2009
New Revision: 39867

URL: http://svn.gna.org/viewcvs/wesnoth?rev=39867&view=rev
Log:
Made the test target compile again.

Modified:
    branches/fendrin_gui_stuff/data/gui/default/window/icon_message.cfg
    branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.cpp
    branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.hpp
    branches/fendrin_gui_stuff/src/tests/gui/test_gui2.cpp

Modified: branches/fendrin_gui_stuff/data/gui/default/window/icon_message.cfg
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/fendrin_gui_stuff/data/gui/default/window/icon_message.cfg?rev=39867&r1=39866&r2=39867&view=diff
==============================================================================
--- branches/fendrin_gui_stuff/data/gui/default/window/icon_message.cfg 
(original)
+++ branches/fendrin_gui_stuff/data/gui/default/window/icon_message.cfg Sun Nov 
22 07:34:42 2009
@@ -128,7 +128,7 @@
 )#enddef
 
 #define UNIT_BUTTONS
-    [row]
+#    [row]
         [column]       
            border = "all"
            border_size = 5
@@ -143,11 +143,11 @@
                label = _ "Profile"
            [/button]
        [/column]
-    [/row]
+#    [/row]
 #enddef
 
 #define CANCEL_BUTTON
-    [row]
+#    [row]
         [column]       
            border = "all"
            border_size = 5
@@ -162,7 +162,26 @@
                label = _ "Cancel"
            [/button]
        [/column]
-    [/row]
+#    [/row]
+#enddef
+
+#define HELP_BUTTON
+#    [row]
+        [column]       
+           border = "all"
+           border_size = 5
+           horizontal_alignment = "center"
+
+           [button]
+               # This button will be shown or hidden depending on the
+               # whether or not a sellection may be avoided    
+               id = "help"
+               definition = "transparent"
+
+               label = _ "Help"
+           [/button]
+       [/column]
+#    [/row]
 #enddef
 
 #define RECALL_BUTTONS
@@ -183,7 +202,7 @@
     #                  [/button]
     #          [/column]
     #  [/row]
-    [row]
+#    [row]
        [column]        
            border = "all"
            border_size = 5
@@ -198,7 +217,7 @@
                label = _ "Remove"
            [/button]
        [/column]
-    [/row]
+ #   [/row]
 #enddef
 
 
@@ -355,6 +374,31 @@
                fixed_width = "true"
            [/linked_group]
 
+           [linked_group]
+               id = "traits"
+               fixed_width = "true"
+           [/linked_group]
+
+           [linked_group]
+               id = "xp"
+               fixed_width = "true"
+           [/linked_group]
+
+           [linked_group]
+               id = "type"
+               fixed_width = "true"
+           [/linked_group]
+
+           [linked_group]
+               id = "cost"
+               fixed_width = "true"
+           [/linked_group]
+
+           [linked_group]
+               id = "level"
+               fixed_width = "true"
+           [/linked_group]
+
            [grid]
 
                [row]
@@ -429,79 +473,36 @@
 
                                                        [/row]
 
+                                                       {INPUT}
+                                                        
                                                        [row]
 
                                                            [column]
-                                                               grow_factor = 1
-                                                               horizontal_grow 
= "true"
-
-                                                               [grid]
-
-                                                                   [row]
-
-                                                                       [column]
-                                                                           
border = "all"
-                                                                           
border_size = 5
-
-                                                                           
[label]
-                                                                               
id = "input_caption"
-                                                                               
definition = "default"
-                                                                           
[/label]
-
-                                                                       
[/column]
-
-                                                                       [column]
-                                                                           
grow_factor = 1
-                                                                           
horizontal_grow = "true"
-
-                                                                           
border = "all"
-                                                                           
border_size = 5
-
-                                                                           
[text_box]
-                                                                               
id = "input"
-                                                                               
definition = "default"
-                                                                           
[/text_box]
-
-                                                                       
[/column]
-
-                                                                   [/row]
-
-                                                               [/grid]
-
-                                                           [/column]
-
-                                                       [/row]
-
-                                               #       [row]
-#
-       #                                                   [column]
-               #                                               border = "all"
-                       #                                       border_size = 5
-                               #                               horizontal_grow 
= "true"
-#
-       #                                                       
{_GUI_INPUT_LIST}
-#
-       #                                                   [/column]
-#
-       #                                               [/row]
-
-                                                       [row]
-
-                                                           [column]
-                                                               border = "all"
-                                                               border_size = 5
-                                                               
horizontal_alignment = "center"
-
-                                                               [button]
-                                                                   # This 
button will be shown or hidden depending on the
-                                                                   # whether 
or not a scrollbar is needed to show the
-                                                                   # text.
-                                                                   id = "ok"
-                                                                   definition 
= "transparent"
-
-                                                                   label = _ 
"OK"
-                                                               [/button]
-
+
+                                                                [grid]
+                                                                    
+                                                                    [row]
+                                                                        
{BUTTONS}
+                                                                        
[column]
+                                                                           
border = "all"
+                                                                           
border_size = 5
+                                                                           
horizontal_alignment = "center"
+                                                                            
+                                                                           
[button]
+                                                                               
# This button will be shown or hidden depending on the
+                                                                               
# whether or not a scrollbar is needed to show the
+                                                                               
# text.
+                                                                               
id = "ok"
+                                                                               
definition = "transparent"
+                                                                               
 
+                                                                               
label = _ "OK"
+                                                                               
 
+                                                                           
[/button]
+                                                                        
[/column]
+                                                                    [/row]
+                                                                    
+                                                                [/grid]
+                                                                
                                                            [/column]
 
                                                        [/row]
@@ -1165,9 +1166,10 @@
 {MESSAGE_WINDOW input_message ({_GUI_INPUT}) ()}
 {MESSAGE_WINDOW option_message ({_GUI_OPTION_LIST}) ()}
 {MESSAGE_WINDOW unit_message ({_GUI_UNIT_LIST}) ({UNIT_BUTTONS})}
-{MESSAGE_WINDOW recruit_message ({_GUI_TYPE_LIST}) ({UNIT_BUTTONS}
+{MESSAGE_WINDOW recruit_message ({_GUI_TYPE_LIST}) ({HELP_BUTTON} 
{UNIT_BUTTONS}
 {CANCEL_BUTTON}) }
-{MESSAGE_WINDOW recall_message ({_GUI_UNIT_LIST}) ({RECALL_BUTTONS}
+{MESSAGE_WINDOW recall_message ({_GUI_UNIT_LIST}) ({HELP_BUTTON}
+{RECALL_BUTTONS}
 {UNIT_BUTTONS}
 {CANCEL_BUTTON}) }
 

Modified: branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.cpp?rev=39867&r1=39866&r2=39867&view=diff
==============================================================================
--- branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.cpp (original)
+++ branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.cpp Sun Nov 22 
07:34:42 2009
@@ -61,9 +61,13 @@
        window.set_dirty();
 }
 
-void tunit_message_::profile_pressed(twindow& window) {
+void tunit_message_::profile_pressed() {
        const unit_type& t = *chosen_unit_->type();
        help::show_unit_help(*resources::screen, t.id(), t.hide_help());
+}
+
+void tunit_message_::help_pressed() {
+       help::show_help(*resources::screen,"recruit_and_recall");
 }
 
 void trecall_message_::remove_pressed(CVideo& video, twindow& window) {
@@ -241,6 +245,11 @@
                        &trecall_message_::recall_pressed, this, 
boost::ref(window)));
        */
 
+       tbutton* help_button = find_widget<tbutton> (&window, "help", false,
+                               false);
+               help_button->connect_signal_mouse_left_click(boost::bind(
+                               &tunit_message_::help_pressed, this));
+
        tbutton* remove_button = find_widget<tbutton> (&window, "remove", false,
                        false);
        remove_button->connect_signal_mouse_left_click(boost::bind(
@@ -254,7 +263,7 @@
        tbutton* profile_button = find_widget<tbutton> (&window, "profile", 
false,
                        false);
        profile_button->connect_signal_mouse_left_click(boost::bind(
-                       &trecall_message_::profile_pressed, this, 
boost::ref(window)));
+                       &trecall_message_::profile_pressed, this));
 
        //               Find the unit list related fields.
        //               TODO what does the boolean has to be?
@@ -311,6 +320,11 @@
 void trecruit_message_::pre_show(CVideo& video, twindow& window) {
        tunit_message_::pre_show(video, window);
 
+       tbutton* help_button = find_widget<tbutton> (&window, "help", false,
+                               false);
+               help_button->connect_signal_mouse_left_click(boost::bind(
+                               &tunit_message_::help_pressed, this));
+
        window.set_click_dismiss(false);
 }
 

Modified: branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.hpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.hpp?rev=39867&r1=39866&r2=39867&view=diff
==============================================================================
--- branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.hpp (original)
+++ branches/fendrin_gui_stuff/src/gui/dialogs/wml_message.hpp Sun Nov 22 
07:34:42 2009
@@ -269,7 +269,9 @@
                                  }
 
        /** Handler for the profile button event. */
-       void profile_pressed(twindow& window);
+       void profile_pressed();
+
+       void help_pressed();
 
 protected:
        /** The list of units the user can choose. */

Modified: branches/fendrin_gui_stuff/src/tests/gui/test_gui2.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/branches/fendrin_gui_stuff/src/tests/gui/test_gui2.cpp?rev=39867&r1=39866&r2=39867&view=diff
==============================================================================
--- branches/fendrin_gui_stuff/src/tests/gui/test_gui2.cpp (original)
+++ branches/fendrin_gui_stuff/src/tests/gui/test_gui2.cpp Sun Nov 22 07:34:42 
2009
@@ -217,8 +217,8 @@
        test<gui2::tmp_create_game>();
        test<gui2::tmp_method_selection>();
        test<gui2::ttitle_screen>();
-       test<gui2::twml_message_left>();
-       test<gui2::twml_message_right>();
+       test<gui2::ticon_message_left>();
+       test<gui2::ticon_message_right>();
 }
 
 BOOST_AUTO_TEST_CASE(test_make_test_fake)
@@ -362,20 +362,20 @@
 };
 
 template<>
-struct twrapper<gui2::twml_message_left>
-{
-       static gui2::twml_message_left* create()
-       {
-               return new gui2::twml_message_left("Title", "Message", "", 
false, NULL);
-       }
-};
-
-template<>
-struct twrapper<gui2::twml_message_right>
-{
-       static gui2::twml_message_right* create()
-       {
-               return new gui2::twml_message_right("Title", "Message", "", 
false, NULL);
+struct twrapper<gui2::ticon_message_left>
+{
+       static gui2::ticon_message_left* create()
+       {
+               return new gui2::ticon_message_left("Title", "Message", "", 
false);
+       }
+};
+
+template<>
+struct twrapper<gui2::ticon_message_right>
+{
+       static gui2::ticon_message_right* create()
+       {
+               return new gui2::ticon_message_right("Title", "Message", "", 
false);
        }
 };
 


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

Reply via email to