Update of /cvsroot/audacity/audacity-src/src/widgets
In directory sc8-pr-cvs11.sourceforge.net:/tmp/cvs-serv8171
Modified Files:
TimeTextCtrl.cpp ASlider.cpp
Log Message:
Make compatible with wxWidgets 2.8.
Index: TimeTextCtrl.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/widgets/TimeTextCtrl.cpp,v
retrieving revision 1.45
retrieving revision 1.46
diff -u -d -r1.45 -r1.46
--- TimeTextCtrl.cpp 17 Sep 2006 17:46:27 -0000 1.45
+++ TimeTextCtrl.cpp 18 Nov 2006 07:17:19 -0000 1.46
@@ -166,6 +166,7 @@
#include <wx/sizer.h>
#include <wx/stattext.h>
#include <wx/tooltip.h>
+#include <wx/toplevel.h>
#define ID_MENU 9800
@@ -980,8 +981,8 @@
}
else if (keyCode == WXK_RETURN || keyCode == WXK_NUMPAD_ENTER) {
- wxWindow *parent = GetParent();
- wxWindow *def = parent->GetDefaultItem();
+ wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(this),
wxTopLevelWindow);
+ wxWindow *def = tlw->GetDefaultItem();
if (def && def->IsEnabled()) {
wxCommandEvent cevent(wxEVT_COMMAND_BUTTON_CLICKED,
def->GetId());
Index: ASlider.cpp
===================================================================
RCS file: /cvsroot/audacity/audacity-src/src/widgets/ASlider.cpp,v
retrieving revision 1.52
retrieving revision 1.53
diff -u -d -r1.52 -r1.53
--- ASlider.cpp 5 Nov 2006 07:41:53 -0000 1.52
+++ ASlider.cpp 18 Nov 2006 07:17:19 -0000 1.53
@@ -775,11 +775,12 @@
case WXK_RETURN:
case WXK_NUMPAD_ENTER:
{
- wxWindow *def = mParent->GetParent()->GetDefaultItem();
- if (def) {
+ wxTopLevelWindow *tlw = wxDynamicCast(wxGetTopLevelParent(mParent),
wxTopLevelWindow);
+ wxWindow *def = tlw->GetDefaultItem();
+ if (def && def->IsEnabled()) {
wxCommandEvent cevent(wxEVT_COMMAND_BUTTON_CLICKED,
def->GetId());
- mParent->ProcessEvent( cevent );
+ mParent->ProcessEvent(cevent);
}
}
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Audacity-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/audacity-cvs