Merge lp:~chipaca/ubuntu-push/fixes-to-app_helper into lp:ubuntu-push/automatic

Proposed by John Lenton
Status: Merged
Approved by: John Lenton
Approved revision: 216
Merged at revision: 217
Proposed branch: lp:~chipaca/ubuntu-push/fixes-to-app_helper
Merge into: lp:ubuntu-push/automatic
Diff against target: 45 lines (+18/-13)
1 file modified
bus/notifications/app_helper/app_helper_c.go (+18/-13)
To merge this branch: bzr merge lp:~chipaca/ubuntu-push/fixes-to-app_helper
Reviewer Review Type Date Requested Status
Samuele Pedroni Approve
Review via email: mp+225501@code.launchpad.net

This proposal supersedes a proposal from 2014-07-03.

Commit message

Fixes to app_helper

Description of the change

Fixes to app_helper

To post a comment you must log in.
Revision history for this message
Samuele Pedroni (pedronis) wrote :

looks good

review: Approve
Revision history for this message
Ubuntu One Auto Pilot (otto-pilot) wrote :
Download full text (10.9 KiB)

The attempt to merge lp:~chipaca/ubuntu-push/fixes-to-app_helper into lp:ubuntu-push/automatic failed. Below is the output from the failed tests.

scripts/deps.sh ubuntu-push-client.go
scripts/deps.sh server/dev/server.go
scripts/deps.sh server/acceptance/cmd/acceptanceclient.go
/mnt/tarmac/cache/ubuntu-push-automatic/go-ws/bin/godeps -t launchpad.net/ubuntu-push launchpad.net/ubuntu-push/bus launchpad.net/ubuntu-push/bus/connectivity launchpad.net/ubuntu-push/bus/networkmanager launchpad.net/ubuntu-push/bus/notifications launchpad.net/ubuntu-push/bus/notifications/app_helper launchpad.net/ubuntu-push/bus/systemimage launchpad.net/ubuntu-push/bus/testing launchpad.net/ubuntu-push/bus/urldispatcher launchpad.net/ubuntu-push/client launchpad.net/ubuntu-push/client/gethosts launchpad.net/ubuntu-push/client/service launchpad.net/ubuntu-push/client/session launchpad.net/ubuntu-push/client/session/seenstate launchpad.net/ubuntu-push/config launchpad.net/ubuntu-push/external/murmur3 launchpad.net/ubuntu-push/launch_helper launchpad.net/ubuntu-push/logger launchpad.net/ubuntu-push/messaging launchpad.net/ubuntu-push/messaging/cmessaging launchpad.net/ubuntu-push/messaging/reply launchpad.net/ubuntu-push/nih launchpad.net/ubuntu-push/nih/cnih launchpad.net/ubuntu-push/protocol launchpad.net/ubuntu-push/server launchpad.net/ubuntu-push/server/api launchpad.net/ubuntu-push/server/broker launchpad.net/ubuntu-push/server/broker/simple launchpad.net/ubuntu-push/server/broker/testing launchpad.net/ubuntu-push/server/broker/testsuite launchpad.net/ubuntu-push/server/dev launchpad.net/ubuntu-push/server/listener launchpad.net/ubuntu-push/server/session launchpad.net/ubuntu-push/server/store launchpad.net/ubuntu-push/testing launchpad.net/ubuntu-push/testing/condition launchpad.net/ubuntu-push/util launchpad.net/ubuntu-push/whoopsie launchpad.net/ubuntu-push/whoopsie/identifier launchpad.net/ubuntu-push/whoopsie/identifier/testing launchpad.net/ubuntu-push/server/acceptance/cmd/ launchpad.net/ubuntu-push/server/dev/ launchpad.net/ubuntu-push/ 2>/dev/null | cat > dependencies.tsv
rm -f -r /mnt/tarmac/cache/ubuntu-push-automatic/go-ws/pkg
mkdir -p /mnt/tarmac/cache/ubuntu-push-automatic/go-ws/bin
mkdir -p /mnt/tarmac/cache/ubuntu-push-automatic/go-ws/pkg
go get -u launchpad.net/godeps
go get -d -u launchpad.net/gocheck launchpad.net/go-dbus/v1 launchpad.net/go-xdg/v0 code.google.com/p/gosqlite/sqlite3 code.google.com/p/go-uuid/uuid
/mnt/tarmac/cache/ubuntu-push-automatic/go-ws/bin/godeps -u dependencies.tsv
go install launchpad.net/gocheck launchpad.net/go-dbus/v1 launchpad.net/go-xdg/v0 code.google.com/p/gosqlite/sqlite3 code.google.com/p/go-uuid/uuid
go test launchpad.net/ubuntu-push launchpad.net/ubuntu-push/bus launchpad.net/ubuntu-push/bus/connectivity launchpad.net/ubuntu-push/bus/networkmanager launchpad.net/ubuntu-push/bus/notifications launchpad.net/ubuntu-push/bus/notifications/app_helper launchpad.net/ubuntu-push/bus/systemimage launchpad.net/ubuntu-push/bus/testing launchpad.net/ubuntu-push/bus/urldispatcher launchpad.net/ubuntu-push/client launchpad.net/ubuntu-push/client/gethosts launchpad.net/ubuntu-push/client/service launchpad.net/ubuntu-push/c...

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'bus/notifications/app_helper/app_helper_c.go'
2--- bus/notifications/app_helper/app_helper_c.go 2014-06-26 17:03:34 +0000
3+++ bus/notifications/app_helper/app_helper_c.go 2014-07-03 15:06:04 +0000
4@@ -19,23 +19,28 @@
5
6 /*
7 #cgo pkg-config: gio-unix-2.0
8-#cgo pkg-config: gio-2.0
9-#include <stdlib.h>
10 #include <glib.h>
11 #include <gio/gdesktopappinfo.h>
12+
13+gchar* app_icon_filename_from_id (gchar* app_id) {
14+ gchar* filename = NULL;
15+ GAppInfo* app_info = (GAppInfo*)g_desktop_app_info_new (app_id);
16+ if (app_info != NULL) {
17+ GIcon* icon = g_app_info_get_icon (app_info);
18+ if (icon != NULL) {
19+ filename = g_icon_to_string (icon);
20+ // g_app_info_get_icon has "transfer none"
21+ }
22+ g_object_unref (app_info);
23+ }
24+ g_free (app_id);
25+ return filename;
26+}
27 */
28 import "C"
29-import "unsafe"
30
31 func AppIconFromId(appId string) string {
32- _id := C.CString(appId)
33- defer C.free(unsafe.Pointer(_id))
34- _app_info := C.g_desktop_app_info_new(_id)
35- defer C.g_app_info_delete(_app_info)
36- _app_icon := C.g_app_info_get_icon(_app_info)
37- defer C.g_object_unref((C.gpointer)(_app_icon))
38- _icon_string := C.g_icon_to_string(_app_icon)
39- defer C.free(unsafe.Pointer(_icon_string))
40- name := C.GoString((*C.char)(_icon_string))
41- return name
42+ name := C.app_icon_filename_from_id((*C.gchar)(C.CString(appId)))
43+ defer C.g_free((C.gpointer)(name))
44+ return C.GoString((*C.char)(name))
45 }

Subscribers

People subscribed via source and target branches