Merge lp:~mvo/unity-lens-applications/add-software-center-agent-db into lp:unity-lens-applications

Proposed by Michael Vogt
Status: Merged
Approved by: Michal Hruby
Approved revision: 255
Merged at revision: 267
Proposed branch: lp:~mvo/unity-lens-applications/add-software-center-agent-db
Merge into: lp:unity-lens-applications
Diff against target: 44 lines (+16/-2)
1 file modified
src/unity-package-search.cc (+16/-2)
To merge this branch: bzr merge lp:~mvo/unity-lens-applications/add-software-center-agent-db
Reviewer Review Type Date Requested Status
Michal Hruby (community) Approve
Mikkel Kamstrup Erlandsen (community) Needs Information
Review via email: mp+88556@code.launchpad.net

Description of the change

This should add the software-center-agent database to the searches. This will include purchase applications.

Please note that I was not able to test this as when I run it I get a:
$ src/unity-applications-daemon bzr diff
GLib-GIO-ERROR **: Settings schema 'com.canonical.Unity.ApplicationsLens' is not installed

Trace/breakpoint trap (core dumped)

(that is unreleated to my change)

To post a comment you must log in.
Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

wrt the schema error, then sorry :-) We're going through a gsettings schema transition and it is a bit bumpy...

Is there any design feedback on this? I mean; should for-pay apps be listed differently - in their own category or with a money-emblem overlay or something? Or are all apps made equal? ;-)

review: Needs Information
Revision history for this message
Michael Vogt (mvo) wrote :

On Mon, Jan 16, 2012 at 08:41:22AM -0000, Mikkel Kamstrup Erlandsen wrote:
> Review: Needs Information
>
> wrt the schema error, then sorry :-) We're going through a gsettings schema transition and it is a bit bumpy...

Sure, no worries. It was mostly meant as a applogy why I did not test
it :)

> Is there any design feedback on this? I mean; should for-pay apps be listed differently - in their own category or with a money-emblem overlay or something? Or are all apps made equal? ;-)

No feedback on this so far, but a really interessting question. What
process is needed for this in unity? Do I need to subscribe a group or
tag in some way?

Cheers,
 Michael

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

You can add a task for ayatana-design and open a unity task with state Incomplete. That'll trigger the design queue. Otherwise pinging John Lea on IRC if you want to fast path it.

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

No worries, I created the unity task and set the states myself. I don't know why I didn't just do that :-)

Revision history for this message
Michael Vogt (mvo) wrote :

On Mon, Jan 16, 2012 at 02:56:23PM -0000, Mikkel Kamstrup Erlandsen wrote:
> No worries, I created the unity task and set the states myself. I don't know why I didn't just do that :-)

Haha! Thanks a bunch! Still useful for me to know the process behind
it :)

Cheers,
 Michael

Revision history for this message
Mikkel Kamstrup Erlandsen (kamstrup) wrote :

I tried running the branch but I don't results for any of the examples from the bug report (world of goo, valleybrawl, or 7zip). Seems odd because there are no warnings or anything... Any ideas?

review: Needs Information
Revision history for this message
Omer Akram (om26er) wrote :

Hey mvo, any updates? ;-)

Revision history for this message
Michal Hruby (mhr3) wrote :

Updating the state - John said we're not going to use any emblems atm to distinguish the paid apps, Mikkel's issue can be fixed by setting `export SOFTWARE_CENTER_DISTRO_CODENAME='oneiric'` and then running the SC.

One issue I'm seeing is that we aren't getting proper icons for the paid apps, but we can tackle that in a separate branch.

Thanks for this! :)

review: Approve
Revision history for this message
Michael Vogt (mvo) wrote :

On Mon, Feb 20, 2012 at 11:11:39AM -0000, <email address hidden> wrote:
> The proposal to merge lp:~mvo/unity-lens-applications/add-software-center-agent-db into lp:unity-lens-applications has been updated.
>
> Status: Approved => Merged
>
> For more details, see:
> https://code.launchpad.net/~mvo/unity-lens-applications/add-software-center-agent-db/+merge/88556
> --
> https://code.launchpad.net/~mvo/unity-lens-applications/add-software-center-agent-db/+merge/88556
> You are the owner of lp:~mvo/unity-lens-applications/add-software-center-agent-db.

Thanks a bunch! And sorry that I did not reply earlier, I unavailalbe
for a couple of days.

Cheers,
 Michael

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/unity-package-search.cc'
2--- src/unity-package-search.cc 2011-09-27 12:22:51 +0000
3+++ src/unity-package-search.cc 2012-01-13 21:02:23 +0000
4@@ -30,6 +30,7 @@
5 #include <xapian.h>
6 #include <iostream>
7 #include <gmenu-tree.h>
8+#include <glib.h>
9 #include <unity.h>
10 #include <string.h>
11
12@@ -285,18 +286,31 @@
13 unity_package_searcher_new ()
14 {
15 UnityPackageSearcher *searcher;
16+ gchar *agent = NULL;
17
18 searcher = g_new0 (UnityPackageSearcher, 1);
19
20 // Xapian initialization
21 try {
22 searcher->db = new Xapian::Database (SOFTWARE_CENTER_INDEX);
23- init_searcher (searcher);
24 } catch(const Xapian::Error &error) {
25 cerr << "Error loading package indexes: " << error.get_msg() << endl;
26 return NULL;
27 }
28-
29+
30+ // add software-center-agent.db
31+ try {
32+ agent = g_strdup_printf("%s/software-center/software-center-agent.db",
33+ g_get_user_cache_dir());
34+ if (g_file_test(agent, G_FILE_TEST_IS_DIR))
35+ searcher->db->add_database (Xapian::Database (agent));
36+ g_free(agent);
37+ } catch(const Xapian::Error &error) {
38+ cerr << "Error loading agent indexes: " << error.get_msg() << endl;
39+ }
40+
41+ init_searcher (searcher);
42+
43 return searcher;
44 }
45

Subscribers

People subscribed via source and target branches