diff options
author | iain holmes <iain@xamarin.com> | 2017-01-27 15:35:48 +0300 |
---|---|---|
committer | iain holmes <iain@xamarin.com> | 2017-01-27 15:35:48 +0300 |
commit | 576ac331b8b0a78f5988f4f2d363878df54d57ae (patch) | |
tree | 11cd80ed8bd9d93ccfd928c4146e29cd80b19a1f /main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage | |
parent | 6db0ef613e51569cfbd8abadee6c91af824437ce (diff) | |
parent | b65a34ba71c8f1c6ac2512b3a04e0c320f7c5a54 (diff) |
Merge remote-tracking branch 'upstream/master' into a11y
Diffstat (limited to 'main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage')
3 files changed, 7 insertions, 2 deletions
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageFeedItem.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageFeedItem.cs index a2b58cf648..764d0fb886 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageFeedItem.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageFeedItem.cs @@ -224,7 +224,7 @@ namespace MonoDevelop.Ide.WelcomePage subtitle = GettextCatalog.GetString ("Yesterday");
}
else if (days < 7) {
- subtitle = GettextCatalog.GetString ("{0} days ago", days);
+ subtitle = GettextCatalog.GetPluralString ("{0} day ago", "{0} days ago", days, days);
}
else if (weeks < 4) {
subtitle = GettextCatalog.GetPluralString ("{0} week ago", "{0} weeks ago", weeks, weeks);
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageRecentProjectsList.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageRecentProjectsList.cs index d7e6255a1a..8edbeaa3b3 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageRecentProjectsList.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageRecentProjectsList.cs @@ -183,7 +183,7 @@ namespace MonoDevelop.Ide.WelcomePage TimeSpan sincelast = DateTime.UtcNow - prjtime;
if (sincelast.Days >= 1)
- return GettextCatalog.GetPluralString ("Last opened {0} days ago", "Last opened {0} days ago", sincelast.Days, sincelast.Days);
+ return GettextCatalog.GetPluralString ("Last opened {0} day ago", "Last opened {0} days ago", sincelast.Days, sincelast.Days);
if (sincelast.Hours >= 1)
return GettextCatalog.GetPluralString ("Last opened {0} hour ago", "Last opened {0} hours ago", sincelast.Hours, sincelast.Hours);
if (sincelast.Minutes > 0)
diff --git a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageService.cs b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageService.cs index 01226e434d..461543d522 100644 --- a/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageService.cs +++ b/main/src/core/MonoDevelop.Ide/MonoDevelop.Ide.WelcomePage/WelcomePageService.cs @@ -35,6 +35,9 @@ namespace MonoDevelop.Ide.WelcomePage static bool visible; static WelcomePageFrame welcomePage; + public static event EventHandler WelcomePageShown; + public static event EventHandler WelcomePageHidden; + public static void Initialize () { IdeApp.Workspace.FirstWorkspaceItemOpened += delegate { @@ -64,6 +67,7 @@ namespace MonoDevelop.Ide.WelcomePage var provider = AddinManager.GetExtensionObjects<IWelcomePageProvider> ().FirstOrDefault (); welcomePage = new WelcomePageFrame (provider != null ? provider.CreateWidget () : new DefaultWelcomePage ()); } + WelcomePageShown?.Invoke (welcomePage, EventArgs.Empty); welcomePage.UpdateProjectBar (); ((DefaultWorkbench)IdeApp.Workbench.RootWindow).BottomBar.Visible = false; ((DefaultWorkbench)IdeApp.Workbench.RootWindow).DockFrame.AddOverlayWidget (welcomePage, animate); @@ -78,6 +82,7 @@ namespace MonoDevelop.Ide.WelcomePage ((DefaultWorkbench)IdeApp.Workbench.RootWindow).BottomBar.Show (); ((DefaultWorkbench)IdeApp.Workbench.RootWindow).DockFrame.RemoveOverlayWidget (animate); } + WelcomePageHidden?.Invoke (welcomePage, EventArgs.Empty); } } } |