This repository was archived by the owner on Feb 27, 2023. It is now read-only.
File tree 2 files changed +15
-0
lines changed
2 files changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -142,6 +142,7 @@ void MainWindow::populate()
142
142
_qpd->setWindowFlags (Qt::Window | Qt::CustomizeWindowHint | Qt::WindowTitleHint);
143
143
_qpd->show ();
144
144
QTimer::singleShot (2000 , this , SLOT (hideDialogIfNoNetwork ()));
145
+ QTimer::singleShot (2000 , this , SLOT (showMoreAvailableDialogIfNoNetwork ()));
145
146
}
146
147
147
148
if (QFile::exists (SETTINGS_PARTITION))
@@ -1471,3 +1472,16 @@ void MainWindow::hideDialogIfNoNetwork()
1471
1472
}
1472
1473
}
1473
1474
}
1475
+
1476
+ void MainWindow::showMoreAvailableDialogIfNoNetwork ()
1477
+ {
1478
+ QByteArray carrier = getFileContents (" /sys/class/net/eth0/carrier" ).trimmed ();
1479
+ if (carrier != " 1" && ui->list ->count () > 0 ) /* We don't want to show this if hideDialogIfNoNetwork's messagebox showed too */
1480
+ {
1481
+ /* No network cable inserted, but have local images */
1482
+ QMessageBox::information (this ,
1483
+ tr (" More images are available online" ),
1484
+ tr (" A greater variety of more up to date images may be available online. Please insert a network cable in to the network port to access them." ),
1485
+ QMessageBox::Close);
1486
+ }
1487
+ }
Original file line number Diff line number Diff line change @@ -87,6 +87,7 @@ protected slots:
87
87
void downloadMetaComplete ();
88
88
void onQuery (const QString &msg, const QString &title, QMessageBox::StandardButton* answer);
89
89
void hideDialogIfNoNetwork ();
90
+ void showMoreAvailableDialogIfNoNetwork ();
90
91
91
92
private slots:
92
93
/* UI events */
You can’t perform that action at this time.
0 commit comments