]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/textctrl.cpp
implemented wxMBConv::IsUTF8() helper for more classes so that all uses of UTF-8...
[wxWidgets.git] / src / gtk / textctrl.cpp
index 56d2d05c1fc6f04704b799db0b734be59f2723ef..03d093667cb775336b593a3052f5f998c8487373 100644 (file)
@@ -162,12 +162,12 @@ static void wxGtkTextApplyTagsFromAttr(GtkWidget *text,
 // gtk+ doesn't support justify before gtk+-2.11.0 with pango-1.17 being available
 // (but if new enough pango isn't available it's a mere gtk warning)
 #if GTK_CHECK_VERSION(2,11,0)
-                       case wxTEXT_ALIGNMENT_JUSTIFIED:
+            case wxTEXT_ALIGNMENT_JUSTIFIED:
                 if (!gtk_check_version(2,11,0))
-                                   align = GTK_JUSTIFY_FILL;
+                    align = GTK_JUSTIFY_FILL;
                 else
                     align = GTK_JUSTIFY_LEFT;
-                               break;
+                break;
 #endif
         }
 
@@ -955,16 +955,12 @@ wxString wxTextCtrl::GetValue() const
         gtk_text_buffer_get_end_iter( m_buffer, &end );
         wxGtkString text(gtk_text_buffer_get_text(m_buffer, &start, &end, true));
 
-        const wxWxCharBuffer buf = wxGTK_CONV_BACK(text);
-        if ( buf )
-            tmp = buf;
+        return wxGTK_CONV_BACK(text);
     }
     else
     {
         const gchar *text = gtk_entry_get_text( GTK_ENTRY(m_text) );
-        const wxWxCharBuffer buf = wxGTK_CONV_BACK( text );
-        if ( buf )
-            tmp = buf;
+        return wxGTK_CONV_BACK(text);
     }
 
     return tmp;