diff --git changelog changelog index 264cd02..de310b7 100644 --- changelog +++ changelog @@ -1,3 +1,6 @@ + * Fixed some Config constructor calls + +2014-02-20 0.3.7 * Removed Flac library dependency. Now flac images are read/writen using taglib * Fixed compilation without external libwxsqlite support diff --git po/guayadeque.pot po/guayadeque.pot index 91451d4..2c6b8f0 100644 --- po/guayadeque.pot +++ po/guayadeque.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2014-01-14 21:46+0000\n" +"POT-Creation-Date: 2014-02-25 21:21+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" diff --git src/AAListBox.cpp src/AAListBox.cpp index 1195ca9..e6f2a40 100644 --- src/AAListBox.cpp +++ src/AAListBox.cpp @@ -267,7 +267,7 @@ void guAAListBox::OnCommandClicked( wxCommandEvent &event ) { index = event.GetId(); - guConfig * Config = ( guConfig * ) Config->Get(); + guConfig * Config = ( guConfig * ) guConfig::Get(); if( Config ) { wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) ); diff --git src/AlListBox.cpp src/AlListBox.cpp index 9a1f387..d2abd6f 100644 --- src/AlListBox.cpp +++ src/AlListBox.cpp @@ -406,7 +406,7 @@ void guAlListBox::OnCommandClicked( wxCommandEvent &event ) { index = event.GetId(); - guConfig * Config = ( guConfig * ) Config->Get(); + guConfig * Config = ( guConfig * ) guConfig::Get(); if( Config ) { wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) ); diff --git src/AlbumBrowser.cpp src/AlbumBrowser.cpp index 7dd00d1..d14fb05 100644 --- src/AlbumBrowser.cpp +++ src/AlbumBrowser.cpp @@ -1177,7 +1177,7 @@ void guAlbumBrowser::OnCommandClicked( const int cmdid, const int albumid ) { index = cmdid; - guConfig * Config = ( guConfig * ) Config->Get(); + guConfig * Config = ( guConfig * ) guConfig::Get(); if( Config ) { wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) ); @@ -1240,7 +1240,7 @@ void guAlbumBrowser::OnCommandClicked( const int cmdid, const guTrackArray &trac { Index = cmdid; - guConfig * Config = ( guConfig * ) Config->Get(); + guConfig * Config = ( guConfig * ) guConfig::Get(); if( Config ) { wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) ); diff --git src/ArListBox.cpp src/ArListBox.cpp index 59818fd..52afee5 100644 --- src/ArListBox.cpp +++ src/ArListBox.cpp @@ -254,7 +254,7 @@ void guArListBox::OnCommandClicked( wxCommandEvent &event ) { index = event.GetId(); - guConfig * Config = ( guConfig * ) Config->Get(); + guConfig * Config = ( guConfig * ) guConfig::Get(); if( Config ) { wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) ); diff --git src/AudioScrobble.cpp src/AudioScrobble.cpp index b2306f0..447999e 100644 --- src/AudioScrobble.cpp +++ src/AudioScrobble.cpp @@ -767,7 +767,7 @@ guASPlayedThread::ExitCode guASPlayedThread::Entry() { break; } - Sleep( guAS_SUBMIT_RETRY_TIMEOUT ); // Wait 30 Secs between submit attempts + Sleep( guAS_SUBMIT_TIMEOUT ); // Wait 30 Secs between submit attempts } return 0; } diff --git src/AudioScrobble.h src/AudioScrobble.h index 4eacb40..57f57fe 100644 --- src/AudioScrobble.h +++ src/AudioScrobble.h @@ -50,7 +50,7 @@ #define guAS_MAX_SUBMITTRACKS 50 #define guAS_SUBMIT_RETRY_TIMEOUT 30000 -#define guAS_SUBMIT_TIMEOUT 120000 +#define guAS_SUBMIT_TIMEOUT 1000 #define guAS_ERROR_NOERROR 0 #define guAS_ERROR_BANNED 1 diff --git src/DbLibrary.cpp src/DbLibrary.cpp index e596c2a..a7995b8 100644 --- src/DbLibrary.cpp +++ src/DbLibrary.cpp @@ -4781,8 +4781,8 @@ int guDbLibrary::GetRandomTracks( guTrackArray * tracks, const int count, const } dbRes.Finalize(); query = GU_TRACKS_QUERYSTR + wxString::Format( wxT( "WHERE song_albumid = %i" ), AlbumId ); - //query += wxT( " ORDER BY song_number" ); - query += GetSongsSortSQL( m_TracksOrder, m_TracksOrderDesc ); + query += wxT( " ORDER BY song_disk, song_number, song_filename" ); + //query += GetSongsSortSQL( m_TracksOrder, m_TracksOrderDesc ); } //guLogMessage( wxT( "GetRandomTracks:\n%s" ), query.c_str() ); diff --git src/FileBrowser.cpp src/FileBrowser.cpp index f4238cd..fd02a09 100644 --- src/FileBrowser.cpp +++ src/FileBrowser.cpp @@ -2248,7 +2248,7 @@ void guFileBrowser::OnFolderCommand( wxCommandEvent &event ) int Count; Index = event.GetId(); - guConfig * Config = ( guConfig * ) Config->Get(); + guConfig * Config = ( guConfig * ) guConfig::Get(); if( Config ) { wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) ); @@ -2286,7 +2286,7 @@ void guFileBrowser::OnItemsCommand( wxCommandEvent &event ) int Count; Index = event.GetId(); - guConfig * Config = ( guConfig * ) Config->Get(); + guConfig * Config = ( guConfig * ) guConfig::Get(); if( Config ) { wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) ); diff --git src/LastFM.cpp src/LastFM.cpp index dba2464..14fdb90 100644 --- src/LastFM.cpp +++ src/LastFM.cpp @@ -483,6 +483,10 @@ guAlbumInfo guLastFM::AlbumGetInfo( const wxString &Artist, const wxString &Albu { RetVal.m_ImageLink = XmlNode->GetNodeContent(); } + else if( ImageSize == wxT( "mega" ) && !XmlNode->GetNodeContent().IsEmpty() ) + { + RetVal.m_ImageLink = XmlNode->GetNodeContent(); + } } else if( ItemName == wxT( "toptags" ) ) { diff --git src/LastFMPanel.cpp src/LastFMPanel.cpp index a627141..56d8edd 100644 --- src/LastFMPanel.cpp +++ src/LastFMPanel.cpp @@ -265,7 +265,7 @@ void guLastFMInfoCtrl::OnDoubleClicked( wxMouseEvent &event ) GetSelectedTracks( &Tracks ); if( Tracks.Count() ) { - guConfig * Config = ( guConfig * ) Config->Get(); + guConfig * Config = ( guConfig * ) guConfig::Get(); if( m_PlayerPanel && Config ) { if( Config->ReadBool( wxT( "DefaultActionEnqueue" ), false, wxT( "general" ) ) ) @@ -391,7 +391,7 @@ guArtistInfoCtrl::guArtistInfoCtrl( wxWindow * parent, guDbLibrary * db, guDbCac { m_Info = NULL; - guConfig * Config = ( guConfig * ) Config->Get(); + guConfig * Config = ( guConfig * ) guConfig::Get(); m_ShowLongBioText = Config->ReadBool( wxT( "ShowLongBioText" ), false, wxT( "lastfm" ) ); CreateControls( parent ); @@ -406,7 +406,7 @@ guArtistInfoCtrl::~guArtistInfoCtrl() if( m_Info ) delete m_Info; - guConfig * Config = ( guConfig * ) Config->Get(); + guConfig * Config = ( guConfig * ) guConfig::Get(); Config->WriteBool( wxT( "ShowLongBioText" ), m_ShowLongBioText, wxT( "lastfm" ) ); m_ShowMoreHyperLink->Disconnect( wxEVT_COMMAND_HYPERLINK, wxHyperlinkEventHandler( guArtistInfoCtrl::OnShowMoreLinkClicked ), NULL, this ); diff --git src/OnlineLinks.cpp src/OnlineLinks.cpp index 1c62a88..30536cd 100644 --- src/OnlineLinks.cpp +++ src/OnlineLinks.cpp @@ -79,7 +79,7 @@ void ExecuteOnlineLink( const int linkid, const wxString &text ) int index = linkid - ID_LINKS_BASE; //guLogMessage( wxT( "ExecuteOnlineLink( %i, '%s' )" ), index, text.c_str() ); - guConfig * Config = ( guConfig * ) Config->Get(); + guConfig * Config = ( guConfig * ) guConfig::Get(); wxArrayString Links = Config->ReadAStr( wxT( "Link" ), wxEmptyString, wxT( "searchlinks/links" ) ); if( index >= 0 && ( index < ( int ) Links.Count() ) ) diff --git src/PlayList.cpp src/PlayList.cpp index 18c39f3..339ef85 100644 --- src/PlayList.cpp +++ src/PlayList.cpp @@ -2345,7 +2345,7 @@ void guPlayList::OnCommandClicked( wxCommandEvent &event ) { index = event.GetId(); - guConfig * Config = ( guConfig * ) Config->Get(); + guConfig * Config = ( guConfig * ) guConfig::Get(); if( Config ) { wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) ); diff --git src/PlayerPanel.cpp src/PlayerPanel.cpp index 2a83420..ac5136b 100644 --- src/PlayerPanel.cpp +++ src/PlayerPanel.cpp @@ -1596,7 +1596,7 @@ void guPlayerPanel::OnMediaPosition( guMediaEvent &event ) !m_NextTrackId && ( m_MediaSong.m_Type != guTRACK_TYPE_RADIOSTATION ) && ( CurPos > 0 ) && ( m_LastLength > 0 ) && - ( ( CurPos + 5000 + ( !m_ForceGapless ? m_FadeOutTime : 0 ) ) >= m_LastLength ) + ( ( CurPos + 1000 + ( !m_ForceGapless ? m_FadeOutTime : 0 ) ) >= m_LastLength ) ) { //if( !m_ForceGapless && m_FadeOutTime && !m_MediaSong.m_Offset && ( GetState() == guMEDIASTATE_PLAYING ) ) diff --git src/SoListBox.cpp src/SoListBox.cpp index 872eae3..eed8eef 100644 --- src/SoListBox.cpp +++ src/SoListBox.cpp @@ -713,7 +713,7 @@ void guSoListBox::OnCommandClicked( wxCommandEvent &event ) { index = event.GetId(); - guConfig * Config = ( guConfig * ) Config->Get(); + guConfig * Config = ( guConfig * ) guConfig::Get(); if( Config ) { wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) ); diff --git src/TreePanel.cpp src/TreePanel.cpp index a01ca58..ae7b44a 100644 --- src/TreePanel.cpp +++ src/TreePanel.cpp @@ -709,7 +709,7 @@ void guTreeViewTreeCtrl::OnCommandClicked( wxCommandEvent &event ) Index = event.GetId(); - guConfig * Config = ( guConfig * ) Config->Get(); + guConfig * Config = ( guConfig * ) guConfig::Get(); if( Config ) { wxArrayString Commands = Config->ReadAStr( wxT( "Exec" ), wxEmptyString, wxT( "commands/execs" ) ); diff --git src/Utils.cpp src/Utils.cpp index 6586330..e0fdd90 100644 --- src/Utils.cpp +++ src/Utils.cpp @@ -255,10 +255,7 @@ bool DownloadImage( const wxString &source, const wxString &target, const int im { if( maxwidth != -1 ) { - if( maxheight != -1 ) - Image->Rescale( maxwidth, maxheight, wxIMAGE_QUALITY_HIGH ); - else - Image->Rescale( maxwidth, maxwidth, wxIMAGE_QUALITY_HIGH ); + guImageResize( Image, maxwidth, ( maxheight != -1 ) ? maxheight : maxwidth ); } RetVal = Image->SaveFile( target, imagetype );