]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/filedlg.cpp
Added bitmaps and icons to samples
[wxWidgets.git] / src / gtk / filedlg.cpp
index 4589f3de1ab70add12d97c3db36d3621c6ee05ce..bc003c8185b18b2c66ad7956c7dd181e89578698 100644 (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;