401 lines
18 KiB
Diff
401 lines
18 KiB
Diff
|
|
From 662c8f4cdf8838d44f4a5b8be5455f840c0e314c Mon Sep 17 00:00:00 2001
|
||
|
|
From: cui-gaoleng <562344211@qq.com>
|
||
|
|
Date: Tue, 19 Nov 2024 13:43:48 +0800
|
||
|
|
Subject: [PATCH] =?UTF-8?q?=E8=B0=83=E8=AF=95=E4=BF=A1=E6=81=AF=E5=92=8C?=
|
||
|
|
=?UTF-8?q?=E5=B7=B2=E6=B3=A8=E9=87=8A=E4=BB=A3=E7=A0=81=E5=88=A0=E9=99=A4?=
|
||
|
|
MIME-Version: 1.0
|
||
|
|
Content-Type: text/plain; charset=UTF-8
|
||
|
|
Content-Transfer-Encoding: 8bit
|
||
|
|
|
||
|
|
---
|
||
|
|
src/calamares/CalamaresWindow.cpp | 3 -
|
||
|
|
.../progresstree/ProgressTreeDelegate.cpp | 9 -
|
||
|
|
.../progresstree/ProgressTreeView.cpp | 2 -
|
||
|
|
src/libcalamares/CalamaresAbout.cpp | 1 -
|
||
|
|
.../modulesystem/CppJobModule.cpp | 4 -
|
||
|
|
src/modules/keyboard/KeyboardPage.cpp | 19 -
|
||
|
|
src/modules/keyboard/KeyboardPage.ui | 3 -
|
||
|
|
src/modules/locale/LocalePage.cpp | 20 +-
|
||
|
|
.../packagechooser/packagechooser.conf | 16 +-
|
||
|
|
src/modules/welcome/WelcomePage.cpp | 74 +-
|
||
|
|
11 files changed, 7 insertions(+), 862 deletions(-)
|
||
|
|
|
||
|
|
diff --git a/src/calamares/CalamaresWindow.cpp b/src/calamares/CalamaresWindow.cpp
|
||
|
|
index 4721cb9..4917f75 100644
|
||
|
|
--- a/src/calamares/CalamaresWindow.cpp
|
||
|
|
+++ b/src/calamares/CalamaresWindow.cpp
|
||
|
|
@@ -440,7 +440,6 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
|
||
|
|
int h = qBound( minimumSize.height(), windowDimensionToPixels( brandingSizes.second ), availableSize.height() );
|
||
|
|
|
||
|
|
cDebug() << Logger::SubEntry << "Proposed window size:" << w << h;
|
||
|
|
- //resize( availableSize.width(), availableSize.height() );//通用桌面大小作为窗口大小
|
||
|
|
resize( w, h );//通用桌面大小作为窗口大小
|
||
|
|
QWidget* baseWidget = this;
|
||
|
|
if ( !( branding->imagePath( ImageEntry::ProductWallpaper ).isEmpty() ) )
|
||
|
|
@@ -519,8 +518,6 @@ CalamaresWindow::CalamaresWindow( QWidget* parent )
|
||
|
|
Calamares::unmarginLayout( contentsLayout );
|
||
|
|
baseWidget->setLayout( mainLayout );
|
||
|
|
setStyleSheet( Calamares::Branding::instance()->stylesheet() );
|
||
|
|
- cDebug()<<"<---------------------------WindowWindowSize-------------------------------------->"<<this->size();
|
||
|
|
- cDebug()<< "<--------------------sideBox->size()-------------------->"<< sideBox->size();
|
||
|
|
this->setFixedSize(this->size());
|
||
|
|
}
|
||
|
|
|
||
|
|
diff --git a/src/calamares/progresstree/ProgressTreeDelegate.cpp b/src/calamares/progresstree/ProgressTreeDelegate.cpp
|
||
|
|
index 6d5f865..7541356 100644
|
||
|
|
--- a/src/calamares/progresstree/ProgressTreeDelegate.cpp
|
||
|
|
+++ b/src/calamares/progresstree/ProgressTreeDelegate.cpp
|
||
|
|
@@ -53,9 +53,6 @@ static QString getTypeOfStep(const QString& stepString){
|
||
|
|
|
||
|
|
// 将地区枚举值转换为字符串
|
||
|
|
QString countryString = QLocale::countryToString(country);
|
||
|
|
- // 输出当前语言
|
||
|
|
- cDebug() << "-------------------------------------------当前系统语言:" << languageString;
|
||
|
|
- cDebug() << "-------------------------------------------当前系统地区:" << countryString;
|
||
|
|
if(contains(baseSetting1,stepString)){
|
||
|
|
return "BaseSetting";
|
||
|
|
}
|
||
|
|
@@ -145,7 +142,6 @@ paintViewStep( QPainter* painter, const QStyleOptionViewItem& option, const QMod
|
||
|
|
shrinkSteps++;
|
||
|
|
|
||
|
|
QRectF boundingBox;
|
||
|
|
- cDebug() << "index.data().toString()" << index.data().toString();
|
||
|
|
QString text;
|
||
|
|
if(index.data().toString()=="欢迎" || index.data().toString()=="Welcome"||!isVisable(index.data().toString())){
|
||
|
|
text = "";
|
||
|
|
@@ -179,7 +175,6 @@ ProgressTreeDelegate::sizeHint( const QStyleOptionViewItem& option, const QModel
|
||
|
|
}
|
||
|
|
|
||
|
|
QFont font = qApp->font();
|
||
|
|
- cDebug() << "ProgressTreeDelegate::sizeHint";
|
||
|
|
|
||
|
|
font.setPointSize( item_fontsize() );
|
||
|
|
QFontMetrics fm( font );
|
||
|
|
@@ -190,14 +185,12 @@ ProgressTreeDelegate::sizeHint( const QStyleOptionViewItem& option, const QModel
|
||
|
|
}else{
|
||
|
|
return QSize( (Calamares::windowMinimumWidth*0.9)/3, height*2 );
|
||
|
|
}
|
||
|
|
-// return QSize( option.rect.width(), height );
|
||
|
|
|
||
|
|
}
|
||
|
|
|
||
|
|
void
|
||
|
|
ProgressTreeDelegate::paint( QPainter* painter, const QStyleOptionViewItem& option, const QModelIndex& index ) const
|
||
|
|
{
|
||
|
|
- cDebug() << "ProgressTreeDelegate::paint----------";
|
||
|
|
QStyleOptionViewItem opt = option;
|
||
|
|
|
||
|
|
painter->save();
|
||
|
|
@@ -209,11 +202,9 @@ ProgressTreeDelegate::paint( QPainter* painter, const QStyleOptionViewItem& opti
|
||
|
|
QColor( Calamares::Branding::instance()->styleString( Calamares::Branding::SidebarBackground ) ) );
|
||
|
|
painter->setPen( QColor( Calamares::Branding::instance()->styleString( Calamares::Branding::SidebarText ) ) );
|
||
|
|
if(index.data().toString()=="欢迎" || index.data().toString()=="Welcome"){
|
||
|
|
- cDebug() << "ProgressTreeDelegate::欢迎Welcome--------Nopaint----------";
|
||
|
|
}else{
|
||
|
|
paintViewStep( painter, opt, index );
|
||
|
|
}
|
||
|
|
- //paintViewStep( painter, opt, index );
|
||
|
|
|
||
|
|
painter->restore();
|
||
|
|
}
|
||
|
|
diff --git a/src/calamares/progresstree/ProgressTreeView.cpp b/src/calamares/progresstree/ProgressTreeView.cpp
|
||
|
|
index 29ee7ee..a9a15b8 100644
|
||
|
|
--- a/src/calamares/progresstree/ProgressTreeView.cpp
|
||
|
|
+++ b/src/calamares/progresstree/ProgressTreeView.cpp
|
||
|
|
@@ -68,14 +68,12 @@ ProgressTreeView::setModel( QAbstractItemModel* model )
|
||
|
|
void
|
||
|
|
ProgressTreeView::update()
|
||
|
|
{
|
||
|
|
- cDebug() << "update ---------------------";
|
||
|
|
viewport()->update();
|
||
|
|
}
|
||
|
|
|
||
|
|
void
|
||
|
|
ProgressTreeView::updateVisibility(int currentStep)
|
||
|
|
{
|
||
|
|
- cDebug() << "int currentStep ------------------ " << currentStep;
|
||
|
|
// 在第一个步骤隐藏,其他步骤显示
|
||
|
|
this->setVisible(currentStep > 0);
|
||
|
|
}
|
||
|
|
|
||
|
|
diff --git a/src/libcalamares/CalamaresAbout.cpp b/src/libcalamares/CalamaresAbout.cpp
|
||
|
|
index 65a1b9d..595efc7 100644
|
||
|
|
--- a/src/libcalamares/CalamaresAbout.cpp
|
||
|
|
+++ b/src/libcalamares/CalamaresAbout.cpp
|
||
|
|
@@ -65,7 +65,6 @@ Calamares::aboutString()
|
||
|
|
{
|
||
|
|
return substituteVersions( QCoreApplication::translate( "AboutData", s_header ) ) + aboutMaintainers()
|
||
|
|
+ QCoreApplication::translate( "AboutData", s_footer );
|
||
|
|
- // return aboutMaintainers()+ QCoreApplication::translate( "AboutData", s_footer );
|
||
|
|
}
|
||
|
|
|
||
|
|
const QString
|
||
|
|
diff --git a/src/libcalamaresui/modulesystem/CppJobModule.cpp b/src/libcalamaresui/modulesystem/CppJobModule.cpp
|
||
|
|
index c211006..b35a457 100644
|
||
|
|
--- a/src/libcalamaresui/modulesystem/CppJobModule.cpp
|
||
|
|
+++ b/src/libcalamaresui/modulesystem/CppJobModule.cpp
|
||
|
|
@@ -53,10 +53,6 @@ CppJobModule::loadSelf()
|
||
|
|
cDebug() << "Could not load module:" << m_loader->errorString();
|
||
|
|
return;
|
||
|
|
}
|
||
|
|
- // cDebug() << "CppJobModule loading self for instance" << instanceKey()
|
||
|
|
- // << "\nCppJobModule at address" << this
|
||
|
|
- // << "\nCalamares::PluginFactory at address" << pf
|
||
|
|
- // << "\nCppJob at address" << cppJob;
|
||
|
|
|
||
|
|
cppJob->setModuleInstanceKey( instanceKey() );
|
||
|
|
cppJob->setConfigurationMap( m_configurationMap );
|
||
|
|
diff --git a/src/modules/keyboard/KeyboardPage.cpp b/src/modules/keyboard/KeyboardPage.cpp
|
||
|
|
index 3f06158..be60521 100644
|
||
|
|
--- a/src/modules/keyboard/KeyboardPage.cpp
|
||
|
|
+++ b/src/modules/keyboard/KeyboardPage.cpp
|
||
|
|
@@ -48,9 +48,6 @@ KeyboardPage::KeyboardPage( Config* config, QWidget* parent )
|
||
|
|
{
|
||
|
|
ui->setupUi( this );
|
||
|
|
this->setContentsMargins(50,0,50,0);
|
||
|
|
- // Keyboard Preview
|
||
|
|
- // ui->KBPreviewLayout->addWidget( m_keyboardPreview );
|
||
|
|
-
|
||
|
|
|
||
|
|
{
|
||
|
|
auto* model = config->keyboardModels();
|
||
|
|
@@ -93,27 +90,11 @@ KeyboardPage::KeyboardPage( Config* config, QWidget* parent )
|
||
|
|
&QItemSelectionModel::currentChanged,
|
||
|
|
[ this ]( const QModelIndex& current )
|
||
|
|
{ m_config->keyboardLayouts()->setCurrentIndex( current.row() ); } );
|
||
|
|
- // connect( config->keyboardLayouts(),
|
||
|
|
- // &KeyboardLayoutModel::currentIndexChanged,
|
||
|
|
- // [ this ]( int index )
|
||
|
|
- // {
|
||
|
|
- // ui->layoutSelector->setCurrentIndex( m_config->keyboardLayouts()->index( index ) );
|
||
|
|
- // m_keyboardPreview->setLayout( m_config->keyboardLayouts()->key( index ) );
|
||
|
|
- // m_keyboardPreview->setVariant(
|
||
|
|
- // m_config->keyboardVariants()->key( m_config->keyboardVariants()->currentIndex() ) );
|
||
|
|
- // } );
|
||
|
|
|
||
|
|
connect( ui->variantSelector->selectionModel(),
|
||
|
|
&QItemSelectionModel::currentChanged,
|
||
|
|
[ this ]( const QModelIndex& current )
|
||
|
|
{ m_config->keyboardVariants()->setCurrentIndex( current.row() ); } );
|
||
|
|
- // connect( config->keyboardVariants(),
|
||
|
|
- // &KeyboardVariantsModel::currentIndexChanged,
|
||
|
|
- // [ this ]( int index )
|
||
|
|
- // {
|
||
|
|
- // ui->variantSelector->setCurrentIndex( m_config->keyboardVariants()->index( index ) );
|
||
|
|
- // m_keyboardPreview->setVariant( m_config->keyboardVariants()->key( index ) );
|
||
|
|
- // } );
|
||
|
|
|
||
|
|
connect( ui->groupSelector,
|
||
|
|
QOverload< int >::of( &QComboBox::currentIndexChanged ),
|
||
|
|
diff --git a/src/modules/keyboard/KeyboardPage.ui b/src/modules/keyboard/KeyboardPage.ui
|
||
|
|
index 1d6afbf..70cfca3 100644
|
||
|
|
--- a/src/modules/keyboard/KeyboardPage.ui
|
||
|
|
+++ b/src/modules/keyboard/KeyboardPage.ui
|
||
|
|
@@ -45,9 +45,6 @@ SPDX-License-Identifier: GPL-3.0-or-later
|
||
|
|
</property>
|
||
|
|
</spacer>
|
||
|
|
</item>
|
||
|
|
- <!-- <item>
|
||
|
|
- <layout class="QVBoxLayout" name="KBPreviewLayout"/>
|
||
|
|
- </item> -->
|
||
|
|
<item>
|
||
|
|
<spacer name="horizontalSpacer">
|
||
|
|
<property name="orientation">
|
||
|
|
diff --git a/src/modules/locale/LocalePage.cpp b/src/modules/locale/LocalePage.cpp
|
||
|
|
index 0568067..ed50574 100644
|
||
|
|
--- a/src/modules/locale/LocalePage.cpp
|
||
|
|
+++ b/src/modules/locale/LocalePage.cpp
|
||
|
|
@@ -32,13 +32,6 @@ LocalePage::LocalePage( Config* config, QWidget* parent )
|
||
|
|
{
|
||
|
|
QBoxLayout* mainLayout = new QVBoxLayout;
|
||
|
|
mainLayout->setContentsMargins(50,0,50,0);
|
||
|
|
- //QBoxLayout* tzwLayout = new QHBoxLayout;
|
||
|
|
- //m_tzWidget = new TimeZoneWidget( m_config->zonesModel(), this );
|
||
|
|
- //tzwLayout->addStretch();
|
||
|
|
- //tzwLayout->addWidget( m_tzWidget );
|
||
|
|
- //tzwLayout->addStretch();
|
||
|
|
- // Adjust for margins and spacing in this page
|
||
|
|
- //m_tzWidget->setMinimumHeight( m_tzWidget->minimumHeight() + 12 ); // 2 * spacing
|
||
|
|
|
||
|
|
QBoxLayout* zoneAndRegionLayout = new QVBoxLayout;
|
||
|
|
m_regionLabel = new QLabel( this );
|
||
|
|
@@ -90,7 +83,7 @@ LocalePage::LocalePage( Config* config, QWidget* parent )
|
||
|
|
m_formatsChangeButton->setSizePolicy( QSizePolicy::Preferred, QSizePolicy::Preferred );
|
||
|
|
formatsLayout->addWidget( m_formatsChangeButton );
|
||
|
|
formatsLayout->addSpacing(20);
|
||
|
|
- //mainLayout->addLayout( tzwLayout );
|
||
|
|
+
|
||
|
|
mainLayout->addStretch();
|
||
|
|
mainLayout->addLayout( zoneAndRegionLayout );
|
||
|
|
mainLayout->addStretch();
|
||
|
|
@@ -100,7 +93,7 @@ LocalePage::LocalePage( Config* config, QWidget* parent )
|
||
|
|
mainLayout->addSpacing(20);
|
||
|
|
mainLayout->addLayout( timezoneLayout );
|
||
|
|
mainLayout->addStretch();
|
||
|
|
- //setMinimumWidth( m_tzWidget->width() );
|
||
|
|
+
|
||
|
|
setLayout( mainLayout );
|
||
|
|
|
||
|
|
m_localeChangeButton->hide();
|
||
|
|
@@ -114,20 +107,15 @@ LocalePage::LocalePage( Config* config, QWidget* parent )
|
||
|
|
zones->setRegion( location->region() );
|
||
|
|
m_regionCombo->setModel( regions );
|
||
|
|
m_zoneCombo->setModel( zones );
|
||
|
|
- //m_tzWidget->setCurrentLocation( location );
|
||
|
|
+
|
||
|
|
locationChanged( location ); // doesn't inform TZ widget
|
||
|
|
}
|
||
|
|
|
||
|
|
connect( config, &Config::currentLCStatusChanged, m_formatsLabel, &QLabel::setText );
|
||
|
|
connect( config, &Config::currentLanguageStatusChanged, m_localeLabel, &QLabel::setText );
|
||
|
|
connect( config, &Config::currentZoneChanged, m_timezoneLabel , &QLabel::setText);
|
||
|
|
- //connect( config, &Config::currentLocationChanged, m_tzWidget, &TimeZoneWidget::setCurrentLocation );
|
||
|
|
+
|
||
|
|
connect( config, &Config::currentLocationChanged, this, &LocalePage::locationChanged );
|
||
|
|
- // connect( m_tzWidget,
|
||
|
|
- // &TimeZoneWidget::locationChanged,
|
||
|
|
- // config,
|
||
|
|
- // QOverload< const Calamares::Locale::TimeZoneData* >::of( &Config::setCurrentLocation ) );
|
||
|
|
-
|
||
|
|
connect( m_regionCombo, QOverload< int >::of( &QComboBox::currentIndexChanged ), this, &LocalePage::regionChanged );
|
||
|
|
connect( m_zoneCombo, QOverload< int >::of( &QComboBox::currentIndexChanged ), this, &LocalePage::zoneChanged );
|
||
|
|
|
||
|
|
diff --git a/src/modules/packagechooser/packagechooser.conf b/src/modules/packagechooser/packagechooser.conf
|
||
|
|
index e7b9b00..aa048e2 100644
|
||
|
|
--- a/src/modules/packagechooser/packagechooser.conf
|
||
|
|
+++ b/src/modules/packagechooser/packagechooser.conf
|
||
|
|
@@ -157,11 +157,7 @@ items:
|
||
|
|
description[nl]: "Kies eventueel een desktop-omgeving uit deze lijst. Als u geen desktop-omgeving wenst te gebruiken, kies er dan geen. In dat geval start het systeem straks op in tekst-modus en kunt u later alsnog een desktop-omgeving installeren."
|
||
|
|
description[zh]: "请选择一个桌面环境。如果您不想安装桌面环境也没关系,您可以稍后再为系统安装桌面环境。"
|
||
|
|
screenshot: ":/images/Minimal-Install.png"
|
||
|
|
- # - id: kde
|
||
|
|
- # packages: [ kde-frameworks, kde-plasma, kde-gear ]
|
||
|
|
- # name: Plasma Desktop
|
||
|
|
- # description: "KDE Plasma Desktop, simple by default, a clean work area for real-world usage which intends to stay out of your way. Plasma is powerful when needed, enabling the user to create the workflow that makes them more effective to complete their tasks."
|
||
|
|
- # screenshot: ":/images/Plasma.png"
|
||
|
|
+
|
||
|
|
- id: gnome
|
||
|
|
packages: [ checkpolicy, code, xorg-*, dejavu-fonts, liberation-fonts, gnu-*-fonts, google-*-fonts, adwaita-icon-theme, atk, atkmm, at-spi2-atk, at-spi2-core, baobab, abattis-cantarell-fonts, cheese, clutter, clutter-gst3, clutter-gtk, cogl, dconf, dconf-editor, devhelp, eog, epiphany, evince, evolution-data-server, file-roller, folks, gcab, gcr, gdk-pixbuf2, gdm, gedit, geocode-glib, gfbgraph, gjs, glib2, glibmm24, glib-networking, gmime30, gnome-autoar, gnome-backgrounds, gnome-bluetooth, gnome-builder, gnome-calculator, gnome-calendar, gnome-characters, gnome-clocks, gnome-color-manager, gnome-contacts, gnome-control-center, gnome-desktop3, gnome-disk-utility, gnome-font-viewer, gnome-getting-started-docs, gnome-initial-setup, gnome-keyring, gnome-logs, gnome-menus, gnome-music, gnome-online-accounts, gnome-online-miners, gnome-photos, gnome-remote-desktop, gnome-screenshot, gnome-session, gnome-settings-daemon, gnome-shell, gnome-shell-extensions, gnome-software, gnome-system-monitor, gnome-terminal, gnome-tour, gnome-user-docs, gnome-user-share, gnome-video-effects, gnome-weather, gobject-introspection, gom, grilo, grilo-plugins, gsettings-desktop-schemas, gsound, gspell, gssdp, gtk3, gtk4, gtk-doc, gtkmm30, gtksourceview4, gtk-vnc2, gupnp, gupnp-av, gupnp-dlna, gvfs, json-glib, libchamplain, libdazzle, libgdata, libgee, libgnomekbd, libgsf, libgtop2, libgweather, libgxps, libhandy, libmediaart, libnma, libnotify, libpeas, librsvg2, libsecret, libsigc++20, libsoup, mm-common, mutter, nautilus, orca, pango, pangomm, libphodav, python3-pyatspi, python3-gobject, rest, rygel, simple-scan, sushi, sysprof, tepl, totem, totem-pl-parser, tracker3, tracker3-miners, vala, vte291, yelp, yelp-tools, yelp-xsl, zenity, devstation-config, ibus-libpinyin ]
|
||
|
|
name: DevStation
|
||
|
|
@@ -169,13 +165,3 @@ items:
|
||
|
|
description: GNU Networked Object Modeling Environment Desktop
|
||
|
|
description[zh]: Devstation系统桌面
|
||
|
|
screenshot: ":/images/gnome.png"
|
||
|
|
- #- id: ukui
|
||
|
|
- # packages: [ ukui ]
|
||
|
|
- # name: UKUI
|
||
|
|
- # description: Linux Desktop
|
||
|
|
- # screenshot: ":/images/UKUI.png"
|
||
|
|
- # - id: calamares
|
||
|
|
- # appdata: ../io.calamares.calamares.appdata.xml
|
||
|
|
- # screenshot: ":/images/calamares.png"
|
||
|
|
- # - id: kate
|
||
|
|
- # appstream: org.kde.kwrite.desktop
|
||
|
|
diff --git a/src/modules/welcome/WelcomePage.cpp b/src/modules/welcome/WelcomePage.cpp
|
||
|
|
index 88f38c2..471187b 100644
|
||
|
|
--- a/src/modules/welcome/WelcomePage.cpp
|
||
|
|
+++ b/src/modules/welcome/WelcomePage.cpp
|
||
|
|
@@ -91,21 +91,7 @@ WelcomePage::WelcomePage( Config* config, QWidget* parent )
|
||
|
|
}
|
||
|
|
|
||
|
|
void
|
||
|
|
-WelcomePage::init()
|
||
|
|
-{
|
||
|
|
- //setup the url buttons
|
||
|
|
- // setupButton( WelcomePage::Button::Support, m_conf->supportUrl() );
|
||
|
|
- // setupButton( WelcomePage::Button::KnownIssues, m_conf->knownIssuesUrl() );
|
||
|
|
- // setupButton( WelcomePage::Button::ReleaseNotes, m_conf->releaseNotesUrl() );
|
||
|
|
- // setupButton( WelcomePage::Button::Donate, m_conf->donateUrl() );
|
||
|
|
-
|
||
|
|
- //language icon
|
||
|
|
- // auto icon = Calamares::Branding::instance()->image( m_conf->languageIcon(), QSize( 48, 48 ) );
|
||
|
|
- // if ( !icon.isNull() )
|
||
|
|
- // {
|
||
|
|
- // setLanguageIcon( icon );
|
||
|
|
- // }
|
||
|
|
-}
|
||
|
|
+WelcomePage::init(){}
|
||
|
|
|
||
|
|
void
|
||
|
|
WelcomePage::initLanguages()
|
||
|
|
@@ -125,57 +111,6 @@ WelcomePage::initLanguages()
|
||
|
|
&Config::setLocaleIndex );
|
||
|
|
}
|
||
|
|
|
||
|
|
-// void
|
||
|
|
-// WelcomePage::setupButton( Button role, const QString& url )
|
||
|
|
-// {
|
||
|
|
-// QPushButton* button = nullptr;
|
||
|
|
-// Calamares::ImageType icon = Calamares::Information;
|
||
|
|
-
|
||
|
|
-// switch ( role )
|
||
|
|
-// {
|
||
|
|
-// case Button::Donate:
|
||
|
|
-// button = ui->donateButton;
|
||
|
|
-// icon = Calamares::Donate;
|
||
|
|
-// break;
|
||
|
|
-// case Button::KnownIssues:
|
||
|
|
-// button = ui->knownIssuesButton;
|
||
|
|
-// icon = Calamares::Bugs;
|
||
|
|
-// break;
|
||
|
|
-// case Button::ReleaseNotes:
|
||
|
|
-// button = ui->releaseNotesButton;
|
||
|
|
-// icon = Calamares::Release;
|
||
|
|
-// break;
|
||
|
|
-// case Button::Support:
|
||
|
|
-// button = ui->supportButton;
|
||
|
|
-// icon = Calamares::Help;
|
||
|
|
-// break;
|
||
|
|
-// }
|
||
|
|
-// if ( !button )
|
||
|
|
-// {
|
||
|
|
-// cWarning() << "Unknown button role" << smash( role );
|
||
|
|
-// return;
|
||
|
|
-// }
|
||
|
|
-
|
||
|
|
-// if ( url.isEmpty() )
|
||
|
|
-// {
|
||
|
|
-// button->hide();
|
||
|
|
-// return;
|
||
|
|
-// }
|
||
|
|
-
|
||
|
|
-// QUrl u( url );
|
||
|
|
-// if ( u.isValid() )
|
||
|
|
-// {
|
||
|
|
-// auto size = 2 * QSize( Calamares::defaultFontHeight(), Calamares::defaultFontHeight() );
|
||
|
|
-// button->setIcon( Calamares::defaultPixmap( icon, Calamares::Original, size ) );
|
||
|
|
-// connect( button, &QPushButton::clicked, [ u ]() { QDesktopServices::openUrl( u ); } );
|
||
|
|
-// }
|
||
|
|
-// else
|
||
|
|
-// {
|
||
|
|
-// cWarning() << "Welcome button" << smash( role ) << "URL" << url << "is invalid.";
|
||
|
|
-// button->hide();
|
||
|
|
-// }
|
||
|
|
-// }
|
||
|
|
-
|
||
|
|
void
|
||
|
|
WelcomePage::focusInEvent( QFocusEvent* e )
|
||
|
|
{
|
||
|
|
@@ -201,11 +136,6 @@ WelcomePage::externallySelectedLanguage( int row )
|
||
|
|
}
|
||
|
|
}
|
||
|
|
|
||
|
|
-// void
|
||
|
|
-// WelcomePage::setLanguageIcon( QPixmap i )
|
||
|
|
-// {
|
||
|
|
-// ui->languageIcon->setPixmap( i );
|
||
|
|
-// }
|
||
|
|
|
||
|
|
void
|
||
|
|
WelcomePage::retranslate()
|
||
|
|
@@ -214,8 +144,6 @@ WelcomePage::retranslate()
|
||
|
|
|
||
|
|
ui->mainText->setText( message.arg( Calamares::Branding::instance()->versionedName() ) );
|
||
|
|
ui->retranslateUi( this );
|
||
|
|
- // ui->supportButton->setText(
|
||
|
|
- // tr( "%1 Support", "@action" ).arg( Calamares::Branding::instance()->shortProductName() ) );
|
||
|
|
}
|
||
|
|
|
||
|
|
void
|
||
|
|
|