[gnome-games] sudoku: use new Gtk.AboutDialog license API



commit 5010a6a8cd76492bbeac650aa2089ab55e830892
Author: John Stowers <john stowers gmail com>
Date:   Tue May 24 13:19:09 2011 +1200

    sudoku: use new Gtk.AboutDialog license API

 gnome-sudoku/src/lib/defaults.py.in |   14 --------------
 gnome-sudoku/src/lib/main.py        |   27 +++++++++++++--------------
 2 files changed, 13 insertions(+), 28 deletions(-)
---
diff --git a/gnome-sudoku/src/lib/defaults.py.in b/gnome-sudoku/src/lib/defaults.py.in
index a236951..3e4de01 100644
--- a/gnome-sudoku/src/lib/defaults.py.in
+++ b/gnome-sudoku/src/lib/defaults.py.in
@@ -46,20 +46,6 @@ WEBSITE_LABEL = _('GNOME Games web site')
 AUTO_SAVE = True
 MIN_NEW_PUZZLES = 90
 
-# The GPL license string will be translated, and the game name inserted.
-# This license is the same as in libgames-support/games-stock.c 
-LICENSE = [_("%s is free software; you can redistribute it and/or modify " 
-       "it under the terms of the GNU General Public License as published by " 
-       "the Free Software Foundation; either version 2 of the License, or " 
-       "(at your option) any later version.").replace("%s", APPNAME),
-_("%s is distributed in the hope that it will be useful, "
-       "but WITHOUT ANY WARRANTY; without even the implied warranty of "
-       "MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the "
-       "GNU General Public License for more details.").replace("%s", APPNAME),
-_("You should have received a copy of the GNU General Public License "
-       "along with %s; if not, write to the Free Software Foundation, Inc., "
-       "51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA").replace("%s", APPNAME)]
-
 DATA_DIR = os.path.expanduser('~/.gnome2/gnome-sudoku/')
 
 def initialize_games_dir ():
diff --git a/gnome-sudoku/src/lib/main.py b/gnome-sudoku/src/lib/main.py
index 3cb0e98..73d2912 100644
--- a/gnome-sudoku/src/lib/main.py
+++ b/gnome-sudoku/src/lib/main.py
@@ -19,7 +19,7 @@ import sudoku_maker
 import timer
 import tracker_info
 from defaults import (APPNAME, APPNAME_SHORT, AUTHORS, COPYRIGHT, DESCRIPTION, DOMAIN, 
-        IMAGE_DIR, LICENSE, MIN_NEW_PUZZLES, UI_DIR, VERSION, WEBSITE, WEBSITE_LABEL)
+        IMAGE_DIR, MIN_NEW_PUZZLES, UI_DIR, VERSION, WEBSITE, WEBSITE_LABEL)
 from gtk_goodies import gconf_wrapper, Undo, dialog_extras
 from simple_debug import simple_debug, options
 
@@ -674,19 +674,18 @@ class UI (gconf_wrapper.GConfWrapper):
 
     @simple_debug
     def show_about (self, *args):
-        about = Gtk.AboutDialog()
-        about.set_transient_for(self.w)
-        about.set_name(APPNAME)
-        about.set_version(VERSION)
-        about.set_copyright(COPYRIGHT)
-        about.set_license(LICENSE[0] + '\n\n' + LICENSE[1] + '\n\n'  + LICENSE[2])
-        about.set_wrap_license(True)
-        about.set_comments(DESCRIPTION)
-        about.set_authors(AUTHORS)
-        about.set_website(WEBSITE)
-        about.set_website_label(WEBSITE_LABEL)
-        about.set_logo_icon_name("gnome-sudoku")
-        about.set_translator_credits(_("translator-credits"))
+        about = Gtk.AboutDialog(
+                    transient_for=self.w,
+                    program_name=APPNAME,
+                    version=VERSION,
+                    copyright=COPYRIGHT,
+                    license_type=Gtk.License.GPL_2_0,
+                    comments=DESCRIPTION,
+                    authors=AUTHORS,
+                    website=WEBSITE,
+                    website_label=WEBSITE_LABEL,
+                    logo_icon_name="gnome-sudoku",
+                    translator_credits=_("translator-credits"))
         about.connect("response", lambda d, r: d.destroy())
         about.show()
 



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