]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/filectrl.cpp
Updates to Indonesian translations by Rahmat Bambang.
[wxWidgets.git] / src / gtk / filectrl.cpp
index 5d608029045668ee48e83114ac1170a105f51768..7eaf55511731393e938f559e86e81e9fee725acb 100644 (file)
@@ -47,7 +47,7 @@ wxString wxGtkFileChooser::GetPath() const
     wxGtkString str( gtk_file_chooser_get_filename( m_widget ) );
 
     wxString string;
-    if (str.c_str() != NULL)
+    if (str)
         string = wxString::FromUTF8(str);
     return string;
 }
@@ -88,7 +88,7 @@ bool wxGtkFileChooser::SetPath( const wxString& path )
     if ( path.empty() )
         return true;
 
-    return gtk_file_chooser_set_filename( m_widget, path.utf8_str() );
+    return gtk_file_chooser_set_filename( m_widget, path.utf8_str() ) != 0;
 }
 
 bool wxGtkFileChooser::SetDirectory( const wxString& dir )
@@ -285,6 +285,12 @@ extern "C"
 
 IMPLEMENT_DYNAMIC_CLASS( wxGtkFileCtrl, wxControl )
 
+wxGtkFileCtrl::~wxGtkFileCtrl()
+{
+    if (m_fcWidget)
+        GTKDisconnect(m_fcWidget);
+}
+
 void wxGtkFileCtrl::Init()
 {
     m_checkNextSelEvent = false;