Author: mordante
Date: Mon Nov 24 20:54:30 2008
New Revision: 31057
URL: http://svn.gna.org/viewcvs/wesnoth?rev=31057&view=rev
Log:
Export the easy_close status.
Other classes want to query this status in the future.
Modified:
trunk/src/gui/widgets/window.cpp
trunk/src/gui/widgets/window.hpp
Modified: trunk/src/gui/widgets/window.cpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/window.cpp?rev=31057&r1=31056&r2=31057&view=diff
==============================================================================
--- trunk/src/gui/widgets/window.cpp (original)
+++ trunk/src/gui/widgets/window.cpp Mon Nov 24 20:54:30 2008
@@ -602,7 +602,7 @@
void twindow::easy_close()
{
- if(easy_close_ && easy_close_blocker_.empty()) {
+ if(does_easy_close()) {
set_retval(OK);
}
}
Modified: trunk/src/gui/widgets/window.hpp
URL:
http://svn.gna.org/viewcvs/wesnoth/trunk/src/gui/widgets/window.hpp?rev=31057&r1=31056&r2=31057&view=diff
==============================================================================
--- trunk/src/gui/widgets/window.hpp (original)
+++ trunk/src/gui/widgets/window.hpp Mon Nov 24 20:54:30 2008
@@ -240,6 +240,14 @@
*/
void remove_easy_close_blocker(const std::string& id);
+ /**
+ * Does the window close easily?
+ *
+ * @returns Whether or not the window closes easily.
+ */
+ bool does_easy_close() const
+ { return easy_close_ && easy_close_blocker_.empty(); }
+
/***** ***** ***** setters / getters for members ***** ****** *****/
/**
_______________________________________________
Wesnoth-commits mailing list
[email protected]
https://mail.gna.org/listinfo/wesnoth-commits