Commit ee68542e authored by Eric Petit's avatar Eric Petit

modules/gui/beos/MediaControlView.cpp: fixed a strange crash that happens

   since the gettext behaviour changed
parent f4fabf98
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
* MediaControlView.cpp: beos interface * MediaControlView.cpp: beos interface
***************************************************************************** *****************************************************************************
* Copyright (C) 1999, 2000, 2001 VideoLAN * Copyright (C) 1999, 2000, 2001 VideoLAN
* $Id: MediaControlView.cpp,v 1.16 2003/04/22 16:36:16 titer Exp $ * $Id: MediaControlView.cpp,v 1.17 2003/05/25 23:08:44 titer Exp $
* *
* Authors: Tony Castley <tony@castley.net> * Authors: Tony Castley <tony@castley.net>
* Stephan Aßmus <stippi@yellowbites.com> * Stephan Aßmus <stippi@yellowbites.com>
...@@ -61,7 +61,7 @@ const rgb_color kSeekRed = (rgb_color){ 255, 0, 0, 255 }; ...@@ -61,7 +61,7 @@ const rgb_color kSeekRed = (rgb_color){ 255, 0, 0, 255 };
const rgb_color kSeekRedLight = (rgb_color){ 255, 152, 152, 255 }; const rgb_color kSeekRedLight = (rgb_color){ 255, 152, 152, 255 };
const rgb_color kSeekRedShadow = (rgb_color){ 178, 0, 0, 255 }; const rgb_color kSeekRedShadow = (rgb_color){ 178, 0, 0, 255 };
const char* kDisabledSeekMessage = _("Drop files to play"); #define DISABLED_SEEK_MESSAGE _("Drop files to play")
enum enum
{ {
...@@ -695,7 +695,7 @@ SeekSlider::Draw(BRect updateRect) ...@@ -695,7 +695,7 @@ SeekSlider::Draw(BRect updateRect)
SetHighColor(darkShadow); SetHighColor(darkShadow);
SetLowColor(shadow); SetLowColor(shadow);
// stripes // stripes
float width = floorf(StringWidth(kDisabledSeekMessage)); float width = floorf(StringWidth(DISABLED_SEEK_MESSAGE));
float textPos = r.left + r.Width() / 2.0 - width / 2.0; float textPos = r.left + r.Width() / 2.0 - width / 2.0;
pattern stripes = {{ 0xc7, 0x8f, 0x1f, 0x3e, 0x7c, 0xf8, 0xf1, 0xe3 }}; pattern stripes = {{ 0xc7, 0x8f, 0x1f, 0x3e, 0x7c, 0xf8, 0xf1, 0xe3 }};
BRect stripesRect(r); BRect stripesRect(r);
...@@ -712,7 +712,7 @@ SeekSlider::Draw(BRect updateRect) ...@@ -712,7 +712,7 @@ SeekSlider::Draw(BRect updateRect)
SetLowColor(darkShadow); SetLowColor(darkShadow);
font_height fh; font_height fh;
GetFontHeight(&fh); GetFontHeight(&fh);
DrawString(kDisabledSeekMessage, BPoint(textPos, r.top + ceilf(fh.ascent) - 1.0)); DrawString(DISABLED_SEEK_MESSAGE, BPoint(textPos, r.top + ceilf(fh.ascent) - 1.0));
} }
} }
...@@ -763,7 +763,7 @@ SeekSlider::MouseUp(BPoint where) ...@@ -763,7 +763,7 @@ SeekSlider::MouseUp(BPoint where)
void void
SeekSlider::ResizeToPreferred() SeekSlider::ResizeToPreferred()
{ {
float width = 15.0 + StringWidth(kDisabledSeekMessage) + 15.0; float width = 15.0 + StringWidth(DISABLED_SEEK_MESSAGE) + 15.0;
ResizeTo(width, 17.0); ResizeTo(width, 17.0);
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment