Only allow for one about dialog to be open at the same time
This commit is contained in:
parent
ea75f8b52b
commit
52edee5585
|
@ -41,6 +41,11 @@ namespace SparkleShare {
|
|||
|
||||
public SparkleAbout () : base ("")
|
||||
{
|
||||
DeleteEvent += delegate (object o, DeleteEventArgs args) {
|
||||
HideAll ();
|
||||
args.RetVal = true;
|
||||
};
|
||||
|
||||
DefaultSize = new Gdk.Size (600, 260);
|
||||
Resizable = false;
|
||||
BorderWidth = 0;
|
||||
|
|
|
@ -275,8 +275,13 @@ namespace SparkleShare {
|
|||
MenuItem about_item = new MenuItem (_("About SparkleShare"));
|
||||
|
||||
about_item.Activated += delegate {
|
||||
SparkleAbout about = new SparkleAbout ();
|
||||
about.ShowAll ();
|
||||
Application.Invoke (delegate {
|
||||
if (SparkleUI.About == null)
|
||||
SparkleUI.About = new SparkleAbout ();
|
||||
|
||||
SparkleUI.About.ShowAll ();
|
||||
SparkleUI.About.Present ();
|
||||
});
|
||||
};
|
||||
|
||||
Menu.Add (about_item);
|
||||
|
|
|
@ -35,6 +35,7 @@ namespace SparkleShare {
|
|||
public static SparkleStatusIcon StatusIcon;
|
||||
public static SparkleEventLog EventLog;
|
||||
public static SparkleSetup Setup;
|
||||
public static SparkleAbout About;
|
||||
|
||||
|
||||
// Short alias for the translations
|
||||
|
|
Loading…
Reference in a new issue