]> git.saurik.com Git - wxWidgets.git/commitdiff
Move wxFileHistory out of docview framework, add wxUSE_FILE_HISTORY.
authorVáclav Slavík <vslavik@fastmail.fm>
Tue, 4 May 2010 12:15:14 +0000 (12:15 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Tue, 4 May 2010 12:15:14 +0000 (12:15 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64205 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

29 files changed:
Makefile.in
aclocal.m4
build/bakefiles/files.bkl
build/msw/makefile.bcc
build/msw/makefile.gcc
build/msw/makefile.vc
build/msw/makefile.wat
build/msw/wx_core.dsp
build/msw/wx_vc7_core.vcproj
build/msw/wx_vc8_core.vcproj
build/msw/wx_vc9_core.vcproj
configure
configure.in
include/wx/chkconf.h
include/wx/docview.h
include/wx/filehistory.h [new file with mode: 0644]
include/wx/motif/setup0.h
include/wx/msw/setup0.h
include/wx/msw/wince/setup.h
include/wx/os2/setup0.h
include/wx/osx/setup0.h
include/wx/palmos/setup0.h
include/wx/setup_inc.h
include/wx/univ/setup0.h
interface/wx/docview.h
interface/wx/filehistory.h [new file with mode: 0644]
setup.h.in
src/common/docview.cpp
src/common/filehistorycmn.cpp [new file with mode: 0644]

index abf89f2466bf6fc47a334dd9c9c4bedc9ef92adc..b4fc200a67c50d3d7988af9176e3f9d1e4768899 100644 (file)
@@ -3773,6 +3773,7 @@ COND_USE_GUI_1_ALL_GUI_HEADERS =  \
        wx/evtloopsrc.h \
        wx/fdrepdlg.h \
        wx/filectrl.h \
+       wx/filehistory.h \
        wx/filepicker.h \
        wx/fontpicker.h \
        wx/fmappriv.h \
@@ -4294,6 +4295,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS =  \
        monodll_effects.o \
        monodll_fddlgcmn.o \
        monodll_filectrlcmn.o \
+       monodll_filehistorycmn.o \
        monodll_filepickercmn.o \
        monodll_fontpickercmn.o \
        monodll_fldlgcmn.o \
@@ -4490,6 +4492,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS =  \
        monodll_effects.o \
        monodll_fddlgcmn.o \
        monodll_filectrlcmn.o \
+       monodll_filehistorycmn.o \
        monodll_filepickercmn.o \
        monodll_fontpickercmn.o \
        monodll_fldlgcmn.o \
@@ -6131,6 +6134,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS_1 =  \
        monolib_effects.o \
        monolib_fddlgcmn.o \
        monolib_filectrlcmn.o \
+       monolib_filehistorycmn.o \
        monolib_filepickercmn.o \
        monolib_fontpickercmn.o \
        monolib_fldlgcmn.o \
@@ -6327,6 +6331,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_1 =  \
        monolib_effects.o \
        monolib_fddlgcmn.o \
        monolib_filectrlcmn.o \
+       monolib_filehistorycmn.o \
        monolib_filepickercmn.o \
        monolib_fontpickercmn.o \
        monolib_fldlgcmn.o \
@@ -8157,6 +8162,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS_2 =  \
        coredll_effects.o \
        coredll_fddlgcmn.o \
        coredll_filectrlcmn.o \
+       coredll_filehistorycmn.o \
        coredll_filepickercmn.o \
        coredll_fontpickercmn.o \
        coredll_fldlgcmn.o \
@@ -8353,6 +8359,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_2 =  \
        coredll_effects.o \
        coredll_fddlgcmn.o \
        coredll_filectrlcmn.o \
+       coredll_filehistorycmn.o \
        coredll_filepickercmn.o \
        coredll_fontpickercmn.o \
        coredll_fldlgcmn.o \
@@ -9667,6 +9674,7 @@ COND_USE_GUI_1_WXUNIV_0___CORE_SRC_OBJECTS_3 =  \
        corelib_effects.o \
        corelib_fddlgcmn.o \
        corelib_filectrlcmn.o \
+       corelib_filehistorycmn.o \
        corelib_filepickercmn.o \
        corelib_fontpickercmn.o \
        corelib_fldlgcmn.o \
@@ -9863,6 +9871,7 @@ COND_USE_GUI_1_WXUNIV_1___CORE_SRC_OBJECTS_3 =  \
        corelib_effects.o \
        corelib_fddlgcmn.o \
        corelib_filectrlcmn.o \
+       corelib_filehistorycmn.o \
        corelib_filepickercmn.o \
        corelib_fontpickercmn.o \
        corelib_fldlgcmn.o \
@@ -18960,6 +18969,9 @@ monodll_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONODLL_ODEP)
 @COND_USE_GUI_1@monodll_filectrlcmn.o: $(srcdir)/src/common/filectrlcmn.cpp $(MONODLL_ODEP)
 @COND_USE_GUI_1@       $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/filectrlcmn.cpp
 
+@COND_USE_GUI_1@monodll_filehistorycmn.o: $(srcdir)/src/common/filehistorycmn.cpp $(MONODLL_ODEP)
+@COND_USE_GUI_1@       $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/filehistorycmn.cpp
+
 @COND_USE_GUI_1@monodll_filepickercmn.o: $(srcdir)/src/common/filepickercmn.cpp $(MONODLL_ODEP)
 @COND_USE_GUI_1@       $(CXXC) -c -o $@ $(MONODLL_CXXFLAGS) $(srcdir)/src/common/filepickercmn.cpp
 
@@ -23817,6 +23829,9 @@ monolib_sound_sdl.o: $(srcdir)/src/unix/sound_sdl.cpp $(MONOLIB_ODEP)
 @COND_USE_GUI_1@monolib_filectrlcmn.o: $(srcdir)/src/common/filectrlcmn.cpp $(MONOLIB_ODEP)
 @COND_USE_GUI_1@       $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/filectrlcmn.cpp
 
+@COND_USE_GUI_1@monolib_filehistorycmn.o: $(srcdir)/src/common/filehistorycmn.cpp $(MONOLIB_ODEP)
+@COND_USE_GUI_1@       $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/filehistorycmn.cpp
+
 @COND_USE_GUI_1@monolib_filepickercmn.o: $(srcdir)/src/common/filepickercmn.cpp $(MONOLIB_ODEP)
 @COND_USE_GUI_1@       $(CXXC) -c -o $@ $(MONOLIB_CXXFLAGS) $(srcdir)/src/common/filepickercmn.cpp
 
@@ -28863,6 +28878,9 @@ coredll_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(COREDLL_ODEP)
 @COND_USE_GUI_1@coredll_filectrlcmn.o: $(srcdir)/src/common/filectrlcmn.cpp $(COREDLL_ODEP)
 @COND_USE_GUI_1@       $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/common/filectrlcmn.cpp
 
+@COND_USE_GUI_1@coredll_filehistorycmn.o: $(srcdir)/src/common/filehistorycmn.cpp $(COREDLL_ODEP)
+@COND_USE_GUI_1@       $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/common/filehistorycmn.cpp
+
 @COND_USE_GUI_1@coredll_filepickercmn.o: $(srcdir)/src/common/filepickercmn.cpp $(COREDLL_ODEP)
 @COND_USE_GUI_1@       $(CXXC) -c -o $@ $(COREDLL_CXXFLAGS) $(srcdir)/src/common/filepickercmn.cpp
 
@@ -32445,6 +32463,9 @@ corelib_win32.o: $(srcdir)/src/univ/themes/win32.cpp $(CORELIB_ODEP)
 @COND_USE_GUI_1@corelib_filectrlcmn.o: $(srcdir)/src/common/filectrlcmn.cpp $(CORELIB_ODEP)
 @COND_USE_GUI_1@       $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/common/filectrlcmn.cpp
 
+@COND_USE_GUI_1@corelib_filehistorycmn.o: $(srcdir)/src/common/filehistorycmn.cpp $(CORELIB_ODEP)
+@COND_USE_GUI_1@       $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/common/filehistorycmn.cpp
+
 @COND_USE_GUI_1@corelib_filepickercmn.o: $(srcdir)/src/common/filepickercmn.cpp $(CORELIB_ODEP)
 @COND_USE_GUI_1@       $(CXXC) -c -o $@ $(CORELIB_CXXFLAGS) $(srcdir)/src/common/filepickercmn.cpp
 
index 8e2f54a28a6c35df319deb1b981b6b06fb28394b..0cefab11b75b39a1448467ec688c13c03764cb0d 100644 (file)
@@ -1,7 +1,7 @@
-# generated automatically by aclocal 1.10 -*- Autoconf -*-
+# generated automatically by aclocal 1.10.3 -*- Autoconf -*-
 
 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004,
-# 2005, 2006  Free Software Foundation, Inc.
+# 2005, 2006, 2007, 2008, 2009  Free Software Foundation, Inc.
 # This file is free software; the Free Software Foundation
 # gives unlimited permission to copy and/or distribute it,
 # with or without modifications, as long as this notice is preserved.
index 062ab7ea0b4ab9a2ab5428dac0c7150c5d035cf7..dd96e0fd044d49ce42a76c2283137503d1ec549b 100644 (file)
@@ -668,6 +668,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
     src/common/effects.cpp
     src/common/fddlgcmn.cpp
     src/common/filectrlcmn.cpp
+    src/common/filehistorycmn.cpp
     src/common/filepickercmn.cpp
     src/common/fontpickercmn.cpp
     src/common/fldlgcmn.cpp
@@ -905,6 +906,7 @@ IMPORTANT: please read docs/tech/tn0016.txt before modifying this file!
     wx/evtloopsrc.h
     wx/fdrepdlg.h
     wx/filectrl.h
+    wx/filehistory.h
     wx/filepicker.h
     wx/fontpicker.h
     wx/fmappriv.h
index 46606ca5a62ffcabec2a7926da9e1becf5c8ca32..464d370247e21ac2ec22df1dfb23e5534ce61386 100644 (file)
@@ -1800,6 +1800,7 @@ ____CORE_SRC_FILENAMES_OBJECTS =  \
        $(OBJS)\monodll_effects.obj \\r
        $(OBJS)\monodll_fddlgcmn.obj \\r
        $(OBJS)\monodll_filectrlcmn.obj \\r
+       $(OBJS)\monodll_filehistorycmn.obj \\r
        $(OBJS)\monodll_filepickercmn.obj \\r
        $(OBJS)\monodll_fontpickercmn.obj \\r
        $(OBJS)\monodll_fldlgcmn.obj \\r
@@ -2044,6 +2045,7 @@ ____CORE_SRC_FILENAMES_OBJECTS =  \
        $(OBJS)\monodll_effects.obj \\r
        $(OBJS)\monodll_fddlgcmn.obj \\r
        $(OBJS)\monodll_filectrlcmn.obj \\r
+       $(OBJS)\monodll_filehistorycmn.obj \\r
        $(OBJS)\monodll_filepickercmn.obj \\r
        $(OBJS)\monodll_fontpickercmn.obj \\r
        $(OBJS)\monodll_fldlgcmn.obj \\r
@@ -2505,6 +2507,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS =  \
        $(OBJS)\monolib_effects.obj \\r
        $(OBJS)\monolib_fddlgcmn.obj \\r
        $(OBJS)\monolib_filectrlcmn.obj \\r
+       $(OBJS)\monolib_filehistorycmn.obj \\r
        $(OBJS)\monolib_filepickercmn.obj \\r
        $(OBJS)\monolib_fontpickercmn.obj \\r
        $(OBJS)\monolib_fldlgcmn.obj \\r
@@ -2749,6 +2752,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS =  \
        $(OBJS)\monolib_effects.obj \\r
        $(OBJS)\monolib_fddlgcmn.obj \\r
        $(OBJS)\monolib_filectrlcmn.obj \\r
+       $(OBJS)\monolib_filehistorycmn.obj \\r
        $(OBJS)\monolib_filepickercmn.obj \\r
        $(OBJS)\monolib_fontpickercmn.obj \\r
        $(OBJS)\monolib_fldlgcmn.obj \\r
@@ -3103,6 +3107,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS =  \
        $(OBJS)\coredll_effects.obj \\r
        $(OBJS)\coredll_fddlgcmn.obj \\r
        $(OBJS)\coredll_filectrlcmn.obj \\r
+       $(OBJS)\coredll_filehistorycmn.obj \\r
        $(OBJS)\coredll_filepickercmn.obj \\r
        $(OBJS)\coredll_fontpickercmn.obj \\r
        $(OBJS)\coredll_fldlgcmn.obj \\r
@@ -3347,6 +3352,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS =  \
        $(OBJS)\coredll_effects.obj \\r
        $(OBJS)\coredll_fddlgcmn.obj \\r
        $(OBJS)\coredll_filectrlcmn.obj \\r
+       $(OBJS)\coredll_filehistorycmn.obj \\r
        $(OBJS)\coredll_filepickercmn.obj \\r
        $(OBJS)\coredll_fontpickercmn.obj \\r
        $(OBJS)\coredll_fldlgcmn.obj \\r
@@ -3597,6 +3603,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS =  \
        $(OBJS)\corelib_effects.obj \\r
        $(OBJS)\corelib_fddlgcmn.obj \\r
        $(OBJS)\corelib_filectrlcmn.obj \\r
+       $(OBJS)\corelib_filehistorycmn.obj \\r
        $(OBJS)\corelib_filepickercmn.obj \\r
        $(OBJS)\corelib_fontpickercmn.obj \\r
        $(OBJS)\corelib_fldlgcmn.obj \\r
@@ -3841,6 +3848,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS =  \
        $(OBJS)\corelib_effects.obj \\r
        $(OBJS)\corelib_fddlgcmn.obj \\r
        $(OBJS)\corelib_filectrlcmn.obj \\r
+       $(OBJS)\corelib_filehistorycmn.obj \\r
        $(OBJS)\corelib_filepickercmn.obj \\r
        $(OBJS)\corelib_fontpickercmn.obj \\r
        $(OBJS)\corelib_fldlgcmn.obj \\r
@@ -7185,6 +7193,11 @@ $(OBJS)\monodll_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp
        $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp\r
 !endif\r
 \r
+!if "$(USE_GUI)" == "1"\r
+$(OBJS)\monodll_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp\r
+       $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp\r
+!endif\r
+\r
 !if "$(USE_GUI)" == "1"\r
 $(OBJS)\monodll_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp\r
        $(CXX) -q -c -P -o$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filepickercmn.cpp\r
@@ -9381,6 +9394,11 @@ $(OBJS)\monolib_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp
        $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp\r
 !endif\r
 \r
+!if "$(USE_GUI)" == "1"\r
+$(OBJS)\monolib_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp\r
+       $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp\r
+!endif\r
+\r
 !if "$(USE_GUI)" == "1"\r
 $(OBJS)\monolib_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp\r
        $(CXX) -q -c -P -o$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filepickercmn.cpp\r
@@ -11586,6 +11604,11 @@ $(OBJS)\coredll_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp
        $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp\r
 !endif\r
 \r
+!if "$(USE_GUI)" == "1"\r
+$(OBJS)\coredll_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp\r
+       $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp\r
+!endif\r
+\r
 !if "$(USE_GUI)" == "1"\r
 $(OBJS)\coredll_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp\r
        $(CXX) -q -c -P -o$@ $(COREDLL_CXXFLAGS) ..\..\src\common\filepickercmn.cpp\r
@@ -12873,6 +12896,11 @@ $(OBJS)\corelib_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp
        $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp\r
 !endif\r
 \r
+!if "$(USE_GUI)" == "1"\r
+$(OBJS)\corelib_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp\r
+       $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp\r
+!endif\r
+\r
 !if "$(USE_GUI)" == "1"\r
 $(OBJS)\corelib_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp\r
        $(CXX) -q -c -P -o$@ $(CORELIB_CXXFLAGS) ..\..\src\common\filepickercmn.cpp\r
index 372d0d4ded5d1bc6bd63eb18647293ddcd622c5b..43b72a1402f5a189735db5c908a743d98587a034 100644 (file)
@@ -1810,6 +1810,7 @@ ____CORE_SRC_FILENAMES_OBJECTS =  \
        $(OBJS)\monodll_effects.o \\r
        $(OBJS)\monodll_fddlgcmn.o \\r
        $(OBJS)\monodll_filectrlcmn.o \\r
+       $(OBJS)\monodll_filehistorycmn.o \\r
        $(OBJS)\monodll_filepickercmn.o \\r
        $(OBJS)\monodll_fontpickercmn.o \\r
        $(OBJS)\monodll_fldlgcmn.o \\r
@@ -2056,6 +2057,7 @@ ____CORE_SRC_FILENAMES_OBJECTS =  \
        $(OBJS)\monodll_effects.o \\r
        $(OBJS)\monodll_fddlgcmn.o \\r
        $(OBJS)\monodll_filectrlcmn.o \\r
+       $(OBJS)\monodll_filehistorycmn.o \\r
        $(OBJS)\monodll_filepickercmn.o \\r
        $(OBJS)\monodll_fontpickercmn.o \\r
        $(OBJS)\monodll_fldlgcmn.o \\r
@@ -2521,6 +2523,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS =  \
        $(OBJS)\monolib_effects.o \\r
        $(OBJS)\monolib_fddlgcmn.o \\r
        $(OBJS)\monolib_filectrlcmn.o \\r
+       $(OBJS)\monolib_filehistorycmn.o \\r
        $(OBJS)\monolib_filepickercmn.o \\r
        $(OBJS)\monolib_fontpickercmn.o \\r
        $(OBJS)\monolib_fldlgcmn.o \\r
@@ -2767,6 +2770,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS =  \
        $(OBJS)\monolib_effects.o \\r
        $(OBJS)\monolib_fddlgcmn.o \\r
        $(OBJS)\monolib_filectrlcmn.o \\r
+       $(OBJS)\monolib_filehistorycmn.o \\r
        $(OBJS)\monolib_filepickercmn.o \\r
        $(OBJS)\monolib_fontpickercmn.o \\r
        $(OBJS)\monolib_fldlgcmn.o \\r
@@ -3135,6 +3139,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS =  \
        $(OBJS)\coredll_effects.o \\r
        $(OBJS)\coredll_fddlgcmn.o \\r
        $(OBJS)\coredll_filectrlcmn.o \\r
+       $(OBJS)\coredll_filehistorycmn.o \\r
        $(OBJS)\coredll_filepickercmn.o \\r
        $(OBJS)\coredll_fontpickercmn.o \\r
        $(OBJS)\coredll_fldlgcmn.o \\r
@@ -3381,6 +3386,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS =  \
        $(OBJS)\coredll_effects.o \\r
        $(OBJS)\coredll_fddlgcmn.o \\r
        $(OBJS)\coredll_filectrlcmn.o \\r
+       $(OBJS)\coredll_filehistorycmn.o \\r
        $(OBJS)\coredll_filepickercmn.o \\r
        $(OBJS)\coredll_fontpickercmn.o \\r
        $(OBJS)\coredll_fldlgcmn.o \\r
@@ -3637,6 +3643,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS =  \
        $(OBJS)\corelib_effects.o \\r
        $(OBJS)\corelib_fddlgcmn.o \\r
        $(OBJS)\corelib_filectrlcmn.o \\r
+       $(OBJS)\corelib_filehistorycmn.o \\r
        $(OBJS)\corelib_filepickercmn.o \\r
        $(OBJS)\corelib_fontpickercmn.o \\r
        $(OBJS)\corelib_fldlgcmn.o \\r
@@ -3883,6 +3890,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS =  \
        $(OBJS)\corelib_effects.o \\r
        $(OBJS)\corelib_fddlgcmn.o \\r
        $(OBJS)\corelib_filectrlcmn.o \\r
+       $(OBJS)\corelib_filehistorycmn.o \\r
        $(OBJS)\corelib_filepickercmn.o \\r
        $(OBJS)\corelib_fontpickercmn.o \\r
        $(OBJS)\corelib_fldlgcmn.o \\r
@@ -7334,6 +7342,11 @@ $(OBJS)\monodll_filectrlcmn.o: ../../src/common/filectrlcmn.cpp
        $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<\r
 endif\r
 \r
+ifeq ($(USE_GUI),1)\r
+$(OBJS)\monodll_filehistorycmn.o: ../../src/common/filehistorycmn.cpp\r
+       $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<\r
+endif\r
+\r
 ifeq ($(USE_GUI),1)\r
 $(OBJS)\monodll_filepickercmn.o: ../../src/common/filepickercmn.cpp\r
        $(CXX) -c -o $@ $(MONODLL_CXXFLAGS) $(CPPDEPS) $<\r
@@ -9530,6 +9543,11 @@ $(OBJS)\monolib_filectrlcmn.o: ../../src/common/filectrlcmn.cpp
        $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<\r
 endif\r
 \r
+ifeq ($(USE_GUI),1)\r
+$(OBJS)\monolib_filehistorycmn.o: ../../src/common/filehistorycmn.cpp\r
+       $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<\r
+endif\r
+\r
 ifeq ($(USE_GUI),1)\r
 $(OBJS)\monolib_filepickercmn.o: ../../src/common/filepickercmn.cpp\r
        $(CXX) -c -o $@ $(MONOLIB_CXXFLAGS) $(CPPDEPS) $<\r
@@ -11735,6 +11753,11 @@ $(OBJS)\coredll_filectrlcmn.o: ../../src/common/filectrlcmn.cpp
        $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<\r
 endif\r
 \r
+ifeq ($(USE_GUI),1)\r
+$(OBJS)\coredll_filehistorycmn.o: ../../src/common/filehistorycmn.cpp\r
+       $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<\r
+endif\r
+\r
 ifeq ($(USE_GUI),1)\r
 $(OBJS)\coredll_filepickercmn.o: ../../src/common/filepickercmn.cpp\r
        $(CXX) -c -o $@ $(COREDLL_CXXFLAGS) $(CPPDEPS) $<\r
@@ -13022,6 +13045,11 @@ $(OBJS)\corelib_filectrlcmn.o: ../../src/common/filectrlcmn.cpp
        $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<\r
 endif\r
 \r
+ifeq ($(USE_GUI),1)\r
+$(OBJS)\corelib_filehistorycmn.o: ../../src/common/filehistorycmn.cpp\r
+       $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<\r
+endif\r
+\r
 ifeq ($(USE_GUI),1)\r
 $(OBJS)\corelib_filepickercmn.o: ../../src/common/filepickercmn.cpp\r
        $(CXX) -c -o $@ $(CORELIB_CXXFLAGS) $(CPPDEPS) $<\r
index d5a3b59071a5cb52ad88fc967e9b7c3319865395..5d0440076bd6d16fc3756b938451bffe5e0e5360 100644 (file)
@@ -2008,6 +2008,7 @@ ____CORE_SRC_FILENAMES_OBJECTS =  \
        $(OBJS)\monodll_effects.obj \\r
        $(OBJS)\monodll_fddlgcmn.obj \\r
        $(OBJS)\monodll_filectrlcmn.obj \\r
+       $(OBJS)\monodll_filehistorycmn.obj \\r
        $(OBJS)\monodll_filepickercmn.obj \\r
        $(OBJS)\monodll_fontpickercmn.obj \\r
        $(OBJS)\monodll_fldlgcmn.obj \\r
@@ -2252,6 +2253,7 @@ ____CORE_SRC_FILENAMES_OBJECTS =  \
        $(OBJS)\monodll_effects.obj \\r
        $(OBJS)\monodll_fddlgcmn.obj \\r
        $(OBJS)\monodll_filectrlcmn.obj \\r
+       $(OBJS)\monodll_filehistorycmn.obj \\r
        $(OBJS)\monodll_filepickercmn.obj \\r
        $(OBJS)\monodll_fontpickercmn.obj \\r
        $(OBJS)\monodll_fldlgcmn.obj \\r
@@ -2719,6 +2721,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS =  \
        $(OBJS)\monolib_effects.obj \\r
        $(OBJS)\monolib_fddlgcmn.obj \\r
        $(OBJS)\monolib_filectrlcmn.obj \\r
+       $(OBJS)\monolib_filehistorycmn.obj \\r
        $(OBJS)\monolib_filepickercmn.obj \\r
        $(OBJS)\monolib_fontpickercmn.obj \\r
        $(OBJS)\monolib_fldlgcmn.obj \\r
@@ -2963,6 +2966,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS =  \
        $(OBJS)\monolib_effects.obj \\r
        $(OBJS)\monolib_fddlgcmn.obj \\r
        $(OBJS)\monolib_filectrlcmn.obj \\r
+       $(OBJS)\monolib_filehistorycmn.obj \\r
        $(OBJS)\monolib_filepickercmn.obj \\r
        $(OBJS)\monolib_fontpickercmn.obj \\r
        $(OBJS)\monolib_fldlgcmn.obj \\r
@@ -3383,6 +3387,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS =  \
        $(OBJS)\coredll_effects.obj \\r
        $(OBJS)\coredll_fddlgcmn.obj \\r
        $(OBJS)\coredll_filectrlcmn.obj \\r
+       $(OBJS)\coredll_filehistorycmn.obj \\r
        $(OBJS)\coredll_filepickercmn.obj \\r
        $(OBJS)\coredll_fontpickercmn.obj \\r
        $(OBJS)\coredll_fldlgcmn.obj \\r
@@ -3627,6 +3632,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS =  \
        $(OBJS)\coredll_effects.obj \\r
        $(OBJS)\coredll_fddlgcmn.obj \\r
        $(OBJS)\coredll_filectrlcmn.obj \\r
+       $(OBJS)\coredll_filehistorycmn.obj \\r
        $(OBJS)\coredll_filepickercmn.obj \\r
        $(OBJS)\coredll_fontpickercmn.obj \\r
        $(OBJS)\coredll_fldlgcmn.obj \\r
@@ -3883,6 +3889,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS =  \
        $(OBJS)\corelib_effects.obj \\r
        $(OBJS)\corelib_fddlgcmn.obj \\r
        $(OBJS)\corelib_filectrlcmn.obj \\r
+       $(OBJS)\corelib_filehistorycmn.obj \\r
        $(OBJS)\corelib_filepickercmn.obj \\r
        $(OBJS)\corelib_fontpickercmn.obj \\r
        $(OBJS)\corelib_fldlgcmn.obj \\r
@@ -4127,6 +4134,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS =  \
        $(OBJS)\corelib_effects.obj \\r
        $(OBJS)\corelib_fddlgcmn.obj \\r
        $(OBJS)\corelib_filectrlcmn.obj \\r
+       $(OBJS)\corelib_filehistorycmn.obj \\r
        $(OBJS)\corelib_filepickercmn.obj \\r
        $(OBJS)\corelib_fontpickercmn.obj \\r
        $(OBJS)\corelib_fldlgcmn.obj \\r
@@ -7765,6 +7773,11 @@ $(OBJS)\monodll_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp
        $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp\r
 !endif\r
 \r
+!if "$(USE_GUI)" == "1"\r
+$(OBJS)\monodll_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp\r
+       $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp\r
+!endif\r
+\r
 !if "$(USE_GUI)" == "1"\r
 $(OBJS)\monodll_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp\r
        $(CXX) /c /nologo /TP /Fo$@ $(MONODLL_CXXFLAGS) ..\..\src\common\filepickercmn.cpp\r
@@ -9961,6 +9974,11 @@ $(OBJS)\monolib_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp
        $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp\r
 !endif\r
 \r
+!if "$(USE_GUI)" == "1"\r
+$(OBJS)\monolib_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp\r
+       $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp\r
+!endif\r
+\r
 !if "$(USE_GUI)" == "1"\r
 $(OBJS)\monolib_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp\r
        $(CXX) /c /nologo /TP /Fo$@ $(MONOLIB_CXXFLAGS) ..\..\src\common\filepickercmn.cpp\r
@@ -12166,6 +12184,11 @@ $(OBJS)\coredll_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp
        $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp\r
 !endif\r
 \r
+!if "$(USE_GUI)" == "1"\r
+$(OBJS)\coredll_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp\r
+       $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp\r
+!endif\r
+\r
 !if "$(USE_GUI)" == "1"\r
 $(OBJS)\coredll_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp\r
        $(CXX) /c /nologo /TP /Fo$@ $(COREDLL_CXXFLAGS) ..\..\src\common\filepickercmn.cpp\r
@@ -13453,6 +13476,11 @@ $(OBJS)\corelib_filectrlcmn.obj: ..\..\src\common\filectrlcmn.cpp
        $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\filectrlcmn.cpp\r
 !endif\r
 \r
+!if "$(USE_GUI)" == "1"\r
+$(OBJS)\corelib_filehistorycmn.obj: ..\..\src\common\filehistorycmn.cpp\r
+       $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\filehistorycmn.cpp\r
+!endif\r
+\r
 !if "$(USE_GUI)" == "1"\r
 $(OBJS)\corelib_filepickercmn.obj: ..\..\src\common\filepickercmn.cpp\r
        $(CXX) /c /nologo /TP /Fo$@ $(CORELIB_CXXFLAGS) ..\..\src\common\filepickercmn.cpp\r
index 8116672a875bcca2b6fb8506fbf0ea232f56f29e..931ba6fc53b15f8d519e9facf0c7181f9827d905 100644 (file)
@@ -372,6 +372,7 @@ ____CORE_SRC_FILENAMES_OBJECTS =  &
        $(OBJS)\monodll_effects.obj &\r
        $(OBJS)\monodll_fddlgcmn.obj &\r
        $(OBJS)\monodll_filectrlcmn.obj &\r
+       $(OBJS)\monodll_filehistorycmn.obj &\r
        $(OBJS)\monodll_filepickercmn.obj &\r
        $(OBJS)\monodll_fontpickercmn.obj &\r
        $(OBJS)\monodll_fldlgcmn.obj &\r
@@ -618,6 +619,7 @@ ____CORE_SRC_FILENAMES_OBJECTS =  &
        $(OBJS)\monodll_effects.obj &\r
        $(OBJS)\monodll_fddlgcmn.obj &\r
        $(OBJS)\monodll_filectrlcmn.obj &\r
+       $(OBJS)\monodll_filehistorycmn.obj &\r
        $(OBJS)\monodll_filepickercmn.obj &\r
        $(OBJS)\monodll_fontpickercmn.obj &\r
        $(OBJS)\monodll_fldlgcmn.obj &\r
@@ -1088,6 +1090,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS =  &
        $(OBJS)\monolib_effects.obj &\r
        $(OBJS)\monolib_fddlgcmn.obj &\r
        $(OBJS)\monolib_filectrlcmn.obj &\r
+       $(OBJS)\monolib_filehistorycmn.obj &\r
        $(OBJS)\monolib_filepickercmn.obj &\r
        $(OBJS)\monolib_fontpickercmn.obj &\r
        $(OBJS)\monolib_fldlgcmn.obj &\r
@@ -1334,6 +1337,7 @@ ____CORE_SRC_FILENAMES_1_OBJECTS =  &
        $(OBJS)\monolib_effects.obj &\r
        $(OBJS)\monolib_fddlgcmn.obj &\r
        $(OBJS)\monolib_filectrlcmn.obj &\r
+       $(OBJS)\monolib_filehistorycmn.obj &\r
        $(OBJS)\monolib_filepickercmn.obj &\r
        $(OBJS)\monolib_fontpickercmn.obj &\r
        $(OBJS)\monolib_fldlgcmn.obj &\r
@@ -1713,6 +1717,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS =  &
        $(OBJS)\coredll_effects.obj &\r
        $(OBJS)\coredll_fddlgcmn.obj &\r
        $(OBJS)\coredll_filectrlcmn.obj &\r
+       $(OBJS)\coredll_filehistorycmn.obj &\r
        $(OBJS)\coredll_filepickercmn.obj &\r
        $(OBJS)\coredll_fontpickercmn.obj &\r
        $(OBJS)\coredll_fldlgcmn.obj &\r
@@ -1959,6 +1964,7 @@ ____CORE_SRC_FILENAMES_2_OBJECTS =  &
        $(OBJS)\coredll_effects.obj &\r
        $(OBJS)\coredll_fddlgcmn.obj &\r
        $(OBJS)\coredll_filectrlcmn.obj &\r
+       $(OBJS)\coredll_filehistorycmn.obj &\r
        $(OBJS)\coredll_filepickercmn.obj &\r
        $(OBJS)\coredll_fontpickercmn.obj &\r
        $(OBJS)\coredll_fldlgcmn.obj &\r
@@ -2217,6 +2223,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS =  &
        $(OBJS)\corelib_effects.obj &\r
        $(OBJS)\corelib_fddlgcmn.obj &\r
        $(OBJS)\corelib_filectrlcmn.obj &\r
+       $(OBJS)\corelib_filehistorycmn.obj &\r
        $(OBJS)\corelib_filepickercmn.obj &\r
        $(OBJS)\corelib_fontpickercmn.obj &\r
        $(OBJS)\corelib_fldlgcmn.obj &\r
@@ -2463,6 +2470,7 @@ ____CORE_SRC_FILENAMES_3_OBJECTS =  &
        $(OBJS)\corelib_effects.obj &\r
        $(OBJS)\corelib_fddlgcmn.obj &\r
        $(OBJS)\corelib_filectrlcmn.obj &\r
+       $(OBJS)\corelib_filehistorycmn.obj &\r
        $(OBJS)\corelib_filepickercmn.obj &\r
        $(OBJS)\corelib_fontpickercmn.obj &\r
        $(OBJS)\corelib_fldlgcmn.obj &\r
@@ -7592,6 +7600,11 @@ $(OBJS)\monodll_filectrlcmn.obj :  .AUTODEPEND ..\..\src\common\filectrlcmn.cpp
        $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<\r
 !endif\r
 \r
+!ifeq USE_GUI 1\r
+$(OBJS)\monodll_filehistorycmn.obj :  .AUTODEPEND ..\..\src\common\filehistorycmn.cpp\r
+       $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<\r
+!endif\r
+\r
 !ifeq USE_GUI 1\r
 $(OBJS)\monodll_filepickercmn.obj :  .AUTODEPEND ..\..\src\common\filepickercmn.cpp\r
        $(CXX) -bt=nt -zq -fo=$^@ $(MONODLL_CXXFLAGS) $<\r
@@ -9788,6 +9801,11 @@ $(OBJS)\monolib_filectrlcmn.obj :  .AUTODEPEND ..\..\src\common\filectrlcmn.cpp
        $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<\r
 !endif\r
 \r
+!ifeq USE_GUI 1\r
+$(OBJS)\monolib_filehistorycmn.obj :  .AUTODEPEND ..\..\src\common\filehistorycmn.cpp\r
+       $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<\r
+!endif\r
+\r
 !ifeq USE_GUI 1\r
 $(OBJS)\monolib_filepickercmn.obj :  .AUTODEPEND ..\..\src\common\filepickercmn.cpp\r
        $(CXX) -bt=nt -zq -fo=$^@ $(MONOLIB_CXXFLAGS) $<\r
@@ -11993,6 +12011,11 @@ $(OBJS)\coredll_filectrlcmn.obj :  .AUTODEPEND ..\..\src\common\filectrlcmn.cpp
        $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<\r
 !endif\r
 \r
+!ifeq USE_GUI 1\r
+$(OBJS)\coredll_filehistorycmn.obj :  .AUTODEPEND ..\..\src\common\filehistorycmn.cpp\r
+       $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<\r
+!endif\r
+\r
 !ifeq USE_GUI 1\r
 $(OBJS)\coredll_filepickercmn.obj :  .AUTODEPEND ..\..\src\common\filepickercmn.cpp\r
        $(CXX) -bt=nt -zq -fo=$^@ $(COREDLL_CXXFLAGS) $<\r
@@ -13280,6 +13303,11 @@ $(OBJS)\corelib_filectrlcmn.obj :  .AUTODEPEND ..\..\src\common\filectrlcmn.cpp
        $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<\r
 !endif\r
 \r
+!ifeq USE_GUI 1\r
+$(OBJS)\corelib_filehistorycmn.obj :  .AUTODEPEND ..\..\src\common\filehistorycmn.cpp\r
+       $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<\r
+!endif\r
+\r
 !ifeq USE_GUI 1\r
 $(OBJS)\corelib_filepickercmn.obj :  .AUTODEPEND ..\..\src\common\filepickercmn.cpp\r
        $(CXX) -bt=nt -zq -fo=$^@ $(CORELIB_CXXFLAGS) $<\r
index c9a1a0ce21cedf62701d58d2fd3583112602fcf6..6fb98417bd37944162598730359a6e23969b33be 100644 (file)
@@ -398,6 +398,10 @@ SOURCE=..\..\src\common\filectrlcmn.cpp
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\src\common\filehistorycmn.cpp\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\src\common\filepickercmn.cpp\r
 # End Source File\r
 # Begin Source File\r
@@ -6022,6 +6026,10 @@ SOURCE=..\..\include\wx\filedlg.h
 # End Source File\r
 # Begin Source File\r
 \r
+SOURCE=..\..\include\wx\filehistory.h\r
+# End Source File\r
+# Begin Source File\r
+\r
 SOURCE=..\..\include\wx\filepicker.h\r
 # End Source File\r
 # Begin Source File\r
index 39dbaf7ec9aa5d62987bb1fe7589edef0bb8c1c2..37ff331afc6c2ee90c838384f8b2446e0557294f 100644 (file)
                        <File\r
                                RelativePath="..\..\src\common\filectrlcmn.cpp">\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\src\common\filehistorycmn.cpp">\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\src\common\filepickercmn.cpp">\r
                        </File>\r
                        <File\r
                                RelativePath="..\..\include\wx\filedlg.h">\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\include\wx\filehistory.h">\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\include\wx\filepicker.h">\r
                        </File>\r
index 7a01bfb23f8633d66e56d7791396907ffbbf8d9f..7d3946603d73b9b502c1f301423fac7a176e08ce 100644 (file)
                                RelativePath="..\..\src\common\filectrlcmn.cpp"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\src\common\filehistorycmn.cpp"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\src\common\filepickercmn.cpp"\r
                                >\r
                                RelativePath="..\..\include\wx\filedlg.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\include\wx\filehistory.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\include\wx\filepicker.h"\r
                                >\r
index a66bbc59cfba2a0d2cd1d7a68ae53c82b81795ba..f509727aba1374ac0c26227d101c029429dad0e7 100644 (file)
                                RelativePath="..\..\src\common\filectrlcmn.cpp"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\src\common\filehistorycmn.cpp"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\src\common\filepickercmn.cpp"\r
                                >\r
                                RelativePath="..\..\include\wx\filedlg.h"\r
                                >\r
                        </File>\r
+                       <File\r
+                               RelativePath="..\..\include\wx\filehistory.h"\r
+                               >\r
+                       </File>\r
                        <File\r
                                RelativePath="..\..\include\wx\filepicker.h"\r
                                >\r
index f2978cb3457ba56d5cb6fe46ff09912f79443982..4165801b8ad707e6a0c4d562a60b52099c44d766 100755 (executable)
--- a/configure
+++ b/configure
@@ -1736,6 +1736,7 @@ Optional Features:
   --enable-exceptions     build exception-safe library
   --enable-ffile          use wxFFile class
   --enable-file           use wxFile class
+  --enable-filehistory    use wxFileHistory class
   --enable-filesystem     use virtual file systems classes
   --enable-fontenum       use wxFontEnumerator class
   --enable-fontmap        use font encodings conversion classes
@@ -7014,6 +7015,50 @@ fi
 echo "${ECHO_T}$result" >&6; }
 
 
