[gitg/vala] Implemented about menu
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg/vala] Implemented about menu
- Date: Tue, 17 Jul 2012 11:50:07 +0000 (UTC)
commit a46977f57268ba6538d8e8b6a450cb776cf67324
Author: Jesse van den Kieboom <jesse vandenkieboom epfl ch>
Date: Tue Jul 17 13:50:01 2012 +0200
Implemented about menu
gitg/gitg-application.vala | 31 ++++++++++++++++++++++++++++++-
vapi/config.vapi | 1 +
2 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/gitg/gitg-application.vala b/gitg/gitg-application.vala
index bbc075c..e47b1cf 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 <jessevdk gnome org>",
+ "Ignacio Casal Quinteiro <icq gnome org>"};
+
+ 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 cee9f22..fa2dd34 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]