Merge lp:~mitya57/indicator-session/lp1363630 into lp:indicator-session/14.10

Proposed by Dmitry Shachnev
Status: Merged
Approved by: Charles Kerr
Approved revision: 455
Merged at revision: 455
Proposed branch: lp:~mitya57/indicator-session/lp1363630
Merge into: lp:indicator-session/14.10
Diff against target: 18 lines (+1/-5)
1 file modified
src/backend-dbus/actions.c (+1/-5)
To merge this branch: bzr merge lp:~mitya57/indicator-session/lp1363630
Reviewer Review Type Date Requested Status
Charles Kerr (community) Approve
Ted Gould Pending
Indicator Applet Developers Pending
Review via email: mp+232813@code.launchpad.net

Commit message

Make Cancel button in Zenity backend work again

Description of the change

Currently the code in zenity_question() looks like:

if (!g_spawn_check_exit_status (exit_status, &error))
      confirmed = TRUE;
else
      confirmed = exit_status == 0;

However !g_spawn_check_exit_status() call is mostly equivalent to "exit_status != 0". Thus, confirmed will be *always* set to TRUE, even if the user cancelled the dialog.

This MP makes things work again.

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

LGTM. Thanks for the fix Dmitry!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/backend-dbus/actions.c'
2--- src/backend-dbus/actions.c 2014-06-18 20:34:50 +0000
3+++ src/backend-dbus/actions.c 2014-08-31 10:47:09 +0000
4@@ -705,13 +705,9 @@
5 {
6 confirmed = TRUE;
7 }
8- else if (!g_spawn_check_exit_status (exit_status, &error))
9- {
10- confirmed = TRUE;
11- }
12 else
13 {
14- confirmed = exit_status == 0;
15+ confirmed = g_spawn_check_exit_status (exit_status, &error);
16 }
17
18 log_and_clear_error (&error, G_STRLOC, G_STRFUNC);

Subscribers

People subscribed via source and target branches