diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2010-09-11 19:32:05 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2010-09-11 21:03:45 +0800 |
commit | bc9ece413fce4941a74a13619815a0869c1d2e99 (patch) | |
tree | d5a356da0b7e3ebbc985848d29ac1ea641014ee8 | |
parent | 3e176a079f5b2973494b2eaf2c863a722bab214b (diff) | |
download | gsoc2013-evolution-bc9ece413fce4941a74a13619815a0869c1d2e99.tar.gz gsoc2013-evolution-bc9ece413fce4941a74a13619815a0869c1d2e99.tar.zst gsoc2013-evolution-bc9ece413fce4941a74a13619815a0869c1d2e99.zip |
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.
-rw-r--r-- | addressbook/gui/contact-editor/e-contact-editor-fullname.c | 4 | ||||
-rw-r--r-- | e-util/e-alert-dialog.c | 4 | ||||
-rw-r--r-- | filter/e-filter-datespec.c | 4 | ||||
-rw-r--r-- | filter/e-rule-context.c | 4 | ||||
-rw-r--r-- | filter/e-rule-editor.c | 12 | ||||
-rw-r--r-- | mail/e-mail-label-dialog.c | 4 | ||||
-rw-r--r-- | modules/calendar/e-cal-attachment-handler.c | 4 | ||||
-rw-r--r-- | modules/mailto-handler/evolution-mailto-handler.c | 4 | ||||
-rw-r--r-- | plugins/backup-restore/backup.c | 4 | ||||
-rw-r--r-- | plugins/mail-notification/mail-notification.c | 4 | ||||
-rw-r--r-- | plugins/mark-all-read/mark-all-read.c | 4 | ||||
-rw-r--r-- | plugins/publish-calendar/url-editor-dialog.c | 4 | ||||
-rw-r--r-- | shell/main.c | 5 | ||||
-rw-r--r-- | widgets/menus/gal-view-instance-save-as-dialog.c | 4 | ||||
-rw-r--r-- | widgets/misc/e-attachment-dialog.c | 4 | ||||
-rw-r--r-- | widgets/misc/e-charset-combo-box.c | 4 | ||||
-rw-r--r-- | widgets/misc/e-signature-script-dialog.c | 4 |
17 files changed, 38 insertions, 39 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor-fullname.c b/addressbook/gui/contact-editor/e-contact-editor-fullname.c index a75ba79f37..74cf45eee3 100644 --- a/addressbook/gui/contact-editor/e-contact-editor-fullname.c +++ b/addressbook/gui/contact-editor/e-contact-editor-fullname.c @@ -195,8 +195,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (dialog, "has-separator", FALSE, NULL); #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 f34fc0c807..021812e590 100644 --- a/e-util/e-alert-dialog.c +++ b/e-util/e-alert-dialog.c @@ -138,8 +138,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (self, "has-separator", FALSE, NULL); #endif gtk_widget_ensure_style ((GtkWidget *)self); diff --git a/filter/e-filter-datespec.c b/filter/e-filter-datespec.c index 328ff5adc1..0ec87ad343 100644 --- a/filter/e-filter-datespec.c +++ b/filter/e-filter-datespec.c @@ -277,8 +277,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (dialog, "has-separator", FALSE, NULL); #endif p->notebook_type = e_builder_get_widget (builder, "notebook_type"); diff --git a/filter/e-rule-context.c b/filter/e-rule-context.c index 4e68e59515..2ec62536ec 100644 --- a/filter/e-rule-context.c +++ b/filter/e-rule-context.c @@ -774,8 +774,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (dialog, "has-separator", FALSE, NULL); #endif gtk_window_set_title ((GtkWindow *) dialog, title); diff --git a/filter/e-rule-editor.c b/filter/e-rule-editor.c index 924d22a213..94d182ebb0 100644 --- a/filter/e-rule-editor.c +++ b/filter/e-rule-editor.c @@ -263,8 +263,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (editor->dialog, "has-separator", FALSE, NULL); #endif gtk_window_set_title ((GtkWindow *) editor->dialog, _("Add Rule")); @@ -352,8 +352,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (editor->dialog, "has-separator", FALSE, NULL); #endif gtk_window_set_title ((GtkWindow *) editor->dialog, _("Edit Rule")); @@ -852,8 +852,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (editor, "has-separator", FALSE, NULL); #endif gtk_dialog_add_buttons ((GtkDialog *) editor, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, diff --git a/mail/e-mail-label-dialog.c b/mail/e-mail-label-dialog.c index 3489f0aeca..9a9f210fe0 100644 --- a/mail/e-mail-label-dialog.c +++ b/mail/e-mail-label-dialog.c @@ -194,8 +194,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (dialog, "has-separator", FALSE, NULL); #endif gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); diff --git a/modules/calendar/e-cal-attachment-handler.c b/modules/calendar/e-cal-attachment-handler.c index 672db0dc46..26717d79b6 100644 --- a/modules/calendar/e-cal-attachment-handler.c +++ b/modules/calendar/e-cal-attachment-handler.c @@ -264,8 +264,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (dialog, "has-separator", FALSE, NULL); #endif gtk_window_set_default_size (GTK_WINDOW (dialog), 300, 400); diff --git a/modules/mailto-handler/evolution-mailto-handler.c b/modules/mailto-handler/evolution-mailto-handler.c index aa8cfa0a59..50212e11f0 100644 --- a/modules/mailto-handler/evolution-mailto-handler.c +++ b/modules/mailto-handler/evolution-mailto-handler.c @@ -111,8 +111,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (dialog, "has-separator", FALSE, NULL); #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 6c86ee8a36..5b39374b58 100644 --- a/plugins/backup-restore/backup.c +++ b/plugins/backup-restore/backup.c @@ -459,8 +459,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (progress_dialog, "has-separator", FALSE, NULL); #endif gtk_container_set_border_width (GTK_CONTAINER (progress_dialog), 12); diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index 02f7cae248..a46af56fa5 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -379,8 +379,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (dialog, "has-separator", FALSE, NULL); #endif gtk_container_add (GTK_CONTAINER (content_area), vbox); gtk_container_set_border_width (GTK_CONTAINER (vbox), 10); diff --git a/plugins/mark-all-read/mark-all-read.c b/plugins/mark-all-read/mark-all-read.c index f3d72fd246..9cbbfdc950 100644 --- a/plugins/mark-all-read/mark-all-read.c +++ b/plugins/mark-all-read/mark-all-read.c @@ -111,8 +111,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (dialog, "has-separator", FALSE, NULL); #endif gtk_window_set_title (GTK_WINDOW (dialog), ""); g_signal_connect ( diff --git a/plugins/publish-calendar/url-editor-dialog.c b/plugins/publish-calendar/url-editor-dialog.c index 74044415aa..69cce8b0d2 100644 --- a/plugins/publish-calendar/url-editor-dialog.c +++ b/plugins/publish-calendar/url-editor-dialog.c @@ -378,8 +378,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (dialog, "has-separator", FALSE, NULL); #endif dialog->cancel = gtk_dialog_add_button (GTK_DIALOG (dialog), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL); diff --git a/shell/main.c b/shell/main.c index 3e58a368ad..3e922a488a 100644 --- a/shell/main.c +++ b/shell/main.c @@ -160,9 +160,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (warning_dialog, "has-separator", FALSE, NULL); #endif action_area = gtk_dialog_get_action_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 afff7e0869..04b00a016d 100644 --- a/widgets/menus/gal-view-instance-save-as-dialog.c +++ b/widgets/menus/gal-view-instance-save-as-dialog.c @@ -247,8 +247,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (dialog, "has-separator", FALSE, NULL); #endif gtk_dialog_add_buttons ( diff --git a/widgets/misc/e-attachment-dialog.c b/widgets/misc/e-attachment-dialog.c index 5e24f0d05b..24fe7b4049 100644 --- a/widgets/misc/e-attachment-dialog.c +++ b/widgets/misc/e-attachment-dialog.c @@ -306,8 +306,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (dialog, "has-separator", FALSE, NULL); #endif gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); diff --git a/widgets/misc/e-charset-combo-box.c b/widgets/misc/e-charset-combo-box.c index 0a977908c6..5f542a6d48 100644 --- a/widgets/misc/e-charset-combo-box.c +++ b/widgets/misc/e-charset-combo-box.c @@ -103,8 +103,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (dialog, "has-separator", FALSE, NULL); #endif gtk_dialog_set_default_response (dialog, GTK_RESPONSE_OK); diff --git a/widgets/misc/e-signature-script-dialog.c b/widgets/misc/e-signature-script-dialog.c index 6580f97888..fa725081dc 100644 --- a/widgets/misc/e-signature-script-dialog.c +++ b/widgets/misc/e-signature-script-dialog.c @@ -243,8 +243,8 @@ 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); +#if !GTK_CHECK_VERSION(2,90,7) + g_object_set (dialog, "has-separator", FALSE, NULL); #endif gtk_dialog_set_default_response (GTK_DIALOG (dialog), GTK_RESPONSE_OK); |