rename SparkleShare.SparkleShare to SparkleShare.Program

naming a class the same as the namespace causes problems
http://blogs.msdn.com/b/ericlippert/archive/2010/03/09/do-not-name-a-class-the-same-as-its-namespace-part-one.aspx
This commit is contained in:
wimh 2011-09-03 22:23:45 +02:00
parent 79e96b3bf0
commit f78d1c5394
16 changed files with 72 additions and 72 deletions

View file

@ -212,7 +212,7 @@ namespace SparkleShare {
string note = match.Groups [3].Value; string note = match.Groups [3].Value;
Thread thread = new Thread (new ThreadStart (delegate { Thread thread = new Thread (new ThreadStart (delegate {
SparkleShare.Controller.AddNoteToFolder (folder_name, revision, note); Program.Controller.AddNoteToFolder (folder_name, revision, note);
})); }));
thread.Start (); thread.Start ();

View file

@ -75,8 +75,8 @@ namespace SparkleShare {
UserInfoForm.Cells [0].LineBreakMode = NSLineBreakMode.TruncatingTail; UserInfoForm.Cells [0].LineBreakMode = NSLineBreakMode.TruncatingTail;
UserInfoForm.Cells [1].LineBreakMode = NSLineBreakMode.TruncatingTail; UserInfoForm.Cells [1].LineBreakMode = NSLineBreakMode.TruncatingTail;
UserInfoForm.Cells [0].StringValue = SparkleShare.Controller.UserName; UserInfoForm.Cells [0].StringValue = Program.Controller.UserName;
UserInfoForm.Cells [1].StringValue = SparkleShare.Controller.UserEmail; UserInfoForm.Cells [1].StringValue = Program.Controller.UserEmail;
// TODO: Ugly hack, do properly with events // TODO: Ugly hack, do properly with events
timer = new Timer () { timer = new Timer () {
@ -102,7 +102,7 @@ namespace SparkleShare {
InvokeOnMainThread (delegate { InvokeOnMainThread (delegate {
bool name_is_valid = !UserInfoForm.Cells [0].StringValue.Trim ().Equals (""); bool name_is_valid = !UserInfoForm.Cells [0].StringValue.Trim ().Equals ("");
bool email_is_valid = SparkleShare.Controller.IsValidEmail ( bool email_is_valid = Program.Controller.IsValidEmail (
UserInfoForm.Cells [1].StringValue.Trim ()); UserInfoForm.Cells [1].StringValue.Trim ());
ContinueButton.Enabled = (name_is_valid && email_is_valid); ContinueButton.Enabled = (name_is_valid && email_is_valid);
@ -370,7 +370,7 @@ namespace SparkleShare {
}; };
OpenFolderButton.Activated += delegate { OpenFolderButton.Activated += delegate {
SparkleShare.Controller.OpenSparkleShareFolder (Controller.SyncingFolder); Program.Controller.OpenSparkleShareFolder (Controller.SyncingFolder);
}; };
Buttons.Add (FinishButton); Buttons.Add (FinishButton);

View file

@ -80,8 +80,8 @@
<Compile Include="SparkleMacController.cs" /> <Compile Include="SparkleMacController.cs" />
<Compile Include="SparkleStatusIcon.cs" /> <Compile Include="SparkleStatusIcon.cs" />
<Compile Include="SparkleUI.cs" /> <Compile Include="SparkleUI.cs" />
<Compile Include="..\SparkleShare.cs"> <Compile Include="..\Program.cs">
<Link>SparkleShare.cs</Link> <Link>Program.cs</Link>
</Compile> </Compile>
<Compile Include="SparkleAbout.cs" /> <Compile Include="SparkleAbout.cs" />
<Compile Include="SparkleAlert.cs" /> <Compile Include="SparkleAlert.cs" />

View file

@ -142,7 +142,7 @@ namespace SparkleShare {
}; };
FolderMenuItem.Activated += delegate { FolderMenuItem.Activated += delegate {
SparkleShare.Controller.OpenSparkleShareFolder (); Program.Controller.OpenSparkleShareFolder ();
}; };
FolderMenuItem.Image = NSImage.ImageNamed ("sparkleshare-mac"); FolderMenuItem.Image = NSImage.ImageNamed ("sparkleshare-mac");
@ -150,18 +150,18 @@ namespace SparkleShare {
Menu.AddItem (FolderMenuItem); Menu.AddItem (FolderMenuItem);
FolderMenuItems = new NSMenuItem [SparkleShare.Controller.Folders.Count]; FolderMenuItems = new NSMenuItem [Program.Controller.Folders.Count];
if (Controller.Folders.Length > 0) { if (Controller.Folders.Length > 0) {
Tasks = new EventHandler [SparkleShare.Controller.Folders.Count]; Tasks = new EventHandler [Program.Controller.Folders.Count];
int i = 0; int i = 0;
foreach (string folder_name in SparkleShare.Controller.Folders) { foreach (string folder_name in Program.Controller.Folders) {
NSMenuItem item = new NSMenuItem (); NSMenuItem item = new NSMenuItem ();
item.Title = folder_name; item.Title = folder_name;
if (SparkleShare.Controller.UnsyncedFolders.Contains (folder_name)) if (Program.Controller.UnsyncedFolders.Contains (folder_name))
item.Image = NSImage.ImageNamed ("NSCaution"); item.Image = NSImage.ImageNamed ("NSCaution");
else else
item.Image = NSImage.ImageNamed ("NSFolder"); item.Image = NSImage.ImageNamed ("NSFolder");
@ -192,7 +192,7 @@ namespace SparkleShare {
Title = "Add Remote Folder…" Title = "Add Remote Folder…"
}; };
if (!SparkleShare.Controller.FirstRun) { if (!Program.Controller.FirstRun) {
SyncMenuItem.Activated += delegate { SyncMenuItem.Activated += delegate {
InvokeOnMainThread (delegate { InvokeOnMainThread (delegate {
NSApplication.SharedApplication.ActivateIgnoringOtherApps (true); NSApplication.SharedApplication.ActivateIgnoringOtherApps (true);
@ -236,16 +236,16 @@ namespace SparkleShare {
NotificationsMenuItem = new NSMenuItem (); NotificationsMenuItem = new NSMenuItem ();
if (SparkleShare.Controller.NotificationsEnabled) if (Program.Controller.NotificationsEnabled)
NotificationsMenuItem.Title = "Turn Notifications Off"; NotificationsMenuItem.Title = "Turn Notifications Off";
else else
NotificationsMenuItem.Title = "Turn Notifications On"; NotificationsMenuItem.Title = "Turn Notifications On";
NotificationsMenuItem.Activated += delegate { NotificationsMenuItem.Activated += delegate {
SparkleShare.Controller.ToggleNotifications (); Program.Controller.ToggleNotifications ();
InvokeOnMainThread (delegate { InvokeOnMainThread (delegate {
if (SparkleShare.Controller.NotificationsEnabled) if (Program.Controller.NotificationsEnabled)
NotificationsMenuItem.Title = "Turn Notifications Off"; NotificationsMenuItem.Title = "Turn Notifications Off";
else else
NotificationsMenuItem.Title = "Turn Notifications On"; NotificationsMenuItem.Title = "Turn Notifications On";
@ -285,7 +285,7 @@ namespace SparkleShare {
private EventHandler OpenFolderDelegate (string name) private EventHandler OpenFolderDelegate (string name)
{ {
return delegate { return delegate {
SparkleShare.Controller.OpenSparkleShareFolder (name); Program.Controller.OpenSparkleShareFolder (name);
}; };
} }

View file

@ -65,7 +65,7 @@ namespace SparkleShare {
NSApplication.SharedApplication.ApplicationIconImage NSApplication.SharedApplication.ApplicationIconImage
= NSImage.ImageNamed ("sparkleshare.icns"); = NSImage.ImageNamed ("sparkleshare.icns");
if (!SparkleShare.Controller.BackendIsPresent) { if (!Program.Controller.BackendIsPresent) {
this.alert = new SparkleAlert (); this.alert = new SparkleAlert ();
this.alert.RunModal (); this.alert.RunModal ();
return; return;
@ -79,7 +79,7 @@ namespace SparkleShare {
StatusIcon = new SparkleStatusIcon (); StatusIcon = new SparkleStatusIcon ();
Bubbles = new SparkleBubbles (); Bubbles = new SparkleBubbles ();
if (SparkleShare.Controller.FirstRun) { if (Program.Controller.FirstRun) {
Setup = new SparkleSetup (); Setup = new SparkleSetup ();
Setup.Controller.ShowSetupPage (); Setup.Controller.ShowSetupPage ();
} }
@ -95,7 +95,7 @@ namespace SparkleShare {
NSImage folder_icon = new NSImage (folder_icon_path); NSImage folder_icon = new NSImage (folder_icon_path);
NSWorkspace.SharedWorkspace.SetIconforFile (folder_icon, NSWorkspace.SharedWorkspace.SetIconforFile (folder_icon,
SparkleShare.Controller.SparklePath, 0); Program.Controller.SparklePath, 0);
} }
@ -123,7 +123,7 @@ namespace SparkleShare {
public override void WillTerminate (NSNotification notification) public override void WillTerminate (NSNotification notification)
{ {
SparkleShare.Controller.Quit (); Program.Controller.Quit ();
} }
} }
} }

View file

@ -25,7 +25,7 @@ SOURCES = \
SparkleSetup.cs \ SparkleSetup.cs \
SparkleSetupController.cs \ SparkleSetupController.cs \
SparkleSetupWindow.cs \ SparkleSetupWindow.cs \
SparkleShare.cs \ Program.cs \
SparkleSpinner.cs \ SparkleSpinner.cs \
SparkleStatusIcon.cs \ SparkleStatusIcon.cs \
SparkleStatusIconController.cs \ SparkleStatusIconController.cs \
@ -41,7 +41,7 @@ SOURCES = \
SparkleSetup.cs \ SparkleSetup.cs \
SparkleSetupController.cs \ SparkleSetupController.cs \
SparkleSetupWindow.cs \ SparkleSetupWindow.cs \
SparkleShare.cs \ Program.cs \
SparkleSpinner.cs \ SparkleSpinner.cs \
SparkleStatusIcon.cs \ SparkleStatusIcon.cs \
SparkleStatusIconController.cs \ SparkleStatusIconController.cs \

View file

@ -30,7 +30,7 @@ using SparkleLib.Options;
namespace SparkleShare { namespace SparkleShare {
// This is SparkleShare! // This is SparkleShare!
public class SparkleShare { public class Program {
public static SparkleController Controller; public static SparkleController Controller;
public static SparkleUI UI; public static SparkleUI UI;

View file

@ -27,23 +27,23 @@ namespace SparkleShare {
public SparkleBubblesController () public SparkleBubblesController ()
{ {
SparkleShare.Controller.ConflictNotificationRaised += delegate { Program.Controller.ConflictNotificationRaised += delegate {
ShowBubble ("Ouch! Mid-air collision!", ShowBubble ("Ouch! Mid-air collision!",
"Don't worry, SparkleShare made a copy of each conflicting file.", "Don't worry, SparkleShare made a copy of each conflicting file.",
null); null);
}; };
SparkleShare.Controller.NotificationRaised += delegate (string user_name, string user_email, Program.Controller.NotificationRaised += delegate (string user_name, string user_email,
string message, string folder_path) { string message, string folder_path) {
ShowBubble (user_name, message, ShowBubble (user_name, message,
SparkleShare.Controller.GetAvatar (user_email, 36)); Program.Controller.GetAvatar (user_email, 36));
}; };
} }
public void ShowBubble (string title, string subtext, string image_path) public void ShowBubble (string title, string subtext, string image_path)
{ {
if (ShowBubbleEvent != null && SparkleShare.Controller.NotificationsEnabled) if (ShowBubbleEvent != null && Program.Controller.NotificationsEnabled)
ShowBubbleEvent (title, subtext, image_path); ShowBubbleEvent (title, subtext, image_path);
} }
} }

View file

@ -92,7 +92,7 @@ namespace SparkleShare {
string note = match.Groups [3].Value; string note = match.Groups [3].Value;
Thread thread = new Thread (new ThreadStart (delegate { Thread thread = new Thread (new ThreadStart (delegate {
SparkleShare.Controller.AddNoteToFolder (folder_name, revision, note); Program.Controller.AddNoteToFolder (folder_name, revision, note);
})); }));
thread.Start (); thread.Start ();

View file

@ -69,14 +69,14 @@ namespace SparkleShare {
public string HTML { public string HTML {
get { get {
List<SparkleChangeSet> change_sets = SparkleShare.Controller.GetLog (this.selected_folder); List<SparkleChangeSet> change_sets = Program.Controller.GetLog (this.selected_folder);
return SparkleShare.Controller.GetHTMLLog (change_sets); return Program.Controller.GetHTMLLog (change_sets);
} }
} }
public string [] Folders { public string [] Folders {
get { get {
return SparkleShare.Controller.Folders.ToArray (); return Program.Controller.Folders.ToArray ();
} }
} }
@ -86,19 +86,19 @@ namespace SparkleShare {
public SparkleEventLogController () public SparkleEventLogController ()
{ {
SparkleShare.Controller.AvatarFetched += delegate { Program.Controller.AvatarFetched += delegate {
if (UpdateContentEvent != null) if (UpdateContentEvent != null)
UpdateContentEvent (HTML); UpdateContentEvent (HTML);
}; };
SparkleShare.Controller.OnIdle += delegate { Program.Controller.OnIdle += delegate {
if (UpdateContentEvent != null) if (UpdateContentEvent != null)
UpdateContentEvent (HTML); UpdateContentEvent (HTML);
}; };
SparkleShare.Controller.FolderListChanged += delegate { Program.Controller.FolderListChanged += delegate {
if (this.selected_folder != null && if (this.selected_folder != null &&
!SparkleShare.Controller.Folders.Contains (this.selected_folder)) { !Program.Controller.Folders.Contains (this.selected_folder)) {
this.selected_folder = null; this.selected_folder = null;
} }
@ -110,7 +110,7 @@ namespace SparkleShare {
UpdateContentEvent (HTML); UpdateContentEvent (HTML);
}; };
SparkleShare.Controller.NotificationRaised += delegate { Program.Controller.NotificationRaised += delegate {
if (UpdateContentEvent != null) if (UpdateContentEvent != null)
UpdateContentEvent (HTML); UpdateContentEvent (HTML);
}; };

View file

@ -77,7 +77,7 @@ namespace SparkleShare {
Xalign = 0 Xalign = 0
}; };
NameEntry = new Entry (SparkleShare.Controller.UserName); NameEntry = new Entry (Program.Controller.UserName);
NameEntry.Changed += delegate { NameEntry.Changed += delegate {
CheckSetupPage (); CheckSetupPage ();
}; };
@ -149,7 +149,7 @@ namespace SparkleShare {
ListStore server_store = new ListStore (typeof (string)); ListStore server_store = new ListStore (typeof (string));
foreach (string host in SparkleShare.Controller.PreviousHosts) foreach (string host in Program.Controller.PreviousHosts)
server_store.AppendValues (host); server_store.AppendValues (host);
ServerEntry.Completion.Model = server_store; ServerEntry.Completion.Model = server_store;
@ -239,7 +239,7 @@ namespace SparkleShare {
ListStore folder_store = new ListStore (typeof (string)); ListStore folder_store = new ListStore (typeof (string));
//foreach (string host in SparkleShare.Controller.FolderPaths) //foreach (string host in Program.Controller.FolderPaths)
// folder_store.AppendValues (host); // folder_store.AppendValues (host);
FolderEntry.Completion.Model = folder_store; FolderEntry.Completion.Model = folder_store;
@ -411,7 +411,7 @@ namespace SparkleShare {
Button open_folder_button = new Button (_("Open Folder")); Button open_folder_button = new Button (_("Open Folder"));
open_folder_button.Clicked += delegate { open_folder_button.Clicked += delegate {
SparkleShare.Controller.OpenSparkleShareFolder (Controller.SyncingFolder); Program.Controller.OpenSparkleShareFolder (Controller.SyncingFolder);
}; };
Button finish_button = new Button (_("Finish")); Button finish_button = new Button (_("Finish"));
@ -441,7 +441,7 @@ namespace SparkleShare {
private void CheckSetupPage () private void CheckSetupPage ()
{ {
if (NameEntry.Text.Length > 0 && if (NameEntry.Text.Length > 0 &&
SparkleShare.Controller.IsValidEmail (EmailEntry.Text)) { Program.Controller.IsValidEmail (EmailEntry.Text)) {
NextButton.Sensitive = true; NextButton.Sensitive = true;
} else { } else {

View file

@ -97,11 +97,11 @@ namespace SparkleShare {
public void SetupPageCompleted (string full_name, string email) public void SetupPageCompleted (string full_name, string email)
{ {
SparkleShare.Controller.UserName = full_name; Program.Controller.UserName = full_name;
SparkleShare.Controller.UserEmail = email; Program.Controller.UserEmail = email;
SparkleShare.Controller.GenerateKeyPair (); Program.Controller.GenerateKeyPair ();
SparkleShare.Controller.UpdateState (); Program.Controller.UpdateState ();
if (ChangePageEvent != null) if (ChangePageEvent != null)
ChangePageEvent (PageType.Add); ChangePageEvent (PageType.Add);
@ -117,14 +117,14 @@ namespace SparkleShare {
if (ChangePageEvent != null) if (ChangePageEvent != null)
ChangePageEvent (PageType.Syncing); ChangePageEvent (PageType.Syncing);
SparkleShare.Controller.FolderFetched += delegate { Program.Controller.FolderFetched += delegate {
if (ChangePageEvent != null) if (ChangePageEvent != null)
ChangePageEvent (PageType.Finished); ChangePageEvent (PageType.Finished);
this.syncing_folder = ""; this.syncing_folder = "";
}; };
SparkleShare.Controller.FolderFetchError += delegate (string remote_url) { Program.Controller.FolderFetchError += delegate (string remote_url) {
this.previous_url = remote_url; this.previous_url = remote_url;
if (ChangePageEvent != null) if (ChangePageEvent != null)
@ -133,12 +133,12 @@ namespace SparkleShare {
this.syncing_folder = ""; this.syncing_folder = "";
}; };
SparkleShare.Controller.FolderFetching += delegate (double percentage) { Program.Controller.FolderFetching += delegate (double percentage) {
if (UpdateProgressBarEvent != null) if (UpdateProgressBarEvent != null)
UpdateProgressBarEvent (percentage); UpdateProgressBarEvent (percentage);
}; };
SparkleShare.Controller.FetchFolder (server, folder_name); Program.Controller.FetchFolder (server, folder_name);
} }
@ -151,7 +151,7 @@ namespace SparkleShare {
public void SyncingCancelled () public void SyncingCancelled ()
{ {
SparkleShare.Controller.StopFetcher (); Program.Controller.StopFetcher ();
if (ChangePageEvent != null) if (ChangePageEvent != null)
ChangePageEvent (PageType.Add); ChangePageEvent (PageType.Add);
@ -162,7 +162,7 @@ namespace SparkleShare {
{ {
this.previous_server = ""; this.previous_server = "";
this.previous_folder = ""; this.previous_folder = "";
SparkleShare.Controller.UpdateState (); Program.Controller.UpdateState ();
} }
} }
} }

View file

@ -67,7 +67,7 @@
<Compile Include="SparkleSetup.cs" /> <Compile Include="SparkleSetup.cs" />
<Compile Include="SparkleSetupController.cs" /> <Compile Include="SparkleSetupController.cs" />
<Compile Include="SparkleSetupWindow.cs" /> <Compile Include="SparkleSetupWindow.cs" />
<Compile Include="SparkleShare.cs" /> <Compile Include="Program.cs" />
<Compile Include="SparkleSpinner.cs" /> <Compile Include="SparkleSpinner.cs" />
<Compile Include="SparkleStatusIcon.cs" /> <Compile Include="SparkleStatusIcon.cs" />
<Compile Include="SparkleStatusIconController.cs" /> <Compile Include="SparkleStatusIconController.cs" />

View file

@ -193,18 +193,18 @@ namespace SparkleShare {
}; };
folder_item.Activated += delegate { folder_item.Activated += delegate {
SparkleShare.Controller.OpenSparkleShareFolder (); Program.Controller.OpenSparkleShareFolder ();
}; };
Menu.Add (folder_item); Menu.Add (folder_item);
if (SparkleShare.Controller.Folders.Count > 0) { if (Program.Controller.Folders.Count > 0) {
// Creates a menu item for each repository with a link to their logs // Creates a menu item for each repository with a link to their logs
foreach (string folder_name in SparkleShare.Controller.Folders) { foreach (string folder_name in Program.Controller.Folders) {
Gdk.Pixbuf folder_icon; Gdk.Pixbuf folder_icon;
if (SparkleShare.Controller.UnsyncedFolders.Contains (folder_name)) { if (Program.Controller.UnsyncedFolders.Contains (folder_name)) {
folder_icon = IconTheme.Default.LoadIcon ("dialog-error", 16, folder_icon = IconTheme.Default.LoadIcon ("dialog-error", 16,
IconLookupFlags.GenericFallback); IconLookupFlags.GenericFallback);
@ -234,7 +234,7 @@ namespace SparkleShare {
// Opens the wizard to add a new remote folder // Opens the wizard to add a new remote folder
MenuItem sync_item = new MenuItem (_("Add Remote Folder…")); MenuItem sync_item = new MenuItem (_("Add Remote Folder…"));
if (SparkleShare.Controller.FirstRun) if (Program.Controller.FirstRun)
sync_item.Sensitive = false; sync_item.Sensitive = false;
sync_item.Activated += delegate { sync_item.Activated += delegate {
@ -258,7 +258,7 @@ namespace SparkleShare {
MenuItem recent_events_item = new MenuItem (_("Show Recent Events")); MenuItem recent_events_item = new MenuItem (_("Show Recent Events"));
if (SparkleShare.Controller.Folders.Count < 1) if (Program.Controller.Folders.Count < 1)
recent_events_item.Sensitive = false; recent_events_item.Sensitive = false;
recent_events_item.Activated += delegate { recent_events_item.Activated += delegate {
@ -275,13 +275,13 @@ namespace SparkleShare {
MenuItem notify_item; MenuItem notify_item;
if (SparkleShare.Controller.NotificationsEnabled) if (Program.Controller.NotificationsEnabled)
notify_item = new MenuItem (_("Turn Notifications Off")); notify_item = new MenuItem (_("Turn Notifications Off"));
else else
notify_item = new MenuItem (_("Turn Notifications On")); notify_item = new MenuItem (_("Turn Notifications On"));
notify_item.Activated += delegate { notify_item.Activated += delegate {
SparkleShare.Controller.ToggleNotifications (); Program.Controller.ToggleNotifications ();
CreateMenu (); CreateMenu ();
}; };
@ -308,7 +308,7 @@ namespace SparkleShare {
MenuItem quit_item = new MenuItem (_("Quit")); MenuItem quit_item = new MenuItem (_("Quit"));
quit_item.Activated += delegate { quit_item.Activated += delegate {
SparkleShare.Controller.Quit (); Program.Controller.Quit ();
}; };
Menu.Add (quit_item); Menu.Add (quit_item);
@ -325,7 +325,7 @@ namespace SparkleShare {
private EventHandler OpenFolderDelegate (string name) private EventHandler OpenFolderDelegate (string name)
{ {
return delegate { return delegate {
SparkleShare.Controller.OpenSparkleShareFolder (name); Program.Controller.OpenSparkleShareFolder (name);
}; };
} }

View file

@ -38,29 +38,29 @@ namespace SparkleShare {
public string [] Folders { public string [] Folders {
get { get {
return SparkleShare.Controller.Folders.ToArray (); return Program.Controller.Folders.ToArray ();
} }
} }
public string FolderSize { public string FolderSize {
get { get {
return SparkleShare.Controller.FolderSize; return Program.Controller.FolderSize;
} }
} }
public SparkleStatusIconController () public SparkleStatusIconController ()
{ {
SparkleShare.Controller.FolderSizeChanged += delegate { Program.Controller.FolderSizeChanged += delegate {
if (UpdateMenuEvent != null) if (UpdateMenuEvent != null)
UpdateMenuEvent (CurrentState); UpdateMenuEvent (CurrentState);
}; };
SparkleShare.Controller.FolderListChanged += delegate { Program.Controller.FolderListChanged += delegate {
if (UpdateMenuEvent != null) if (UpdateMenuEvent != null)
UpdateMenuEvent (CurrentState); UpdateMenuEvent (CurrentState);
}; };
SparkleShare.Controller.OnIdle += delegate { Program.Controller.OnIdle += delegate {
if (CurrentState != IconState.Error) if (CurrentState != IconState.Error)
CurrentState = IconState.Idle; CurrentState = IconState.Idle;
@ -68,7 +68,7 @@ namespace SparkleShare {
UpdateMenuEvent (CurrentState); UpdateMenuEvent (CurrentState);
}; };
SparkleShare.Controller.OnSyncing += delegate { Program.Controller.OnSyncing += delegate {
CurrentState = IconState.Syncing; CurrentState = IconState.Syncing;
// TODO up down both // TODO up down both
@ -77,7 +77,7 @@ namespace SparkleShare {
UpdateMenuEvent (IconState.Syncing); UpdateMenuEvent (IconState.Syncing);
}; };
SparkleShare.Controller.OnError += delegate { Program.Controller.OnError += delegate {
CurrentState = IconState.Error; CurrentState = IconState.Error;
if (UpdateMenuEvent != null) if (UpdateMenuEvent != null)

View file

@ -59,12 +59,12 @@ namespace SparkleShare {
StatusIcon = new SparkleStatusIcon (); StatusIcon = new SparkleStatusIcon ();
Bubbles = new SparkleBubbles (); Bubbles = new SparkleBubbles ();
if (SparkleShare.Controller.FirstRun) { if (Program.Controller.FirstRun) {
Setup = new SparkleSetup (); Setup = new SparkleSetup ();
Setup.Controller.ShowSetupPage (); Setup.Controller.ShowSetupPage ();
} }
SparkleShare.Controller.OnQuitWhileSyncing += delegate { Program.Controller.OnQuitWhileSyncing += delegate {
// TODO: Pop up a warning when quitting whilst syncing // TODO: Pop up a warning when quitting whilst syncing
}; };
} }