[gnome-bluetooth] lib: Adapt to GtkImage API changes
- From: Bastien Nocera <hadess src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] lib: Adapt to GtkImage API changes
- Date: Thu, 28 Oct 2021 15:29:58 +0000 (UTC)
commit 035ccf0578240b76d568c8778f5254afcb4df67f
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Wed Oct 27 12:54:53 2021 -0300
lib: Adapt to GtkImage API changes
GtkImage doesn't receive the icon size enum in its constructor anymore,
so drop it from the constructors. Set the icon-size to large for the
BluetoothSettingsWidget class in the UI file, so that the icon continues
with the same icon size it used to have.
lib/bluetooth-settings-widget.c | 2 +-
lib/settings.ui | 1 +
lib/test-client.c | 2 +-
3 files changed, 3 insertions(+), 2 deletions(-)
---
diff --git a/lib/bluetooth-settings-widget.c b/lib/bluetooth-settings-widget.c
index 85aed150..f55428aa 100644
--- a/lib/bluetooth-settings-widget.c
+++ b/lib/bluetooth-settings-widget.c
@@ -1183,7 +1183,7 @@ update_properties (BluetoothSettingsWidget *self,
priv->selected_name = alias;
/* Icon */
- gtk_image_set_from_icon_name (GTK_IMAGE (WID ("image")), icon, GTK_ICON_SIZE_DIALOG);
+ gtk_image_set_from_icon_name (GTK_IMAGE (WID ("image")), icon);
/* Connection */
button = GTK_SWITCH (WID ("switch_connection"));
diff --git a/lib/settings.ui b/lib/settings.ui
index bced51ef..f668cbe6 100644
--- a/lib/settings.ui
+++ b/lib/settings.ui
@@ -23,6 +23,7 @@
<property name="margin_top">16</property>
<property name="margin_bottom">16</property>
<property name="icon_name">image-missing</property>
+ <property name="icon_size">large</property>
<property name="use_fallback">True</property>
</object>
<packing>
diff --git a/lib/test-client.c b/lib/test-client.c
index 11364bc9..03439ce8 100644
--- a/lib/test-client.c
+++ b/lib/test-client.c
@@ -165,7 +165,7 @@ static void create_window(void)
gtk_toolbar_set_show_arrow(GTK_TOOLBAR(toolbar), FALSE);
gtk_box_pack_start(GTK_BOX(vbox), toolbar, FALSE, TRUE, 0);
- item = gtk_tool_button_new (gtk_image_new_from_icon_name ("view-refresh",
GTK_ICON_SIZE_LARGE_TOOLBAR), NULL);
+ item = gtk_tool_button_new (gtk_image_new_from_icon_name ("view-refresh"), NULL);
gtk_toolbar_insert(GTK_TOOLBAR(toolbar), item, -1);
g_signal_connect(item, "clicked", G_CALLBACK(scan_callback), NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]