diff --git a/src/apps/showimage/ShowImageStatusView.cpp b/src/apps/showimage/ShowImageStatusView.cpp index 0234eaaa93..015f6b5185 100644 --- a/src/apps/showimage/ShowImageStatusView.cpp +++ b/src/apps/showimage/ShowImageStatusView.cpp @@ -7,16 +7,15 @@ ShowImageStatusView::ShowImageStatusView(BRect r, const char* name, uint32 resizingMode, uint32 flags) : BView(r, name, resizingMode, flags) { - m_caption = ""; } void ShowImageStatusView::Draw(BRect updateRect) { - DrawString( m_caption, BPoint( 3, 11) ); + DrawString( fstrText.String(), BPoint( 3, 11) ); } -void ShowImageStatusView::SetCaption( char * Caption ) +void ShowImageStatusView::SetText(BString &strText) { - m_caption = Caption; + fstrText = strText; Invalidate(); } diff --git a/src/apps/showimage/ShowImageStatusView.h b/src/apps/showimage/ShowImageStatusView.h index f279622b68..6d8a3049c2 100644 --- a/src/apps/showimage/ShowImageStatusView.h +++ b/src/apps/showimage/ShowImageStatusView.h @@ -6,6 +6,7 @@ #define _ShowImageStatusView_h #include +#include class ShowImageStatusView : public BView { @@ -14,10 +15,10 @@ public: virtual void Draw(BRect updateRect); - void SetCaption( char * Caption ); + void SetText(BString &strText); private: - char * m_caption; + BString fstrText; }; #endif /* _ShowImageStatusView_h */