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)
+ if(wxMessageBox(_("File exists. Overwrite?"),
+ _("Confirm"), wxYES_NO) != wxYES)
return;
}
- dialog->OnOk( event );
-};
+ dialog->OnOK( event );
+}
void gtk_filedialog_cancel_callback( GtkWidget *WXUNUSED(widget), gpointer data )
{
wxFileDialog *dialog = (wxFileDialog*)data;
wxCommandEvent event(wxEVT_NULL);
dialog->OnCancel( event );
-};
+}
IMPLEMENT_DYNAMIC_CLASS(wxFileDialog,wxDialog)
m_dialogStyle = style;
m_filterIndex = 1;
- m_widget = gtk_file_selection_new( "File selection" );
+ m_widget = gtk_file_selection_new( m_message );
int x = (gdk_screen_width () - 400) / 2;
int y = (gdk_screen_height () - 400) / 2;
gtk_signal_connect( GTK_OBJECT(sel->cancel_button), "clicked",
GTK_SIGNAL_FUNC(gtk_filedialog_cancel_callback), (gpointer*)this );
-};
+}
int wxFileDialog::ShowModal(void)
{
{
m_fileName = gtk_file_selection_get_filename( GTK_FILE_SELECTION(m_widget) );
m_path = gtk_file_selection_get_filename( GTK_FILE_SELECTION(m_widget) );
- };
+ }
return ret;
-};
+}
char *wxFileSelector(const char *title,
return wxBuffer;
}
else
- return NULL;
-};
+ return (char *) NULL;
+}
char* wxLoadFileSelector(const char *what, const char *extension, const char *default_name,
wxWindow *parent )
char wild[60];
sprintf(wild, "*.%s", ext);
- return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
-};
+ return wxFileSelector (prompt, (const char *) NULL, default_name, ext, wild, 0, parent);
+}
char* wxSaveFileSelector(const char *what, const char *extension, const char *default_name,
wxWindow *parent )
char wild[60];
sprintf(wild, "*.%s", ext);
- return wxFileSelector (prompt, NULL, default_name, ext, wild, 0, parent);
-};
-
-
-
+ return wxFileSelector (prompt, (const char *) NULL, default_name, ext, wild, 0, parent);
+}