Skip to content
This repository has been archived by the owner on Feb 14, 2020. It is now read-only.

Commit

Permalink
Slightly better messagebox text.
Browse files Browse the repository at this point in the history
Since this is using the property-based version of QMessageBox, why not
also use the better constructions for the buttons, so we can get some
more meaningful text than Yes and No.
  • Loading branch information
NorwegianRockCat committed Jan 3, 2017
1 parent 45e9af8 commit 25103fa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/NetworkManager/networkman.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -155,12 +155,12 @@ void NetworkMan::detectDev()

// Place a message box prompt here
QMessageBox msgBox;
msgBox.setText("A new wireless device (" + dev + ") has been detected.");
msgBox.setInformativeText("Do you want to enable this device now?");
msgBox.setStandardButtons(QMessageBox::No | QMessageBox::Yes);
msgBox.setDefaultButton(QMessageBox::Yes);
int ret = msgBox.exec();
if ( ret == QMessageBox::Yes )
msgBox.setText(tr("A new wireless device (%1) has been detected.").arg(dev));
msgBox.setInformativeText(tr("Do you want to enable this device now?"));
auto enableButton = msgBox.addButton(tr("Enable"), QMessageBox::AcceptRole);
msgBox.addButton(QMessageBox::Cancel);
msgBox.exec();
if ( msgBox.clickedButton() == enableButton )
{
// Get the next available wlan[0-9] device
tmp = getNextAvailWlan();
Expand Down

0 comments on commit 25103fa

Please sign in to comment.