]> git.saurik.com Git - wxWidgets.git/commitdiff
Removed duplicate code
authorJulian Smart <julian@anthemion.co.uk>
Fri, 24 Jul 1998 20:46:39 +0000 (20:46 +0000)
committerJulian Smart <julian@anthemion.co.uk>
Fri, 24 Jul 1998 20:46:39 +0000 (20:46 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@368 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/msw/frame.cpp
src/msw/makefile.b32
src/msw/makefile.dos
src/msw/makefile.g95
src/msw/makefile.nt
src/msw/window.cpp

index a4c8b0b9021861f92fbabb96efc44fb094520fac..090d681caca870bb9b3e14f49e6ebbe79e3aad17 100644 (file)
@@ -907,52 +907,3 @@ void wxFrame::ProcessCommand(int id)
   GetEventHandler()->ProcessEvent(commandEvent);
 }
 
-void wxFrame::OnIdle(wxIdleEvent& event)
-{
-  DoMenuUpdates();
-}
-
-// Query app for menu item updates (called from OnIdle)
-void wxFrame::DoMenuUpdates(void)
-{
-  wxMenuBar* bar = GetMenuBar();
-  if (!bar)
-    return;
-
-  int i;
-  for (i = 0; i < bar->m_menuCount; i++)
-  {
-    wxMenu* menu = bar->m_menus[i];
-
-    DoMenuUpdates(menu);
-  }
-}
-
-void wxFrame::DoMenuUpdates(wxMenu* menu)
-{
-  wxNode* node = menu->m_menuItems.First();
-  while (node)
-  {
-    wxMenuItem* item = (wxMenuItem*) node->Data();
-    if ( !item->IsSeparator() )
-    {
-        wxWindowID id = item->GetId();
-      wxUpdateUIEvent event(id);
-      event.SetEventObject( this );
-
-      if (GetEventHandler()->ProcessEvent(event))
-      {
-        if (event.GetSetText())
-          menu->SetLabel(id, event.GetText());
-        if (event.GetSetChecked())
-          menu->Check(id, event.GetChecked());
-        if (event.GetSetEnabled())
-          menu->Enable(id, event.GetEnabled());
-      }
-
-      if (item->GetSubMenu())
-        DoMenuUpdates(item->GetSubMenu());
-    }
-    node = node->Next();
-  }
-}
index 8713bf3ac26e943d92b5d607d899f31125b238e9..a782abf2d2e335f32e629e85e6f9eff6f46505a3 100644 (file)
@@ -78,6 +78,7 @@ COMMONOBJS = \
   $(MSWDIR)\file.obj \
   $(MSWDIR)\fileconf.obj \
   $(MSWDIR)\filefn.obj \
+  $(MSWDIR)\framecmn.obj \
   $(MSWDIR)\gdicmn.obj \
   $(MSWDIR)\helpbase.obj \
   $(MSWDIR)\intl.obj \
@@ -110,7 +111,8 @@ COMMONOBJS = \
   $(MSWDIR)\mstream.obj \
   $(MSWDIR)\zstream.obj \
   $(MSWDIR)\datstrm.obj \
-  $(MSWDIR)\extended.obj
+  $(MSWDIR)\extended.obj \
+  $(MSWDIR)\wincmn.obj
 
 #  $(MSWDIR)\matrix.obj \
 
@@ -416,6 +418,8 @@ $(MSWDIR)\fileconf.obj:     $(COMMDIR)\fileconf.$(SRCSUFF)
 
 $(MSWDIR)\filefn.obj:     $(COMMDIR)\filefn.$(SRCSUFF)
 
+$(MSWDIR)\framecmn.obj:     $(COMMDIR)\framecmn.$(SRCSUFF)
+
 $(MSWDIR)\gdicmn.obj:     $(COMMDIR)\gdicmn.$(SRCSUFF)
 
 $(MSWDIR)\intl.obj:     $(COMMDIR)\intl.$(SRCSUFF)
