// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifndef __GTKFILEDLGH__
-#define __GTKFILEDLGH__
+#ifndef _WX_GTKFILEDLG_H_
+#define _WX_GTKFILEDLG_H_
#include "wx/gtk/filectrl.h" // for wxGtkFileChooser
private:
- DECLARE_DYNAMIC_CLASS(wxFileDialog)
- DECLARE_EVENT_TABLE()
void OnFakeOk( wxCommandEvent &event );
+ void OnSize(wxSizeEvent&);
wxGtkFileChooser m_fc;
+
+ DECLARE_DYNAMIC_CLASS(wxFileDialog)
+ DECLARE_EVENT_TABLE()
};
-#endif // __GTKFILEDLGH__
+#endif // _WX_GTKFILEDLG_H_
BEGIN_EVENT_TABLE(wxFileDialog,wxFileDialogBase)
EVT_BUTTON(wxID_OK, wxFileDialog::OnFakeOk)
+ EVT_SIZE(wxFileDialog::OnSize)
END_EVENT_TABLE()
wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
{
GtkWidget *control = m_extraControl->m_widget;
- // see wxNotebook::InsertPage() for explaination
- // why gtk_widget_unparent() is not used here
- control->parent = NULL;
+ wxASSERT(control->parent == NULL);
gtk_widget_show(control);
gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER(m_widget), control);
{
}
+void wxFileDialog::OnSize(wxSizeEvent&)
+{
+ // avoid calling DoLayout(), which will set the (wrong) size of
+ // m_extraControl, its size is managed by GtkFileChooser
+}
+
wxString wxFileDialog::GetPath() const
{
return m_fc.GetPath();