mail[Wesnoth-commits] r28877 - /trunk/src/addon_management.cpp


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

Header


Content

Posted by koraq on August 23, 2008 - 15:59:
Author: mordante
Date: Sat Aug 23 15:44:56 2008
New Revision: 28877

URL: http://svn.gna.org/viewcvs/wesnoth?rev=28877&view=rev
Log:
Change the addon dialog to the new code.

Modified:
    trunk/src/addon_management.cpp

Modified: trunk/src/addon_management.cpp
URL: 
http://svn.gna.org/viewcvs/wesnoth/trunk/src/addon_management.cpp?rev=28877&r1=28876&r2=28877&view=diff
==============================================================================
--- trunk/src/addon_management.cpp (original)
+++ trunk/src/addon_management.cpp Sat Aug 23 15:44:56 2008
@@ -1140,35 +1140,16 @@
        std::string remote_host;
        const std::string default_host = preferences::campaign_server();
        
-       if(gui2::new_widgets) {
-               gui2::taddon_connect addon_dlg;
-
-               addon_dlg.set_host_name(default_host);
-               addon_dlg.show(disp.video());
-
-               res = addon_dlg.get_retval();
-               if(res == gui2::twindow::OK) {
-                       res = 0;
-               }
-               remote_host = addon_dlg.host_name();
-       } else {
-               gui::dialog svr_dialog(disp,
-                                      _("Connect to add-ons server"),
-                                      _("Type the address of a server to 
download add-ons from."),
-                                      gui::OK_CANCEL);
-               svr_dialog.set_textbox(_("Server: "), default_host);
-
-               // not ready for production yet
-
-               svr_dialog.add_button(new gui::dialog_button(disp.video(), 
_("Update add-ons"),
-                                     gui::button::TYPE_PRESS, addon_update),
-                                     gui::dialog::BUTTON_EXTRA_LEFT);
-
-               svr_dialog.add_button(new gui::dialog_button(disp.video(), 
_("Uninstall add-ons"),
-                                     gui::button::TYPE_PRESS, 
addon_uninstall),
-                                     gui::dialog::BUTTON_EXTRA);
-               res = svr_dialog.show();
-               remote_host = svr_dialog.textbox_text();
+       gui2::taddon_connect addon_dlg;
+
+       addon_dlg.set_host_name(default_host);
+       addon_dlg.show(disp.video());
+
+       res = addon_dlg.get_retval();
+       remote_host = addon_dlg.host_name();
+
+       if(res == gui2::twindow::OK) {
+               res = addon_download;
        }
 
        switch(res) {




Related Messages


Powered by MHonArc, Updated Sat Aug 23 16:02:01 2008