diff options
Diffstat (limited to 'src/FbWinFrame.cc')
-rw-r--r-- | src/FbWinFrame.cc | 15 |
1 files changed, 5 insertions, 10 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc index 99dd93d..84f47f4 100644 --- a/src/FbWinFrame.cc +++ b/src/FbWinFrame.cc | |||
@@ -33,6 +33,7 @@ | |||
33 | #include "FbWinFrameTheme.hh" | 33 | #include "FbWinFrameTheme.hh" |
34 | #include "Screen.hh" | 34 | #include "Screen.hh" |
35 | 35 | ||
36 | #include "IconButton.hh" | ||
36 | #include "Container.hh" | 37 | #include "Container.hh" |
37 | 38 | ||
38 | #ifdef SHAPE | 39 | #ifdef SHAPE |
@@ -619,11 +620,9 @@ void FbWinFrame::removeAllButtons() { | |||
619 | } | 620 | } |
620 | } | 621 | } |
621 | 622 | ||
622 | FbWinFrame::ButtonId FbWinFrame::createTab(const string &title, FbTk::Command *command, | 623 | IconButton *FbWinFrame::createTab(Focusable &client) { |
623 | int tabs_padding) { | 624 | IconButton *button = new IconButton(m_tab_container, theme().font(), |
624 | FbTk::TextButton *button = new FbTk::TextButton(m_tab_container, | 625 | client); |
625 | theme().font(), | ||
626 | title); | ||
627 | 626 | ||
628 | button->show(); | 627 | button->show(); |
629 | button->setEventMask(ExposureMask | ButtonPressMask | | 628 | button->setEventMask(ExposureMask | ButtonPressMask | |
@@ -631,10 +630,6 @@ FbWinFrame::ButtonId FbWinFrame::createTab(const string &title, FbTk::Command *c | |||
631 | EnterWindowMask); | 630 | EnterWindowMask); |
632 | FbTk::EventManager::instance()->add(*button, button->window()); | 631 | FbTk::EventManager::instance()->add(*button, button->window()); |
633 | 632 | ||
634 | FbTk::RefCount<FbTk::Command> refcmd(command); | ||
635 | button->setOnClick(refcmd); | ||
636 | |||
637 | button->setTextPadding(tabs_padding); | ||
638 | button->setJustify(theme().justify()); | 633 | button->setJustify(theme().justify()); |
639 | button->setBorderColor(theme().border().color()); | 634 | button->setBorderColor(theme().border().color()); |
640 | button->setBorderWidth(m_window.borderWidth()); | 635 | button->setBorderWidth(m_window.borderWidth()); |
@@ -647,7 +642,7 @@ FbWinFrame::ButtonId FbWinFrame::createTab(const string &title, FbTk::Command *c | |||
647 | return button; | 642 | return button; |
648 | } | 643 | } |
649 | 644 | ||
650 | void FbWinFrame::removeTab(ButtonId btn) { | 645 | void FbWinFrame::removeTab(IconButton *btn) { |
651 | if (btn == m_current_label) | 646 | if (btn == m_current_label) |
652 | m_current_label = 0; | 647 | m_current_label = 0; |
653 | 648 | ||