wx/afterstd.h \
wx/app.h \
wx/apptrait.h \
+ wx/archive.h \
wx/arrimpl.cpp \
wx/arrstr.h \
wx/beforestd.h \
$(ALL_GUI_HEADERS)
ALL_BASE_SOURCES = \
src/common/appbase.cpp \
+ src/common/archive.cpp \
src/common/clntdata.cpp \
src/common/cmdline.cpp \
src/common/config.cpp \
src/common/textfile.cpp \
src/common/tokenzr.cpp \
src/common/txtstrm.cpp \
- src/common/archive.cpp \
src/common/uri.cpp \
src/common/variant.cpp \
src/common/wfstream.cpp \
-DwxUSE_BASE=1 -DWXMAKINGDLL $(PIC_FLAG) $(CPPFLAGS) $(CXXFLAGS)
MONODLL_OBJECTS = \
monodll_appbase.o \
+ monodll_archive.o \
monodll_clntdata.o \
monodll_cmdline.o \
monodll_config.o \
monodll_textfile.o \
monodll_tokenzr.o \
monodll_txtstrm.o \
- monodll_archive.o \
monodll_uri.o \
monodll_variant.o \
monodll_wfstream.o \
-DwxUSE_BASE=1 $(CPPFLAGS) $(CXXFLAGS)
MONOLIB_OBJECTS = \
monolib_appbase.o \
+ monolib_archive.o \
monolib_clntdata.o \
monolib_cmdline.o \
monolib_config.o \
monolib_textfile.o \
monolib_tokenzr.o \
monolib_txtstrm.o \
- monolib_archive.o \
monolib_uri.o \
monolib_variant.o \
monolib_wfstream.o \
$(CXXFLAGS)
BASEDLL_OBJECTS = \
basedll_appbase.o \
+ basedll_archive.o \
basedll_clntdata.o \
basedll_cmdline.o \
basedll_config.o \
basedll_textfile.o \
basedll_tokenzr.o \
basedll_txtstrm.o \
- basedll_archive.o \
basedll_uri.o \
basedll_variant.o \
basedll_wfstream.o \
-DwxUSE_GUI=0 -DwxUSE_BASE=1 $(CPPFLAGS) $(CXXFLAGS)
BASELIB_OBJECTS = \
baselib_appbase.o \
+ baselib_archive.o \
baselib_clntdata.o \
baselib_cmdline.o \
baselib_config.o \
baselib_textfile.o \
baselib_tokenzr.o \
baselib_txtstrm.o \
- baselib_archive.o \
baselib_uri.o \
baselib_variant.o \
baselib_wfstream.o \
monodll_combobox.o \
monodll_control.o \
monodll_dialog.o \
+ monodll_filedlg.o \
monodll_fontdlg.o \
monodll_frame.o \
monodll_gauge.o \
monolib_combobox.o \
monolib_control.o \
monolib_dialog.o \
+ monolib_filedlg.o \
monolib_fontdlg.o \
monolib_frame.o \
monolib_gauge.o \
coredll_combobox.o \
coredll_control.o \
coredll_dialog.o \
+ coredll_filedlg.o \
coredll_fontdlg.o \
coredll_frame.o \
coredll_gauge.o \
corelib_combobox.o \
corelib_control.o \
corelib_dialog.o \
+ corelib_filedlg.o \
corelib_fontdlg.o \
corelib_frame.o \
corelib_gauge.o \
monodll_appbase.o: $(srcdir)/src/common/appbase.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
+monodll_archive.o: $(srcdir)/src/common/archive.cpp $(MONODLL_ODEP)
+ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
+
monodll_clntdata.o: $(srcdir)/src/common/clntdata.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
monodll_txtstrm.o: $(srcdir)/src/common/txtstrm.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
-monodll_archive.o: $(srcdir)/src/common/archive.cpp $(MONODLL_ODEP)
- $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
-
monodll_uri.o: $(srcdir)/src/common/uri.cpp $(MONODLL_ODEP)
$(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
@COND_USE_GUI_1_WXUNIV_1@monodll_dialog.o: $(srcdir)/src/univ/dialog.cpp $(MONODLL_ODEP)
@COND_USE_GUI_1_WXUNIV_1@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
+@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@monodll_filedlg.o: $(srcdir)/src/gtk/filedlg.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
+
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@monodll_filedlg.o: $(srcdir)/src/motif/filedlg.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
+
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monodll_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
+
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monodll_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
+
+@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@monodll_filedlg.o: $(srcdir)/src/mac/carbon/filedlg.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
+
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monodll_filedlg.o: $(srcdir)/src/cocoa/filedlg.mm $(MONODLL_ODEP)
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
+
+@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@monodll_filedlg.o: $(srcdir)/src/os2/filedlg.cpp $(MONODLL_ODEP)
+@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
+
@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@monodll_fontdlg.o: $(srcdir)/src/gtk/fontdlg.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@monodll_tglbtn.o: $(srcdir)/src/mac/carbon/tglbtn.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
-@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@monodll_filedlg.o: $(srcdir)/src/motif/filedlg.cpp $(MONODLL_ODEP)
-@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
-
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monodll_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(MONODLL_ODEP)
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
-
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monodll_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(MONODLL_ODEP)
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
-
-@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@monodll_filedlg.o: $(srcdir)/src/mac/carbon/filedlg.cpp $(MONODLL_ODEP)
-@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
-
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monodll_filedlg.o: $(srcdir)/src/cocoa/filedlg.mm $(MONODLL_ODEP)
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
-
-@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@monodll_filedlg.o: $(srcdir)/src/os2/filedlg.cpp $(MONODLL_ODEP)
-@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
-
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@monodll_menuitem.o: $(srcdir)/src/motif/menuitem.cpp $(MONODLL_ODEP)
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $<
monolib_appbase.o: $(srcdir)/src/common/appbase.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
+monolib_archive.o: $(srcdir)/src/common/archive.cpp $(MONOLIB_ODEP)
+ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
+
monolib_clntdata.o: $(srcdir)/src/common/clntdata.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
monolib_txtstrm.o: $(srcdir)/src/common/txtstrm.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
-monolib_archive.o: $(srcdir)/src/common/archive.cpp $(MONOLIB_ODEP)
- $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
-
monolib_uri.o: $(srcdir)/src/common/uri.cpp $(MONOLIB_ODEP)
$(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
@COND_USE_GUI_1_WXUNIV_1@monolib_dialog.o: $(srcdir)/src/univ/dialog.cpp $(MONOLIB_ODEP)
@COND_USE_GUI_1_WXUNIV_1@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
+@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@monolib_filedlg.o: $(srcdir)/src/gtk/filedlg.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
+
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@monolib_filedlg.o: $(srcdir)/src/motif/filedlg.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
+
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monolib_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
+
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monolib_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
+
+@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@monolib_filedlg.o: $(srcdir)/src/mac/carbon/filedlg.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
+
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monolib_filedlg.o: $(srcdir)/src/cocoa/filedlg.mm $(MONOLIB_ODEP)
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
+
+@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@monolib_filedlg.o: $(srcdir)/src/os2/filedlg.cpp $(MONOLIB_ODEP)
+@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
+
@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@monolib_fontdlg.o: $(srcdir)/src/gtk/fontdlg.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@monolib_tglbtn.o: $(srcdir)/src/mac/carbon/tglbtn.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
-@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@monolib_filedlg.o: $(srcdir)/src/motif/filedlg.cpp $(MONOLIB_ODEP)
-@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
-
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@monolib_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(MONOLIB_ODEP)
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
-
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@monolib_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(MONOLIB_ODEP)
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
-
-@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@monolib_filedlg.o: $(srcdir)/src/mac/carbon/filedlg.cpp $(MONOLIB_ODEP)
-@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
-
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@monolib_filedlg.o: $(srcdir)/src/cocoa/filedlg.mm $(MONOLIB_ODEP)
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
-
-@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@monolib_filedlg.o: $(srcdir)/src/os2/filedlg.cpp $(MONOLIB_ODEP)
-@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
-
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@monolib_menuitem.o: $(srcdir)/src/motif/menuitem.cpp $(MONOLIB_ODEP)
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $<
basedll_appbase.o: $(srcdir)/src/common/appbase.cpp $(BASEDLL_ODEP)
$(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $<
+basedll_archive.o: $(srcdir)/src/common/archive.cpp $(BASEDLL_ODEP)
+ $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $<
+
basedll_clntdata.o: $(srcdir)/src/common/clntdata.cpp $(BASEDLL_ODEP)
$(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $<
basedll_txtstrm.o: $(srcdir)/src/common/txtstrm.cpp $(BASEDLL_ODEP)
$(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $<
-basedll_archive.o: $(srcdir)/src/common/archive.cpp $(BASEDLL_ODEP)
- $(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $<
-
basedll_uri.o: $(srcdir)/src/common/uri.cpp $(BASEDLL_ODEP)
$(CXXC) -c -o $@ $(BASEDLL_CXXFLAGS) $<
baselib_appbase.o: $(srcdir)/src/common/appbase.cpp $(BASELIB_ODEP)
$(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $<
+baselib_archive.o: $(srcdir)/src/common/archive.cpp $(BASELIB_ODEP)
+ $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $<
+
baselib_clntdata.o: $(srcdir)/src/common/clntdata.cpp $(BASELIB_ODEP)
$(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $<
baselib_txtstrm.o: $(srcdir)/src/common/txtstrm.cpp $(BASELIB_ODEP)
$(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $<
-baselib_archive.o: $(srcdir)/src/common/archive.cpp $(BASELIB_ODEP)
- $(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $<
-
baselib_uri.o: $(srcdir)/src/common/uri.cpp $(BASELIB_ODEP)
$(CXXC) -c -o $@ $(BASELIB_CXXFLAGS) $<
@COND_USE_GUI_1_WXUNIV_1@coredll_dialog.o: $(srcdir)/src/univ/dialog.cpp $(COREDLL_ODEP)
@COND_USE_GUI_1_WXUNIV_1@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
+@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@coredll_filedlg.o: $(srcdir)/src/gtk/filedlg.cpp $(COREDLL_ODEP)
+@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
+
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@coredll_filedlg.o: $(srcdir)/src/motif/filedlg.cpp $(COREDLL_ODEP)
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
+
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@coredll_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(COREDLL_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
+
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@coredll_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(COREDLL_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
+
+@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@coredll_filedlg.o: $(srcdir)/src/mac/carbon/filedlg.cpp $(COREDLL_ODEP)
+@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
+
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@coredll_filedlg.o: $(srcdir)/src/cocoa/filedlg.mm $(COREDLL_ODEP)
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
+
+@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@coredll_filedlg.o: $(srcdir)/src/os2/filedlg.cpp $(COREDLL_ODEP)
+@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
+
@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@coredll_fontdlg.o: $(srcdir)/src/gtk/fontdlg.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@coredll_tglbtn.o: $(srcdir)/src/mac/carbon/tglbtn.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
-@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@coredll_filedlg.o: $(srcdir)/src/motif/filedlg.cpp $(COREDLL_ODEP)
-@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
-
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@coredll_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(COREDLL_ODEP)
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
-
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@coredll_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(COREDLL_ODEP)
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
-
-@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@coredll_filedlg.o: $(srcdir)/src/mac/carbon/filedlg.cpp $(COREDLL_ODEP)
-@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
-
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@coredll_filedlg.o: $(srcdir)/src/cocoa/filedlg.mm $(COREDLL_ODEP)
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
-
-@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@coredll_filedlg.o: $(srcdir)/src/os2/filedlg.cpp $(COREDLL_ODEP)
-@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
-
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@coredll_menuitem.o: $(srcdir)/src/motif/menuitem.cpp $(COREDLL_ODEP)
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $<
@COND_USE_GUI_1_WXUNIV_1@corelib_dialog.o: $(srcdir)/src/univ/dialog.cpp $(CORELIB_ODEP)
@COND_USE_GUI_1_WXUNIV_1@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
+@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@corelib_filedlg.o: $(srcdir)/src/gtk/filedlg.cpp $(CORELIB_ODEP)
+@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
+
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@corelib_filedlg.o: $(srcdir)/src/motif/filedlg.cpp $(CORELIB_ODEP)
+@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
+
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@corelib_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(CORELIB_ODEP)
+@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
+
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@corelib_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(CORELIB_ODEP)
+@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
+
+@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@corelib_filedlg.o: $(srcdir)/src/mac/carbon/filedlg.cpp $(CORELIB_ODEP)
+@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
+
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@corelib_filedlg.o: $(srcdir)/src/cocoa/filedlg.mm $(CORELIB_ODEP)
+@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
+
+@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@corelib_filedlg.o: $(srcdir)/src/os2/filedlg.cpp $(CORELIB_ODEP)
+@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
+
@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@corelib_fontdlg.o: $(srcdir)/src/gtk/fontdlg.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_GTK_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@corelib_tglbtn.o: $(srcdir)/src/mac/carbon/tglbtn.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
-@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@corelib_filedlg.o: $(srcdir)/src/motif/filedlg.cpp $(CORELIB_ODEP)
-@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
-
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@corelib_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(CORELIB_ODEP)
-@COND_TOOLKIT_MSW_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
-
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@corelib_filedlg.o: $(srcdir)/src/msw/filedlg.cpp $(CORELIB_ODEP)
-@COND_TOOLKIT_WINCE_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
-
-@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@corelib_filedlg.o: $(srcdir)/src/mac/carbon/filedlg.cpp $(CORELIB_ODEP)
-@COND_TOOLKIT_MAC_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
-
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@corelib_filedlg.o: $(srcdir)/src/cocoa/filedlg.mm $(CORELIB_ODEP)
-@COND_TOOLKIT_COCOA_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
-
-@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@corelib_filedlg.o: $(srcdir)/src/os2/filedlg.cpp $(CORELIB_ODEP)
-@COND_TOOLKIT_PM_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
-
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@corelib_menuitem.o: $(srcdir)/src/motif/menuitem.cpp $(CORELIB_ODEP)
@COND_TOOLKIT_MOTIF_USE_GUI_1_WXUNIV_0@ $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $<
src/gtk/combobox.cpp
src/gtk/control.cpp
src/gtk/dialog.cpp
+ src/gtk/filedlg.cpp
src/gtk/fontdlg.cpp
src/gtk/frame.cpp
src/gtk/gauge.cpp
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
+
for ac_func in pango_font_family_is_monospace
do
as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
fi
done
+
+ echo "$as_me:$LINENO: checking if GTK+ is version >= 2.4" >&5
+echo $ECHO_N "checking if GTK+ is version >= 2.4... $ECHO_C" >&6
+ cat >conftest.$ac_ext <<_ACEOF
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+ #include <gtk/gtk.h>
+
+int
+main ()
+{
+
+ #if !GTK_CHECK_VERSION(2,4,0)
+ #error "Not GTK+ 2.4"
+ #endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>conftest.er1
+ ac_status=$?
+ grep -v '^ *+' conftest.er1 >conftest.err
+ rm -f conftest.er1
+ cat conftest.err >&5
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -z "$ac_c_werror_flag"
+ || test ! -s conftest.err'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+
+ cat >>confdefs.h <<\_ACEOF
+#define __WXGTK24__ 1
+_ACEOF
+
+ echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+
+fi
+rm -f conftest.err conftest.$ac_objext conftest.$ac_ext
+
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
else
case ${BAKEFILE_HOST} in
*-hp-hpux* )
-<<<<<<< aclocal.m4
- INSTALL_DIR="mkdir"
-=======
INSTALL_DIR="mkdir -p"
->>>>>>> 1.69
;;
*) INSTALL_DIR="$INSTALL -d"
;;
save_LIBS="$LIBS"
CFLAGS="$CFLAGS $GTK_CFLAGS"
LIBS="$LIBS $GTK_LIBS"
+
AC_CHECK_FUNCS([pango_font_family_is_monospace])
+
+ dnl test if we have at least GTK+ 2.4:
+ AC_MSG_CHECKING([if GTK+ is version >= 2.4])
+ AC_TRY_COMPILE([
+ #include <gtk/gtk.h>
+ ],
+ [
+ #if !GTK_CHECK_VERSION(2,4,0)
+ #error "Not GTK+ 2.4"
+ #endif
+ ],
+ [
+ AC_DEFINE(__WXGTK24__)
+ AC_MSG_RESULT([yes])
+ ],
+ [
+ AC_MSG_RESULT([no])
+ ])
+
CFLAGS="$save_CFLAGS"
LIBS="$save_LIBS"
else
wxGTK:
- fixed wxFileDialog::SetWildcard()
+- native file dialog is now used if available (Zbigniew Zagorski)
wxMac:
#elif defined(__WXMOTIF__)
#include "wx/motif/filedlg.h"
#elif defined(__WXGTK__)
+#ifdef __WXGTK24__
+#include "wx/gtk/filedlg.h"
+#else
#include "wx/generic/filedlgg.h"
+#endif
#elif defined(__WXX11__)
#include "wx/generic/filedlgg.h"
#elif defined(__WXMGL__)
long style = 0,
const wxPoint& pos = wxDefaultPosition);
- virtual void SetPath(const wxString& path);
+ virtual void GetPaths(wxArrayString& paths) const;
+ virtual void GetFilenames(wxArrayString& files) const;
+ virtual void SetMessage(const wxString& message);
+ virtual void SetPath(const wxString& path);
+ virtual void SetDirectory(const wxString& dir);
+ virtual void SetFilename(const wxString& name);
+ virtual void SetWildcard(const wxString& wildCard);
+ virtual void SetFilterIndex(int filterIndex);
+ void UpdateFromDialog();
+ void UpdateDialog();
+ void DoSetPath(const wxString& path);
private:
DECLARE_DYNAMIC_CLASS(wxFileDialog)
};
long style = 0,
const wxPoint& pos = wxDefaultPosition);
- virtual void SetPath(const wxString& path);
+ virtual void GetPaths(wxArrayString& paths) const;
+ virtual void GetFilenames(wxArrayString& files) const;
+ virtual void SetMessage(const wxString& message);
+ virtual void SetPath(const wxString& path);
+ virtual void SetDirectory(const wxString& dir);
+ virtual void SetFilename(const wxString& name);
+ virtual void SetWildcard(const wxString& wildCard);
+ virtual void SetFilterIndex(int filterIndex);
+ void UpdateFromDialog();
+ void UpdateDialog();
+ void DoSetPath(const wxString& path);
private:
DECLARE_DYNAMIC_CLASS(wxFileDialog)
};
/* Define this if your version of GTK+ is greater than 1.2.7 */
#undef __WXGTK127__
-/* Define this if your version of GTK+ is greater than 1.3 */
+/* Define this if your version of GTK+ is greater than 2.0 */
#undef __WXGTK20__
+/* Define this if your version of GTK+ is greater than 2.4 */
+#undef __WXGTK24__
+
/* Define this if you want to use GPE features */
#undef __WXGPE__
/* Define this if your version of GTK+ is greater than 1.2.7 */
#define __WXGTK127__ 1
-/* Define this if your version of GTK+ is greater than 1.3 */
+/* Define this if your version of GTK+ is greater than 2.0 */
/* #undef __WXGTK20__ */
+
+/* Define this if your version of GTK+ is greater than 2.4 */
+/* #undef __WXGTK24__ */
#endif
/*
#pragma hdrstop
#endif
-#if wxUSE_FILEDLG
+#if wxUSE_FILEDLG && !defined(__WXGTK24__)
// NOTE : it probably also supports MAC, untested
#if !defined(__UNIX__) && !defined(__DOS__) && !defined(__WIN32__) && !defined(__OS2__)
#endif // USE_GENERIC_FILEDIALOG
-#endif // wxUSE_FILEDLG
+#endif // wxUSE_FILEDLG && !defined(__WXGTK24__)
/////////////////////////////////////////////////////////////////////////////
// Name: gtk/filedlg.cpp
-// Purpose:
-// Author: Robert Roebling
+// Purpose: native implementation of wxFileDialog
+// Author: Robert Roebling, Zbigniew Zagorski
// Id: $Id$
-// Copyright: (c) 1998 Robert Roebling
+// Copyright: (c) 1998 Robert Roebling, 2004 Zbigniew Zagorski
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_FILEDLG && defined(__WXGTK24__)
+
#include "wx/filedlg.h"
#include "wx/utils.h"
#include "wx/intl.h"
-#include "wx/generic/msgdlgg.h"
+#include "wx/filename.h"
#include <gtk/gtk.h>
+#include "wx/gtk/private.h"
//-----------------------------------------------------------------------------
// idle system
extern void wxapp_install_idle_handler();
extern bool g_isIdle;
-//-----------------------------------------------------------------------------
-// "delete_event"
-//-----------------------------------------------------------------------------
-
-static
-bool gtk_filedialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxDialog *win )
-{
- if (g_isIdle) wxapp_install_idle_handler();
-
-/*
- printf( "OnDelete from " );
- if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
- printf( win->GetClassInfo()->GetClassName() );
- printf( ".\n" );
-*/
-
- win->Close();
-
- return TRUE;
-}
-
//-----------------------------------------------------------------------------
// "clicked" for OK-button
//-----------------------------------------------------------------------------
-static
-void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dialog )
+static void gtk_filedialog_ok_callback(GtkWidget *widget, wxFileDialog *dialog)
{
- if (g_isIdle) wxapp_install_idle_handler();
-
int style = dialog->GetStyle();
+ gchar* text = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget));
+ wxString filename(wxGTK_CONV_BACK(text));
- GtkFileSelection *filedlg = GTK_FILE_SELECTION(dialog->m_widget);
- char *filename = gtk_file_selection_get_filename(filedlg);
-
- if ( (style & wxSAVE) && ( style & wxOVERWRITE_PROMPT ) )
+ if ((style & wxSAVE) && (style & wxOVERWRITE_PROMPT))
{
- if (wxFileExists( filename ))
+ if (wxFileExists(filename))
{
wxString msg;
- msg.Printf( _("File '%s' already exists, do you really want to "
- "overwrite it?"), filename);
+ msg.Printf(
+ _("File '%s' already exists, do you really want to overwrite it?"),
+ filename.c_str());
- if (wxMessageBox(msg, _("Confirm"), wxYES_NO) != wxYES)
+ wxMessageDialog dlg(dialog, msg, _("Confirm"),
+ wxYES_NO | wxICON_QUESTION);
+ if (dlg.ShowModal() != wxID_YES)
return;
}
}
- else if ( (style & wxOPEN) && ( style & wxFILE_MUST_EXIST) )
+ else if ((style & wxOPEN) && ( style & wxFILE_MUST_EXIST))
{
- if ( !wxFileExists( filename ) )
+ if (!wxFileExists( filename ))
{
- wxMessageBox(_("Please choose an existing file."), _("Error"), wxOK);
+ wxMessageDialog dlg(dialog,
+ _("Please choose an existing file."),
+ _("Error"), wxOK | wxICON_ERROR);
+ dlg.ShowModal();
return;
}
}
// change to the directory where the user went if asked
- if ( style & wxCHANGE_DIR )
+ if (style & wxCHANGE_DIR)
{
wxString cwd;
wxSplitPath(filename, &cwd, NULL, NULL);
- if ( cwd != wxGetCwd() )
+ if (cwd != wxGetCwd())
{
wxSetWorkingDirectory(cwd);
}
}
- dialog->SetPath( filename );
-
+ dialog->DoSetPath(filename);
+ dialog->UpdateFromDialog();
+
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
- event.SetEventObject( dialog );
- dialog->GetEventHandler()->ProcessEvent( event );
+ event.SetEventObject(dialog);
+ dialog->GetEventHandler()->ProcessEvent(event);
}
//-----------------------------------------------------------------------------
// "clicked" for Cancel-button
//-----------------------------------------------------------------------------
-static
-void gtk_filedialog_cancel_callback( GtkWidget *WXUNUSED(w), wxFileDialog *dialog )
+static void gtk_filedialog_cancel_callback(GtkWidget *WXUNUSED(w),
+ wxFileDialog *dialog)
{
- if (g_isIdle) wxapp_install_idle_handler();
-
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
- event.SetEventObject( dialog );
- dialog->GetEventHandler()->ProcessEvent( event );
+ event.SetEventObject(dialog);
+ dialog->GetEventHandler()->ProcessEvent(event);
+}
+
+static void gtk_filedialog_response_callback(GtkWidget *w,
+ int response,
+ wxFileDialog *dialog)
+{
+ wxapp_install_idle_handler();
+
+ if (response == GTK_RESPONSE_CANCEL)
+ gtk_filedialog_cancel_callback(w, dialog);
+ else
+ gtk_filedialog_ok_callback(w, dialog);
}
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxFileDialog,wxFileDialogBase)
-wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message,
- const wxString& defaultDir, const wxString& defaultFileName,
- const wxString& wildCard,
- long style, const wxPoint& pos )
- :wxFileDialogBase(parent, message, defaultDir, defaultFileName, wildCard, style, pos)
+wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
+ const wxString& defaultDir,
+ const wxString& defaultFileName,
+ const wxString& wildCard,
+ long style, const wxPoint& pos)
+ : wxFileDialogBase(parent, message, defaultDir, defaultFileName,
+ wildCard, style, pos)
{
m_needParent = FALSE;
- if (!PreCreation( parent, pos, wxDefaultSize ) ||
- !CreateBase( parent, wxID_ANY, pos, wxDefaultSize, style, wxDefaultValidator, wxT("filedialog") ))
+ if (!PreCreation(parent, pos, wxDefaultSize) ||
+ !CreateBase(parent, wxID_ANY, pos, wxDefaultSize, style,
+ wxDefaultValidator, wxT("filedialog")))
{
- wxFAIL_MSG( wxT("wxXX creation failed") );
+ wxFAIL_MSG( wxT("wxFileDialog creation failed") );
return;
}
- m_widget = gtk_file_selection_new( m_message.mbc_str() );
+ bool multiple = (style & wxMULTIPLE) == wxMULTIPLE;
+ GtkFileChooserAction gtk_action;
+ GtkWindow* gtk_parent = NULL;
+ if (parent)
+ gtk_parent = GTK_WINDOW(parent->m_widget);
+
+ gchar* ok_btn_stock;
+ if ((style & wxSAVE) == wxSAVE)
+ {
+ gtk_action = GTK_FILE_CHOOSER_ACTION_SAVE;
+ ok_btn_stock = GTK_STOCK_SAVE;
+ }
+ else
+ {
+ gtk_action = GTK_FILE_CHOOSER_ACTION_OPEN;
+ ok_btn_stock = GTK_STOCK_OPEN;
+ }
+ m_widget = gtk_file_chooser_dialog_new(
+ wxGTK_CONV(m_message),
+ gtk_parent,
+ gtk_action,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ ok_btn_stock, GTK_RESPONSE_ACCEPT,
+ NULL);
+
+ gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(m_widget), multiple);
+
+ gtk_signal_connect(GTK_OBJECT(m_widget),
+ "response",
+ GTK_SIGNAL_FUNC(gtk_filedialog_response_callback),
+ (gpointer*)this);
+
+ m_path = m_dir;
+ if (!m_path.empty() && m_path.Last() != wxT('/'))
+ m_path += wxT('/');
+ m_path += m_fileName;
+ SetPath(m_path);
+
+ SetWildcard(wildCard);
+ SetFilterIndex(0);
+}
- int x = (gdk_screen_width () - 400) / 2;
- int y = (gdk_screen_height () - 400) / 2;
- gtk_widget_set_uposition( m_widget, x, y );
+void wxFileDialog::SetPath(const wxString& path)
+{
+ DoSetPath(path);
+ UpdateDialog();
+}
- GtkFileSelection *sel = GTK_FILE_SELECTION(m_widget);
- gtk_file_selection_hide_fileop_buttons( sel ); // they don't work anyway
+void wxFileDialog::GetFilenames(wxArrayString& files) const
+{
+ GetPaths(files);
+ for (size_t n = 0; n < files.GetCount(); n++ )
+ {
+ wxString name,ext;
+ wxSplitPath(files[n], NULL, &name, &ext);
+ if (!ext.IsEmpty())
+ {
+ name += wxT(".");
+ name += ext;
+ }
+ files[n] = name;
+ }
+}
+void wxFileDialog::GetPaths(wxArrayString& paths) const
+{
+ paths.Empty();
+ if (GetWindowStyle() & wxMULTIPLE)
+ {
+ GSList *gpathsi =
+ gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(m_widget));
+ GSList *gpaths = gpathsi;
+ while (gpathsi)
+ {
+ wxString file = wxGTK_CONV_BACK((gchar*) gpathsi->data);
+ paths.Add(file);
+ g_free(gpathsi->data);
+ gpathsi = gpathsi->next;
+ }
+ if (gpaths)
+ g_slist_free(gpaths);
+ }
+ else
+ {
+ paths.Add(m_fileName);
+ }
+}
- m_path.Append(m_dir);
- if( ! m_path.IsEmpty() && m_path.Last()!=wxT('/') )
- m_path.Append('/');
- m_path.Append(m_fileName);
+void wxFileDialog::SetMessage(const wxString& message)
+{
+ m_message = message;
+ SetTitle(message);
+}
+
+void wxFileDialog::SetDirectory(const wxString& dir)
+{
+ wxFileName fn(dir,m_fileName);
+ SetPath(fn.GetFullPath());
+}
+
+void wxFileDialog::SetFilename(const wxString& name)
+{
+ m_fileName = name;
+ wxFileName fn(m_dir,name);
+ SetPath(fn.GetFullPath());
+}
- if(m_path.Length()>1) gtk_file_selection_set_filename(sel,m_path.mbc_str());
+void wxFileDialog::SetWildcard(const wxString& wildCard)
+{
+ m_wildCard = wildCard;
+
+ GtkFileChooser* chooser = GTK_FILE_CHOOSER(m_widget);
+
+ // empty current filter list:
+ GSList* ifilters = gtk_file_chooser_list_filters(chooser);
+ GSList* filters = ifilters;
+ while (ifilters)
+ {
+ gtk_file_chooser_remove_filter(chooser,GTK_FILE_FILTER(ifilters->data));
+ ifilters = ifilters->next;
+ }
+ g_slist_free(filters);
+
+ // parse filters
+ wxArrayString wildDescriptions, wildFilters;
+ if (!wxParseCommonDialogsFilter(m_wildCard, wildDescriptions, wildFilters))
+ {
+ wxFAIL_MSG( wxT("Wrong file type description") );
+ }
+ else
+ {
+ // add parsed to GtkChooser
+ for (size_t n = 0; n < wildFilters.GetCount(); n++)
+ {
+ GtkFileFilter* filter = gtk_file_filter_new();
+ gtk_file_filter_set_name(filter,wxGTK_CONV(wildDescriptions[n]));
+ wxString after = wildFilters[n];
+ do
+ {
+ wxString ext = after.BeforeFirst(wxT(';'));
+ gtk_file_filter_add_pattern(filter,wxGTK_CONV(ext));
+ if (after.Find(wxT(';')) == wxNOT_FOUND)
+ break;
+ after = after.AfterLast(wxT(';'));
+ }
+ while (!after.empty());
+
+ gtk_file_chooser_add_filter(chooser, filter);
+ }
+ }
+}
- gtk_signal_connect( GTK_OBJECT(sel->ok_button), "clicked",
- GTK_SIGNAL_FUNC(gtk_filedialog_ok_callback), (gpointer*)this );
+void wxFileDialog::SetFilterIndex(int filterIndex)
+{
+ m_filterIndex = filterIndex;
- // strange way to internationalize
- gtk_label_set( GTK_LABEL( GTK_BUTTON(sel->ok_button)->child ), wxConvCurrent->cWX2MB(_("OK")) );
+ GtkFileChooser *chooser = GTK_FILE_CHOOSER(m_widget);
+ GSList *fnode = gtk_file_chooser_list_filters(chooser);
+ GSList *filters = fnode;
+ int i = 0;
+ while (fnode)
+ {
+ if (i == filterIndex)
+ {
+ gtk_file_chooser_set_filter(chooser, GTK_FILE_FILTER(fnode->data));
+ m_filterIndex = i;
+ break;
+ }
+ i++;
+ fnode = fnode->next;
+ }
+ g_slist_free(filters);
+}
- gtk_signal_connect( GTK_OBJECT(sel->cancel_button), "clicked",
- GTK_SIGNAL_FUNC(gtk_filedialog_cancel_callback), (gpointer*)this );
+void wxFileDialog::UpdateFromDialog()
+{
+ // update filterIndex
+ GSList *fnode = gtk_file_chooser_list_filters(GTK_FILE_CHOOSER(m_widget));
+ GSList *filters = fnode;
+ GtkFileFilter *current =
+ gtk_file_chooser_get_filter(GTK_FILE_CHOOSER(m_widget));
+
+ int i = 0;
+ m_filterIndex = 0;
+ while (fnode)
+ {
+ if (fnode->data == (gpointer)current)
+ {
+ m_filterIndex = i;
+ break;
+ }
+ i++;
+ fnode = fnode->next;
+ }
+ g_slist_free(filters);
+}
- // strange way to internationalize
- gtk_label_set( GTK_LABEL( GTK_BUTTON(sel->cancel_button)->child ), wxConvCurrent->cWX2MB(_("Cancel")) );
+void wxFileDialog::UpdateDialog()
+{
+
+ if (wxDirExists(m_path))
+ {
+ gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(m_widget),
+ wxGTK_CONV(m_path));
+ }
+ else
+ {
+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(m_widget),
+ wxGTK_CONV(m_path));
- gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
- GTK_SIGNAL_FUNC(gtk_filedialog_delete_callback), (gpointer)this );
+ // pre-fill the filename, too:
+ if (GetWindowStyle() & wxSAVE)
+ {
+ gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(m_widget),
+ wxGTK_CONV(m_fileName));
+ }
+ }
}
-void wxFileDialog::SetPath(const wxString& path)
+void wxFileDialog::DoSetPath(const wxString& path)
{
- // not only set the full path but also update filename and dir
- m_path = path;
- if ( !!path )
+ if (!path.empty())
{
+ wxFileName fn(path);
+ fn.MakeAbsolute();
+ m_path = fn.GetFullPath();
+
wxString ext;
wxSplitPath(path, &m_dir, &m_fileName, &ext);
- if (!ext.IsEmpty())
+ if (!ext.empty())
{
m_fileName += wxT(".");
m_fileName += ext;
}
}
+ else
+ {
+ m_path = path;
+ }
}
+#endif // wxUSE_FILEDLG && defined(__WXGTK24__)
/////////////////////////////////////////////////////////////////////////////
// Name: gtk/filedlg.cpp
-// Purpose:
-// Author: Robert Roebling
+// Purpose: native implementation of wxFileDialog
+// Author: Robert Roebling, Zbigniew Zagorski
// Id: $Id$
-// Copyright: (c) 1998 Robert Roebling
+// Copyright: (c) 1998 Robert Roebling, 2004 Zbigniew Zagorski
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// For compilers that support precompilation, includes "wx.h".
#include "wx/wxprec.h"
+#if wxUSE_FILEDLG && defined(__WXGTK24__)
+
#include "wx/filedlg.h"
#include "wx/utils.h"
#include "wx/intl.h"
-#include "wx/generic/msgdlgg.h"
+#include "wx/filename.h"
#include <gtk/gtk.h>
+#include "wx/gtk/private.h"
//-----------------------------------------------------------------------------
// idle system
extern void wxapp_install_idle_handler();
extern bool g_isIdle;
-//-----------------------------------------------------------------------------
-// "delete_event"
-//-----------------------------------------------------------------------------
-
-static
-bool gtk_filedialog_delete_callback( GtkWidget *WXUNUSED(widget), GdkEvent *WXUNUSED(event), wxDialog *win )
-{
- if (g_isIdle) wxapp_install_idle_handler();
-
-/*
- printf( "OnDelete from " );
- if (win->GetClassInfo() && win->GetClassInfo()->GetClassName())
- printf( win->GetClassInfo()->GetClassName() );
- printf( ".\n" );
-*/
-
- win->Close();
-
- return TRUE;
-}
-
//-----------------------------------------------------------------------------
// "clicked" for OK-button
//-----------------------------------------------------------------------------
-static
-void gtk_filedialog_ok_callback( GtkWidget *WXUNUSED(widget), wxFileDialog *dialog )
+static void gtk_filedialog_ok_callback(GtkWidget *widget, wxFileDialog *dialog)
{
- if (g_isIdle) wxapp_install_idle_handler();
-
int style = dialog->GetStyle();
+ gchar* text = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(widget));
+ wxString filename(wxGTK_CONV_BACK(text));
- GtkFileSelection *filedlg = GTK_FILE_SELECTION(dialog->m_widget);
- char *filename = gtk_file_selection_get_filename(filedlg);
-
- if ( (style & wxSAVE) && ( style & wxOVERWRITE_PROMPT ) )
+ if ((style & wxSAVE) && (style & wxOVERWRITE_PROMPT))
{
- if (wxFileExists( filename ))
+ if (wxFileExists(filename))
{
wxString msg;
- msg.Printf( _("File '%s' already exists, do you really want to "
- "overwrite it?"), filename);
+ msg.Printf(
+ _("File '%s' already exists, do you really want to overwrite it?"),
+ filename.c_str());
- if (wxMessageBox(msg, _("Confirm"), wxYES_NO) != wxYES)
+ wxMessageDialog dlg(dialog, msg, _("Confirm"),
+ wxYES_NO | wxICON_QUESTION);
+ if (dlg.ShowModal() != wxID_YES)
return;
}
}
- else if ( (style & wxOPEN) && ( style & wxFILE_MUST_EXIST) )
+ else if ((style & wxOPEN) && ( style & wxFILE_MUST_EXIST))
{
- if ( !wxFileExists( filename ) )
+ if (!wxFileExists( filename ))
{
- wxMessageBox(_("Please choose an existing file."), _("Error"), wxOK);
+ wxMessageDialog dlg(dialog,
+ _("Please choose an existing file."),
+ _("Error"), wxOK | wxICON_ERROR);
+ dlg.ShowModal();
return;
}
}
// change to the directory where the user went if asked
- if ( style & wxCHANGE_DIR )
+ if (style & wxCHANGE_DIR)
{
wxString cwd;
wxSplitPath(filename, &cwd, NULL, NULL);
- if ( cwd != wxGetCwd() )
+ if (cwd != wxGetCwd())
{
wxSetWorkingDirectory(cwd);
}
}
- dialog->SetPath( filename );
-
+ dialog->DoSetPath(filename);
+ dialog->UpdateFromDialog();
+
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_OK);
- event.SetEventObject( dialog );
- dialog->GetEventHandler()->ProcessEvent( event );
+ event.SetEventObject(dialog);
+ dialog->GetEventHandler()->ProcessEvent(event);
}
//-----------------------------------------------------------------------------
// "clicked" for Cancel-button
//-----------------------------------------------------------------------------
-static
-void gtk_filedialog_cancel_callback( GtkWidget *WXUNUSED(w), wxFileDialog *dialog )
+static void gtk_filedialog_cancel_callback(GtkWidget *WXUNUSED(w),
+ wxFileDialog *dialog)
{
- if (g_isIdle) wxapp_install_idle_handler();
-
wxCommandEvent event(wxEVT_COMMAND_BUTTON_CLICKED, wxID_CANCEL);
- event.SetEventObject( dialog );
- dialog->GetEventHandler()->ProcessEvent( event );
+ event.SetEventObject(dialog);
+ dialog->GetEventHandler()->ProcessEvent(event);
+}
+
+static void gtk_filedialog_response_callback(GtkWidget *w,
+ int response,
+ wxFileDialog *dialog)
+{
+ wxapp_install_idle_handler();
+
+ if (response == GTK_RESPONSE_CANCEL)
+ gtk_filedialog_cancel_callback(w, dialog);
+ else
+ gtk_filedialog_ok_callback(w, dialog);
}
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC_CLASS(wxFileDialog,wxFileDialogBase)
-wxFileDialog::wxFileDialog( wxWindow *parent, const wxString& message,
- const wxString& defaultDir, const wxString& defaultFileName,
- const wxString& wildCard,
- long style, const wxPoint& pos )
- :wxFileDialogBase(parent, message, defaultDir, defaultFileName, wildCard, style, pos)
+wxFileDialog::wxFileDialog(wxWindow *parent, const wxString& message,
+ const wxString& defaultDir,
+ const wxString& defaultFileName,
+ const wxString& wildCard,
+ long style, const wxPoint& pos)
+ : wxFileDialogBase(parent, message, defaultDir, defaultFileName,
+ wildCard, style, pos)
{
m_needParent = FALSE;
- if (!PreCreation( parent, pos, wxDefaultSize ) ||
- !CreateBase( parent, wxID_ANY, pos, wxDefaultSize, style, wxDefaultValidator, wxT("filedialog") ))
+ if (!PreCreation(parent, pos, wxDefaultSize) ||
+ !CreateBase(parent, wxID_ANY, pos, wxDefaultSize, style,
+ wxDefaultValidator, wxT("filedialog")))
{
- wxFAIL_MSG( wxT("wxXX creation failed") );
+ wxFAIL_MSG( wxT("wxFileDialog creation failed") );
return;
}
- m_widget = gtk_file_selection_new( m_message.mbc_str() );
+ bool multiple = (style & wxMULTIPLE) == wxMULTIPLE;
+ GtkFileChooserAction gtk_action;
+ GtkWindow* gtk_parent = NULL;
+ if (parent)
+ gtk_parent = GTK_WINDOW(parent->m_widget);
+
+ gchar* ok_btn_stock;
+ if ((style & wxSAVE) == wxSAVE)
+ {
+ gtk_action = GTK_FILE_CHOOSER_ACTION_SAVE;
+ ok_btn_stock = GTK_STOCK_SAVE;
+ }
+ else
+ {
+ gtk_action = GTK_FILE_CHOOSER_ACTION_OPEN;
+ ok_btn_stock = GTK_STOCK_OPEN;
+ }
+ m_widget = gtk_file_chooser_dialog_new(
+ wxGTK_CONV(m_message),
+ gtk_parent,
+ gtk_action,
+ GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
+ ok_btn_stock, GTK_RESPONSE_ACCEPT,
+ NULL);
+
+ gtk_file_chooser_set_select_multiple(GTK_FILE_CHOOSER(m_widget), multiple);
+
+ gtk_signal_connect(GTK_OBJECT(m_widget),
+ "response",
+ GTK_SIGNAL_FUNC(gtk_filedialog_response_callback),
+ (gpointer*)this);
+
+ m_path = m_dir;
+ if (!m_path.empty() && m_path.Last() != wxT('/'))
+ m_path += wxT('/');
+ m_path += m_fileName;
+ SetPath(m_path);
+
+ SetWildcard(wildCard);
+ SetFilterIndex(0);
+}
- int x = (gdk_screen_width () - 400) / 2;
- int y = (gdk_screen_height () - 400) / 2;
- gtk_widget_set_uposition( m_widget, x, y );
+void wxFileDialog::SetPath(const wxString& path)
+{
+ DoSetPath(path);
+ UpdateDialog();
+}
- GtkFileSelection *sel = GTK_FILE_SELECTION(m_widget);
- gtk_file_selection_hide_fileop_buttons( sel ); // they don't work anyway
+void wxFileDialog::GetFilenames(wxArrayString& files) const
+{
+ GetPaths(files);
+ for (size_t n = 0; n < files.GetCount(); n++ )
+ {
+ wxString name,ext;
+ wxSplitPath(files[n], NULL, &name, &ext);
+ if (!ext.IsEmpty())
+ {
+ name += wxT(".");
+ name += ext;
+ }
+ files[n] = name;
+ }
+}
+void wxFileDialog::GetPaths(wxArrayString& paths) const
+{
+ paths.Empty();
+ if (GetWindowStyle() & wxMULTIPLE)
+ {
+ GSList *gpathsi =
+ gtk_file_chooser_get_filenames(GTK_FILE_CHOOSER(m_widget));
+ GSList *gpaths = gpathsi;
+ while (gpathsi)
+ {
+ wxString file = wxGTK_CONV_BACK((gchar*) gpathsi->data);
+ paths.Add(file);
+ g_free(gpathsi->data);
+ gpathsi = gpathsi->next;
+ }
+ if (gpaths)
+ g_slist_free(gpaths);
+ }
+ else
+ {
+ paths.Add(m_fileName);
+ }
+}
- m_path.Append(m_dir);
- if( ! m_path.IsEmpty() && m_path.Last()!=wxT('/') )
- m_path.Append('/');
- m_path.Append(m_fileName);
+void wxFileDialog::SetMessage(const wxString& message)
+{
+ m_message = message;
+ SetTitle(message);
+}
+
+void wxFileDialog::SetDirectory(const wxString& dir)
+{
+ wxFileName fn(dir,m_fileName);
+ SetPath(fn.GetFullPath());
+}
+
+void wxFileDialog::SetFilename(const wxString& name)
+{
+ m_fileName = name;
+ wxFileName fn(m_dir,name);
+ SetPath(fn.GetFullPath());
+}
- if(m_path.Length()>1) gtk_file_selection_set_filename(sel,m_path.mbc_str());
+void wxFileDialog::SetWildcard(const wxString& wildCard)
+{
+ m_wildCard = wildCard;
+
+ GtkFileChooser* chooser = GTK_FILE_CHOOSER(m_widget);
+
+ // empty current filter list:
+ GSList* ifilters = gtk_file_chooser_list_filters(chooser);
+ GSList* filters = ifilters;
+ while (ifilters)
+ {
+ gtk_file_chooser_remove_filter(chooser,GTK_FILE_FILTER(ifilters->data));
+ ifilters = ifilters->next;
+ }
+ g_slist_free(filters);
+
+ // parse filters
+ wxArrayString wildDescriptions, wildFilters;
+ if (!wxParseCommonDialogsFilter(m_wildCard, wildDescriptions, wildFilters))
+ {
+ wxFAIL_MSG( wxT("Wrong file type description") );
+ }
+ else
+ {
+ // add parsed to GtkChooser
+ for (size_t n = 0; n < wildFilters.GetCount(); n++)
+ {
+ GtkFileFilter* filter = gtk_file_filter_new();
+ gtk_file_filter_set_name(filter,wxGTK_CONV(wildDescriptions[n]));
+ wxString after = wildFilters[n];
+ do
+ {
+ wxString ext = after.BeforeFirst(wxT(';'));
+ gtk_file_filter_add_pattern(filter,wxGTK_CONV(ext));
+ if (after.Find(wxT(';')) == wxNOT_FOUND)
+ break;
+ after = after.AfterLast(wxT(';'));
+ }
+ while (!after.empty());
+
+ gtk_file_chooser_add_filter(chooser, filter);
+ }
+ }
+}
- gtk_signal_connect( GTK_OBJECT(sel->ok_button), "clicked",
- GTK_SIGNAL_FUNC(gtk_filedialog_ok_callback), (gpointer*)this );
+void wxFileDialog::SetFilterIndex(int filterIndex)
+{
+ m_filterIndex = filterIndex;
- // strange way to internationalize
- gtk_label_set( GTK_LABEL( GTK_BUTTON(sel->ok_button)->child ), wxConvCurrent->cWX2MB(_("OK")) );
+ GtkFileChooser *chooser = GTK_FILE_CHOOSER(m_widget);
+ GSList *fnode = gtk_file_chooser_list_filters(chooser);
+ GSList *filters = fnode;
+ int i = 0;
+ while (fnode)
+ {
+ if (i == filterIndex)
+ {
+ gtk_file_chooser_set_filter(chooser, GTK_FILE_FILTER(fnode->data));
+ m_filterIndex = i;
+ break;
+ }
+ i++;
+ fnode = fnode->next;
+ }
+ g_slist_free(filters);
+}
- gtk_signal_connect( GTK_OBJECT(sel->cancel_button), "clicked",
- GTK_SIGNAL_FUNC(gtk_filedialog_cancel_callback), (gpointer*)this );
+void wxFileDialog::UpdateFromDialog()
+{
+ // update filterIndex
+ GSList *fnode = gtk_file_chooser_list_filters(GTK_FILE_CHOOSER(m_widget));
+ GSList *filters = fnode;
+ GtkFileFilter *current =
+ gtk_file_chooser_get_filter(GTK_FILE_CHOOSER(m_widget));
+
+ int i = 0;
+ m_filterIndex = 0;
+ while (fnode)
+ {
+ if (fnode->data == (gpointer)current)
+ {
+ m_filterIndex = i;
+ break;
+ }
+ i++;
+ fnode = fnode->next;
+ }
+ g_slist_free(filters);
+}
- // strange way to internationalize
- gtk_label_set( GTK_LABEL( GTK_BUTTON(sel->cancel_button)->child ), wxConvCurrent->cWX2MB(_("Cancel")) );
+void wxFileDialog::UpdateDialog()
+{
+
+ if (wxDirExists(m_path))
+ {
+ gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(m_widget),
+ wxGTK_CONV(m_path));
+ }
+ else
+ {
+ gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(m_widget),
+ wxGTK_CONV(m_path));
- gtk_signal_connect( GTK_OBJECT(m_widget), "delete_event",
- GTK_SIGNAL_FUNC(gtk_filedialog_delete_callback), (gpointer)this );
+ // pre-fill the filename, too:
+ if (GetWindowStyle() & wxSAVE)
+ {
+ gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(m_widget),
+ wxGTK_CONV(m_fileName));
+ }
+ }
}
-void wxFileDialog::SetPath(const wxString& path)
+void wxFileDialog::DoSetPath(const wxString& path)
{
- // not only set the full path but also update filename and dir
- m_path = path;
- if ( !!path )
+ if (!path.empty())
{
+ wxFileName fn(path);
+ fn.MakeAbsolute();
+ m_path = fn.GetFullPath();
+
wxString ext;
wxSplitPath(path, &m_dir, &m_fileName, &ext);
- if (!ext.IsEmpty())
+ if (!ext.empty())
{
m_fileName += wxT(".");
m_fileName += ext;
}
}
+ else
+ {
+ m_path = path;
+ }
}
+#endif // wxUSE_FILEDLG && defined(__WXGTK24__)