[gnome-games/sudoku-vala] Updated the about dialog



commit 379ec3b7ad4fd26644f99b0ab05d475566bfcdea
Author: Christopher Baines <cbaines8 gmail com>
Date:   Sat Jun 2 21:45:07 2012 +0100

    Updated the about dialog

 gnome-sudoku/src/gnome-sudoku.vala |   42 +++++++++++------------------------
 1 files changed, 13 insertions(+), 29 deletions(-)
---
diff --git a/gnome-sudoku/src/gnome-sudoku.vala b/gnome-sudoku/src/gnome-sudoku.vala
index 537c559..2657bb2 100644
--- a/gnome-sudoku/src/gnome-sudoku.vala
+++ b/gnome-sudoku/src/gnome-sudoku.vala
@@ -9,8 +9,6 @@ public class Sudoku : Gtk.Application
     private SudokuView view;
     private Gtk.CheckMenuItem fullscreen_menu;
 
-    private Gtk.AboutDialog? about_dialog = null;
-
     private const GLib.ActionEntry action_entries[] =
     {
         {"new-game", new_game_cb                                                                },
@@ -189,32 +187,18 @@ public class Sudoku : Gtk.Application
 
     public void about_cb ()
     {
-        if (about_dialog != null)
-        {
-            about_dialog.present ();
-            return;
-        }
-
-        about_dialog = new Gtk.AboutDialog ();
-        about_dialog.transient_for = window;
-        about_dialog.name = "gnome-sudoku";
-        about_dialog.version = Config.VERSION;
-        about_dialog.copyright = "Copyright 2010-2011 Robert Ancell <robert ancell gmail com>";
-        about_dialog.license_type = Gtk.License.GPL_2_0;
-        about_dialog.comments = _("GNOME Sudoku is a simple Sudoku generator and player. Sudoku is a Japanese logic puzzle.\n\nGNOME Sudoku is a part of GNOME Games.");
-        about_dialog.authors = authors;
-        about_dialog.artists = artists;
-        about_dialog.translator_credits = _("translator-credits");
-        about_dialog.website = "http://www.gnome.org/projects/gnome-games/";;
-        about_dialog.website_label = _("GNOME Games web site");
-        about_dialog.logo_icon_name = "gnome-sudoku";
-        about_dialog.response.connect (about_response_cb);
-        about_dialog.show ();
-    }
-
-    private void about_response_cb (int response_id)
-    {
-        about_dialog.destroy ();
-        about_dialog = null;
+        Gtk.show_about_dialog (window,
+                               "program-name", _("Sudoku"),
+                               "logo-icon-name", "gnome-sudoku",
+                               "version", Config.VERSION,
+                               "comments", _("GNOME Sudoku is a simple Sudoku generator and player. Sudoku is a Japanese logic puzzle.\n\nGNOME Sudoku is a part of GNOME Games."),
+                               "copyright", "Copyright 2010-2011 Robert Ancell <robert ancell gmail com>",
+                               "license-type", Gtk.License.GPL_2_0,
+                               "wrap-license", false,
+                               "authors", authors,
+                               "artists", artists,
+                               "translator-credits", _("translator-credits"),
+                               "website", "http://www.gnome.org/projects/gnome-games/";,
+                               "website-label", _("GNOME Games web site"));
     }
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]