summaryrefslogtreecommitdiffstats
path: root/evolution-webcal/build-with-gtk3.patch
blob: d957dd01c81c0082c5276d6e8ea8d01b85754b80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
From 506b6a0014074cc654d5e8990fc33b0b7cbcc5f4 Mon Sep 17 00:00:00 2001
From: Milan Crha <mcrha@redhat.com>
Date: Mon, 14 Feb 2011 09:23:40 +0000
Subject: Bug #632642 - Port to Gtk3

---
diff --git a/configure.ac b/configure.ac
index dcf6616..9ad131c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -31,7 +31,7 @@ AM_GCONF_SOURCE_2
 # EDS's libical now has an #ifndef and warns about memory management
 AC_DEFINE_UNQUOTED(HANDLE_LIBICAL_MEMORY,, [Handle libical memory])
 
-PKG_CHECK_MODULES(EVOLUTION_WEBCAL, glib-2.0 >= 2.8 gtk+-2.0 >= 2.18 libecal-1.2 >= 1.10.0 libsoup-2.4 >= 2.3.0)
+PKG_CHECK_MODULES(EVOLUTION_WEBCAL, gthread-2.0 glib-2.0 >= 2.8 gtk+-3.0 >= 3.0 libecal-1.2 >= 1.10.0 libsoup-2.4 >= 2.3.0)
 AC_SUBST(EVOLUTION_WEBCAL_CFLAGS)
 AC_SUBST(EVOLUTION_WEBCAL_LIBS)
 
diff --git a/src/evolution-webcal-main.c b/src/evolution-webcal-main.c
index 80b1f39..f675686 100644
--- a/src/evolution-webcal-main.c
+++ b/src/evolution-webcal-main.c
@@ -80,9 +80,9 @@ static void e_webcal_load (const gchar * body, const gchar * uri)
       
       if (propname != NULL) {
 	if (!strcmp (propname, "X-WR-CALNAME")) {
-	  name = icalproperty_get_value_as_string (prop);
+	  name = icalproperty_get_value_as_string_r (prop);
 	} else if (!strcmp (propname, "X-WR-CALDESC")) {
-	  desc = icalproperty_get_value_as_string (prop);
+	  desc = icalproperty_get_value_as_string_r (prop);
 	}
       }
       icalproperty_free (prop);
@@ -96,10 +96,8 @@ static void e_webcal_load (const gchar * body, const gchar * uri)
 
   e_webcal_query_user (name, desc, uri, has_events, has_tasks);
 
-#if LIBICAL_MEMFIXES
   g_free (name);
   g_free (desc);
-#endif
 
   gtk_main_quit ();
 }
diff --git a/src/evolution-webcal-notify.c b/src/evolution-webcal-notify.c
index 450982a..8ad8eed 100644
--- a/src/evolution-webcal-notify.c
+++ b/src/evolution-webcal-notify.c
@@ -134,13 +134,11 @@ void e_webcal_display_error (const gchar * title, const gchar * message,
 
   gtk_widget_realize (dialog);
 
-  gtk_dialog_set_has_separator (GTK_DIALOG (dialog), FALSE);
   gtk_dialog_add_buttons (GTK_DIALOG (dialog),
 			  GTK_STOCK_OK, GTK_RESPONSE_OK,
 			  NULL);
 
-  pixbuf = gtk_widget_render_icon (dialog, GTK_STOCK_DIALOG_ERROR,
-				   GTK_ICON_SIZE_DIALOG, "error-dialog");
+  pixbuf = gtk_widget_render_icon_pixbuf (dialog, GTK_STOCK_DIALOG_ERROR, GTK_ICON_SIZE_DIALOG);
   gtk_window_set_icon (GTK_WINDOW (dialog), pixbuf);
   g_object_unref (pixbuf);
 
@@ -217,7 +217,11 @@ void e_webcal_query_user (const gchar * name, const gchar * desc,
                           const gchar * caluri,
                           gboolean has_events, gboolean has_tasks) {
   EIcalShareDialog * dialog;
+#if GTK_CHECK_VERSION (2,91,0)
+  GtkAdjustment * spinadj;
+#else
   GtkObject * spinadj;
+#endif
   GtkWidget * tspinb, * combo;
   GtkWidget * vbox, * hbox;
   GtkWidget * lbox, * wbox, * xbox;
@@ -339,7 +337,6 @@ void e_webcal_query_user (const gchar * name, const gchar * desc,
   dialog->dialog = gtk_dialog_new ();
   gtk_window_set_title (GTK_WINDOW (dialog->dialog),
 			_("Subscribe to Calendar"));
-  gtk_dialog_set_has_separator (GTK_DIALOG (dialog->dialog), FALSE);
   gtk_window_set_default_size (GTK_WINDOW (dialog->dialog), 376, 144);
 
   gtk_window_set_default_icon_name ("x-office-calendar");
@@ -466,14 +463,14 @@ void e_webcal_query_user (const gchar * name, const gchar * desc,
 
   gtk_label_set_mnemonic_widget (GTK_LABEL (rlabel), tspinb);
 
-  combo = gtk_combo_box_new_text ();
+  combo = gtk_combo_box_text_new ();
   gtk_box_pack_start (GTK_BOX (hbox), combo, FALSE, FALSE, 0);
   gtk_widget_show (combo);
 
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Days"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Hours"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Minutes"));
-  gtk_combo_box_append_text (GTK_COMBO_BOX (combo), _("Weeks"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Days"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Hours"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Minutes"));
+  gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (combo), _("Weeks"));
 
   gtk_combo_box_set_active (GTK_COMBO_BOX (combo),
                            E_ICALSHARE_TIMEOUT_HOURS);
--
cgit v0.9.0.2