public SparkleAbout() : base("") { DeleteEvent += delegate (object o, DeleteEventArgs args) { HideAll (); args.RetVal = true; }; DefaultSize = new Gdk.Size (600, 260); Resizable = false; BorderWidth = 0; IconName = "folder-sparkleshare"; WindowPosition = WindowPosition.Center; Title = _("About SparkleShare"); AppPaintable = true; string image_path = new string [] {SparkleUI.AssetsPath, "pixmaps", "about.png"}.Combine (); Realize (); Gdk.Pixbuf buf = new Gdk.Pixbuf (image_path); Gdk.Pixmap map, map2; buf.RenderPixmapAndMask (out map, out map2, 255); GdkWindow.SetBackPixmap (map, false); Controller = new SparkleAboutController (); Controller.NewVersionEvent += delegate (string new_version) { Application.Invoke (delegate { this.updates.Markup = String.Format ("<span font_size='small' fgcolor='#f57900'>{0}</span>", String.Format (_("A newer version ({0}) is available!"), new_version)); this.updates.ShowAll (); }); }; Controller.VersionUpToDateEvent += delegate { Application.Invoke (delegate { this.updates.Markup = String.Format ("<span font_size='small' fgcolor='#4e9a06'>{0}</span>", _("You are running the latest version.")); this.updates.ShowAll (); }); }; Controller.CheckingForNewVersionEvent += delegate { Application.Invoke (delegate { this.updates.Markup = String.Format ("<span font_size='small' fgcolor='#4e9a06'>{0}</span>", _("Checking for updates...")); this.updates.ShowAll (); }); }; this.CreateAbout (); }
public SparkleAbout() : base("") { DeleteEvent += delegate(object o, DeleteEventArgs args) { HideAll(); args.RetVal = true; }; DefaultSize = new Gdk.Size(600, 260); Resizable = false; BorderWidth = 0; IconName = "folder-sparkleshare"; WindowPosition = WindowPosition.Center; Title = _("About SparkleShare"); AppPaintable = true; string image_path = new string [] { SparkleUI.AssetsPath, "pixmaps", "about.png" }.Combine(); Realize(); Gdk.Pixbuf buf = new Gdk.Pixbuf(image_path); Gdk.Pixmap map, map2; buf.RenderPixmapAndMask(out map, out map2, 255); GdkWindow.SetBackPixmap(map, false); Controller = new SparkleAboutController(); Controller.NewVersionEvent += delegate(string new_version) { Application.Invoke(delegate { this.updates.Markup = String.Format("<span font_size='small' fgcolor='#f57900'>{0}</span>", String.Format(_("A newer version ({0}) is available!"), new_version)); this.updates.ShowAll(); }); }; Controller.VersionUpToDateEvent += delegate { Application.Invoke(delegate { this.updates.Markup = String.Format("<span font_size='small' fgcolor='#729fcf'>{0}</span>", _("You are running the latest version.")); this.updates.ShowAll(); }); }; Controller.CheckingForNewVersionEvent += delegate { Application.Invoke(delegate { this.updates.Markup = String.Format("<span font_size='small' fgcolor='#729fcf'>{0}</span>", _("Checking for updates...")); this.updates.ShowAll(); }); }; this.CreateAbout(); }