Merge lp://staging/~a-j-buxton/indicator-applet/fix-loaded-count into lp://staging/indicator-applet/13.10

Proposed by Alistair Buxton
Status: Merged
Approved by: Ted Gould
Approved revision: 419
Merged at revision: 419
Proposed branch: lp://staging/~a-j-buxton/indicator-applet/fix-loaded-count
Merge into: lp://staging/indicator-applet/13.10
Diff against target: 21 lines (+2/-2)
1 file modified
src/applet-main.c (+2/-2)
To merge this branch: bzr merge lp://staging/~a-j-buxton/indicator-applet/fix-loaded-count
Reviewer Review Type Date Requested Status
PS Jenkins bot (community) continuous-integration Approve
Iain Lane (community) Approve
Indicator Applet Developers Pending
Review via email: mp+183349@code.staging.launchpad.net

Commit message

Fix the loaded indicators count.

The addition of support for indicator-ng means that there are now two
ways to load indicators, but only those loaded by the second function
are counted. Fix this by making the worker functions add to the counter
variable instead of assigning to it.

Description of the change

This fixes a bug introduced with the new indicator-ng support. There are now two ways to load plugins, and when the second way is done, it overwrites the count of plugins loaded by the first way, as the worker functions use call-by-reference. This change fixes the bug by adding to the variable rather than assigning to it.

I can't test this patch at the moment as I'm not using gnome-panel. I found the bug while porting the indicator-ng support to xfce4-indicator-applet. However, it's a trivial patch...

To post a comment you must log in.
Revision history for this message
Iain Lane (laney) wrote :

Cheers. How can I see this bug and verify your fix?

Revision history for this message
Alistair Buxton (a-j-buxton) wrote :

A couple of ways:
You can uninstall all indicator-ng type indicators from your system and
then load the applet. You will see "No Indicators" instead of the old type
indicators. Removing every indicator except for indicator-appindicator
should do this.

Alternatively you can use a debugger or printf statements to show the value
of indicators_loaded immediately after call to
load_indicators_from_indicator_files(menubar, &indicators_loaded); - it
will equal the number of indicator-ng indicators loaded only, instead of
the total number of indicators loaded by both the previous functions.

On 5 September 2013 12:09, Iain Lane <email address hidden> wrote:

> Cheers. How can I see this bug and verify your fix?
> --
>
> https://code.launchpad.net/~a-j-buxton/indicator-applet/fix-loaded-count/+merge/183349
> You are the owner of lp:~a-j-buxton/indicator-applet/fix-loaded-count.
>

--
Alistair Buxton
<email address hidden>

Revision history for this message
Iain Lane (laney) wrote :

Ah OK, thanks. Seems good; approving. Sorry for my delay in getting back to you.

Please set a commit message on this MP.

review: Approve
Revision history for this message
PS Jenkins bot (ps-jenkins) :
review: Approve (continuous-integration)

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches