[window] Add a title 'SparkleShare Setup' for the Window menu

This commit is contained in:
Hylke Bons 2011-02-13 19:18:45 +00:00
parent 73cff66c93
commit 5aa4d4df37
2 changed files with 11 additions and 8 deletions

View file

@ -43,8 +43,6 @@ namespace SparkleShare {
public SparkleWindow () : base () public SparkleWindow () : base ()
{ {
// Title = "SparkleShare Configuration";
SetFrame (new RectangleF (0, 0, 640, 380), true); SetFrame (new RectangleF (0, 0, 640, 380), true);
StyleMask = NSWindowStyle.Titled; StyleMask = NSWindowStyle.Titled;
@ -71,7 +69,8 @@ namespace SparkleShare {
Buttons = new List <NSButton> (); Buttons = new List <NSButton> ();
HeaderTextField = new NSTextField (new RectangleF (190, Frame.Height - 100, 318, 48)) { HeaderTextField = new NSTextField () {
Frame = new RectangleF (190, Frame.Height - 100, 318, 48),
BackgroundColor = NSColor.WindowBackground, BackgroundColor = NSColor.WindowBackground,
Bordered = false, Bordered = false,
Editable = false, Editable = false,
@ -79,7 +78,8 @@ namespace SparkleShare {
("Lucida Grande", NSFontTraitMask.Bold, 0, 15) ("Lucida Grande", NSFontTraitMask.Bold, 0, 15)
}; };
DescriptionTextField = new NSTextField (new RectangleF (190, Frame.Height - 155 , 640 - 240, 64)) { DescriptionTextField = new NSTextField () {
Frame = new RectangleF (190, Frame.Height - 155 , 640 - 240, 64),
BackgroundColor = NSColor.WindowBackground, BackgroundColor = NSColor.WindowBackground,
Bordered = false, Bordered = false,
Editable = false, Editable = false,
@ -90,6 +90,8 @@ namespace SparkleShare {
NSApplication.SharedApplication.ActivateIgnoringOtherApps (true); NSApplication.SharedApplication.ActivateIgnoringOtherApps (true);
MakeKeyAndOrderFront (this); MakeKeyAndOrderFront (this);
NSApplication.SharedApplication.AddWindowsItem (this, "SparkleShare Setup", false);
} }
@ -147,6 +149,7 @@ namespace SparkleShare {
{ {
OrderOut (this); OrderOut (this);
NSApplication.SharedApplication.RemoveWindowsItem (this);
return; return;
} }

View file

@ -840,7 +840,7 @@ namespace SparkleShare {
private void WriteUserInfo (string user_name, string user_email) private void WriteUserInfo (string user_name, string user_email)
{ {
string global_config_file_path = SparkleHelpers.CombineMore (SparklePaths.SparkleConfigPath, "config"); string global_config_file_path = Path.Combine (SparklePaths.SparkleConfigPath, "config");
// Write the user's information to a text file // Write the user's information to a text file
TextWriter writer = new StreamWriter (global_config_file_path); TextWriter writer = new StreamWriter (global_config_file_path);