diff options
author | Mathias Gumz <akira at fluxbox dot org> | 2010-09-15 00:07:09 (GMT) |
---|---|---|
committer | Mathias Gumz <akira at fluxbox dot org> | 2010-09-15 00:07:09 (GMT) |
commit | 12e1ef78265a621dc51f7b9af245d81431835dcc (patch) | |
tree | b1e7c9ec99f24c89989a34cb994119319184abb7 /src/FbWinFrame.cc | |
parent | ba316aa18a8813958cedea1cc4d54452e40c4b59 (diff) | |
download | fluxbox-12e1ef78265a621dc51f7b9af245d81431835dcc.zip fluxbox-12e1ef78265a621dc51f7b9af245d81431835dcc.tar.bz2 |
code deduplication by using <algorithm> and FbTk/STLUtil.hh
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r-- | src/FbWinFrame.cc | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 4c56d49..9c35925 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -29,6 +29,7 @@ | |||
29 | #include "FbTk/Transparent.hh" | 29 | #include "FbTk/Transparent.hh" |
30 | #include "FbTk/CompareEqual.hh" | 30 | #include "FbTk/CompareEqual.hh" |
31 | #include "FbTk/TextUtils.hh" | 31 | #include "FbTk/TextUtils.hh" |
32 | #include "FbTk/STLUtil.hh" | ||
32 | 33 | ||
33 | #include "FbWinFrameTheme.hh" | 34 | #include "FbWinFrameTheme.hh" |
34 | #include "Screen.hh" | 35 | #include "Screen.hh" |
@@ -42,6 +43,8 @@ using std::max; | |||
42 | using std::mem_fun; | 43 | using std::mem_fun; |
43 | using std::string; | 44 | using std::string; |
44 | 45 | ||
46 | using FbTk::STLUtil::forAll; | ||
47 | |||
45 | FbWinFrame::FbWinFrame(BScreen &screen, WindowState &state, | 48 | FbWinFrame::FbWinFrame(BScreen &screen, WindowState &state, |
46 | FocusableTheme<FbWinFrameTheme> &theme): | 49 | FocusableTheme<FbWinFrameTheme> &theme): |
47 | m_screen(screen), | 50 | m_screen(screen), |
@@ -439,12 +442,8 @@ void FbWinFrame::notifyMoved(bool clear) { | |||
439 | 442 | ||
440 | m_titlebar.parentMoved(); | 443 | m_titlebar.parentMoved(); |
441 | 444 | ||
442 | for_each(m_buttons_left.begin(), | 445 | forAll(m_buttons_left, mem_fun(&FbTk::Button::parentMoved)); |
443 | m_buttons_left.end(), | 446 | forAll(m_buttons_right, mem_fun(&FbTk::Button::parentMoved)); |
444 | mem_fun(&FbTk::Button::parentMoved)); | ||
445 | for_each(m_buttons_right.begin(), | ||
446 | m_buttons_right.end(), | ||
447 | mem_fun(&FbTk::Button::parentMoved)); | ||
448 | } | 447 | } |
449 | 448 | ||
450 | if (m_use_handle) { | 449 | if (m_use_handle) { |
@@ -463,13 +462,8 @@ void FbWinFrame::clearAll() { | |||
463 | 462 | ||
464 | if (m_use_titlebar) { | 463 | if (m_use_titlebar) { |
465 | redrawTitlebar(); | 464 | redrawTitlebar(); |
466 | 465 | forAll(m_buttons_left, mem_fun(&FbTk::Button::clear)); | |
467 | for_each(m_buttons_left.begin(), | 466 | forAll(m_buttons_right, mem_fun(&FbTk::Button::clear)); |
468 | m_buttons_left.end(), | ||
469 | mem_fun(&FbTk::Button::clear)); | ||
470 | for_each(m_buttons_right.begin(), | ||
471 | m_buttons_right.end(), | ||
472 | mem_fun(&FbTk::Button::clear)); | ||
473 | } else if (m_tabmode == EXTERNAL && m_use_tabs) | 467 | } else if (m_tabmode == EXTERNAL && m_use_tabs) |
474 | m_tab_container.clear(); | 468 | m_tab_container.clear(); |
475 | 469 | ||