Browse Source

Fixed strings, fixed typo

rsredsq 10 years ago
parent
commit
e9df7f1f82

+ 4 - 5
Source/Atomic/UI/UIWidget.cpp

@@ -250,12 +250,11 @@ void UIWidget::AddChildRelative(UIWidget* child, UI_WIDGET_Z_REL z, UIWidget* re
 String UIWidget::GetText()
 String UIWidget::GetText()
 {
 {
     if (!widget_)
     if (!widget_)
-        return "";
+        return String::EMPTY;
 
 
     return widget_->GetText().CStr();
     return widget_->GetText().CStr();
 }
 }
 
 
-
 void UIWidget::SetText(const String& text)
 void UIWidget::SetText(const String& text)
 {
 {
     if (!widget_)
     if (!widget_)
@@ -806,7 +805,7 @@ bool UIWidget::GetCapturing()
     if (!widget_)
     if (!widget_)
         return false;
         return false;
 
 
-    widget_->GetCapturing();
+    return widget_->GetCapturing();
 }
 }
 
 
 void UIWidget::InvalidateLayout()
 void UIWidget::InvalidateLayout()
@@ -833,7 +832,7 @@ bool UIWidget::GetShortened()
     return widget_->GetShortened();
     return widget_->GetShortened();
 }
 }
 
 
-void UIWidget::GetShortened(bool shortened)
+void UIWidget::SetShortened(bool shortened)
 {
 {
     if (!widget_)
     if (!widget_)
         return;
         return;
@@ -844,7 +843,7 @@ void UIWidget::GetShortened(bool shortened)
 String UIWidget::GetTooltip()
 String UIWidget::GetTooltip()
 {
 {
     if (!widget_)
     if (!widget_)
-        return "";
+        return String::EMPTY;
 
 
     return widget_->GetTooltip().CStr();
     return widget_->GetTooltip().CStr();
 }
 }

+ 1 - 1
Source/Atomic/UI/UIWidget.h

@@ -264,7 +264,7 @@ class UIWidget : public Object, public tb::TBWidgetDelegate
 
 
     bool GetShortened();
     bool GetShortened();
 
 
-    void GetShortened(bool shortened);
+    void SetShortened(bool shortened);
 
 
     String GetTooltip();
     String GetTooltip();
 
 

+ 1 - 1
Source/ThirdParty/TurboBadger/tb_widgets.h

@@ -1003,7 +1003,7 @@ public:
 
 
     void SetShortened(bool shortened) { shortened_ = shortened; }
     void SetShortened(bool shortened) { shortened_ = shortened; }
 
 
-    TBStr GetTooltip() { TBStr str; str.Set(tooltip_); return str; }
+    TBStr GetTooltip() { return tooltip_; }
 
 
     bool SetTooltip(const char *tooltip) { return tooltip_.Set(tooltip); }
     bool SetTooltip(const char *tooltip) { return tooltip_.Set(tooltip); }