linux: fix build
This commit is contained in:
parent
8d0022c787
commit
88e5c57298
|
@ -136,7 +136,6 @@ namespace SparkleShare {
|
||||||
new PointF (this.report_problem_link.Frame.X + this.report_problem_link.Frame.Width + 10, 25),
|
new PointF (this.report_problem_link.Frame.X + this.report_problem_link.Frame.Width + 10, 25),
|
||||||
this.debug_log_link.Frame.Size);
|
this.debug_log_link.Frame.Size);
|
||||||
|
|
||||||
|
|
||||||
ContentView.AddSubview (this.about_image_view);
|
ContentView.AddSubview (this.about_image_view);
|
||||||
ContentView.AddSubview (this.version_text_field);
|
ContentView.AddSubview (this.version_text_field);
|
||||||
ContentView.AddSubview (this.updates_text_field);
|
ContentView.AddSubview (this.updates_text_field);
|
||||||
|
@ -169,58 +168,58 @@ namespace SparkleShare {
|
||||||
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public class SparkleAboutDelegate : NSWindowDelegate {
|
private class SparkleAboutDelegate : NSWindowDelegate {
|
||||||
|
|
||||||
|
public override bool WindowShouldClose (NSObject sender)
|
||||||
|
{
|
||||||
|
(sender as SparkleAbout).Controller.WindowClosed ();
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
public override bool WindowShouldClose (NSObject sender)
|
|
||||||
{
|
private class SparkleLink : NSTextField {
|
||||||
(sender as SparkleAbout).Controller.WindowClosed ();
|
|
||||||
return false;
|
private NSUrl url;
|
||||||
}
|
|
||||||
}
|
|
||||||
|
public SparkleLink (string text, string address) : base ()
|
||||||
|
{
|
||||||
public class SparkleLink : NSTextField {
|
this.url = new NSUrl (address);
|
||||||
|
|
||||||
private NSUrl url;
|
AllowsEditingTextAttributes = true;
|
||||||
|
BackgroundColor = NSColor.White;
|
||||||
|
Bordered = false;
|
||||||
public SparkleLink (string text, string address) : base ()
|
DrawsBackground = false;
|
||||||
{
|
Editable = false;
|
||||||
this.url = new NSUrl (address);
|
Selectable = false;
|
||||||
|
|
||||||
AllowsEditingTextAttributes = true;
|
NSData name_data = NSData.FromString ("<a href='" + this.url +
|
||||||
BackgroundColor = NSColor.White;
|
"' style='font-size: 8pt; font-family: \"Lucida Grande\"; color: #739ECF'>" + text + "</a></font>");
|
||||||
Bordered = false;
|
|
||||||
DrawsBackground = false;
|
NSDictionary name_dictionary = new NSDictionary();
|
||||||
Editable = false;
|
NSAttributedString name_attributes = new NSAttributedString (name_data, new NSUrl ("file://"), out name_dictionary);
|
||||||
Selectable = false;
|
|
||||||
|
NSMutableAttributedString s = new NSMutableAttributedString ();
|
||||||
NSData name_data = NSData.FromString ("<a href='" + this.url +
|
s.Append (name_attributes);
|
||||||
"' style='font-size: 8pt; font-family: \"Lucida Grande\"; color: #739ECF'>" + text + "</a></font>");
|
|
||||||
|
Cell.AttributedStringValue = s;
|
||||||
NSDictionary name_dictionary = new NSDictionary();
|
SizeToFit ();
|
||||||
NSAttributedString name_attributes = new NSAttributedString (name_data, new NSUrl ("file://"), out name_dictionary);
|
}
|
||||||
|
|
||||||
NSMutableAttributedString s = new NSMutableAttributedString ();
|
|
||||||
s.Append (name_attributes);
|
public override void MouseUp (NSEvent e)
|
||||||
|
{
|
||||||
Cell.AttributedStringValue = s;
|
Program.Controller.OpenWebsite (this.url.ToString ());
|
||||||
SizeToFit ();
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
public override void ResetCursorRects ()
|
||||||
public override void MouseUp (NSEvent e)
|
{
|
||||||
{
|
AddCursorRect (Bounds, NSCursor.PointingHandCursor);
|
||||||
Program.Controller.OpenWebsite (this.url.ToString ());
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
public override void ResetCursorRects ()
|
|
||||||
{
|
|
||||||
AddCursorRect (Bounds, NSCursor.PointingHandCursor);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -179,11 +179,11 @@ namespace SparkleShare {
|
||||||
|
|
||||||
|
|
||||||
if (Controller.RecentEventsItemEnabled)
|
if (Controller.RecentEventsItemEnabled)
|
||||||
this.recent_events_item.Activated += Controller.RecentEventsClicked;
|
this.recent_events_item.Activated += delegate { Controller.RecentEventsClicked (); };
|
||||||
|
|
||||||
this.add_item.Activated += Controller.AddHostedProjectClicked;
|
this.add_item.Activated += delegate { Controller.AddHostedProjectClicked (); };
|
||||||
this.about_item.Activated += Controller.AboutClicked;
|
this.about_item.Activated += delegate { Controller.AboutClicked (); };
|
||||||
this.quit_item.Activated += Controller.QuitClicked;
|
this.quit_item.Activated += delegate { Controller.QuitClicked (); };
|
||||||
|
|
||||||
|
|
||||||
this.menu.AddItem (this.state_item);
|
this.menu.AddItem (this.state_item);
|
||||||
|
|
|
@ -73,6 +73,7 @@ namespace SparkleShare {
|
||||||
UpdateLabelEvent ("You are running the latest version.");
|
UpdateLabelEvent ("You are running the latest version.");
|
||||||
|
|
||||||
} catch {
|
} catch {
|
||||||
|
UpdateLabelEvent ("Version check failed.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue