Work around deprecation of gtk_dialog_set_has_separator()
authorMatthew Barnes <mbarnes@redhat.com>
Fri, 10 Sep 2010 23:58:21 +0000 (19:58 -0400)
committerMatthew Barnes <mbarnes@redhat.com>
Sat, 11 Sep 2010 00:09:10 +0000 (20:09 -0400)
Unfortunately the default value for this property is TRUE (bzzt, WRONG!)
so we can't just remove the function outright until we require GTK+ 2.22.
It was deprecated in GTK+ 2.21.8.

libedataserverui/e-name-selector-dialog.c
libedataserverui/e-passwords.c
libedataserverui/e-source-selector-dialog.c

index c3a58d7..6cf5d63 100644 (file)
@@ -314,7 +314,9 @@ 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);
+#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"));
        gtk_widget_grab_focus (widget);
index 9d3f232..85f7158 100644 (file)
@@ -1143,7 +1143,9 @@ 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);
+#endif
        gtk_dialog_set_default_response (
                GTK_DIALOG (widget), GTK_RESPONSE_OK);
        gtk_window_set_resizable (GTK_WINDOW (widget), FALSE);
index 27fba4a..684beaf 100644 (file)
@@ -99,7 +99,9 @@ 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);
+#endif
        gtk_widget_ensure_style (GTK_WIDGET (dialog));
        gtk_container_set_border_width (GTK_CONTAINER (content_area), 0);
        gtk_container_set_border_width (GTK_CONTAINER (action_area), 12);