Bug 30449 - Mac status bar not displaying new StatusBarContexts
Summary: Mac status bar not displaying new StatusBarContexts
Status: IN_PROGRESS
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: Shell ()
Version: 5.9
Hardware: PC Mac OS
: --- normal
Target Milestone: master
Assignee: iain
URL:
Depends on:
Blocks:
 
Reported: 2015-05-26 11:15 UTC by Aaron Bockover [MSFT]
Modified: 2016-04-20 16:40 UTC (History)
3 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report for Bug 30449 on Developer Community or GitHub if you have new information to add and do not yet see a matching new report.

If the latest results still closely match this report, you can use the original description:

  • Export the original title and description: Developer Community HTML or GitHub Markdown
  • Copy the title and description into the new report. Adjust them to be up-to-date if needed.
  • Add your new information.

In special cases on GitHub you might also want the comments: GitHub Markdown with public comments

Related Links:
Status:
IN_PROGRESS

Description Aaron Bockover [MSFT] 2015-05-26 11:15:29 UTC
It seems that using IdeApp.Workbench.StatusBar.CreateContext does nothing at all.

Presumably this should be the correct API to use, so status messages act as a stack, but most of XS is actually using IdeApp.Workbench.StatusBar.ShowMessage/ShowReady, which can clobber other status messages from unrelated components. Because of this, there might be a regression with the new native Mac status bar.

Example:

class Component {
    StatusBarContext statusContext;

    public void StartSomething ()
    {
        statusContext = IdeApp.Workbench.StatusBar.CreateContext ();
        statusContext.ShowMessage (Stock.StatusConnecting,
            "Starting something...");
        // "Start something..." is now displayed in the status bar
        // as CreateContext should have been pushed to the status
        // bar "stack"
   }

    void SomethingCompleted ()
    {
        statusContext?.Dispose ();
        // "Start something..." will be removed from the status bar
        // "stack" and if there are not other contexts to display,
        // the status bar will go back to "ready"
    }
}

The following behaves as expected, provided there are no other status messages in flight, but I believe this to be incorrect (actually I think this API should be removed altogether):

class Component {
    StatusBarContext statusContext;

    public void StartSomething ()
    {
        IdeApp.Workbench.StatusBar.ShowMessage (
            Stock.StatusConnecting, "Starting something...");
   }

    void SomethingCompleted ()
    {
        IdeApp.Workbench.StatusBar.ShowReady ();
    }
}
Comment 2 iain 2015-11-30 17:34:03 UTC
For what it's worth, this doesn't appear to work in the Linux version either.
Comment 3 iain 2016-04-20 16:40:54 UTC
https://github.com/mono/monodevelop/pull/1172 fixes it, although it cannot be merged yet as it breaks API