]> git.pld-linux.org Git - packages/audacity.git/commitdiff
- partial port to wxwidgets 3.0
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 15 Jan 2014 19:47:13 +0000 (20:47 +0100)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Wed, 15 Jan 2014 19:47:13 +0000 (20:47 +0100)
audacity-wx.patch [new file with mode: 0644]
audacity.spec

diff --git a/audacity-wx.patch b/audacity-wx.patch
new file mode 100644 (file)
index 0000000..7e78027
--- /dev/null
@@ -0,0 +1,264 @@
+--- audacity-src-2.0.5/configure.in~   2013-10-19 09:31:48.000000000 +0200
++++ audacity-src-2.0.5/configure.in    2014-01-15 14:33:23.736199148 +0100
+@@ -294,7 +294,7 @@
+ AC_MSG_NOTICE([Checking that the chosen version of wxWidgets is 2.8.x])
+ case "${wx_version}" in
+-  2.8.*)
++  2.8.*|3.0.*)
+     echo "Great, you're using wxWidgets ${wx_version}!"
+     ;;
+   *)
+--- audacity-src-2.0.5/lib-src/lib-widget-extra/configure.in~  2013-10-19 09:31:34.000000000 +0200
++++ audacity-src-2.0.5/lib-src/lib-widget-extra/configure.in   2014-01-15 14:35:09.519583138 +0100
+@@ -142,7 +142,7 @@
+ AC_MSG_NOTICE([Checking that the chosen version of wxWidgets is 2.8.x])
+ case "${wx_version}" in
+-  2.8.*)
++  2.8.*|3.0.*)
+     echo "Great, you're using wxWidgets ${wx_version}!"
+     ;;
+   *)
+--- audacity-src-2.0.5/lib-src/FileDialog/FileDialog.h~        2013-10-19 09:31:33.000000000 +0200
++++ audacity-src-2.0.5/lib-src/FileDialog/FileDialog.h 2014-01-15 14:48:35.805376488 +0100
+@@ -55,11 +55,11 @@
+ //----------------------------------------------------------------------------
+ wxString 
+-FileSelector(const wxChar *message = wxFileSelectorPromptStr,
++FileSelector(const wxChar *message = (wxChar *)wxFileSelectorPromptStr,
+              const wxChar *default_path = NULL,
+              const wxChar *default_filename = NULL,
+              const wxChar *default_extension = NULL,
+-             const wxChar *wildcard = wxFileSelectorDefaultWildcardStr,
++             const wxChar *wildcard = (wxChar *)wxFileSelectorDefaultWildcardStr,
+              int flags = 0,
+              wxWindow *parent = NULL,
+              wxString label = wxEmptyString,
+--- audacity-src-2.0.5/lib-src/FileDialog/gtk/FileDialogPrivate.cpp    2014-01-15 18:42:47.255235243 +0100
++++ audacity-src-2.0.5/lib-src/FileDialog/gtk/FileDialogPrivate.cpp.org        2014-01-15 18:42:42.785091188 +0100
+@@ -18,13 +18,17 @@
+ #include "../FileDialog.h"
+-#if defined(__WXGTK24__) && (!defined(__WXGPE__))
++
++
++
++#if 1
+ #include <gtk/gtk.h>
+ #include "private.h"
+ #include <unistd.h> // chdir
++#include "wx/defs.h"
+ #include "wx/intl.h"
+ #include "wx/filename.h" // wxFilename
+ #include "wx/tokenzr.h" // wxStringTokenizer
+@@ -299,7 +303,7 @@
+          EndModal(wxID_OK);
+    } else
+ #endif
+-      wxGenericFileDialog::OnListOk( event );
++      wxGenericFileDialog::OnOk( event );
+ }
+ int FileDialog::ShowModal()
+--- audacity-src-2.0.5/src/Sequence.cpp.org    2014-01-15 18:46:25.845608473 +0100
++++ audacity-src-2.0.5/src/Sequence.cpp        2014-01-15 18:54:18.464160530 +0100
+@@ -1034,8 +1034,8 @@
+                _("Sequence has block file with length %s > mMaxSamples %s.\nTruncating to mMaxSamples."), 
+                Internat::ToString(((wxLongLong)(bb->f->GetLength())).ToDouble(), 0).c_str(), 
+                Internat::ToString(((wxLongLong)mMaxSamples).ToDouble(), 0).c_str());
+-         ::wxMessageBox(sMsg, _("Warning - Length in Writing Sequence"), wxICON_EXCLAMATION | wxOK);
+-         ::wxLogWarning(sMsg);
++         wxMessageBox(sMsg, _("Warning - Length in Writing Sequence"), wxICON_EXCLAMATION | wxOK);
++         wxLogWarning(sMsg);
+          bb->f->SetLength(mMaxSamples);
+       }
+--- audacity-src-2.0.5/src/AudacityApp.cpp.org 2014-01-15 18:55:56.667324154 +0100
++++ audacity-src-2.0.5/src/AudacityApp.cpp     2014-01-15 19:35:30.704368875 +0100
+@@ -1324,7 +1324,7 @@
+          }
+          if (option < argc - 1 &&
+-             argv[option + 1] &&
++             !argv[option + 1].IsEmpty() &&
+              !wxString(wxT("-blocksize")).CmpNoCase(argv[option])) {
+             long theBlockSize;
+             if (wxString(argv[option + 1]).ToLong(&theBlockSize)) {
+--- audacity-src-2.0.5/src/AudioIO.cpp~        2013-10-19 09:31:48.000000000 +0200
++++ audacity-src-2.0.5/src/AudioIO.cpp 2014-01-15 19:36:45.000091144 +0100
+@@ -561,7 +561,7 @@
+       wxString errStr = _("Could not find any audio devices.\n");
+       errStr += _("You will not be able to play or record audio.\n\n");
+       wxString paErrStr = LAT1CTOWX(Pa_GetErrorText(err));
+-      if (paErrStr)
++      if (!paErrStr.IsEmpty())
+          errStr += _("Error: ")+paErrStr;
+       // XXX: we are in libaudacity, popping up dialogs not allowed!  A
+       // long-term solution will probably involve exceptions
+--- audacity-src-2.0.5/src/CaptureEvents.cpp~  2013-10-19 09:31:48.000000000 +0200
++++ audacity-src-2.0.5/src/CaptureEvents.cpp   2014-01-15 19:45:04.053070193 +0100
+@@ -76,8 +76,6 @@
+    // temporarily replace the global GDK event handler with our function
+    gdk_event_handler_set((GdkEventFunc)main_do_event, &queue, NULL);
+-   // temporarily suspend idle callbacks
+-   wxTheApp->SuspendIdleCallback();
+ }
+ CaptureEvents::~CaptureEvents()
+--- audacity-src-2.0.5/src/CaptureEvents.cpp~  2014-01-15 19:45:04.000000000 +0100
++++ audacity-src-2.0.5/src/CaptureEvents.cpp   2014-01-15 19:45:45.754464727 +0100
+@@ -59,9 +59,6 @@
+       break;
+    }
+-   // don't allow idle callbacks while we're active
+-   wxTheApp->SuspendIdleCallback();
+-
+    return;
+ }
+--- audacity-src-2.0.5/src/LyricsWindow.cpp~   2013-10-19 09:31:49.000000000 +0200
++++ audacity-src-2.0.5/src/LyricsWindow.cpp    2014-01-15 19:51:24.312324357 +0100
+@@ -72,7 +72,7 @@
+       #else
+          wxIcon ic(wxICON(AudacityLogo48x48));
+       #endif
+-      SetIcon(ic);
++      SetIcon((const wxIcon&)ic);
+    #endif
+    wxPoint panelPos(0, 0);
+--- audacity-src-2.0.5/src/Menus.cpp~  2013-10-19 09:31:48.000000000 +0200
++++ audacity-src-2.0.5/src/Menus.cpp   2014-01-15 19:55:08.146305162 +0100
+@@ -2403,7 +2403,7 @@
+    //       The workaround is to queue a context menu event, allowing the key press
+    //       event to complete.
+    wxContextMenuEvent e(wxEVT_CONTEXT_MENU, GetId());
+-   mTrackPanel->AddPendingEvent(e);
++   mTrackPanel->GetEventHandler()->AddPendingEvent(e);
+ }
+ void AudacityProject::OnTrackMute()
+--- audacity-src-2.0.5/src/MixerBoard.cpp.org  2014-01-15 19:56:40.262635794 +0100
++++ audacity-src-2.0.5/src/MixerBoard.cpp      2014-01-15 19:56:59.606597792 +0100
+@@ -1727,7 +1727,7 @@
+       #else
+          wxIcon ic(wxICON(AudacityLogo48x48));
+       #endif
+-      SetIcon(ic);
++      SetIcon((const wxIcon&)ic);
+    #endif
+ }
+--- audacity-src-2.0.5/src/PitchName.cpp.org   2014-01-15 19:58:21.012574229 +0100
++++ audacity-src-2.0.5/src/PitchName.cpp       2014-01-15 20:07:39.509684788 +0100
+@@ -20,6 +20,12 @@
+ #include <math.h>
+ #include <stdio.h>
++#include "wx/defs.h"
++#include "wx/dlimpexp.h"
++#include "wx/wxcrtbase.h"
++#include "wx/wxcrtvararg.h"
++#include "wx/wxcrt.h"
++
+ #include "PitchName.h"
+--- audacity-src-2.0.5/src/PlatformCompatibility.cpp.org       2014-01-15 20:31:30.447274594 +0100
++++ audacity-src-2.0.5/src/PlatformCompatibility.cpp   2014-01-15 20:31:50.037920878 +0100
+@@ -37,9 +37,8 @@
+    static wxString path;
+    if (!found) {
+-      wxStandardPaths std;
+-      path = std.GetExecutablePath();
++      path = wxStandardPaths::Get().GetExecutablePath();
+       found = true;
+    }
+@@ -65,4 +64,4 @@
+ #else
+    return filePath;
+ #endif
+-}
+\ Brak znaku nowej linii na końcu pliku
++}
+--- audacity-src-2.0.5/src/Profiler.cpp~       2013-10-19 09:31:49.000000000 +0200
++++ audacity-src-2.0.5/src/Profiler.cpp        2014-01-15 20:32:39.369547031 +0100
+@@ -20,6 +20,9 @@
+ *//*******************************************************************/
++#include <stdio.h>
++#include <string.h>
++
+ #include "Profiler.h"
+ ///write to a profile at the end of the test.
+@@ -165,4 +168,4 @@
+    else
+       return 0.0;
+ }
+-    
+\ Brak znaku nowej linii na końcu pliku
++    
+--- audacity-src-2.0.5/src/Project.cpp~        2014-01-15 20:34:38.000000000 +0100
++++ audacity-src-2.0.5/src/Project.cpp 2014-01-15 20:35:31.352033096 +0100
+@@ -988,7 +988,7 @@
+       wxIcon ic;
+       ic.CopyFromBitmap(theTheme.Bitmap(bmpAudacityLogo48x48));
+    #endif
+-   SetIcon(ic);
++   SetIcon((const wxIcon&)ic);
+ #endif
+    mIconized = false;
+--- audacity-src-2.0.5/src/Tags.cpp~   2014-01-15 20:37:40.000000000 +0100
++++ audacity-src-2.0.5/src/Tags.cpp    2014-01-15 20:38:32.374915880 +0100
+@@ -482,7 +482,7 @@
+       while (*attrs) {
+          wxString attr = *attrs++;
+-         if (!*(char*)attr)
++         if (attr.IsEmpty())
+             break;
+          wxString value = *attrs++;
+--- audacity-src-2.0.5/src/TrackPanel.cpp.org  2014-01-15 20:40:41.349305322 +0100
++++ audacity-src-2.0.5/src/TrackPanel.cpp      2014-01-15 20:44:35.530549708 +0100
+@@ -5097,7 +5097,7 @@
+       // The activate event is used to make the 
+       // parent window 'come alive' if it didn't have focus.
+       wxActivateEvent e;
+-      GetParent()->ProcessEvent(e);
++      GetParent()->GetEventHandler()->ProcessEvent(e);
+       // wxTimers seem to be a little unreliable, so this
+       // "primes" it to make sure it keeps going for a while...
+@@ -5534,7 +5534,7 @@
+    int trackKind = pTrack->GetKind();
+    currentTool = selectTool; // the default.
+-   if( event.ButtonIsDown(3) || event.RightUp()){
++   if( event.ButtonIsDown((wxMouseButton)3) || event.RightUp()){
+       currentTool = zoomTool;
+    } else if( trackKind == Track::Time ){
+       currentTool = envelopeTool;
+@@ -8251,7 +8251,7 @@
+    mSliderOffset = 0;
+    int fontSize = 10;
+-   mFont.Create(fontSize, wxSWISS, wxNORMAL, wxNORMAL);
++   mFont.Create(fontSize, wxFONTFAMILY_SWISS, wxFONTSTYLE_NORMAL, wxFONTWEIGHT_NORMAL);
+    int allowableWidth = GetTrackInfoWidth() - 2; // 2 to allow for left/right borders
+    int textWidth, textHeight;
index a329142c5737366a40a5245ec6a1f85c96cdaa3b..59e9df5e4c24a6eecaae2e654eda8b50c3c3fc3a 100644 (file)
@@ -33,6 +33,7 @@ Source3:      %{name}-icon.png
 Patch0:                %{name}-system-libs.patch
 Patch1:                %{name}-opt.patch
 Patch2:                %{name}-no-macos.patch
+Patch3:                %{name}-wx.patch
 URL:           http://audacity.sourceforge.net/
 BuildRequires: alsa-lib-devel
 BuildRequires: autoconf >= 2.59
@@ -103,12 +104,16 @@ Audacity - это звуковой редактор, позволяющий ра
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %{__sed} -i 's/libmp3lame.so/libmp3lame.so.0/g' locale/*.po
 
 %build
 cd lib-src/portmixer
 %{__autoconf}
+cd ../lib-widget-extra
+%{__aclocal} -I m4
+%{__autoconf}
 cd ../portsmf
 %{__aclocal} -I autotools/m4
 %{__autoconf}
This page took 0.048354 seconds and 4 git commands to generate.