Merge lp:~muktupavels/gnome-control-center/fix-panel-loading into lp:~ubuntu-desktop/gnome-control-center/ubuntu

Proposed by Alberts Muktupāvels
Status: Merged
Merged at revision: 656
Proposed branch: lp:~muktupavels/gnome-control-center/fix-panel-loading
Merge into: lp:~ubuntu-desktop/gnome-control-center/ubuntu
Diff against target: 69 lines (+6/-18)
1 file modified
debian/patches/ubuntu_external_panels.patch (+6/-18)
To merge this branch: bzr merge lp:~muktupavels/gnome-control-center/fix-panel-loading
Reviewer Review Type Date Requested Status
Tim Lunn Approve
Dmitry Shachnev Approve
Iain Lane Pending
Review via email: mp+243232@code.launchpad.net

Commit message

Fix panel loading.

XDG_CURRENT_DESKTOP can contain multiple desktop names - GNOME-Flashback:Unity, GNOME-Classic:GNOME. Let gio take care of reading XDG_CURRENT_DESKTOP by pasing null as desktop_env.

Description of the change

Fix panel loading.

XDG_CURRENT_DESKTOP can contain multiple desktop names - GNOME-Flashback:Unity, GNOME-Classic:GNOME. Let gio take care of reading XDG_CURRENT_DESKTOP by pasing null as desktop_env.

To post a comment you must log in.
Revision history for this message
Dmitry Shachnev (mitya57) wrote :

Looks good to me.

Tim, if you are fine with this change, I will upload it.

review: Approve
654. By Alberts Muktupāvels

.

Revision history for this message
Tim Lunn (darkxst) wrote :

Looks fine to me.

Upstream didnt have support for XDG_CURRENT_DESKTOP when I originally wrote that patch.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/patches/ubuntu_external_panels.patch'
2--- debian/patches/ubuntu_external_panels.patch 2014-12-19 21:47:03 +0000
3+++ debian/patches/ubuntu_external_panels.patch 2015-01-09 22:14:18 +0000
4@@ -72,23 +72,11 @@
5 #ifndef CC_PANEL_LOADER_NO_GTYPES
6
7 /* Extension points */
8-@@ -149,6 +162,37 @@ parse_categories (GDesktopAppInfo *app)
9+@@ -149,6 +162,25 @@
10 return retval;
11 }
12
13 +static gboolean
14-+parse_show_in (GDesktopAppInfo *app)
15-+{
16-+ const char *env;
17-+ gboolean result;
18-+
19-+ env = g_getenv ("XDG_CURRENT_DESKTOP");
20-+ result = g_desktop_app_info_get_show_in (app, env);
21-+
22-+ return result;
23-+}
24-+
25-+static gboolean
26 +cc_panel_loader_add_item (CcShellModel *model, const char *name, GDesktopAppInfo *app )
27 +{
28 + int category;
29@@ -98,7 +86,7 @@
30 + if (G_UNLIKELY (category < 0))
31 + return FALSE;
32 +
33-+ show = parse_show_in (app);
34++ show = g_desktop_app_info_get_show_in (app, NULL);
35 + if (!show)
36 + return FALSE;
37 +
38@@ -110,7 +98,7 @@
39 void
40 cc_panel_loader_fill_model (CcShellModel *model)
41 {
42-@@ -159,6 +203,7 @@ cc_panel_loader_fill_model (CcShellModel
43+@@ -159,6 +191,7 @@
44 GDesktopAppInfo *app;
45 char *desktop_name;
46 int category;
47@@ -118,11 +106,11 @@
48
49 desktop_name = g_strconcat ("gnome-", all_panels[i].name,
50 "-panel.desktop", NULL);
51-@@ -176,11 +221,80 @@ cc_panel_loader_fill_model (CcShellModel
52+@@ -176,11 +209,80 @@
53 if (G_UNLIKELY (category < 0))
54 continue;
55
56-+ show = parse_show_in (app);
57++ show = g_desktop_app_info_get_show_in (app, NULL);
58 + if (!show)
59 + continue;
60 +
61@@ -199,7 +187,7 @@
62 #ifndef CC_PANEL_LOADER_NO_GTYPES
63
64 static GHashTable *panel_types;
65-@@ -208,7 +322,8 @@ cc_panel_loader_load_by_name (CcShell
66+@@ -208,7 +310,8 @@
67 ensure_panel_types ();
68
69 get_type = g_hash_table_lookup (panel_types, name);

Subscribers

People subscribed via source and target branches