mirror of
https://github.com/parchlinux/calamares.git
synced 2025-02-24 10:55:46 -05:00
[netinstall] Initial work for configurable sidebar label
- Now that multiple netinstall pages may be supported, it's annoying that they all have the same name. Copy the approach from other modules (e.g. notesQML) of having the sidebar and other labels configured in the config file.
This commit is contained in:
parent
0877a994f1
commit
4ae484dbca
2 changed files with 8 additions and 6 deletions
|
@ -34,6 +34,7 @@ NetInstallViewStep::NetInstallViewStep( QObject* parent )
|
|||
: Calamares::ViewStep( parent )
|
||||
, m_widget( new NetInstallPage() )
|
||||
, m_nextEnabled( false )
|
||||
, m_sidebarLabel( nullptr )
|
||||
{
|
||||
emit nextStatusChanged( true );
|
||||
connect( m_widget, &NetInstallPage::checkReady, this, &NetInstallViewStep::nextIsReady );
|
||||
|
@ -46,13 +47,14 @@ NetInstallViewStep::~NetInstallViewStep()
|
|||
{
|
||||
m_widget->deleteLater();
|
||||
}
|
||||
delete m_sidebarLabel;
|
||||
}
|
||||
|
||||
|
||||
QString
|
||||
NetInstallViewStep::prettyName() const
|
||||
{
|
||||
return tr( "Package selection" );
|
||||
return m_sidebarLabel ? m_sidebarLabel->get() : tr( "Package selection" );
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -20,10 +20,10 @@
|
|||
#ifndef NETINSTALLVIEWSTEP_H
|
||||
#define NETINSTALLVIEWSTEP_H
|
||||
|
||||
#include <utils/PluginFactory.h>
|
||||
#include <viewpages/ViewStep.h>
|
||||
|
||||
#include <DllMacro.h>
|
||||
#include "DllMacro.h"
|
||||
#include "locale/TranslatableConfiguration.h"
|
||||
#include "utils/PluginFactory.h"
|
||||
#include "viewpages/ViewStep.h"
|
||||
|
||||
#include <QVariant>
|
||||
|
||||
|
@ -64,7 +64,7 @@ private:
|
|||
NetInstallPage* m_widget;
|
||||
bool m_nextEnabled;
|
||||
QString m_prettyStatus;
|
||||
|
||||
CalamaresUtils::Locale::TranslatedString* m_sidebarLabel; // As it appears in the sidebar
|
||||
QList< Calamares::job_ptr > m_jobs;
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue