[evolution-data-server] Re-work my GtkDialog:has-separator workaround.



commit 7c4b778c1afe67441dc12957f315832d93bb87f1
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sat Sep 11 08:08:45 2010 -0400

    Re-work my GtkDialog:has-separator workaround.
    
    If we're using GTK+ 2.21.8 (where gtk_dialog_set_has_separator() is
    deprecated but the property is still present and defaults to TRUE), we
    still need to set the property to FALSE.  So instead use g_object_set()
    up through GTK+ 2.90.6, after which the property itself is gone.

 libedataserverui/e-name-selector-dialog.c   |    4 ++--
 libedataserverui/e-passwords.c              |    4 ++--
 libedataserverui/e-source-selector-dialog.c |    4 ++--
 3 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/libedataserverui/e-name-selector-dialog.c b/libedataserverui/e-name-selector-dialog.c
index 6cf5d63..e48ca0f 100644
--- a/libedataserverui/e-name-selector-dialog.c
+++ b/libedataserverui/e-name-selector-dialog.c
@@ -314,8 +314,8 @@ e_name_selector_dialog_init (ENameSelectorDialog *name_selector_dialog)
 	gtk_window_set_modal            (GTK_WINDOW (name_selector_dialog), TRUE);
 	gtk_window_set_default_size     (GTK_WINDOW (name_selector_dialog), 700, -1);
 	gtk_window_set_resizable        (GTK_WINDOW (name_selector_dialog), TRUE);
-#if !GTK_CHECK_VERSION(2,21,8)
-	gtk_dialog_set_has_separator    (GTK_DIALOG (name_selector_dialog), FALSE);
+#if !GTK_CHECK_VERSION(2,90,7)
+	g_object_set (name_selector_dialog, "has-separator", FALSE, NULL);
 #endif
 	gtk_container_set_border_width  (GTK_CONTAINER (name_selector_dialog), 4);
 	gtk_window_set_title            (GTK_WINDOW (name_selector_dialog), _("Select Contacts from Address Book"));
diff --git a/libedataserverui/e-passwords.c b/libedataserverui/e-passwords.c
index 85f7158..bd2ea7e 100644
--- a/libedataserverui/e-passwords.c
+++ b/libedataserverui/e-passwords.c
@@ -1143,8 +1143,8 @@ ep_ask_password (EPassMsg *msg)
 		GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
 		GTK_STOCK_OK, GTK_RESPONSE_OK,
 		NULL);
-#if !GTK_CHECK_VERSION(2,21,8)
-	gtk_dialog_set_has_separator (GTK_DIALOG (widget), FALSE);
+#if !GTK_CHECK_VERSION(2,90,7)
+	g_object_set (widget, "has-separator", FALSE, NULL);
 #endif
 	gtk_dialog_set_default_response (
 		GTK_DIALOG (widget), GTK_RESPONSE_OK);
diff --git a/libedataserverui/e-source-selector-dialog.c b/libedataserverui/e-source-selector-dialog.c
index 684beaf..b372dbd 100644
--- a/libedataserverui/e-source-selector-dialog.c
+++ b/libedataserverui/e-source-selector-dialog.c
@@ -99,8 +99,8 @@ e_source_selector_dialog_init (ESourceSelectorDialog *dialog)
 	/* prepare the dialog */
 	gtk_window_set_title (GTK_WINDOW (dialog), _("Select destination"));
 	gtk_window_set_default_size (GTK_WINDOW (dialog), 320, 240);
-#if !GTK_CHECK_VERSION(2,21,8)
-	gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+#if !GTK_CHECK_VERSION(2,90,7)
+	g_object_set (dialog, "has-separator", FALSE, NULL);
 #endif
 	gtk_widget_ensure_style (GTK_WIDGET (dialog));
 	gtk_container_set_border_width (GTK_CONTAINER (content_area), 0);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]