commit f7f3abc2fdb11c7bb92b5546d95c0fd6feaa7c20
parent 79e048637f189a5dbb2f27534863817fbe08acb9
Author: Alexander Kojevnikov <alexander@kojevnikov.com>
Date: Fri, 7 May 2010 22:15:40 +1000
Add the about dialogue
Diffstat:
1 file changed, 35 insertions(+), 0 deletions(-)
diff --git a/src/spek-window.vala b/src/spek-window.vala
@@ -33,6 +33,18 @@ namespace Spek {
quit.clicked.connect (s => this.destroy());
toolbar.insert (quit, -1);
+ // This separator forces the rest of the items to the end of the toolbar.
+ var sep = new SeparatorToolItem ();
+ sep.set_expand (true);
+ sep.draw = false;
+ toolbar.insert (sep, -1);
+
+ var about = new ToolButton.from_stock (STOCK_ABOUT);
+ about.is_important = true;
+ about.add_accelerator ("clicked", group, keyval_from_name ("F1"), 0, AccelFlags.VISIBLE);
+ about.clicked.connect (on_about_clicked);
+ toolbar.insert (about, -1);
+
this.spectrogram = new Spectrogram ();
var vbox = new VBox (false, 0);
@@ -52,5 +64,28 @@ namespace Spek {
}
chooser.destroy ();
}
+
+ private void on_about_clicked () {
+ string[] authors = {
+ "Alexander Kojevnikov <alexander@kojevnikov.com>"
+ };
+
+ show_about_dialog (
+ this,
+ "program-name", "Spek",
+ "version", Config.PACKAGE_VERSION,
+ "copyright", _("Copyright © 2010 Alexander Kojevnikov"),
+ "comments", _("Spek - Audio Spectrum Viewer"),
+ "authors", authors,
+ // TODO
+// "documenters", documenters,
+// "artists", artists,
+// "website-label", _("Spek Website"),
+// "website", "http://TODO",
+// "license", "GPLv3+",
+ "wrap-license", true,
+ "logo-icon-name", "spek",
+ "translator-credits", _("translator-credits"));
+ }
}
}