+          enablestring=
+          defaultval=$wxUSE_ALL_FEATURES
+          if test -z "$defaultval"; then
+              if test x"$enablestring" = xdisable; then
+                  defaultval=yes
+              else
+                  defaultval=no
+              fi
+          fi
+
+          { echo "$as_me:$LINENO: checking for --${enablestring:-enable}-filehistory" >&5
+echo $ECHO_N "checking for --${enablestring:-enable}-filehistory... $ECHO_C" >&6; }
+          # Check whether --enable-filehistory was given.
+if test "${enable_filehistory+set}" = set; then
+  enableval=$enable_filehistory;
+                          if test "$enableval" = yes; then
+                            wx_cv_use_filehistory='wxUSE_FILE_HISTORY=yes'
+                          else
+                            wx_cv_use_filehistory='wxUSE_FILE_HISTORY=no'
+                          fi
+
+else
+
+                          wx_cv_use_filehistory='wxUSE_FILE_HISTORY=${'DEFAULT_wxUSE_FILE_HISTORY":-$defaultval}"
+
+fi
+
+
+          eval "$wx_cv_use_filehistory"
+
+          if test x"$enablestring" = xdisable; then
+            if test $wxUSE_FILE_HISTORY = no; then
+              result=yes
+            else
+              result=no
+            fi
+          else
+            result=$wxUSE_FILE_HISTORY
+          fi
+
+          { echo "$as_me:$LINENO: result: $result" >&5
+echo "${ECHO_T}$result" >&6; }
+
+
           enablestring=
           defaultval=$wxUSE_ALL_FEATURES
           if test -z "$defaultval"; then
