From 46585d7c62a53bfaf5173aa4e67d64735af1d2ed Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 9 Jan 2014 14:16:53 +0300 Subject: add ability to notify setup pages about disconnect from server. Show mods page only if connected to server. --- src/gui/widgets/tabs/setuptabscroll.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) (limited to 'src/gui/widgets/tabs/setuptabscroll.cpp') diff --git a/src/gui/widgets/tabs/setuptabscroll.cpp b/src/gui/widgets/tabs/setuptabscroll.cpp index 81c191dd6..659ef5824 100644 --- a/src/gui/widgets/tabs/setuptabscroll.cpp +++ b/src/gui/widgets/tabs/setuptabscroll.cpp @@ -134,6 +134,18 @@ void SetupTabScroll::externalUpdated() } } +void SetupTabScroll::externalUnloaded() +{ + for (std::map::const_iterator + iter = mItems.begin(), iter_end = mItems.end(); + iter != iter_end; ++ iter) + { + SetupItem *const widget = (*iter).second; + if (widget && !widget->isMainConfig()) + widget->externalUnloaded((*iter).first); + } +} + void SetupTabScroll::widgetResized(const gcn::Event &event A_UNUSED) { mScroll->setWidth(getWidth() - 12); -- cgit v1.2.3-70-g09d2