Fixed wxOVERWRITE_PROMPT bug in gtk file selector

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@388 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Unknown (MO) 1998-07-28 15:01:09 +00:00
parent 2108f33a68
commit 99cc0288bd
2 changed files with 8 additions and 2 deletions

View File

@ -25,8 +25,11 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), gpointer data )
{
wxFileDialog *dialog = (wxFileDialog*)data;
wxCommandEvent event(wxEVT_NULL);
int style;
if(dialog->GetStyle()&(wxSAVE|wxOVERWRITE_PROMPT))
style=dialog->GetStyle();
if((style&wxSAVE)&&(style&wxOVERWRITE_PROMPT))
if(wxFileExists(gtk_file_selection_get_filename(GTK_FILE_SELECTION(dialog->m_widget) ))) {
if(wxMessageBox("File exists. Overwrite?","Confirm",wxYES_NO)!=wxYES)
return;

View File

@ -25,8 +25,11 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), gpointer data )
{
wxFileDialog *dialog = (wxFileDialog*)data;
wxCommandEvent event(wxEVT_NULL);
int style;
if(dialog->GetStyle()&(wxSAVE|wxOVERWRITE_PROMPT))
style=dialog->GetStyle();
if((style&wxSAVE)&&(style&wxOVERWRITE_PROMPT))
if(wxFileExists(gtk_file_selection_get_filename(GTK_FILE_SELECTION(dialog->m_widget) ))) {
if(wxMessageBox("File exists. Overwrite?","Confirm",wxYES_NO)!=wxYES)
return;