X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f8bc53eb53d46fb5aba070830100e6994cfc435f..222702b112dcc7bebe018d6f4d66fe469fefd02c:/src/gtk/filedlg.cpp?ds=sidebyside diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index 71d76a6915..500acf64ef 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -39,7 +39,6 @@ //----------------------------------------------------------------------------- extern void wxapp_install_idle_handler(); -extern bool g_isIdle; //----------------------------------------------------------------------------- // "clicked" for OK-button @@ -195,7 +194,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, if ( style & wxSAVE ) { - if ( !defaultDir.IsEmpty() ) + if ( !defaultDir.empty() ) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(m_widget), wxConvFileName->cWX2MB(defaultDir)); @@ -204,10 +203,10 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, } else { - if ( !defaultFileName.IsEmpty() ) + if ( !defaultFileName.empty() ) { wxString dir; - if ( defaultDir.IsEmpty() ) + if ( defaultDir.empty() ) dir = ::wxGetCwd(); else dir = defaultDir; @@ -216,7 +215,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, GTK_FILE_CHOOSER(m_widget), wxConvFileName->cWX2MB( wxFileName(dir, defaultFileName).GetFullPath() ) ); } - else if ( !defaultDir.IsEmpty() ) + else if ( !defaultDir.empty() ) gtk_file_chooser_set_current_folder( GTK_FILE_CHOOSER(m_widget), wxConvFileName->cWX2MB(defaultDir) ); } @@ -267,6 +266,14 @@ bool wxFileDialog::Show( bool show ) return wxGenericFileDialog::Show( show ); } +void wxFileDialog::DoSetSize(int x, int y, int width, int height, int sizeFlags ) +{ + if (!m_wxwindow) + return; + else + wxGenericFileDialog::DoSetSize( x, y, width, height, sizeFlags ); +} + wxString wxFileDialog::GetPath() const { #ifdef __WXGTK24__ @@ -354,7 +361,7 @@ void wxFileDialog::SetDirectory(const wxString& dir) #ifdef __WXGTK24__ if (!gtk_check_version(2,4,0)) { - if (wxPathExists(dir)) + if (wxDirExists(dir)) { gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(m_widget), wxConvFileName->cWX2MB(dir)); }