summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--raveos-calamares-theme/PKGBUILD2
-rw-r--r--raveos-calamares-theme/etc/calamares/branding/raveos/stylesheet.qss21
-rw-r--r--raveos-calamares-theme/etc/calamares/branding/raveos/supporters.js5
-rw-r--r--raveos-calamares-theme/etc/calamares/modules/shellprocess-supporters.conf2
-rw-r--r--raveos-calamares/0003-restart-button.patch109
-rw-r--r--raveos-calamares/PKGBUILD2
6 files changed, 115 insertions, 26 deletions
diff --git a/raveos-calamares-theme/PKGBUILD b/raveos-calamares-theme/PKGBUILD
index 12b0700..e30ae5a 100644
--- a/raveos-calamares-theme/PKGBUILD
+++ b/raveos-calamares-theme/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: nippy <nippy@tuta.io>
pkgname=raveos-calamares-theme
pkgver=2.0.0
-pkgrel=61
+pkgrel=62
pkgdesc="RaveOS Calamares Theme"
arch=('any')
url="https://git.rp1.hu/RaveOS"
diff --git a/raveos-calamares-theme/etc/calamares/branding/raveos/stylesheet.qss b/raveos-calamares-theme/etc/calamares/branding/raveos/stylesheet.qss
index 56cc368..8a51e3c 100644
--- a/raveos-calamares-theme/etc/calamares/branding/raveos/stylesheet.qss
+++ b/raveos-calamares-theme/etc/calamares/branding/raveos/stylesheet.qss
@@ -414,3 +414,24 @@ QScrollBar::handle:horizontal {
QScrollBar::handle:horizontal:hover {
background-color: #95a5a6;
}
+
+/* ---------------- RaveOS restart dialog ---------------- */
+
+#raveosDialog {
+ background-color: #2B2B2B;
+}
+
+#raveosDialogLabel {
+ color: #ECF0F1;
+ font-size: 15px;
+ padding: 6px 2px;
+}
+
+#raveosDialogCancel {
+ background-color: #7f8c8d;
+ color: #ffffff;
+}
+
+#raveosDialogCancel:hover {
+ background-color: #95a5a6;
+}
diff --git a/raveos-calamares-theme/etc/calamares/branding/raveos/supporters.js b/raveos-calamares-theme/etc/calamares/branding/raveos/supporters.js
index 81c533f..2e9859d 100644
--- a/raveos-calamares-theme/etc/calamares/branding/raveos/supporters.js
+++ b/raveos-calamares-theme/etc/calamares/branding/raveos/supporters.js
@@ -1,9 +1,8 @@
// RaveOS supporters list
// The Calamares finished page reads this file (finishedq.qml).
-// One name per line. The list can also be refreshed during install from:
-// https://page.rp1.hu/supporters.js
+// One name per line inside the array. The list can also be refreshed
+// during install from: https://page.rp1.hu/supporters.js
.pragma library
var names = [
- "New Supporter"
]
diff --git a/raveos-calamares-theme/etc/calamares/modules/shellprocess-supporters.conf b/raveos-calamares-theme/etc/calamares/modules/shellprocess-supporters.conf
index 35c080f..2f6c6d8 100644
--- a/raveos-calamares-theme/etc/calamares/modules/shellprocess-supporters.conf
+++ b/raveos-calamares-theme/etc/calamares/modules/shellprocess-supporters.conf
@@ -5,5 +5,5 @@ script:
# RaveOS: fetch the fresh supporters list (if online). Validated steps:
# download -> check "var names" and "]" -> replace. On any error the
# packaged list stays (|| true).
- - command: "curl -fsSL --max-time 10 https://page.rp1.hu/supporters.js -o /tmp/raveos_supporters.js && grep -q 'var names' /tmp/raveos_supporters.js && grep -q ']' /tmp/raveos_supporters.js && cp /tmp/raveos_supporters.js /etc/calamares/branding/raveos/supporters.js || true"
+ - command: "curl -fsSL --max-time 10 https://page.rp1.hu/supporters.js?t=$(date +%s) -o /tmp/raveos_supporters.js && grep -q 'var names' /tmp/raveos_supporters.js && grep -q ']' /tmp/raveos_supporters.js && cp /tmp/raveos_supporters.js /etc/calamares/branding/raveos/supporters.js || true"
name: "Downloading supporters list..."
diff --git a/raveos-calamares/0003-restart-button.patch b/raveos-calamares/0003-restart-button.patch
index a06ea52..bf8608e 100644
--- a/raveos-calamares/0003-restart-button.patch
+++ b/raveos-calamares/0003-restart-button.patch
@@ -1,53 +1,122 @@
--- a/src/calamares/CalamaresWindow.cpp
+++ b/src/calamares/CalamaresWindow.cpp
-@@ -35,6 +35,9 @@
+@@ -24,6 +24,7 @@
+ #include "utils/Logger.h"
+ #include "utils/Qml.h"
+ #include "utils/Retranslator.h"
++#include "viewpages/ExecutionViewStep.h"
+ #include "viewpages/ViewStep.h"
+
+ #include <QApplication>
+@@ -34,7 +35,11 @@
+ #endif
#include <QFile>
#include <QFileInfo>
++#include <QDialog>
#include <QLabel>
-+#include <QMessageBox>
++#include <QLocale>
+#include <QProcess>
+#include <QPushButton>
#ifdef WITH_QML
#include <QQmlContext>
#include <QQmlEngine>
-@@ -216,6 +219,36 @@
+@@ -207,6 +212,49 @@
+ return sideBox;
+ }
+
++/** @brief RaveOS: localized confirm dialog for the global restart button. */
++static bool
++raveosConfirmRestart( QWidget* parent )
++{
++ const QString lang = QLocale().name();
++ const bool hu = lang.startsWith( QStringLiteral( "hu" ) );
++ const bool de = lang.startsWith( QStringLiteral( "de" ) );
++ const QString question = hu ? QStringLiteral( "Újraindítod a számítógépet?" )
++ : ( de ? QStringLiteral( "Computer neu starten?" )
++ : QStringLiteral( "Restart the computer?" ) );
++ const QString okText = hu ? QStringLiteral( "Újraindítás" )
++ : ( de ? QStringLiteral( "Neu starten" ) : QStringLiteral( "Restart" ) );
++ const QString cancelText = hu ? QStringLiteral( "Mégse" )
++ : ( de ? QStringLiteral( "Abbrechen" ) : QStringLiteral( "Cancel" ) );
++
++ QDialog dialog( parent );
++ dialog.setObjectName( QStringLiteral( "raveosDialog" ) );
++ dialog.setWindowTitle( QStringLiteral( "RaveOS" ) );
++ dialog.setMinimumWidth( 420 );
++
++ auto* layout = new QVBoxLayout( &dialog );
++ auto* label = new QLabel( question, &dialog );
++ label->setObjectName( QStringLiteral( "raveosDialogLabel" ) );
++ label->setWordWrap( true );
++ layout->addWidget( label );
++ layout->addSpacing( 10 );
++
++ auto* buttons = new QHBoxLayout;
++ buttons->addStretch();
++ auto* cancel = new QPushButton( cancelText, &dialog );
++ cancel->setObjectName( QStringLiteral( "raveosDialogCancel" ) );
++ auto* ok = new QPushButton( okText, &dialog );
++ ok->setObjectName( QStringLiteral( "raveosDialogOk" ) );
++ buttons->addWidget( cancel );
++ buttons->addWidget( ok );
++ layout->addLayout( buttons );
++
++ QObject::connect( cancel, &QPushButton::clicked, &dialog, &QDialog::reject );
++ QObject::connect( ok, &QPushButton::clicked, &dialog, &QDialog::accept );
++
++ return dialog.exec() == QDialog::Accepted;
++}
++
+ static QWidget*
+ getWidgetNavigation( Calamares::DebugWindowManager*,
+ Calamares::ViewManager* viewManager,
+@@ -216,6 +264,45 @@
{
QWidget* navigation = new QWidget( parent );
QBoxLayout* bottomLayout = new QHBoxLayout;
+
-+ // RaveOS: globalis ujrainditas gomb a bal also sarokban (minden oldalon lathato)
++ // RaveOS: globalis ujrainditas gomb a bal also sarokban.
++ // Telepites kozben (exec) es a finish oldalon NEM latszik.
+ {
-+ auto* restart = new QPushButton(
-+ getButtonIcon( QStringLiteral( "view-refresh" ) ),
-+ QCoreApplication::translate( CalamaresWindow::staticMetaObject.className(), "&Restart", "@button" ),
-+ navigation );
++ auto* restart = new QPushButton( navigation );
+ restart->setObjectName( "restartButton" );
-+ restart->setToolTip( QCoreApplication::translate( CalamaresWindow::staticMetaObject.className(),
-+ "Restart the computer",
-+ "@tooltip" ) );
++ CALAMARES_RETRANSLATE_FOR(
++ restart,
++ restart->setText( QCoreApplication::translate( CalamaresWindow::staticMetaObject.className(),
++ "&Restart",
++ "@button" ) );
++ restart->setToolTip( QCoreApplication::translate( CalamaresWindow::staticMetaObject.className(),
++ "Restart the computer",
++ "@tooltip" ) ); );
++ restart->setIcon( getButtonIcon( QStringLiteral( "view-refresh" ) ) );
+ QObject::connect( restart,
+ &QPushButton::clicked,
-+ navigation,
-+ []()
++ restart,
++ [restart]()
+ {
-+ if ( QMessageBox::question( nullptr,
-+ QStringLiteral( "RaveOS" ),
-+ QCoreApplication::translate( "calamares-sidebar",
-+ "Restart the computer?",
-+ "@info" ) )
-+ == QMessageBox::Yes )
++ if ( raveosConfirmRestart( restart ) )
+ {
+ QProcess::startDetached( QStringLiteral( "systemctl" ),
+ { QStringLiteral( "-i" ), QStringLiteral( "reboot" ) } );
+ }
+ } );
+ bottomLayout->addWidget( restart );
++
++ auto updateVisibility = [restart, viewManager]()
++ {
++ auto* step = viewManager->currentStep();
++ const bool inExec = qobject_cast< Calamares::ExecutionViewStep* >( step ) != nullptr;
++ const bool onFinish = step && step->isAtEnd() && !step->isNextEnabled();
++ restart->setVisible( !inExec && !onFinish );
++ };
++ QObject::connect( viewManager, &Calamares::ViewManager::currentStepChanged, restart, updateVisibility );
++ updateVisibility();
+ }
+
bottomLayout->addStretch();
// Create buttons and sets an initial icon; the icons may change
-@@ -272,7 +305,7 @@
+@@ -272,7 +359,7 @@
bottomLayout->addWidget( quit );
}
diff --git a/raveos-calamares/PKGBUILD b/raveos-calamares/PKGBUILD
index fc96a9b..59e9f90 100644
--- a/raveos-calamares/PKGBUILD
+++ b/raveos-calamares/PKGBUILD
@@ -4,7 +4,7 @@
_pkgname="calamares"
pkgname="$_pkgname"
pkgver=3.4.2
-pkgrel=10
+pkgrel=12
pkgdesc="Distribution-independent installer framework"
url="https://codeberg.org/Calamares/calamares"
license=("GPL-3.0-or-later")