Merge lp:~3v1n0/bamf/factory-local-views-removal into lp:bamf

Proposed by Marco Trevisan (Treviño)
Status: Merged
Approved by: Marco Trevisan (Treviño)
Approved revision: 571
Merged at revision: 560
Proposed branch: lp:~3v1n0/bamf/factory-local-views-removal
Merge into: lp:bamf
Diff against target: 51 lines (+2/-11)
1 file modified
lib/libbamf/bamf-factory.c (+2/-11)
To merge this branch: bzr merge lp:~3v1n0/bamf/factory-local-views-removal
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Andrea Azzarone (community) Approve
Review via email: mp+170884@code.launchpad.net

Commit message

BamfFactory: remove the local_views list, we don't need that anymore

Having them tracked on allocated_views list is enough, and fixes an issue as explained on bug #1193559

Description of the change

We need to check if we already have allocated a view with the requested .desktop file when calling BamfMatcher's get_application_for_desktop_file

To post a comment you must log in.
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Needs Fixing (continuous-integration)
Revision history for this message
Andrea Azzarone (azzar1) :
review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :

FAILED: Autolanding.
More details in the following jenkins job:
http://jenkins.qa.ubuntu.com/job/bamf-autolanding/37/
Executed test runs:
    SUCCESS: http://jenkins.qa.ubuntu.com/job/bamf-saucy-amd64-autolanding/29
    UNSTABLE: http://jenkins.qa.ubuntu.com/job/bamf-saucy-armhf-autolanding/28

review: Needs Fixing (continuous-integration)
Revision history for this message
PS Jenkins bot (ps-jenkins) wrote :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'lib/libbamf/bamf-factory.c'
2--- lib/libbamf/bamf-factory.c 2013-06-13 13:21:03 +0000
3+++ lib/libbamf/bamf-factory.c 2013-06-21 17:57:27 +0000
4@@ -48,7 +48,6 @@
5 struct _BamfFactoryPrivate
6 {
7 GHashTable *open_views;
8- GList *local_views;
9 GList *allocated_views;
10 };
11
12@@ -74,12 +73,6 @@
13 self->priv->allocated_views = NULL;
14 }
15
16- if (self->priv->local_views)
17- {
18- g_list_free (self->priv->local_views);
19- self->priv->local_views = NULL;
20- }
21-
22 if (self->priv->open_views)
23 {
24 g_hash_table_remove_all (self->priv->open_views);
25@@ -163,7 +156,6 @@
26 static void
27 on_view_weak_unref (BamfFactory *self, BamfView *view_was_here)
28 {
29- self->priv->local_views = g_list_remove (self->priv->local_views, view_was_here);
30 self->priv->allocated_views = g_list_remove (self->priv->allocated_views, view_was_here);
31 }
32
33@@ -199,8 +191,8 @@
34 BamfApplication *result = NULL, *app;
35 GList *l;
36
37- /* check if result is available in known local_views */
38- for (l = factory->priv->local_views; l; l = l->next)
39+ /* check if result is available in known allocated_views */
40+ for (l = factory->priv->allocated_views; l; l = l->next)
41 {
42 if (!BAMF_IS_APPLICATION (l->data))
43 continue;
44@@ -221,7 +213,6 @@
45
46 if (BAMF_IS_APPLICATION (result))
47 {
48- factory->priv->local_views = g_list_prepend (factory->priv->local_views, result);
49 bamf_factory_track_view (factory, BAMF_VIEW (result));
50 }
51 }

Subscribers

People subscribed via source and target branches