[evolution] Work around deprecation of gtk_dialog_set_has_separator()



commit a6e137295f3fb4dc42a87590d03a05155ea396a0
Author: Matthew Barnes <mbarnes redhat com>
Date:   Fri Sep 10 23:56:18 2010 -0400

    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.

 .../gui/contact-editor/e-contact-editor-fullname.c |    2 ++
 e-util/e-alert-dialog.c                            |    2 ++
 filter/e-filter-datespec.c                         |    2 ++
 filter/e-rule-context.c                            |    2 ++
 filter/e-rule-editor.c                             |    6 ++++++
 mail/e-mail-label-dialog.c                         |    2 ++
 modules/calendar/e-cal-attachment-handler.c        |    2 ++
 modules/mailto-handler/evolution-mailto-handler.c  |    2 ++
 plugins/backup-restore/backup.c                    |    2 ++
 plugins/mail-notification/mail-notification.c      |    2 ++
 plugins/mark-all-read/mark-all-read.c              |    2 ++
 plugins/publish-calendar/url-editor-dialog.c       |    2 ++
 shell/main.c                                       |    2 ++
 widgets/menus/gal-view-instance-save-as-dialog.c   |    2 ++
 widgets/misc/e-attachment-dialog.c                 |    2 ++
 widgets/misc/e-charset-combo-box.c                 |    2 ++
 widgets/misc/e-signature-script-dialog.c           |    2 ++
 17 files changed, 38 insertions(+), 0 deletions(-)
---
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
index 2f752e1..a75ba79 100644
--- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c
+++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c
@@ -195,7 +195,9 @@ e_contact_editor_fullname_init (EContactEditorFullname *e_contact_editor_fullnam
 	content_area = gtk_dialog_get_content_area (dialog);
 
 	gtk_widget_realize (GTK_WIDGET (e_contact_editor_fullname));
+#if !GTK_CHECK_VERSION(2,21,8)
 	gtk_dialog_set_has_separator (dialog, FALSE);
+#endif
 	gtk_container_set_border_width (GTK_CONTAINER (action_area), 12);
 	gtk_container_set_border_width (GTK_CONTAINER (content_area), 0);
 
diff --git a/e-util/e-alert-dialog.c b/e-util/e-alert-dialog.c
index ac8df00..f34fc0c 100644
--- a/e-util/e-alert-dialog.c
+++ b/e-util/e-alert-dialog.c
@@ -138,7 +138,9 @@ e_alert_dialog_constructed (GObject *obj)
 	action_area = gtk_dialog_get_action_area ((GtkDialog*) self);
 	content_area = gtk_dialog_get_content_area ((GtkDialog*) self);
 
+#if !GTK_CHECK_VERSION(2,21,8)
 	gtk_dialog_set_has_separator ((GtkDialog*) self, FALSE);
+#endif
 
 	gtk_widget_ensure_style ((GtkWidget *)self);
 	gtk_container_set_border_width (GTK_CONTAINER (action_area), 12);
diff --git a/filter/e-filter-datespec.c b/filter/e-filter-datespec.c
index b623a71..328ff5a 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 603ed1a..4e68e59 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 4aca961..924d22a 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,
diff --git a/mail/e-mail-label-dialog.c b/mail/e-mail-label-dialog.c
index bebe0e6..3489f0a 100644
--- a/mail/e-mail-label-dialog.c
+++ b/mail/e-mail-label-dialog.c
@@ -194,7 +194,9 @@ mail_label_dialog_init (EMailLabelDialog *dialog)
 		GTK_DIALOG (dialog),
 		GTK_STOCK_OK, GTK_RESPONSE_OK);
 
+#if !GTK_CHECK_VERSION(2,21,8)
 	gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+#endif
 	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
 
 	container = content_area;
diff --git a/modules/calendar/e-cal-attachment-handler.c b/modules/calendar/e-cal-attachment-handler.c
index 9025bc7..672db0d 100644
--- a/modules/calendar/e-cal-attachment-handler.c
+++ b/modules/calendar/e-cal-attachment-handler.c
@@ -264,7 +264,9 @@ attachment_handler_run_dialog (GtkWindow *parent,
 		GTK_DIALOG (dialog), widget, GTK_RESPONSE_OK);
 	gtk_widget_show (widget);
 
+#if !GTK_CHECK_VERSION(2,21,8)
 	gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+#endif
 	gtk_window_set_default_size (GTK_WINDOW (dialog), 300, 400);
 
 	container = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
diff --git a/modules/mailto-handler/evolution-mailto-handler.c b/modules/mailto-handler/evolution-mailto-handler.c
index 076f2e0..aa8cfa0 100644
--- a/modules/mailto-handler/evolution-mailto-handler.c
+++ b/modules/mailto-handler/evolution-mailto-handler.c
@@ -111,7 +111,9 @@ mailto_handler_prompt (EMailtoHandler *extension)
 		GTK_STOCK_YES, GTK_RESPONSE_YES,
 		NULL);
 
+#if !GTK_CHECK_VERSION(2,21,8)
 	gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+#endif
 	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_YES);
 	gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
 
diff --git a/plugins/backup-restore/backup.c b/plugins/backup-restore/backup.c
index 3c2fe90..6c86ee8 100644
--- a/plugins/backup-restore/backup.c
+++ b/plugins/backup-restore/backup.c
@@ -459,7 +459,9 @@ main (gint argc, gchar **argv)
 							  GTK_RESPONSE_REJECT,
 							  NULL);
 
+#if !GTK_CHECK_VERSION(2,21,8)
 		gtk_dialog_set_has_separator (GTK_DIALOG (progress_dialog), FALSE);
