aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2006-02-19 11:44:57 (GMT)
committerfluxgen <fluxgen>2006-02-19 11:44:57 (GMT)
commit98209ba704e047c8f8f7df08fbb5849e3294cc68 (patch)
tree53a85a82289c3bfb2326785c0def47b1bea0da28
parent1cdeabc7fc2867de7a7f493be4a7da263ad2abfc (diff)
downloadfluxbox-98209ba704e047c8f8f7df08fbb5849e3294cc68.zip
fluxbox-98209ba704e047c8f8f7df08fbb5849e3294cc68.tar.bz2
FbWinFrame should not depend on class Fluxbox
-rw-r--r--src/FbWinFrame.cc6
-rw-r--r--src/FbWinFrame.hh2
-rw-r--r--src/Window.cc3
3 files changed, 6 insertions, 5 deletions
diff --git a/src/FbWinFrame.cc b/src/FbWinFrame.cc
index 02af8d3..8e7c455 100644
--- a/src/FbWinFrame.cc
+++ b/src/FbWinFrame.cc
@@ -32,7 +32,6 @@
32#include "FbTk/Transparent.hh" 32#include "FbTk/Transparent.hh"
33#include "CompareWindow.hh" 33#include "CompareWindow.hh"
34#include "FbWinFrameTheme.hh" 34#include "FbWinFrameTheme.hh"
35#include "fluxbox.hh"
36 35
37#include "Container.hh" 36#include "Container.hh"
38 37
@@ -332,7 +331,8 @@ void FbWinFrame::removeAllButtons() {
332 } 331 }
333} 332}
334 333
335FbWinFrame::ButtonId FbWinFrame::createTab(const std::string &title, FbTk::Command *command) { 334FbWinFrame::ButtonId FbWinFrame::createTab(const std::string &title, FbTk::Command *command,
335 int tabs_padding) {
336 FbTk::TextButton *button = new FbTk::TextButton(m_tab_container, 336 FbTk::TextButton *button = new FbTk::TextButton(m_tab_container,
337 theme().font(), 337 theme().font(),
338 title); 338 title);
@@ -346,7 +346,7 @@ FbWinFrame::ButtonId FbWinFrame::createTab(const std::string &title, FbTk::Comma
346 FbTk::RefCount<FbTk::Command> refcmd(command); 346 FbTk::RefCount<FbTk::Command> refcmd(command);
347 button->setOnClick(refcmd); 347 button->setOnClick(refcmd);
348 348
349 button->setTextPadding(Fluxbox::instance()->getTabsPadding()); 349 button->setTextPadding(tabs_padding);
350 button->setJustify(theme().justify()); 350 button->setJustify(theme().justify());
351 351
352 m_tab_container.insertItem(button); 352 m_tab_container.insertItem(button);
diff --git a/src/FbWinFrame.hh b/src/FbWinFrame.hh
index 71aed58..bc4c1be 100644
--- a/src/FbWinFrame.hh
+++ b/src/FbWinFrame.hh
@@ -110,7 +110,7 @@ public:
110 /// remove all buttons from titlebar 110 /// remove all buttons from titlebar
111 void removeAllButtons(); 111 void removeAllButtons();
112 /// adds a button to label window with specified title and command 112 /// adds a button to label window with specified title and command
113 ButtonId createTab(const std::string &title, FbTk::Command *cmd); 113 ButtonId createTab(const std::string &title, FbTk::Command *cmd, int tab_padding);
114 // void addLabelButton(FbTk::TextButton &btn); 114 // void addLabelButton(FbTk::TextButton &btn);
115 /// removes a specific button from label window 115 /// removes a specific button from label window
116 void removeTab(ButtonId id); 116 void removeTab(ButtonId id);
diff --git a/src/Window.cc b/src/Window.cc
index 5ef606b..a3b20f9 100644
--- a/src/Window.cc
+++ b/src/Window.cc
@@ -3950,7 +3950,8 @@ void FluxboxWindow::ungrabPointer(Time time) {
3950void FluxboxWindow::associateClient(WinClient &client) { 3950void FluxboxWindow::associateClient(WinClient &client) {
3951 3951
3952 FbWinFrame::ButtonId btn = frame().createTab(client.title(), 3952 FbWinFrame::ButtonId btn = frame().createTab(client.title(),
3953 new SetClientCmd(client)); 3953 new SetClientCmd(client),
3954 Fluxbox::instance()->getTabsPadding());
3954 3955
3955 m_labelbuttons[&client] = btn; 3956 m_labelbuttons[&client] = btn;
3956 3957