ubuntu/noble
Simon Quigley 9 months ago
parent be86ca1ec0
commit 1cebfe1fd8

@ -1,6 +1,7 @@
#include "PackageSelectViewStep.h"
#include "JobQueue.h"
#include "GlobalStorage.h"
#include "network/Manager.h"
#include <QVariantMap>
@ -64,25 +65,31 @@ void PackageSelectViewStep::onActivate()
{
// Connect the Minimal Installation radio button
connect(ui->minimal_button, &QRadioButton::toggled, this, [this](bool checked) {
ui->extraparty_scroll->setVisible(!checked);
ui->extraparty_text->setVisible(!checked);
Calamares::Network::Manager network;
if (checked && network.hasInternet()) {
ui->extraparty_scroll->setVisible(false);
ui->extraparty_text->setVisible(false);
ui->mandatory_warning_label->setVisible(false);
ui->element_button->setChecked(false);
ui->thunderbird_button->setChecked(false);
ui->virtmanager_button->setChecked(false);
ui->krita_button->setChecked(false);
ui->element_button->setChecked(false);
ui->thunderbird_button->setChecked(false);
ui->virtmanager_button->setChecked(false);
ui->krita_button->setChecked(false);
ui->element_button->setEnabled(!checked);
ui->thunderbird_button->setEnabled(!checked);
ui->virtmanager_button->setEnabled(!checked);
ui->krita_button->setEnabled(!checked);
ui->element_button->setEnabled(false);
ui->thunderbird_button->setEnabled(false);
ui->virtmanager_button->setEnabled(false);
ui->krita_button->setEnabled(false);
}
});
// Connect the Normal Installation radio button
connect(ui->normal_button, &QRadioButton::toggled, this, [this](bool checked) {
if (checked) {
Calamares::Network::Manager network;
if (checked && network.hasInternet()) {
ui->extraparty_scroll->setVisible(true);
ui->extraparty_text->setVisible(true);
ui->mandatory_warning_label->setVisible(true);
ui->element_button->setChecked(false);
ui->thunderbird_button->setChecked(false);
@ -98,9 +105,11 @@ void PackageSelectViewStep::onActivate()
// Connect the Full Installation radio button
connect(ui->full_button, &QRadioButton::toggled, this, [this](bool checked) {
if (checked) {
Calamares::Network::Manager network;
if (checked && network.hasInternet()) {
ui->extraparty_scroll->setVisible(true);
ui->extraparty_text->setVisible(true);
ui->mandatory_warning_label->setVisible(true);
ui->element_button->setChecked(true);
ui->thunderbird_button->setChecked(true);
@ -114,6 +123,33 @@ void PackageSelectViewStep::onActivate()
}
});
// Disable many bits of functionality if network is not enabled
Calamares::Network::Manager network;
if (!network.hasInternet()) {
ui->full_button->setVisible(false);
ui->full_text->setVisible(false);
ui->additional_label->setVisible(false);
ui->updates_button->setVisible(false);
ui->updates_text->setVisible(false);
ui->party_button->setVisible(false);
ui->party_text->setVisible(false);
ui->extraparty_scroll->setVisible(false);
ui->extraparty_text->setVisible(false);
ui->mandatory_warning_label->setVisible(false);
ui->element_button->setChecked(false);
ui->thunderbird_button->setChecked(false);
ui->virtmanager_button->setChecked(false);
ui->krita_button->setChecked(false);
ui->element_button->setEnabled(false);
ui->thunderbird_button->setEnabled(false);
ui->virtmanager_button->setEnabled(false);
ui->krita_button->setEnabled(false);
}
// Connect the storage items
/// Full/Normal/Minimal
connect(ui->minimal_button, &QRadioButton::toggled, this, &PackageSelectViewStep::updatePackageSelections);

@ -28,24 +28,55 @@ QLabel {
}</string>
</property>
<layout class="QGridLayout" name="gridLayout">
<item row="4" column="1">
<spacer name="verticalSpacer_5">
<item row="0" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="11" column="1">
<spacer name="verticalSpacer_2">
<item row="9" column="1">
<widget class="QRadioButton" name="minimal_button">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>21</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>Minimal Installation</string>
</property>
</widget>
</item>
<item row="17" column="1">
<widget class="QLabel" name="party_text">
<property name="font">
<font>
<pointsize>10</pointsize>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>This software is subject to license terms included with its documentation, and some may be proprietary</string>
</property>
</widget>
</item>
<item row="18" column="1">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -60,42 +91,26 @@ QLabel {
</property>
</spacer>
</item>
<item row="12" column="1">
<widget class="QLabel" name="label">
<property name="font">
<font>
<pointsize>18</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">padding-left: 0px; padding-right: 0px;</string>
</property>
<property name="text">
<string>Additional Options</string>
<item row="2" column="1">
<widget class="QRadioButton" name="full_button">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>21</height>
</size>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="apps_label">
<property name="font">
<font>
<pointsize>18</pointsize>
<weight>50</weight>
<bold>false</bold>
<pointsize>12</pointsize>
</font>
</property>
<property name="styleSheet">
<string notr="true">padding-left: 0px; padding-right: 0px;</string>
</property>
<property name="text">
<string>Installation Mode</string>
<string>Full Installation</string>
</property>
</widget>
</item>
<item row="9" column="1">
<widget class="QRadioButton" name="minimal_button">
<item row="6" column="1">
<widget class="QRadioButton" name="normal_button">
<property name="maximumSize">
<size>
<width>16777215</width>
@ -108,25 +123,78 @@ QLabel {
</font>
</property>
<property name="text">
<string>Minimal Installation</string>
<string>Normal Installation</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="7" column="1">
<widget class="QLabel" name="normal_text">
<item row="23" column="1">
<spacer name="pushup">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="11" column="1">
<spacer name="verticalSpacer_2">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="13" column="1">
<widget class="QCheckBox" name="updates_button">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>21</height>
</size>
</property>
<property name="font">
<font>
<pointsize>10</pointsize>
<italic>true</italic>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>Web browser, utilities, office software, games, and media players</string>
<string>Download and install updates following installation</string>
</property>
</widget>
</item>
<item row="17" column="1">
<widget class="QLabel" name="party_text">
<item row="10" column="1">
<widget class="QLabel" name="minimal_text">
<property name="font">
<font>
<pointsize>10</pointsize>
@ -134,7 +202,7 @@ QLabel {
</font>
</property>
<property name="text">
<string>This software is subject to license terms included with its documentation, and some may be proprietary</string>
<string>Only the desktop environment</string>
</property>
</widget>
</item>
@ -151,26 +219,69 @@ QLabel {
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="QRadioButton" name="full_button">
<property name="maximumSize">
<item row="15" column="1">
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>16777215</width>
<height>21</height>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="4" column="1">
<spacer name="verticalSpacer_5">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="7" column="1">
<widget class="QLabel" name="normal_text">
<property name="font">
<font>
<pointsize>12</pointsize>
<pointsize>10</pointsize>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>Full Installation</string>
<string>Web browser, utilities, office software, games, and media players</string>
</property>
</widget>
</item>
<item row="15" column="1">
<spacer name="verticalSpacer_7">
<item row="20" column="1">
<spacer name="verticalSpacer_11">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>3</height>
</size>
</property>
</spacer>
</item>
<item row="8" column="1">
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
@ -185,6 +296,56 @@ QLabel {
</property>
</spacer>
</item>
<item row="3" column="1">
<widget class="QLabel" name="full_text">
<property name="font">
<font>
<pointsize>10</pointsize>
<italic>true</italic>
</font>
</property>
<property name="text">
<string>All applications in the Normal Installation, and all extra third-party packages listed below</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="1" column="1">
<widget class="QLabel" name="apps_label">
<property name="font">
<font>
<pointsize>18</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">padding-left: 0px; padding-right: 0px;</string>
</property>
<property name="text">
<string>Installation Mode</string>
</property>
</widget>
</item>
<item row="19" column="1">
<widget class="QLabel" name="extraparty_text">
<property name="font">
<font>
<pointsize>18</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">padding-left: 0px; padding-right: 0px;</string>
</property>
<property name="text">
<string>Install additional third-party packages</string>
</property>
</widget>
</item>
<item row="21" column="1">
<widget class="QScrollArea" name="extraparty_scroll">
<property name="widgetResizable">
@ -195,8 +356,8 @@ QLabel {
<rect>
<x>0</x>
<y>0</y>
<width>758</width>
<height>287</height>
<width>762</width>
<height>269</height>
</rect>
</property>
<layout class="QGridLayout" name="gridLayout_2">
@ -404,102 +565,6 @@ QLabel {
</widget>
</widget>
</item>
<item row="22" column="1">
<spacer name="pushup">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="19" column="1">
<widget class="QLabel" name="extraparty_text">
<property name="font">
<font>
<pointsize>18</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="styleSheet">
<string notr="true">padding-left: 0px; padding-right: 0px;</string>
</property>
<property name="text">
<string>Install additional third-party packages</string>
</property>
</widget>
</item>
<item row="13" column="1">
<widget class="QCheckBox" name="updates_button">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>21</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>Download and install updates following installation</string>
</property>
</widget>
</item>
<item row="0" column="2">
<spacer name="horizontalSpacer_2">
<property name="orientation">
<enum>Qt::Horizontal</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Minimum</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="18" column="1">
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="8" column="1">
<spacer name="verticalSpacer_6">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>10</height>
</size>
</property>
</spacer>
</item>
<item row="16" column="1">
<widget class="QCheckBox" name="party_button">
<property name="maximumSize">
@ -518,69 +583,20 @@ QLabel {
</property>
</widget>
</item>
<item row="6" column="1">
<widget class="QRadioButton" name="normal_button">
<property name="maximumSize">
<size>
<width>16777215</width>
<height>21</height>
</size>
</property>
<property name="font">
<font>
<pointsize>12</pointsize>
</font>
</property>
<property name="text">
<string>Normal Installation</string>
</property>
<property name="checked">
<bool>true</bool>
</property>
</widget>
</item>
<item row="3" column="1">
<widget class="QLabel" name="full_text">
<item row="12" column="1">
<widget class="QLabel" name="additional_label">
<property name="font">
<font>
<pointsize>10</pointsize>
<italic>true</italic>
<pointsize>18</pointsize>
<weight>50</weight>
<bold>false</bold>
</font>
</property>
<property name="text">
<string>All applications in the Normal Installation, and all extra third-party packages listed below</string>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignTop</set>
</property>
</widget>
</item>
<item row="0" column="1">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>20</height>
</size>
</property>
</spacer>
</item>
<item row="10" column="1">
<widget class="QLabel" name="minimal_text">
<property name="font">
<font>
<pointsize>10</pointsize>
<italic>true</italic>
</font>
<property name="styleSheet">
<string notr="true">padding-left: 0px; padding-right: 0px;</string>
</property>
<property name="text">
<string>Only the desktop environment</string>
<string>Additional Options</string>
</property>
</widget>
</item>
@ -600,21 +616,23 @@ QLabel {
</property>
</spacer>
</item>
<item row="20" column="1">
<spacer name="verticalSpacer_11">
<property name="orientation">
<enum>Qt::Vertical</enum>
<item row="22" column="0" colspan="3">
<widget class="QLabel" name="mandatory_warning_label">
<property name="font">
<font>
<pointsize>11</pointsize>
<weight>75</weight>
<italic>false</italic>
<bold>true</bold>
</font>
</property>
<property name="sizeType">
<enum>QSizePolicy::Fixed</enum>
<property name="text">
<string>Note: Ubuntu and flavors are NOT responsible for third-party software installed from this list.</string>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>3</height>
</size>
<property name="wordWrap">
<bool>true</bool>
</property>
</spacer>
</widget>
</item>
</layout>
</widget>

Loading…
Cancel
Save