mirror of
https://github.com/greenshot/greenshot
synced 2025-08-19 13:10:00 -07:00
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:
parent
250eec3d4d
commit
0a37ace76c
2 changed files with 5 additions and 4 deletions
|
@ -94,7 +94,7 @@ namespace Greenshot.Forms {
|
||||||
LOG.Debug("Data received, Command = " + dataTransport.Command + ", Data: " + dataTransport.CommandData);
|
LOG.Debug("Data received, Command = " + dataTransport.Command + ", Data: " + dataTransport.CommandData);
|
||||||
switch(dataTransport.Command) {
|
switch(dataTransport.Command) {
|
||||||
case CommandEnum.Exit:
|
case CommandEnum.Exit:
|
||||||
Application.Exit();
|
MainForm.instance.exit();
|
||||||
break;
|
break;
|
||||||
case CommandEnum.ReloadConfig:
|
case CommandEnum.ReloadConfig:
|
||||||
AppConfig.Reload();
|
AppConfig.Reload();
|
||||||
|
|
|
@ -137,6 +137,7 @@ namespace Greenshot {
|
||||||
// unregister application on uninstall (allow uninstall)
|
// unregister application on uninstall (allow uninstall)
|
||||||
if (argument.Equals("--uninstall") || argument.Equals("uninstall")) {
|
if (argument.Equals("--uninstall") || argument.Equals("uninstall")) {
|
||||||
try {
|
try {
|
||||||
|
LOG.Info("Sending all instances the exit command.");
|
||||||
// Pass Exit to running instance, if any
|
// Pass Exit to running instance, if any
|
||||||
dataTransport = new DataTransport(CommandEnum.Exit, args[0]);
|
dataTransport = new DataTransport(CommandEnum.Exit, args[0]);
|
||||||
SendData(dataTransport);
|
SendData(dataTransport);
|
||||||
|
@ -431,7 +432,6 @@ namespace Greenshot {
|
||||||
|
|
||||||
void Contextmenu_exitClick(object sender, EventArgs e) {
|
void Contextmenu_exitClick(object sender, EventArgs e) {
|
||||||
exit();
|
exit();
|
||||||
Application.Exit();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void InitializeQuickSettingsMenu() {
|
private void InitializeQuickSettingsMenu() {
|
||||||
|
@ -536,12 +536,12 @@ namespace Greenshot {
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Exit/cleanup
|
/// Exit/cleanup
|
||||||
/// </summary>
|
/// </summary>
|
||||||
private void exit() {
|
public void exit() {
|
||||||
// Inform all registed plugins
|
// Inform all registed plugins
|
||||||
PluginHelper.instance.Shutdown();
|
PluginHelper.instance.Shutdown();
|
||||||
|
|
||||||
// Make the Greenshot icon invisible
|
// Make the Greenshot icon invisible
|
||||||
notifyIcon.Visible = true;
|
notifyIcon.Visible = false;
|
||||||
|
|
||||||
conf.Store();
|
conf.Store();
|
||||||
HotkeyHelper.UnregisterHotkeys((int)this.Handle);
|
HotkeyHelper.UnregisterHotkeys((int)this.Handle);
|
||||||
|
@ -553,6 +553,7 @@ namespace Greenshot {
|
||||||
LOG.Error("Error releasing Mutex!", ex);
|
LOG.Error("Error releasing Mutex!", ex);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Application.Exit();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue