[Merge] ~nteodosio/software-properties:interim-releases into software-properties:ubuntu/master
Sebastien Bacher
mp+438549 at code.launchpad.net
Wed Mar 8 20:13:19 UTC 2023
Review: Needs Fixing
Thank Nathan, nice work. Some comments
Trying on the LTS to see if we didn't regress
- there is an (unwanted) change of string (pointed inline in the review)
- the pro tab shows labelled as 'Page 7'
- it doesn't respect the dark mode
On Lunar it looks fine, as usual with gtk UI it's tricky to get spacing and alignment, some differences with the design when comparing
- '>Feature', we should have some extra spacing between the > and the text
- for the feature section items, on the design the extra text lines are left aligned on the start of the text from the first line and not on the dot
- 'repositores' -> 'repositories'
- the icons on the left of available/additional features aren't vertically centered on the label next to them, that could be due to my fonts configuration though
Diff comments:
> diff --git a/data/gtkbuilder/main.ui b/data/gtkbuilder/main.ui
> index 9c3551b..25e16b5 100644
> --- a/data/gtkbuilder/main.ui
> +++ b/data/gtkbuilder/main.ui
> @@ -1285,7 +1285,7 @@
> <object class="GtkLabel">
> <property name="visible">True</property>
> <property name="label" translatable="yes"><b>This machine is not covered by an Ubuntu Pro subscription.</b>
> -Receive security updates for over 25,000 Ubuntu packages, free for up to 5 machines. <a href="https://ubuntu.com/pro">Learn more</a>.</property>
> +, free for up to 5 machines. <a href="https://ubuntu.com/pro">Learn more</a>.</property>
The change there seems buggy?
> <property name="use_markup">True</property>
> <property name="wrap">True</property>
> <property name="max-width-chars">90</property>
> @@ -1640,6 +1640,268 @@ Receive security updates for over 25,000 Ubuntu packages, free for up to 5 machi
> </child>
> </object>
> </child>
> + <child>
> + <object class="GtkStack" id="interim_stack_ua_main">
> + <property name="visible">False</property>
> + <child>
> + <object class="GtkBox" id="interim_box_ua_options">
> + <property name="visible">True</property>
> + <property name="border_width">12</property>
> + <property name="orientation">vertical</property>
> + <property name="spacing">12</property>
> + <child>
> + <object class="GtkLabel">
> + <property name="visible">True</property>
> + <property name="label" translatable="yes"><b>Subscription</b></property>
> + <property name="use_markup">True</property>
> + <property name="xalign">0</property>
> + </object>
> + </child>
> + <child>
> + <object class="GtkFrame">
> + <property name="visible">True</property>
> + <child>
> + <object class="GtkBox">
> + <property name="visible">True</property>
> + <property name="orientation">vertical</property>
> + <property name="spacing">18</property>
> + <property name="margin">18</property>
> + <child>
> + <object class="GtkBox">
> + <property name="visible">True</property>
> + <property name="spacing">36</property>
> + <property name="margin">18</property>
> + <child>
> + <object class="GtkImage" id="interim_image_ubuntu_pro_logo">
> + <property name="visible">True</property>
> + </object>
> + </child>
> + <child>
> + <object class="GtkStack" id="interim_stack_ua_attach">
> + <property name="visible">True</property>
> + <child>
> + <object class="GtkBox" id="interim_box_ua_unattached">
> + <property name="visible">True</property>
> + <property name="spacing">24</property>
> + <child>
> + <object class="GtkButton" id="interim_button_ua_attach">
> + <property name="visible">True</property>
> + <property name="valign">center</property>
> + <property name="label" translatable="yes">_Enable Ubuntu Pro</property>
> + <property name="use_underline">True</property>
> + </object>
> + </child>
> + <child>
> + <object class="GtkLabel">
> + <property name="visible">True</property>
> + <property name="label" translatable="yes"><b>This machine is not covered by an Ubuntu Pro subscription.</b>
> +Enable Ubuntu Pro to receive additional management and security features on this release, free for up to 5 machines. <a href="https://ubuntu.com/pro">Learn more</a>.</property>
> + <property name="use_markup">True</property>
> + <property name="wrap">True</property>
> + <property name="max-width-chars">90</property>
> + <property name="xalign">0</property>
> + </object>
> + </child>
> + </object>
> + </child>
> + <child>
> + <object class="GtkBox" id="interim_box_ua_attached">
> + <property name="visible">True</property>
> + <property name="spacing">24</property>
> + <child>
> + <object class="GtkButton" id="interim_button_ua_detach">
> + <property name="visible">True</property>
> + <property name="valign">center</property>
> + <property name="label" translatable="yes">_Disable Ubuntu Pro</property>
> + <property name="use_underline">True</property>
> + </object>
> + </child>
> + <child>
> + <object class="GtkBox">
> + <property name="visible">True</property>
> + <property name="spacing">6</property>
> + <child>
> + <object class="GtkImage">
> + <property name="visible">True</property>
> + <property name="icon-name">emblem-default</property>
> + </object>
> + </child>
> + <child>
> + <object class="GtkLabel">
> + <property name="visible">True</property>
> + <property name="use_markup">True</property>
> + <property name="label" translatable="yes"><span foreground="green">Ubuntu Pro support is enabled</span></property>
> + <property name="xalign">0</property>
> + </object>
> + </child>
> + </object>
> + </child>
> + </object>
> + </child>
> + </object>
> + </child>
> + </object>
> + </child>
> + <child>
> + <object class="GtkSeparator">
> + <property name="visible">True</property>
> + <property name="orientation">horizontal</property>
> + </object>
> + </child>
> + <child>
> + <object class="GtkExpander">
> + <property name="visible">True</property>
> + <child type="label">
> + <object class="GtkLabel">
> + <property name="visible">True</property>
> + <property name="label" translatable="yes">Features</property>
> + <attributes>
> + <attribute name="scale" value="1.5"/>
> + </attributes>
> + </object>
> + </child>
> + <child>
> + <object class="GtkBox">
> + <property name="visible">True</property>
> + <property name="orientation">horizontal</property>
> + <property name="spacing">10</property>
> + <property name="margin-top">16</property>
> + <property name="margin-left">16</property>
> + <property name="margin-right">16</property>
> + <child>
> + <object class="GtkImage">
> + <property name="visible">True</property>
> + <property name="stock">gtk-ok</property>
> + <property name="icon_size">2</property>
> + <property name="valign">start</property>
> + </object>
> + </child>
> + <child>
> + <object class="GtkLabel">
> + <property name="visible">True</property>
> + <property name="valign">start</property>
> + <property name="wrap">True</property>
> + <property name="label" translatable="yes"><b>Available</b>
> +
> +• Inventory, audit and automate the management of this machine with <a href="https://ubuntu.com/landscape">Landscape</a>, available as a self-hosted solution, or as a service.
> +
> +• <a href="https://github.com/ubuntu/adsys/wiki">ADsys</a> Active Directory bridging toolset provides additional management features and GPO policy support for Active Directory.
> +
> +• <a href="https://ubuntu.com/security/livepatch">Kernel Livepatch</a> helps keep your system secure by applying updates that don't require a restart.
> +</property>
> + <property name="use_markup">True</property>
> + </object>
> + </child>
> + <child>
> + <object class="GtkSeparator">
> + <property name="visible">True</property>
> + <property name="margin-left">10</property>
> + <property name="margin-right">10</property>
> + </object>
> + </child>
> + <child>
> + <object class="GtkImage">
> + <property name="visible">True</property>
> + <property name="stock">gtk-info</property>
> + <property name="icon_size">2</property>
> + <property name="valign">start</property>
> + </object>
> + </child>
> + <child>
> + <object class="GtkLabel">
> + <property name="visible">True</property>
> + <property name="valign">start</property>
> + <property name="wrap">True</property>
> + <property name="label" translatable="yes"><b>Additional features on LTS releases</b>
> +
> +• 10 years of security maintenance coverage for all Ubuntu deb packages in `Main` and `Universe` repositores.
repositores -> repositories
> +
> +• Additional tools to assist with FedRAMP, HIPAA and other compliance and hardening requirements.
> +
> +• Real-time Ubuntu kernel with PREEMPT_RT patches integrated.
> +
> +• Updates for the Robot Operating System.
> +</property>
> + <property name="use_markup">True</property>
> + </object>
> + </child>
> + </object>
> + </child>
> + </object>
> + </child>
> + </object>
> + </child>
> + </object>
> + </child>
> + <child>
> + <object class="GtkLabel">
> + <property name="visible">True</property>
> + <property name="label" translatable="yes"><b>Security</b></property>
> + <property name="use_markup">True</property>
> + <property name="xalign">0</property>
> + </object>
> + </child>
> + <child>
> + <object class="GtkGrid">
> + <property name="visible">True</property>
> + <property name="row_spacing">12</property>
> + <property name="column_spacing">12</property>
> + <child>
> + <object class="GtkSwitch" id="interim_switch_ua_livepatch">
> + <property name="visible">True</property>
> + <property name="halign">start</property>
> + <property name="valign">center</property>
> + </object>
> + <packing>
> + <property name="left_attach">0</property>
> + <property name="top_attach">0</property>
> + </packing>
> + </child>
> + <child>
> + <object class="GtkLabel" id="interim_label_ua_livepatch">
> + <property name="visible">True</property>
> + <property name="label" translatable="yes"><b>Kernel Livepatch</b> helps keep your system secure by applying security updates that don't require a restart.</property>
> + <property name="use_markup">True</property>
> + <property name="xalign">0</property>
> + </object>
> + <packing>
> + <property name="left_attach">1</property>
> + <property name="top_attach">0</property>
> + </packing>
> + </child>
> + <child>
> + <object class="GtkLabel" id="interim_label_ua_livepatch_error">
> + <property name="visible">False</property>
> + <property name="xalign">0</property>
> + <attributes>
> + <attribute name="foreground" value="red"/>
> + <attribute name="scale" value="0.9"/>
> + </attributes>
> + </object>
> + <packing>
> + <property name="left_attach">1</property>
> + <property name="top_attach">1</property>
> + </packing>
> + </child>
> + <child>
> + <object class="GtkCheckButton" id="interim_checkbutton_livepatch_topbar">
> + <property name="visible">True</property>
> + <property name="label" translatable="yes">Show Livepatch status in the top bar</property>
> + <property name="sensitive">False</property>
> + <property name="halign">start</property>
> + <property name="draw_indicator">True</property>
> + </object>
> + <packing>
> + <property name="left_attach">1</property>
> + <property name="top_attach">2</property>
> + </packing>
> + </child>
> + </object>
> + </child>
> + </object>
> + </child>
> + </object>
> + </child>
> <child type="tab">
> <object class="GtkLabel">
> <property name="visible">True</property>
> diff --git a/softwareproperties/gtk/UbuntuProPage.py b/softwareproperties/gtk/UbuntuProPage.py
> index 113fed0..92be4f0 100644
> --- a/softwareproperties/gtk/UbuntuProPage.py
> +++ b/softwareproperties/gtk/UbuntuProPage.py
> @@ -38,72 +38,79 @@ class UaService:
>
> class UbuntuProPage(object):
>
> - def __init__(self, parent):
> + def __init__(self, parent, is_lts):
> self._parent = parent
> -
> - self.stack_ua_attach = parent.stack_ua_attach
> - self.box_ua_attached = parent.box_ua_attached
> - self.box_ua_unattached = parent.box_ua_unattached
> - self.stack_ua_main = parent.stack_ua_main
> - self.box_ua_options = parent.box_ua_options
> - self.box_ua_fips_setup = parent.box_ua_fips_setup
> - self.switch_ua_esm_infra = parent.switch_ua_esm_infra
> - self.label_ua_esm_infra = parent.label_ua_esm_infra
> - self.label_ua_esm_infra_error = parent.label_ua_esm_infra_error
> - self.label_ua_esm_infra_error_messages = {
> - "enable": _("Could not enable ESM Infra. Please try again."),
> - "disable": _("Could not disable ESM Infra. Please try again."),
> - }
> - self.switch_ua_esm_apps = parent.switch_ua_esm_apps
> - self.label_ua_esm_apps = parent.label_ua_esm_apps
> - self.label_ua_esm_apps_error = parent.label_ua_esm_apps_error
> - self.label_ua_esm_apps_error_messages = {
> - "enable": _("Could not enable ESM Apps. Please try again."),
> - "disable": _("Could not disable ESM Apps. Please try again."),
> - }
> - self.switch_ua_livepatch = parent.switch_ua_livepatch
> - self.checkbutton_livepatch_topbar = parent.checkbutton_livepatch_topbar
> - self.label_ua_livepatch = parent.label_ua_livepatch
> - self.label_ua_livepatch_error = parent.label_ua_livepatch_error
> + self._is_lts = is_lts
> +
> + self.stack_ua_attach = (parent.interim_stack_ua_attach, parent.stack_ua_attach)[is_lts]
> + self.box_ua_attached = (parent.interim_box_ua_attached, parent.box_ua_attached)[is_lts]
> + self.box_ua_unattached = (parent.interim_box_ua_unattached, parent.box_ua_unattached)[is_lts]
> + self.stack_ua_main = (parent.interim_stack_ua_main, parent.stack_ua_main)[is_lts]
> + self.box_ua_options = (parent.interim_box_ua_options, parent.box_ua_options)[is_lts]
> + self.image_ubuntu_pro_logo = (parent.interim_image_ubuntu_pro_logo, parent.image_ubuntu_pro_logo)[is_lts]
> + self.button_ua_attach = (parent.interim_button_ua_attach, parent.button_ua_attach)[is_lts]
> + self.button_ua_detach = (parent.interim_button_ua_detach, parent.button_ua_detach)[is_lts]
> + self.switch_ua_livepatch = (parent.interim_switch_ua_livepatch, parent.switch_ua_livepatch)[is_lts]
> + self.checkbutton_livepatch_topbar = (parent.interim_checkbutton_livepatch_topbar, parent.checkbutton_livepatch_topbar)[is_lts]
> + self.label_ua_livepatch = (parent.interim_label_ua_livepatch, parent.label_ua_livepatch)[is_lts]
> + self.label_ua_livepatch_error = (parent.interim_label_ua_livepatch_error, parent.label_ua_livepatch_error)[is_lts]
> self.label_ua_livepatch_error_messages = {
> "enable": _("Could not enable Livepatch. Please try again."),
> "disable": _("Could not disable Livepatch. Please try again."),
> }
> - self.button_ua_fips = parent.button_ua_fips
> - self.label_ua_fips_status = parent.label_ua_fips_status
> - self.label_ua_fips_description = parent.label_ua_fips_description
> - self.button_ua_usg = parent.button_ua_usg
> - self.label_ua_usg_button = parent.label_ua_usg_button
> - self.label_ua_usg_status = parent.label_ua_usg_status
> - self.label_ua_usg_description = parent.label_ua_usg_description
> +
> + if is_lts:
> + self.box_ua_fips_setup = parent.box_ua_fips_setup
> + self.switch_ua_esm_infra = parent.switch_ua_esm_infra
> + self.label_ua_esm_infra = parent.label_ua_esm_infra
> + self.label_ua_esm_infra_error = parent.label_ua_esm_infra_error
> + self.label_ua_esm_infra_error_messages = {
> + "enable": _("Could not enable ESM Infra. Please try again."),
> + "disable": _("Could not disable ESM Infra. Please try again."),
> + }
> + self.switch_ua_esm_apps = parent.switch_ua_esm_apps
> + self.label_ua_esm_apps = parent.label_ua_esm_apps
> + self.label_ua_esm_apps_error = parent.label_ua_esm_apps_error
> + self.label_ua_esm_apps_error_messages = {
> + "enable": _("Could not enable ESM Apps. Please try again."),
> + "disable": _("Could not disable ESM Apps. Please try again."),
> + }
> + self.button_ua_fips = parent.button_ua_fips
> + self.label_ua_fips_status = parent.label_ua_fips_status
> + self.label_ua_fips_description = parent.label_ua_fips_description
> + self.button_ua_usg = parent.button_ua_usg
> + self.label_ua_usg_button = parent.label_ua_usg_button
> + self.label_ua_usg_status = parent.label_ua_usg_status
> + self.label_ua_usg_description = parent.label_ua_usg_description
> +
> + self.on_ua_esm_infra_changed_handler = self.switch_ua_esm_infra.connect('notify::active', self.on_ua_esm_infra_changed)
> + self.on_ua_esm_apps_changed_handler = self.switch_ua_esm_apps.connect('notify::active', self.on_ua_esm_apps_changed)
> + parent.button_ua_fips.connect('clicked', self.on_button_ua_fips_clicked)
> + parent.button_ua_usg.connect('clicked', self.on_button_ua_usg_clicked)
> + parent.expander_compliance_and_hardening.connect('notify::expanded', self.on_compliance_and_hardening_expand_changed)
> +
> + # Set date dependent labels
> + distro = current_distro()
> + if distro.eol_esm is not None:
> + eol_year = distro.eol_esm.year
> + self.label_ua_esm_infra.set_markup(_('<b>ESM Infra</b> provides security updates for over 2,300 Ubuntu Main packages until %d.') % eol_year)
> + self.label_ua_esm_apps.set_markup(_('<b>ESM Apps</b>; provides security updates for over 23,000 Ubuntu Universe packages until %d.') % eol_year)
> + else:
> + self.label_ua_esm_infra.set_markup(_('<b>ESM Infra</b> provides security updates for over 2,300 Ubuntu Main packages.'))
> + self.label_ua_esm_apps.set_markup(_('<b>ESM Apps</b>; provides security updates for over 23,000 Ubuntu Universe packages.'))
>
> if is_dark_theme(self.stack_ua_attach):
> ubuntu_pro_logo = GdkPixbuf.Pixbuf.new_from_file_at_scale(os.path.join(parent.datadir, 'ubuntu-pro-logo-dark.svg'), -1, 50, True)
> else:
> ubuntu_pro_logo = GdkPixbuf.Pixbuf.new_from_file_at_scale(os.path.join(parent.datadir, 'ubuntu-pro-logo.svg'), -1, 50, True)
> - parent.image_ubuntu_pro_logo.set_from_pixbuf(ubuntu_pro_logo)
> + self.image_ubuntu_pro_logo.set_from_pixbuf(ubuntu_pro_logo)
>
> - # Display the tab on init which is only on LTS series
> + # Display the tab on init which is only on LTS or interim series
the comment there doesn't really make sense anymore right? LTS or interim is every Ubuntu version
> self.stack_ua_main.set_visible(True)
>
> - parent.button_ua_attach.connect('clicked', self.on_button_ua_attach_clicked)
> - parent.button_ua_detach.connect('clicked', self.on_button_ua_detach_clicked)
> - self.on_ua_esm_infra_changed_handler = self.switch_ua_esm_infra.connect('notify::active', self.on_ua_esm_infra_changed)
> - self.on_ua_esm_apps_changed_handler = self.switch_ua_esm_apps.connect('notify::active', self.on_ua_esm_apps_changed)
> + self.button_ua_attach.connect('clicked', self.on_button_ua_attach_clicked)
> + self.button_ua_detach.connect('clicked', self.on_button_ua_detach_clicked)
> self.on_ua_livepatch_changed_handler = self.switch_ua_livepatch.connect('notify::active', self.on_ua_livepatch_changed)
> - parent.button_ua_fips.connect('clicked', self.on_button_ua_fips_clicked)
> - parent.button_ua_usg.connect('clicked', self.on_button_ua_usg_clicked)
> - parent.expander_compliance_and_hardening.connect('notify::expanded', self.on_compliance_and_hardening_expand_changed)
> -
> - # Set date dependent labels
> - distro = current_distro()
> - if distro.eol_esm is not None:
> - eol_year = distro.eol_esm.year
> - self.label_ua_esm_infra.set_markup(_('<b>ESM Infra</b> provides security updates for over 2,300 Ubuntu Main packages until %d.') % eol_year)
> - self.label_ua_esm_apps.set_markup(_('<b>ESM Apps</b>; provides security updates for over 23,000 Ubuntu Universe packages until %d.') % eol_year)
> - else:
> - self.label_ua_esm_infra.set_markup(_('<b>ESM Infra</b> provides security updates for over 2,300 Ubuntu Main packages.'))
> - self.label_ua_esm_apps.set_markup(_('<b>ESM Apps</b>; provides security updates for over 23,000 Ubuntu Universe packages.'))
>
> self.update_notifier_settings = None
> source = Gio.SettingsSchemaSource.get_default()
--
https://code.launchpad.net/~nteodosio/software-properties/+git/software-properties/+merge/438549
Your team Ubuntu Core Development Team is subscribed to branch software-properties:ubuntu/master.
More information about the Ubuntu-reviews
mailing list