X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/a3622daa901777a33969d8bc04e2d62dee14d164..c9f8e0e22e0cb2a82233e9076da7414315df062d:/src/gtk/filedlg.cpp diff --git a/src/gtk/filedlg.cpp b/src/gtk/filedlg.cpp index a555c487be..df42cb90a1 100644 --- a/src/gtk/filedlg.cpp +++ b/src/gtk/filedlg.cpp @@ -2,9 +2,8 @@ // Name: filedlg.cpp // Purpose: // Author: Robert Roebling -// Created: 01/02/97 -// Id: -// Copyright: (c) 1998 Robert Roebling, Julian Smart and Markus Holzem +// Id: $Id$ +// Copyright: (c) 1998 Robert Roebling // Licence: wxWindows licence ///////////////////////////////////////////////////////////////////////////// @@ -31,19 +30,20 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), gpointer data ) 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) @@ -63,7 +63,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, 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; @@ -82,7 +82,7 @@ wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message, gtk_signal_connect( GTK_OBJECT(sel->cancel_button), "clicked", GTK_SIGNAL_FUNC(gtk_filedialog_cancel_callback), (gpointer*)this ); -}; +} int wxFileDialog::ShowModal(void) { @@ -92,9 +92,9 @@ 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, @@ -129,8 +129,8 @@ 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 ) @@ -145,8 +145,8 @@ char* wxLoadFileSelector(const char *what, const char *extension, const char *de 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 ) @@ -161,9 +161,6 @@ char* wxSaveFileSelector(const char *what, const char *extension, const char *de 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); +}