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

@ -1,6 +1,7 @@
#include "PackageSelectViewStep.h" #include "PackageSelectViewStep.h"
#include "JobQueue.h" #include "JobQueue.h"
#include "GlobalStorage.h" #include "GlobalStorage.h"
#include "network/Manager.h"
#include <QVariantMap> #include <QVariantMap>
@ -64,25 +65,31 @@ void PackageSelectViewStep::onActivate()
{ {
// Connect the Minimal Installation radio button // Connect the Minimal Installation radio button
connect(ui->minimal_button, &QRadioButton::toggled, this, [this](bool checked) { connect(ui->minimal_button, &QRadioButton::toggled, this, [this](bool checked) {
ui->extraparty_scroll->setVisible(!checked); Calamares::Network::Manager network;
ui->extraparty_text->setVisible(!checked); 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->element_button->setChecked(false);
ui->thunderbird_button->setChecked(false); ui->thunderbird_button->setChecked(false);
ui->virtmanager_button->setChecked(false); ui->virtmanager_button->setChecked(false);
ui->krita_button->setChecked(false); ui->krita_button->setChecked(false);
ui->element_button->setEnabled(!checked); ui->element_button->setEnabled(false);
ui->thunderbird_button->setEnabled(!checked); ui->thunderbird_button->setEnabled(false);
ui->virtmanager_button->setEnabled(!checked); ui->virtmanager_button->setEnabled(false);
ui->krita_button->setEnabled(!checked); ui->krita_button->setEnabled(false);
}
}); });
// Connect the Normal Installation radio button // Connect the Normal Installation radio button
connect(ui->normal_button, &QRadioButton::toggled, this, [this](bool checked) { 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_scroll->setVisible(true);
ui->extraparty_text->setVisible(true); ui->extraparty_text->setVisible(true);
ui->mandatory_warning_label->setVisible(true);
ui->element_button->setChecked(false); ui->element_button->setChecked(false);
ui->thunderbird_button->setChecked(false); ui->thunderbird_button->setChecked(false);
@ -98,9 +105,11 @@ void PackageSelectViewStep::onActivate()
// Connect the Full Installation radio button // Connect the Full Installation radio button
connect(ui->full_button, &QRadioButton::toggled, this, [this](bool checked) { 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_scroll->setVisible(true);
ui->extraparty_text->setVisible(true); ui->extraparty_text->setVisible(true);
ui->mandatory_warning_label->setVisible(true);
ui->element_button->setChecked(true); ui->element_button->setChecked(true);
ui->thunderbird_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 // Connect the storage items
/// Full/Normal/Minimal /// Full/Normal/Minimal
connect(ui->minimal_button, &QRadioButton::toggled, this, &PackageSelectViewStep::updatePackageSelections); connect(ui->minimal_button, &QRadioButton::toggled, this, &PackageSelectViewStep::updatePackageSelections);

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

Loading…
Cancel
Save