$OpenBSD: patch-eplugin_exchange-delegates-user_c,v 1.1 2011/03/07 19:41:32 ajacoutot Exp $

From e9596e5a2f5e2c1bc5c8700eafc3ead17f819020 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Tue, 26 Oct 2010 08:38:22 +0000
Subject: Be able to compile against Gtk+ 2.23.0

--- eplugin/exchange-delegates-user.c.orig	Tue Nov  2 11:32:25 2010
+++ eplugin/exchange-delegates-user.c	Sun Feb 13 15:47:05 2011
@@ -42,6 +42,8 @@
 
 #include <string.h>
 
+#include "gtk-compat.h"
+
 #define EXCHANGE_DELEGATES_USER_CUSTOM    -3
 /* Can't use E2K_PERMISSIONS_ROLE_CUSTOM, because it's -1, which
  * means "end of list" to e_dialog_combo_box_get/set
@@ -129,7 +131,7 @@ static void
 set_perms (GtkWidget *combobox, E2kPermissionsRole role)
 {
 	if (!is_delegate_role (role)) {
-		gtk_combo_box_append_text (GTK_COMBO_BOX (combobox), _("Custom"));
+		gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combobox), _("Custom"));
 		role = EXCHANGE_DELEGATES_USER_CUSTOM;
 	}
 
@@ -287,45 +289,45 @@ exchange_delegates_user_edit (ExchangeAccount *account
 	gtk_label_set_justify (GTK_LABEL (contact_label), GTK_JUSTIFY_CENTER);
 	gtk_misc_set_alignment (GTK_MISC (contact_label), 0, 0.5);
 
-	calendar_perms_combobox = gtk_combo_box_new_text ();
+	calendar_perms_combobox = gtk_combo_box_text_new ();
 	gtk_widget_show (calendar_perms_combobox);
 	gtk_table_attach (GTK_TABLE (folders_table), calendar_perms_combobox, 1, 2, 0, 1,
 			  (GtkAttachOptions) (GTK_FILL),
 			  (GtkAttachOptions) (GTK_FILL), 0, 0);
-	gtk_combo_box_append_text (GTK_COMBO_BOX (calendar_perms_combobox), _("None"));
-	gtk_combo_box_append_text (GTK_COMBO_BOX (calendar_perms_combobox), _("Reviewer (read-only)"));
-	gtk_combo_box_append_text (GTK_COMBO_BOX (calendar_perms_combobox), _("Author (read, create)"));
-	gtk_combo_box_append_text (GTK_COMBO_BOX (calendar_perms_combobox), _("Editor (read, create, edit)"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (calendar_perms_combobox), _("None"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (calendar_perms_combobox), _("Reviewer (read-only)"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (calendar_perms_combobox), _("Author (read, create)"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (calendar_perms_combobox), _("Editor (read, create, edit)"));
 
-	task_perms_combobox = gtk_combo_box_new_text ();
+	task_perms_combobox = gtk_combo_box_text_new ();
 	gtk_widget_show (task_perms_combobox);
 	gtk_table_attach (GTK_TABLE (folders_table), task_perms_combobox, 1, 2, 1, 2,
 			  (GtkAttachOptions) (GTK_FILL),
 			  (GtkAttachOptions) (GTK_FILL), 0, 0);
-	gtk_combo_box_append_text (GTK_COMBO_BOX (task_perms_combobox), _("None"));
-	gtk_combo_box_append_text (GTK_COMBO_BOX (task_perms_combobox), _("Reviewer (read-only)"));
-	gtk_combo_box_append_text (GTK_COMBO_BOX (task_perms_combobox), _("Author (read, create)"));
-	gtk_combo_box_append_text (GTK_COMBO_BOX (task_perms_combobox), _("Editor (read, create, edit)"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (task_perms_combobox), _("None"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (task_perms_combobox), _("Reviewer (read-only)"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (task_perms_combobox), _("Author (read, create)"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (task_perms_combobox), _("Editor (read, create, edit)"));
 
-	inbox_perms_combobox = gtk_combo_box_new_text ();
+	inbox_perms_combobox = gtk_combo_box_text_new ();
 	gtk_widget_show (inbox_perms_combobox);
 	gtk_table_attach (GTK_TABLE (folders_table), inbox_perms_combobox, 1, 2, 2, 3,
 			  (GtkAttachOptions) (GTK_FILL),
 			  (GtkAttachOptions) (GTK_FILL), 0, 0);
-	gtk_combo_box_append_text (GTK_COMBO_BOX (inbox_perms_combobox), _("None"));
-	gtk_combo_box_append_text (GTK_COMBO_BOX (inbox_perms_combobox), _("Reviewer (read-only)"));
-	gtk_combo_box_append_text (GTK_COMBO_BOX (inbox_perms_combobox), _("Author (read, create)"));
-	gtk_combo_box_append_text (GTK_COMBO_BOX (inbox_perms_combobox), _("Editor (read, create, edit)"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (inbox_perms_combobox), _("None"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (inbox_perms_combobox), _("Reviewer (read-only)"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (inbox_perms_combobox), _("Author (read, create)"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (inbox_perms_combobox), _("Editor (read, create, edit)"));
 
-	contact_perms_combobox = gtk_combo_box_new_text ();
+	contact_perms_combobox = gtk_combo_box_text_new ();
 	gtk_widget_show (contact_perms_combobox);
 	gtk_table_attach (GTK_TABLE (folders_table), contact_perms_combobox, 1, 2, 3, 4,
 			  (GtkAttachOptions) (GTK_FILL),
 			  (GtkAttachOptions) (GTK_FILL), 0, 0);
-	gtk_combo_box_append_text (GTK_COMBO_BOX (contact_perms_combobox), _("None"));
-	gtk_combo_box_append_text (GTK_COMBO_BOX (contact_perms_combobox), _("Reviewer (read-only)"));
-	gtk_combo_box_append_text (GTK_COMBO_BOX (contact_perms_combobox), _("Author (read, create)"));
-	gtk_combo_box_append_text (GTK_COMBO_BOX (contact_perms_combobox), _("Editor (read, create, edit)"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (contact_perms_combobox), _("None"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (contact_perms_combobox), _("Reviewer (read-only)"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (contact_perms_combobox), _("Author (read, create)"));
+	gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (contact_perms_combobox), _("Editor (read, create, edit)"));
 
 	delegate_mail = gtk_check_button_new_with_mnemonic (_("_Summarize permissions"));
 	gtk_widget_show (delegate_mail);
