Merge lp:~charlesk/indicator-power/fix-933466 into lp:indicator-power/1.0

Proposed by Charles Kerr
Status: Merged
Approved by: Ted Gould
Approved revision: 129
Merged at revision: 129
Proposed branch: lp:~charlesk/indicator-power/fix-933466
Merge into: lp:indicator-power/1.0
Diff against target: 54 lines (+15/-19)
1 file modified
src/indicator-power.c (+15/-19)
To merge this branch: bzr merge lp:~charlesk/indicator-power/fix-933466
Reviewer Review Type Date Requested Status
Ted Gould (community) Approve
Omer Akram (community) functional Approve
Review via email: mp+93497@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Charles Kerr (charlesk) wrote :

comments #9 and #10 in the ticket give a little background on this change.

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

fix works for me ;-)

review: Approve (functional)
Revision history for this message
Ted Gould (ted) wrote :

Looks good to me!

  review approve
  status approved

review: Approve
Revision history for this message
Charles Kerr (charlesk) wrote :

Ted, you're working late. :)

So this is my first Ubuntu FF. This isn't a feature ticket (obviously), but before I merge, I thought I'd ask -- do changes still just go into trunk at this stage, or are there other steps involved?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/indicator-power.c'
2--- src/indicator-power.c 2012-02-14 13:06:16 +0000
3+++ src/indicator-power.c 2012-02-16 21:53:20 +0000
4@@ -840,26 +840,22 @@
5 }
6
7 static void
8-receive_signal (GDBusProxy *proxy,
9- gchar *sender_name,
10- gchar *signal_name,
11- GVariant *parameters,
12- gpointer user_data)
13+receive_properties_changed (GDBusProxy *proxy G_GNUC_UNUSED,
14+ GVariant *changed_properties G_GNUC_UNUSED,
15+ GStrv invalidated_properties G_GNUC_UNUSED,
16+ gpointer user_data)
17 {
18 IndicatorPower *self = INDICATOR_POWER (user_data);
19
20- if (g_strcmp0 (signal_name, "Changed") == 0)
21- {
22- /* get the new state */
23- g_dbus_proxy_call (self->proxy,
24- "GetDevices",
25- NULL,
26- G_DBUS_CALL_FLAGS_NONE,
27- -1,
28- self->proxy_cancel,
29- get_devices_cb,
30- user_data);
31- }
32+ /* it's time to refresh our device list */
33+ g_dbus_proxy_call (self->proxy,
34+ "GetDevices",
35+ NULL,
36+ G_DBUS_CALL_FLAGS_NONE,
37+ -1,
38+ self->proxy_cancel,
39+ get_devices_cb,
40+ user_data);
41 }
42
43 static void
44@@ -884,8 +880,8 @@
45
46 /* we want to change the primary device changes */
47 g_signal_connect (self->proxy,
48- "g-signal",
49- G_CALLBACK (receive_signal),
50+ "g-properties-changed",
51+ G_CALLBACK (receive_properties_changed),
52 user_data);
53
54 /* get the initial state */

Subscribers

People subscribed via source and target branches