Skip to content

Commit

Permalink
Merge branch 'release/v2.9.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
bigfug committed Apr 1, 2017
2 parents b113ab6 + 9dfa0eb commit 9eb1627
Show file tree
Hide file tree
Showing 122 changed files with 2,277 additions and 2,232 deletions.
64 changes: 46 additions & 18 deletions FugioApp/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,26 @@ void logger_static( QtMsgType type, const QMessageLogContext &context, const QSt
#define Q(x) #x
#define QUOTE(x) Q(x)

void checkLocale( App *APP )
{
bool FndLoc = false;

for( QString a : APP->arguments() )
{
if( FndLoc )
{
QLocale::setDefault( QLocale( a ) );

break;
}

if( a == "--locale" )
{
FndLoc = true;
}
}
}

int main( int argc, char *argv[] )
{
#if defined( Q_OS_RASPBERRY_PI )
Expand Down Expand Up @@ -139,6 +159,10 @@ int main( int argc, char *argv[] )
return( -1 );
}

//-------------------------------------------------------------------------

checkLocale( APP );

//-------------------------------------------------------------------------
// Create QSettings

Expand All @@ -151,24 +175,24 @@ int main( int argc, char *argv[] )
//-------------------------------------------------------------------------
// Ask the user if we can collect some anonymous data about how they use Fugio

if( Settings.value( "first-time", true ).toBool() )
{
if( !Settings.value( "asked-data-collection-permission", false ).toBool() )
{
if( QMessageBox::question( nullptr, "Help Fugio Improve", "To understand how users are using Fugio, we would like to collect some anonymous data that will be stored on our website.\n\nYou can opt in or out at any time.\n\nWould you allow Fugio to do this?", QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
{
Settings.setValue( "data-collection-permission", true );
}
else
{
Settings.setValue( "data-collection-permission", false );
}

Settings.setValue( "asked-data-collection-permission", true );
}

Settings.setValue( "first-time", false );
}
// if( Settings.value( "first-time", true ).toBool() )
// {
// if( !Settings.value( "asked-data-collection-permission", false ).toBool() )
// {
// if( QMessageBox::question( nullptr, "Help Fugio Improve", "To understand how users are using Fugio, we would like to collect some anonymous data that will be stored on our website.\n\nYou can opt in or out at any time.\n\nWould you allow Fugio to do this?", QMessageBox::Yes, QMessageBox::No ) == QMessageBox::Yes )
// {
// Settings.setValue( "data-collection-permission", true );
// }
// else
// {
// Settings.setValue( "data-collection-permission", false );
// }

// Settings.setValue( "asked-data-collection-permission", true );
// }

// Settings.setValue( "first-time", false );
// }

//-------------------------------------------------------------------------

Expand Down Expand Up @@ -215,6 +239,10 @@ int main( int argc, char *argv[] )

CLP.addOption( ClearSettingsOption );

QCommandLineOption SetLocaleOption( "locale", "Set default locale", "locale", QLocale().bcp47Name() );

CLP.addOption( SetLocaleOption );

//-------------------------------------------------------------------------
// Register and load plugins

Expand Down
4 changes: 2 additions & 2 deletions FugioApp/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<Package>
<DisplayName>Fugio</DisplayName>
<Description>The Fugio patch editor.</Description>
<Version>2.8.0</Version>
<ReleaseDate>2017-03-23</ReleaseDate>
<Version>2.9.0</Version>
<ReleaseDate>2017-03-31</ReleaseDate>
<Default>True</Default>
</Package>
Binary file modified FugioApp/translations/fugio_app_de.qm
Binary file not shown.
Loading

0 comments on commit 9eb1627

Please sign in to comment.