Author: mordante
Date: Sat Apr 4 18:29:04 2009
New Revision: 34475
URL: http://svn.gna.org/viewcvs/wesnoth?rev=34475&view=rev
Log:
Reopen addon install dialog after installing one.
(patch #1152).
Modified:
trunk/changelog
trunk/data/core/about.cfg
trunk/players_changelog
trunk/src/addon_management.cpp
Modified: trunk/changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/changelog?rev=34475&r1=34474&r2=34475&view=diff
==============================================================================
--- trunk/changelog (original)
+++ trunk/changelog Sat Apr 4 18:29:04 2009
@@ -60,6 +60,8 @@
special
* Fix missing faction column when waiting that the host start the game,
plus some other unwanted changes there (bug #13243)
+ * Making the game return to the add-on install dialog just before
+ installing one, and with its entry selected
* WML Engine:
* Added [show_objectives] tag (part of bug #13042)
* Made moveto events set $x2,$y2 to the source hex. (bug #13140)
Modified: trunk/data/core/about.cfg
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/data/core/about.cfg?rev=34475&r1=34474&r2=34475&view=diff
==============================================================================
--- trunk/data/core/about.cfg (original)
+++ trunk/data/core/about.cfg Sat Apr 4 18:29:04 2009
@@ -864,6 +864,11 @@
name = "Miguel Zapico (elricz)"
[/entry]
[entry]
+ name = "Pablo J. Urbano Santos (Lord Ork)"
+ wikiuser = "Lord Ork"
+ email = "asqueados_AT_gmail.com"
+ [/entry]
+ [entry]
name = "Paul Smedley (Creeping)"
[/entry]
[entry]
Modified: trunk/players_changelog
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/players_changelog?rev=34475&r1=34474&r2=34475&view=diff
==============================================================================
--- trunk/players_changelog (original)
+++ trunk/players_changelog Sat Apr 4 18:29:04 2009
@@ -27,6 +27,9 @@
* User interface:
* Fix missing faction column when waiting that the host start the game.
+ * Making the game return to the add-on install dialog just before
+ installing one, and with its entry selected.
+
Version 1.6:
* Graphics:
Modified: trunk/src/addon_management.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/addon_management.cpp?rev=34475&r1=34474&r2=34475&view=diff
==============================================================================
--- trunk/src/addon_management.cpp (original)
+++ trunk/src/addon_management.cpp Sat Apr 4 18:29:04 2009
@@ -869,7 +869,8 @@
msg_dlg.show();
}
- void download_addons(game_display& disp, std::string remote_host, bool
update_mode, bool* do_refresh)
+ void download_addons(game_display& disp, std::string remote_host,
+ bool update_mode, bool* do_refresh, int old_index = 0)
{
const std::vector<std::string> address_components =
utils::split(remote_host, ':');
@@ -1034,6 +1035,9 @@
gui::filter_textbox* filter = new
gui::filter_textbox(disp.video(),
_("Filter: "), options, options_to_filter, 1,
addon_dialog, 300);
addon_dialog.set_textbox(filter);
+
+ // Scroll the menu to the previous selection
+ addon_menu->move_selection(old_index);
index = addon_dialog.show();
index = filter->get_index(index);
@@ -1057,10 +1061,13 @@
return;
}
- // Handle download
+ // Handle download
install_addon(disp, * addons_tree, addons[index],
titles[index], types[index],
uploads[index], versions[index],
net_manager, sock, do_refresh);
+ // Show the dialog again, and position it on the same
item installed
+ download_addons(disp, remote_host, update_mode,
do_refresh, index);
+
} catch(config::error& e) {
ERR_CFG << "config::error thrown during transaction
with add-on server; \""<< e.message << "\"\n";
gui::show_error_message(disp, _("Network communication
error."));
@@ -1072,7 +1079,7 @@
gui::show_error_message(disp, _("A problem occurred
when trying to create the files necessary to install this add-on."));
} catch(twml_exception& e) {
e.show(disp);
- }
+ }
}
void uninstall_local_addons(game_display& disp, bool* should_reload_cfg)
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits