Merge lp:~codygarver/indicator-power/fix-1291051 into lp:indicator-power/14.04

Proposed by Cody Garver
Status: Approved
Approved by: Ted Gould
Approved revision: 239
Proposed branch: lp:~codygarver/indicator-power/fix-1291051
Merge into: lp:indicator-power/14.04
Diff against target: 27 lines (+5/-1)
2 files modified
debian/control (+1/-1)
src/service.c (+4/-0)
To merge this branch: bzr merge lp:~codygarver/indicator-power/fix-1291051
Reviewer Review Type Date Requested Status
Sebastien Bacher Approve
Charles Kerr (community) Approve
Review via email: mp+211170@code.launchpad.net

Commit message

Add Switchboard as alternative recommend

To post a comment you must log in.
Revision history for this message
Charles Kerr (charlesk) wrote :

lgtm. Thanks Cody!

review: Approve
Revision history for this message
Sebastien Bacher (seb128) wrote :

the code change looks fine, you might want add "pantheon" as an alternative recommends as well though, to avoid pulling it another of the settings ui if yours is installed

Revision history for this message
Cody Garver (codygarver) wrote :

I have added switchboard-plug-power (the package that provides system-pantheon-power) as an alternative recommendation in the packaging

Revision history for this message
Sebastien Bacher (seb128) wrote :

> I have added switchboard-plug-power (the package that provides system-pantheon-power) as an alternative recommendation in the packaging

Thanks, but you added to the wrong line, it should be an alternative to the other control/settings binaries, not to the renderer

review: Needs Fixing
Revision history for this message
Sebastien Bacher (seb128) wrote :

changing to "work in progress", change it back to "needs review" once the needsfixing is resolved

Revision history for this message
Cody Garver (codygarver) wrote :
Revision history for this message
Lars Karlitski (larsu) wrote :

We just specified $XDG_CURRENT_DESKTOP at the freedesktop summit. It's set by all desktops that I'm aware of.

Do you mind using that environment variable or is there a reason for using $DESKTOP_SESSION instead?

Revision history for this message
Cody Garver (codygarver) wrote :

Let me talk it over with team members

Revision history for this message
Cody Garver (codygarver) wrote :

Now using XDG_CURRENT_DESKTOP. Does "pantheon" need to become "Pantheon" or is it fine as it is?

Revision history for this message
Sergey "Shnatsel" Davidoff (shnatsel) wrote :

It has to become "Pantheon".

Alternatively, you can perform a case-insensitive comparison using one of these functions:
https://developer.gnome.org/glib/2.40/glib-Unicode-Manipulation.html#g-utf8-casefold
https://developer.gnome.org/glib/2.40/glib-String-Utility-Functions.html#g-ascii-strncasecmp

239. By Cody Garver

Uppercase Pantheon

Revision history for this message
Cody Garver (codygarver) wrote :

Fixed, thanks Sergey

Revision history for this message
Sebastien Bacher (seb128) wrote :

looks fine now

review: Approve

Unmerged revisions

239. By Cody Garver

Uppercase Pantheon

238. By Cody Garver

Use XDG_CURRENT_DESKTOP instead

237. By Cody Garver

Correct packaging

236. By Cody Garver

Add switchboard-plug-power as an alternative recommendation in packaging

235. By Cody Garver

Add support for Switchboard when in Pantheon session to fix bug #1291051

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/control'
2--- debian/control 2014-02-18 19:20:57 +0000
3+++ debian/control 2014-04-09 09:28:54 +0000
4@@ -24,7 +24,7 @@
5 Depends: ${shlibs:Depends},
6 ${misc:Depends},
7 upower,
8-Recommends: unity-control-center | gnome-control-center (>= 3.1) | ubuntu-system-settings | xfce4-power-manager,
9+Recommends: unity-control-center | gnome-control-center (>= 3.1) | ubuntu-system-settings | switchboard-plug-power | xfce4-power-manager,
10 indicator-applet (>= 0.2) | indicator-renderer,
11 Description: Indicator showing power state.
12 This indicator displays current power management information and gives
13
14=== modified file 'src/service.c'
15--- src/service.c 2014-03-28 16:10:35 +0000
16+++ src/service.c 2014-04-09 09:28:54 +0000
17@@ -747,6 +747,10 @@
18 {
19 control_center_cmd = "xfce4-power-manager-settings";
20 }
21+ else if (!g_strcmp0 (g_getenv ("XDG_CURRENT_DESKTOP"), "Pantheon"))
22+ {
23+ control_center_cmd = "switchboard --open-plug system-pantheon-power";
24+ }
25 else
26 {
27 gchar *path;

Subscribers

People subscribed via source and target branches