[evolution] Re-work my GtkDialog:has-separator workaround.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] Re-work my GtkDialog:has-separator workaround.
- Date: Sat, 11 Sep 2010 13:03:51 +0000 (UTC)
commit bc9ece413fce4941a74a13619815a0869c1d2e99
Author: Matthew Barnes <mbarnes redhat com>
Date: Sat Sep 11 07:32:05 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.
.../gui/contact-editor/e-contact-editor-fullname.c | 4 ++--
e-util/e-alert-dialog.c | 4 ++--
filter/e-filter-datespec.c | 4 ++--
filter/e-rule-context.c | 4 ++--
filter/e-rule-editor.c | 12 ++++++------
mail/e-mail-label-dialog.c | 4 ++--
modules/calendar/e-cal-attachment-handler.c | 4 ++--
modules/mailto-handler/evolution-mailto-handler.c | 4 ++--
plugins/backup-restore/backup.c | 4 ++--
plugins/mail-notification/mail-notification.c | 4 ++--
plugins/mark-all-read/mark-all-read.c | 4 ++--
plugins/publish-calendar/url-editor-dialog.c | 4 ++--
shell/main.c | 5 ++---
widgets/menus/gal-view-instance-save-as-dialog.c | 4 ++--
widgets/misc/e-attachment-dialog.c | 4 ++--
widgets/misc/e-charset-combo-box.c | 4 ++--
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 a75ba79..74cf45e 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 f34fc0c..021812e 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 328ff5a..0ec87ad 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 4e68e59..2ec6253 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 924d22a..94d182e 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 3489f0a..9a9f210 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 672db0d..26717d7 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 aa8cfa0..50212e1 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 6c86ee8..5b39374 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 02f7cae..a46af56 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 f3d72fd..9cbbfdc 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 7404441..69cce8b 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 3e58a36..3e922a4 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 afff7e0..04b00a0 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 5e24f0d..24fe7b4 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 0a97790..5f542a6 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 6580f97..fa72508 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]