diff options
Diffstat (limited to 'src/Tab.cc')
-rw-r--r-- | src/Tab.cc | 15 |
1 files changed, 6 insertions, 9 deletions
@@ -19,17 +19,15 @@ | |||
19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER | 19 | // FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER |
20 | // DEALINGS IN THE SOFTWARE. | 20 | // DEALINGS IN THE SOFTWARE. |
21 | 21 | ||
22 | // $Id: Tab.cc,v 1.35 2002/10/22 14:42:58 fluxgen Exp $ | 22 | // $Id: Tab.cc,v 1.36 2002/10/25 21:03:13 fluxgen Exp $ |
23 | 23 | ||
24 | #include "Tab.hh" | 24 | #include "Tab.hh" |
25 | 25 | ||
26 | #ifdef HAVE_CONFIG_H | ||
27 | # include "../config.h" | ||
28 | #endif // HAVE_CONFIG_H | ||
29 | |||
30 | #include "i18n.hh" | 26 | #include "i18n.hh" |
31 | #include "DrawUtil.hh" | 27 | #include "DrawUtil.hh" |
32 | #include "Screen.hh" | 28 | #include "Screen.hh" |
29 | #include "fluxbox.hh" | ||
30 | #include "Rootmenu.hh" | ||
33 | 31 | ||
34 | #include <iostream> | 32 | #include <iostream> |
35 | using namespace std; | 33 | using namespace std; |
@@ -59,7 +57,7 @@ Tab::Tab(FluxboxWindow *win, Tab *prev, Tab *next) { | |||
59 | m_move_x = m_move_y = 0; | 57 | m_move_x = m_move_y = 0; |
60 | m_prev = prev; m_next = next; | 58 | m_prev = prev; m_next = next; |
61 | m_win = win; | 59 | m_win = win; |
62 | m_display = Fluxbox::instance()->getXDisplay(); | 60 | m_display = BaseDisplay::getXDisplay(); |
63 | 61 | ||
64 | if ((m_win->getScreen()->getTabPlacement() == PLEFT || | 62 | if ((m_win->getScreen()->getTabPlacement() == PLEFT || |
65 | m_win->getScreen()->getTabPlacement() == PRIGHT) && | 63 | m_win->getScreen()->getTabPlacement() == PRIGHT) && |
@@ -360,7 +358,6 @@ void Tab::shade() { | |||
360 | // TODO: the "draw in pressed mode" | 358 | // TODO: the "draw in pressed mode" |
361 | //----------------------------------- | 359 | //----------------------------------- |
362 | void Tab::draw(bool pressed) const { | 360 | void Tab::draw(bool pressed) const { |
363 | unsigned int tabtext_w; | ||
364 | 361 | ||
365 | GC gc = ((m_win->isFocused()) ? m_win->getScreen()->getWindowStyle()->tab.l_text_focus_gc : | 362 | GC gc = ((m_win->isFocused()) ? m_win->getScreen()->getWindowStyle()->tab.l_text_focus_gc : |
366 | m_win->getScreen()->getWindowStyle()->tab.l_text_unfocus_gc); | 363 | m_win->getScreen()->getWindowStyle()->tab.l_text_unfocus_gc); |
@@ -385,8 +382,8 @@ void Tab::draw(bool pressed) const { | |||
385 | */ | 382 | */ |
386 | int dx=m_win->frame.bevel_w*2; | 383 | int dx=m_win->frame.bevel_w*2; |
387 | Theme::WindowStyle *winstyle = m_win->getScreen()->getWindowStyle(); | 384 | Theme::WindowStyle *winstyle = m_win->getScreen()->getWindowStyle(); |
388 | int dlen = m_win->getTitle().size(); | 385 | size_t dlen = m_win->getTitle().size(); |
389 | int l = dlen; | 386 | size_t l = dlen; |
390 | if ( dlen > m_size_w) { | 387 | if ( dlen > m_size_w) { |
391 | for (; dlen >= 0; dlen--) { | 388 | for (; dlen >= 0; dlen--) { |
392 | l = winstyle->tab.font.textWidth(m_win->getTitle().c_str(), dlen); | 389 | l = winstyle->tab.font.textWidth(m_win->getTitle().c_str(), dlen); |