@@ -44100,6 +44145,13 @@ _ACEOF
   fi
 fi
 
+if test "$wxUSE_FILE_HISTORY" = "yes"; then
+  cat >>confdefs.h <<\_ACEOF
+#define wxUSE_FILE_HISTORY 1
+_ACEOF
+
+fi
+
 if test "$wxUSE_FILESYSTEM" = "yes"; then
   if test "$wxUSE_STREAMS" != yes -o \( "$wxUSE_FILE" != yes -a "$wxUSE_FFILE" != yes \); then
     { echo "$as_me:$LINENO: WARNING: wxFileSystem requires wxStreams and wxFile or wxFFile... disabled" >&5
index 70aa4f4e099083a88a3b154545b22a3a984b0bc7..edbde026bbda43139884bf452a5a2eca3e358438 100644 (file)
@@ -767,6 +767,7 @@ WX_ARG_FEATURE(dynamicloader, [  --enable-dynamicloader  use (new) wxDynamicLibr
 WX_ARG_FEATURE(exceptions,    [  --enable-exceptions     build exception-safe library], wxUSE_EXCEPTIONS)
 WX_ARG_FEATURE(ffile,         [  --enable-ffile          use wxFFile class], wxUSE_FFILE)
 WX_ARG_FEATURE(file,          [  --enable-file           use wxFile class], wxUSE_FILE)
+WX_ARG_FEATURE(filehistory,   [  --enable-filehistory    use wxFileHistory class], wxUSE_FILE_HISTORY)
 WX_ARG_FEATURE(filesystem,    [  --enable-filesystem     use virtual file systems classes], wxUSE_FILESYSTEM)
 WX_ARG_FEATURE(fontenum,      [  --enable-fontenum       use wxFontEnumerator class], wxUSE_FONTENUM)
 WX_ARG_FEATURE(fontmap,       [  --enable-fontmap        use font encodings conversion classes], wxUSE_FONTMAP)
@@ -5893,6 +5894,10 @@ if test "$wxUSE_TARSTREAM" = "yes"; then
   fi
 fi
 
+if test "$wxUSE_FILE_HISTORY" = "yes"; then
+  AC_DEFINE(wxUSE_FILE_HISTORY)
+fi
+
 if test "$wxUSE_FILESYSTEM" = "yes"; then
   if test "$wxUSE_STREAMS" != yes -o \( "$wxUSE_FILE" != yes -a "$wxUSE_FFILE" != yes \); then
     AC_MSG_WARN(wxFileSystem requires wxStreams and wxFile or wxFFile... disabled)
index 54c0c112fd79ee55263cee6a641912fdabb54d2a..a7451822f1e3b1b5c4c91d73bd7a994f80b07bf6 100644 (file)
 #            define wxUSE_STREAMS 1
 #        endif
 #   endif
+
+#   if !wxUSE_FILE_HISTORY
+#        ifdef wxABORT_ON_CONFIG_ERROR
+#            error "DocView requires wxUSE_FILE_HISTORY"
+#        else
+#            undef wxUSE_FILE_HISTORY
+#            define wxUSE_FILE_HISTORY 1
+#        endif
+#   endif
 #endif /* wxUSE_DOC_VIEW_ARCHITECTURE */
 
 #if wxUSE_PRINTING_ARCHITECTURE
index f921f9b5040dd2da1c7ee22aa56b96c449255073..6f678c9b290cb12654d9caa9a7ee485df47b64f7 100644 (file)
@@ -19,6 +19,7 @@
 #include "wx/list.h"
 #include "wx/string.h"
 #include "wx/frame.h"
+#include "wx/filehistory.h"
 
 #if wxUSE_PRINTING_ARCHITECTURE
     #include "wx/print.h"
@@ -31,7 +32,6 @@ class WXDLLIMPEXP_FWD_CORE wxDocTemplate;
 class WXDLLIMPEXP_FWD_CORE wxDocManager;
 class WXDLLIMPEXP_FWD_CORE wxPrintInfo;
 class WXDLLIMPEXP_FWD_CORE wxCommandProcessor;
-class WXDLLIMPEXP_FWD_CORE wxFileHistory;
 class WXDLLIMPEXP_FWD_BASE wxConfigBase;
 
 class wxDocChildFrameAnyBase;
@@ -828,72 +828,6 @@ private:
 };
 #endif // wxUSE_PRINTING_ARCHITECTURE
 
-// ----------------------------------------------------------------------------
-// File history management
-// ----------------------------------------------------------------------------
-
-class WXDLLIMPEXP_CORE wxFileHistory : public wxObject
-{
-public:
-    wxFileHistory(size_t maxFiles = 9, wxWindowID idBase = wxID_FILE1);
-
-    // Operations
-    virtual void AddFileToHistory(const wxString& file);
-    virtual void RemoveFileFromHistory(size_t i);
-    virtual int GetMaxFiles() const { return (int)m_fileMaxFiles; }
-    virtual void UseMenu(wxMenu *menu);
-
-    // Remove menu from the list (MDI child may be closing)
-    virtual void RemoveMenu(wxMenu *menu);
-
-#if wxUSE_CONFIG
-    virtual void Load(const wxConfigBase& config);
-    virtual void Save(wxConfigBase& config);
-#endif // wxUSE_CONFIG
-
-    virtual void AddFilesToMenu();
-    virtual void AddFilesToMenu(wxMenu* menu); // Single menu
-
-    // Accessors
-    virtual wxString GetHistoryFile(size_t i) const { return m_fileHistory[i]; }
-    virtual size_t GetCount() const { return m_fileHistory.GetCount(); }
-
-    const wxList& GetMenus() const { return m_fileMenus; }
-
-    // Set/get base id
-    void SetBaseId(wxWindowID baseId) { m_idBase = baseId; }
-    wxWindowID GetBaseId() const { return m_idBase; }
-
-#if WXWIN_COMPATIBILITY_2_6
-    // deprecated, use GetCount() instead
-    wxDEPRECATED( size_t GetNoHistoryFiles() const );
-#endif // WXWIN_COMPATIBILITY_2_6
-
-protected:
-    // Last n files
-    wxArrayString     m_fileHistory;
-
-    // Menus to maintain (may need several for an MDI app)
-    wxList            m_fileMenus;
-
-    // Max files to maintain
-    size_t            m_fileMaxFiles;
-
-private:
-    // The ID of the first history menu item (Doesn't have to be wxID_FILE1)
-    wxWindowID m_idBase;
-
-    DECLARE_DYNAMIC_CLASS(wxFileHistory)
-    wxDECLARE_NO_COPY_CLASS(wxFileHistory);
-};
-
-#if WXWIN_COMPATIBILITY_2_6
-inline size_t wxFileHistory::GetNoHistoryFiles() const
-{
-    return m_fileHistory.GetCount();
-}
-#endif // WXWIN_COMPATIBILITY_2_6
-
 // For compatibility with existing file formats:
 // converts from/to a stream to/from a temporary file.
 #if wxUSE_STD_IOSTREAM
diff --git a/include/wx/filehistory.h b/include/wx/filehistory.h
new file mode 100644 (file)
index 0000000..2d86e06
--- /dev/null
@@ -0,0 +1,95 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        wx/filehistory.h
+// Purpose:     wxFileHistory class
+// Author:      Julian Smart, Vaclav Slavik
+// Created:     2010-05-03
+// RCS-ID:      $Id$
+// Copyright:   (c) Julian Smart, Vaclav Slavik
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+#ifndef _WX_FILEHISTORY_H_
+#define _WX_FILEHISTORY_H_
+
+#include "wx/defs.h"
+
+#if wxUSE_FILE_HISTORY
+
+#include "wx/windowid.h"
+#include "wx/object.h"
+#include "wx/list.h"
+#include "wx/string.h"
+#include "wx/arrstr.h"
+
+class WXDLLIMPEXP_FWD_CORE wxMenu;
+class WXDLLIMPEXP_FWD_BASE wxConfigBase;
+
+// ----------------------------------------------------------------------------
+// File history management
+// ----------------------------------------------------------------------------
+
+class WXDLLIMPEXP_CORE wxFileHistory : public wxObject
+{
+public:
+    wxFileHistory(size_t maxFiles = 9, wxWindowID idBase = wxID_FILE1);
+
+    // Operations
+    virtual void AddFileToHistory(const wxString& file);
+    virtual void RemoveFileFromHistory(size_t i);
+    virtual int GetMaxFiles() const { return (int)m_fileMaxFiles; }
+    virtual void UseMenu(wxMenu *menu);
+
+    // Remove menu from the list (MDI child may be closing)
+    virtual void RemoveMenu(wxMenu *menu);
+
+#if wxUSE_CONFIG
+    virtual void Load(const wxConfigBase& config);
+    virtual void Save(wxConfigBase& config);
+#endif // wxUSE_CONFIG
+
+    virtual void AddFilesToMenu();
+    virtual void AddFilesToMenu(wxMenu* menu); // Single menu
+
+    // Accessors
+    virtual wxString GetHistoryFile(size_t i) const { return m_fileHistory[i]; }
+    virtual size_t GetCount() const { return m_fileHistory.GetCount(); }
+
+    const wxList& GetMenus() const { return m_fileMenus; }
+
+    // Set/get base id
+    void SetBaseId(wxWindowID baseId) { m_idBase = baseId; }
+    wxWindowID GetBaseId() const { return m_idBase; }
+
+#if WXWIN_COMPATIBILITY_2_6
+    // deprecated, use GetCount() instead
+    wxDEPRECATED( size_t GetNoHistoryFiles() const );
+#endif // WXWIN_COMPATIBILITY_2_6
+
+protected:
+    // Last n files
+    wxArrayString     m_fileHistory;
+
+    // Menus to maintain (may need several for an MDI app)
+    wxList            m_fileMenus;
+
+    // Max files to maintain
+    size_t            m_fileMaxFiles;
+
+private:
+    // The ID of the first history menu item (Doesn't have to be wxID_FILE1)
+    wxWindowID m_idBase;
+
+    DECLARE_DYNAMIC_CLASS(wxFileHistory)
+    wxDECLARE_NO_COPY_CLASS(wxFileHistory);
+};
+
+#if WXWIN_COMPATIBILITY_2_6
+inline size_t wxFileHistory::GetNoHistoryFiles() const
+{
+    return m_fileHistory.GetCount();
+}
+#endif // WXWIN_COMPATIBILITY_2_6
+
+#endif // wxUSE_FILE_HISTORY
+
+#endif // _WX_FILEHISTORY_H_
index c035b658faf17601379dbc03eb96536c1929f554..c0b6859ddf90f1d18467ac0f876e6951fddcab6e 100644 (file)
 //                      use this function
 #define wxUSE_ABOUTDLG 1
 
+// wxFileHistory class
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_FILE_HISTORY 1
+
 // ----------------------------------------------------------------------------
 // Metafiles support
 // ----------------------------------------------------------------------------
index 924ef6f98e0555bc530e866670e01fe6075f5916..c43c311be5d7ad4b3358afb161f6abb7b74026f3 100644 (file)
 //                      use this function
 #define wxUSE_ABOUTDLG 1
 
+// wxFileHistory class
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_FILE_HISTORY 1
+
 // ----------------------------------------------------------------------------
 // Metafiles support
 // ----------------------------------------------------------------------------
index 880ac1c5cf0a2bf4bea1d6bee1281b8d44d29448..1051aa20bafeabee2542253ff7b98b26303c733e 100644 (file)
 //                      use this function
 #define wxUSE_ABOUTDLG 1
 
+// wxFileHistory class
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_FILE_HISTORY 1
+
 // ----------------------------------------------------------------------------
 // Metafiles support
 // ----------------------------------------------------------------------------
index 0e38cfa189959e8f4d1495fc3c07080d3181aeab..8631562b17ddd860de4940148948dfd8f0791d81 100644 (file)
 //                      use this function
 #define wxUSE_ABOUTDLG 1
 
+// wxFileHistory class
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_FILE_HISTORY 1
+
 // ----------------------------------------------------------------------------
 // Metafiles support
 // ----------------------------------------------------------------------------
index 97f4709ce6d7efcb24888cbd4d41bd549c30c138..e729456b09f4f560ecf112fcbd6299fe379acd3b 100644 (file)
 //                      use this function
 #define wxUSE_ABOUTDLG 1
 
+// wxFileHistory class
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_FILE_HISTORY 1
+
 // ----------------------------------------------------------------------------
 // Metafiles support
 // ----------------------------------------------------------------------------
index 71f12caea427f6672e6ed8fe45f473d4c27386b9..9199976d6d0ca456404ba088774f734d874e66b7 100644 (file)
 //                      use this function
 #define wxUSE_ABOUTDLG 1
 
+// wxFileHistory class
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_FILE_HISTORY 1
+
 // ----------------------------------------------------------------------------
 // Metafiles support
 // ----------------------------------------------------------------------------
index 147f226c2ea30e815144ed619e3556f336e6f565..a043c93e516e99809ba12bfb0fc0614886d40576 100644 (file)
 //                      use this function
 #define wxUSE_ABOUTDLG 1
 
+// wxFileHistory class
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_FILE_HISTORY 1
+
 // ----------------------------------------------------------------------------
 // Metafiles support
 // ----------------------------------------------------------------------------
index d42ad35528e8301a97770e5de61c19347680563d..3e2c207de9668d5664355d9683a8f3f4ba900619 100644 (file)
 //                      use this function
 #define wxUSE_ABOUTDLG 1
 
+// wxFileHistory class
+//
+// Default is 1
+//
+// Recommended setting: 1
+#define wxUSE_FILE_HISTORY 1
+
 // ----------------------------------------------------------------------------
 // Metafiles support
 // ----------------------------------------------------------------------------
index d7f44487549250fba7b6bf5a58e285de34c17b2a..4dd49c4be869472cdad5b5ca7bddf43f1ada10ff 100644 (file)
@@ -1501,126 +1501,6 @@ protected:
 };
 
 
-
-/**
-    @class wxFileHistory
-
-    The wxFileHistory encapsulates a user interface convenience, the list of
-    most recently visited files as shown on a menu (usually the File menu).
-
-    wxFileHistory can manage one or more file menus. More than one menu may be
-    required in an MDI application, where the file history should appear on
-    each MDI child menu as well as the MDI parent frame.
-
-    @library{wxcore}
-    @category{docview}
-
-    @see @ref overview_docview, wxDocManager
-*/
-class wxFileHistory : public wxObject
-{
-public:
-    /**
-        Constructor. Pass the maximum number of files that should be stored and
-        displayed.
-
-        @a idBase defaults to wxID_FILE1 and represents the id given to the
-        first history menu item. Since menu items can't share the same ID you
-        should change @a idBase (to one of your own defined IDs) when using
-        more than one wxFileHistory in your application.
-    */
-    wxFileHistory(size_t maxFiles = 9, wxWindowID idBase = wxID_FILE1);
-
-    /**
-        Destructor.
-    */
-    virtual ~wxFileHistory();
-
-    /**
-        Adds a file to the file history list, if the object has a pointer to an
-        appropriate file menu.
-    */
-    virtual void AddFileToHistory(const wxString& filename);
-
-    /**
-        Appends the files in the history list, to all menus managed by the file
-        history object.
-    */
-    virtual void AddFilesToMenu();
-    /**
-        Appends the files in the history list, to the given menu only.
-    */
-    virtual void AddFilesToMenu(wxMenu* menu);
-
-    /**
-        Returns the base identifier for the range used for appending items.
-    */
-    wxWindowID GetBaseId() const;
-
-    /**
-        Returns the number of files currently stored in the file history.
-    */
-    virtual size_t GetCount() const;
-
-    /**
-        Returns the file at this index (zero-based).
-    */
-    virtual wxString GetHistoryFile(size_t index) const;
-
-    /**
-        Returns the maximum number of files that can be stored.
-    */
-    virtual int GetMaxFiles() const;
-
-    /**
-        Returns the list of menus that are managed by this file history object.
-
-        @see UseMenu()
-    */
-    const wxList& GetMenus() const;
-
-    /**
-        Loads the file history from the given config object. This function
-        should be called explicitly by the application.
-
-        @see wxConfigBase
-    */
-    virtual void Load(const wxConfigBase& config);
-
-    /**
-        Removes the specified file from the history.
-    */
-    virtual void RemoveFileFromHistory(size_t i);
-
-    /**
-        Removes this menu from the list of those managed by this object.
-    */
-    virtual void RemoveMenu(wxMenu* menu);
-
-    /**
-        Saves the file history into the given config object. This must be
-        called explicitly by the application.
-
-        @see wxConfigBase
-    */
-    virtual void Save(wxConfigBase& config);
-
-    /**
-        Sets the base identifier for the range used for appending items.
-    */
-    void SetBaseId(wxWindowID baseId);
-
-    /**
-        Adds this menu to the list of those menus that are managed by this file
-        history object. Also see AddFilesToMenu() for initializing the menu
-        with filenames that are already in the history when this function is
-        called, as this is not done automatically.
-    */
-    virtual void UseMenu(wxMenu* menu);
-};
-
-
-
 // ============================================================================
 // Global functions/macros
 // ============================================================================
diff --git a/interface/wx/filehistory.h b/interface/wx/filehistory.h
new file mode 100644 (file)
index 0000000..855e8c9
--- /dev/null
@@ -0,0 +1,124 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        filehistory.h
+// Purpose:     wxFileHistory class
+// Author:      wxWidgets team
+// RCS-ID:      $Id$
+// Licence:     wxWindows license
+/////////////////////////////////////////////////////////////////////////////
+
+/**
+    @class wxFileHistory
+
+    The wxFileHistory encapsulates a user interface convenience, the list of
+    most recently visited files as shown on a menu (usually the File menu).
+
+    wxFileHistory can manage one or more file menus. More than one menu may be
+    required in an MDI application, where the file history should appear on
+    each MDI child menu as well as the MDI parent frame.
+
+    @library{wxcore}
+    @category{docview}
+
+    @see @ref overview_docview, wxDocManager
+*/
+class wxFileHistory : public wxObject
+{
+public:
+    /**
+        Constructor. Pass the maximum number of files that should be stored and
+        displayed.
+
+        @a idBase defaults to wxID_FILE1 and represents the id given to the
+        first history menu item. Since menu items can't share the same ID you
+        should change @a idBase (to one of your own defined IDs) when using
+        more than one wxFileHistory in your application.
+    */
+    wxFileHistory(size_t maxFiles = 9, wxWindowID idBase = wxID_FILE1);
+
+    /**
+        Destructor.
+    */
+    virtual ~wxFileHistory();
+
+    /**
+        Adds a file to the file history list, if the object has a pointer to an
+        appropriate file menu.
+    */
+    virtual void AddFileToHistory(const wxString& filename);
+
+    /**
+        Appends the files in the history list, to all menus managed by the file
+        history object.
+    */
+    virtual void AddFilesToMenu();
+    /**
+        Appends the files in the history list, to the given menu only.
+    */
+    virtual void AddFilesToMenu(wxMenu* menu);
+
+    /**
+        Returns the base identifier for the range used for appending items.
+    */
+    wxWindowID GetBaseId() const;
+
+    /**
+        Returns the number of files currently stored in the file history.
+    */
+    virtual size_t GetCount() const;
+
+    /**
+        Returns the file at this index (zero-based).
+    */
+    virtual wxString GetHistoryFile(size_t index) const;
+
+    /**
+        Returns the maximum number of files that can be stored.
+    */
+    virtual int GetMaxFiles() const;
+
+    /**
+        Returns the list of menus that are managed by this file history object.
+
+        @see UseMenu()
+    */
+    const wxList& GetMenus() const;
+
+    /**
+        Loads the file history from the given config object. This function
+        should be called explicitly by the application.
+
+        @see wxConfigBase
+    */
+    virtual void Load(const wxConfigBase& config);
+
+    /**
+        Removes the specified file from the history.
+    */
+    virtual void RemoveFileFromHistory(size_t i);
+
+    /**
+        Removes this menu from the list of those managed by this object.
+    */
+    virtual void RemoveMenu(wxMenu* menu);
+
+    /**
+        Saves the file history into the given config object. This must be
+        called explicitly by the application.
+
+        @see wxConfigBase
+    */
+    virtual void Save(wxConfigBase& config);
+
+    /**
+        Sets the base identifier for the range used for appending items.
+    */
+    void SetBaseId(wxWindowID baseId);
+
+    /**
+        Adds this menu to the list of those menus that are managed by this file
+        history object. Also see AddFilesToMenu() for initializing the menu
+        with filenames that are already in the history when this function is
+        called, as this is not done automatically.
+    */
+    virtual void UseMenu(wxMenu* menu);
+};
index 16aa2ae372da0270bba55349514958f2cbfb6a16..770c6fb9c2374c68be1100821a05124d976be1f4 100644 (file)
 
 #define wxUSE_ABOUTDLG 0
 
+#define wxUSE_FILE_HISTORY 0
+
 
 #define wxUSE_METAFILE              0
 #define wxUSE_ENH_METAFILE          0
index 635a2529bb8f31d9a5adcd3273df6ae7a0226bbe..64315afb6086bbeae868c9b5741ebd4f453e8eb0 100644 (file)
@@ -92,8 +92,6 @@ IMPLEMENT_CLASS(wxDocParentFrame, wxFrame)
     IMPLEMENT_DYNAMIC_CLASS(wxDocPrintout, wxPrintout)
 #endif
 
-IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject)
-
 // ============================================================================
 // implementation
 // ============================================================================
