Update of /cvsroot/mahogany/M/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8814/src/gui
Modified Files:
wxComposeView.cpp
Log Message:
don't allow tabbing to the bitmap buttons as they get in the way of switching
between text controls
Index: wxComposeView.cpp
===================================================================
RCS file: /cvsroot/mahogany/M/src/gui/wxComposeView.cpp,v
retrieving revision 1.382
retrieving revision 1.383
diff -b -u -2 -r1.382 -r1.383
--- wxComposeView.cpp 27 Feb 2005 01:13:06 -0000 1.382
+++ wxComposeView.cpp 17 Mar 2005 21:37:20 -0000 1.383
@@ -448,17 +448,33 @@
// ----------------------------------------------------------------------------
-// wxIsReplyButton: button indicating whether this is a reply
+// IconButton: class used for small buttons in the header
// ----------------------------------------------------------------------------
-class wxIsReplyButton : public wxBitmapButton
+class IconButton : public wxBitmapButton
{
public:
- wxIsReplyButton(wxComposeView *composer, wxWindow *parent)
+ IconButton(wxWindow *parent, wxBitmap bmp)
: wxBitmapButton(parent,
wxID_ANY,
- wxNullBitmap,
+ bmp,
wxDefaultPosition,
wxDefaultSize,
- wxBORDER_NONE),
+ wxBORDER_NONE)
+ {
+ }
+
+ // we don't want to get in the way when tabbing through header fields
+ virtual bool AcceptsFocusFromKeyboard() const { return false; }
+};
+
+// ----------------------------------------------------------------------------
+// wxIsReplyButton: button indicating whether this is a reply
+// ----------------------------------------------------------------------------
+
+class wxIsReplyButton : public IconButton
+{
+public:
+ wxIsReplyButton(wxComposeView *composer, wxWindow *parent)
+ : IconButton(parent, wxNullBitmap),
m_composer(composer)
{
@@ -589,14 +605,9 @@
// ----------------------------------------------------------------------------
-class wxRcptExpandButton : public wxBitmapButton
+class wxRcptExpandButton : public IconButton
{
public:
wxRcptExpandButton(wxRcptControl *rcptControl, wxWindow *parent)
- : wxBitmapButton(parent,
- -1,
- GetTransparentBitmap(_T("tb_lookup")),
- wxDefaultPosition,
- wxDefaultSize,
- wxBORDER_NONE)
+ : IconButton(parent, GetTransparentBitmap(_T("tb_lookup")))
{
m_rcptControl = rcptControl;
@@ -618,14 +629,9 @@
// ----------------------------------------------------------------------------
-class wxRcptAddButton : public wxBitmapButton
+class wxRcptAddButton : public IconButton
{
public:
wxRcptAddButton(wxRcptMainControl *rcptControl, wxWindow *parent)
- : wxBitmapButton(parent,
- -1,
- GetTransparentBitmap(_T("tb_new")),
- wxDefaultPosition,
- wxDefaultSize,
- wxBORDER_NONE)
+ : IconButton(parent, GetTransparentBitmap(_T("tb_new")))
{
m_rcptControl = rcptControl;
@@ -652,14 +658,9 @@
// ----------------------------------------------------------------------------
-class wxRcptRemoveButton : public wxBitmapButton
+class wxRcptRemoveButton : public IconButton
{
public:
wxRcptRemoveButton(wxRcptExtraControl *rcptControl, wxWindow *parent)
- : wxBitmapButton(parent,
- -1,
- GetTransparentBitmap(_T("tb_trash")),
- wxDefaultPosition,
- wxDefaultSize,
- wxBORDER_NONE)
+ : IconButton(parent, GetTransparentBitmap(_T("tb_trash")))
{
m_rcptControl = rcptControl;
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
Mahogany-cvsupdates mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mahogany-cvsupdates