Skip to content

Commit

Permalink
Fix gtk bug
Browse files Browse the repository at this point in the history
  • Loading branch information
junian committed May 25, 2018
1 parent 9aaaa1f commit 0da5e45
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/Termission.EtoForms/Forms/MainForm.cs
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ private TrayIndicator CreateTrayIndicator()
{
var tray = new TrayIndicator
{
Image = DesktopAppResources.DevAppIcon,
Image = !Platform.IsGtk ? DesktopAppResources.DevAppIcon : DesktopAppResources.DevAppLogo,
Title = CoreApp.AssemblyProduct
};

Expand Down
5 changes: 4 additions & 1 deletion src/Termission.EtoForms/MainApplication.cs
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,10 @@ public void RegisterServices()
{
// Register all Services here
ServiceLocator.Current.Register<ICrossDialog, CrossDialog>();
ServiceLocator.Current.Register<INotificationService, NotificationService>();
if(Platform.Supports<Notification>())
ServiceLocator.Current.Register<INotificationService, NotificationService>();
else
ServiceLocator.Current.Register<INotificationService, CrossDialog>();
ServiceLocator.Current.Register<IJavaScriptBotEngine, JSJintScriptEngine>();
ServiceLocator.Current.Register<INetworkEngine, TermSharpEngine>();
ServiceLocator.Current.Register<ISystemService, EtoSystemService>();
Expand Down
7 changes: 6 additions & 1 deletion src/Termission.EtoForms/Services/CrossDialog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

namespace Juniansoft.Termission.EtoForms.Services
{
public class CrossDialog: ICrossDialog
public class CrossDialog: ICrossDialog, INotificationService
{
public Task<string> ShowOpenDialogAsync(string extension = "json", string typename = "JSON Files")
{
Expand Down Expand Up @@ -54,5 +54,10 @@ public async Task ShowMessageBoxAsync(string message)
{
await Task.Run(() => MessageBox.Show(message));
}

public void Show(string title, string message)
{
MessageBox.Show(message, title);
}
}
}
2 changes: 1 addition & 1 deletion src/Termission.Wpf/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

namespace Termission.Wpf
{
class MainClass
class Program
{
[STAThread]
public static void Main(string[] args)
Expand Down
2 changes: 1 addition & 1 deletion src/Termission.XamMac/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@

namespace Juniansoft.Termission.XamMac
{
static class MainClass
static class Program
{
static void Main(string[] args)
{
Expand Down

0 comments on commit 0da5e45

Please sign in to comment.