[gnome-control-center/rhel/8.4.0: 12/32] info: Better support registered-but-no-subscriptions cases
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center/rhel/8.4.0: 12/32] info: Better support registered-but-no-subscriptions cases
- Date: Tue, 13 Apr 2021 14:34:54 +0000 (UTC)
commit 59a9e686d40696e168152998d2025607e1016558
Author: Ray Strode <rstrode redhat com>
Date: Sun Jan 24 13:59:17 2021 -0500
info: Better support registered-but-no-subscriptions cases
There are cases when the machine can be registered for updates,
but not have any active subscriptions. For instance, if the
admin runs "subscription-manager register" but fails to pass
--auto-attach. As another case, the org may be configured to
be in "Simple Content Access" mode where updates don't require
specific production subscriptions.
This commit tries to accomodate those cases better. If the user
is registered, but needs a subscription, the dialog provides a
way to attach one.
If the user is registered and doesn't need a subscription, the
dialog now shows an updated message to reflect that fact.
panels/info/cc-info-overview-panel.c | 25 ++-
panels/info/cc-subscription-details-dialog.c | 180 +++++++++++++++++--
panels/info/cc-subscription-details-dialog.ui | 249 ++++++++++++++++++++++----
panels/info/info-overview.ui | 35 +++-
4 files changed, 431 insertions(+), 58 deletions(-)
---
diff --git a/panels/info/cc-info-overview-panel.c b/panels/info/cc-info-overview-panel.c
index 65246758e..571654fa0 100644
--- a/panels/info/cc-info-overview-panel.c
+++ b/panels/info/cc-info-overview-panel.c
@@ -76,6 +76,7 @@ typedef struct
GtkWidget *register_button;
GtkWidget *updates_separator;
GtkWidget *updates_button;
+ GtkWidget *updates_stack;
/* Virtualisation labels */
GtkWidget *label8;
@@ -823,18 +824,31 @@ reload_subscription_status (CcInfoOverviewPanel *self)
switch (status)
{
case GSD_SUBMAN_SUBSCRIPTION_STATUS_UNKNOWN:
- case GSD_SUBMAN_SUBSCRIPTION_STATUS_INVALID:
- case GSD_SUBMAN_SUBSCRIPTION_STATUS_DISABLED:
- case GSD_SUBMAN_SUBSCRIPTION_STATUS_PARTIALLY_VALID:
gtk_stack_set_visible_child_name (GTK_STACK (priv->subscription_stack), "not-registered");
+ gtk_stack_set_visible_child_name (GTK_STACK (priv->updates_stack), "no-updates");
gtk_widget_set_sensitive (priv->updates_button, FALSE);
break;
-
+ case GSD_SUBMAN_SUBSCRIPTION_STATUS_DISABLED:
+ gtk_stack_set_visible_child_name (GTK_STACK (priv->subscription_stack), "registered");
+ gtk_stack_set_visible_child_name (GTK_STACK (priv->updates_stack), "updates");
+ gtk_widget_set_sensitive (priv->updates_button, TRUE);
+ break;
case GSD_SUBMAN_SUBSCRIPTION_STATUS_VALID:
+ case GSD_SUBMAN_SUBSCRIPTION_STATUS_PARTIALLY_VALID:
gtk_stack_set_visible_child_name (GTK_STACK (priv->subscription_stack), "registered");
+ gtk_stack_set_visible_child_name (GTK_STACK (priv->updates_stack), "updates");
gtk_widget_set_sensitive (priv->updates_button, TRUE);
break;
-
+ case GSD_SUBMAN_SUBSCRIPTION_STATUS_INVALID:
+ gtk_stack_set_visible_child_name (GTK_STACK (priv->subscription_stack), "registered");
+ gtk_stack_set_visible_child_name (GTK_STACK (priv->updates_stack), "no-updates");
+ gtk_widget_set_sensitive (priv->updates_button, FALSE);
+ break;
+ case GSD_SUBMAN_SUBSCRIPTION_STATUS_NO_INSTALLED_PRODUCTS:
+ gtk_stack_set_visible_child_name (GTK_STACK (priv->subscription_stack), "not-registered");
+ gtk_stack_set_visible_child_name (GTK_STACK (priv->updates_stack), "no-updates");
+ gtk_widget_set_sensitive (priv->updates_button, FALSE);
+ break;
default:
g_assert_not_reached ();
break;
@@ -1021,6 +1035,7 @@ cc_info_overview_panel_class_init (CcInfoOverviewPanelClass *klass)
gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, register_button);
gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, updates_separator);
gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, updates_button);
+ gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, updates_stack);
gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, label8);
gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, grid1);
gtk_widget_class_bind_template_child_private (widget_class, CcInfoOverviewPanel, label18);
diff --git a/panels/info/cc-subscription-details-dialog.c b/panels/info/cc-subscription-details-dialog.c
index 3d77e6c48..f8e70d751 100644
--- a/panels/info/cc-subscription-details-dialog.c
+++ b/panels/info/cc-subscription-details-dialog.c
@@ -25,11 +25,14 @@
#include <gtk/gtk.h>
#include "cc-subscription-details-dialog.h"
+#include "cc-subscription-common.h"
#define DBUS_TIMEOUT 300000 /* 5 minutes */
typedef enum {
DIALOG_STATE_SHOW_DETAILS,
+ DIALOG_STATE_SUBSCRIBE,
+ DIALOG_STATE_SUBSCRIBING,
DIALOG_STATE_UNREGISTER,
DIALOG_STATE_UNREGISTERING
} DialogState;
@@ -46,17 +49,25 @@ struct _CcSubscriptionDetailsDialog
/* template widgets */
GtkButton *back_button;
GtkSpinner *spinner;
+ GtkStack *header_stack;
+ GtkButton *header_subscribe_button;
GtkButton *header_unregister_button;
GtkRevealer *notification_revealer;
GtkLabel *error_label;
GtkStack *stack;
+ GtkStack *status_stack;
GtkBox *products_box1;
GtkBox *products_box2;
+ GtkBox *products_box3;
+ GtkButton *subscribe_button;
+ GtkSeparator *separator;
GtkButton *unregister_button;
};
G_DEFINE_TYPE (CcSubscriptionDetailsDialog, cc_subscription_details_dialog, GTK_TYPE_DIALOG);
+static void reload_installed_products (CcSubscriptionDetailsDialog *self);
+
typedef struct
{
gchar *product_name;
@@ -105,15 +116,17 @@ add_product_row (GtkGrid *product_grid, const gchar *name, const gchar *value, g
}
static GtkWidget *
-add_product (CcSubscriptionDetailsDialog *self, ProductData *product)
+add_product (CcSubscriptionDetailsDialog *self, ProductData *product, GsdSubmanSubscriptionStatus status)
{
GtkGrid *product_grid;
const gchar *status_text;
if (g_strcmp0 (product->status, "subscribed") == 0)
status_text = _("Subscribed");
+ else if (status == GSD_SUBMAN_SUBSCRIPTION_STATUS_DISABLED)
+ status_text = _("No Specific Subscription");
else
- status_text = _("Not Subscribed (Not supported by a valid subscription.)");
+ status_text = _("Not Subscribed");
product_grid = GTK_GRID (gtk_grid_new ());
gtk_grid_set_column_spacing (product_grid, 12);
@@ -127,8 +140,12 @@ add_product (CcSubscriptionDetailsDialog *self, ProductData *product)
add_product_row (product_grid, _("Version"), product->version, 2);
add_product_row (product_grid, _("Arch"), product->arch, 3);
add_product_row (product_grid, _("Status"), status_text, 4);
- add_product_row (product_grid, _("Starts"), product->starts, 5);
- add_product_row (product_grid, _("Ends"), product->ends, 6);
+
+ if (product->starts[0] != '\0' && product->ends[0] != '\0')
+ {
+ add_product_row (product_grid, _("Starts"), product->starts, 5);
+ add_product_row (product_grid, _("Ends"), product->ends, 6);
+ }
return GTK_WIDGET (product_grid);
}
@@ -146,6 +163,9 @@ static void
dialog_reload (CcSubscriptionDetailsDialog *self)
{
GtkHeaderBar *header = GTK_HEADER_BAR (gtk_dialog_get_header_bar (GTK_DIALOG (self)));
+ GsdSubmanSubscriptionStatus status = GSD_SUBMAN_SUBSCRIPTION_STATUS_UNKNOWN;
+
+ reload_installed_products (self);
switch (self->state)
{
@@ -154,13 +174,41 @@ dialog_reload (CcSubscriptionDetailsDialog *self)
gtk_window_set_title (GTK_WINDOW (self), _("Registration Details"));
gtk_widget_set_sensitive (GTK_WIDGET (self->header_unregister_button), TRUE);
+ gtk_widget_set_sensitive (GTK_WIDGET (self->header_subscribe_button), TRUE);
gtk_widget_hide (GTK_WIDGET (self->back_button));
- gtk_widget_hide (GTK_WIDGET (self->header_unregister_button));
+ gtk_widget_hide (GTK_WIDGET (self->header_stack));
gtk_stack_set_visible_child_name (self->stack, "show-details");
break;
+ case DIALOG_STATE_SUBSCRIBE:
+ gtk_header_bar_set_show_close_button (header, FALSE);
+ gtk_stack_set_visible_child_name (self->header_stack, "subscribe");
+ gtk_window_set_title (GTK_WINDOW (self), _("Subscribe System"));
+ gtk_widget_set_sensitive (GTK_WIDGET (self->header_subscribe_button), TRUE);
+
+ gtk_widget_show (GTK_WIDGET (self->back_button));
+
+ gtk_stack_set_visible_child_name (self->header_stack, "subscribe");
+ gtk_widget_show (GTK_WIDGET (self->header_stack));
+
+ gtk_stack_set_visible_child_name (self->stack, "subscribe");
+ break;
+
+ case DIALOG_STATE_SUBSCRIBING:
+ gtk_header_bar_set_show_close_button (header, FALSE);
+ gtk_window_set_title (GTK_WINDOW (self), _("Looking For Available Subscriptions…"));
+ gtk_widget_set_sensitive (GTK_WIDGET (self->header_subscribe_button), FALSE);
+
+ gtk_widget_show (GTK_WIDGET (self->back_button));
+
+ gtk_stack_set_visible_child_name (self->header_stack, "subscribe");
+ gtk_widget_show (GTK_WIDGET (self->header_stack));
+
+ gtk_stack_set_visible_child_name (self->stack, "subscribe");
+ break;
+
case DIALOG_STATE_UNREGISTER:
gtk_header_bar_set_show_close_button (header, FALSE);
@@ -168,7 +216,9 @@ dialog_reload (CcSubscriptionDetailsDialog *self)
gtk_widget_set_sensitive (GTK_WIDGET (self->header_unregister_button), TRUE);
gtk_widget_show (GTK_WIDGET (self->back_button));
- gtk_widget_show (GTK_WIDGET (self->header_unregister_button));
+
+ gtk_stack_set_visible_child_name (self->header_stack, "unregister");
+ gtk_widget_show (GTK_WIDGET (self->header_stack));
gtk_stack_set_visible_child_name (self->stack, "unregister");
break;
@@ -180,7 +230,9 @@ dialog_reload (CcSubscriptionDetailsDialog *self)
gtk_widget_set_sensitive (GTK_WIDGET (self->header_unregister_button), FALSE);
gtk_widget_show (GTK_WIDGET (self->back_button));
- gtk_widget_show (GTK_WIDGET (self->header_unregister_button));
+
+ gtk_stack_set_visible_child_name (self->header_stack, "unregister");
+ gtk_widget_show (GTK_WIDGET (self->header_stack));
gtk_stack_set_visible_child_name (self->stack, "unregister");
break;
@@ -192,28 +244,68 @@ dialog_reload (CcSubscriptionDetailsDialog *self)
remove_all_children (GTK_CONTAINER (self->products_box1));
remove_all_children (GTK_CONTAINER (self->products_box2));
+ remove_all_children (GTK_CONTAINER (self->products_box3));
if (self->products == NULL || self->products->len == 0)
{
/* the widgets are duplicate to allow sliding between two stack pages */
GtkWidget *w1 = gtk_label_new (_("No installed products detected."));
GtkWidget *w2 = gtk_label_new (_("No installed products detected."));
+ GtkWidget *w3 = gtk_label_new (_("No installed products detected."));
gtk_widget_show (w1);
gtk_widget_show (w2);
+ gtk_widget_show (w3);
gtk_container_add (GTK_CONTAINER (self->products_box1), w1);
gtk_container_add (GTK_CONTAINER (self->products_box2), w2);
+ gtk_container_add (GTK_CONTAINER (self->products_box3), w3);
+ gtk_stack_set_visible_child_name (self->status_stack, "no-installed-products");
+
+ gtk_widget_hide (GTK_WIDGET (self->subscribe_button));
+ gtk_widget_hide (GTK_WIDGET (self->separator));
return;
}
+ get_subscription_status (self->subscription_proxy, &status);
+
for (guint i = 0; i < self->products->len; i++)
{
ProductData *product = g_ptr_array_index (self->products, i);
/* the widgets are duplicate to allow sliding between two stack pages */
- GtkWidget *w1 = add_product (self, product);
- GtkWidget *w2 = add_product (self, product);
+ GtkWidget *w1 = add_product (self, product, status);
+ GtkWidget *w2 = add_product (self, product, status);
+ GtkWidget *w3 = add_product (self, product, status);
gtk_container_add (GTK_CONTAINER (self->products_box1), w1);
gtk_container_add (GTK_CONTAINER (self->products_box2), w2);
+ gtk_container_add (GTK_CONTAINER (self->products_box3), w3);
}
+
+ switch (status)
+ {
+ case GSD_SUBMAN_SUBSCRIPTION_STATUS_VALID:
+ gtk_stack_set_visible_child_name (self->status_stack, "fully-subscribed");
+ gtk_widget_hide (GTK_WIDGET (self->subscribe_button));
+ break;
+
+ case GSD_SUBMAN_SUBSCRIPTION_STATUS_PARTIALLY_VALID:
+ gtk_stack_set_visible_child_name (self->status_stack, "partly-subscribed");
+ gtk_widget_show (GTK_WIDGET (self->subscribe_button));
+ break;
+
+ case GSD_SUBMAN_SUBSCRIPTION_STATUS_DISABLED:
+ gtk_stack_set_visible_child_name (self->status_stack, "subscription-not-needed");
+ gtk_widget_hide (GTK_WIDGET (self->subscribe_button));
+ break;
+
+ case GSD_SUBMAN_SUBSCRIPTION_STATUS_UNKNOWN:
+ default:
+ gtk_stack_set_visible_child_name (self->status_stack, "not-subscribed");
+ gtk_widget_show (GTK_WIDGET (self->subscribe_button));
+ break;
+ }
+
+ gtk_widget_set_visible (GTK_WIDGET (self->separator),
+ gtk_widget_get_visible (GTK_WIDGET (self->subscribe_button)));
+
}
static ProductData *
@@ -236,7 +328,7 @@ parse_product_variant (GVariant *product_variant)
}
static void
-load_installed_products (CcSubscriptionDetailsDialog *self)
+reload_installed_products (CcSubscriptionDetailsDialog *self)
{
GVariantIter iter_array;
GVariant *child;
@@ -260,6 +352,58 @@ load_installed_products (CcSubscriptionDetailsDialog *self)
}
}
+static void
+subscription_done_cb (GObject *source_object,
+ GAsyncResult *res,
+ gpointer user_data)
+{
+ CcSubscriptionDetailsDialog *self = (CcSubscriptionDetailsDialog *) user_data;
+ g_autoptr(GVariant) results = NULL;
+ g_autoptr(GError) error = NULL;
+
+ results = g_dbus_proxy_call_finish (G_DBUS_PROXY (source_object),
+ res,
+ &error);
+ if (results == NULL)
+ {
+ if (g_error_matches (error, G_IO_ERROR, G_IO_ERROR_CANCELLED))
+ return;
+
+ g_dbus_error_strip_remote_error (error);
+ gtk_label_set_text (self->error_label, error->message);
+ gtk_revealer_set_reveal_child (self->notification_revealer, TRUE);
+
+ gtk_spinner_stop (self->spinner);
+
+ self->state = DIALOG_STATE_SUBSCRIBE;
+ dialog_reload (self);
+ return;
+ }
+
+ gtk_spinner_stop (self->spinner);
+
+ self->state = DIALOG_STATE_SHOW_DETAILS;
+ dialog_reload (self);
+}
+
+static void
+header_subscribe_button_clicked_cb (CcSubscriptionDetailsDialog *self)
+{
+ gtk_spinner_start (self->spinner);
+
+ self->state = DIALOG_STATE_SUBSCRIBING;
+ dialog_reload (self);
+
+ g_dbus_proxy_call (self->subscription_proxy,
+ "Attach",
+ NULL,
+ G_DBUS_CALL_FLAGS_NONE,
+ DBUS_TIMEOUT,
+ self->cancellable,
+ subscription_done_cb,
+ self);
+}
+
static void
unregistration_done_cb (GObject *source_object,
GAsyncResult *res,
@@ -320,6 +464,13 @@ back_button_clicked_cb (CcSubscriptionDetailsDialog *self)
dialog_reload (self);
}
+static void
+subscribe_button_clicked_cb (CcSubscriptionDetailsDialog *self)
+{
+ self->state = DIALOG_STATE_SUBSCRIBE;
+ dialog_reload (self);
+}
+
static void
unregister_button_clicked_cb (CcSubscriptionDetailsDialog *self)
{
@@ -377,16 +528,24 @@ cc_subscription_details_dialog_class_init (CcSubscriptionDetailsDialogClass *kla
gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, back_button);
gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, spinner);
+ gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, header_stack);
+ gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, header_subscribe_button);
gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, header_unregister_button);
gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, notification_revealer);
gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, error_label);
gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, stack);
+ gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, status_stack);
gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, products_box1);
gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, products_box2);
+ gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, products_box3);
+ gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, subscribe_button);
+ gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, separator);
gtk_widget_class_bind_template_child (widget_class, CcSubscriptionDetailsDialog, unregister_button);
gtk_widget_class_bind_template_callback (widget_class, back_button_clicked_cb);
+ gtk_widget_class_bind_template_callback (widget_class, header_subscribe_button_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, header_unregister_button_clicked_cb);
+ gtk_widget_class_bind_template_callback (widget_class, subscribe_button_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, unregister_button_clicked_cb);
gtk_widget_class_bind_template_callback (widget_class, dismiss_notification);
}
@@ -413,7 +572,6 @@ cc_subscription_details_dialog_new (GDBusProxy *subscription_proxy,
self,
G_CONNECT_SWAPPED);
- load_installed_products (self);
dialog_reload (self);
return self;
diff --git a/panels/info/cc-subscription-details-dialog.ui b/panels/info/cc-subscription-details-dialog.ui
index 6f0b16930..6cdfc1220 100644
--- a/panels/info/cc-subscription-details-dialog.ui
+++ b/panels/info/cc-subscription-details-dialog.ui
@@ -33,21 +33,52 @@
</object>
</child>
<child>
- <object class="GtkButton" id="header_unregister_button">
- <property name="label" translatable="yes">_Unregister</property>
+ <object class="GtkStack" id="header_stack">
<property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="can_default">True</property>
- <property name="has_default">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="use_underline">True</property>
- <property name="valign">center</property>
- <signal name="clicked" handler="header_unregister_button_clicked_cb"
object="CcSubscriptionDetailsDialog" swapped="yes"/>
- <style>
- <class name="text-button"/>
- <class name="destructive-action"/>
- </style>
+ <property name="can_focus">False</property>
+ <property name="transition-type">slide-left-right</property>
+ <child>
+ <object class="GtkButton" id="header_unregister_button">
+ <property name="label" translatable="yes">_Unregister</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="valign">center</property>
+ <signal name="clicked" handler="header_unregister_button_clicked_cb"
object="CcSubscriptionDetailsDialog" swapped="yes"/>
+ <style>
+ <class name="text-button"/>
+ <class name="destructive-action"/>
+ </style>
+ </object>
+ <packing>
+ <property name="name">unregister</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkButton" id="header_subscribe_button">
+ <property name="label" translatable="yes">_Subscribe</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="can_default">True</property>
+ <property name="has_default">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="use_underline">True</property>
+ <property name="valign">center</property>
+ <signal name="clicked" handler="header_subscribe_button_clicked_cb"
object="CcSubscriptionDetailsDialog" swapped="yes"/>
+ <style>
+ <class name="text-button"/>
+ <class name="suggested-action"/>
+ </style>
+ </object>
+ <packing>
+ <property name="name">subscribe</property>
+ </packing>
+ </child>
</object>
<packing>
<property name="pack_type">end</property>
@@ -147,6 +178,170 @@
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="transition-type">slide-left-right</property>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="margin_top">24</property>
+ <property name="margin_start">32</property>
+ <property name="margin_end">12</property>
+ <property name="margin_bottom">12</property>
+ <child>
+ <object class="GtkStack" id="status_stack">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">This system is subscribed to receive
software updates.</property>
+ <property name="width_chars">45</property>
+ <property name="max_width_chars">45</property>
+ <property name="xalign">0</property>
+ <property name="halign">start</property>
+ <property name="wrap">True</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="name">fully-subscribed</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">This system lacks subscriptions to
receive updates for some installed software.</property>
+ <property name="width_chars">45</property>
+ <property name="max_width_chars">45</property>
+ <property name="xalign">0</property>
+ <property name="halign">start</property>
+ <property name="wrap">True</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="name">partly-subscribed</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">This system lacks subscriptions to
receive software updates.</property>
+ <property name="width_chars">45</property>
+ <property name="max_width_chars">45</property>
+ <property name="xalign">0</property>
+ <property name="halign">start</property>
+ <property name="wrap">True</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="name">not-subscribed</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">This system is registered to receive
software updates.</property>
+ <property name="width_chars">45</property>
+ <property name="max_width_chars">45</property>
+ <property name="xalign">0</property>
+ <property name="halign">start</property>
+ <property name="wrap">True</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="name">subscription-not-needed</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">This system has no supported software
installed.</property>
+ <property name="width_chars">45</property>
+ <property name="max_width_chars">45</property>
+ <property name="xalign">0</property>
+ <property name="halign">start</property>
+ <property name="wrap">True</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="name">no-installed-products</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox" id="products_box1">
+ <property name="visible">True</property>
+ <property name="orientation">vertical</property>
+ <property name="hexpand">True</property>
+ <property name="margin_top">6</property>
+ <property name="margin_bottom">6</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkBox">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="orientation">horizontal</property>
+ <property name="spacing">12</property>
+ <property name="halign">end</property>
+ <child>
+ <object class="GtkButton" id="unregister_button">
+ <property name="label" translatable="yes">_Unregister…</property>
+ <property name="can_focus">True</property>
+ <property name="use_underline">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="halign">end</property>
+ <property name="visible">True</property>
+ <signal name="clicked" handler="unregister_button_clicked_cb"
object="CcSubscriptionDetailsDialog" swapped="yes"/>
+ <style>
+ <class name="text-button"/>
+ <class name="destructive-action"/>
+ </style>
+ </object>
+ </child>
+ <child>
+ <object class="GtkSeparator" id="separator">
+ <property name="visible">True</property>
+ </object>
+ </child>
+ <child>
+ <object class="GtkButton" id="subscribe_button">
+ <property name="label" translatable="yes">_Subscribe…</property>
+ <property name="can_focus">True</property>
+ <property name="use_underline">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_action_appearance">False</property>
+ <property name="halign">end</property>
+ <property name="visible">True</property>
+ <signal name="clicked" handler="subscribe_button_clicked_cb"
object="CcSubscriptionDetailsDialog" swapped="yes"/>
+ <style>
+ <class name="text-button"/>
+ <class name="suggested-action"/>
+ </style>
+ </object>
+ </child>
+ </object>
+ </child>
+ </object>
+ <packing>
+ <property name="name">show-details</property>
+ </packing>
+ </child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
@@ -159,19 +354,16 @@
<object class="GtkLabel">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="label" translatable="yes">Registration with Red Hat allows this
system to receive software updates.</property>
+ <property name="label" translatable="yes">Subscribing with Red Hat will allow this
system to receive software updates.</property>
<property name="width_chars">45</property>
<property name="max_width_chars">45</property>
<property name="xalign">0</property>
<property name="halign">start</property>
<property name="wrap">True</property>
- <style>
- <class name="dim-label"/>
- </style>
</object>
</child>
<child>
- <object class="GtkBox" id="products_box1">
+ <object class="GtkBox" id="products_box2">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="margin_top">6</property>
@@ -179,24 +371,9 @@
<property name="hexpand">True</property>
</object>
</child>
- <child>
- <object class="GtkButton" id="unregister_button">
- <property name="label" translatable="yes">_Unregister…</property>
- <property name="can_focus">True</property>
- <property name="use_underline">True</property>
- <property name="receives_default">True</property>
- <property name="use_action_appearance">False</property>
- <property name="halign">end</property>
- <property name="visible">True</property>
- <signal name="clicked" handler="unregister_button_clicked_cb"
object="CcSubscriptionDetailsDialog" swapped="yes"/>
- <style>
- <class name="text-button"/>
- </style>
- </object>
- </child>
</object>
<packing>
- <property name="name">show-details</property>
+ <property name="name">subscribe</property>
</packing>
</child>
<child>
@@ -220,7 +397,7 @@
</object>
</child>
<child>
- <object class="GtkBox" id="products_box2">
+ <object class="GtkBox" id="products_box3">
<property name="visible">True</property>
<property name="orientation">vertical</property>
<property name="margin_top">6</property>
diff --git a/panels/info/info-overview.ui b/panels/info/info-overview.ui
index e33ba399a..3ed79712a 100644
--- a/panels/info/info-overview.ui
+++ b/panels/info/info-overview.ui
@@ -393,14 +393,37 @@
</object>
</child>
<child>
- <object class="GtkLabel">
+ <object class="GtkStack" id="updates_stack">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="xalign">0</property>
- <property name="label" translatable="yes">System is registered and able to
receive software updates.</property>
- <attributes>
- <attribute name="scale" value="0.8"/>
- </attributes>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">System is registered and able to
receive software updates.</property>
+ <attributes>
+ <attribute name="scale" value="0.8"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="name">updates</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="xalign">0</property>
+ <property name="label" translatable="yes">System is registered but is unable
to receive all software updates.</property>
+ <attributes>
+ <attribute name="scale" value="0.8"/>
+ </attributes>
+ </object>
+ <packing>
+ <property name="name">no-updates</property>
+ </packing>
+ </child>
</object>
</child>
</object>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]