+#endif
 		gtk_container_set_border_width (GTK_CONTAINER (progress_dialog), 12);
 
 		action_area = gtk_dialog_get_action_area (
diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c
index a75a522..107a65d 100644
--- a/plugins/mail-notification/mail-notification.c
+++ b/plugins/mail-notification/mail-notification.c
@@ -397,7 +397,9 @@ do_properties (GtkMenuItem *item, gpointer user_data)
 
 	content_area = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
 
+#if !GTK_CHECK_VERSION(2,21,8)
 	gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+#endif
 	gtk_container_add (GTK_CONTAINER (content_area), vbox);
 	gtk_container_set_border_width (GTK_CONTAINER (vbox), 10);
 	gtk_widget_set_size_request (dialog, 400, -1);
diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c
index 8e7c158..f3d72fd 100644
--- a/plugins/mark-all-read/mark-all-read.c
+++ b/plugins/mark-all-read/mark-all-read.c
@@ -111,7 +111,9 @@ prompt_user (gboolean has_subfolders)
 	dialog = gtk_dialog_new ();
 	widget = gtk_dialog_get_action_area (GTK_DIALOG (dialog));
 	gtk_widget_hide (widget);
+#if !GTK_CHECK_VERSION(2,21,8)
 	gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+#endif
 	gtk_window_set_title (GTK_WINDOW (dialog), "");
 	g_signal_connect (
 		dialog, "map",
diff --git a/plugins/publish-calendar/url-editor-dialog.c b/plugins/publish-calendar/url-editor-dialog.c
index 1211726..7404441 100644
--- a/plugins/publish-calendar/url-editor-dialog.c
+++ b/plugins/publish-calendar/url-editor-dialog.c
@@ -378,7 +378,9 @@ url_editor_dialog_construct (UrlEditorDialog *dialog)
 	gtk_container_add (GTK_CONTAINER (content_area), toplevel);
 
 	gtk_container_set_border_width (GTK_CONTAINER (dialog), 6);
+#if !GTK_CHECK_VERSION(2,21,8)
 	gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+#endif
 
 	dialog->cancel = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL);
 	dialog->ok = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_OK, GTK_RESPONSE_OK);
diff --git a/shell/main.c b/shell/main.c
index 167f7f5..3e58a36 100644
--- a/shell/main.c
+++ b/shell/main.c
@@ -160,8 +160,10 @@ show_development_warning (void)
 	gtk_dialog_add_button (
 		GTK_DIALOG (warning_dialog),
 		GTK_STOCK_OK, GTK_RESPONSE_OK);
+#if !GTK_CHECK_VERSION(2,21,8)
 	gtk_dialog_set_has_separator (
 		GTK_DIALOG (warning_dialog), FALSE);
+#endif
 
 	action_area = gtk_dialog_get_action_area (GTK_DIALOG (warning_dialog));
 	content_area = gtk_dialog_get_content_area (GTK_DIALOG (warning_dialog));
diff --git a/widgets/menus/gal-view-instance-save-as-dialog.c b/widgets/menus/gal-view-instance-save-as-dialog.c
index e3cf68e..afff7e0 100644
--- a/widgets/menus/gal-view-instance-save-as-dialog.c
+++ b/widgets/menus/gal-view-instance-save-as-dialog.c
@@ -247,7 +247,9 @@ gal_view_instance_save_as_dialog_init (GalViewInstanceSaveAsDialog *dialog)
 	/* TODO: add position/size saving/restoring */
 	gtk_container_set_border_width (GTK_CONTAINER (dialog), 5);
 	gtk_window_set_default_size (GTK_WINDOW (dialog), 300, 360);
+#if !GTK_CHECK_VERSION(2,21,8)
 	gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+#endif
 
 	gtk_dialog_add_buttons (
 		GTK_DIALOG (dialog),
diff --git a/widgets/misc/e-attachment-dialog.c b/widgets/misc/e-attachment-dialog.c
index c2a7149..5e24f0d 100644
--- a/widgets/misc/e-attachment-dialog.c
+++ b/widgets/misc/e-attachment-dialog.c
@@ -306,7 +306,9 @@ e_attachment_dialog_init (EAttachmentDialog *dialog)
 	gtk_window_set_title (
 		GTK_WINDOW (dialog), _("Attachment Properties"));
 
+#if !GTK_CHECK_VERSION(2,21,8)
 	gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+#endif
 	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
 
 	container = gtk_dialog_get_content_area (GTK_DIALOG (dialog));
diff --git a/widgets/misc/e-charset-combo-box.c b/widgets/misc/e-charset-combo-box.c
index 0c65921..0a97790 100644
--- a/widgets/misc/e-charset-combo-box.c
+++ b/widgets/misc/e-charset-combo-box.c
@@ -103,7 +103,9 @@ charset_combo_box_run_dialog (ECharsetComboBox *combo_box)
 
 	dialog = GTK_DIALOG (widget);
 
+#if !GTK_CHECK_VERSION(2,21,8)
 	gtk_dialog_set_has_separator (dialog, FALSE);
+#endif
 	gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK);
 
 	gtk_container_set_border_width (GTK_CONTAINER (dialog), 12);
diff --git a/widgets/misc/e-signature-script-dialog.c b/widgets/misc/e-signature-script-dialog.c
index d6f4823..6580f97 100644
--- a/widgets/misc/e-signature-script-dialog.c
+++ b/widgets/misc/e-signature-script-dialog.c
@@ -243,7 +243,9 @@ e_signature_script_dialog_init (ESignatureScriptDialog *dialog)
 		GTK_DIALOG (dialog),
 		GTK_STOCK_SAVE, GTK_RESPONSE_OK);
 
+#if !GTK_CHECK_VERSION(2,21,8)
 	gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
+#endif
 	gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK);
 
 	container = content_area;



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