aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2003-05-15 11:17:29 (GMT)
committerfluxgen <fluxgen>2003-05-15 11:17:29 (GMT)
commitcbce8634dde14fd7000fde92e86f4bd4bf3525c2 (patch)
treeb3be6c129906ecb67114616d761184cf3375c891 /src/Toolbar.cc
parent93220b5f1abee3057b292abb958a437ebbc707b4 (diff)
downloadfluxbox-cbce8634dde14fd7000fde92e86f4bd4bf3525c2.zip
fluxbox-cbce8634dde14fd7000fde92e86f4bd4bf3525c2.tar.bz2
cleaning in FluxboxWindow interface
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index aa39622..7bf8291 100644
--- a/src/Toolbar.cc
+++ b/src/Toolbar.cc
@@ -22,7 +22,7 @@
22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 22// FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
23// DEALINGS IN THE SOFTWARE. 23// DEALINGS IN THE SOFTWARE.
24 24
25// $Id: Toolbar.cc,v 1.80 2003/05/12 23:05:19 fluxgen Exp $ 25// $Id: Toolbar.cc,v 1.81 2003/05/15 11:17:27 fluxgen Exp $
26 26
27#include "Toolbar.hh" 27#include "Toolbar.hh"
28 28
@@ -41,6 +41,7 @@
41#include "MacroCommand.hh" 41#include "MacroCommand.hh"
42#include "RootTheme.hh" 42#include "RootTheme.hh"
43#include "BoolMenuItem.hh" 43#include "BoolMenuItem.hh"
44#include "FbWinFrameTheme.hh"
44 45
45// use GNU extensions 46// use GNU extensions
46#ifndef _GNU_SOURCE 47#ifndef _GNU_SOURCE
@@ -792,15 +793,15 @@ void Toolbar::redrawWindowLabel(bool redraw) {
792 793
793 FluxboxWindow *foc = Fluxbox::instance()->getFocusedWindow(); 794 FluxboxWindow *foc = Fluxbox::instance()->getFocusedWindow();
794 // don't draw focused window if it's not on the same screen 795 // don't draw focused window if it's not on the same screen
795 if (&foc->screen() != &screen() || foc->getTitle().size() == 0) 796 if (&foc->screen() != &screen() || foc->title().size() == 0)
796 return; 797 return;
797 798
798 unsigned int newlen = foc->getTitle().size(); 799 unsigned int newlen = foc->title().size();
799 int dx = FbTk::doAlignment(frame.window_label_w, frame.bevel_w*2, 800 int dx = FbTk::doAlignment(frame.window_label_w, frame.bevel_w*2,
800 m_theme.justify(), 801 m_theme.justify(),
801 m_theme.font(), 802 m_theme.font(),
802 foc->getTitle().c_str(), 803 foc->title().c_str(),
803 foc->getTitle().size(), newlen); 804 foc->title().size(), newlen);
804 int dy = 1 + m_theme.font().ascent(); 805 int dy = 1 + m_theme.font().ascent();
805 806
806 if (m_theme.font().isRotated()) { 807 if (m_theme.font().isRotated()) {
@@ -814,7 +815,7 @@ void Toolbar::redrawWindowLabel(bool redraw) {
814 frame.window_label.window(), 815 frame.window_label.window(),
815 screen().getScreenNumber(), 816 screen().getScreenNumber(),
816 m_theme.windowTextGC(), 817 m_theme.windowTextGC(),
817 foc->getTitle().c_str(), newlen, 818 foc->title().c_str(), newlen,
818 dx, dy); 819 dx, dy);
819 } else 820 } else
820 frame.window_label.clear(); 821 frame.window_label.clear();
@@ -895,7 +896,7 @@ void Toolbar::buttonPressEvent(XButtonEvent &be) {
895 FluxboxWindow *fluxboxwin = 0; 896 FluxboxWindow *fluxboxwin = 0;
896 // if we clicked on a icon then show window menu 897 // if we clicked on a icon then show window menu
897 if ( m_iconbar.get() != 0 && (fluxboxwin = m_iconbar->findWindow(be.window)) ) { 898 if ( m_iconbar.get() != 0 && (fluxboxwin = m_iconbar->findWindow(be.window)) ) {
898 const FbTk::Menu &wm = fluxboxwin->getWindowmenu(); 899 const FbTk::Menu &wm = fluxboxwin->menu();
899 900
900 int menu_y = be.y_root - wm.height(); 901 int menu_y = be.y_root - wm.height();
901 int menu_x = be.x_root; 902 int menu_x = be.x_root;