[evolution-data-server/wip/mcrha/gtk4] Fix EWebDAVDiscoverWidget/Dialog
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution-data-server/wip/mcrha/gtk4] Fix EWebDAVDiscoverWidget/Dialog
- Date: Wed, 20 Oct 2021 07:19:19 +0000 (UTC)
commit 7649c235c01c457347aeaac167e3f48e9b3e636f
Author: Milan Crha <mcrha redhat com>
Date: Wed Oct 20 09:18:30 2021 +0200
Fix EWebDAVDiscoverWidget/Dialog
src/libedataserverui/e-webdav-discover-widget.c | 31 +++++++++++++++++++++----
1 file changed, 27 insertions(+), 4 deletions(-)
---
diff --git a/src/libedataserverui/e-webdav-discover-widget.c b/src/libedataserverui/e-webdav-discover-widget.c
index ba834a79c..2b4fb0517 100644
--- a/src/libedataserverui/e-webdav-discover-widget.c
+++ b/src/libedataserverui/e-webdav-discover-widget.c
@@ -137,7 +137,14 @@ e_webdav_discover_content_new (ECredentialsPrompter *credentials_prompter,
self = g_object_new (E_TYPE_WEBDAV_DISCOVER_CONTENT,
"row-spacing", 4,
"column-spacing", 4,
+#if GTK_CHECK_VERSION(4, 0, 0)
+ "margin-start", 4,
+ "margin-end", 4,
+ "margin-top", 4,
+ "margin-bottom", 4,
+#else
"border-width", 4,
+#endif
NULL);
self->credentials_prompter = g_object_ref (credentials_prompter);
self->source = source ? g_object_ref (source) : NULL;
@@ -640,7 +647,11 @@ refresh_data_free (gpointer data)
if (content) {
if (content->info_bar && gtk_info_bar_get_message_type (content->info_bar) ==
GTK_MESSAGE_INFO) {
- g_object_unref (G_OBJECT (content->info_bar));
+#if GTK_CHECK_VERSION(4, 0, 0)
+ gtk_widget_unparent (GTK_WIDGET (content->info_bar));
+#else
+ gtk_widget_destroy (GTK_WIDGET (content->info_bar));
+#endif
content->info_bar = NULL;
}
@@ -928,7 +939,11 @@ e_webdav_discover_content_refresh (GtkWidget *content,
gtk_combo_box_text_remove_all (GTK_COMBO_BOX_TEXT (self->email_addresses_combo));
if (self->info_bar)
- g_object_unref (G_OBJECT (self->info_bar));
+#if GTK_CHECK_VERSION(4, 0, 0)
+ gtk_widget_unparent (GTK_WIDGET (self->info_bar));
+#else
+ gtk_widget_destroy (GTK_WIDGET (self->info_bar));
+#endif
self->info_bar = GTK_INFO_BAR (gtk_info_bar_new_with_buttons (_("Cancel"), GTK_RESPONSE_CANCEL,
NULL));
gtk_info_bar_set_message_type (self->info_bar, GTK_MESSAGE_INFO);
@@ -997,7 +1012,11 @@ e_webdav_discover_info_bar_error_response_cb (GtkInfoBar *info_bar,
self = (EWebDAVDiscoverContent *)content;
if (self->info_bar == info_bar) {
- g_object_unref (G_OBJECT (self->info_bar));
+#if GTK_CHECK_VERSION(4, 0, 0)
+ gtk_widget_unparent (GTK_WIDGET (self->info_bar));
+#else
+ gtk_widget_destroy (GTK_WIDGET (self->info_bar));
+#endif
self->info_bar = NULL;
}
}
@@ -1024,7 +1043,11 @@ e_webdav_discover_content_show_error (GtkWidget *content,
self = (EWebDAVDiscoverContent *)content;
if (self->info_bar) {
- g_object_unref (G_OBJECT (self->info_bar));
+#if GTK_CHECK_VERSION(4, 0, 0)
+ gtk_widget_unparent (GTK_WIDGET (self->info_bar));
+#else
+ gtk_widget_destroy (GTK_WIDGET (self->info_bar));
+#endif
self->info_bar = NULL;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]