@@ -480,6 +484,8 @@ $(MSWDIR)\fstream.obj:      $(COMMDIR)\fstream.$(SRCSUFF)
 
 $(MSWDIR)\stream.obj:  $(COMMDIR)\stream.$(SRCSUFF)
 
+$(MSWDIR)\wincmn.obj:  $(COMMDIR)\wincmn.$(SRCSUFF)
+
 $(MSWDIR)\extended.obj:        $(COMMDIR)\extended.c
 
 ########################################################
index 4ce5637491ddedcb0005c91559d2d4ce4395129c..756daa6c5a2ea61e6f367586c8b36b554ef29776 100644 (file)
@@ -78,6 +78,8 @@ COMMONOBJS = \
   $(COMMDIR)\event.obj \
   $(COMMDIR)\file.obj \
   $(COMMDIR)\filefn.obj \
+  $(COMMDIR)\fileconf.obj \
+  $(COMMDIR)\framecmn.obj \
   $(COMMDIR)\gdicmn.obj \
   $(COMMDIR)\intl.obj \
   $(COMMDIR)\helpbase.obj \
@@ -111,10 +113,8 @@ COMMONOBJS = \
   $(COMMDIR)\mstream.obj \
   $(COMMDIR)\zstream.obj \
   $(COMMDIR)\datstrm.obj \
-  $(COMMDIR)\extended.obj
-
-# Nested classes: won't comple
-#  $(COMMDIR)\fileconf.obj \
+  $(COMMDIR)\extended.obj \
+  $(COMMDIR)\wincmn.obj
 
 MSWOBJS = \
   $(MSWDIR)\app.obj \
@@ -674,6 +674,11 @@ $(COMMDIR)/filefn.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
 <<
 
+$(COMMDIR)/framecmn.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(COMMDIR)/gdicmn.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
@@ -834,6 +839,11 @@ $(COMMDIR)/extended.obj:     $*.c
 $(CPPFLAGS2) /Fo$@ /c /Tp $*.c
 <<
 
+$(COMMDIR)/wincmn.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /Fo$@ /c /Tp $*.$(SRCSUFF)
+<<
+
 $(COMMDIR)/y_tab.obj:     $*.c $(COMMDIR)/lex_yy.c
         cl @<<
 $(CPPFLAGS2) -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@ /I ..\common /c $*.c
index a133fe6a95d792719571d539d16e65fc40a7e732..1e53c8cfb319b304075c22ae7b1b5919a1d1501d 100644 (file)
@@ -84,6 +84,7 @@ COMMONOBJS = \
   $(COMMDIR)/file.$(OBJSUFF) \
   $(COMMDIR)/fileconf.$(OBJSUFF) \
   $(COMMDIR)/filefn.$(OBJSUFF) \
+  $(COMMDIR)/framecmn.$(OBJSUFF) \
   $(COMMDIR)/gdicmn.$(OBJSUFF) \
   $(COMMDIR)/helpbase.$(OBJSUFF) \
   $(COMMDIR)/intl.$(OBJSUFF) \
@@ -116,7 +117,8 @@ COMMONOBJS = \
   $(COMMDIR)/mstream.$(OBJSUFF) \
   $(COMMDIR)/zstream.$(OBJSUFF) \
   $(COMMDIR)/datstrm.$(OBJSUFF) \
-  $(COMMDIR)/extended.$(OBJSUFF)
+  $(COMMDIR)/extended.$(OBJSUFF) \
+  $(COMMDIR)/wincmn.$(OBJSUFF)
 
 MSWOBJS = \
   app.$(OBJSUFF) \
index fc72bd0aba3471dc590399bfd197eb49a26fb53c..fec3ce4ca101a4f33dc0e79c0a9921c50108b915 100644 (file)
@@ -71,8 +71,6 @@ GENERICOBJS= \
   $(GENDIR)\tabg.obj \
   $(GENDIR)\textdlgg.obj
 
-#  $(COMMDIR)\fileconf.obj \
-
 COMMONOBJS = \
   $(COMMDIR)\cmndata.obj \
   $(COMMDIR)\config.obj \
@@ -81,6 +79,8 @@ COMMONOBJS = \
   $(COMMDIR)\event.obj \
   $(COMMDIR)\file.obj \
   $(COMMDIR)\filefn.obj \
+  $(COMMDIR)\fileconf.obj \
+  $(COMMDIR)\framecmn.obj \
   $(COMMDIR)\gdicmn.obj \
   $(COMMDIR)\intl.obj \
   $(COMMDIR)\ipcbase.obj \
@@ -114,7 +114,9 @@ COMMONOBJS = \
   $(COMMDIR)\mstream.obj \
   $(COMMDIR)\zstream.obj \
   $(COMMDIR)\stream.obj \
-  $(COMMDIR)\datstrm.obj
+  $(COMMDIR)\wincmn.obj
+
+#  $(COMMDIR)\datstrm.obj
 
 MSWOBJS = \
   $(MSWDIR)\app.obj \
@@ -750,6 +752,11 @@ $(COMMDIR)/filefn.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
 <<
 
+$(COMMDIR)/framecmn.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
+<<
+
 $(COMMDIR)/gdicmn.obj:     $*.$(SRCSUFF)
         cl @<<
 $(CPPFLAGS) /c /Tp $*.$(SRCSUFF) /Fo$@
@@ -931,6 +938,11 @@ $(COMMDIR)/process.obj:     $*.$(SRCSUFF)
 $(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) /Fo$@
 <<
 
+$(COMMDIR)/wincmn.obj:     $*.$(SRCSUFF)
+        cl @<<
+$(CPPFLAGS2) /c /Tp $*.$(SRCSUFF) /Fo$@
+<<
+
 $(COMMDIR)/y_tab.obj:     $*.c $(COMMDIR)/lex_yy.c
         cl @<<
 $(CPPFLAGS2) /c $*.c -DUSE_DEFINE -DYY_USE_PROTOS /Fo$@
index ce22737cb54c186b025b1fd91e537e1c7e42118b..38fb38c0ef4359ca77c7a67b06c2b839c4bffec4 100644 (file)
@@ -4430,44 +4430,6 @@ void wxWindow::SetupColours(void)
                SetBackgroundColour(GetParent()->GetBackgroundColour());
 }
 
-// Do Update UI processing for child controls
-
-// TODO: should this be implemented for the child window rather
-// than the parent? Then you can override it e.g. for wxCheckBox
-// to do the Right Thing rather than having to assume a fixed number
-// of control classes.
-
-void wxWindow::UpdateWindowUI(void)
-{
-               wxWindowID id = GetId();
-               if (id > 0)
-               {
-                       wxUpdateUIEvent event(id);
-                       event.m_eventObject = this;
-
-                       if (this->GetEventHandler()->ProcessEvent(event))
-                       {
-                               if (event.GetSetEnabled())
-                                       this->Enable(event.GetEnabled());
-
-                               if (event.GetSetText() && this->IsKindOf(CLASSINFO(wxControl)))
-                                       ((wxControl*)this)->SetLabel(event.GetText());
-
-                               if (this->IsKindOf(CLASSINFO(wxCheckBox)))
-                               {
-                                       if (event.GetSetChecked())
-                                               ((wxCheckBox *) this)->SetValue(event.GetChecked());
-                               }
-                               else if (this->IsKindOf(CLASSINFO(wxRadioButton)))
-                               {
-                                       if (event.GetSetChecked())
-                                               ((wxRadioButton *) this)->SetValue(event.GetChecked());
-                               }
-                       }
-               }
-
-}
-
 void wxWindow::OnIdle(wxIdleEvent& event)
 {
     // Check if we need to send a LEAVE event