Merge lp:~ubuntu-branches/ubuntu/precise/gwibber/precise-proposed-201212050210 into lp:ubuntu/precise-proposed/gwibber
- Precise (12.04)
- precise-proposed-201212050210
- Merge into precise-proposed
Status: | Needs review |
---|---|
Proposed branch: | lp:~ubuntu-branches/ubuntu/precise/gwibber/precise-proposed-201212050210 |
Merge into: | lp:ubuntu/precise-proposed/gwibber |
Diff against target: |
1402 lines (+27/-1243) (has conflicts) 14 files modified
.pc/.quilt_patches (+0/-1) .pc/.quilt_series (+0/-1) .pc/.version (+0/-1) .pc/lp_1012231.patch/gwibber/microblog/plugins/foursquare/__init__.py (+0/-214) .pc/lp_934530.patch/gwibber/microblog/network.py (+0/-57) .pc/lpi.patch/client/Makefile.am (+0/-122) .pc/lpi.patch/client/gwibber-client.vala (+0/-461) .pc/lpi.patch/configure.ac (+0/-368) client/Makefile.am (+0/-1) client/gwibber-client.vala (+0/-5) configure.ac (+0/-1) debian/patches/lp_1058672.patch (+22/-0) gwibber/microblog/network.py (+2/-8) gwibber/microblog/plugins/foursquare/__init__.py (+3/-3) Conflict: can't delete .pc because it is not empty. Not deleting. Conflict because .pc is not versioned, but has versioned children. Versioned directory. Contents conflict in .pc/applied-patches Conflict adding file debian/patches/lp_1058672.patch. Moved existing file to debian/patches/lp_1058672.patch.moved. |
To merge this branch: | bzr merge lp:~ubuntu-branches/ubuntu/precise/gwibber/precise-proposed-201212050210 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Ubuntu Development Team | Pending | ||
Review via email: mp+138047@code.launchpad.net |
Commit message
Description of the change
The package importer has detected a possible inconsistency between the package history in the archive and the history in bzr. As the archive is authoritative the importer has made lp:ubuntu/precise-proposed/gwibber reflect what is in the archive and the old bzr branch has been pushed to lp:~ubuntu-branches/ubuntu/precise/gwibber/precise-proposed-201212050210. This merge proposal was created so that an Ubuntu developer can review the situations and perform a merge/upload if necessary. There are three typical cases where this can happen.
1. Where someone pushes a change to bzr and someone else uploads the package without that change. This is the reason that this check is done by the importer. If this appears to be the case then a merge/upload should be done if the changes that were in bzr are still desirable.
2. The importer incorrectly detected the above situation when someone made a change in bzr and then uploaded it.
3. The importer incorrectly detected the above situation when someone just uploaded a package and didn't touch bzr.
If this case doesn't appear to be the first situation then set the status of the merge proposal to "Rejected" and help avoid the problem in future by filing a bug at https:/
(this is an automatically generated message)
Unmerged revisions
- 135. By Ken VanDine
-
releasing version 3.4.2-0ubuntu2.1
Preview Diff
1 | === removed file '.pc/.quilt_patches' |
2 | --- .pc/.quilt_patches 2012-06-27 15:42:00 +0000 |
3 | +++ .pc/.quilt_patches 1970-01-01 00:00:00 +0000 |
4 | @@ -1,1 +0,0 @@ |
5 | -debian/patches |
6 | |
7 | === removed file '.pc/.quilt_series' |
8 | --- .pc/.quilt_series 2012-06-27 15:42:00 +0000 |
9 | +++ .pc/.quilt_series 1970-01-01 00:00:00 +0000 |
10 | @@ -1,1 +0,0 @@ |
11 | -series |
12 | |
13 | === removed file '.pc/.version' |
14 | --- .pc/.version 2011-06-07 13:38:48 +0000 |
15 | +++ .pc/.version 1970-01-01 00:00:00 +0000 |
16 | @@ -1,1 +0,0 @@ |
17 | -2 |
18 | |
19 | === renamed file '.pc/applied-patches' => '.pc/applied-patches.THIS' |
20 | === removed directory '.pc/lp_1012231.patch' |
21 | === removed directory '.pc/lp_1012231.patch/gwibber' |
22 | === removed directory '.pc/lp_1012231.patch/gwibber/microblog' |
23 | === removed directory '.pc/lp_1012231.patch/gwibber/microblog/plugins' |
24 | === removed directory '.pc/lp_1012231.patch/gwibber/microblog/plugins/foursquare' |
25 | === removed file '.pc/lp_1012231.patch/gwibber/microblog/plugins/foursquare/__init__.py' |
26 | --- .pc/lp_1012231.patch/gwibber/microblog/plugins/foursquare/__init__.py 2012-06-27 15:42:00 +0000 |
27 | +++ .pc/lp_1012231.patch/gwibber/microblog/plugins/foursquare/__init__.py 1970-01-01 00:00:00 +0000 |
28 | @@ -1,214 +0,0 @@ |
29 | -from gwibber.microblog import network, util |
30 | -from gwibber.microblog.util import resources |
31 | -import json, re |
32 | -from gettext import lgettext as _ |
33 | - |
34 | -import logging |
35 | -logger = logging.getLogger("FourSquare") |
36 | -logger.debug("Initializing.") |
37 | - |
38 | -PROTOCOL_INFO = { |
39 | - "name": "Foursquare", |
40 | - "version": "4.0", |
41 | - |
42 | - "config": [ |
43 | - "private:secret_token", |
44 | - "access_token", |
45 | - "receive_enabled", |
46 | - "username", |
47 | - "color", |
48 | - ], |
49 | - |
50 | - "authtype": "oauth2", |
51 | - "color": "#990099", |
52 | - |
53 | - "features": [ |
54 | - "receive", |
55 | - ], |
56 | - |
57 | - "default_streams": [ |
58 | - "receive", |
59 | - ], |
60 | -} |
61 | - |
62 | -URL_PREFIX = "https://api.foursquare.com/v2" |
63 | - |
64 | -class Client: |
65 | - def __init__(self, acct): |
66 | - self.service = util.getbus("Service") |
67 | - if acct.has_key("secret_token") and acct.has_key("password"): acct.pop("password") |
68 | - self.account = acct |
69 | - |
70 | - if not acct.has_key("access_token") and not acct.has_key("secret_token"): |
71 | - return [{"error": {"type": "auth", "account": self.account, "message": _("Failed to find credentials")}}] |
72 | - |
73 | - self.token = acct["access_token"] |
74 | - |
75 | - def _message(self, data): |
76 | - |
77 | - m = {}; |
78 | - m["mid"] = str(data["id"]) |
79 | - m["service"] = "foursquare" |
80 | - m["account"] = self.account["id"] |
81 | - m["time"] = data["createdAt"] |
82 | - |
83 | - shouttext = "" |
84 | - text = "" |
85 | - |
86 | - if data.has_key("shout"): |
87 | - shout = data["shout"] |
88 | - shout = shout.replace('& ', '& ') |
89 | - |
90 | - if data.has_key("venue"): |
91 | - venuename = data["venue"]["name"] |
92 | - venuename = venuename.replace('& ', '& ') |
93 | - |
94 | - if data.has_key("shout"): |
95 | - shouttext += shout + "\n\n" |
96 | - text += shout + "\n" |
97 | - if data["venue"].has_key("id"): |
98 | - m["url"] = "https://foursquare.com/venue/%s" % data["venue"]["id"] |
99 | - else: |
100 | - m["url"] = "https://foursquare.com" |
101 | - shouttext += "Checked in at <a href='" + m["url"] + "'>" + venuename + "</a>" |
102 | - text += "Checked in at " + venuename |
103 | - if data["venue"]["location"].has_key("address"): |
104 | - shouttext += ", " + data["venue"]["location"]["address"] |
105 | - text += ", " + data["venue"]["location"]["address"] |
106 | - if data["venue"]["location"].has_key("crossstreet"): |
107 | - shouttext += " and " + data["venue"]["location"]["crossstreet"] |
108 | - text += " and " + data["venue"]["location"]["crossstreet"] |
109 | - if data["venue"]["location"].has_key("city"): |
110 | - shouttext += ", " + data["venue"]["location"]["city"] |
111 | - text += ", " + data["venue"]["location"]["city"] |
112 | - if data["venue"]["location"].has_key("state"): |
113 | - shouttext += ", " + data["venue"]["location"]["state"] |
114 | - text += ", " + data["venue"]["location"]["state"] |
115 | - if data.has_key("event"): |
116 | - if data["event"].has_key("name"): |
117 | - shouttext += " for " + data["event"]["name"] |
118 | - else: |
119 | - if data.has_key("shout"): |
120 | - shouttext += shout + "\n\n" |
121 | - text += shout + "\n" |
122 | - else: |
123 | - text= "Checked in off the grid" |
124 | - shouttext= "Checked in off the grid" |
125 | - |
126 | - m["text"] = text |
127 | - m["content"] = shouttext |
128 | - m["html"] = shouttext |
129 | - |
130 | - m["sender"] = {} |
131 | - m["sender"]["id"] = data["user"]["id"] |
132 | - m["sender"]["image"] = data["user"]["photo"] |
133 | - m["sender"]["url"] = data["user"]["canonicalUrl"] |
134 | - if data["user"]["relationship"] == "self": |
135 | - m["sender"]["is_me"] = True |
136 | - else: |
137 | - m["sender"]["is_me"] = False |
138 | - fullname = "" |
139 | - if data["user"].has_key("firstName"): |
140 | - fullname += data["user"]["firstName"] + " " |
141 | - if data["user"].has_key("lastName"): |
142 | - fullname += data["user"]["lastName"] |
143 | - |
144 | - if data.has_key("photos"): |
145 | - if data["photos"]["count"] > 0: |
146 | - m["photo"] = {} |
147 | - m["photo"]["url"] = "" |
148 | - m["photo"]["picture"] = data["photos"]["items"][0]["url"] |
149 | - m["photo"]["name"] = "" |
150 | - m["type"] = "photo" |
151 | - |
152 | - m["sender"]["name"] = fullname |
153 | - m["sender"]["nick"] = fullname |
154 | - |
155 | - if data.has_key("source"): |
156 | - m["source"] = "<a href='" + data["source"]["url"] + "'>" + data["source"]["name"] + "</a>" |
157 | - else: |
158 | - m["source"] = "<a href='https://foursquare.com/'>Foursquare</a>" |
159 | - |
160 | - if data.has_key("comments"): |
161 | - if data["comments"]["count"] > 0: |
162 | - |
163 | - m["comments"] = [] |
164 | - comments = self._get_comments(data["id"]) |
165 | - for comment in comments: |
166 | - # Get the commenter's name |
167 | - fullname = "" |
168 | - if comment["user"].has_key("firstName"): |
169 | - fullname += comment["user"]["firstName"] + " " |
170 | - if comment["user"].has_key("lastName"): |
171 | - fullname += comment["user"]["lastName"] |
172 | - |
173 | - # Create a sender |
174 | - sender = { |
175 | - "name" : fullname, |
176 | - "id" : comment["user"]["id"], |
177 | - "is_me": False, |
178 | - "image": comment["user"]["photo"], |
179 | - "url" : comment["user"]["canonicalUrl"] |
180 | - } |
181 | - # Create a comment |
182 | - m["comments"].append({ |
183 | - "text" : comment["text"], |
184 | - "time" : comment["createdAt"], |
185 | - "sender": sender, |
186 | - }) |
187 | - |
188 | - return m |
189 | - |
190 | - def _check_error(self, data): |
191 | - if isinstance(data, dict) and "recent" in data: |
192 | - return True |
193 | - else: |
194 | - logger.error("Foursquare error %s", data) |
195 | - return False |
196 | - |
197 | - def _get_comments(self, checkin_id): |
198 | - url = "/".join((URL_PREFIX, "checkins", checkin_id)) |
199 | - url = url + "?oauth_token=" + self.token |
200 | - data = network.Download(url, None, False).get_json()["response"] |
201 | - return data["checkin"]["comments"]["items"] |
202 | - |
203 | - def _get(self, path, parse="message", post=False, single=False, **args): |
204 | - url = "/".join((URL_PREFIX, path)) |
205 | - |
206 | - url = url + "?oauth_token=" + self.token |
207 | - |
208 | - data = network.Download(url, None, post).get_json()["response"] |
209 | - |
210 | - resources.dump(self.account["service"], self.account["id"], data) |
211 | - |
212 | - if isinstance(data, dict) and data.get("errors", 0): |
213 | - if "authenticate" in data["errors"][0]["message"]: |
214 | - logstr = """%s: %s - %s""" % (PROTOCOL_INFO["name"], _("Authentication failed"), error["message"]) |
215 | - logger.error("%s", logstr) |
216 | - return [{"error": {"type": "auth", "account": self.account, "message": data["errors"][0]["message"]}}] |
217 | - else: |
218 | - for error in data["errors"]: |
219 | - logstr = """%s: %s - %s""" % (PROTOCOL_INFO["name"], _("Unknown failure"), error["message"]) |
220 | - return [{"error": {"type": "unknown", "account": self.account, "message": error["message"]}}] |
221 | - elif isinstance(data, dict) and data.get("error", 0): |
222 | - if "Incorrect signature" in data["error"]: |
223 | - logstr = """%s: %s - %s""" % (PROTOCOL_INFO["name"], _("Request failed"), data["error"]) |
224 | - logger.error("%s", logstr) |
225 | - return [{"error": {"type": "auth", "account": self.account, "message": data["error"]}}] |
226 | - elif isinstance(data, str): |
227 | - logstr = """%s: %s - %s""" % (PROTOCOL_INFO["name"], _("Request failed"), data) |
228 | - logger.error("%s", logstr) |
229 | - return [{"error": {"type": "request", "account": self.account, "message": data}}] |
230 | - if not self._check_error(data): |
231 | - return [] |
232 | - |
233 | - checkins = data["recent"] |
234 | - if single: return [getattr(self, "_%s" % parse)(checkins)] |
235 | - if parse: return [getattr(self, "_%s" % parse)(m) for m in checkins] |
236 | - else: return [] |
237 | - |
238 | - def __call__(self, opname, **args): |
239 | - return getattr(self, opname)(**args) |
240 | - |
241 | - def receive(self): |
242 | - return self._get("checkins/recent") |
243 | |
244 | === removed directory '.pc/lp_934530.patch' |
245 | === removed directory '.pc/lp_934530.patch/gwibber' |
246 | === removed directory '.pc/lp_934530.patch/gwibber/microblog' |
247 | === removed file '.pc/lp_934530.patch/gwibber/microblog/network.py' |
248 | --- .pc/lp_934530.patch/gwibber/microblog/network.py 2012-06-27 15:42:00 +0000 |
249 | +++ .pc/lp_934530.patch/gwibber/microblog/network.py 1970-01-01 00:00:00 +0000 |
250 | @@ -1,57 +0,0 @@ |
251 | -#!/usr/bin/env python |
252 | - |
253 | -import urllib, json |
254 | -import urllib2, base64 |
255 | -import logging |
256 | -logger = logging.getLogger("Network") |
257 | - |
258 | -class UrlLib2Downloader: |
259 | - def __init__(self, url, params=None, post=False, username=None, |
260 | - password=None, header=None, body=None, proxy=None): |
261 | - |
262 | - data = None |
263 | - |
264 | - if params: |
265 | - if post: |
266 | - data = urllib.urlencode(params) |
267 | - else: |
268 | - url = "?".join((url, urllib.urlencode(params))) |
269 | - |
270 | - url = url.encode('utf-8') |
271 | - self.url = url |
272 | - |
273 | - if header: |
274 | - req = urllib2.Request(url, data, headers=header) |
275 | - else: |
276 | - req = urllib2.Request(url, data) |
277 | - |
278 | - if username and password: |
279 | - base64string = base64.encodestring('%s:%s' % (username, password)).replace('\n', '') |
280 | - req.add_header("Authorization", "Basic %s" % base64string) |
281 | - if proxy and len(proxy) > 1: # If didn't get a list, we're screwed |
282 | - req.set_proxy(proxy[1], proxy[0]) |
283 | - |
284 | - try: |
285 | - self.res = urllib2.urlopen(req) |
286 | - except urllib2.HTTPError, e: |
287 | - logger.error("HTTP Error for %s - error code: %s", e.geturl().split("?")[0], e.getcode()) |
288 | - self.res = "HTTP error: {0}".format(e.getcode()) |
289 | - except urllib2.URLError, e: |
290 | - logger.error("Network failure: %s", e.reason) |
291 | - self.res = "Network error: {0}".format(e.reason) |
292 | - |
293 | - def get_json(self): |
294 | - try: |
295 | - return json.loads(self.get_string()) |
296 | - except ValueError as e: |
297 | - logger.debug("Failed to parse the response for %s, error was: %s", self.url.split("?")[0], str(e)) |
298 | - return [] |
299 | - |
300 | - def get_string(self): |
301 | - try: |
302 | - return self.res.read() |
303 | - except AttributeError: |
304 | - return self.res |
305 | - |
306 | - |
307 | -Download = UrlLib2Downloader |
308 | |
309 | === removed directory '.pc/lpi.patch' |
310 | === removed directory '.pc/lpi.patch/client' |
311 | === removed file '.pc/lpi.patch/client/Makefile.am' |
312 | --- .pc/lpi.patch/client/Makefile.am 2012-02-16 16:13:17 +0000 |
313 | +++ .pc/lpi.patch/client/Makefile.am 1970-01-01 00:00:00 +0000 |
314 | @@ -1,122 +0,0 @@ |
315 | -GETTEXT_PACKAGE = gwibber |
316 | - |
317 | -bin_PROGRAMS = \ |
318 | - gwibber \ |
319 | - gwibber-poster \ |
320 | - gwibber-preferences |
321 | - |
322 | -gwibber_SOURCES = \ |
323 | - gwibber-client.vala \ |
324 | - attachments-item.vala \ |
325 | - searches-item.vala \ |
326 | - users-item.vala \ |
327 | - home-item.vala \ |
328 | - private-item.vala \ |
329 | - replies-item.vala \ |
330 | - public-item.vala \ |
331 | - messages-item.vala \ |
332 | - stream-entry.vala \ |
333 | - status-bar.vala \ |
334 | - tab-bar.vala \ |
335 | - tab-bar-item.vala \ |
336 | - tab-bar-widgets.vala |
337 | - |
338 | -gwibber_CFLAGS = \ |
339 | - $(BASE_CFLAGS) \ |
340 | - -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ |
341 | - -I$(top_srcdir)/libgwibber \ |
342 | - -I$(top_srcdir)/libgwibber-gtk |
343 | - |
344 | -gwibber_VALAFLAGS = \ |
345 | - -X -I$(top_srcdir)/libgwibber \ |
346 | - -X -L../libgwibber/.libs \ |
347 | - -X -I$(top_srcdir)/libgwibber-gtk \ |
348 | - -X -L../libgwibber-gtk/.libs \ |
349 | - ../libgwibber/gwibber-@GWIBBER_API_VERSION@.vapi \ |
350 | - ../libgwibber-gtk/gwibber-gtk-@GWIBBER_API_VERSION@.vapi \ |
351 | - --vapidir $(top_srcdir)/vapi \ |
352 | - --pkg config \ |
353 | - --pkg json-glib-1.0 \ |
354 | - --pkg gee-1.0 \ |
355 | - --pkg gtk+-3.0 \ |
356 | - --pkg gdk-3.0 \ |
357 | - --pkg atk \ |
358 | - --pkg glib-2.0 \ |
359 | - --pkg dee-1.0 \ |
360 | - --basedir ./ \ |
361 | - $(MAINTAINER_VALAFLAGS) \ |
362 | - $(NULL) |
363 | - |
364 | -gwibber_LDADD = \ |
365 | - $(BASE_LIBS) \ |
366 | - -L../libgwibber/.libs -lgwibber \ |
367 | - -L../libgwibber-gtk/.libs -lgwibber-gtk \ |
368 | - -lpangocairo-1.0 -ldee-1.0 |
369 | - |
370 | -gwibber_preferences_SOURCES = \ |
371 | - gwibber-preferences.vala |
372 | - |
373 | -gwibber_preferences_CFLAGS = \ |
374 | - $(BASE_CFLAGS) \ |
375 | - -DGETTEXT_PACKAGE=\"$(GETTEXT_PACKAGE)\" \ |
376 | - -I$(top_srcdir)/libgwibber \ |
377 | - -I$(top_srcdir)/libgwibber-gtk |
378 | - |
379 | -gwibber_preferences_VALAFLAGS = \ |
380 | - --vapidir $(top_srcdir)/vapi \ |
381 | - --pkg config \ |
382 | - --pkg gtk+-3.0 \ |
383 | - --pkg gdk-3.0 \ |
384 | - --pkg atk \ |
385 | - --pkg glib-2.0 \ |
386 | - --pkg gmodule-2.0 \ |
387 | - --pkg Dbusmenu-0.4 \ |
388 | - $(MAINTAINER_VALAFLAGS) \ |
389 | - $(NULL) |
390 | - |
391 | -gwibber_preferences_LDADD = \ |
392 | - $(BASE_LIBS) |
393 | - |
394 | -gwibber_poster_SOURCES = \ |
395 | - stream-entry.vala \ |
396 | - gwibber-poster.vala |
397 | - |
398 | -gwibber_poster_CFLAGS = \ |
399 | - $(BASE_CFLAGS) \ |
400 | - -I$(top_srcdir)/libgwibber \ |
401 | - -I$(top_srcdir)/libgwibber-gtk |
402 | - |
403 | -gwibber_poster_VALAFLAGS = \ |
404 | - -X -I$(top_srcdir)/libgwibber \ |
405 | - -X -L../libgwibber/.libs \ |
406 | - -X -I$(top_srcdir)/libgwibber-gtk \ |
407 | - -X -L../libgwibber-gtk/.libs \ |
408 | - ../libgwibber/gwibber-@GWIBBER_API_VERSION@.vapi \ |
409 | - ../libgwibber-gtk/gwibber-gtk-@GWIBBER_API_VERSION@.vapi \ |
410 | - --vapidir $(top_srcdir)/vapi \ |
411 | - --pkg config \ |
412 | - --pkg json-glib-1.0 \ |
413 | - --pkg gtk+-3.0 \ |
414 | - --pkg gdk-3.0 \ |
415 | - --pkg atk \ |
416 | - --pkg glib-2.0 \ |
417 | - --pkg gee-1.0 \ |
418 | - --pkg dee-1.0 \ |
419 | - --pkg pango \ |
420 | - --basedir ./ \ |
421 | - $(MAINTAINER_VALAFLAGS) \ |
422 | - $(NULL) |
423 | - |
424 | -gwibber_poster_LDADD = \ |
425 | - $(BASE_LIBS) \ |
426 | - -L../libgwibber/.libs -lgwibber \ |
427 | - -L../libgwibber-gtk/.libs -lgwibber-gtk |
428 | - |
429 | -VALASOURCES = \ |
430 | - $(gwibber_SOURCES) \ |
431 | - $(gwibber_poster_SOURCES) \ |
432 | - $(gwibber_preferences_SOURCES) |
433 | - |
434 | -CLEANFILES = \ |
435 | - *.stamp \ |
436 | - $(VALASOURCES:.vala=.c) |
437 | |
438 | === removed file '.pc/lpi.patch/client/gwibber-client.vala' |
439 | --- .pc/lpi.patch/client/gwibber-client.vala 2012-02-23 14:18:14 +0000 |
440 | +++ .pc/lpi.patch/client/gwibber-client.vala 1970-01-01 00:00:00 +0000 |
441 | @@ -1,461 +0,0 @@ |
442 | -/* |
443 | - * Copyright (C) 2010 Canonical Ltd. |
444 | - * |
445 | - * This program is free software: you can redistribute it and/or modify it |
446 | - * under the terms of the GNU General Public License version 3, as published |
447 | - * by the Free Software Foundation. |
448 | - |
449 | - * This program is distributed in the hope that it will be useful, but |
450 | - * WITHOUT ANY WARRANTY; without even the implied warranties of |
451 | - * MERCHANTABILITY, SATISFACTORY QUALITY, or FITNESS FOR A PARTICULAR |
452 | - * PURPOSE. See the GNU General Public License for more details. |
453 | - |
454 | - * You should have received a copy of the GNU General Public License along |
455 | - * with this program. If not, see <http://www.gnu.org/licenses/>. |
456 | - * |
457 | - * Authored by Ken VanDine <ken.vandine@canonical.com> |
458 | - */ |
459 | - |
460 | -public class Client : Gtk.Window |
461 | -{ |
462 | - private Gwibber.Streams streams_service; |
463 | - private Gwibber.Service _service; |
464 | - private GLib.Settings state_settings; |
465 | - public Gee.HashMap <string, Dee.Model?> streams_map; |
466 | - public Gee.HashMap <string, TabBarItem?> items_map; |
467 | - public TabBar tabbar; |
468 | - public GwibberGtk.StreamView view; |
469 | - public Gtk.UIManager manager; |
470 | - private StatusBar _status_bar; |
471 | - private int _sort_order = 1; |
472 | - |
473 | - public int sort_order { |
474 | - get { return _sort_order; } |
475 | - set { |
476 | - if (value != _sort_order) |
477 | - { |
478 | - _sort_order = value; |
479 | - foreach (var v in items_map.values) |
480 | - { |
481 | - var _view = v.get_view () as GwibberGtk.StreamView; |
482 | - if (_view.sort_order != _sort_order) |
483 | - _view.sort_order = _sort_order; |
484 | - } |
485 | - } |
486 | - } |
487 | - } |
488 | - |
489 | - |
490 | - public Client () |
491 | - { |
492 | - Object (); |
493 | - } |
494 | - |
495 | - construct |
496 | - { |
497 | - state_settings = new GLib.Settings ("org.gwibber.state"); |
498 | - streams_map = new Gee.HashMap<string?, Dee.Model?> (); |
499 | - items_map = new Gee.HashMap<string?, TabBarItem?> (); |
500 | - |
501 | - var icon_theme = Gtk.IconTheme.get_default (); |
502 | - icon_theme.prepend_search_path (Config.PKGDATADIR + "/ui/icons"); |
503 | - |
504 | - // Prepend local icon path if running from a source checkout |
505 | - var local_icon_path = GLib.Path.build_path (Path.DIR_SEPARATOR_S, Environment.get_current_dir (), "data/icons"); |
506 | - if (GLib.FileUtils.test (local_icon_path, GLib.FileTest.IS_DIR)) |
507 | - { |
508 | - icon_theme.prepend_search_path (local_icon_path); |
509 | - } |
510 | - |
511 | - configure_event.connect (on_configure_event); |
512 | - delete_event.connect (() => { |
513 | - this.hide (); |
514 | - Idle.add (() => { this.destroy (); return false; }); |
515 | - return true; |
516 | - }); |
517 | - |
518 | - set_name(Config.PACKAGE); |
519 | - set_icon_name("gwibber"); |
520 | - set_title("Gwibber"); |
521 | - set_wmclass("gwibber", "Gwibber"); |
522 | - |
523 | - set_default_size(400,800); |
524 | - |
525 | - // Move to last known location and resize |
526 | - move(state_settings.get_int("position-x"), state_settings.get_int("position-y")); |
527 | - resize(state_settings.get_int("width"), state_settings.get_int("height")); |
528 | - |
529 | - // Tab Bar |
530 | - tabbar = new TabBar (); |
531 | - |
532 | - var main_box = new Gtk.Box (Gtk.Orientation.VERTICAL, 0); |
533 | - |
534 | - _status_bar = new StatusBar (); |
535 | - /* We don't need this yet |
536 | - _status_bar.add_button (Gtk.Stock.OK, Gtk.ResponseType.OK); |
537 | - _status_bar.response.connect((r) => { |
538 | - _status_bar.showing = false; |
539 | - }); |
540 | - */ |
541 | - main_box.pack_end (_status_bar, false, false, 0); |
542 | - _status_bar.notify["showing"].connect (()=> |
543 | - { |
544 | - debug ("StatusBar showing changed"); |
545 | - }); |
546 | - |
547 | - _service = new Gwibber.Service (); |
548 | - _service.loading_started.connect((source) => { |
549 | - debug ("Loading started"); |
550 | - if (!_status_bar.showing) |
551 | - { |
552 | - _status_bar.reset (); |
553 | - _status_bar.set_message_type (Gtk.MessageType.OTHER); |
554 | - _status_bar.message = _("Refreshing"); |
555 | - _status_bar.showing = true; |
556 | - } |
557 | - }); |
558 | - _service.loading_complete.connect((source) => { |
559 | - debug ("Loading completed"); |
560 | - if (_status_bar.showing) |
561 | - _status_bar.showing = false; |
562 | - }); |
563 | - |
564 | - main_box.pack_end (tabbar, true, true, 0); |
565 | - add (main_box); |
566 | - |
567 | - streams_service = new Gwibber.Streams (); |
568 | - |
569 | - streams_map["home"] = streams_service.stream_filter_model (streams_service.stream_model, "home"); |
570 | - |
571 | - var home_item = new HomeItem (streams_map); |
572 | - view = (GwibberGtk.StreamView)home_item.get_view (); |
573 | - |
574 | - tabbar.add_item (home_item); |
575 | - items_map["home"] = home_item; |
576 | - |
577 | - streams_map["messages"] = streams_service.stream_filter_model (streams_service.stream_model, "messages"); |
578 | - streams_map["replies"] = streams_service.stream_filter_model (streams_service.stream_model, "replies"); |
579 | - streams_map["private"] = streams_service.stream_filter_model (streams_service.stream_model, "private"); |
580 | - streams_map["images"] = streams_service.stream_filter_model (streams_service.stream_model, "images"); |
581 | - streams_map["videos"] = streams_service.stream_filter_model (streams_service.stream_model, "videos"); |
582 | - streams_map["links"] = streams_service.stream_filter_model (streams_service.stream_model, "links"); |
583 | - streams_map["public"] = streams_service.stream_filter_model (streams_service.stream_model, "public"); |
584 | - |
585 | - var messages_item = new MessagesItem (streams_map); |
586 | - tabbar.add_item (messages_item); |
587 | - items_map["messages"] = messages_item; |
588 | - |
589 | - var replies_item = new RepliesItem (streams_map); |
590 | - tabbar.add_item (replies_item); |
591 | - items_map["replies"] = replies_item; |
592 | - |
593 | - var private_item = new PrivateItem (streams_map); |
594 | - tabbar.add_item (private_item); |
595 | - items_map["private"] = private_item; |
596 | - |
597 | - var public_item = new PublicItem (streams_map); |
598 | - tabbar.add_item (public_item); |
599 | - items_map["public"] = public_item; |
600 | - |
601 | - var attach_item = new AttachmentsItem (streams_map); |
602 | - tabbar.add_item (attach_item); |
603 | - items_map["attach"] = attach_item; |
604 | - |
605 | - var searches_item = new SearchesItem (streams_service); |
606 | - tabbar.add_item (searches_item as TabBarItem); |
607 | - items_map["searches"] = searches_item; |
608 | - |
609 | - searches_item.raise.connect ((item) => { |
610 | - searches_item.clicked (); |
611 | - }); |
612 | - |
613 | - var users_item = new UsersItem (streams_service); |
614 | - tabbar.add_item (users_item as TabBarItem); |
615 | - items_map["users"] = users_item; |
616 | - |
617 | - users_item.raise.connect ((item) => { |
618 | - users_item.clicked (); |
619 | - }); |
620 | - |
621 | - view.notify["prepared"].connect (() => { |
622 | - sort_order = state_settings.get_int("stream-sort-order"); |
623 | - }); |
624 | - |
625 | - state_settings.changed.connect ((key) => { |
626 | - if (key == "stream-sort-order") { |
627 | - if (sort_order != state_settings.get_int("stream-sort-order")) |
628 | - sort_order = state_settings.get_int("stream-sort-order"); |
629 | - } |
630 | - }); |
631 | - messages_item.clicked (); |
632 | - |
633 | - Idle.add (() => { |
634 | - var menubar = create_menus (); |
635 | - main_box.pack_start(menubar, false, true, 0); |
636 | - return false; |
637 | - }); |
638 | - |
639 | - } |
640 | - |
641 | - public Gtk.MenuBar create_menus () |
642 | - { |
643 | - /**** Create menus ****/ |
644 | - |
645 | - Gtk.ActionEntry[] entries = new Gtk.ActionEntry[0]; |
646 | - |
647 | - Gtk.ActionEntry menu = {"Gwibber", null, _("_Gwibber"), null, null, null}; |
648 | - entries += menu; |
649 | - menu = {"View", null, _("_View"), null, null, null}; |
650 | - entries += menu; |
651 | - menu = {"Edit", null, _("_Edit"), null, null, null}; |
652 | - entries += menu; |
653 | - menu = {"Help", null, _("_Help"), null, null, null}; |
654 | - entries += menu; |
655 | - menu = {"refresh", Gtk.Stock.REFRESH, _("_Refresh"), "F5", null, on_refresh}; |
656 | - entries += menu; |
657 | - menu = {"quit", Gtk.Stock.QUIT, _("_Quit"), "<ctrl>Q", null, on_quit}; |
658 | - entries += menu; |
659 | - menu = {"sort", null, _("_Sort"), null, null, null}; |
660 | - entries += menu; |
661 | - menu = {"accounts", null, _("_Accounts"), "<ctrl><shift>A", null,on_accounts}; |
662 | - entries += menu; |
663 | - menu = {"preferences", Gtk.Stock.PREFERENCES, _("_Preferences"), "<ctrl>P", null, on_preferences}; |
664 | - entries += menu; |
665 | - menu = {"about", Gtk.Stock.ABOUT, _("_About"), null, null, on_about}; |
666 | - entries += menu; |
667 | - |
668 | - var sort_entries = new Gtk.RadioActionEntry[0]; |
669 | - Gtk.RadioActionEntry radio = {"ascending", Gtk.Stock.SORT_ASCENDING, _("_Ascending"), null, null, 0}; |
670 | - sort_entries += radio; |
671 | - radio = {"descending", Gtk.Stock.SORT_DESCENDING, _("_Descending"), null, null, 1}; |
672 | - sort_entries += radio; |
673 | - |
674 | - string ui = """ |
675 | - <ui> |
676 | - <menubar name="MenuBar"> |
677 | - <menu action="Gwibber"> |
678 | - <menuitem action="refresh" /> |
679 | - <separator/> |
680 | - <menuitem action="quit" /> |
681 | - </menu> |
682 | - |
683 | - <menu action="View"> |
684 | - <menu action="sort"> |
685 | - <menuitem action="ascending" /> |
686 | - <menuitem action="descending" /> |
687 | - </menu> |
688 | - </menu> |
689 | - |
690 | - <menu action="Edit"> |
691 | - <menuitem action="accounts" /> |
692 | - <menuitem name="preferences" action="preferences" /> |
693 | - </menu> |
694 | - |
695 | - <menu action="Help"> |
696 | - <menuitem action="about" /> |
697 | - </menu> |
698 | - </menubar> |
699 | - </ui> |
700 | - """; |
701 | - |
702 | - var main_group = new Gtk.ActionGroup("client"); |
703 | - main_group.add_actions(entries, this); |
704 | - main_group.add_radio_actions(sort_entries, sort_order, ((a,c) => { |
705 | - Gtk.RadioAction current = (Gtk.RadioAction) c; |
706 | - state_settings.set_int("stream-sort-order", current.get_current_value ()); |
707 | - })); |
708 | - |
709 | - var manager = new Gtk.UIManager(); |
710 | - |
711 | - try { |
712 | - manager.add_ui_from_string(ui, -1); |
713 | - } catch (Error e) { error("%s", e.message); } |
714 | - |
715 | - manager.insert_action_group(main_group, 0); |
716 | - |
717 | - var menubar = manager.get_widget("/MenuBar") as Gtk.MenuBar; |
718 | - add_accel_group(manager.get_accel_group()); |
719 | - |
720 | - /**** End menu setup ****/ |
721 | - |
722 | - return menubar; |
723 | - } |
724 | - |
725 | - |
726 | - static void on_refresh() { |
727 | - var service = new Gwibber.Service(); |
728 | - service.refresh(); |
729 | - } |
730 | - |
731 | - static void on_preferences() { |
732 | - GLib.Pid pid; |
733 | - try { |
734 | - GLib.Process.spawn_async(null, {"gwibber-preferences"}, null, |
735 | - GLib.SpawnFlags.SEARCH_PATH, null, out pid); |
736 | - } catch { |
737 | - } |
738 | - } |
739 | - |
740 | - static void on_accounts() { |
741 | - GLib.Pid pid; |
742 | - try { |
743 | - GLib.Process.spawn_async(null, {"gwibber-accounts"}, null, |
744 | - GLib.SpawnFlags.SEARCH_PATH, null, out pid); |
745 | - } catch { |
746 | - |
747 | - } |
748 | - } |
749 | - |
750 | - |
751 | - static void on_about() { |
752 | - |
753 | - string license = _("Gwibber is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.\n\nGwibber is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.\n\nYou should have received a copy of the GNU General Public License along with Gwibber; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-130159 USA"); |
754 | - |
755 | - string[] authors = {"Ken VanDine <ken@vandine.org>", "Neil Jagdish Patel <njpatel@gmail.com>"}; |
756 | - var about_dialog = new Gtk.AboutDialog (); |
757 | - about_dialog.set_program_name("Gwibber"); |
758 | - about_dialog.set_logo_icon_name("gwibber"); |
759 | - about_dialog.set_version(Config.VERSION); |
760 | - about_dialog.set_website("http://www.gwibber.com"); |
761 | - about_dialog.set_license(license); |
762 | - about_dialog.set_wrap_license(true); |
763 | - about_dialog.set_authors (authors); |
764 | - about_dialog.run (); |
765 | - about_dialog.destroy (); |
766 | - } |
767 | - |
768 | - private void on_quit () |
769 | - { |
770 | - destroy (); |
771 | - var service = new Gwibber.Service(); |
772 | - |
773 | - /* Check if the unity lens is running and only shutdown the |
774 | - * service if it isn't |
775 | - */ |
776 | - bool has_owner = false; |
777 | - try { |
778 | - string name = "com.canonical.Unity.Lens.Gwibber"; |
779 | - DBusConnection bus = Bus.get_sync (BusType.SESSION); |
780 | - Variant result = bus.call_sync ("org.freedesktop.DBus", |
781 | - "/org/freedesktop/dbus", |
782 | - "org.freedesktop.DBus", |
783 | - "NameHasOwner", |
784 | - new Variant ("(s)", name), |
785 | - new VariantType ("(b)"), |
786 | - DBusCallFlags.NO_AUTO_START, |
787 | - -1); |
788 | - result.get ("(b)", out has_owner); |
789 | - } catch (Error e) { |
790 | - warning ("Unable to decide if '%s' is running: %s", name, e.message); |
791 | - } |
792 | - |
793 | - if (!has_owner) |
794 | - { |
795 | - debug ("Lens isn't running"); |
796 | - service.quit (); |
797 | - } |
798 | - |
799 | - } |
800 | - |
801 | - bool on_configure_event (Gdk.EventConfigure event) { |
802 | - int width, height, x, y; |
803 | - get_size(out width, out height); |
804 | - get_position (out x, out y); |
805 | - state_settings.set_int("width", width); |
806 | - state_settings.set_int("height", height); |
807 | - state_settings.set_int("position-x", x); |
808 | - state_settings.set_int("position-y", y); |
809 | - return false; |
810 | - } |
811 | -} |
812 | - |
813 | -public class Main : Gtk.Application |
814 | -{ |
815 | - static string stream; |
816 | - |
817 | - static Client main_window; |
818 | - |
819 | - const OptionEntry[] options = { |
820 | - {"stream", 's', 0, OptionArg.STRING, ref stream, N_("Stream"), N_("STREAM")}, |
821 | - {null} |
822 | - }; |
823 | - |
824 | - public Main (string app_id, ApplicationFlags flags) |
825 | - { |
826 | - GLib.Object (application_id: app_id, flags: flags); |
827 | - } |
828 | - |
829 | - public void on_activate () |
830 | - { |
831 | - if (get_windows () != null) |
832 | - main_window.present (); |
833 | - else |
834 | - { |
835 | - main_window = new Client (); |
836 | - |
837 | - add_window (main_window); |
838 | - |
839 | - Environment.set_application_name (Config.PACKAGE); |
840 | - |
841 | - Gtk.IconTheme.get_default ().append_search_path (GLib.Path.build_filename (Config.PKGDATADIR, "ui/icons")); |
842 | - |
843 | - main_window.set_application (this); |
844 | - main_window.show_all (); |
845 | - |
846 | - var accounts_service = new Gwibber.Accounts(); |
847 | - var accounts_list = accounts_service.list (); |
848 | - if (accounts_list.length() == 0) |
849 | - { |
850 | - GLib.Pid pid; |
851 | - try { |
852 | - GLib.Process.spawn_async(null, {"gwibber-accounts"}, null, |
853 | - GLib.SpawnFlags.SEARCH_PATH, null, out pid); |
854 | - } catch { |
855 | - } |
856 | - } |
857 | - } |
858 | - } |
859 | - |
860 | - public int on_command_line (ApplicationCommandLine command_line) |
861 | - { |
862 | - var args = command_line.get_arguments (); |
863 | - unowned string[] arguments = args; |
864 | - try { |
865 | - var context = new OptionContext (_("— Gwibber Client")); |
866 | - context.set_help_enabled (false); |
867 | - context.add_main_entries (options, Config.GETTEXT_PACKAGE); |
868 | - context.parse (ref arguments); |
869 | - } |
870 | - catch (OptionError error) { |
871 | - command_line.set_exit_status (1); |
872 | - } |
873 | - |
874 | - activate (); |
875 | - |
876 | - var items_map = main_window.items_map; |
877 | - if (stream != null) |
878 | - { |
879 | - if ((main_window.tabbar is TabBar) && (items_map[stream] is TabBarItem)) |
880 | - main_window.tabbar.on_tab_clicked(items_map[stream]); |
881 | - } |
882 | - |
883 | - command_line.set_exit_status (0); |
884 | - return command_line.get_exit_status (); |
885 | - } |
886 | -} |
887 | - |
888 | -public int main (string[] args) |
889 | -{ |
890 | - Gtk.init (ref args); |
891 | - |
892 | - Intl.bindtextdomain(Config.GETTEXT_PACKAGE, Config.LOCALE_DIR); |
893 | - Intl.bind_textdomain_codeset(Config.GETTEXT_PACKAGE, "UTF-8"); |
894 | - Intl.textdomain(Config.GETTEXT_PACKAGE); |
895 | - |
896 | - var app = new Main ("org.gwibber.client", GLib.ApplicationFlags.HANDLES_COMMAND_LINE); |
897 | - |
898 | - app.activate.connect (app.on_activate); |
899 | - app.command_line.connect (app.on_command_line); |
900 | - int result = app.run (args); |
901 | - return result; |
902 | -} |
903 | |
904 | === removed file '.pc/lpi.patch/configure.ac' |
905 | --- .pc/lpi.patch/configure.ac 2012-06-11 23:25:25 +0000 |
906 | +++ .pc/lpi.patch/configure.ac 1970-01-01 00:00:00 +0000 |
907 | @@ -1,368 +0,0 @@ |
908 | -m4_define([gwibber_major], [3]) |
909 | -m4_define([gwibber_minor], [4]) |
910 | -m4_define([gwibber_micro], [2]) |
911 | -m4_define([gwibber_version], |
912 | - [gwibber_major.gwibber_minor.gwibber_micro]) |
913 | - |
914 | -m4_define([gwibber_api_version], [0.2]) |
915 | - |
916 | -AC_INIT([gwibber],[gwibber_version],[https://launchpad.net/gwibber]) |
917 | -AC_COPYRIGHT([Copyright 2010 Canonical]) |
918 | -m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES([yes])]) |
919 | - |
920 | -AC_PREREQ(2.65) |
921 | - |
922 | -AC_CONFIG_HEADERS([config.h]) |
923 | -AM_INIT_AUTOMAKE(gwibber, gwibber_version) |
924 | - |
925 | -dnl Get version number into Autoconf |
926 | -GWIBBER_MAJOR_VERSION=gwibber_major |
927 | -GWIBBER_MINOR_VERSION=gwibber_minor |
928 | -GWIBBER_MICRO_VERSION=gwibber_micro |
929 | -GWIBBER_VERSION=gwibber_version |
930 | -GWIBBER_API_VERSION=gwibber_api_version |
931 | -AC_SUBST(GWIBBER_MAJOR_VERSION) |
932 | -AC_SUBST(GWIBBER_MINOR_VERSION) |
933 | -AC_SUBST(GWIBBER_MICRO_VERSION) |
934 | -AC_SUBST(GWIBBER_VERSION) |
935 | -AC_SUBST(GWIBBER_API_VERSION) |
936 | - |
937 | - |
938 | -dnl Init the other things we depend on |
939 | -AM_MAINTAINER_MODE |
940 | -GWIBBER_PROG_VALAC([0.15.0]) |
941 | - |
942 | -AS_IF([test -z "$VALAC"], [AC_MSG_ERROR(["No valac compiler found."])]) |
943 | -AC_PROG_CC |
944 | -AM_PROG_CC_C_O |
945 | -AC_HEADER_STDC |
946 | -AC_PROG_LIBTOOL |
947 | - |
948 | -LT_INIT |
949 | -AC_CONFIG_MACRO_DIR([m4]) |
950 | - |
951 | -# Check for python 2.6 |
952 | -AM_PATH_PYTHON([2.6]) |
953 | - |
954 | -########################### |
955 | -# Internationalization |
956 | -########################### |
957 | - |
958 | -GETTEXT_PACKAGE="${PACKAGE}" |
959 | -AC_SUBST(GETTEXT_PACKAGE) |
960 | -AC_DEFINE_UNQUOTED(GETTEXT_PACKAGE, "$GETTEXT_PACKAGE", [Name of the default get text domain]) |
961 | -localedir='$(prefix)/$(DATADIRNAME)/locale' |
962 | -AC_SUBST(localedir) |
963 | -AM_GNU_GETTEXT([external]) |
964 | -AM_GNU_GETTEXT_VERSION([0.17]) |
965 | -IT_PROG_INTLTOOL([0.40]) |
966 | - |
967 | - |
968 | -########################### |
969 | -# Lib versioning |
970 | -########################### |
971 | - |
972 | -LIBGWIBBER_CURRENT=2 |
973 | -LIBGWIBBER_REVISION=0 |
974 | -LIBGWIBBER_AGE=0 |
975 | - |
976 | -AC_SUBST(LIBGWIBBER_CURRENT) |
977 | -AC_SUBST(LIBGWIBBER_REVISION) |
978 | -AC_SUBST(LIBGWIBBER_AGE) |
979 | - |
980 | -GLIB_GSETTINGS |
981 | - |
982 | -# Setup a few consts |
983 | -if test "x${prefix}" = "xNONE"; then |
984 | - PREFIX="${ac_default_prefix}" |
985 | -else |
986 | - PREFIX="${prefix}" |
987 | -fi |
988 | - |
989 | -AC_DEFINE_UNQUOTED(LOCALE_DIR, "${PREFIX}/${DATADIRNAME}/locale",[Locale directory]) |
990 | -AC_DEFINE_UNQUOTED(PKGDATADIR, "${PREFIX}/${DATADIRNAME}/${PACKAGE}", [Package data directory]) |
991 | - |
992 | -###################################################### |
993 | -# intltool rule for generating translated .lens file |
994 | -###################################################### |
995 | -INTLTOOL_LENS_RULE='%.lens: %.lens.in $(INTLTOOL_MERGE) $(wildcard $(top_srcdir)/po/*.po) ; LC_ALL=C $(INTLTOOL_MERGE) -d -u -c $(top_builddir)/po/.intltool-merge-cache $(top_srcdir)/po $< [$]@' |
996 | -AC_SUBST(INTLTOOL_LENS_RULE) |
997 | - |
998 | -dnl Use strict compiler flags only on development releases |
999 | -m4_define([maintainer_flags_default], |
1000 | - [m4_if(m4_eval(gwibber_minor % 2), [1], [yes], [no])]) |
1001 | -AC_ARG_ENABLE([maintainer-flags], |
1002 | - [AS_HELP_STRING([--enable-maintainer-flags=@<:@no/yes@:>:],[Use string compiler flags @<:@default=no@:>@])], |
1003 | - [], |
1004 | - [enable_maintainer_flags=maintainer_flags_default]) |
1005 | -MAINTAINER_CFLAGS="" |
1006 | -MAINTAINER_VALAFLAGS="" |
1007 | -AS_IF([test "x$enable_maintainer_flags" = "xyes" && test "x$GCC" = "xyes"], |
1008 | - [ |
1009 | - MAINTAINER_CFLAGS="-g -Wall -Werror -Wshadow -Wcast-align -Wno-uninitialized -Wempty-body -Wformat-security -Winit-self -Wno-unused-but-set-variable -Wno-unused-variable -Wno-error" |
1010 | - MAINTAINER_VALAFLAGS="-g --save-temps" |
1011 | - ] |
1012 | -) |
1013 | -AC_SUBST(MAINTAINER_CFLAGS) |
1014 | -AC_SUBST(MAINTAINER_VALAFLAGS) |
1015 | - |
1016 | - |
1017 | - |
1018 | -dnl disable deprecated APIs |
1019 | -DEPRECATED_CFLAGS="" |
1020 | -AC_ARG_ENABLE([deprecated], |
1021 | - [AC_HELP_STRING([--disable-deprecated], |
1022 | - [Add extra compiler flags disabling deprecated APIs])], |
1023 | - [disable_deprecated=$enableval], |
1024 | - [disable_deprecated='yes']) |
1025 | - |
1026 | -if test "$disable_deprecated" = 'no'; then |
1027 | - DEPRECATED_CFLAGS="-DGDK_DISABLE_DEPRECATED -DGTK_DISABLE_DEPRECATED -DGDK_PIXBUF_DISABLE_DEPRECATED -DGSEAL_ENABLE -DG_DISABLE_DEPRECATED -DGTK_DISABLE_SINGLE_INCLUDES" |
1028 | -fi |
1029 | -AC_SUBST(DEPRECATED_CFLAGS) |
1030 | - |
1031 | - |
1032 | -dnl Check for module and library dependancies |
1033 | -GLIB_REQUIRED=2.26 |
1034 | -GTK_REQUIRED=3.2 |
1035 | -GDK_REQUIRED=3.2 |
1036 | -DEE_REQUIRED=1.0.0 |
1037 | -DBUSMENU_REQUIRED=0.4 |
1038 | -INDICATE_REQUIRED=0.5 |
1039 | -LIBNOTIFY_REQUIRED=0.7 |
1040 | -UNITY_REQUIRED=5.0.0 |
1041 | -PKG_CHECK_MODULES(BASE, |
1042 | - glib-2.0 >= $GLIB_REQUIRED |
1043 | - gobject-2.0 >= $GLIB_REQUIRED |
1044 | - gtk+-3.0 >= $GTK_REQUIRED |
1045 | - gdk-3.0 >= $GDK_REQUIRED |
1046 | - gio-2.0 |
1047 | - gio-unix-2.0 >= $GLIB_REQUIRED |
1048 | - gee-1.0 |
1049 | - libnotify >= $LIBNOTIFY_REQUIRED |
1050 | - libsoup-2.4 |
1051 | - pangocairo |
1052 | - dee-1.0 >= $DEE_REQUIRED |
1053 | - json-glib-1.0 |
1054 | - gmodule-2.0 |
1055 | - gsettings-desktop-schemas) |
1056 | -AC_SUBST(BASE_CFLAGS) |
1057 | -AC_SUBST(BASE_LIBS) |
1058 | - |
1059 | -AC_ARG_ENABLE([spell], |
1060 | - AS_HELP_STRING([--enable-spell], |
1061 | - [enable gtkspell @<:@default=yes@:>@]), |
1062 | - enable_spell=$enableval, |
1063 | - enable_spell=yes) |
1064 | - |
1065 | -if test "x$enable_spell" = "xyes"; then |
1066 | - PKG_CHECK_MODULES(GTKSPELL, |
1067 | - gtkspell-3.0) |
1068 | - AC_SUBST(GTKSPELL_CFLAGS) |
1069 | - AC_SUBST(GTKSPELL_CFLAGS) |
1070 | - GTKSPELL_PKG="--pkg gtkspell-3.0" |
1071 | - AC_SUBST(GTKSPELL_PKG) |
1072 | -fi |
1073 | - |
1074 | -AM_CONDITIONAL(HAVE_GTKSPELL, [test "x$enable_spell" = "xyes"]) |
1075 | - |
1076 | -########################### |
1077 | -# GObject Introspection |
1078 | -########################### |
1079 | - |
1080 | -GOBJECT_INTROSPECTION_CHECK([0.6.7]) |
1081 | - |
1082 | -PKG_CHECK_EXISTS([gobject-introspection-1.0 >= 0.10], |
1083 | - introspection_ten=yes, |
1084 | - introspection_ten=no) |
1085 | - |
1086 | -AM_CONDITIONAL(INTROSPECTION_TEN, [test "x$introspection_ten" = "xyes"]) |
1087 | - |
1088 | -########################### |
1089 | -# DBus Service Info |
1090 | -########################### |
1091 | - |
1092 | -if test "x$with_localinstall" = "xyes"; then |
1093 | - DBUSSERVICEDIR="${datadir}/dbus-1/services/" |
1094 | -else |
1095 | - DBUSSERVICEDIR=`$PKG_CONFIG --variable=session_bus_services_dir dbus-1` |
1096 | -fi |
1097 | -AC_SUBST(DBUSSERVICEDIR) |
1098 | - |
1099 | -dnl local install for distcheck and stand-alone running |
1100 | -with_localinstall="no" |
1101 | -AC_ARG_ENABLE(localinstall, |
1102 | - AS_HELP_STRING([--enable-localinstall], |
1103 | - [Install all of the files locally instead of in system directories (for distcheck)]), |
1104 | - with_localinstall=$enableval, |
1105 | - with_localinstall=no) |
1106 | - |
1107 | -AM_CONDITIONAL([HAVE_LOCALINSTALL], [test "x$with_localinstall" = "xyes"]) |
1108 | - |
1109 | -with_unity="yes" |
1110 | -AC_ARG_ENABLE(unity, |
1111 | - AS_HELP_STRING([--enable-unity], |
1112 | - [Enable building of the Unity lens]), |
1113 | - with_unity=$enableval, |
1114 | - with_unity=yes) |
1115 | - |
1116 | -AM_CONDITIONAL([HAVE_UNITY], [test "x$with_unity" = "xyes"]) |
1117 | - |
1118 | -if test "x$with_unity" = "xyes"; then |
1119 | - PKG_CHECK_MODULES(UNITY, |
1120 | - dbusmenu-glib-0.4 >= $DBUSMENU_REQUIRED |
1121 | - unity >= $UNITY_REQUIRED) |
1122 | - AC_SUBST(UNITY_CFLAGS) |
1123 | - AC_SUBST(UNITY_LIBS) |
1124 | - if test "x$with_localinstall" = "xyes"; then |
1125 | - LENSESDIR="${datadir}/unity/lenses" |
1126 | - else |
1127 | - LENSESDIR=`$PKG_CONFIG --variable=lensesdir unity` |
1128 | - fi |
1129 | - AC_SUBST(LENSESDIR) |
1130 | -fi |
1131 | - |
1132 | -dnl Create the Makefiles |
1133 | -AC_CONFIG_FILES([ |
1134 | - Makefile |
1135 | - man/Makefile |
1136 | - gwibber/Makefile |
1137 | - gwibber/lib/Makefile |
1138 | - gwibber/lib/gtk/Makefile |
1139 | - gwibber/microblog/Makefile |
1140 | - gwibber/microblog/util/Makefile |
1141 | - gwibber/microblog/util/const.py |
1142 | - gwibber/microblog/uploader/Makefile |
1143 | - gwibber/microblog/uploader/imageshack/Makefile |
1144 | - gwibber/microblog/uploader/ubuntuone_uploader/Makefile |
1145 | - gwibber/microblog/urlshorter/Makefile |
1146 | - gwibber/microblog/plugins/Makefile |
1147 | - gwibber/microblog/plugins/buzz/Makefile |
1148 | - gwibber/microblog/plugins/buzz/gtk/Makefile |
1149 | - gwibber/microblog/plugins/buzz/gtk/buzz/Makefile |
1150 | - gwibber/microblog/plugins/buzz/ui/Makefile |
1151 | - gwibber/microblog/plugins/buzz/ui/icons/Makefile |
1152 | - gwibber/microblog/plugins/buzz/ui/icons/hicolor/Makefile |
1153 | - gwibber/microblog/plugins/buzz/ui/icons/hicolor/16x16/Makefile |
1154 | - gwibber/microblog/plugins/buzz/ui/icons/hicolor/16x16/apps/Makefile |
1155 | - gwibber/microblog/plugins/buzz/ui/icons/hicolor/22x22/Makefile |
1156 | - gwibber/microblog/plugins/buzz/ui/icons/hicolor/22x22/apps/Makefile |
1157 | - gwibber/microblog/plugins/buzz/ui/icons/hicolor/32x32/Makefile |
1158 | - gwibber/microblog/plugins/buzz/ui/icons/hicolor/32x32/apps/Makefile |
1159 | - gwibber/microblog/plugins/digg/Makefile |
1160 | - gwibber/microblog/plugins/digg/gtk/Makefile |
1161 | - gwibber/microblog/plugins/digg/gtk/digg/Makefile |
1162 | - gwibber/microblog/plugins/digg/ui/Makefile |
1163 | - gwibber/microblog/plugins/facebook/Makefile |
1164 | - gwibber/microblog/plugins/facebook/gtk/Makefile |
1165 | - gwibber/microblog/plugins/facebook/gtk/facebook/Makefile |
1166 | - gwibber/microblog/plugins/facebook/ui/Makefile |
1167 | - gwibber/microblog/plugins/flickr/Makefile |
1168 | - gwibber/microblog/plugins/flickr/gtk/Makefile |
1169 | - gwibber/microblog/plugins/flickr/gtk/flickr/Makefile |
1170 | - gwibber/microblog/plugins/flickr/ui/Makefile |
1171 | - gwibber/microblog/plugins/foursquare/Makefile |
1172 | - gwibber/microblog/plugins/foursquare/gtk/Makefile |
1173 | - gwibber/microblog/plugins/foursquare/gtk/foursquare/Makefile |
1174 | - gwibber/microblog/plugins/foursquare/ui/Makefile |
1175 | - gwibber/microblog/plugins/foursquare/ui/icons/Makefile |
1176 | - gwibber/microblog/plugins/foursquare/ui/icons/hicolor/Makefile |
1177 | - gwibber/microblog/plugins/foursquare/ui/icons/hicolor/16x16/Makefile |
1178 | - gwibber/microblog/plugins/foursquare/ui/icons/hicolor/16x16/apps/Makefile |
1179 | - gwibber/microblog/plugins/foursquare/ui/icons/hicolor/22x22/Makefile |
1180 | - gwibber/microblog/plugins/foursquare/ui/icons/hicolor/22x22/apps/Makefile |
1181 | - gwibber/microblog/plugins/foursquare/ui/icons/hicolor/32x32/Makefile |
1182 | - gwibber/microblog/plugins/foursquare/ui/icons/hicolor/32x32/apps/Makefile |
1183 | - gwibber/microblog/plugins/friendfeed/Makefile |
1184 | - gwibber/microblog/plugins/friendfeed/gtk/Makefile |
1185 | - gwibber/microblog/plugins/friendfeed/gtk/friendfeed/Makefile |
1186 | - gwibber/microblog/plugins/friendfeed/ui/Makefile |
1187 | - gwibber/microblog/plugins/identica/Makefile |
1188 | - gwibber/microblog/plugins/identica/gtk/Makefile |
1189 | - gwibber/microblog/plugins/identica/gtk/identica/Makefile |
1190 | - gwibber/microblog/plugins/identica/ui/Makefile |
1191 | - gwibber/microblog/plugins/pingfm/Makefile |
1192 | - gwibber/microblog/plugins/pingfm/gtk/Makefile |
1193 | - gwibber/microblog/plugins/pingfm/gtk/pingfm/Makefile |
1194 | - gwibber/microblog/plugins/pingfm/ui/Makefile |
1195 | - gwibber/microblog/plugins/qaiku/Makefile |
1196 | - gwibber/microblog/plugins/qaiku/gtk/Makefile |
1197 | - gwibber/microblog/plugins/qaiku/gtk/qaiku/Makefile |
1198 | - gwibber/microblog/plugins/qaiku/ui/Makefile |
1199 | - gwibber/microblog/plugins/statusnet/Makefile |
1200 | - gwibber/microblog/plugins/statusnet/gtk/Makefile |
1201 | - gwibber/microblog/plugins/statusnet/gtk/statusnet/Makefile |
1202 | - gwibber/microblog/plugins/statusnet/ui/Makefile |
1203 | - gwibber/microblog/plugins/twitter/Makefile |
1204 | - gwibber/microblog/plugins/twitter/gtk/Makefile |
1205 | - gwibber/microblog/plugins/twitter/gtk/twitter/Makefile |
1206 | - gwibber/microblog/plugins/twitter/ui/Makefile |
1207 | - data/Makefile |
1208 | - data/icons/Makefile |
1209 | - data/icons/hicolor/Makefile |
1210 | - data/icons/hicolor/16x16/Makefile |
1211 | - data/icons/hicolor/16x16/status/Makefile |
1212 | - data/icons/hicolor/16x16/apps/Makefile |
1213 | - data/icons/hicolor/22x22/Makefile |
1214 | - data/icons/hicolor/22x22/places/Makefile |
1215 | - data/icons/hicolor/22x22/status/Makefile |
1216 | - data/icons/hicolor/22x22/apps/Makefile |
1217 | - data/icons/hicolor/48x48/Makefile |
1218 | - data/icons/hicolor/48x48/places/Makefile |
1219 | - data/icons/hicolor/scalable/Makefile |
1220 | - data/icons/hicolor/scalable/apps/Makefile |
1221 | - data/icons/hicolor/scalable/places/Makefile |
1222 | - data/icons/streams/Makefile |
1223 | - data/icons/streams/16x16/Makefile |
1224 | - data/icons/streams/24x24/Makefile |
1225 | - data/icons/streams/32x32/Makefile |
1226 | - data/icons/scalable/apps/Makefile |
1227 | - data/icons/16x16/apps/Makefile |
1228 | - data/icons/24x24/apps/Makefile |
1229 | - data/icons/32x32/apps/Makefile |
1230 | - data/icons/48x48/apps/Makefile |
1231 | - data/icons/256x256/apps/Makefile |
1232 | - data/icons/scalable/Makefile |
1233 | - data/icons/16x16/Makefile |
1234 | - data/icons/24x24/Makefile |
1235 | - data/icons/32x32/Makefile |
1236 | - data/icons/48x48/Makefile |
1237 | - data/icons/256x256/Makefile |
1238 | - data/gwibber.desktop.in |
1239 | - data/org.gwibber.gschema.xml.in |
1240 | - libgwibber/Makefile |
1241 | - libgwibber-gtk/Makefile |
1242 | - vapi/Makefile |
1243 | - po/Makefile.in |
1244 | - gwibber-$GWIBBER_API_VERSION.pc |
1245 | - gwibber-gtk-$GWIBBER_API_VERSION.pc |
1246 | - lens/Makefile |
1247 | - lens/src/Makefile |
1248 | - lens/data/Makefile |
1249 | - lens/data/gwibber.lens.in |
1250 | - client/Makefile |
1251 | - bin/Makefile |
1252 | - tests/Makefile |
1253 | - tests/vala/Makefile |
1254 | - tests/python/Makefile |
1255 | -]) |
1256 | -AC_OUTPUT |
1257 | - |
1258 | -dnl Output the results |
1259 | -AC_MSG_NOTICE([ |
1260 | - |
1261 | - libgwibber $VERSION |
1262 | - ---------------------- |
1263 | - |
1264 | - Prefix : ${prefix} |
1265 | - |
1266 | - Localinstall : ${with_localinstall} |
1267 | - |
1268 | - Unity : ${with_unity} |
1269 | - gtkspell : ${enable_spell} |
1270 | - |
1271 | - Lenses Directory: ${LENSESDIR} |
1272 | - |
1273 | - Extra CFlags : ${CPPFLAGS} $MAINTAINER_CFLAGS $DEPRECATED_CFLAGS |
1274 | - Extra ValaFlags: ${CPPFLAGS} $MAINTAINER_VALAFLAGS |
1275 | -]) |
1276 | |
1277 | === modified file 'client/Makefile.am' |
1278 | --- client/Makefile.am 2012-02-16 16:13:17 +0000 |
1279 | +++ client/Makefile.am 2012-12-05 02:19:23 +0000 |
1280 | @@ -43,7 +43,6 @@ |
1281 | --pkg atk \ |
1282 | --pkg glib-2.0 \ |
1283 | --pkg dee-1.0 \ |
1284 | - --pkg launchpad-integration-3.0 \ |
1285 | --basedir ./ \ |
1286 | $(MAINTAINER_VALAFLAGS) \ |
1287 | $(NULL) |
1288 | |
1289 | === modified file 'client/gwibber-client.vala' |
1290 | --- client/gwibber-client.vala 2012-02-23 14:18:14 +0000 |
1291 | +++ client/gwibber-client.vala 2012-12-05 02:19:23 +0000 |
1292 | @@ -252,8 +252,6 @@ |
1293 | </menu> |
1294 | |
1295 | <menu action="Help"> |
1296 | - <placeholder name="LaunchpadItems" /> |
1297 | - <separator /> |
1298 | <menuitem action="about" /> |
1299 | </menu> |
1300 | </menubar> |
1301 | @@ -275,9 +273,6 @@ |
1302 | |
1303 | manager.insert_action_group(main_group, 0); |
1304 | |
1305 | - LaunchpadIntegration.set_sourcepackagename("gwibber"); |
1306 | - LaunchpadIntegration.add_ui(manager, "/MenuBar/Help/LaunchpadItems"); |
1307 | - |
1308 | var menubar = manager.get_widget("/MenuBar") as Gtk.MenuBar; |
1309 | add_accel_group(manager.get_accel_group()); |
1310 | |
1311 | |
1312 | === modified file 'configure.ac' |
1313 | --- configure.ac 2012-06-11 23:25:25 +0000 |
1314 | +++ configure.ac 2012-12-05 02:19:23 +0000 |
1315 | @@ -145,7 +145,6 @@ |
1316 | dee-1.0 >= $DEE_REQUIRED |
1317 | json-glib-1.0 |
1318 | gmodule-2.0 |
1319 | - launchpad-integration-3.0 |
1320 | gsettings-desktop-schemas) |
1321 | AC_SUBST(BASE_CFLAGS) |
1322 | AC_SUBST(BASE_LIBS) |
1323 | |
1324 | === added file 'debian/patches/lp_1058672.patch' |
1325 | --- debian/patches/lp_1058672.patch 1970-01-01 00:00:00 +0000 |
1326 | +++ debian/patches/lp_1058672.patch 2012-12-05 02:19:23 +0000 |
1327 | @@ -0,0 +1,22 @@ |
1328 | +=== modified file 'gwibber/microblog/plugins/facebook/gtk/facebook/__init__.py' |
1329 | +--- old/gwibber/microblog/plugins/facebook/gtk/facebook/__init__.py 2012-06-07 14:03:13 +0000 |
1330 | ++++ new/gwibber/microblog/plugins/facebook/gtk/facebook/__init__.py 2012-10-18 14:51:12 +0000 |
1331 | +@@ -105,7 +105,7 @@ |
1332 | + "redirect_uri": "http://www.facebook.com/connect/login_success.html", |
1333 | + }) |
1334 | + web.load_uri("https://graph.facebook.com/oauth/authorize?" + url) |
1335 | +- web.connect("title-changed", self.on_facebook_auth_title_change) |
1336 | ++ web.connect("onload-event", self.on_facebook_auth_title_change) |
1337 | + |
1338 | + self.scroll = Gtk.ScrolledWindow() |
1339 | + |
1340 | +@@ -126,7 +126,7 @@ |
1341 | + self.dialog.infobar_content_area.show() |
1342 | + |
1343 | + url = web.get_main_frame().get_uri() |
1344 | +- if title.get_title() == "Success": |
1345 | ++ if "/login_success" in url: |
1346 | + try: |
1347 | + self.account["access_token"] = str(urlparse.parse_qs(url.split("#", 1)[1])["access_token"][0]) |
1348 | + except: |
1349 | + |
1350 | |
1351 | === renamed file 'debian/patches/lp_1058672.patch' => 'debian/patches/lp_1058672.patch.moved' |
1352 | === modified file 'gwibber/microblog/network.py' |
1353 | --- gwibber/microblog/network.py 2012-06-27 15:42:00 +0000 |
1354 | +++ gwibber/microblog/network.py 2012-12-05 02:19:23 +0000 |
1355 | @@ -37,14 +37,8 @@ |
1356 | logger.error("HTTP Error for %s - error code: %s", e.geturl().split("?")[0], e.getcode()) |
1357 | self.res = "HTTP error: {0}".format(e.getcode()) |
1358 | except urllib2.URLError, e: |
1359 | - logger.error("Network failure: %s", e.message) |
1360 | - self.res = "Network error: {0}".format(e.message) |
1361 | - except IOError, e: |
1362 | - logger.error("Network failure: %s", e.message) |
1363 | - self.res = "Network error: {0}".format(e.message) |
1364 | - except: |
1365 | - logger.error("Network failure: UNKNOWN") |
1366 | - self.res = "Network error: UNKNOWN" |
1367 | + logger.error("Network failure: %s", e.reason) |
1368 | + self.res = "Network error: {0}".format(e.reason) |
1369 | |
1370 | def get_json(self): |
1371 | try: |
1372 | |
1373 | === modified file 'gwibber/microblog/plugins/foursquare/__init__.py' |
1374 | --- gwibber/microblog/plugins/foursquare/__init__.py 2012-06-27 15:42:00 +0000 |
1375 | +++ gwibber/microblog/plugins/foursquare/__init__.py 2012-12-05 02:19:23 +0000 |
1376 | @@ -9,7 +9,7 @@ |
1377 | |
1378 | PROTOCOL_INFO = { |
1379 | "name": "Foursquare", |
1380 | - "version": "5.0", |
1381 | + "version": "4.0", |
1382 | |
1383 | "config": [ |
1384 | "private:secret_token", |
1385 | @@ -102,7 +102,7 @@ |
1386 | m["sender"] = {} |
1387 | m["sender"]["id"] = data["user"]["id"] |
1388 | m["sender"]["image"] = data["user"]["photo"] |
1389 | - m["sender"]["url"] = "https://www.foursquare.com/user/" + data["user"]["id"] |
1390 | + m["sender"]["url"] = data["user"]["canonicalUrl"] |
1391 | if data["user"]["relationship"] == "self": |
1392 | m["sender"]["is_me"] = True |
1393 | else: |
1394 | @@ -148,7 +148,7 @@ |
1395 | "id" : comment["user"]["id"], |
1396 | "is_me": False, |
1397 | "image": comment["user"]["photo"], |
1398 | - "url" : "https://www.foursquare.com/user/" + comment["user"]["id"] |
1399 | + "url" : comment["user"]["canonicalUrl"] |
1400 | } |
1401 | # Create a comment |
1402 | m["comments"].append({ |