update style and remove status icon event

This commit is contained in:
Hylke Bons 2012-10-20 18:35:57 +01:00
parent b91477ef2e
commit e1d8f073dd
5 changed files with 12 additions and 33 deletions

View file

@ -83,7 +83,7 @@
dl { dl {
padding : 6px 0 0 0; padding : 6px 0 0 0;
margin: 0 0 12px 0; margin: 6px 0 9px 0;
table-layout: fixed; table-layout: fixed;
} }
@ -119,11 +119,11 @@
} }
.event-entry { .event-entry {
padding: 24px 14px 14px 64px; padding: 0 14px 0 64px;
margin: 0 32px 0 32px; margin: 28px 32px 28px 32px;
border-bottom: 1px #ddd solid;
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: 36px 24px; background-position: 36px 24px;
min-height: 48px;
} }
.event-user-name { .event-user-name {

View file

@ -129,13 +129,6 @@ namespace SparkleShare {
}); });
}; };
Controller.UpdateRecentEventsItemEvent += delegate (bool item_enabled) {
Application.Invoke (delegate {
this.recent_events_item.Sensitive = item_enabled;
this.recent_events_item.ShowAll ();
});
};
Controller.UpdateMenuEvent += delegate (IconState state) { Controller.UpdateMenuEvent += delegate (IconState state) {
Application.Invoke (delegate { Application.Invoke (delegate {
CreateMenu (); CreateMenu ();

View file

@ -161,15 +161,6 @@ namespace SparkleShare {
}); });
} }
}; };
Controller.UpdateRecentEventsItemEvent += delegate (bool events_item_enabled) {
using (var a = new NSAutoreleasePool ())
{
InvokeOnMainThread (delegate {
this.recent_events_item.Enabled = events_item_enabled;
});
}
};
} }

View file

@ -45,9 +45,6 @@ namespace SparkleShare {
public event UpdateQuitItemEventHandler UpdateQuitItemEvent = delegate { }; public event UpdateQuitItemEventHandler UpdateQuitItemEvent = delegate { };
public delegate void UpdateQuitItemEventHandler (bool quit_item_enabled); public delegate void UpdateQuitItemEventHandler (bool quit_item_enabled);
public event UpdateRecentEventsItemEventHandler UpdateRecentEventsItemEvent = delegate { };
public delegate void UpdateRecentEventsItemEventHandler (bool recent_events_item_enabled);
public IconState CurrentState = IconState.Idle; public IconState CurrentState = IconState.Idle;
public string StateText = "Welcome to SparkleShare!"; public string StateText = "Welcome to SparkleShare!";
@ -95,7 +92,7 @@ namespace SparkleShare {
public bool RecentEventsItemEnabled { public bool RecentEventsItemEnabled {
get { get {
return (Program.Controller.RepositoriesLoaded && Program.Controller.Folders.Count > 0); return (Program.Controller.Folders.Count > 0);
} }
} }
@ -117,7 +114,6 @@ namespace SparkleShare {
UpdateFolders (); UpdateFolders ();
UpdateStatusItemEvent (StateText); UpdateStatusItemEvent (StateText);
UpdateRecentEventsItemEvent (RecentEventsItemEnabled);
UpdateMenuEvent (CurrentState); UpdateMenuEvent (CurrentState);
}; };
@ -208,7 +204,13 @@ namespace SparkleShare {
public void RecentEventsClicked () public void RecentEventsClicked ()
{ {
new Thread (() => Program.Controller.ShowEventLogWindow ()).Start (); new Thread (() => {
while (!Program.Controller.RepositoriesLoaded)
Thread.Sleep (100);
Program.Controller.ShowEventLogWindow ();
}).Start ();
} }

View file

@ -109,13 +109,6 @@ namespace SparkleShare {
this.exit_item.UpdateLayout (); this.exit_item.UpdateLayout ();
}); });
}; };
Controller.UpdateRecentEventsItemEvent += delegate (bool item_enabled) {
Dispatcher.BeginInvoke ((Action) delegate {
this.log_item.IsEnabled = item_enabled;
this.log_item.UpdateLayout ();
});
};
} }