Hi Olly,

many thanks for spending time into tipptrainer trying a patch.  When I
have read your first announcement of wxwidgets2.6 removal I tried to
contact upstream (tipptrainer is dead upstream for years but had no
problems so far).  All mail addresses resulted in "unknown user" and
because I'm unable to contact upstream nor do I think the program is
worth spending a lot of time into it I just asked ftpmaster for removal
to not block wxwidgets migration.

Kind regards and thanks for your hard wxwidgets work which is really
welcome (for a lot of other packages)

      Andreas.

On Tue, Oct 18, 2011 at 04:10:04PM +1300, Olly Betts wrote:
> Package: tipptrainer
> Version: 0.6.0-17
> Tags: patch
> User: [email protected]
> Usertags: wx2.6to2.8
> 
> I'm trying to get packages to migrate from wxwidgets2.6 to wxwidgets2.8
> so we can remove the former from the archive - it's no longer supported
> upstream, and wxwidgets3.0 is supposed to be out early next year.
> 
> I had a look at the changes required to get graphthing to build with
> wxwidgets2.8, and have attached a partial patch.
> 
> The code seems to do some odd things with wxURL which I don't fully
> understand the intention of, which makes it hard for me to know how to
> appropriately update these for 2.8 (which removed various wxURL features
> in favour of wxURI).  But hopefully this patch is better than nothing.
> 
> Cheers,
>     Olly

> --- tipptrainer-0.6.0.orig/src/commonElements.cpp     2004-08-09 
> 03:38:02.000000000 +1200
> +++ tipptrainer-0.6.0/src/commonElements.cpp  2011-10-13 01:47:12.000000000 
> +1300
> @@ -35,7 +35,7 @@
>    }
>  
>    if (retval == 0
> -      || (url.GetProtocolName() == wxString(_T("file"))
> +      || (url.GetScheme() == wxString(_T("file"))
>         && !((wxFileInputStream*)retval)->Ok())) {
>      delete retval;
>      return 0;
> --- tipptrainer-0.6.0.orig/src/dirs.cpp
> +++ tipptrainer-0.6.0/src/dirs.cpp
> @@ -16,7 +16,7 @@
>  
>  UrlFile::UrlFile (const wxString& url) {
>    if (url.Length() > 0) {
> -    wxURL u(wxURL::ConvertFromURI(url));
> +    wxURL u(wxURL::Unescape(url));
>      Init(u);
>    }
>  }
> @@ -33,17 +33,17 @@ void UrlFile::operator= (const UrlFile&
>  }
>  
>  void UrlFile::Init (wxURL& url) {
> -  this->protocol = url.GetProtocolName();
> +  this->protocol = url.GetScheme();
>    if (this->protocol == _T("file")) {
>      this->path.Assign(UrlToFileName(url.GetURL()));
>    } else {
> -    this->server = url.GetHostName();
> -    setFullPath(wxURL::ConvertFromURI(url.GetPath()));
> +    this->server = url.GetServer();
> +    setFullPath(wxURL::Unescape(url.GetPath()));
>    }
>  }
>  
>  wxURL* UrlFile::getURL () const {
> -  return new wxURL(wxURL::ConvertFromURI(getURLstr()));
> +  return new wxURL(wxURL::Unescape(getURLstr()));
>  }
>  
>  wxString UrlFile::getURLstr () const {
> @@ -107,7 +109,7 @@ wxString UrlFile::FileNameToUrl (const w
>  }
>  
>  wxFileName UrlFile::UrlToFileName (const wxString& url) {
> -  wxString fullpath = 
> wxURL::ConvertFromURI(url.Mid(wxString(_T("file:")).Len()));
> +  wxString fullpath = wxURL::Unescape(url.Mid(wxString(_T("file:")).Len()));
>  #ifdef __WXMSW__
>    if (fullpath.compare(0,2,wxString(_T("//"))) == 0) {
>      fullpath = fullpath.Mid(2);


-- 
http://fam-tille.de



-- 
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]

Reply via email to