~ubuntu-branches/ubuntu/utopic/totem-plugin-arte/utopic-proposed

« back to all changes in this revision

Viewing changes to debian/patches/01_fix_valac-0.12.patch

  • Committer: Bazaar Package Importer
  • Author(s): Nicolas Delvaux
  • Date: 2011-04-10 11:38:30 UTC
  • Revision ID: james.westby@ubuntu.com-20110410113830-ew6ceisied3k8wyl
Tags: 0.9.2-3
* Build-Depends on valac-0.12 (LP: #756186)
  - Cherry pick relevant patchs from upstream

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Fix compilation with valac-0.12.
 
2
 Cherry picked from upstream commits f189986 and 5cab283
 
3
Author: Nicolas Delvaux <nicolas.delvaux@gmx.com>
 
4
 
 
5
---
 
6
Origin: upstream
 
7
Last-Update: 2011-04-10
 
8
 
 
9
--- totem-plugin-arte-0.9.2.orig/url-extractor.vala
 
10
+++ totem-plugin-arte-0.9.2/url-extractor.vala
 
11
@@ -29,7 +29,7 @@
 
12
 using GLib;
 
13
 using Soup;
 
14
 
 
15
-errordomain ExtractionError
 
16
+public errordomain ExtractionError
 
17
 {
 
18
     DOWNLOAD_FAILED,
 
19
     EXTRACTION_FAILED,
 
20
@@ -66,7 +66,7 @@ public class StreamUrlExtractor : GLib.O
 
21
     try {
 
22
       MatchInfo match;
 
23
       var regex = new Regex (regexp);
 
24
-      regex.match(msg.response_body.flatten ().data, 0, out match);
 
25
+      regex.match((string) msg.response_body.flatten ().data, 0, out match);
 
26
       res = match.fetch(1);
 
27
     } catch (RegexError e) {
 
28
         GLib.warning ("%s", e.message);
 
29
--- totem-plugin-arte-0.9.2.orig/cache.vala
 
30
+++ totem-plugin-arte-0.9.2/cache.vala
 
31
@@ -83,8 +83,7 @@ public class Cache : GLib.Object
 
32
         try {
 
33
             var file_stream = file.create (FileCreateFlags.REPLACE_DESTINATION, null);
 
34
             var data_stream = new DataOutputStream (file_stream);
 
35
-            data_stream.write (msg.response_body.data,
 
36
-                    (ssize_t) msg.response_body.length, null);
 
37
+            data_stream.write (msg.response_body.data);
 
38
 
 
39
         } catch (Error e) {
 
40
             GLib.error ("%s", e.message);
 
41
@@ -138,8 +137,7 @@ public class Cache : GLib.Object
 
42
         }
 
43
 
 
44
         /* rescale it */
 
45
-        var img_stream = new MemoryInputStream.from_data (msg.response_body.data,
 
46
-                (ssize_t) msg.response_body.length, null);
 
47
+        var img_stream = new MemoryInputStream.from_data (msg.response_body.data, null);
 
48
 
 
49
         try {
 
50
             /* original size: 720px × 406px */
 
51
--- totem-plugin-arte-0.9.2.orig/arteplus7.vala
 
52
+++ totem-plugin-arte-0.9.2/arteplus7.vala
 
53
@@ -155,7 +155,7 @@ public abstract class ArteParser : GLib.
 
54
 
 
55
         var context = new MarkupParseContext (parser,
 
56
                 MarkupParseFlags.TREAT_CDATA_AS_TEXT, this, null);
 
57
-        context.parse (msg.response_body.flatten ().data,
 
58
+        context.parse ((string) msg.response_body.flatten ().data,
 
59
                 (ssize_t) msg.response_body.length);
 
60
         context.end_parse ();
 
61
     }
 
62
@@ -187,7 +187,7 @@ public class ArteRSSParser : ArteParser
 
63
             "http://videos.arte.tv/de/do_delegate/videos/arte7/index-3188666,view,rss.xml";
 
64
     }
 
65
 
 
66
-    private override void open_tag (MarkupParseContext ctx,
 
67
+    protected override void open_tag (MarkupParseContext ctx,
 
68
             string elem,
 
69
             string[] attribute_names,
 
70
             string[] attribute_values) throws MarkupError
 
71
@@ -202,7 +202,7 @@ public class ArteRSSParser : ArteParser
 
72
         }
 
73
     }
 
74
 
 
75
-    private override void close_tag (MarkupParseContext ctx,
 
76
+    protected override void close_tag (MarkupParseContext ctx,
 
77
             string elem) throws MarkupError
 
78
     {
 
79
         switch (elem) {
 
80
@@ -218,7 +218,7 @@ public class ArteRSSParser : ArteParser
 
81
         }
 
82
     }
 
83
 
 
84
-    private override void process_text (MarkupParseContext ctx,
 
85
+    protected override void process_text (MarkupParseContext ctx,
 
86
             string text,
 
87
             size_t text_len) throws MarkupError
 
88
     {
 
89
@@ -270,7 +270,7 @@ public class ArteXMLParser : ArteParser
 
90
         xml_de = xml_tmpl.printf ("de", "de", page);
 
91
     }
 
92
 
 
93
-    private override void open_tag (MarkupParseContext ctx,
 
94
+    protected override void open_tag (MarkupParseContext ctx,
 
95
             string elem,
 
96
             string[] attribute_names,
 
97
             string[] attribute_values) throws MarkupError
 
98
@@ -285,7 +285,7 @@ public class ArteXMLParser : ArteParser
 
99
         }
 
100
     }
 
101
 
 
102
-    private override void close_tag (MarkupParseContext ctx,
 
103
+    protected override void close_tag (MarkupParseContext ctx,
 
104
             string elem) throws MarkupError
 
105
     {
 
106
         switch (elem) {
 
107
@@ -301,7 +301,7 @@ public class ArteXMLParser : ArteParser
 
108
         }
 
109
     }
 
110
 
 
111
-    private override void process_text (MarkupParseContext ctx,
 
112
+    protected override void process_text (MarkupParseContext ctx,
 
113
             string text,
 
114
             size_t text_len) throws MarkupError
 
115
     {
 
116
@@ -396,11 +396,11 @@ class ArtePlugin : Totem.Plugin
 
117
         /* add a search entry with a refresh and a cleanup icon */
 
118
         search_entry = new Gtk.Entry ();
 
119
         search_entry.set_icon_from_stock (Gtk.EntryIconPosition.PRIMARY,
 
120
-                Gtk.STOCK_REFRESH);
 
121
+                Gtk.Stock.REFRESH);
 
122
         search_entry.set_icon_tooltip_text (Gtk.EntryIconPosition.PRIMARY,
 
123
                 _("Reload feed"));
 
124
         search_entry.set_icon_from_stock (Gtk.EntryIconPosition.SECONDARY,
 
125
-                Gtk.STOCK_CLEAR);
 
126
+                Gtk.Stock.CLEAR);
 
127
         search_entry.set_icon_tooltip_text (Gtk.EntryIconPosition.SECONDARY,
 
128
                 _("Clear the search text"));
 
129
         search_entry.set_icon_sensitive (Gtk.EntryIconPosition.SECONDARY, false);
 
130
@@ -493,7 +493,7 @@ class ArtePlugin : Totem.Plugin
 
131
 
 
132
         var dialog = new Dialog.with_buttons (_("Arte+7 Plugin Properties"),
 
133
                 null, Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT,
 
134
-                Gtk.STOCK_CLOSE, Gtk.ResponseType.CLOSE, null);
 
135
+                Gtk.Stock.CLOSE, Gtk.ResponseType.CLOSE, null);
 
136
         dialog.has_separator = false;
 
137
         dialog.resizable = false;
 
138
         dialog.border_width = 5;
 
139