GetSize() and GetClientSize() changes

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1748 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
1999-02-22 11:01:13 +00:00
parent 1edddaf24c
commit bfc6fde4b1
80 changed files with 3467 additions and 3259 deletions

View File

@@ -46,11 +46,11 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
{
int style = dialog->GetStyle();
if ((style&wxSAVE)&&(style&wxOVERWRITE_PROMPT))
{
char *filename = gtk_file_selection_get_filename(
GTK_FILE_SELECTION(dialog->m_widget) );
GtkFileSelection *filedlg = GTK_FILE_SELECTION(dialog->m_widget);
char *filename = gtk_file_selection_get_filename(filedlg);
if ( (style & wxSAVE) && ( style & wxOVERWRITE_PROMPT ) )
{
if (wxFileExists( filename ))
{
wxString msg;
@@ -61,10 +61,19 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
return;
}
}
else if ( (style & wxOPEN) && ( style & wxFILE_MUST_EXIST) )
{
if ( !wxFileExists( filename ) )
{
wxMessageBox(_("Please choose an existing file."), _("Error"), wxOK);
dialog->SetPath( gtk_file_selection_get_filename( GTK_FILE_SELECTION(dialog->m_widget) ) );
return;
}
}
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_OK);
dialog->SetPath( filename );
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
event.SetEventObject( dialog );
dialog->GetEventHandler()->ProcessEvent( event );
}
@@ -76,7 +85,7 @@ void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dial
static
void gtk_filedialog_cancel_callback( GtkWidget *WXUNUSED(w), wxFileDialog *dialog )
{
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED,wxID_CANCEL);
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
event.SetEventObject( dialog );
dialog->GetEventHandler()->ProcessEvent( event );
}