[gnome-games] Status bar removed.Content moved to toolbar.



commit b580e92e8fb0e7d54b75906665faa7a1a5db8d12
Author: Martin Gergov <martingergov1 gmail com>
Date:   Sun Dec 25 15:25:10 2011 +0200

    Status bar removed.Content moved to toolbar.

 mahjongg/src/mahjongg.vala |   25 ++++++++++++++-----------
 1 files changed, 14 insertions(+), 11 deletions(-)
---
diff --git a/mahjongg/src/mahjongg.vala b/mahjongg/src/mahjongg.vala
index ee04ad5..6038d6e 100644
--- a/mahjongg/src/mahjongg.vala
+++ b/mahjongg/src/mahjongg.vala
@@ -8,7 +8,7 @@ public class Mahjongg : Gtk.Application
 
     private Gtk.Window window;
     private GameView game_view;
-    private Gtk.Statusbar statusbar;
+    private Gtk.ToolItem status_item;
     private Gtk.UIManager ui_manager;
     private Gtk.Label tiles_label;
     private Gtk.Toolbar toolbar;
@@ -76,33 +76,36 @@ public class Mahjongg : Gtk.Application
         game_clock = new GnomeGamesSupport.Clock ();
         group_box.pack_start (game_clock, false, false, 0);
         status_box.pack_start (group_box, false, false, 0);
-
-        /* show the status bar items */
-        statusbar = new Gtk.Statusbar ();
+        
+        var vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
+        
         ui_manager = new Gtk.UIManager ();
 
-        GnomeGamesSupport.stock_prepare_for_statusbar_tooltips (ui_manager, statusbar);
-
         create_menus (ui_manager);
         window.add_accel_group (ui_manager.get_accel_group ());
         var box = ui_manager.get_widget ("/MainMenu");
 
         game_view = new GameView ();
         game_view.button_press_event.connect (view_button_press_event);        
-        game_view.set_size_request (320, 200);
+        game_view.set_size_request (600, 200);
 
         toolbar = (Gtk.Toolbar) ui_manager.get_widget ("/Toolbar");
         toolbar.get_style_context ().add_class (Gtk.STYLE_CLASS_PRIMARY_TOOLBAR);
+        
+        toolbar.insert(new Gtk.SeparatorToolItem(),-1);
 
-        var vbox = new Gtk.Box (Gtk.Orientation.VERTICAL, 0);
+        status_item = new Gtk.ToolItem ();
+        status_item.add (status_box);
+        status_item.set_visible_horizontal(true);
+        
+        toolbar.insert (status_item,-1);
+        
+        GnomeGamesSupport.stock_prepare_for_statusbar_tooltips (ui_manager, status_box);
 
         vbox.pack_start (box, false, false, 0);
         vbox.pack_start (toolbar, false, false, 0);
         vbox.pack_start (game_view, true, true, 0);
 
-        statusbar.pack_end (status_box, false, false, 6);
-        vbox.pack_end (statusbar, false, false, 0);
-
         window.add (vbox);
 
         settings.changed.connect (conf_value_changed_cb);



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