aboutsummaryrefslogtreecommitdiff
path: root/src/Toolbar.cc
diff options
context:
space:
mode:
authorfluxgen <fluxgen>2002-04-03 23:04:01 (GMT)
committerfluxgen <fluxgen>2002-04-03 23:04:01 (GMT)
commit70f3639c0247c667b3ec5ddfb9e2726c08cbe12c (patch)
tree7b200998f289016804c0e1c30283d6ab935b001a /src/Toolbar.cc
parent36dcc230a277e0bfeef05964d81e4ad56687551c (diff)
downloadfluxbox-70f3639c0247c667b3ec5ddfb9e2726c08cbe12c.zip
fluxbox-70f3639c0247c667b3ec5ddfb9e2726c08cbe12c.tar.bz2
std::string for title and icon title in FluxboxWindow
Diffstat (limited to 'src/Toolbar.cc')
-rw-r--r--src/Toolbar.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/Toolbar.cc b/src/Toolbar.cc
index fc61d55..295a44c 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.17 2002/04/03 12:08:54 fluxgen Exp $ 25// $Id: Toolbar.cc,v 1.18 2002/04/03 23:02:49 fluxgen Exp $
26 26
27// stupid macros needed to access some functions in version 2 of the GNU C 27// stupid macros needed to access some functions in version 2 of the GNU C
28// library 28// library
@@ -727,17 +727,17 @@ void Toolbar::redrawWindowLabel(Bool redraw) {
727 if (foc->getScreen() != screen) 727 if (foc->getScreen() != screen)
728 return; 728 return;
729 729
730 int dx = (frame.bevel_w * 2), dlen = strlen(foc->getTitle()); 730 int dx = (frame.bevel_w * 2), dlen = foc->getTitle().size();
731 unsigned int l; 731 unsigned int l;
732 I18n *i18n = I18n::instance(); 732 I18n *i18n = I18n::instance();
733 733
734 if (i18n->multibyte()) { 734 if (i18n->multibyte()) {
735 XRectangle ink, logical; 735 XRectangle ink, logical;
736 XmbTextExtents(screen->getToolbarStyle()->font.set, foc->getTitle(), dlen, 736 XmbTextExtents(screen->getToolbarStyle()->font.set, foc->getTitle().c_str(), dlen,
737 &ink, &logical); 737 &ink, &logical);
738 l = logical.width; 738 l = logical.width;
739 } else 739 } else
740 l = XTextWidth(screen->getToolbarStyle()->font.fontstruct, foc->getTitle(), dlen); 740 l = XTextWidth(screen->getToolbarStyle()->font.fontstruct, foc->getTitle().c_str(), dlen);
741 741
742 l += (frame.bevel_w * 4); 742 l += (frame.bevel_w * 4);
743 743
@@ -746,10 +746,10 @@ void Toolbar::redrawWindowLabel(Bool redraw) {
746 if (i18n->multibyte()) { 746 if (i18n->multibyte()) {
747 XRectangle ink, logical; 747 XRectangle ink, logical;
748 XmbTextExtents(screen->getToolbarStyle()->font.set, 748 XmbTextExtents(screen->getToolbarStyle()->font.set,
749 foc->getTitle(), dlen, &ink, &logical); 749 foc->getTitle().c_str(), dlen, &ink, &logical);
750 l = logical.width; 750 l = logical.width;
751 } else 751 } else
752 l = XTextWidth(screen->getToolbarStyle()->font.fontstruct, foc->getTitle(), dlen); 752 l = XTextWidth(screen->getToolbarStyle()->font.fontstruct, foc->getTitle().c_str(), dlen);
753 753
754 l += (frame.bevel_w * 4); 754 l += (frame.bevel_w * 4);
755 755
@@ -774,12 +774,12 @@ void Toolbar::redrawWindowLabel(Bool redraw) {
774 screen->getToolbarStyle()->font.set, 774 screen->getToolbarStyle()->font.set,
775 screen->getToolbarStyle()->w_text_gc, dx, 1 - 775 screen->getToolbarStyle()->w_text_gc, dx, 1 -
776 screen->getToolbarStyle()->font.set_extents->max_ink_extent.y, 776 screen->getToolbarStyle()->font.set_extents->max_ink_extent.y,
777 foc->getTitle(), dlen); 777 foc->getTitle().c_str(), dlen);
778 else 778 else
779 XDrawString(display, frame.window_label, 779 XDrawString(display, frame.window_label,
780 screen->getToolbarStyle()->w_text_gc, dx, 780 screen->getToolbarStyle()->w_text_gc, dx,
781 screen->getToolbarStyle()->font.fontstruct->ascent + 1, 781 screen->getToolbarStyle()->font.fontstruct->ascent + 1,
782 foc->getTitle(), dlen); 782 foc->getTitle().c_str(), dlen);
783 } else 783 } else
784 XClearWindow(display, frame.window_label); 784 XClearWindow(display, frame.window_label);
785} 785}