Skip to content
Closed
12 changes: 6 additions & 6 deletions Plugins/Flow.Launcher.Plugin.Calculator/Main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static Main()
{
MagesEngine = new Engine();
}

public void Init(PluginInitContext context)
{
Context = context;
Expand Down Expand Up @@ -78,16 +78,16 @@ public List<Result> Query(Query query)
{
try
{
Clipboard.SetText(newResult);
Clipboard.SetDataObject(newResult);
return true;
}
catch (ExternalException)
catch (ExternalException e)
{
MessageBox.Show("Copy failed, please try later");
return false;
}
}
}
}
};
}
}
Expand All @@ -111,7 +111,7 @@ private bool CanCalculate(Query query)
{
return false;
}

if (!IsBracketComplete(query.Search))
{
return false;
Expand Down Expand Up @@ -164,7 +164,7 @@ private bool IsBracketComplete(string query)

return leftBracketCount == 0;
}

public string GetTranslatedPluginTitle()
{
return Context.API.GetTranslation("flowlauncher_plugin_caculator_plugin_name");
Expand Down