From 67515cfb7df60e3f07051fd505be65f71606a63a Mon Sep 17 00:00:00 2001 From: Matthew Wilber Date: Sat, 2 Aug 2003 16:39:21 +0000 Subject: [PATCH] Changed to use a BString for storing the status text instead of a char * git-svn-id: file:///srv/svn/repos/haiku/trunk/current@4211 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/showimage/ShowImageStatusView.cpp | 7 +++---- src/apps/showimage/ShowImageStatusView.h | 5 +++-- 2 files changed, 6 insertions(+), 6 deletions(-) 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 */