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

Added info button #419

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions recovery/icons.qrc
Original file line number Diff line number Diff line change
Expand Up @@ -56,5 +56,6 @@
<file>icons/network-wireless-connected-100.png</file>
<file>icons/tick.png</file>
<file>icons/hdd_usb_unmount.png</file>
<file>icons/information.png</file>
</qresource>
</RCC>
Binary file added recovery/icons/information.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
22 changes: 22 additions & 0 deletions recovery/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -696,6 +696,7 @@ void MainWindow::on_list_currentRowChanged()
{
QListWidgetItem *item = ui->list->currentItem();
ui->actionEdit_config->setEnabled(item && item->data(Qt::UserRole).toMap().contains("partitions"));
ui->actionInfo->setEnabled(item && item->data(Qt::UserRole).toMap().contains("url"));
}

void MainWindow::update_window_title()
Expand Down Expand Up @@ -1883,3 +1884,24 @@ void MainWindow::filterList()
}
}
}

void MainWindow::on_actionInfo_triggered()
{
if (!requireNetwork())
return;

QListWidgetItem * item = ui->list->currentItem();
if (!item)
{
return;
}
QVariantMap m = item->data(Qt::UserRole).toMap();
if (m.contains("url"))
{
QProcess *proc = new QProcess(this);
QString lang = LanguageDialog::instance("en", "gb")->currentLanguage();
if (lang == "gb" || lang == "us" || lang == "ko" || lang == "")
lang = "en";
proc->start("arora -lang "+lang+" "+m.value("url").toString());
}
}
2 changes: 2 additions & 0 deletions recovery/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ private slots:

void on_targetCombo_currentIndexChanged(int index);

void on_actionInfo_triggered();

signals:
void networkUp();
};
Expand Down
19 changes: 19 additions & 0 deletions recovery/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@
<addaction name="actionWrite_image_to_disk"/>
<addaction name="actionEdit_config"/>
<addaction name="actionWifi"/>
<addaction name="actionInfo"/>
<addaction name="actionBrowser"/>
<addaction name="actionCancel"/>
</widget>
Expand Down Expand Up @@ -242,6 +243,24 @@
<string>W</string>
</property>
</action>
<action name="actionInfo">
<property name="enabled">
<bool>false</bool>
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/information.png</normaloff>:/icons/information.png</iconset>
</property>
<property name="text">
<string>Info (f)</string>
</property>
<property name="toolTip">
<string>Show Information on selected OS</string>
</property>
<property name="shortcut">
<string>F</string>
</property>
</action>
</widget>
<layoutdefault spacing="6" margin="11"/>
<resources>
Expand Down
2 changes: 2 additions & 0 deletions recovery/multiimagewritethread.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -635,6 +635,8 @@ bool MultiImageWriteThread::processImage(OsInfo *image)
ventry["bootable"] = image->bootable();
if (!image->supportedModels().isEmpty())
ventry["supported_models"] = image->supportedModels();
ventry["url"] = image->url();

QString iconfilename = image->folder()+"/"+image->flavour()+".png";
iconfilename.replace(" ", "_");
if (QFile::exists(iconfilename))
Expand Down
1 change: 1 addition & 0 deletions recovery/osinfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ OsInfo::OsInfo(const QString &folder, const QString &flavour, QObject *parent) :
_bootable = m.value("bootable", true).toBool();
_riscosOffset = m.value("riscos_offset").toInt();
_supportedModels = m.value("supported_models").toStringList();
_url = m.value("url").toString();

QVariantList parts = Json::loadFromFile(folder+"/partitions.json").toMap().value("partitions").toList();
foreach (QVariant pv, parts)
Expand Down
7 changes: 6 additions & 1 deletion recovery/osinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,8 +69,13 @@ class OsInfo : public QObject
return _supportedModels;
}

inline QString url()
{
return _url;
}