@@ -115,18 +113,6 @@ wxString FindExtension(const wxString& path)
     return ext.MakeLower();
 }
 
-// return the string used for the MRU list items in the menu
-//
-// NB: the index n is 0-based, as usual, but the strings start from 1
-wxString GetMRUEntryLabel(int n, const wxString& path)
-{
-    // we need to quote '&' characters which are used for mnemonics
-    wxString pathInMenu(path);
-    pathInMenu.Replace("&", "&&");
-
-    return wxString::Format("&%d %s", n + 1, pathInMenu);
-}
-
 } // anonymous namespace
 
 // ----------------------------------------------------------------------------
@@ -2073,203 +2059,6 @@ void wxDocPrintout::GetPageInfo(int *minPage, int *maxPage,
 
 #endif // wxUSE_PRINTING_ARCHITECTURE
 
-// ----------------------------------------------------------------------------
-// File history (a.k.a. MRU, most recently used, files list)
-// ----------------------------------------------------------------------------
-
-wxFileHistory::wxFileHistory(size_t maxFiles, wxWindowID idBase)
-{
-    m_fileMaxFiles = maxFiles;
-    m_idBase = idBase;
-}
-
-void wxFileHistory::AddFileToHistory(const wxString& file)
-{
-    // check if we don't already have this file
-    const wxFileName fnNew(file);
-    size_t i,
-           numFiles = m_fileHistory.size();
-    for ( i = 0; i < numFiles; i++ )
-    {
-        if ( fnNew == m_fileHistory[i] )
-        {
-            // we do have it, move it to the top of the history
-            RemoveFileFromHistory(i);
-            numFiles--;
-            break;
-        }
-    }
-
-    // if we already have a full history, delete the one at the end
-    if ( numFiles == m_fileMaxFiles )
-    {
-        RemoveFileFromHistory(--numFiles);
-    }
-
-    // add a new menu item to all file menus (they will be updated below)
-    for ( wxList::compatibility_iterator node = m_fileMenus.GetFirst();
-        node;
-        node = node->GetNext() )
-    {
-        wxMenu * const menu = (wxMenu *)node->GetData();
-
-        if ( !numFiles && menu->GetMenuItemCount() )
-            menu->AppendSeparator();
-
-        // label doesn't matter, it will be set below anyhow, but it can't
-        // be empty (this is supposed to indicate a stock item)
-        menu->Append(m_idBase + numFiles, " ");
-    }
-
-    // insert the new file in the beginning of the file history
-    m_fileHistory.insert(m_fileHistory.begin(), file);
-    numFiles++;
-
-    // update the labels in all menus
-    for ( i = 0; i < numFiles; i++ )
-    {
-        // if in same directory just show the filename; otherwise the full path
-        const wxFileName fnOld(m_fileHistory[i]);
-
-        wxString pathInMenu;
-        if ( fnOld.GetPath() == fnNew.GetPath() )
-        {
-            pathInMenu = fnOld.GetFullName();
-        }
-        else // file in different directory
-        {
-            // absolute path; could also set relative path
-            pathInMenu = m_fileHistory[i];
-        }
-
-        for ( wxList::compatibility_iterator node = m_fileMenus.GetFirst();
-              node;
-              node = node->GetNext() )
-        {
-            wxMenu * const menu = (wxMenu *)node->GetData();
-
-            menu->SetLabel(m_idBase + i, GetMRUEntryLabel(i, pathInMenu));
-        }
-    }
-}
-
-void wxFileHistory::RemoveFileFromHistory(size_t i)
-{
-    size_t numFiles = m_fileHistory.size();
-    wxCHECK_RET( i < numFiles,
-                 wxT("invalid index in wxFileHistory::RemoveFileFromHistory") );
-
-    // delete the element from the array
-    m_fileHistory.RemoveAt(i);
-    numFiles--;
-
-    for ( wxList::compatibility_iterator node = m_fileMenus.GetFirst();
-          node;
-          node = node->GetNext() )
-    {
-        wxMenu * const menu = (wxMenu *) node->GetData();
-
-        // shift filenames up
-        for ( size_t j = i; j < numFiles; j++ )
-        {
-            menu->SetLabel(m_idBase + j, GetMRUEntryLabel(j, m_fileHistory[j]));
-        }
-
-        // delete the last menu item which is unused now
-        const wxWindowID lastItemId = m_idBase + numFiles;
-        if ( menu->FindItem(lastItemId) )
-            menu->Delete(lastItemId);
-
-        // delete the last separator too if no more files are left
-        if ( m_fileHistory.empty() )
-        {
-            const wxMenuItemList::compatibility_iterator
-                nodeLast = menu->GetMenuItems().GetLast();
-            if ( nodeLast )
-            {
-                wxMenuItem * const lastMenuItem = nodeLast->GetData();
-                if ( lastMenuItem->IsSeparator() )
-                    menu->Delete(lastMenuItem);
-            }
-            //else: menu is empty somehow
-        }
-    }
-}
-
-void wxFileHistory::UseMenu(wxMenu *menu)
-{
-    if ( !m_fileMenus.Member(menu) )
-        m_fileMenus.Append(menu);
-}
-
-void wxFileHistory::RemoveMenu(wxMenu *menu)
-{
-    m_fileMenus.DeleteObject(menu);
-}
-
-#if wxUSE_CONFIG
-void wxFileHistory::Load(const wxConfigBase& config)
-{
-    m_fileHistory.Clear();
-
-    wxString buf;
-    buf.Printf(wxT("file%d"), 1);
-
-    wxString historyFile;
-    while ((m_fileHistory.GetCount() < m_fileMaxFiles) &&
-           config.Read(buf, &historyFile) && !historyFile.empty())
-    {
-        m_fileHistory.Add(historyFile);
-
-        buf.Printf(wxT("file%d"), (int)m_fileHistory.GetCount()+1);
-        historyFile = wxEmptyString;
-    }
-
-    AddFilesToMenu();
-}
-
-void wxFileHistory::Save(wxConfigBase& config)
-{
-    size_t i;
-    for (i = 0; i < m_fileMaxFiles; i++)
-    {
-        wxString buf;
-        buf.Printf(wxT("file%d"), (int)i+1);
-        if (i < m_fileHistory.GetCount())
-            config.Write(buf, wxString(m_fileHistory[i]));
-        else
-            config.Write(buf, wxEmptyString);
-    }
-}
-#endif // wxUSE_CONFIG
-
-void wxFileHistory::AddFilesToMenu()
-{
-    if ( m_fileHistory.empty() )
-        return;
-
-    for ( wxList::compatibility_iterator node = m_fileMenus.GetFirst();
-          node;
-          node = node->GetNext() )
-    {
-        AddFilesToMenu((wxMenu *) node->GetData());
-    }
-}
-
-void wxFileHistory::AddFilesToMenu(wxMenu* menu)
-{
-    if ( m_fileHistory.empty() )
-        return;
-
-    if ( menu->GetMenuItemCount() )
-        menu->AppendSeparator();
-
-    for ( size_t i = 0; i < m_fileHistory.GetCount(); i++ )
-    {
-        menu->Append(m_idBase + i, GetMRUEntryLabel(i, m_fileHistory[i]));
-    }
-}
-
 // ----------------------------------------------------------------------------
 // Permits compatibility with existing file formats and functions that
 // manipulate files directly
diff --git a/src/common/filehistorycmn.cpp b/src/common/filehistorycmn.cpp
new file mode 100644 (file)
index 0000000..59898ba
--- /dev/null
@@ -0,0 +1,258 @@
+/////////////////////////////////////////////////////////////////////////////
+// Name:        src/common/filehistorycmn.cpp
+// Purpose:     wxFileHistory class
+// Author:      Julian Smart, Vaclav Slavik, Vadim Zeitlin
+// Created:     2010-05-03
+// RCS-ID:      $Id$
+// Copyright:   (c) Julian Smart
+// Licence:     wxWindows licence
+/////////////////////////////////////////////////////////////////////////////
+
+// ============================================================================
+// declarations
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// headers
+// ----------------------------------------------------------------------------
+
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
+
+#ifdef __BORLANDC__
+    #pragma hdrstop
+#endif
+
+#include "wx/filehistory.h"
+
+#if wxUSE_FILE_HISTORY
+
+#include "wx/menu.h"
+#include "wx/confbase.h"
+#include "wx/filename.h"
+
+// ============================================================================
+// implementation
+// ============================================================================
+
+// ----------------------------------------------------------------------------
+// private helpers
+// ----------------------------------------------------------------------------
+
+namespace
+{
+
+// return the string used for the MRU list items in the menu
+//
+// NB: the index n is 0-based, as usual, but the strings start from 1
+wxString GetMRUEntryLabel(int n, const wxString& path)
+{
+    // we need to quote '&' characters which are used for mnemonics
+    wxString pathInMenu(path);
+    pathInMenu.Replace("&", "&&");
+
+    return wxString::Format("&%d %s", n + 1, pathInMenu);
+}
+
+} // anonymous namespace
+
+// ----------------------------------------------------------------------------
+// File history (a.k.a. MRU, most recently used, files list)
+// ----------------------------------------------------------------------------
+
+IMPLEMENT_DYNAMIC_CLASS(wxFileHistory, wxObject)
+
+wxFileHistory::wxFileHistory(size_t maxFiles, wxWindowID idBase)
+{
+    m_fileMaxFiles = maxFiles;
+    m_idBase = idBase;
+}
+
+void wxFileHistory::AddFileToHistory(const wxString& file)
+{
+    // check if we don't already have this file
+    const wxFileName fnNew(file);
+    size_t i,
+           numFiles = m_fileHistory.size();
+    for ( i = 0; i < numFiles; i++ )
+    {
+        if ( fnNew == m_fileHistory[i] )
+        {
+            // we do have it, move it to the top of the history
+            RemoveFileFromHistory(i);
+            numFiles--;
+            break;
+        }
+    }
+
+    // if we already have a full history, delete the one at the end
+    if ( numFiles == m_fileMaxFiles )
+    {
+        RemoveFileFromHistory(--numFiles);
+    }
+
+    // add a new menu item to all file menus (they will be updated below)
+    for ( wxList::compatibility_iterator node = m_fileMenus.GetFirst();
+        node;
+        node = node->GetNext() )
+    {
+        wxMenu * const menu = (wxMenu *)node->GetData();
+
+        if ( !numFiles && menu->GetMenuItemCount() )
+            menu->AppendSeparator();
+
+        // label doesn't matter, it will be set below anyhow, but it can't
+        // be empty (this is supposed to indicate a stock item)
+        menu->Append(m_idBase + numFiles, " ");
+    }
+
+    // insert the new file in the beginning of the file history
+    m_fileHistory.insert(m_fileHistory.begin(), file);
+    numFiles++;
+
+    // update the labels in all menus
+    for ( i = 0; i < numFiles; i++ )
+    {
+        // if in same directory just show the filename; otherwise the full path
+        const wxFileName fnOld(m_fileHistory[i]);
+
+        wxString pathInMenu;
+        if ( fnOld.GetPath() == fnNew.GetPath() )
+        {
+            pathInMenu = fnOld.GetFullName();
+        }
+        else // file in different directory
+        {
+            // absolute path; could also set relative path
+            pathInMenu = m_fileHistory[i];
+        }
+
+        for ( wxList::compatibility_iterator node = m_fileMenus.GetFirst();
+              node;
+              node = node->GetNext() )
+        {
+            wxMenu * const menu = (wxMenu *)node->GetData();
+
+            menu->SetLabel(m_idBase + i, GetMRUEntryLabel(i, pathInMenu));
+        }
+    }
+}
+
+void wxFileHistory::RemoveFileFromHistory(size_t i)
+{
+    size_t numFiles = m_fileHistory.size();
+    wxCHECK_RET( i < numFiles,
+                 wxT("invalid index in wxFileHistory::RemoveFileFromHistory") );
+
+    // delete the element from the array
+    m_fileHistory.RemoveAt(i);
+    numFiles--;
+
+    for ( wxList::compatibility_iterator node = m_fileMenus.GetFirst();
+          node;
+          node = node->GetNext() )
+    {
+        wxMenu * const menu = (wxMenu *) node->GetData();
+
+        // shift filenames up
+        for ( size_t j = i; j < numFiles; j++ )
+        {
+            menu->SetLabel(m_idBase + j, GetMRUEntryLabel(j, m_fileHistory[j]));
+        }
+
+        // delete the last menu item which is unused now
+        const wxWindowID lastItemId = m_idBase + numFiles;
+        if ( menu->FindItem(lastItemId) )
+            menu->Delete(lastItemId);
+
+        // delete the last separator too if no more files are left
+        if ( m_fileHistory.empty() )
+        {
+            const wxMenuItemList::compatibility_iterator
+                nodeLast = menu->GetMenuItems().GetLast();
+            if ( nodeLast )
+            {
+                wxMenuItem * const lastMenuItem = nodeLast->GetData();
+                if ( lastMenuItem->IsSeparator() )
+                    menu->Delete(lastMenuItem);
+            }
+            //else: menu is empty somehow
+        }
+    }
+}
+
+void wxFileHistory::UseMenu(wxMenu *menu)
+{
+    if ( !m_fileMenus.Member(menu) )
+        m_fileMenus.Append(menu);
+}
+
+void wxFileHistory::RemoveMenu(wxMenu *menu)
+{
+    m_fileMenus.DeleteObject(menu);
+}
+
+#if wxUSE_CONFIG
+void wxFileHistory::Load(const wxConfigBase& config)
+{
+    m_fileHistory.Clear();
+
+    wxString buf;
+    buf.Printf(wxT("file%d"), 1);
+
+    wxString historyFile;
+    while ((m_fileHistory.GetCount() < m_fileMaxFiles) &&
+           config.Read(buf, &historyFile) && !historyFile.empty())
+    {
+        m_fileHistory.Add(historyFile);
+
+        buf.Printf(wxT("file%d"), (int)m_fileHistory.GetCount()+1);
+        historyFile = wxEmptyString;
+    }
+
+    AddFilesToMenu();
+}
+
+void wxFileHistory::Save(wxConfigBase& config)
+{
+    size_t i;
+    for (i = 0; i < m_fileMaxFiles; i++)
+    {
+        wxString buf;
+        buf.Printf(wxT("file%d"), (int)i+1);
+        if (i < m_fileHistory.GetCount())
+            config.Write(buf, wxString(m_fileHistory[i]));
+        else
+            config.Write(buf, wxEmptyString);
+    }
+}
+#endif // wxUSE_CONFIG
+
+void wxFileHistory::AddFilesToMenu()
+{
+    if ( m_fileHistory.empty() )
+        return;
+
+    for ( wxList::compatibility_iterator node = m_fileMenus.GetFirst();
+          node;
+          node = node->GetNext() )
+    {
+        AddFilesToMenu((wxMenu *) node->GetData());
+    }
+}
+
+void wxFileHistory::AddFilesToMenu(wxMenu* menu)
+{
+    if ( m_fileHistory.empty() )
+        return;
+
+    if ( menu->GetMenuItemCount() )
+        menu->AppendSeparator();
+
+    for ( size_t i = 0; i < m_fileHistory.GetCount(); i++ )
+    {
+        menu->Append(m_idBase + i, GetMRUEntryLabel(i, m_fileHistory[i]));
+    }
+}
+
+#endif // wxUSE_FILE_HISTORY