From bfb8df3fb9e21fffce0560a4fb44bb615663a7a2 Mon Sep 17 00:00:00 2001 From: alberth Date: Sat, 30 May 2009 11:30:25 +0000 Subject: (svn r16465) -Codechange: Eliminated GetGloballyFocusedWidget(), it was used only once. --- src/window.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/window.cpp') diff --git a/src/window.cpp b/src/window.cpp index 2009f15dd..10165ef87 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -111,15 +111,6 @@ void SetFocusedWindow(Window *w) if (_focused_window != NULL) _focused_window->OnFocus(); } -/** - * Gets the globally focused widget. Which is the focused widget of the focused window. - * @return A pointer to the globally focused Widget, or NULL if there is no globally focused widget. - */ -const Widget *GetGloballyFocusedWidget() -{ - return _focused_window != NULL ? _focused_window->focused_widget : NULL; -} - /** * Check if an edit box is in global focus. That is if focused window * has a edit box as focused widget, or if a console is focused. @@ -127,7 +118,7 @@ const Widget *GetGloballyFocusedWidget() */ bool EditBoxInGlobalFocus() { - const Widget *wi = GetGloballyFocusedWidget(); + const Widget *wi = (_focused_window != NULL) ? _focused_window->focused_widget : NULL; /* The console does not have an edit box so a special case is needed. */ return (wi != NULL && wi->type == WWT_EDITBOX) || -- cgit v1.2.3-54-g00ecf