[gitg] Some cleanup in the application



commit 18393122f832464c48c01bf58e3bb6dfba851ec7
Author: Ignacio Casal Quinteiro <icq gnome org>
Date:   Wed Feb 20 20:31:37 2013 +0100

    Some cleanup in the application

 gitg/gitg-application.vala |   22 +++++++++-------------
 1 files changed, 9 insertions(+), 13 deletions(-)
---
diff --git a/gitg/gitg-application.vala b/gitg/gitg-application.vala
index 66cc0df..3044103 100644
--- a/gitg/gitg-application.vala
+++ b/gitg/gitg-application.vala
@@ -265,29 +265,25 @@ public class Application : Gtk.Application
                {"preferences", on_preferences_activated}
        };
 
-       private void setup_menus()
+       protected override void startup()
        {
+               base.startup();
+
+               // Handle the state setting in the application
+               d_state_settings = new Settings("org.gnome.gitg.state.window");
+               d_state_settings.delay();
+
+               // App menu
                add_action_entries(app_entries, this);
 
                MenuModel? menu = Resource.load_object<MenuModel>("ui/gitg-menus.ui", "app-menu");
-
                if (menu != null)
                {
                        set_app_menu(menu);
                }
-       }
-
-       protected override void startup()
-       {
-               base.startup();
-
-               d_state_settings = new Settings("org.gnome.gitg.state.window");
-               d_state_settings.delay();
-
-               setup_menus();
 
+               // Use our own css provider
                Gtk.CssProvider? provider = Resource.load_css("style.css");
-
                if (provider != null)
                {
                        Gtk.StyleContext.add_provider_for_screen(Gdk.Screen.get_default(),


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