mirror of
https://github.com/parchlinux/calamares.git
synced 2025-06-28 01:45:36 -04:00
[tracking] Enable policy websites
Each kind of tracking has an associated webpage / URL describing the policy for that tracking. The Calamares User Guide has some generic information. When the user clicks on the Help (?) button in a tracking-option block, go to that URL.
This commit is contained in:
parent
7a7e2b16cb
commit
a0e8f76348
6 changed files with 49 additions and 7 deletions
|
@ -44,6 +44,7 @@ TrackingPage::TrackingPage(QWidget *parent)
|
|||
|
||||
ui->setupUi( this );
|
||||
CALAMARES_RETRANSLATE(
|
||||
ui->retranslateUi( this );
|
||||
ui->installExplanation->setText( tr( "Installation tracking helps %1 count how many people use it. If you enable install-tracking, at the end of the installation, information about your hardware will be sent <b>one time only</b> to our servers. To see what will be sent, click on the help-icon." ).arg( *StringEntry::ShortProductName ) );
|
||||
ui->machineExplanation->setText( tr( "Machine tracking helps %1 count how many people use it on an ongoing basis. If you enable machine-tracking, the system will send limited information about your hardware and installed software <b>periodically</b> to our servers. For information about the kind of information being sent, click on the help icon." ).arg( *StringEntry::ShortProductName ) );
|
||||
ui->userExplanation->setText( tr( "User tracking helps %1 understand how people use the system and the applications. If you enable user-tracking, the system will send information about your use of the installed software <b>regularly</b> to our servers. For information about the kind of information being sent and the policies that apply, click on the help icon." ).arg( *StringEntry::ShortProductName ) );
|
||||
|
@ -81,7 +82,7 @@ void TrackingPage::setTrackingOption(TrackingType t, bool setting, bool user)
|
|||
check->setChecked( user );
|
||||
}
|
||||
else
|
||||
cDebug() << " .. unknown option" << int(t);
|
||||
cDebug() << "WARNING: unknown tracking option" << int(t);
|
||||
}
|
||||
|
||||
bool TrackingPage::getTrackingOption(TrackingType t)
|
||||
|
@ -103,3 +104,31 @@ bool TrackingPage::getTrackingOption(TrackingType t)
|
|||
|
||||
return (check != nullptr) && check->isChecked();
|
||||
}
|
||||
|
||||
void TrackingPage::setTrackingPolicy(TrackingType t, QString url)
|
||||
{
|
||||
QToolButton *button = nullptr;
|
||||
switch( t )
|
||||
{
|
||||
case TrackingType::InstallTracking:
|
||||
button = ui->installPolicyButton;
|
||||
break;
|
||||
case TrackingType::MachineTracking:
|
||||
button = ui->machinePolicyButton;
|
||||
break;
|
||||
case TrackingType::UserTracking:
|
||||
button = ui->userPolicyButton;
|
||||
break;
|
||||
}
|
||||
|
||||
if ( button != nullptr )
|
||||
if ( url.isEmpty() )
|
||||
button->hide();
|
||||
else
|
||||
{
|
||||
connect( button, &QToolButton::clicked, [url]{ QDesktopServices::openUrl( url ); } );
|
||||
cDebug() << "Tracking policy" << int(t) << "set to" << url;
|
||||
}
|
||||
else
|
||||
cDebug() << "WARNING: unknown tracking option" << int(t);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue