[gnome-control-center] privacy: Don't use gtk_widget_show_all
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-control-center] privacy: Don't use gtk_widget_show_all
- Date: Thu, 11 Oct 2018 22:25:51 +0000 (UTC)
commit bb7e0e71e104845e3a5c3778bf089e2f6b3844b6
Author: Robert Ancell <robert ancell canonical com>
Date: Thu Oct 11 16:04:12 2018 +1300
privacy: Don't use gtk_widget_show_all
It is removed in GTK+ 4
panels/privacy/cc-privacy-panel.c | 19 +++++++++++++++----
1 file changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/panels/privacy/cc-privacy-panel.c b/panels/privacy/cc-privacy-panel.c
index 27f0826e4..bdc962385 100644
--- a/panels/privacy/cc-privacy-panel.c
+++ b/panels/privacy/cc-privacy-panel.c
@@ -288,13 +288,16 @@ add_row (CcPrivacyPanel *self,
GtkWidget *box, *row, *w;
row = gtk_list_box_row_new ();
+ gtk_widget_show (row);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 50);
+ gtk_widget_show (box);
gtk_container_add (GTK_CONTAINER (row), box);
g_object_set_data (G_OBJECT (row), "dialog-id", (gpointer)dialog_id);
gtk_widget_set_hexpand (box, TRUE);
gtk_container_add (GTK_CONTAINER (self->list_box), row);
w = gtk_label_new (label);
+ gtk_widget_show (w);
gtk_widget_set_halign (w, GTK_ALIGN_START);
gtk_widget_set_margin_start (w, 20);
gtk_widget_set_margin_end (w, 20);
@@ -310,8 +313,6 @@ add_row (CcPrivacyPanel *self,
gtk_widget_set_valign (status, GTK_ALIGN_CENTER);
gtk_box_pack_end (GTK_BOX (box), status, FALSE, FALSE, 0);
- gtk_widget_show_all (row);
-
return row;
}
@@ -386,6 +387,7 @@ add_screen_lock (CcPrivacyPanel *self)
GtkWidget *label;
w = get_on_off_label (self->lock_settings, "lock-enabled");
+ gtk_widget_show (w);
add_row (self, _("Screen Lock"), "screen_lock_dialog", w);
dialog = self->screen_lock_dialog;
@@ -617,7 +619,9 @@ add_location_app (CcPrivacyPanel *self,
return;
row = gtk_list_box_row_new ();
+ gtk_widget_show (row);
box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_widget_show (box);
gtk_widget_set_margin_start (box, 12);
gtk_widget_set_margin_end (box, 6);
gtk_widget_set_margin_top (box, 12);
@@ -628,12 +632,14 @@ add_location_app (CcPrivacyPanel *self,
icon = g_app_info_get_icon (G_APP_INFO (app_info));
w = gtk_image_new_from_gicon (icon, GTK_ICON_SIZE_LARGE_TOOLBAR);
+ gtk_widget_show (w);
gtk_widget_set_halign (w, GTK_ALIGN_CENTER);
gtk_widget_set_valign (w, GTK_ALIGN_CENTER);
gtk_size_group_add_widget (self->location_icon_size_group, w);
gtk_box_pack_start (GTK_BOX (box), w, FALSE, FALSE, 0);
w = gtk_label_new (g_app_info_get_name (G_APP_INFO (app_info)));
+ gtk_widget_show (w);
gtk_widget_set_margin_start (w, 12);
gtk_widget_set_margin_end (w, 12);
gtk_widget_set_halign (w, GTK_ALIGN_START);
@@ -644,6 +650,7 @@ add_location_app (CcPrivacyPanel *self,
t = g_date_time_new_from_unix_utc (last_used);
last_used_str = cc_util_get_smart_date (t);
w = gtk_label_new (last_used_str);
+ gtk_widget_show (w);
g_free (last_used_str);
gtk_style_context_add_class (gtk_widget_get_style_context (w), "dim-label");
gtk_widget_set_margin_start (w, 12);
@@ -653,6 +660,7 @@ add_location_app (CcPrivacyPanel *self,
gtk_box_pack_start (GTK_BOX (box), w, TRUE, TRUE, 0);
w = gtk_switch_new ();
+ gtk_widget_show (w);
gtk_switch_set_active (GTK_SWITCH (w), enabled);
gtk_widget_set_halign (w, GTK_ALIGN_END);
gtk_widget_set_valign (w, GTK_ALIGN_CENTER);
@@ -675,8 +683,6 @@ add_location_app (CcPrivacyPanel *self,
data,
(GClosureNotify) location_app_state_data_free,
0);
-
- gtk_widget_show_all (row);
}
/* Steals permissions and permissions_data references */
@@ -814,6 +820,7 @@ add_location (CcPrivacyPanel *self)
GtkWidget *dialog;
self->location_label = gtk_label_new ("");
+ gtk_widget_show (self->location_label);
update_location_label (self);
add_row (self,
@@ -940,6 +947,7 @@ add_usage_history (CcPrivacyPanel *self)
GtkWidget *label;
w = get_on_off_label (self->privacy_settings, REMEMBER_RECENT_FILES);
+ gtk_widget_show (w);
add_row (self, _("Usage & History"), "recent_dialog", w);
dialog = self->recent_dialog;
@@ -1118,6 +1126,7 @@ add_trash_temp (CcPrivacyPanel *self)
GtkWidget *dialog;
w = get_on_off_label2 (self->privacy_settings, REMOVE_OLD_TRASH_FILES, REMOVE_OLD_TEMP_FILES);
+ gtk_widget_show (w);
add_row (self, _("Purge Trash & Temporary Files"), "trash_dialog", w);
dialog = self->trash_dialog;
@@ -1158,6 +1167,7 @@ add_software (CcPrivacyPanel *self)
return;
w = get_on_off_label (self->privacy_settings, SEND_SOFTWARE_USAGE_STATS);
+ gtk_widget_show (w);
add_row (self, _("Software Usage"), "software_dialog", w);
dialog = self->software_dialog;
@@ -1199,6 +1209,7 @@ add_abrt (CcPrivacyPanel *self)
char *os_name, *url, *msg;
w = get_abrt_label (self->privacy_settings, REPORT_TECHNICAL_PROBLEMS);
+ gtk_widget_show (w);
self->abrt_row = add_row (self, _("Problem Reporting"), "abrt_dialog", w);
gtk_widget_hide (self->abrt_row);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]