Merge lp:~donadigo/switchboard/fix-duplicated-plug-navigation into lp:~elementary-pantheon/switchboard/switchboard

Proposed by Adam Bieńkowski
Status: Merged
Approved by: Felipe Escoto
Approved revision: 638
Merged at revision: 638
Proposed branch: lp:~donadigo/switchboard/fix-duplicated-plug-navigation
Merge into: lp:~elementary-pantheon/switchboard/switchboard
Diff against target: 15 lines (+4/-1)
1 file modified
src/Switchboard.vala (+4/-1)
To merge this branch: bzr merge lp:~donadigo/switchboard/fix-duplicated-plug-navigation
Reviewer Review Type Date Requested Status
Felipe Escoto (community) Approve
Review via email: mp+297769@code.launchpad.net

Commit message

* Fix bug #1593738: "Duplicated plug navigation".

Description of the change

Fixes bug #1593738: "Duplicated plug navigation".

A simple check if the plug is not the same as last time will fix the navigation button glitch.

To post a comment you must log in.
Revision history for this message
Felipe Escoto (philip.scott) wrote :

This should simplify the code since an OR will stop if the first one is true :)

previous_plugs.size == 0 || previous_plugs.@get (0) != plug

review: Needs Fixing
Revision history for this message
Felipe Escoto (philip.scott) :
review: Abstain
Revision history for this message
RabbitBot (rabbitbot-a) wrote :

There are additional revisions which have not been approved in review. Please seek review and approval of these new revisions.

Revision history for this message
Felipe Escoto (philip.scott) wrote :

Woops, i think i presses Abstain instead of Approve

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/Switchboard.vala'
2--- src/Switchboard.vala 2016-06-15 15:10:18 +0000
3+++ src/Switchboard.vala 2016-06-18 18:58:00 +0000
4@@ -204,7 +204,10 @@
5 return false;
6 });
7
8- previous_plugs.add (plug);
9+ if (previous_plugs.size == 0 || previous_plugs.@get (0) != plug) {
10+ previous_plugs.add (plug);
11+ }
12+
13 // Launch plug's executable
14 navigation_button.set_sensitive (true);
15 navigation_button.set_text (all_settings_label);

Subscribers

People subscribed via source and target branches

to all changes: