From a46977f57268ba6538d8e8b6a450cb776cf67324 Mon Sep 17 00:00:00 2001 From: Jesse van den Kieboom Date: Tue, 17 Jul 2012 13:50:01 +0200 Subject: [PATCH] Implemented about menu --- gitg/gitg-application.vala | 31 ++++++++++++++++++++++++++++++- vapi/config.vapi | 1 + 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/gitg/gitg-application.vala b/gitg/gitg-application.vala index bbc075c0..e47b1cfd 100644 --- a/gitg/gitg-application.vala +++ b/gitg/gitg-application.vala @@ -161,7 +161,36 @@ public class Application : Gtk.Application private void on_app_about_activated() { - + string[] authors = {"Jesse van den Kieboom ", + "Ignacio Casal Quinteiro "}; + + string copyright = "Copyright \xc2\xa9 2012 Jesse van den Kieboom"; + string comments = _("gitg is a git repository viewer for gtk+/GNOME"); + + Gdk.Pixbuf? logo = null; + + try + { + logo = new Gdk.Pixbuf.from_file(Dirs.build_data_file("icons", "gitg.svg")); + } + catch + { + try + { + logo = new Gdk.Pixbuf.from_file(Dirs.build_data_file("icons", "gitg128x128.png")); + } + catch {} + } + + Gtk.show_about_dialog(null, + "authors", authors, + "copyright", copyright, + "comments", comments, + "version", Config.VERSION, + "website", Config.PACKAGE_URL, + "website-label", _("gitg homepage"), + "logo", logo, + "license-type", Gtk.License.GPL_2_0); } private void on_app_quit_activated() diff --git a/vapi/config.vapi b/vapi/config.vapi index cee9f224..fa2dd340 100644 --- a/vapi/config.vapi +++ b/vapi/config.vapi @@ -4,6 +4,7 @@ namespace Gitg.Config public const string GETTEXT_PACKAGE; public const string PACKAGE_NAME; public const string PACKAGE_VERSION; + public const string PACKAGE_URL; public const string GITG_DATADIR; public const string GITG_LOCALEDIR; public const string GITG_LIBDIR;