[nautilus/wip/cdavis/post-port-cleanups: 18/25] progress-info-widget: Use GtkButton:icon-name
- From: Christopher Davis <christopherdavis src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [nautilus/wip/cdavis/post-port-cleanups: 18/25] progress-info-widget: Use GtkButton:icon-name
- Date: Sat, 16 Jul 2022 13:40:17 +0000 (UTC)
commit 0b6306d0b94c27b01f7419c50f5cdd7f8135ef75
Author: Christopher Davis <christopherdavis gnome org>
Date: Sat Jul 16 08:43:38 2022 -0400
progress-info-widget: Use GtkButton:icon-name
GtkButton's API sets the right style classes automatically.
src/nautilus-progress-info-widget.c | 6 ++----
src/resources/ui/nautilus-progress-info-widget.ui | 7 +------
2 files changed, 3 insertions(+), 10 deletions(-)
---
diff --git a/src/nautilus-progress-info-widget.c b/src/nautilus-progress-info-widget.c
index d2b4a3ff4..b5be930c9 100644
--- a/src/nautilus-progress-info-widget.c
+++ b/src/nautilus-progress-info-widget.c
@@ -32,7 +32,6 @@ struct _NautilusProgressInfoWidgetPrivate
GtkWidget *details; /* GtkLabel */
GtkWidget *progress_bar;
GtkWidget *button;
- GtkWidget *image;
};
enum
@@ -49,7 +48,7 @@ G_DEFINE_TYPE_WITH_PRIVATE (NautilusProgressInfoWidget, nautilus_progress_info_w
static void
info_finished (NautilusProgressInfoWidget *self)
{
- gtk_image_set_from_icon_name (GTK_IMAGE (self->priv->image), "object-select-symbolic");
+ gtk_button_set_icon_name (GTK_BUTTON (self->priv->button), "object-select-symbolic");
gtk_widget_set_sensitive (self->priv->button, FALSE);
}
@@ -125,7 +124,7 @@ nautilus_progress_info_widget_constructed (GObject *obj)
if (nautilus_progress_info_get_is_finished (self->priv->info))
{
- gtk_image_set_from_icon_name (GTK_IMAGE (self->priv->image), "object-select-symbolic");
+ gtk_button_set_icon_name (GTK_BUTTON (self->priv->button), "object-select-symbolic");
}
gtk_widget_set_sensitive (self->priv->button,
@@ -213,7 +212,6 @@ nautilus_progress_info_widget_class_init (NautilusProgressInfoWidgetClass *klass
gtk_widget_class_bind_template_child_private (widget_class, NautilusProgressInfoWidget, details);
gtk_widget_class_bind_template_child_private (widget_class, NautilusProgressInfoWidget, progress_bar);
gtk_widget_class_bind_template_child_private (widget_class, NautilusProgressInfoWidget, button);
- gtk_widget_class_bind_template_child_private (widget_class, NautilusProgressInfoWidget, image);
}
GtkWidget *
diff --git a/src/resources/ui/nautilus-progress-info-widget.ui
b/src/resources/ui/nautilus-progress-info-widget.ui
index 09930a560..db18d990b 100644
--- a/src/resources/ui/nautilus-progress-info-widget.ui
+++ b/src/resources/ui/nautilus-progress-info-widget.ui
@@ -41,15 +41,10 @@
<object class="GtkButton" id="button">
<property name="valign">center</property>
<property name="margin_start">20</property>
+ <property name="icon-name">window-close-symbolic</property>
<style>
- <class name="image-button"/>
<class name="circular"/>
</style>
- <child>
- <object class="GtkImage" id="image">
- <property name="icon-name">window-close-symbolic</property>
- </object>
- </child>
<layout>
<property name="column">1</property>
<property name="row">0</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]