fantasdic r337 - in trunk: . lib/fantasdic/ui



Author: mblondel
Date: Sun Aug 24 08:02:46 2008
New Revision: 337
URL: http://svn.gnome.org/viewvc/fantasdic?rev=337&view=rev

Log:
    * lib/fantasdic/ui/about_dialog.rb: Gtk::AboutDialog#name= is deprecated in
    favor of Gtk::AboutDialog#program_name= so try to use program_name= if
    available or name= if not.
    * lib/fantasdic/ui/add_dictionary_dialog.rb: Likewise.


Modified:
   trunk/ChangeLog
   trunk/lib/fantasdic/ui/about_dialog.rb
   trunk/lib/fantasdic/ui/add_dictionary_dialog.rb

Modified: trunk/lib/fantasdic/ui/about_dialog.rb
==============================================================================
--- trunk/lib/fantasdic/ui/about_dialog.rb	(original)
+++ trunk/lib/fantasdic/ui/about_dialog.rb	Sun Aug 24 08:02:46 2008
@@ -27,7 +27,11 @@
 
         def initialize(parent)
             super()
-            self.name = Fantasdic::TITLE
+            begin
+                self.program_name = Fantasdic::TITLE
+            rescue NoMethodError
+                self.name = Fantasdic::TITLE
+            end
             self.version = Fantasdic::VERSION
             self.copyright = Fantasdic::COPYRIGHT
             self.comments = Fantasdic::DESCRIPTION

Modified: trunk/lib/fantasdic/ui/add_dictionary_dialog.rb
==============================================================================
--- trunk/lib/fantasdic/ui/add_dictionary_dialog.rb	(original)
+++ trunk/lib/fantasdic/ui/add_dictionary_dialog.rb	Sun Aug 24 08:02:46 2008
@@ -242,7 +242,13 @@
 
         def show_about_dialog
             about = Gtk::AboutDialog.new
-            about.name = @src_class.title if @src_class.title
+            if @src_class.title
+                begin
+                    about.program_name = @src_class.title
+                rescue NoMethodError
+                    about.name = @src_class.title
+                end
+            end
             about.version = @src_class.version if @src_class.version
             about.copyright = @src_class.copyright if @src_class.copyright
             about.comments = @src_class.description if @src_class.description



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