[gnome-chess] trivial: use C-style casts to retrieve GMenus



commit e7a4daf906528ce4feede6f8b04e51a8cf69fe7d
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Mon Jan 6 13:57:17 2014 -0600

    trivial: use C-style casts to retrieve GMenus
    
    * No point in using the as keyword if we're not going to test the result
      against null
    * Let's use GMenu instead of GMenuModel

 src/gnome-chess.vala |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/gnome-chess.vala b/src/gnome-chess.vala
index c8983ac..f1de564 100644
--- a/src/gnome-chess.vala
+++ b/src/gnome-chess.vala
@@ -119,10 +119,10 @@ public class Application : Gtk.Application
             error ("Error loading menu UI: %s", e.message);
         }
 
-        var app_menu = builder.get_object ("appmenu") as MenuModel;
+        var app_menu = (Menu) builder.get_object ("appmenu");
         set_app_menu (app_menu);
 
-        var window_menu = builder.get_object ("windowmenu") as MenuModel;
+        var window_menu = (Menu) builder.get_object ("windowmenu");
 
         try
         {


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