]> git.saurik.com Git - wxWidgets.git/commitdiff
Applied docview patch
authorJulian Smart <julian@anthemion.co.uk>
Fri, 12 Apr 2002 13:15:44 +0000 (13:15 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 12 Apr 2002 13:15:44 +0000 (13:15 +0000)
Removed richedit sample compilation

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15112 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

distrib/msw/generic.rsp
distrib/msw/makefile.rsp
distrib/msw/vc.rsp
include/wx/docview.h
include/wx/menuitem.h
samples/makefile.b32
samples/makefile.dos
samples/makefile.g95
samples/makefile.vc
samples/samples.dsw
src/common/docview.cpp

index 6733ed6ffa136e77938bbd6d915a7333b54cf63d..6f0f70ccf093f1f89704872d7c834416d40ac957 100644 (file)
@@ -913,21 +913,6 @@ samples/resource/*.xpm
 samples/resource/*.ico
 samples/resource/*.pro
 
-samples/richedit/*.cpp
-samples/richedit/*.h
-samples/richedit/makefile*
-samples/richedit/*.rc
-samples/richedit/*.def
-samples/richedit/*.bmp
-samples/richedit/*.xpm
-samples/richedit/*.xbm
-samples/richedit/*.png
-samples/richedit/*.ico
-samples/richedit/*.txt
-samples/richedit/*.pro
-samples/richedit/TODO
-samples/richedit/README
-
 samples/rotate/*.cpp
 samples/rotate/*.h
 samples/rotate/makefile*
index c8e87e849c98e33962323b81251b1f2df8fb9a87..70d630299b36608c92810627131774019d32dcc6 100644 (file)
@@ -26,7 +26,6 @@ samples/help/Makefile.in
 samples/internat/Makefile.in
 samples/ipc/Makefile.in
 samples/png/Makefile.in
-samples/richedit/Makefile.in
 samples/resource/Makefile.in
 samples/sockets/Makefile.in
 samples/html/Makefile.in
index 56dc95544355c0fde78b304c7018b5747005fdf0..5ab98b753c80e24631cd87066cb9b14486b41cda 100644 (file)
@@ -182,9 +182,6 @@ samples/regtest/regtest.dsw
 samples/resource/resource.dsp
 samples/resource/resource.dsw
 
-samples/richedit/richedit.dsp
-samples/richedit/richedit.dsw
-
 samples/rotate/rotate.dsp
 samples/rotate/rotate.dsw
 
index 4cd975e70c9b469cece60505fc12841e0c0f915f..52f0c250484b63de382898fd0e5b1f91f0c4026a 100644 (file)
@@ -171,7 +171,7 @@ public:
     ~wxView();
 
     wxDocument *GetDocument() const { return m_viewDocument; }
-    void SetDocument(wxDocument *doc);
+    virtual void SetDocument(wxDocument *doc);
 
     wxString GetViewName() const { return m_viewTypeName; }
     void SetViewName(const wxString& name) { m_viewTypeName = name; };
index 59d6e3de901db44e1061ed911266cecc50a61e04..b8d23c5eddb5c074a0263962070fc9d0f8eceea1 100644 (file)
@@ -71,7 +71,7 @@ public:
     // what kind of menu item we are
     wxItemKind GetKind() const { return m_kind; }
 
-    virtual void SetCheckable(bool checkable) { m_kind = wxITEM_CHECK; }
+    virtual void SetCheckable(bool checkable) { m_kind = checkable ? wxITEM_CHECK : wxITEM_NORMAL; }
     bool IsCheckable() const
         { return m_kind == wxITEM_CHECK || m_kind == wxITEM_RADIO; }
 
index 7c4613cc8f44d309a70035c38ff293e6f851211d..de856f954ebc241e91363225b6ed17e62001ea70 100644 (file)
@@ -129,10 +129,6 @@ all:
         make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
         cd $(WXDIR)\samples\resource
         make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
-!if "$(COMPIL)"==""
-        cd $(WXDIR)\samples\richedit
-        make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
-!endif
         cd $(WXDIR)\samples\rotate
         make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
         cd $(WXDIR)\samples\sashtest
@@ -167,8 +163,6 @@ all:
         make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
         cd $(WXDIR)\samples\exec
         make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
-        cd $(WXDIR)\samples\richedit
-        make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
         cd $(WXDIR)\samples\statbar
         make -f makefile.b32 FINAL=$(FINAL) WXUSINGDLL=$(WXUSINGDLL)
         cd $(WXDIR)\samples\sockets
@@ -269,8 +263,6 @@ clean:
         make -f makefile.b32 clean
         cd $(WXDIR)\samples\resource
         make -f makefile.b32 clean
-        cd $(WXDIR)\samples\richedit
-        make -f makefile.b32 clean
         cd $(WXDIR)\samples\rotate
         make -f makefile.b32 clean
         cd $(WXDIR)\samples\sashtest
@@ -309,8 +301,6 @@ clean:
         make -f makefile.b32 clean
         cd $(WXDIR)\samples\statbar
         make -f makefile.b32 clean
-        cd $(WXDIR)\samples\richedit
-        make -f makefile.b32 clean
         cd $(WXDIR)\samples\propsize
         make -f makefile.b32 clean
         cd $(WXDIR)\samples\sockets
index 6644d393002a7f5debb2e12cca33e7fb0ec62e1e..4d51c78f8c515997d89c5f40d672faeb21e165cb 100644 (file)
@@ -125,8 +125,6 @@ all:
         cd $(WXDIR)\samples\resource
         nmake -f makefile.dos FINAL=$(FINAL)
 !if "$(NOMAKE)"==""
-        cd $(WXDIR)\samples\richedit
-        nmake -f makefile.dos FINAL=$(FINAL)
         cd $(WXDIR)\samples\sashtest
         nmake -f makefile.dos FINAL=$(FINAL)
 !endif
@@ -250,8 +248,6 @@ clean:
         cd $(WXDIR)\samples\resource
         nmake -f makefile.dos clean
 !if "$(NOMAKE)"==""
-        cd $(WXDIR)\samples\richedit
-        nmake -f makefile.dos clean
         cd $(WXDIR)\samples\sashtest
         nmake -f makefile.dos clean
 !endif
index 55f17bb06d74aa565f124cda1d756a6efb2d7687..8bd8c65b774a3caddb989caf630bb890759dd451 100644 (file)
@@ -69,7 +69,6 @@ all clean:
        -$(MAKE) -C propsize $(CMDLINE) $@
        -$(MAKE) -C regtest $(CMDLINE) $@
        -$(MAKE) -C resource $(CMDLINE) $@
-       -$(MAKE) -C richedit $(CMDLINE) $@
        -$(MAKE) -C rotate $(CMDLINE) $@
        -$(MAKE) -C sashtest $(CMDLINE) $@
        -$(MAKE) -C scroll $(CMDLINE) $@
index 39a5b243fe33eb930e050c3f6b353085e0f17859..ba8f85ced522c053e9ed8cb49a965cb0d9f1ae18 100644 (file)
@@ -126,10 +126,6 @@ all:
         nmake -f makefile.vc $(MAKEFLAGS)
         cd $(WXDIR)\samples\resource
         nmake -f makefile.vc $(MAKEFLAGS)
-!if "$(COMPIL)"==""
-        cd $(WXDIR)\samples\richedit
-        nmake -f makefile.vc $(MAKEFLAGS)
-!endif
         cd $(WXDIR)\samples\rotate
         nmake -f makefile.vc $(MAKEFLAGS)
         cd $(WXDIR)\samples\sashtest
@@ -246,8 +242,6 @@ clean:
         nmake -f makefile.vc clean
         cd $(WXDIR)\samples\resource
         nmake -f makefile.vc clean
-        cd $(WXDIR)\samples\richedit
-        nmake -f makefile.vc clean
         cd $(WXDIR)\samples\rotate
         nmake -f makefile.vc clean
         cd $(WXDIR)\samples\sashtest
index 88a2c4219d8a253ac6bee8e8f4da8c2119f0b90a..db1ce4aff31c40e477d42c73da1f4d6ec3beedf6 100644 (file)
@@ -675,18 +675,6 @@ Package=<4>
 
 ###############################################################################
 
-Project: "richedit"=.\richedit\richedit.dsp - Package Owner=<4>
-
-Package=<5>
-{{{
-}}}
-
-Package=<4>
-{{{
-}}}
-
-###############################################################################
-
 Project: "rotate"=.\rotate\rotate.dsp - Package Owner=<4>
 
 Package=<5>
index 2cdab5312d3682c4c446c46d189cd2b4313ad574..c368a8ee522ce5b1a8c6f9226d818122ab010a97 100644 (file)
@@ -594,7 +594,7 @@ bool wxView::Close(bool deleteWindow)
 
 void wxView::Activate(bool activate)
 {
-    if (GetDocumentManager())
+    if (GetDocument() && GetDocumentManager())
     {
         OnActivateView(activate, this, GetDocumentManager()->GetCurrentView());
         GetDocumentManager()->ActivateView(this, activate);
@@ -1462,13 +1462,26 @@ wxDocTemplate *wxDocManager::SelectDocumentType(wxDocTemplate **templates,
     wxDocTemplate **data = new wxDocTemplate *[noTemplates];
     int i;
     int n = 0;
+        
        for (i = 0; i < noTemplates; i++)
        {
                if (templates[i]->IsVisible())
                {
-                       strings.Add(templates[i]->m_description);
-                       if (!sort)
+               int j;
+            bool want = TRUE;
+                       for (j = 0; j < n; j++)
+                       {
+                //filter out NOT unique documents + view combinations
+                               if ( templates[i]->m_docTypeName == data[j]->m_docTypeName &&
+                     templates[i]->m_viewTypeName == data[j]->m_viewTypeName
+                   )
+                    want = FALSE;
+                       }
+
+            if ( want )
                        {
+                       strings.Add(templates[i]->m_description);
+
                                data[n] = templates[i];
                                n ++;
                        }
@@ -1529,14 +1542,24 @@ wxDocTemplate *wxDocManager::SelectViewType(wxDocTemplate **templates,
     wxDocTemplate **data = new wxDocTemplate *[noTemplates];
     int i;
     int n = 0;
+        
     for (i = 0; i < noTemplates; i++)
     {
         wxDocTemplate *templ = templates[i];
         if ( templ->IsVisible() && !templ->GetViewName().empty() )
         {
-            strings.Add(templ->m_viewTypeName);
-                       if (!sort)
+               int j;
+            bool want = TRUE;
+                       for (j = 0; j < n; j++)
                        {
+                //filter out NOT unique views
+                               if ( templates[i]->m_viewTypeName == data[j]->m_viewTypeName )
+                    want = FALSE;
+                       }
+
+            if ( want )
+            {
+                       strings.Add(templ->m_viewTypeName);
                                data[n] = templ;
                                n ++;
                        }