//Run and destroy a standard confirmation dialog public static Gtk.ResponseType RunHigConfirmation(Gtk.Window parent, Gtk.DialogFlags flags, Gtk.MessageType type, string header, string msg, string ok_caption) { HigMessageDialog hmd = new HigMessageDialog(parent, flags, type, header, msg, ok_caption); try { return((Gtk.ResponseType)hmd.Run()); } finally { hmd.Destroy(); } }
//run and destroy a standard dialog public static Gtk.ResponseType RunHigMessageDialog(Gtk.Window parent, Gtk.DialogFlags flags, Gtk.MessageType type, Gtk.ButtonsType buttons, string header, string msg) { HigMessageDialog hmd = new HigMessageDialog(parent, flags, type, buttons, header, msg); try { return((Gtk.ResponseType)hmd.Run()); } finally { hmd.Destroy(); } }
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 (); }
private void Help (object obj, EventArgs args) { string address = "http://www.beagle-project.org/Getting_Started"; try { Gnome.Url.Show (address); } catch { HigMessageDialog md = new HigMessageDialog (search, Gtk.DialogFlags.DestroyWithParent, Gtk.MessageType.Error, Gtk.ButtonsType.Close, Catalog.GetString ("Couldn't launch web browser"), Catalog.GetString (String.Format ("Please point your web browser to '{0}' manually", address))); md.Run (); md.Destroy (); } }
//Run and destroy a standard confirmation dialog public static Gtk.ResponseType RunHigConfirmation(Gtk.Window parent, Gtk.DialogFlags flags, Gtk.MessageType type, string header, string msg, string ok_caption) { HigMessageDialog hmd = new HigMessageDialog(parent, flags, type, header, msg, ok_caption); try { return (Gtk.ResponseType)hmd.Run(); } finally { hmd.Destroy(); } }
//run and destroy a standard dialog public static Gtk.ResponseType RunHigMessageDialog(Gtk.Window parent, Gtk.DialogFlags flags, Gtk.MessageType type, Gtk.ButtonsType buttons, string header, string msg) { HigMessageDialog hmd = new HigMessageDialog(parent, flags, type, buttons, header, msg); try { return (Gtk.ResponseType)hmd.Run(); } finally { hmd.Destroy(); } }