Fixed exit

git-svn-id: http://svn.code.sf.net/p/greenshot/code/trunk@735 7dccd23d-a4a3-4e1f-8c07-b4c1b4018ab4
This commit is contained in:
RKrom 2010-07-28 13:23:26 +00:00
commit 0a37ace76c
2 changed files with 5 additions and 4 deletions

View file

@ -137,6 +137,7 @@ namespace Greenshot {
// unregister application on uninstall (allow uninstall)
if (argument.Equals("--uninstall") || argument.Equals("uninstall")) {
try {
LOG.Info("Sending all instances the exit command.");
// Pass Exit to running instance, if any
dataTransport = new DataTransport(CommandEnum.Exit, args[0]);
SendData(dataTransport);
@ -431,7 +432,6 @@ namespace Greenshot {
void Contextmenu_exitClick(object sender, EventArgs e) {
exit();
Application.Exit();
}
private void InitializeQuickSettingsMenu() {
@ -536,12 +536,12 @@ namespace Greenshot {
/// <summary>
/// Exit/cleanup
/// </summary>
private void exit() {
public void exit() {
// Inform all registed plugins
PluginHelper.instance.Shutdown();
// Make the Greenshot icon invisible
notifyIcon.Visible = true;
notifyIcon.Visible = false;
conf.Store();
HotkeyHelper.UnregisterHotkeys((int)this.Handle);
@ -553,6 +553,7 @@ namespace Greenshot {
LOG.Error("Error releasing Mutex!", ex);
}
}
Application.Exit();
}
}
}