protected:
QString _folder, _flavour, _name, _description, _version, _releaseDate;
QString _folder, _flavour, _name, _description, _version, _releaseDate, _url;
bool _bootable;
QList<PartitionInfo *> _partitions;
QStringList _supportedModels;
Expand Down
105 changes: 58 additions & 47 deletions recovery/translation_ast.ts
Original file line number Diff line number Diff line change
Expand Up @@ -273,70 +273,81 @@ AVISU: Esto desaniciará tolos datos na to tarxeta SD</translation>
<translation>Disponible:</translation>
</message>
<message>
<location filename="mainwindow.ui" line="158"/>
<location filename="mainwindow.ui" line="159"/>
<source>Install (i)</source>
<translation>Instalar (i)</translation>
</message>
<message>
<location filename="mainwindow.ui" line="161"/>
<location filename="mainwindow.ui" line="162"/>
<source>Installs the selected operating system image onto this SD card.</source>
<translation>Instala la imaxe del SO esbilláu nesta tarxeta SD.</translation>
</message>
<message>
<location filename="mainwindow.ui" line="164"/>
<location filename="mainwindow.ui" line="165"/>
<location filename="mainwindow.ui" line="261"/>
<source>I</source>
<translation>I</translation>
</message>
<message>
<location filename="mainwindow.ui" line="173"/>
<location filename="mainwindow.ui" line="174"/>
<source>Exit (Esc)</source>
<translation>Colar (Esc)</translation>
</message>
<message>
<location filename="mainwindow.ui" line="176"/>
<location filename="mainwindow.ui" line="177"/>
<source>Exits and boots the installed operating system.</source>
<translation>Cola y arranca&apos;l sistema operativu instaláu.</translation>
</message>
<message>
<location filename="mainwindow.ui" line="191"/>
<location filename="mainwindow.ui" line="192"/>
<source>Advanced</source>
<translation>Avanzáu</translation>
</message>
<message>
<location filename="mainwindow.ui" line="203"/>
<location filename="mainwindow.ui" line="204"/>
<source>Edit config (e)</source>
<translation>Editar conf (e)</translation>
</message>
<message>
<location filename="mainwindow.ui" line="206"/>
<location filename="mainwindow.ui" line="207"/>
<source>Opens the config.txt and cmdline.txt for the installed OS in a text editor.</source>
<translation>Abre&apos;l config.txt y cmdline.txt nun editor de testu pa los SO instalaos.</translation>
</message>
<message>
<location filename="mainwindow.ui" line="218"/>
<location filename="mainwindow.ui" line="219"/>
<source>Online help (h)</source>
<translation>Ayuda en llinia (h)</translation>
</message>
<message>
<location filename="mainwindow.ui" line="221"/>
<location filename="mainwindow.ui" line="222"/>
<source>Opens a web browser displaying the Raspberry Pi Forum.</source>
<translation>Abre un restolador web qu&apos;amuesa&apos;l foru de Raspberry Pi.</translation>
</message>
<message>
<location filename="mainwindow.ui" line="236"/>
<location filename="mainwindow.ui" line="237"/>
<source>Wifi networks (w)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="239"/>
<location filename="mainwindow.ui" line="240"/>
<source>Select a wifi network to connect to</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="242"/>
<location filename="mainwindow.ui" line="243"/>
<source>W</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="255"/>
<source>Info (i)</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.ui" line="258"/>
<source>Show Information on selected OS</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="98"/>
<source>Setting up SD card</source>
Expand Down Expand Up @@ -379,8 +390,8 @@ AVISU: Esto desaniciará tolos datos na to tarxeta SD</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="338"/>
<location filename="mainwindow.cpp" line="1258"/>
<location filename="mainwindow.cpp" line="1818"/>
<location filename="mainwindow.cpp" line="1259"/>
<location filename="mainwindow.cpp" line="1819"/>
<source>RECOMMENDED</source>
<translation>ACONSEYÁU</translation>
</message>
Expand Down Expand Up @@ -432,113 +443,113 @@ AVISU: Esto desaniciará tolos datos na to tarxeta SD</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="686"/>
<location filename="mainwindow.cpp" line="1156"/>
<location filename="mainwindow.cpp" line="1157"/>
<source>Error</source>
<translation>Fallu</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="703"/>
<location filename="mainwindow.cpp" line="704"/>
<source>NOOBS v%1 - Built: %2</source>
<translation>NOOBS v%1 - Construcción: %2</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="735"/>
<location filename="mainwindow.cpp" line="736"/>
<source>HDMI preferred mode</source>
<translation>Mou preferíu de HDMI</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="739"/>
<location filename="mainwindow.cpp" line="740"/>
<source>HDMI safe mode</source>
<translation>Mou seguru de HDMI</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="743"/>
<location filename="mainwindow.cpp" line="744"/>
<source>composite PAL mode</source>
<translation>mou PAL compuestu</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="747"/>
<location filename="mainwindow.cpp" line="748"/>
<source>composite NTSC mode</source>
<translation>mou NTSC compuestu</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="803"/>
<location filename="mainwindow.cpp" line="804"/>
<source>Display Mode Changed</source>
<translation>Camudóse&apos;l mou de pantalla</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="804"/>
<location filename="mainwindow.cpp" line="805"/>
<source>Display mode changed to %1
Would you like to make this setting permanent?</source>
<translation>Camudóse&apos;l mou de pantalla a %1
¿Prestaríate afitar dafechu esti axuste?</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="922"/>
<location filename="mainwindow.cpp" line="1608"/>
<location filename="mainwindow.cpp" line="1616"/>
<location filename="mainwindow.cpp" line="923"/>
<location filename="mainwindow.cpp" line="1609"/>
<location filename="mainwindow.cpp" line="1617"/>
<source>No network access</source>
<translation>Ensin accesu de rede</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="923"/>
<location filename="mainwindow.cpp" line="924"/>
<source>Wired network access is required for this feature. Please insert a network cable into the network port.</source>
<translation>Ríquese l&apos;accesu a rede cableada pa esta carauterística. Por favor inxerta un cable de rede nel so puertu.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1142"/>
<location filename="mainwindow.cpp" line="1483"/>
<location filename="mainwindow.cpp" line="1493"/>
<location filename="mainwindow.cpp" line="1143"/>
<location filename="mainwindow.cpp" line="1484"/>
<location filename="mainwindow.cpp" line="1494"/>
<source>Download error</source>
<translation>Fallu de descarga</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1142"/>
<location filename="mainwindow.cpp" line="1143"/>
<source>Error downloading distribution list from Internet</source>
<translation>Fallu baxando&apos;l llistáu de distribuciones d&apos;intenet</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1156"/>
<location filename="mainwindow.cpp" line="1157"/>
<source>Error parsing list.json downloaded from server</source>
<translation>Fallu analizando&apos;l list.json baxáu del sirvidor</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1376"/>
<location filename="mainwindow.cpp" line="1377"/>
<source>Needed</source>
<translation>Necesarios</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1377"/>
<location filename="mainwindow.cpp" line="1378"/>
<source>Available</source>
<translation>Disponible</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1483"/>
<location filename="mainwindow.cpp" line="1484"/>
<source>Error downloading meta file</source>
<translation>Fallu baxando&apos;l ficheru meta</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1493"/>
<location filename="mainwindow.cpp" line="1494"/>
<source>Error writing downloaded file to SD card. SD card or file system may be damaged.</source>
<translation>Fallu baxando&apos;l ficheru a la tarxeta SD. Quiciabes tean dañaos o&apos;l sistema ficheros o la tarxeta SD.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1609"/>
<location filename="mainwindow.cpp" line="1610"/>
<source>Network access is required to use NOOBS without local images. Please select your wifi network in the next screen.</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1617"/>
<location filename="mainwindow.cpp" line="1618"/>
<source>Wired network access is required to use NOOBS without local images. Please insert a network cable into the network port.</source>
<translation>Ríquese l&apos;accesu a rede cableada pa usar NOOBS ensin imáxenes llocales. Por favor, inxerta un cable de rede nel so puertu.</translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1731"/>
<location filename="mainwindow.cpp" line="1732"/>
<source>Reformat drive?</source>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="mainwindow.cpp" line="1732"/>
<location filename="mainwindow.cpp" line="1733"/>
<source>Are you sure you want to reformat the drive &apos;%1&apos; for use with NOOBS? All existing data on the drive will be deleted!</source>
<translation type="unfinished"></translation>
</message>
Expand Down Expand Up @@ -693,25 +704,25 @@ Would you like to make this setting permanent?</source>
<translation>%1:Fallu desmontando</translation>
</message>
<message>
<location filename="multiimagewritethread.cpp" line="706"/>
<location filename="multiimagewritethread.cpp" line="708"/>
<source>Error creating file system</source>
<translation>Fallu creando&apos;l sistema ficheros</translation>
</message>
<message>
<location filename="multiimagewritethread.cpp" line="748"/>
<location filename="multiimagewritethread.cpp" line="819"/>
<location filename="multiimagewritethread.cpp" line="878"/>
<location filename="multiimagewritethread.cpp" line="750"/>
<location filename="multiimagewritethread.cpp" line="821"/>
<location filename="multiimagewritethread.cpp" line="880"/>
<source>Unknown compression format file extension. Expecting .lzo, .gz, .xz, .bz2 or .zip</source>
<translation>Desconozse la estensión del formatu del ficheru de compresión. Esperábase .lzo, .gz, .xz, .bz2 o .zip</translation>
</message>
<message>
<location filename="multiimagewritethread.cpp" line="781"/>
<location filename="multiimagewritethread.cpp" line="783"/>
<source>Error downloading or extracting tarball</source>
<translation>Fallu baxando o estrayendo&apos;l comprimíu</translation>
</message>
<message>
<location filename="multiimagewritethread.cpp" line="840"/>
<location filename="multiimagewritethread.cpp" line="899"/>
<location filename="multiimagewritethread.cpp" line="842"/>
<location filename="multiimagewritethread.cpp" line="901"/>
<source>Error downloading or writing OS to SD card</source>
<translation>Fallu baxando o escribiendo&apos;l SO a la tarxeta SD</translation>
</message>
Expand Down
Loading