aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-10-25 21:03:13 (GMT)
committerfluxgen <fluxgen>2002-10-25 21:03:13 (GMT)
commit06d3ea58c080a05db73e4b1285b7ee8c1243ea43 (patch)
treef260080f1c449cd48a354ff4126e8af0b7d02782 /src
parenta42295bccbaba71262d9e86bf36421551e5291df (diff)
downloadfluxbox-06d3ea58c080a05db73e4b1285b7ee8c1243ea43.zip
fluxbox-06d3ea58c080a05db73e4b1285b7ee8c1243ea43.tar.bz2
minor cleaning
Diffstat (limited to 'src')
-rw-r--r--src/Tab.cc15
1 files changed, 6 insertions, 9 deletions
diff --git a/src/Tab.cc b/src/Tab.cc
index 627d8a9..786871a 100644
--- a/src/Tab.cc
+++ b/src/Tab.cc
@@ -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>
35using namespace std; 33using 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//-----------------------------------
362void Tab::draw(bool pressed) const { 360void 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);