Esempio n. 1
0
        private void Init(string[] args)
        {
            Logger.Debug("Banter::Application::Init - called");
            initialized = false;
            Gtk.Application.Init();
            Catalog.Init("banter", Defines.GnomeLocaleDir);
            program =
                new Gnome.Program(
                    "banter",
                    Defines.Version,
                    Gnome.Modules.UI,
                    args);

            // Initialize the singleton classes to be used in the app
            PersonManager.Instance.Init();
            ChatWindowManager.Instance.Init();
            NotificationManager.Instance.Init();

            // Create and start up the Person Sync
            personSync = new PersonSync();
            personSync.Start();

            actionManager = new ActionManager();
            actionManager.LoadInterface();
            SetUpGlobalActions();

            // Initialize the Theme Manager
            // ThemeManager.Init ();

            application = this;

            groupWindows = new Dictionary <GroupWindow, GroupWindow> ();

            GLib.Idle.Add(InitializeIdle);
        }
Esempio n. 2
0
 public static Application GetApplicationWithArgs(string[] args)
 {
     lock (locker)
     {
         if (application == null)
         {
             lock (locker)
             {
                 application = new Application(args);
             }
         }
         return(application);
     }
 }
Esempio n. 3
0
        public static void Main(string[] args)
        {
            try
            {
                Utilities.SetProcessName("Banter");
                BusG.Init();
                application = GetApplicationWithArgs(args);
                Banter.Application.RegisterSessionManagerRestart(
                    Environment.GetEnvironmentVariable("RTC_PATH"),
                    args);

                application.StartMainLoop();
            }
            catch (Exception e)
            {
                //TODO log
                Console.WriteLine(e.Message);
                Exit(-1);
            }
        }