Author: suokko
Date: Fri Jun 27 20:50:21 2008
New Revision: 27536
URL: http://svn.gna.org/viewcvs/wesnoth?rev=27536&view=rev
Log:
Fixed editor compilation
Modified:
trunk/src/game_preferences_display.cpp
trunk/src/preferences_display.cpp
Modified: trunk/src/game_preferences_display.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/game_preferences_display.cpp?rev=27536&r1=27535&r2=27536&view=diff
==============================================================================
--- trunk/src/game_preferences_display.cpp (original)
+++ trunk/src/game_preferences_display.cpp Fri Jun 27 20:50:21 2008
@@ -1187,4 +1187,47 @@
return(0);
}
-}
+std::string show_wesnothd_server_search(display& disp)
+{
+ // Showing file_chooser so user can search the wesnothd
+ std::string old_path = preferences::get_mp_server_program_name();
+ size_t offset = old_path.rfind("/");
+ if (offset != std::string::npos)
+ {
+ old_path = old_path.substr(0, offset);
+ }
+ else
+ {
+ old_path = "";
+ }
+#ifndef _WIN32
+
+#ifndef WESNOTH_PREFIX
+#define WESNOTH_PREFIX = "/usr"
+#endif
+ const std::string filename = "wesnothd";
+ std::string path = WESNOTH_PREFIX + std::string("/bin");
+ if (!is_directory(path))
+ path = get_cwd();
+
+#else
+ const std::string filename = "wesnothd.exe";
+ std::string path = get_cwd();
+#endif
+ if (!old_path.empty()
+ && is_directory(old_path))
+ {
+ path = old_path;
+ }
+
+ const std::string title = _("Find ") + filename + (" server binary to
host networked game");
+
+ int res = dialogs::show_file_chooser_dialog(disp, path, title, false,
filename);
+ if (res == 0)
+ return path;
+ else
+ return "";
+}
+
+
+}
Modified: trunk/src/preferences_display.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/preferences_display.cpp?rev=27536&r1=27535&r2=27536&view=diff
==============================================================================
--- trunk/src/preferences_display.cpp (original)
+++ trunk/src/preferences_display.cpp Fri Jun 27 20:50:21 2008
@@ -383,49 +383,6 @@
}
}
-std::string show_wesnothd_server_search(display& disp)
-{
- // Showing file_chooser so user can search the wesnothd
- std::string old_path = preferences::get_mp_server_program_name();
- size_t offset = old_path.rfind("/");
- if (offset != std::string::npos)
- {
- old_path = old_path.substr(0, offset);
- }
- else
- {
- old_path = "";
- }
-#ifndef _WIN32
-
-#ifndef WESNOTH_PREFIX
-#define WESNOTH_PREFIX = "/usr"
-#endif
- const std::string filename = "wesnothd";
- std::string path = WESNOTH_PREFIX + std::string("/bin");
- if (!is_directory(path))
- path = get_cwd();
-
-#else
- const std::string filename = "wesnothd.exe";
- std::string path = get_cwd();
-#endif
- if (!old_path.empty()
- && is_directory(old_path))
- {
- path = old_path;
- }
-
- const std::string title = _("Find ") + filename + (" server binary to
host networked game");
-
- int res = dialogs::show_file_chooser_dialog(disp, path, title, false,
filename);
- if (res == 0)
- return path;
- else
- return "";
-}
-
-
bool compare_resolutions(const std::pair<int,int>& lhs, const
std::pair<int,int>& rhs)
{
return lhs.first*lhs.second < rhs.first*rhs.second;
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits