commit -- AF clean-up patch


Subject: commit -- AF clean-up patch
From: Paul Rohr (paul@abisource.com)
Date: Wed Mar 01 2000 - 18:21:55 CST


Move some redundant XAP toolbar / mouse / keyboard stuff from platform to XP
code, courtesy of Aaron Lehmann <aaronl@vitelus.com>.

  M src/af/ev/beos/ev_BeOSToolbar.h
  M src/af/ev/mac/ev_MacToolbar.h
  M src/af/ev/qnx/ev_QNXToolbar.h
  M src/af/ev/unix/ev_UnixToolbar.h
  M src/af/ev/unix/gnome/ev_UnixGnomeToolbar.h
  M src/af/ev/win/ev_Win32Toolbar.h
  M src/af/ev/xp/ev_Toolbar.h
  M src/af/xap/beos/xap_BeOSFrame.cpp
  M src/af/xap/beos/xap_BeOSFrame.h
  M src/af/xap/qnx/xap_QNXFrame.cpp
  M src/af/xap/qnx/xap_QNXFrame.h
  M src/af/xap/unix/xap_UnixDlg_FontChooser.cpp
  M src/af/xap/unix/xap_UnixFrame.cpp
  M src/af/xap/unix/xap_UnixFrame.h
  M src/af/xap/unix/gnome/xap_UnixGnomeFrame.cpp
  M src/af/xap/unix/gnome/xap_UnixGnomeFrame.h
  M src/af/xap/win/xap_Win32Frame.cpp
  M src/af/xap/win/xap_Win32Frame.h
  M src/af/xap/xp/xap_Frame.cpp
  M src/af/xap/xp/xap_Frame.h
  M src/wp/ap/beos/ap_BeOSFrame.cpp
  M src/wp/ap/qnx/ap_QNXFrame.cpp
  M src/wp/ap/unix/ap_UnixFrame.cpp
  M src/wp/ap/win/ap_Win32Frame.cpp

At 09:07 AM 3/1/00 +0000, Aaron Lehmann wrote:
>Here's my first attempt at moving some code up in the class heirarchy. I
>moved the toolbar creation code to XAP_Frame - the code was being
>duplicated in all platform-specific subclasses. If this is commited, it
>should make toolbar-toggling a lot easier becuase it can all be done in
>XP. I also moved the m_p*Mouse and m_p*Keyboard into two single variables
>in the XAP_Frame rather than having them be declared seperately for each
>platform in their classes. I have made the changes to all platforms, but
>it has only been tested on Unix w/o gnome, and it seems to work.

This was a reasonably clean patch, so I went ahead and made the following
changes and committed it:

  - fixed misc. build breakage on non-Unix platforms (YMMV)
  - new protected methods have conventional underscore prefix
  - passed _newToolbar() args as const to match constructor
  - casts now use static_cast<> convention instead (except QNX)

>Thanks for this fun oportunity to work with a framework, and if you like
>this patch I'd be interested in cleaning up other stuff in the af
>framework.

Definitely. Go for it. :-)

Paul



This archive was generated by hypermail 2b25 : Wed Mar 01 2000 - 18:16:31 CST