From babaec33e51991475ba2ab9ec06c95bbe5f220c0 Mon Sep 17 00:00:00 2001 From: Bjørn Lindeijer Date: Sat, 1 Nov 2008 16:44:58 +0000 Subject: Merged revisions 4207-4209,4221-4222 via svnmerge from https://themanaworld.svn.sourceforge.net/svnroot/themanaworld/tmw/branches/0.0 ........ r4207 | b_lindeijer | 2008-04-29 11:10:43 +0200 (Tue, 29 Apr 2008) | 6 lines * Fixed issue with determining whether chat input is focused (method no longer virtual). * Fixed sometimes rendering with the wrong font. * Fixed warnings about hiding virtual method, Window now always deletes its children (the option not to do so was never used anyway). ........ r4208 | b_lindeijer | 2008-04-29 13:25:26 +0200 (Tue, 29 Apr 2008) | 3 lines Removed unused option from GCContainer to not delete a child, fixing warnings about hiding virtual method gcn::Container::add. ........ r4209 | b_lindeijer | 2008-04-29 14:58:21 +0200 (Tue, 29 Apr 2008) | 3 lines When compiling with GCC, use the printf format attribute for the log method so that the compiler checks the type of its parameters. ........ r4221 | peaveydk | 2008-05-06 21:23:49 +0200 (Tue, 06 May 2008) | 1 line Dont allow dragging of empty placeholders. ........ r4222 | peaveydk | 2008-05-08 00:49:38 +0200 (Thu, 08 May 2008) | 1 line Make F8 toggle shortcut window as suggested by And1 an fate. ........ --- src/gui/window.cpp | 23 +++++++---------------- 1 file changed, 7 insertions(+), 16 deletions(-) (limited to 'src/gui/window.cpp') diff --git a/src/gui/window.cpp b/src/gui/window.cpp index 24c9f850..2bce49b2 100644 --- a/src/gui/window.cpp +++ b/src/gui/window.cpp @@ -306,14 +306,7 @@ bool Window::isSticky() void Window::setVisible(bool visible) { - if (isSticky()) - { - gcn::Window::setVisible(true); - } - else - { - gcn::Window::setVisible(visible); - } + gcn::Window::setVisible(isSticky() || visible); } void Window::scheduleDelete() @@ -576,24 +569,22 @@ void Window::setGuiAlpha() mAlphaChanged = false; } -void Window::loadSkin(const std::string filename) +void Window::loadSkin(const std::string &fileName) { - const std::string windowId = Window::getId(); - - ResourceManager *resman = ResourceManager::getInstance(); + ResourceManager *resman = ResourceManager::getInstance(); - logger->log("Loading Window Skin '%s'.", filename.c_str()); - logger->log("Loading Window ID '%d'.", windowId.c_str()); + logger->log("Loading Window Skin '%s'.", fileName.c_str()); + logger->log("Loading Window ID '%s'.", Window::getId().c_str()); - if(filename == "") + if (fileName == "") logger->error("Window::loadSkin(): Invalid File Name."); // TODO: // If there is an error loading the specified file, we should try to revert // to a 'default' skin file. Only if the 'default' skin file can't be loaded // should we have a terminating error. - XML::Document doc(filename); + XML::Document doc(fileName); xmlNodePtr rootNode = doc.rootNode(); if (!rootNode || !xmlStrEqual(rootNode->name, BAD_CAST "skinset")) -- cgit v1.2.3-70-g09d2