File diff r18844:a10105b3df75 → r18845:66bf168f1100
src/window.cpp
Show inline comments
 
@@ -727,14 +727,14 @@ void Window::SetShaded(bool make_shaded)
 
	}
 
}
 

	
 
/**
 
 * Find the Window whose parent pointer points to this window
 
 * @param w parent Window to find child of
 
 * @param wc Window class of the window to remove; WC_INVALID if class does not matter
 
 * @return a Window pointer that is the child of w, or NULL otherwise
 
 * @param wc Window class of the window to remove; #WC_INVALID if class does not matter
 
 * @return a Window pointer that is the child of \a w, or \c NULL otherwise
 
 */
 
static Window *FindChildWindow(const Window *w, WindowClass wc)
 
{
 
	Window *v;
 
	FOR_ALL_WINDOWS_FROM_BACK(v) {
 
		if ((wc == WC_INVALID || wc == v->window_class) && v->parent == w) return v;
 
@@ -742,13 +742,13 @@ static Window *FindChildWindow(const Win
 

	
 
	return NULL;
 
}
 

	
 
/**
 
 * Delete all children a window might have in a head-recursive manner
 
 * @param wc Window class of the window to remove; WC_INVALID if class does not matter
 
 * @param wc Window class of the window to remove; #WC_INVALID if class does not matter
 
 */
 
void Window::DeleteChildWindows(WindowClass wc) const
 
{
 
	Window *child = FindChildWindow(this, wc);
 
	while (child != NULL) {
 
		delete child;
 
@@ -802,13 +802,13 @@ Window *FindWindowById(WindowClass cls, 
 

	
 
	return NULL;
 
}
 

	
 
/**
 
 * Find any window by its class. Useful when searching for a window that uses
 
 * the window number as a WindowType, like WC_SEND_NETWORK_MSG.
 
 * the window number as a #WindowType, like #WC_SEND_NETWORK_MSG.
 
 * @param cls Window class
 
 * @return Pointer to the found window, or \c NULL if not available
 
 */
 
Window *FindWindowByClass(WindowClass cls)
 
{
 
	Window *w;
 
@@ -2529,13 +2529,13 @@ static void CheckSoftLimit()
 
			if (w->window_class == WC_MAIN_WINDOW || IsVitalWindow(w) || (w->flags & WF_STICKY)) continue;
 

	
 
			last_deletable = w;
 
			deletable_count++;
 
		}
 

	
 
		/* We've ot reached the soft limit yet */
 
		/* We've not reached the soft limit yet. */
 
		if (deletable_count <= _settings_client.gui.window_soft_limit) break;
 

	
 
		assert(last_deletable != NULL);
 
		delete last_deletable;
 
	}
 
}