[gnome-bluetooth] lib: Remove some unecessary calls to gtk_widget_show()
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-bluetooth] lib: Remove some unecessary calls to gtk_widget_show()
- Date: Thu, 28 Oct 2021 17:10:14 +0000 (UTC)
commit 1aae675ef8aa553c64d3320fa2a0edcbe5d6fd2b
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date: Thu Oct 28 13:29:54 2021 -0300
lib: Remove some unecessary calls to gtk_widget_show()
We don't need to call gtk_widget_show() right after creating a widget,
since widgets are now visible by default.
lib/bluetooth-pairing-dialog.c | 2 --
lib/bluetooth-settings-widget.c | 1 -
2 files changed, 3 deletions(-)
---
diff --git a/lib/bluetooth-pairing-dialog.c b/lib/bluetooth-pairing-dialog.c
index cfc5aa70..0f588714 100644
--- a/lib/bluetooth-pairing-dialog.c
+++ b/lib/bluetooth-pairing-dialog.c
@@ -280,7 +280,6 @@ bluetooth_pairing_dialog_constructed (GObject *object)
header = gtk_dialog_get_header_bar (GTK_DIALOG (self));
priv->title = gtk_label_new ("");
gtk_header_bar_set_title_widget (GTK_HEADER_BAR (header), priv->title);
- gtk_widget_show (priv->title);
gtk_header_bar_set_show_title_buttons (GTK_HEADER_BAR (header), FALSE);
/* OK button */
@@ -306,7 +305,6 @@ bluetooth_pairing_dialog_constructed (GObject *object)
g_signal_connect (G_OBJECT (priv->cancel), "clicked",
G_CALLBACK (response_cb), self);
gtk_header_bar_pack_start (GTK_HEADER_BAR (header), priv->cancel);
- gtk_widget_show (priv->cancel);
g_signal_connect (G_OBJECT (priv->entry_pin), "notify::text",
G_CALLBACK (text_changed_cb), self);
diff --git a/lib/bluetooth-settings-widget.c b/lib/bluetooth-settings-widget.c
index 477ff1dc..c844997a 100644
--- a/lib/bluetooth-settings-widget.c
+++ b/lib/bluetooth-settings-widget.c
@@ -1484,7 +1484,6 @@ update_header_func (GtkListBoxRow *row,
current = gtk_list_box_row_get_header (row);
if (current == NULL) {
current = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
- gtk_widget_show (current);
gtk_list_box_row_set_header (row, current);
}
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]