Ejemplo n.º 1
0
        void QuitEvent(object sender, EventArgs args)
        {
            if (autostarted)
            {
                HigMessageDialog dialog = new HigMessageDialog(win,
                                                               DialogFlags.Modal,
                                                               MessageType.Question,
                                                               ButtonsType.YesNo,
                                                               Catalog.GetString("Disable Searching"),
                                                               Catalog.GetString("You are about to close the search tray. The search tray is automatically started at login-time. Would you like to disable it for future sessions?"));

                Gtk.ResponseType response = (Gtk.ResponseType)dialog.Run();

                if (response == Gtk.ResponseType.Yes)
                {
                    Conf.Searching.Autostart = false;
                    Conf.Save(true);

                    // If the user doesn't want to have Best autostart, he probably doesn't
                    // want to keep the daemon around either. Bad call dude, bad call.

                    Process p = new Process();
                    p.StartInfo.UseShellExecute = false;
                    p.StartInfo.FileName        = "beagle-shutdown";

                    try {
                        p.Start();
                    } catch (Exception ex) {}
                }
            }
            win.StoreSettingsInConf(true);
            Application.Quit();
        }
Ejemplo n.º 2
0
        static void NoTrayWindowDeleteEvent(object o, Gtk.DeleteEventArgs args)
        {
            BestWindow win = (BestWindow)o;

            win.StoreSettingsInConf(false);
            Application.Quit();
        }