Don't default to 'opt-in' for hardware statistics (GDPR requirement).
This means atm that even connection to internet is disabled as default :(
This commit is contained in:
parent
f974c9200c
commit
f387d95627
@ -1807,7 +1807,7 @@ void askForInternetPermission()
|
||||
} // onCancel
|
||||
}; // ConfirmServer
|
||||
|
||||
GUIEngine::ModalDialog *dialog =
|
||||
MessageDialog *dialog =
|
||||
new MessageDialog(_("SuperTuxKart may connect to a server "
|
||||
"to download add-ons and notify you of updates. We also collect "
|
||||
"anonymous hardware statistics to help with the development of STK. "
|
||||
@ -1818,6 +1818,10 @@ void askForInternetPermission()
|
||||
"Internet\" and \"Send anonymous HW statistics\")."),
|
||||
MessageDialog::MESSAGE_DIALOG_YESNO,
|
||||
new ConfirmServer(), true, true, 0.7f, 0.7f);
|
||||
|
||||
// Changes the default focus to be 'cancel', which is not
|
||||
// GDPR compliant, see #3378
|
||||
dialog->setFocusCancel();
|
||||
GUIEngine::DialogQueue::get()->pushDialog(dialog, false);
|
||||
} // askForInternetPermission
|
||||
|
||||
|
@ -42,10 +42,11 @@ MessageDialog::MessageDialog(const irr::core::stringw &msg,
|
||||
float width, float height)
|
||||
: ModalDialog(width, height)
|
||||
{
|
||||
m_msg = msg;
|
||||
m_type = type;
|
||||
m_listener = listener;
|
||||
m_own_listener = own_listener;
|
||||
m_msg = msg;
|
||||
m_type = type;
|
||||
m_listener = listener;
|
||||
m_own_listener = own_listener;
|
||||
m_focus_on_cancel = false;
|
||||
doInit(from_queue);
|
||||
} // MessageDialog(stringw, type, listener, own_listener)
|
||||
|
||||
@ -127,12 +128,17 @@ void MessageDialog::loadedFromFile()
|
||||
{
|
||||
IconButtonWidget* cancelbtn = getWidget<IconButtonWidget>("cancel");
|
||||
cancelbtn->setText(_("No"));
|
||||
if(m_focus_on_cancel)
|
||||
cancelbtn->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
|
||||
}
|
||||
else if (m_type == MessageDialog::MESSAGE_DIALOG_OK_CANCEL)
|
||||
{
|
||||
// In case of a OK_CANCEL dialog, change the text from 'Yes' to 'Ok'
|
||||
IconButtonWidget* yesbtn = getWidget<IconButtonWidget>("confirm");
|
||||
yesbtn->setText(_("OK"));
|
||||
IconButtonWidget* cancelbtn = getWidget<IconButtonWidget>("cancel");
|
||||
if (m_focus_on_cancel)
|
||||
cancelbtn->setFocusForPlayer(PLAYER_ID_GAME_MASTER);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -74,6 +74,10 @@ private:
|
||||
irr::core::stringw m_msg;
|
||||
void doInit(bool from_queue);
|
||||
|
||||
/** If set this will set the focus on 'cancel'/'no'
|
||||
* instead of "yes"/"ok". */
|
||||
bool m_focus_on_cancel;
|
||||
|
||||
public:
|
||||
|
||||
/**
|
||||
@ -101,6 +105,10 @@ public:
|
||||
GUIEngine::EventPropagation processEvent(const std::string& eventSource) OVERRIDE;
|
||||
|
||||
virtual void loadedFromFile() OVERRIDE;
|
||||
|
||||
/** Calling this will make sure that the focus is set on the 'cancel' or
|
||||
* 'no'. */
|
||||
void setFocusCancel() {m_focus_on_cancel = true; }
|
||||
};
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user