[frogr] Stop using gtk_widget_show(), and use gtk_widget_show() instead
- From: Mario Sanchez Prada <msanchez src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [frogr] Stop using gtk_widget_show(), and use gtk_widget_show() instead
- Date: Thu, 4 Oct 2018 22:51:26 +0000 (UTC)
commit 457a3a16334beef2c7f1508bca6a31827f181ab4
Author: Mario Sanchez Prada <msanchez gnome org>
Date: Fri Oct 5 00:46:56 2018 +0200
Stop using gtk_widget_show(), and use gtk_widget_show() instead
Fix warnings during builds due to gtk_widget_show_all() being deprecated.
src/frogr-add-tags-dialog.c | 5 +++-
src/frogr-add-to-group-dialog.c | 4 +++-
src/frogr-add-to-set-dialog.c | 4 +++-
src/frogr-auth-dialog.c | 11 +++++++--
src/frogr-controller.c | 2 +-
src/frogr-create-new-set-dialog.c | 14 +++++++++--
src/frogr-details-dialog.c | 50 +++++++++++++++++++++++++++++++++++++--
src/frogr-main-view.c | 9 +++----
src/frogr-settings-dialog.c | 42 +++++++++++++++++++++++++++++++-
src/frogr-util.c | 2 +-
10 files changed, 127 insertions(+), 16 deletions(-)
---
diff --git a/src/frogr-add-tags-dialog.c b/src/frogr-add-tags-dialog.c
index 1e95427..fc9bfaf 100644
--- a/src/frogr-add-tags-dialog.c
+++ b/src/frogr-add-tags-dialog.c
@@ -194,13 +194,16 @@ frogr_add_tags_dialog_init (FrogrAddTagsDialog *self)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (self));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_widget_set_margin_bottom (vbox, 6);
+ gtk_widget_show (vbox);
label = gtk_label_new (_("Enter a spaces separated list of tags:"));
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
self->entry = frogr_live_entry_new ();
gtk_box_pack_start (GTK_BOX (vbox), self->entry, FALSE, FALSE, 0);
+ gtk_widget_show (self->entry);
gtk_widget_set_size_request (GTK_WIDGET (self), 300, -1);
@@ -239,5 +242,5 @@ frogr_add_tags_dialog_show (GtkWindow *parent, const GSList *pictures, const GSL
frogr_live_entry_set_auto_completion (FROGR_LIVE_ENTRY (dialog->entry), tags);
}
- gtk_widget_show_all (GTK_WIDGET (new));
+ gtk_widget_show (GTK_WIDGET (new));
}
diff --git a/src/frogr-add-to-group-dialog.c b/src/frogr-add-to-group-dialog.c
index 07a219b..9f156fa 100644
--- a/src/frogr-add-to-group-dialog.c
+++ b/src/frogr-add-to-group-dialog.c
@@ -535,9 +535,11 @@ frogr_add_to_group_dialog_init (FrogrAddToGroupDialog *self)
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (widget),
GTK_SHADOW_ETCHED_IN);
gtk_box_pack_start (GTK_BOX (vbox), widget, TRUE, TRUE, 6);
+ gtk_widget_show (widget);
self->treeview = _create_tree_view (self);
gtk_container_add (GTK_CONTAINER (widget), self->treeview);
+ gtk_widget_show (self->treeview);
self->treemodel =
GTK_TREE_MODEL (gtk_list_store_new (4, G_TYPE_BOOLEAN,
@@ -588,5 +590,5 @@ frogr_add_to_group_dialog_show (GtkWindow *parent,
_populate_treemodel_with_groups (self);
_fill_dialog_with_data (self);
- gtk_widget_show_all (GTK_WIDGET (self));
+ gtk_widget_show (GTK_WIDGET (self));
}
diff --git a/src/frogr-add-to-set-dialog.c b/src/frogr-add-to-set-dialog.c
index 4fbd208..36c2ffb 100644
--- a/src/frogr-add-to-set-dialog.c
+++ b/src/frogr-add-to-set-dialog.c
@@ -536,9 +536,11 @@ frogr_add_to_set_dialog_init (FrogrAddToSetDialog *self)
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (widget),
GTK_SHADOW_ETCHED_IN);
gtk_box_pack_start (GTK_BOX (vbox), widget, TRUE, TRUE, 6);
+ gtk_widget_show (widget);
self->treeview = _create_tree_view (self);
gtk_container_add (GTK_CONTAINER (widget), self->treeview);
+ gtk_widget_show (self->treeview);
self->treemodel =
GTK_TREE_MODEL (gtk_list_store_new (4, G_TYPE_BOOLEAN,
@@ -589,5 +591,5 @@ frogr_add_to_set_dialog_show (GtkWindow *parent,
_populate_treemodel_with_photosets (self);
_fill_dialog_with_data (self);
- gtk_widget_show_all (GTK_WIDGET (self));
+ gtk_widget_show (GTK_WIDGET (self));
}
diff --git a/src/frogr-auth-dialog.c b/src/frogr-auth-dialog.c
index 9935689..1689e73 100644
--- a/src/frogr-auth-dialog.c
+++ b/src/frogr-auth-dialog.c
@@ -66,7 +66,7 @@ _ask_for_authorization (GtkWindow *parent)
g_signal_connect (G_OBJECT (dialog), "response",
G_CALLBACK (_ask_for_authorization_response_cb), NULL);
- gtk_widget_show_all (dialog);
+ gtk_widget_show (dialog);
}
static void
@@ -117,6 +117,7 @@ _build_verification_code_entry_widget (GtkWidget *dialog)
gtk_entry_set_width_chars (GTK_ENTRY (entry), 3);
gtk_entry_set_alignment (GTK_ENTRY (entry), 0.5);
gtk_box_pack_start (GTK_BOX (hbox), entry, TRUE, FALSE, 6);
+ gtk_widget_show (entry);
entry_key = g_strdup_printf ("vercode-%d", i + 1);
g_object_set_data (G_OBJECT (dialog), entry_key, entry);
@@ -129,9 +130,11 @@ _build_verification_code_entry_widget (GtkWidget *dialog)
{
separator = gtk_separator_new (GTK_ORIENTATION_HORIZONTAL);
gtk_box_pack_start (GTK_BOX (hbox), separator, TRUE, TRUE, 0);
+ gtk_widget_show (separator);
}
}
+ gtk_widget_show (hbox);
return hbox;
}
@@ -160,16 +163,20 @@ _ask_for_auth_confirmation (GtkWindow *parent)
content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_widget_set_margin_bottom (vbox, 6);
+ gtk_widget_show (vbox);
/* Description label */
label = gtk_label_new (_("Enter verification code:"));
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
/* Entry widgets for the verification code */
ver_code_entry = _build_verification_code_entry_widget (dialog);
gtk_box_pack_start (GTK_BOX (vbox), ver_code_entry, FALSE, FALSE, 0);
+ gtk_widget_show (ver_code_entry);
+ gtk_widget_show (content_area);
gtk_container_add (GTK_CONTAINER (content_area), vbox);
g_signal_connect (G_OBJECT (dialog), "response",
@@ -178,7 +185,7 @@ _ask_for_auth_confirmation (GtkWindow *parent)
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_CLOSE);
gtk_window_set_default_size (GTK_WINDOW (dialog), 200, -1);
- gtk_widget_show_all (dialog);
+ gtk_widget_show (dialog);
}
static const gchar*
diff --git a/src/frogr-controller.c b/src/frogr-controller.c
index 60d61a4..8bdd2a0 100644
--- a/src/frogr-controller.c
+++ b/src/frogr-controller.c
@@ -693,7 +693,7 @@ _show_auth_failed_dialog (GtkWindow *parent, const gchar *message, gboolean auto
G_CALLBACK (_auth_failed_dialog_response_cb),
GINT_TO_POINTER ((gint)auto_retry));
- gtk_widget_show_all (dialog);
+ gtk_widget_show (dialog);
}
static void
diff --git a/src/frogr-create-new-set-dialog.c b/src/frogr-create-new-set-dialog.c
index 4bada18..7db1931 100644
--- a/src/frogr-create-new-set-dialog.c
+++ b/src/frogr-create-new-set-dialog.c
@@ -306,28 +306,32 @@ frogr_create_new_set_dialog_init (FrogrCreateNewSetDialog *self)
NULL);
gtk_container_set_border_width (GTK_CONTAINER (self), 6);
- content_area = gtk_dialog_get_content_area (GTK_DIALOG (self));
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_widget_set_margin_bottom (vbox, 12);
+ gtk_widget_show (vbox);
grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
gtk_box_pack_start (GTK_BOX (vbox), grid, TRUE, TRUE, 0);
+ gtk_widget_show (grid);
widget = gtk_label_new (_("Title:"));
gtk_widget_set_halign (GTK_WIDGET (widget), GTK_ALIGN_END);
gtk_grid_attach (GTK_GRID (grid), widget, 0, 0, 1, 1);
+ gtk_widget_show (widget);
widget = gtk_entry_new ();
gtk_widget_set_hexpand (GTK_WIDGET (widget), TRUE);
gtk_grid_attach (GTK_GRID (grid), widget, 1, 0, 1, 1);
self->title_entry = widget;
+ gtk_widget_show (widget);
widget = gtk_label_new (_("Description:"));
gtk_widget_set_halign (GTK_WIDGET (widget), GTK_ALIGN_END);
gtk_widget_set_valign (GTK_WIDGET (widget), GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), widget, 0, 1, 1, 1);
+ gtk_widget_show (widget);
widget = gtk_text_view_new ();
scroller = gtk_scrolled_window_new (NULL, NULL);
@@ -336,11 +340,14 @@ frogr_create_new_set_dialog_init (FrogrCreateNewSetDialog *self)
gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroller),
GTK_SHADOW_ETCHED_IN);
gtk_container_add (GTK_CONTAINER (scroller), widget);
+ gtk_widget_show (widget);
+
gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW (widget), FALSE);
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (widget), GTK_WRAP_WORD);
gtk_widget_set_hexpand (GTK_WIDGET (scroller), TRUE);
gtk_widget_set_vexpand (GTK_WIDGET (scroller), TRUE);
gtk_grid_attach (GTK_GRID (grid), scroller, 1, 1, 1, 1);
+ gtk_widget_show (scroller);
self->description_buffer = gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget));
self->description_tv = widget;
@@ -348,9 +355,12 @@ frogr_create_new_set_dialog_init (FrogrCreateNewSetDialog *self)
widget = gtk_check_button_new_with_mnemonic (_("Fill Pictures Details with Title and Description"));
gtk_widget_set_hexpand (GTK_WIDGET (widget), TRUE);
gtk_grid_attach (GTK_GRID (grid), widget, 1, 2, 1, 1);
+ gtk_widget_show (widget);
self->copy_to_pictures_cb = widget;
+ content_area = gtk_dialog_get_content_area (GTK_DIALOG (self));
gtk_container_add (GTK_CONTAINER (content_area), vbox);
+ gtk_widget_show (content_area);
g_signal_connect (G_OBJECT (self->copy_to_pictures_cb), "toggled",
G_CALLBACK (_on_button_toggled),
@@ -386,5 +396,5 @@ frogr_create_new_set_dialog_show (GtkWindow *parent,
g_signal_connect (G_OBJECT (dialog), "response",
G_CALLBACK (_dialog_response_cb), NULL);
- gtk_widget_show_all (dialog);
+ gtk_widget_show (dialog);
}
diff --git a/src/frogr-details-dialog.c b/src/frogr-details-dialog.c
index e17cb8c..ec8d279 100644
--- a/src/frogr-details-dialog.c
+++ b/src/frogr-details-dialog.c
@@ -159,23 +159,28 @@ _create_widgets (FrogrDetailsDialog *self)
hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 18);
gtk_widget_set_margin_bottom (hbox, 6);
+ gtk_widget_show (hbox);
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
+ gtk_widget_show (vbox);
/* Left side (image, radio buttons, checkboxes...) */
grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
+ gtk_widget_show (grid);
widget = gtk_button_new ();
gtk_widget_set_tooltip_text (widget, _("Open with image viewer"));
gtk_button_set_relief (GTK_BUTTON (widget), GTK_RELIEF_NONE);
+ gtk_widget_show (widget);
self->picture_button = widget;
picture_frame = gtk_frame_new (NULL);
gtk_frame_set_shadow_type (GTK_FRAME (picture_frame), GTK_SHADOW_NONE);
gtk_widget_set_halign (GTK_WIDGET (picture_frame), GTK_ALIGN_CENTER);
+ gtk_widget_show (picture_frame);
gtk_grid_attach (GTK_GRID (grid), picture_frame, 1, 0, 1, 1);
self->picture_container = picture_frame;
@@ -184,28 +189,33 @@ _create_widgets (FrogrDetailsDialog *self)
widget = gtk_label_new (NULL);
gtk_widget_set_margin_bottom (widget, 6);
gtk_grid_attach (GTK_GRID (grid), widget, 1, 1, 1, 1);
+ gtk_widget_show (widget);
self->mpictures_label = widget;
self->mpictures_pixbuf = NULL;
label = gtk_label_new_with_mnemonic (_("_Title:"));
gtk_widget_set_halign (GTK_WIDGET (label), GTK_ALIGN_END);
gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
+ gtk_widget_show (label);
widget = gtk_entry_new ();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget);
gtk_widget_set_hexpand (GTK_WIDGET (widget), TRUE);
gtk_grid_attach (GTK_GRID (grid), widget, 1, 2, 1, 1);
+ gtk_widget_show (widget);
self->title_entry = widget;
label = gtk_label_new_with_mnemonic (_("_Description:"));
gtk_widget_set_halign (GTK_WIDGET (label), GTK_ALIGN_END);
gtk_widget_set_valign (GTK_WIDGET (label), GTK_ALIGN_START);
gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1);
+ gtk_widget_show (label);
widget = gtk_text_view_new ();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget);
gtk_text_view_set_accepts_tab (GTK_TEXT_VIEW (widget), FALSE);
gtk_text_view_set_wrap_mode (GTK_TEXT_VIEW (widget), GTK_WRAP_WORD);
+ gtk_widget_show (widget);
scroller = gtk_scrolled_window_new (NULL, NULL);
gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroller),
@@ -217,6 +227,7 @@ _create_widgets (FrogrDetailsDialog *self)
gtk_widget_set_hexpand (GTK_WIDGET (scroller), TRUE);
gtk_widget_set_vexpand (GTK_WIDGET (scroller), TRUE);
gtk_grid_attach (GTK_GRID (grid), scroller, 1, 3, 1, 1);
+ gtk_widget_show (scroller);
self->desc_tview = widget;
self->text_buffer =
gtk_text_view_get_buffer (GTK_TEXT_VIEW (self->desc_tview));
@@ -224,11 +235,13 @@ _create_widgets (FrogrDetailsDialog *self)
label = gtk_label_new_with_mnemonic (_("Ta_gs:"));
gtk_widget_set_halign (GTK_WIDGET (label), GTK_ALIGN_END);
gtk_grid_attach (GTK_GRID (grid), label, 0, 4, 1, 1);
+ gtk_widget_show (label);
widget = frogr_live_entry_new ();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), widget);
gtk_widget_set_hexpand (GTK_WIDGET (widget), TRUE);
gtk_grid_attach (GTK_GRID (grid), widget, 1, 4, 1, 1);
+ gtk_widget_show (widget);
self->tags_entry = widget;
gtk_box_pack_start (GTK_BOX (vbox), grid, TRUE, TRUE, 0);
@@ -238,10 +251,12 @@ _create_widgets (FrogrDetailsDialog *self)
/* Right side (text fields) */
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
+ gtk_widget_show (vbox);
/* Visibility */
section_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_widget_show (section_vbox);
markup = g_markup_printf_escaped ("<span weight=\"bold\">%s</span>",
_("Visibility"));
@@ -251,24 +266,32 @@ _create_widgets (FrogrDetailsDialog *self)
gtk_widget_set_halign (widget, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
internal_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
widget = gtk_radio_button_new_with_mnemonic (NULL, _("_Private"));
gtk_box_pack_start (GTK_BOX (internal_hbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
self->private_rb = widget;
widget = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON (self->private_rb),
_("P_ublic"));
gtk_box_pack_start (GTK_BOX (internal_hbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
self->public_rb = widget;
gtk_box_pack_start (GTK_BOX (section_vbox), internal_hbox, FALSE, FALSE, 0);
+ gtk_widget_show (internal_hbox);
internal_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_widget_show (internal_hbox);
+
private_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (private_hbox);
widget = gtk_check_button_new_with_mnemonic (_("_Family"));
gtk_box_pack_start (GTK_BOX (private_hbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
self->family_cb = widget;
widget = gtk_check_button_new_with_mnemonic (_("F_riends"));
@@ -282,7 +305,10 @@ _create_widgets (FrogrDetailsDialog *self)
/* Content type */
section_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_widget_show (section_vbox);
+
content_type_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (content_type_hbox);
markup = g_markup_printf_escaped ("<span weight=\"bold\">%s</span>",
_("Content Type"));
@@ -292,17 +318,21 @@ _create_widgets (FrogrDetailsDialog *self)
gtk_widget_set_halign (widget, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
widget = gtk_radio_button_new_with_mnemonic (NULL, _("P_hoto"));
gtk_box_pack_start (GTK_BOX (content_type_hbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
self->photo_content_rb = widget;
widget = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON (self->photo_content_rb),
_("Scree_nshot"));
gtk_box_pack_start (GTK_BOX (content_type_hbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
self->sshot_content_rb = widget;
widget = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON (self->photo_content_rb),
_("Oth_er"));
gtk_box_pack_start (GTK_BOX (content_type_hbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
self->other_content_rb = widget;
gtk_box_pack_start (GTK_BOX (section_vbox), content_type_hbox, FALSE, FALSE, 0);
@@ -311,7 +341,10 @@ _create_widgets (FrogrDetailsDialog *self)
/* Safety level */
section_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_widget_show (section_vbox);
+
safety_level_hbox = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (safety_level_hbox);
markup = g_markup_printf_escaped ("<span weight=\"bold\">%s</span>",
_("Safety Level"));
@@ -321,17 +354,21 @@ _create_widgets (FrogrDetailsDialog *self)
gtk_widget_set_halign (widget, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
widget = gtk_radio_button_new_with_mnemonic (NULL, _("S_afe"));
gtk_box_pack_start (GTK_BOX (safety_level_hbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
self->safe_rb = widget;
widget = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON (self->safe_rb), _("_Moderate"));
gtk_box_pack_start (GTK_BOX (safety_level_hbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
self->moderate_rb = widget;
widget = gtk_radio_button_new_with_mnemonic_from_widget (GTK_RADIO_BUTTON (self->safe_rb),
_("Restr_icted"));
gtk_box_pack_start (GTK_BOX (safety_level_hbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
self->restricted_rb = widget;
gtk_box_pack_start (GTK_BOX (section_vbox), safety_level_hbox, FALSE, FALSE, 0);
@@ -340,6 +377,7 @@ _create_widgets (FrogrDetailsDialog *self)
/* License type */
section_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_widget_show (section_vbox);
markup = g_markup_printf_escaped ("<span weight=\"bold\">%s</span>",
_("License Type"));
@@ -349,11 +387,13 @@ _create_widgets (FrogrDetailsDialog *self)
gtk_widget_set_halign (widget, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
widget = gtk_combo_box_text_new ();
for (i = 0; license_descriptions[i]; i++)
gtk_combo_box_text_insert (GTK_COMBO_BOX_TEXT (widget), i, NULL, _(license_descriptions[i]));
+ gtk_widget_show (widget);
self->license_cb = widget;
gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
@@ -362,6 +402,7 @@ _create_widgets (FrogrDetailsDialog *self)
/* Other properties */
section_vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_widget_show (section_vbox);
markup = g_markup_printf_escaped ("<span weight=\"bold\">%s</span>",
_("Other Properties"));
@@ -371,17 +412,21 @@ _create_widgets (FrogrDetailsDialog *self)
gtk_widget_set_halign (widget, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
widget = gtk_check_button_new_with_mnemonic (_("_Show Up in Global Search Results"));
gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
self->show_in_search_cb = widget;
widget = gtk_check_button_new_with_mnemonic (_("Set Geo_location Information"));
gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
self->send_location_cb = widget;
widget = gtk_check_button_new_with_mnemonic (_("Replace 'Date Posted' with 'Date Taken'"));
gtk_box_pack_start (GTK_BOX (section_vbox), widget, FALSE, FALSE, 0);
+ gtk_widget_show (widget);
self->replace_date_posted_cb = widget;
gtk_box_pack_start (GTK_BOX (vbox), section_vbox, FALSE, FALSE, 0);
@@ -432,7 +477,7 @@ _create_widgets (FrogrDetailsDialog *self)
G_CALLBACK (_on_radio_button_clicked), self);
/* Show widgets */
- gtk_widget_show_all (main_vbox);
+ gtk_widget_show (main_vbox);
}
static void
@@ -562,7 +607,7 @@ _place_picture_in_dialog_and_show (FrogrDetailsDialog *self)
G_CALLBACK (_on_picture_button_clicked),
self);
- gtk_widget_show_all (GTK_WIDGET (self));
+ gtk_widget_show (GTK_WIDGET (self));
}
static void
@@ -1186,6 +1231,7 @@ frogr_details_dialog_show (GtkWindow *parent,
#if GTK_CHECK_VERSION (3, 12, 0)
"use-header-bar", USE_HEADER_BAR,
#endif
+ "visible", TRUE,
NULL);
/* Initialize values for widgets based on the data (pictures) passed */
diff --git a/src/frogr-main-view.c b/src/frogr-main-view.c
index a60c58f..f1128bc 100644
--- a/src/frogr-main-view.c
+++ b/src/frogr-main-view.c
@@ -447,6 +447,7 @@ _initialize_ui (FrogrMainView *self)
progress_vbox = gtk_message_dialog_get_message_area (GTK_MESSAGE_DIALOG (progress_dialog));
gtk_container_add (GTK_CONTAINER (progress_vbox), progress_bar);
+ gtk_widget_show (GTK_WIDGET (progress_bar));
gtk_widget_hide (progress_dialog);
self->progress_dialog = progress_dialog;
@@ -1501,7 +1502,7 @@ _open_project_dialog (FrogrMainView *self)
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gtk_widget_show_all (dialog);
+ gtk_widget_show (dialog);
}
static void
@@ -1570,7 +1571,7 @@ _save_project_as_dialog (FrogrMainView *self)
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gtk_widget_show_all (dialog);
+ gtk_widget_show (dialog);
}
static void
@@ -1651,7 +1652,7 @@ _load_pictures_dialog (FrogrMainView *self)
gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_ACCEPT);
gtk_window_set_modal (GTK_WINDOW (dialog), TRUE);
- gtk_widget_show_all (dialog);
+ gtk_widget_show (dialog);
}
static gboolean
@@ -2378,7 +2379,7 @@ frogr_main_view_show_progress (FrogrMainView *self, const gchar *title, const gc
gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (self->progress_bar), 0.0);
gtk_progress_bar_set_show_text (GTK_PROGRESS_BAR (self->progress_bar), FALSE);
- gtk_widget_show_all (GTK_WIDGET (self->progress_dialog));
+ gtk_widget_show (GTK_WIDGET (self->progress_dialog));
gtk_window_present (GTK_WINDOW (self->progress_dialog));
}
diff --git a/src/frogr-settings-dialog.c b/src/frogr-settings-dialog.c
index d00351a..9dab749 100644
--- a/src/frogr-settings-dialog.c
+++ b/src/frogr-settings-dialog.c
@@ -156,6 +156,8 @@ _add_toggleable_item (FrogrSettingsDialog *self, GtkBox *box,
self);
gtk_box_pack_start (box, item, FALSE, FALSE, 0);
+ gtk_widget_show (item);
+
*out_ref = item;
}
@@ -173,11 +175,13 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
gint i;
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 12);
+ gtk_widget_show (vbox);
/* Default Visibility */
gbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (vbox), gbox, FALSE, FALSE, 0);
+ gtk_widget_show (gbox);
label = gtk_label_new (NULL);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
@@ -188,9 +192,13 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (gbox), label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_widget_show (box1);
+
box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (box2);
_add_toggleable_item (self, GTK_BOX (box2), NULL,
TRUE, _("_Private"), &self->private_rb);
@@ -201,7 +209,10 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
gtk_box_pack_start (GTK_BOX (box1), box2, FALSE, FALSE, 0);
box2 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (box2);
+
box3 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (box3);
_add_toggleable_item (self, GTK_BOX (box3), NULL, FALSE,
_("_Family"), &self->family_cb);
@@ -217,6 +228,7 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
gbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (vbox), gbox, FALSE, FALSE, 0);
+ gtk_widget_show (gbox);
label = gtk_label_new (NULL);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
@@ -227,6 +239,7 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (gbox), label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
box1 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
@@ -238,11 +251,13 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
FALSE, _("Oth_er"), &self->other_content_rb);
gtk_box_pack_start (GTK_BOX (gbox), box1, FALSE, FALSE, 0);
+ gtk_widget_show (box1);
/* Default Safety level */
gbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (vbox), gbox, FALSE, FALSE, 0);
+ gtk_widget_show (gbox);
label = gtk_label_new (NULL);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
@@ -253,8 +268,10 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (gbox), label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
box1 = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 6);
+ gtk_widget_show (box1);
_add_toggleable_item (self, GTK_BOX (box1), NULL, TRUE,
_("S_afe"), &self->safe_rb);
@@ -269,6 +286,7 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
gbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (vbox), gbox, FALSE, FALSE, 0);
+ gtk_widget_show (gbox);
label = gtk_label_new (NULL);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
@@ -279,12 +297,14 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (gbox), label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
combo = gtk_combo_box_text_new ();
for (i = 0; license_descriptions[i]; i++)
gtk_combo_box_text_insert (GTK_COMBO_BOX_TEXT (combo), i, NULL, _(license_descriptions[i]));
gtk_box_pack_start (GTK_BOX (gbox), combo, FALSE, FALSE, 0);
+ gtk_widget_show (combo);
self->license_cb = combo;
g_signal_connect (G_OBJECT (self->license_cb), "changed",
@@ -295,6 +315,7 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
gbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (vbox), gbox, FALSE, FALSE, 0);
+ gtk_widget_show (gbox);
label = gtk_label_new (NULL);
gtk_label_set_use_markup (GTK_LABEL (label), TRUE);
@@ -305,8 +326,10 @@ _add_general_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (gbox), label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
box1 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_widget_show (box1);
_add_toggleable_item (self, GTK_BOX (box1), NULL, FALSE,
_("_Show Pictures in Global Search Results"),
@@ -335,6 +358,7 @@ _add_connection_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
g_autofree gchar *markup = NULL;
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_widget_show (vbox);
/* Proxy settings */
@@ -346,11 +370,13 @@ _add_connection_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
/* Enable proxy */
cbutton = gtk_check_button_new_with_mnemonic (_("_Enable HTTP Proxy"));
gtk_box_pack_start (GTK_BOX (vbox), cbutton, FALSE, FALSE, 0);
+ gtk_widget_show (cbutton);
self->use_proxy_cb = cbutton;
/* Proxy host */
@@ -358,16 +384,19 @@ _add_connection_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
grid = gtk_grid_new ();
gtk_grid_set_row_spacing (GTK_GRID (grid), 6);
gtk_grid_set_column_spacing (GTK_GRID (grid), 12);
+ gtk_widget_show (grid);
label = gtk_label_new_with_mnemonic (_("_Host:"));
gtk_widget_set_halign (GTK_WIDGET (label), GTK_ALIGN_END);
gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1);
+ gtk_widget_show (label);
self->proxy_host_label = label;
entry = gtk_entry_new ();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
gtk_widget_set_hexpand (GTK_WIDGET (entry), TRUE);
gtk_grid_attach (GTK_GRID (grid), entry, 1, 0, 1, 1);
+ gtk_widget_show (entry);
self->proxy_host_entry = entry;
/* Proxy port */
@@ -375,12 +404,14 @@ _add_connection_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
label = gtk_label_new_with_mnemonic (_("_Port:"));
gtk_widget_set_halign (GTK_WIDGET (label), GTK_ALIGN_END);
gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1);
+ gtk_widget_show (label);
self->proxy_port_label = label;
entry = gtk_entry_new ();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
gtk_widget_set_hexpand (GTK_WIDGET (entry), TRUE);
gtk_grid_attach (GTK_GRID (grid), entry, 1, 1, 1, 1);
+ gtk_widget_show (entry);
self->proxy_port_entry = entry;
/* Proxy username */
@@ -388,12 +419,14 @@ _add_connection_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
label = gtk_label_new_with_mnemonic (_("U_sername:"));
gtk_widget_set_halign (GTK_WIDGET (label), GTK_ALIGN_END);
gtk_grid_attach (GTK_GRID (grid), label, 0, 2, 1, 1);
+ gtk_widget_show (label);
self->proxy_username_label = label;
entry = gtk_entry_new ();
gtk_label_set_mnemonic_widget (GTK_LABEL (label), entry);
gtk_widget_set_hexpand (GTK_WIDGET (entry), TRUE);
gtk_grid_attach (GTK_GRID (grid), entry, 1, 2, 1, 1);
+ gtk_widget_show (entry);
self->proxy_username_entry = entry;
/* Proxy password */
@@ -401,6 +434,7 @@ _add_connection_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
label = gtk_label_new_with_mnemonic (_("Pass_word:"));
gtk_widget_set_halign (GTK_WIDGET (label), GTK_ALIGN_END);
gtk_grid_attach (GTK_GRID (grid), label, 0, 3, 1, 1);
+ gtk_widget_show (label);
self->proxy_password_label = label;
entry = gtk_entry_new ();
@@ -408,6 +442,7 @@ _add_connection_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
gtk_entry_set_visibility (GTK_ENTRY (entry), FALSE);
gtk_widget_set_hexpand (GTK_WIDGET (entry), TRUE);
gtk_grid_attach (GTK_GRID (grid), entry, 1, 3, 1, 1);
+ gtk_widget_show (entry);
self->proxy_password_entry = entry;
gtk_box_pack_start (GTK_BOX (vbox), grid, FALSE, FALSE, 0);
@@ -434,6 +469,7 @@ _add_misc_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
g_autofree gchar *markup = NULL;
vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_widget_show (vbox);
/* Other Stuff */
@@ -445,8 +481,10 @@ _add_misc_page (FrogrSettingsDialog *self, GtkNotebook *notebook)
gtk_widget_set_halign (label, GTK_ALIGN_START);
gtk_box_pack_start (GTK_BOX (vbox), label, FALSE, FALSE, 0);
+ gtk_widget_show (label);
box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
+ gtk_widget_show (box);
_add_toggleable_item (self, GTK_BOX (box), NULL, FALSE,
_("Ena_ble Tags Auto-Completion"),
@@ -936,6 +974,7 @@ frogr_settings_dialog_init (FrogrSettingsDialog *self)
notebook = GTK_NOTEBOOK (gtk_notebook_new ());
gtk_box_pack_start (GTK_BOX (vbox), GTK_WIDGET (notebook), TRUE, TRUE, 0);
+ gtk_widget_show (GTK_WIDGET (notebook));
_add_general_page (self, notebook);
_add_connection_page (self, notebook);
@@ -971,11 +1010,12 @@ frogr_settings_dialog_show (GtkWindow *parent)
#if GTK_CHECK_VERSION (3, 12, 0)
"use-header-bar", USE_HEADER_BAR,
#endif
+ "visible", TRUE,
NULL);
_instance = FROGR_SETTINGS_DIALOG (object);
}
_fill_dialog_with_data(_instance);
- gtk_widget_show_all (GTK_WIDGET (_instance));
+ gtk_widget_show (GTK_WIDGET (_instance));
}
diff --git a/src/frogr-util.c b/src/frogr-util.c
index 34ca635..420d629 100644
--- a/src/frogr-util.c
+++ b/src/frogr-util.c
@@ -197,7 +197,7 @@ _show_message_dialog (GtkWindow *parent, const gchar *message, GtkMessageType ty
g_signal_connect (G_OBJECT (dialog), "response",
G_CALLBACK (gtk_widget_destroy), dialog);
- gtk_widget_show_all (dialog);
+ gtk_widget_show (dialog);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]