From a6e137295f3fb4dc42a87590d03a05155ea396a0 Mon Sep 17 00:00:00 2001 From: Matthew Barnes Date: Fri, 10 Sep 2010 23:56:18 -0400 Subject: Work around deprecation of gtk_dialog_set_has_separator() 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. --- filter/e-filter-datespec.c | 2 ++ filter/e-rule-context.c | 2 ++ filter/e-rule-editor.c | 6 ++++++ 3 files changed, 10 insertions(+) (limited to 'filter') diff --git a/filter/e-filter-datespec.c b/filter/e-filter-datespec.c index b623a71cd2..328ff5adc1 100644 --- a/filter/e-filter-datespec.c +++ b/filter/e-filter-datespec.c @@ -277,7 +277,9 @@ button_clicked (GtkButton *button, EFilterDatespec *fds) 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 (dialog, FALSE); +#endif p->notebook_type = e_builder_get_widget (builder, "notebook_type"); p->combobox_type = e_builder_get_widget (builder, "combobox_type"); diff --git a/filter/e-rule-context.c b/filter/e-rule-context.c index 603ed1ab0a..4e68e59515 100644 --- a/filter/e-rule-context.c +++ b/filter/e-rule-context.c @@ -774,7 +774,9 @@ e_rule_context_add_rule_gui (ERuleContext *context, 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 (dialog, FALSE); +#endif gtk_window_set_title ((GtkWindow *) dialog, title); gtk_window_set_default_size ((GtkWindow *) dialog, 600, 400); diff --git a/filter/e-rule-editor.c b/filter/e-rule-editor.c index 4aca9612bb..924d22a213 100644 --- a/filter/e-rule-editor.c +++ b/filter/e-rule-editor.c @@ -263,7 +263,9 @@ rule_add (GtkWidget *widget, ERuleEditor *editor) 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 ((GtkDialog *) editor->dialog, FALSE); +#endif gtk_window_set_title ((GtkWindow *) editor->dialog, _("Add Rule")); gtk_window_set_default_size (GTK_WINDOW (editor->dialog), 650, 400); @@ -350,7 +352,9 @@ rule_edit (GtkWidget *widget, ERuleEditor *editor) 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 ((GtkDialog *) editor->dialog, FALSE); +#endif gtk_window_set_title ((GtkWindow *) editor->dialog, _("Edit Rule")); gtk_window_set_default_size (GTK_WINDOW (editor->dialog), 650, 400); @@ -848,7 +852,9 @@ e_rule_editor_construct (ERuleEditor *editor, G_CALLBACK (editor_response), editor); rule_editor_set_source (editor, source); +#if !GTK_CHECK_VERSION(2,21,8) gtk_dialog_set_has_separator ((GtkDialog *) editor, FALSE); +#endif gtk_dialog_add_buttons ((GtkDialog *) editor, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, -- cgit