delete pid when quiting from gui
This commit is contained in:
parent
71cb1d9182
commit
56e510f70c
|
@ -1,4 +1,4 @@
|
||||||
// SparklePony 0.0.3
|
// SparklePony 0.0.4
|
||||||
|
|
||||||
// SparklePony, an instant update workflow to Git.
|
// SparklePony, an instant update workflow to Git.
|
||||||
// Copyright (C) 2010 Hylke Bons <hylkebons@gmail.com>
|
// Copyright (C) 2010 Hylke Bons <hylkebons@gmail.com>
|
||||||
|
@ -436,15 +436,14 @@ public class SparklePonyWindow : Window {
|
||||||
|
|
||||||
string Output = Process.StandardOutput.ReadToEnd().Trim ();
|
string Output = Process.StandardOutput.ReadToEnd().Trim ();
|
||||||
|
|
||||||
ListStore LogStore = new ListStore (typeof (string), typeof (string), typeof (string));
|
ListStore LogStore = new ListStore (typeof (string), typeof (string));
|
||||||
|
|
||||||
foreach (string Message in Regex.Split (Output, "\n"))
|
foreach (string Message in Regex.Split (Output, "\n"))
|
||||||
LogStore.AppendValues ("", "Deal", "2 hours ago");
|
LogStore.AppendValues ("", "2 hours ago");
|
||||||
|
|
||||||
TreeView LogView = new TreeView (LogStore);
|
TreeView LogView = new TreeView (LogStore);
|
||||||
LogView.AppendColumn ("What?", new Gtk.CellRendererText (), "text", 0);
|
LogView.AppendColumn ("", new Gtk.CellRendererText (), "text", 0);
|
||||||
LogView.AppendColumn ("Where?", new Gtk.CellRendererText (), "text", 1);
|
LogView.AppendColumn ("", new Gtk.CellRendererText (), "text", 1);
|
||||||
LogView.AppendColumn ("When?", new Gtk.CellRendererText (), "text", 2);
|
|
||||||
|
|
||||||
ScrolledWindow ScrolledWindow = new ScrolledWindow ();
|
ScrolledWindow ScrolledWindow = new ScrolledWindow ();
|
||||||
ScrolledWindow.AddWithViewport (LogView);
|
ScrolledWindow.AddWithViewport (LogView);
|
||||||
|
@ -525,6 +524,7 @@ public class SparklePonyWindow : Window {
|
||||||
// General options: [X] Run at startup. [X]
|
// General options: [X] Run at startup. [X]
|
||||||
|
|
||||||
public void Quit (object o, EventArgs args) {
|
public void Quit (object o, EventArgs args) {
|
||||||
|
File.Delete ("/tmp/sparklepony/sparklepony.pid");
|
||||||
Application.Quit ();
|
Application.Quit ();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ if [[ "$1" == "stop" ]]; then
|
||||||
echo -n "Stopping SparklePony..."
|
echo -n "Stopping SparklePony..."
|
||||||
kill `cat /tmp/sparklepony/sparklepony.pid`
|
kill `cat /tmp/sparklepony/sparklepony.pid`
|
||||||
rm -f /tmp/sparklepony/sparklepony.pid
|
rm -f /tmp/sparklepony/sparklepony.pid
|
||||||
echo " Done."
|
echo "Done."
|
||||||
else
|
else
|
||||||
echo "SparklePony isn't running."
|
echo "SparklePony isn't running."
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in a new issue