aboutsummaryrefslogtreecommitdiff
path: root/src/IconBar.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/IconBar.cc')
-rw-r--r--src/IconBar.cc35
1 files changed, 19 insertions, 16 deletions
diff --git a/src/IconBar.cc b/src/IconBar.cc
index 8c1b280..898c77e 100644
--- a/src/IconBar.cc
+++ b/src/IconBar.cc
@@ -19,7 +19,7 @@
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: IconBar.cc,v 1.40 2003/07/10 14:49:26 fluxgen Exp $ 22// $Id: IconBar.cc,v 1.41 2003/08/04 12:57:23 fluxgen Exp $
23 23
24#include "IconBar.hh" 24#include "IconBar.hh"
25 25
@@ -237,7 +237,7 @@ void IconBar::reconfigure() {
237 just redraws all the icons 237 just redraws all the icons
238*/ 238*/
239void IconBar::exposeEvent(XExposeEvent *ee) { 239void IconBar::exposeEvent(XExposeEvent *ee) {
240 IconBarObj *obj=0; 240 IconBarObj *obj = 0;
241 IconList::iterator it = m_iconlist.begin(); 241 IconList::iterator it = m_iconlist.begin();
242 IconList::iterator it_end = m_iconlist.end(); 242 IconList::iterator it_end = m_iconlist.end();
243 for (; it != it_end; ++it) { 243 for (; it != it_end; ++it) {
@@ -363,7 +363,7 @@ void IconBar::draw(const IconBarObj * const obj, int width) const {
363 fluxboxwin->iconTitle().size()); 363 fluxboxwin->iconTitle().size());
364 364
365 unsigned int bevel_w = screen().rootTheme().bevelWidth(); 365 unsigned int bevel_w = screen().rootTheme().bevelWidth();
366 int dx=bevel_w*2; 366 int dx = bevel_w * 2;
367 367
368 // center by default 368 // center by default
369 unsigned int newlen = 0; 369 unsigned int newlen = 0;
@@ -372,7 +372,7 @@ void IconBar::draw(const IconBarObj * const obj, int width) const {
372 fluxboxwin->iconTitle().c_str(), 372 fluxboxwin->iconTitle().c_str(),
373 fluxboxwin->iconTitle().size(), 373 fluxboxwin->iconTitle().size(),
374 newlen); 374 newlen);
375 //Draw title to m_iconwin 375 // Draw title to m_iconwin
376 376
377 XClearWindow(m_display, iconwin); 377 XClearWindow(m_display, iconwin);
378 int dy = 1 + m_font.ascent(); 378 int dy = 1 + m_font.ascent();
@@ -383,12 +383,12 @@ void IconBar::draw(const IconBarObj * const obj, int width) const {
383 } else 383 } else
384 dy += bevel_w; 384 dy += bevel_w;
385 385
386 m_font.drawText( 386 m_font.drawText(iconwin,
387 iconwin, 387 screen().screenNumber(),
388 screen().screenNumber(), 388 screen().winFrameTheme().labelTextFocusGC(),
389 screen().winFrameTheme().labelTextFocusGC(), 389 fluxboxwin->iconTitle().c_str(), newlen,
390 fluxboxwin->iconTitle().c_str(), newlen, 390 dx, dy,
391 dx, dy, m_vertical); 391 m_vertical);
392 392
393} 393}
394 394
@@ -403,9 +403,10 @@ FluxboxWindow *IconBar::findWindow(Window w) {
403 IconList::iterator it_end = m_iconlist.end(); 403 IconList::iterator it_end = m_iconlist.end();
404 for (; it != it_end; ++it) { 404 for (; it != it_end; ++it) {
405 IconBarObj *tmp = (*it); 405 IconBarObj *tmp = (*it);
406 if (tmp) 406 if (tmp) {
407 if (tmp->getIconWin() == w) 407 if (tmp->getIconWin() == w)
408 return tmp->getFluxboxWin(); 408 return tmp->getFluxboxWin();
409 }
409 } 410 }
410 411
411 return 0; 412 return 0;
@@ -421,9 +422,10 @@ IconBarObj *IconBar::findIcon(FluxboxWindow *fluxboxwin) {
421 IconList::iterator it_end = m_iconlist.end(); 422 IconList::iterator it_end = m_iconlist.end();
422 for (; it != it_end; ++it) { 423 for (; it != it_end; ++it) {
423 IconBarObj *tmp = (*it); 424 IconBarObj *tmp = (*it);
424 if (tmp) 425 if (tmp) {
425 if (tmp->getFluxboxWin() == fluxboxwin) 426 if (tmp->getFluxboxWin() == fluxboxwin)
426 return tmp; 427 return tmp;
428 }
427 } 429 }
428 430
429 return 0; 431 return 0;
@@ -435,9 +437,10 @@ const IconBarObj *IconBar::findIcon(const FluxboxWindow * const fluxboxwin) cons
435 IconList::const_iterator it_end = m_iconlist.end(); 437 IconList::const_iterator it_end = m_iconlist.end();
436 for (; it != it_end; ++it) { 438 for (; it != it_end; ++it) {
437 IconBarObj *tmp = (*it); 439 IconBarObj *tmp = (*it);
438 if (tmp) 440 if (tmp) {
439 if (tmp->getFluxboxWin() == fluxboxwin) 441 if (tmp->getFluxboxWin() == fluxboxwin)
440 return tmp; 442 return tmp;
443 }
441 } 444 }
442 445
443 return 0; 446 return 0;