Merge branch 'onelog'

This commit is contained in:
Hylke Bons 2011-06-12 01:48:45 +01:00
commit c5df48ed52
24 changed files with 2536 additions and 495 deletions

View file

@ -444,10 +444,13 @@ namespace SparkleLib {
if (change_type.Equals ("A")) {
change_set.Added.Add (file_path);
} else if (change_type.Equals ("M")) {
change_set.Edited.Add (file_path);
} else if (change_type.Equals ("D")) {
change_set.Deleted.Add (file_path);
} else if (change_type.Equals ("R")) {
int tab_pos = entry_line.LastIndexOf ("\t");
file_path = entry_line.Substring (42, tab_pos - 42);

View file

@ -56,25 +56,6 @@
<string key="NSTitle">SparkleShare</string>
<object class="NSMutableArray" key="NSMenuItems">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSMenuItem" id="238522557">
<reference key="NSMenu" ref="110575045"/>
<string key="NSTitle">About SparkleShare</string>
<string key="NSKeyEquiv"/>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="304266470">
<reference key="NSMenu" ref="110575045"/>
<bool key="NSIsDisabled">YES</bool>
<bool key="NSIsSeparator">YES</bool>
<string key="NSTitle"/>
<string key="NSKeyEquiv"/>
<int key="NSKeyEquivModMask">1048576</int>
<int key="NSMnemonicLoc">2147483647</int>
<reference key="NSOnImage" ref="35465992"/>
<reference key="NSMixedImage" ref="502551668"/>
</object>
<object class="NSMenuItem" id="1046388886">
<reference key="NSMenu" ref="110575045"/>
<string key="NSTitle">Services</string>
@ -949,14 +930,6 @@
</object>
<int key="connectionID">534</int>
</object>
<object class="IBConnectionRecord">
<object class="IBOutletConnection" key="connection">
<string key="label">delegate</string>
<reference key="source" ref="1050"/>
<reference key="destination" ref="238522557"/>
</object>
<int key="connectionID">538</int>
</object>
</object>
<object class="IBMutableOrderedSet" key="objectRecords">
<object class="NSArray" key="orderedObjects">
@ -1184,23 +1157,16 @@
<reference key="object" ref="110575045"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="238522557"/>
<reference ref="755159360"/>
<reference ref="908899353"/>
<reference ref="632727374"/>
<reference ref="646227648"/>
<reference ref="304266470"/>
<reference ref="1046388886"/>
<reference ref="1056857174"/>
<reference ref="342932134"/>
</object>
<reference key="parent" ref="694149608"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">58</int>
<reference key="object" ref="238522557"/>
<reference key="parent" ref="110575045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">134</int>
<reference key="object" ref="755159360"/>
@ -1221,11 +1187,6 @@
<reference key="object" ref="646227648"/>
<reference key="parent" ref="110575045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">236</int>
<reference key="object" ref="304266470"/>
<reference key="parent" ref="110575045"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">131</int>
<reference key="object" ref="1046388886"/>
@ -1548,8 +1509,6 @@
<string>221.ImportedFromIB2</string>
<string>23.IBPluginDependency</string>
<string>23.ImportedFromIB2</string>
<string>236.IBPluginDependency</string>
<string>236.ImportedFromIB2</string>
<string>239.IBPluginDependency</string>
<string>239.ImportedFromIB2</string>
<string>24.IBEditorWindowLastContentRect</string>
@ -1600,8 +1559,6 @@
<string>57.IBPluginDependency</string>
<string>57.ImportedFromIB2</string>
<string>57.editorWindowContentRectSynchronizationRect</string>
<string>58.IBPluginDependency</string>
<string>58.ImportedFromIB2</string>
<string>92.IBPluginDependency</string>
<string>92.ImportedFromIB2</string>
</object>
@ -1693,8 +1650,6 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{514, 649}, {194, 73}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
@ -1739,14 +1694,12 @@
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{358, 569}, {223, 153}}</string>
<string>{{358, 599}, {213, 123}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>{{23, 794}, {245, 183}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<integer value="1"/>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">

View file

@ -0,0 +1,219 @@
// SparkleShare, a collaboration and sharing tool.
// Copyright (C) 2010 Hylke Bons <hylkebons@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Drawing;
using System.IO;
using System.Threading;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
using MonoMac.WebKit;
using SparkleLib; // Only used for SparkleChangeSet
namespace SparkleShare {
public class SparkleEventLog : NSWindow {
private WebView WebView;
private NSBox Separator;
private string HTML;
private NSPopUpButton popup_button;
private NSProgressIndicator ProgressIndicator;
private List<SparkleChangeSet> change_sets;
private string selected_log = null;
public SparkleEventLog (IntPtr handle) : base (handle) { }
public SparkleEventLog () : base ()
{
Title = "Recent Events";
Delegate = new SparkleEventsDelegate ();
SetFrame (new RectangleF (0, 0, 480, 640), true);
Center ();
StyleMask = (NSWindowStyle.Closable |
NSWindowStyle.Miniaturizable |
NSWindowStyle.Titled);
MaxSize = new SizeF (480, 640);
MinSize = new SizeF (480, 640);
HasShadow = true;
BackingType = NSBackingStore.Buffered;
CreateEvents ();
UpdateEvents (false);
UpdateChooser ();
OrderFrontRegardless ();
}
private void CreateEvents ()
{
Separator = new NSBox (new RectangleF (0, 573, 480, 1)) {
BorderColor = NSColor.LightGray,
BoxType = NSBoxType.NSBoxCustom
};
ContentView.AddSubview (Separator);
WebView = new WebView (new RectangleF (0, 0, 480, 573 ), "", ""){
PolicyDelegate = new SparkleWebPolicyDelegate ()
};
ProgressIndicator = new NSProgressIndicator () {
Style = NSProgressIndicatorStyle.Spinning,
Frame = new RectangleF (WebView.Frame.Width / 2 - 10, WebView.Frame.Height / 2 + 10, 20, 20)
};
ProgressIndicator.StartAnimation (this);
Update ();
}
public void UpdateChooser ()
{
if (this.popup_button != null)
this.popup_button.RemoveFromSuperview ();
this.popup_button = new NSPopUpButton () {
Frame = new RectangleF (480 - 156 - 8, 640 - 31 - 26, 156, 26),
PullsDown = false
};
this.popup_button.AddItem ("All Folders");
this.popup_button.Menu.AddItem (NSMenuItem.SeparatorItem);
this.popup_button.AddItems (SparkleShare.Controller.Folders.ToArray ());
this.popup_button.Activated += delegate {
if (popup_button.IndexOfSelectedItem == 0)
this.selected_log = null;
else
this.selected_log = this.popup_button.SelectedItem.Title;
UpdateEvents (false);
};
ContentView.AddSubview (this.popup_button);
}
public void UpdateEvents ()
{
UpdateEvents (true);
}
public void UpdateEvents (bool silent)
{
if (!silent) {
InvokeOnMainThread (delegate {
if (WebView.Superview == ContentView)
WebView.RemoveFromSuperview ();
ContentView.AddSubview (ProgressIndicator);
});
}
Thread thread = new Thread (new ThreadStart (delegate {
using (NSAutoreleasePool pool = new NSAutoreleasePool ()) {
Stopwatch watch = new Stopwatch ();
watch.Start ();
this.change_sets = SparkleShare.Controller.GetLog (this.selected_log);
GenerateHTML ();
watch.Stop ();
// A short delay is less annoying than
// a flashing window
if (watch.ElapsedMilliseconds < 500 && !silent)
Thread.Sleep (500 - (int) watch.ElapsedMilliseconds);
AddHTML ();
}
}));
thread.Start ();
}
private void GenerateHTML ()
{
HTML = SparkleShare.Controller.GetHTMLLog (this.change_sets);
HTML = HTML.Replace ("<!-- $body-font-family -->", "Lucida Grande");
HTML = HTML.Replace ("<!-- $day-entry-header-font-size -->", "13.6px");
HTML = HTML.Replace ("<!-- $body-font-size -->", "13.4px");
HTML = HTML.Replace ("<!-- $secondary-font-color -->", "#bbb");
HTML = HTML.Replace ("<!-- $small-color -->", "#ddd");
HTML = HTML.Replace ("<!-- $day-entry-header-background-color -->", "#f5f5f5");
HTML = HTML.Replace ("<!-- $a-color -->", "#0085cf");
HTML = HTML.Replace ("<!-- $a-hover-color -->", "#009ff8");
HTML = HTML.Replace ("<!-- $no-buddy-icon-background-image -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps", "avatar-default.png"));
HTML = HTML.Replace ("<!-- $document-added-background-image -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps", "document-added-12.png"));
HTML = HTML.Replace ("<!-- $document-deleted-background-image -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps", "document-deleted-12.png"));
HTML = HTML.Replace ("<!-- $document-edited-background-image -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps", "document-edited-12.png"));
HTML = HTML.Replace ("<!-- $document-moved-background-image -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps", "document-moved-12.png"));
}
private void AddHTML ()
{
InvokeOnMainThread (delegate {
if (ProgressIndicator.Superview == ContentView)
ProgressIndicator.RemoveFromSuperview ();
WebView.MainFrame.LoadHtmlString (HTML, new NSUrl (""));
ContentView.AddSubview (WebView);
Update ();
});
}
}
public class SparkleEventsDelegate : NSWindowDelegate {
public override bool WindowShouldClose (NSObject sender)
{
(sender as SparkleEventLog).OrderOut (this);
return false;
}
}
public class SparkleWebPolicyDelegate : WebPolicyDelegate {
public override void DecidePolicyForNavigation (WebView web_view, NSDictionary action_info,
NSUrlRequest request, WebFrame frame, NSObject decision_token)
{
string file_path = request.Url.ToString ();
file_path = file_path.Replace ("%20", " ");
NSWorkspace.SharedWorkspace.OpenFile (file_path);
}
}
}

View file

@ -1,207 +0,0 @@
// SparkleShare, a collaboration and sharing tool.
// Copyright (C) 2010 Hylke Bons <hylkebons@gmail.com>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation, either version 3 of the License, or
// (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
// GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with this program. If not, see <http://www.gnu.org/licenses/>.
using System;
using System.Drawing;
using System.IO;
using System.Threading;
using MonoMac.Foundation;
using MonoMac.AppKit;
using MonoMac.ObjCRuntime;
using MonoMac.WebKit;
namespace SparkleShare {
public class SparkleLog : NSWindow {
public readonly string LocalPath;
private WebView WebView;
private NSButton CloseButton;
private NSButton OpenFolderButton;
private NSBox Separator;
private string HTML;
private NSProgressIndicator ProgressIndicator;
public SparkleLog (IntPtr handle) : base (handle) { }
public SparkleLog (string path) : base ()
{
LocalPath = path;
Delegate = new SparkleLogDelegate ();
SetFrame (new RectangleF (0, 0, 480, 640), true);
Center ();
// Open slightly off center for each consecutive window
if (SparkleUI.OpenLogs.Count > 0) {
RectangleF offset = new RectangleF (Frame.X + (SparkleUI.OpenLogs.Count * 20),
Frame.Y - (SparkleUI.OpenLogs.Count * 20), Frame.Width, Frame.Height);
SetFrame (offset, true);
}
StyleMask = (NSWindowStyle.Closable |
NSWindowStyle.Miniaturizable |
NSWindowStyle.Titled);
MaxSize = new SizeF (480, 640);
MinSize = new SizeF (480, 640);
HasShadow = true;
BackingType = NSBackingStore.Buffered;
CreateEventLog ();
UpdateEventLog ();
OrderFrontRegardless ();
}
private void CreateEventLog ()
{
OpenFolderButton = new NSButton (new RectangleF (16, 12, 120, 32)) {
Title = "Open Folder",
BezelStyle = NSBezelStyle.Rounded ,
Font = SparkleUI.Font
};
OpenFolderButton.Activated += delegate {
SparkleShare.Controller.OpenSparkleShareFolder (LocalPath);
};
ContentView.AddSubview (OpenFolderButton);
CloseButton = new NSButton (new RectangleF (480 - 120 - 16, 12, 120, 32)) {
Title = "Close",
BezelStyle = NSBezelStyle.Rounded,
Font = SparkleUI.Font
};
CloseButton.Activated += delegate {
InvokeOnMainThread (delegate {
PerformClose (this);
});
};
ContentView.AddSubview (CloseButton);
string name = Path.GetFileName (LocalPath);
Title = String.Format ("Events in {0}", name);
Separator = new NSBox (new RectangleF (0, 58, 480, 1)) {
BorderColor = NSColor.LightGray,
BoxType = NSBoxType.NSBoxCustom
};
ContentView.AddSubview (Separator);
ProgressIndicator = new NSProgressIndicator () {
Style = NSProgressIndicatorStyle.Spinning,
Frame = new RectangleF (Frame.Width / 2 - 10, Frame.Height / 2 + 10, 20, 20)
};
ProgressIndicator.StartAnimation (this);
WebView = new WebView (new RectangleF (0, 59, 480, 559), "", ""){
PolicyDelegate = new SparkleWebPolicyDelegate ()
};
Update ();
}
public void UpdateEventLog ()
{
InvokeOnMainThread (delegate {
if (HTML == null)
ContentView.AddSubview (ProgressIndicator);
});
Thread thread = new Thread (new ThreadStart (delegate {
using (NSAutoreleasePool pool = new NSAutoreleasePool ()) {
GenerateHTML ();
AddHTML ();
}
}));
thread.Start ();
}
private void GenerateHTML ()
{
string folder_name = Path.GetFileName (LocalPath);
HTML = SparkleShare.Controller.GetHTMLLog (folder_name);
HTML = HTML.Replace ("<!-- $body-font-family -->", "Lucida Grande");
HTML = HTML.Replace ("<!-- $day-entry-header-font-size -->", "13.6px");
HTML = HTML.Replace ("<!-- $body-font-size -->", "13.4px");
HTML = HTML.Replace ("<!-- $secondary-font-color -->", "#bbb");
HTML = HTML.Replace ("<!-- $small-color -->", "#ddd");
HTML = HTML.Replace ("<!-- $day-entry-header-background-color -->", "#f5f5f5");
HTML = HTML.Replace ("<!-- $a-color -->", "#0085cf");
HTML = HTML.Replace ("<!-- $a-hover-color -->", "#009ff8");
HTML = HTML.Replace ("<!-- $no-buddy-icon-background-image -->",
"file://" + Path.Combine (NSBundle.MainBundle.ResourcePath, "Pixmaps", "avatar-default.png"));
}
private void AddHTML ()
{
InvokeOnMainThread (delegate {
if (ProgressIndicator.Superview == ContentView)
ProgressIndicator.RemoveFromSuperview ();
WebView.MainFrame.LoadHtmlString (HTML, new NSUrl (""));
ContentView.AddSubview (WebView);
Update ();
});
}
}
public class SparkleLogDelegate : NSWindowDelegate {
public override bool WindowShouldClose (NSObject sender)
{
(sender as SparkleLog).OrderOut (this);
return false;
}
}
public class SparkleWebPolicyDelegate : WebPolicyDelegate {
public override void DecidePolicyForNavigation (WebView web_view, NSDictionary action_info,
NSUrlRequest request, WebFrame frame, NSObject decision_token)
{
string file_path = request.Url.ToString ();
file_path = file_path.Replace ("%20", " ");
NSWorkspace.SharedWorkspace.OpenFile (file_path);
}
}
}

View file

@ -55,10 +55,6 @@
<Reference Include="MonoMac">
<SpecificVersion>False</SpecificVersion>
</Reference>
<Reference Include="SparkleLib, Version=0.2.0.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\bin\SparkleLib.dll</HintPath>
</Reference>
<Reference Include="Mono.Posix">
<SpecificVersion>False</SpecificVersion>
</Reference>
@ -66,6 +62,10 @@
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\bin\Meebey.SmartIrc4net.dll</HintPath>
</Reference>
<Reference Include="SparkleLib, Version=0.2.1.0, Culture=neutral, PublicKeyToken=null">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\..\bin\SparkleLib.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
<Compile Include="AppDelegate.cs">
@ -79,7 +79,6 @@
</Compile>
<Compile Include="SparkleWindow.cs" />
<Compile Include="SparkleIntro.cs" />
<Compile Include="SparkleLog.cs" />
<Compile Include="SparkleMacController.cs" />
<Compile Include="SparkleStatusIcon.cs" />
<Compile Include="SparkleUI.cs" />
@ -90,6 +89,7 @@
<Compile Include="SparkleAlert.cs" />
<Compile Include="SparkleBubble.cs" />
<Compile Include="SparkleMacWatcher.cs" />
<Compile Include="SparkleEventLog.cs" />
</ItemGroup>
<ItemGroup>
<Page Include="MainMenu.xib" />
@ -158,6 +158,18 @@
<Content Include="..\..\data\icons\error-active.png">
<Link>Pixmaps\error-active.png</Link>
</Content>
<Content Include="..\..\data\icons\document-added-12.png">
<Link>Pixmaps\document-added-12.png</Link>
</Content>
<Content Include="..\..\data\icons\document-edited-12.png">
<Link>Pixmaps\document-edited-12.png</Link>
</Content>
<Content Include="..\..\data\icons\document-deleted-12.png">
<Link>Pixmaps\document-deleted-12.png</Link>
</Content>
<Content Include="..\..\data\icons\document-moved-12.png">
<Link>Pixmaps\document-moved-12.png</Link>
</Content>
</ItemGroup>
<ItemGroup>
<Folder Include="Pixmaps\" />

View file

@ -43,6 +43,8 @@ namespace SparkleShare {
private NSMenuItem SyncMenuItem;
private NSMenuItem AboutMenuItem;
private NSMenuItem NotificationsMenuItem;
private NSMenuItem RecentEventsMenuItem;
private NSMenuItem QuitMenuItem;
private delegate void Task ();
private EventHandler [] Tasks;
@ -149,7 +151,7 @@ namespace SparkleShare {
Title = StateText
};
Menu.AddItem (StateMenuItem);
Menu.AddItem (StateMenuItem);
Menu.AddItem (NSMenuItem.SeparatorItem);
FolderMenuItem = new NSMenuItem () {
@ -176,7 +178,7 @@ namespace SparkleShare {
foreach (string folder_name in SparkleShare.Controller.Folders) {
NSMenuItem item = new NSMenuItem ();
item.Title = folder_name;
item.Title = folder_name;
if (SparkleShare.Controller.UnsyncedFolders.Contains (folder_name))
item.Image = NSImage.ImageNamed ("NSCaution");
@ -184,7 +186,7 @@ namespace SparkleShare {
item.Image = NSImage.ImageNamed ("NSFolder");
item.Image.Size = new SizeF (16, 16);
Tasks [i] = OpenEventLogDelegate (folder_name);
Tasks [i] = OpenFolderDelegate (folder_name);
FolderMenuItems [i] = item;
FolderMenuItems [i].Activated += Tasks [i];
@ -233,6 +235,23 @@ namespace SparkleShare {
Menu.AddItem (SyncMenuItem);
Menu.AddItem (NSMenuItem.SeparatorItem);
RecentEventsMenuItem = new NSMenuItem () {
Title = "Show Recent Events"
};
RecentEventsMenuItem.Activated +=delegate {
InvokeOnMainThread (delegate {
NSApplication.SharedApplication.ActivateIgnoringOtherApps (true);
if (SparkleUI.EventLog == null)
SparkleUI.EventLog = new SparkleEventLog ();
SparkleUI.EventLog.OrderFrontRegardless ();
SparkleUI.EventLog.MakeKeyAndOrderFront (this);
});
};
Menu.AddItem (RecentEventsMenuItem);
NotificationsMenuItem = new NSMenuItem ();
@ -255,28 +274,28 @@ namespace SparkleShare {
Menu.AddItem (NotificationsMenuItem);
Menu.AddItem (NSMenuItem.SeparatorItem);
AboutMenuItem = new NSMenuItem () {
Title = "About SparkleShare"
};
AboutMenuItem.Activated += delegate {
InvokeOnMainThread (delegate {
NSApplication.SharedApplication.ActivateIgnoringOtherApps (true);
AboutMenuItem.Activated += delegate {
InvokeOnMainThread (delegate {
NSApplication.SharedApplication.ActivateIgnoringOtherApps (true);
if (SparkleUI.About == null)
SparkleUI.About = new SparkleAbout ();
if (SparkleUI.About == null)
SparkleUI.About = new SparkleAbout ();
SparkleUI.About.OrderFrontRegardless ();
SparkleUI.About.MakeKeyAndOrderFront (this);
SparkleUI.About.CheckForNewVersion ();
});
};
SparkleUI.About.OrderFrontRegardless ();
SparkleUI.About.MakeKeyAndOrderFront (this);
SparkleUI.About.CheckForNewVersion ();
});
};
Menu.AddItem (AboutMenuItem);
StatusItem.Menu = Menu;
StatusItem.Menu.Update ();
}
@ -284,26 +303,10 @@ namespace SparkleShare {
// A method reference that makes sure that opening the
// event log for each repository works correctly
private EventHandler OpenEventLogDelegate (string path)
private EventHandler OpenFolderDelegate (string name)
{
return delegate {
InvokeOnMainThread (delegate {
NSApplication.SharedApplication.ActivateIgnoringOtherApps (true);
SparkleLog log = SparkleUI.OpenLogs.Find (delegate (SparkleLog l) {
return l.LocalPath.Equals (path);
});
// Check whether the log is already open, create a new one if
// that's not the case or present it to the user if it is
if (log == null) {
SparkleUI.OpenLogs.Add (new SparkleLog (path));
SparkleUI.OpenLogs [SparkleUI.OpenLogs.Count - 1].MakeKeyAndOrderFront (this);
} else {
log.OrderFrontRegardless ();
log.MakeKeyAndOrderFront (this);
}
});
SparkleShare.Controller.OpenSparkleShareFolder (name);
};
}

View file

@ -51,7 +51,7 @@ namespace SparkleShare {
public class SparkleUI : AppDelegate {
public static SparkleStatusIcon StatusIcon;
public static List <SparkleLog> OpenLogs;
public static SparkleEventLog EventLog;
public static SparkleIntro Intro;
public static SparkleAbout About;
public static NSFont Font;
@ -63,6 +63,7 @@ namespace SparkleShare {
{
string content_path = Directory.GetParent (
System.AppDomain.CurrentDomain.BaseDirectory).ToString ();
string app_path = Directory.GetParent (content_path).ToString ();
string growl_path = Path.Combine (app_path, "Frameworks", "Growl.framework", "Growl");
@ -88,18 +89,15 @@ namespace SparkleShare {
Font = NSFontManager.SharedFontManager.FontWithFamily
("Lucida Grande", NSFontTraitMask.Condensed, 0, 13);
OpenLogs = new List <SparkleLog> ();
StatusIcon = new SparkleStatusIcon ();
}
SparkleShare.Controller.NotificationRaised += delegate (string user_name, string user_email,
string message, string repository_path) {
InvokeOnMainThread (delegate {
foreach (SparkleLog log in OpenLogs) {
if (log.LocalPath.Equals (repository_path))
log.UpdateEventLog ();
}
if (EventLog != null)
EventLog.UpdateEvents ();
if (SparkleShare.Controller.NotificationsEnabled) {
if (NSApplication.SharedApplication.DockTile.BadgeLabel == null)
@ -134,20 +132,28 @@ namespace SparkleShare {
SparkleShare.Controller.AvatarFetched += delegate {
InvokeOnMainThread (delegate {
foreach (SparkleLog log in SparkleUI.OpenLogs)
log.UpdateEventLog ();
if (EventLog != null)
EventLog.UpdateEvents ();
});
};
SparkleShare.Controller.OnIdle += delegate {
InvokeOnMainThread (delegate {
foreach (SparkleLog log in SparkleUI.OpenLogs)
log.UpdateEventLog ();
});
};
SparkleShare.Controller.OnIdle += delegate {
InvokeOnMainThread (delegate {
if (EventLog != null)
EventLog.UpdateEvents ();
});
};
SparkleShare.Controller.FolderListChanged += delegate {
InvokeOnMainThread (delegate {
if (EventLog != null)
EventLog.UpdateChooser ();
});
};
if (SparkleShare.Controller.FirstRun) {
Intro = new SparkleIntro ();
Intro.ShowAccountForm ();
@ -179,5 +185,5 @@ namespace SparkleShare {
string path = NSBundle.MainBundle.PathForResource ("Growl", "plist");
return NSDictionary.FromFile (path);
}
}
}
}

View file

@ -16,7 +16,7 @@ SOURCES = \
SparkleInfobar.cs \
SparkleIntro.cs \
SparkleLinController.cs \
SparkleLog.cs \
SparkleEventLog.cs \
SparkleShare.cs \
SparkleSpinner.cs \
SparkleStatusIcon.cs \

View file

@ -19,6 +19,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.IO;
using System.Linq;
using System.Net;
using System.Security.Cryptography;
using System.Text;
@ -240,11 +241,31 @@ namespace SparkleShare {
}
}
public List <SparkleChangeSet> GetLog (string name)
public List<SparkleChangeSet> GetLog ()
{
List<SparkleChangeSet> list = new List<SparkleChangeSet> ();
foreach (SparkleRepoBase repo in Repositories)
list.AddRange (repo.GetChangeSets (50));
list.Sort ((x, y) => (x.Timestamp.CompareTo (y.Timestamp)));
list.Reverse ();
if (list.Count > 100)
return list.GetRange (0, 100);
else
return list.GetRange (0, list.Count);
}
public List<SparkleChangeSet> GetLog (string name)
{
if (name == null)
return GetLog ();
string path = Path.Combine (SparklePaths.SparklePath, name);
int log_size = 30;
int log_size = 50;
foreach (SparkleRepoBase repo in Repositories) {
if (repo.LocalPath.Equals (path))
@ -260,10 +281,9 @@ namespace SparkleShare {
public abstract string EventEntryHTML { get; }
public string GetHTMLLog (string name)
public string GetHTMLLog (List<SparkleChangeSet> change_sets)
{
List <SparkleChangeSet> change_sets = GetLog (name);
List <ActivityDay> activity_days = new List <ActivityDay> ();
List <ActivityDay> activity_days = new List <ActivityDay> ();
if (change_sets.Count == 0)
return null;
@ -302,68 +322,58 @@ namespace SparkleShare {
string event_entry = "<dl>";
if (change_set.IsMerge) {
event_entry += "<dt>Merged a branch</dt>";
event_entry += "<dd>Did something magical</dd>";
} else {
if (change_set.Edited.Count > 0) {
event_entry += "<dt>Edited</dt>";
foreach (string file_path in change_set.Edited) {
string absolute_file_path = SparkleHelpers.CombineMore (SparklePaths.SparklePath,
name, file_path);
change_set.Folder, file_path);
if (File.Exists (absolute_file_path))
event_entry += "<dd><a href='" + absolute_file_path + "'>" + file_path + "</a></dd>";
event_entry += "<dd class='document-edited'><a href='" + absolute_file_path + "'>" + file_path + "</a></dd>";
else
event_entry += "<dd>" + file_path + "</dd>";
event_entry += "<dd class='document-edited'>" + file_path + "</dd>";
}
}
if (change_set.Added.Count > 0) {
event_entry += "<dt>Added</dt>";
foreach (string file_path in change_set.Added) {
string absolute_file_path = SparkleHelpers.CombineMore (SparklePaths.SparklePath,
name, file_path);
change_set.Folder, file_path);
if (File.Exists (absolute_file_path))
event_entry += "<dd><a href='" + absolute_file_path + "'>" + file_path + "</a></dd>";
event_entry += "<dd class='document-added'><a href='" + absolute_file_path + "'>" + file_path + "</a></dd>";
else
event_entry += "<dd>" + file_path + "</dd>";
event_entry += "<dd class='document-added'>" + file_path + "</dd>";
}
}
if (change_set.Deleted.Count > 0) {
event_entry += "<dt>Deleted</dt>";
foreach (string file_path in change_set.Deleted) {
string absolute_file_path = SparkleHelpers.CombineMore (SparklePaths.SparklePath,
name, file_path);
change_set.Folder, file_path);
if (File.Exists (absolute_file_path))
event_entry += "<dd><a href='" + absolute_file_path + "'>" + file_path + "</a></dd>";
event_entry += "<dd class='document-deleted'><a href='" + absolute_file_path + "'>" + file_path + "</a></dd>";
else
event_entry += "<dd>" + file_path + "</dd>";
event_entry += "<dd class='document-deleted'>" + file_path + "</dd>";
}
}
if (change_set.MovedFrom.Count > 0) {
event_entry += "<dt>Moved</dt>";
int i = 0;
foreach (string file_path in change_set.MovedFrom) {
string to_file_path = change_set.MovedTo [i];
string absolute_file_path = SparkleHelpers.CombineMore (SparklePaths.SparklePath,
name, file_path);
change_set.Folder, file_path);
string absolute_to_file_path = SparkleHelpers.CombineMore (SparklePaths.SparklePath,
name, to_file_path);
change_set.Folder, to_file_path);
if (File.Exists (absolute_file_path))
event_entry += "<dd><a href='" + absolute_file_path + "'>" + file_path + "</a><br/>" +
"<span class='moved-arrow'>&rarr;</span> ";
event_entry += "<dd class='document-moved'><a href='" + absolute_file_path + "'>" + file_path + "</a><br/>";
else
event_entry += "<dd>" + file_path + "<br/>" +
"<span class='moved-arrow'>&rarr;</span> ";
event_entry += "<dd class='document-moved'>" + file_path + "<br/>";
if (File.Exists (absolute_to_file_path))
event_entry += "<a href='" + absolute_to_file_path + "'>" + to_file_path + "</a></dd>";
@ -378,8 +388,10 @@ namespace SparkleShare {
event_entry += "</dl>";
event_entries += event_entry_html.Replace ("<!-- $event-entry-content -->", event_entry)
.Replace ("<!-- $event-user-name -->", change_set.UserName)
.Replace ("<!-- $event-avatar-url -->", "file://" + GetAvatar (change_set.UserEmail, 36) )
.Replace ("<!-- $event-time -->", change_set.Timestamp.ToString ("H:mm"));
.Replace ("<!-- $event-avatar-url -->", "file://" + GetAvatar (change_set.UserEmail, 36))
.Replace ("<!-- $event-time -->", change_set.Timestamp.ToString ("H:mm"))
.Replace ("<!-- $event-folder -->", change_set.Folder)
.Replace ("<!-- $event-folder-color -->", AssignColor (change_set.Folder));
}
string day_entry = "";
@ -1015,6 +1027,20 @@ namespace SparkleShare {
web_client.DownloadStringAsync (uri);
}
private string [] tango_palette = new string [] {"#eaab00", "#e37222",
"#3892ab", "#33c2cb", "#19b271", "#9eab05", "#8599a8", "#9ca696",
"#b88454", "#cc0033", "#8f6678", "#8c6cd0", "#796cbf", "#4060af",
"#aa9c8f", "#818a8f"};
private string AssignColor (string s)
{
string hash = GetMD5 (s).Substring (0, 8);
string numbers = Regex.Replace (hash, "[a-z]", "");
int number = 3 + int.Parse (numbers);
return this.tango_palette [number % this.tango_palette.Length];
}
}

View file

@ -28,9 +28,7 @@ using WebKit;
namespace SparkleShare {
public class SparkleLog : Window {
public readonly string LocalPath;
public class SparkleEventLog : Window {
private ScrolledWindow ScrolledWindow;
private MenuBar MenuBar;
@ -39,6 +37,10 @@ namespace SparkleShare {
private SparkleSpinner Spinner;
private string HTML;
private EventBox LogContent;
private List<SparkleChangeSet> change_sets;
private string selected_log = null;
private ComboBox combo_box;
private HBox layout_horizontal;
// Short alias for the translations
@ -48,48 +50,35 @@ namespace SparkleShare {
}
public SparkleLog (string path) : base ("")
public SparkleEventLog () : base ("")
{
LocalPath = path;
string name = System.IO.Path.GetFileName (LocalPath);
SetSizeRequest (480, 640);
Resizable = false;
BorderWidth = 0;
SetPosition (WindowPosition.Center);
// Open slightly off center for each consecutive window
if (SparkleUI.OpenLogs.Count > 0) {
Resizable = false;
BorderWidth = 0;
int x, y;
GetPosition (out x, out y);
Move (x + SparkleUI.OpenLogs.Count * 20, y + SparkleUI.OpenLogs.Count * 20);
}
// TRANSLATORS: {0} is a folder name, and {1} is a server address
Title = String.Format(_("Events in {0}"), name);
Title = _("Recent Events");
IconName = "folder-sparkleshare";
DeleteEvent += Close;
DeleteEvent += Close;
CreateEventLog ();
UpdateEventLog ();
CreateEvents ();
UpdateEvents (false);
UpdateChooser ();
}
private void CreateEventLog ()
private void CreateEvents ()
{
LogContent = new EventBox ();
VBox layout_vertical = new VBox (false, 0);
LogContent = new EventBox ();
ScrolledWindow = new ScrolledWindow ();
ScrolledWindow = new ScrolledWindow ();
WebView = new WebView () {
Editable = false
};
WebView = new WebView () {
Editable = false
};
WebView.HoveringOverLink += delegate (object o, WebKit.HoveringOverLinkArgs args) {
LinkStatus = args.Link;
@ -103,50 +92,83 @@ namespace SparkleShare {
process.StartInfo.Arguments = args.Request.Uri.Replace (" ", "\\ "); // Escape space-characters
process.Start ();
UpdateEventLog ();
UpdateEvents ();
}
};
ScrolledWindow.Add (WebView);
LogContent.Add (ScrolledWindow);
ScrolledWindow.Add (WebView);
LogContent.Add (ScrolledWindow);
this.layout_horizontal = new HBox (true, 0);
this.layout_horizontal.PackStart (new Label (""), true, true, 0);
this.layout_horizontal.PackStart (new Label (""), true, true, 0);
layout_vertical.PackStart (layout_horizontal, false, false, 0);
layout_vertical.PackStart (LogContent, true, true, 0);
HButtonBox dialog_buttons = new HButtonBox {
Layout = ButtonBoxStyle.Edge,
BorderWidth = 12
};
Button open_folder_button = new Button (_("_Open Folder")) {
UseUnderline = true
};
open_folder_button.Clicked += delegate (object o, EventArgs args) {
SparkleShare.Controller.OpenSparkleShareFolder (LocalPath);
};
Button close_button = new Button (Stock.Close);
close_button.Clicked += delegate {
HideAll ();
};
dialog_buttons.Add (open_folder_button);
dialog_buttons.Add (close_button);
// We have to hide the menubar somewhere...
layout_vertical.PackStart (CreateShortcutsBar (), false, false, 0);
layout_vertical.PackStart (dialog_buttons, false, false, 0);
Add (layout_vertical);
ShowAll ();
}
public void UpdateEventLog ()
public void UpdateChooser ()
{
if (HTML == null) { // TODO: there may be a race condition here
if (this.combo_box != null && this.combo_box.Parent != null)
this.layout_horizontal.Remove (this.combo_box);
this.combo_box = new ComboBox ();
this.layout_horizontal.BorderWidth = 9;
CellRendererText cell = new CellRendererText();
this.combo_box.PackStart (cell, false);
this.combo_box.AddAttribute (cell, "text", 0);
ListStore store = new ListStore (typeof (string));
this.combo_box.Model = store;
store.AppendValues (_("All Folders"));
store.AppendValues ("---");
foreach (string folder_name in SparkleShare.Controller.Folders)
store.AppendValues (folder_name);
this.combo_box.Active = 0;
this.combo_box.RowSeparatorFunc = delegate (TreeModel model, TreeIter iter) {
string item = (string) this.combo_box.Model.GetValue (iter, 0);
return (item == "---");
};
this.combo_box.Changed += delegate {
TreeIter iter;
this.combo_box.GetActiveIter (out iter);
string selection = (string) this.combo_box.Model.GetValue (iter, 0);
if (selection.Equals (_("All Folders")))
this.selected_log = null;
else
this.selected_log = selection;
UpdateEvents (false);
};
this.layout_horizontal.PackStart (this.combo_box, true, true, 0);
this.layout_horizontal.ShowAll ();
}
public void UpdateEvents ()
{
UpdateEvents (true);
}
public void UpdateEvents (bool silent)
{
if (!silent) {
LogContent.Remove (LogContent.Child);
Spinner = new SparkleSpinner (22);
LogContent.Add (Spinner);
@ -154,7 +176,17 @@ namespace SparkleShare {
}
Thread thread = new Thread (new ThreadStart (delegate {
Stopwatch watch = new Stopwatch ();
watch.Start ();
this.change_sets = SparkleShare.Controller.GetLog (this.selected_log);
GenerateHTML ();
watch.Stop ();
// A short delay is less annoying than
// a flashing window
if (watch.ElapsedMilliseconds < 500 && !silent)
Thread.Sleep (500 - (int) watch.ElapsedMilliseconds);
AddHTML ();
}));
@ -164,7 +196,7 @@ namespace SparkleShare {
private void GenerateHTML ()
{
HTML = SparkleShare.Controller.GetHTMLLog (System.IO.Path.GetFileName (LocalPath));
HTML = SparkleShare.Controller.GetHTMLLog (this.change_sets);
HTML = HTML.Replace ("<!-- $body-font-size -->", (double) (Style.FontDescription.Size / 1024 + 3) + "px");
HTML = HTML.Replace ("<!-- $day-entry-header-font-size -->", (Style.FontDescription.Size / 1024 + 3) + "px");
@ -179,6 +211,18 @@ namespace SparkleShare {
HTML = HTML.Replace ("<!-- $no-buddy-icon-background-image -->", "file://" +
SparkleHelpers.CombineMore (Defines.PREFIX, "share", "sparkleshare", "icons",
"hicolor", "32x32", "status", "avatar-default.png"));
HTML = HTML.Replace ("<!-- $document-added-background-image -->", "file://" +
SparkleHelpers.CombineMore (Defines.PREFIX, "share", "sparkleshare", "icons",
"hicolor", "12x12", "status", "document-added.png"));
HTML = HTML.Replace ("<!-- $document-edited-background-image -->", "file://" +
SparkleHelpers.CombineMore (Defines.PREFIX, "share", "sparkleshare", "icons",
"hicolor", "12x12", "status", "document-edited.png"));
HTML = HTML.Replace ("<!-- $document-deleted-background-image -->", "file://" +
SparkleHelpers.CombineMore (Defines.PREFIX, "share", "sparkleshare", "icons",
"hicolor", "12x12", "status", "document-deleted.png"));
HTML = HTML.Replace ("<!-- $document-moved-background-image -->", "file://" +
SparkleHelpers.CombineMore (Defines.PREFIX, "share", "sparkleshare", "icons",
"hicolor", "12x12", "status", "document-moved.png"));
}
@ -248,3 +292,4 @@ namespace SparkleShare {
}
}
}

View file

@ -156,20 +156,19 @@ namespace SparkleShare {
if (SparkleShare.Controller.Folders.Count > 0) {
// Creates a menu item for each repository with a link to their logs
foreach (string path in SparkleShare.Controller.Folders) {
foreach (string folder_name in SparkleShare.Controller.Folders) {
Gdk.Pixbuf folder_icon = IconTheme.Default.LoadIcon ("folder", 16,
IconLookupFlags.GenericFallback);
ImageMenuItem subfolder_item = new SparkleMenuItem (Path.GetFileName (path)) {
ImageMenuItem subfolder_item = new SparkleMenuItem (folder_name) {
Image = new Image (folder_icon)
};
// if (repo.HasUnsyncedChanges)
// if (repo.HasUnsyncedChanges) TODO
// folder_action.IconName = "dialog-error";
subfolder_item.Activated += OpenEventLogDelegate (path);
subfolder_item.Activated += OpenFolderDelegate (folder_name);
Menu.Add (subfolder_item);
}
@ -206,7 +205,24 @@ namespace SparkleShare {
Menu.Add (sync_item);
Menu.Add (new SeparatorMenuItem ());
MenuItem notify_item;
MenuItem recent_events_item = new MenuItem (_("Show Recent Events"));
if (SparkleShare.Controller.FirstRun) // TODO in mac version too
recent_events_item.Sensitive = false;
recent_events_item.Activated += delegate {
Application.Invoke (delegate {
if (SparkleUI.EventLog == null)
SparkleUI.EventLog = new SparkleEventLog ();
SparkleUI.EventLog.ShowAll ();
SparkleUI.EventLog.Present ();
});
};
Menu.Add (recent_events_item);
MenuItem notify_item;
if (SparkleShare.Controller.NotificationsEnabled)
notify_item = new MenuItem (_("Turn Notifications Off"));
@ -246,10 +262,10 @@ namespace SparkleShare {
// A method reference that makes sure that opening the
// event log for each repository works correctly
private EventHandler OpenEventLogDelegate (string path)
private EventHandler OpenFolderDelegate (string name)
{
return delegate {
SparkleShare.UI.AddEventLog (path);
SparkleShare.Controller.OpenSparkleShareFolder (name);
};
}

View file

@ -33,7 +33,7 @@ namespace SparkleShare {
public class SparkleUI {
public static SparkleStatusIcon StatusIcon;
public static List <SparkleLog> OpenLogs;
public static SparkleEventLog EventLog;
public static SparkleIntro Intro;
@ -49,12 +49,12 @@ namespace SparkleShare {
// Initialize the application
Application.Init ();
foreach (SparkleChangeSet change_set in SparkleShare.Controller.GetLog ()) {
Console.WriteLine (change_set.Timestamp.ToString ());
}
// Create the statusicon
StatusIcon = new SparkleStatusIcon ();
// Keep track of which event logs are open
OpenLogs = new List <SparkleLog> ();
if (SparkleShare.Controller.FirstRun) {
Intro = new SparkleIntro ();
Intro.ShowAccountForm ();
@ -75,10 +75,8 @@ namespace SparkleShare {
SparkleShare.Controller.NotificationRaised += delegate (string user_name, string user_email,
string message, string repository_path) {
Application.Invoke (delegate {
foreach (SparkleLog log in OpenLogs) {
if (log.LocalPath.Equals (repository_path))
log.UpdateEventLog ();
}
if (EventLog != null)
EventLog.UpdateEvents ();
if (!SparkleShare.Controller.NotificationsEnabled)
return;
@ -91,10 +89,6 @@ namespace SparkleShare {
else
bubble.Icon = SparkleUIHelpers.GetIcon ("avatar-default", 32);
bubble.AddAction ("", "Show Events", delegate {
AddEventLog (repository_path);
});
bubble.Show ();
});
};
@ -111,38 +105,25 @@ namespace SparkleShare {
SparkleShare.Controller.AvatarFetched += delegate {
Application.Invoke (delegate {
foreach (SparkleLog log in OpenLogs)
log.UpdateEventLog ();
if (EventLog != null)
EventLog.UpdateEvents ();
});
};
SparkleShare.Controller.OnIdle += delegate {
Application.Invoke (delegate {
foreach (SparkleLog log in OpenLogs)
log.UpdateEventLog ();
if (EventLog != null)
EventLog.UpdateEvents ();
});
};
}
public void AddEventLog (string path)
{
SparkleLog log = SparkleUI.OpenLogs.Find (delegate (SparkleLog l) {
return l.LocalPath.Equals (path);
});
// Check whether the log is already open, create a new one if
// that's not the case or present it to the user if it is
if (log == null) {
OpenLogs.Add (new SparkleLog (path));
OpenLogs [OpenLogs.Count - 1].ShowAll ();
OpenLogs [OpenLogs.Count - 1].Present ();
} else {
log.ShowAll ();
log.Present ();
}
}
SparkleShare.Controller.FolderListChanged += delegate {
Application.Invoke (delegate {
if (EventLog != null)
EventLog.UpdateChooser ();
});
};
}
// Runs the application
public void Run ()

1960
data/actions.svg Normal file

File diff suppressed because it is too large Load diff

After

Width:  |  Height:  |  Size: 64 KiB

View file

@ -1,20 +1,16 @@
<div class='event-entry'>
<div class='event-entry-content'>
<div class='no-buddy-icon'>
<div class='buddy-icon' style='background-image: url("<!-- $event-avatar-url -->");'></div>
</div>
<div class='event-info'>
<b><!-- $event-user-name --></b>
<!-- $event-entry-content -->
<div class='wrapper'>
<div class='no-buddy-icon'>
<div class='buddy-icon' style='background-image: url("<!-- $event-avatar-url -->");'></div>
</div>
<b><!-- $event-user-name --></b><br/>
<small><!-- $event-time --></small>
</div>
<div class='event-time' style='background-color: <!-- $event-folder-color -->'><!-- $event-folder --></div>
</div>
<div class='event-time'><!-- $event-time --></div>
<!-- $event-entry-content -->
<div style='clear: both'></div>
</div>
</div>

View file

@ -4,7 +4,7 @@
<title>SparkleShare Event Log</title>
<style>
body {
background-color: #f0f0f0;
background-color: #dedede;
color: <!-- $body-color -->;
font-size: <!-- $body-font-size -->;
font-family: <!-- $body-font-family -->;
@ -16,7 +16,7 @@
small {
font-size: <!-- $small-font-size -->;
color: <!-- $small-color -->;
color: <!-- $secondary-font-color -->;
}
.moved-arrow {
@ -25,13 +25,9 @@
.day-entry-header {
font-size: <!-- $day-entry-header-font-size -->;
color: #babdb6;
text-align: center;
width: 90%;
text-shadow: 0 1px 0 rgba(255, 255, 255, 1.0);
color: #444;
margin-bottom: 9px;
margin-left: auto;
margin-right: auto;
margin-left: 30px;
}
.day-entry-content {
@ -48,43 +44,70 @@
}
.event-time {
opacity: 0.8;
font-size: 80%;
color: <!-- $secondary-font-color -->;
float: right;
color: #fff;
float: right;
padding: 3px 15px;
font-weight: bold;
-webkit-border-radius: 100px;
}
.event-entry-content {
display: block;
width: 400px;
background-color: #fff;
width: 440px;
background-color: #f0f0f0;
margin-left: auto;
margin-right: auto;
margin-bottom: 9px;
padding: 18px;
-webkit-border-radius: 6px;
border: #ddd 1px solid;
margin-bottom: 12px;
padding: 0px;
padding-bottom: 6px;
border: #ccc 1px solid;
}
.wrapper {
float: left;
}
dl {
padding: 0;
margin: 0;
padding-bottom: 15px;
}
dt {
padding-bottom: 12px;
padding-top: 12px;
font-size: 80%;
color: <!-- $secondary-font-color -->;
padding : 0;
margin: 0;
}
dd {
width: 300px;
width: 90%;
overflow: hidden;
padding-left: 0;
margin-left: 12px;
text-overflow: ellipsis;
padding-bottom: 9px;
padding: 0;
padding-top: 2px;
padding-bottom: 4px;
padding-left: 22px;
margin: 0;
margin-bottom: 2px;
margin-left: 12px;
border-bottom: 1px solid #ddd;
background-repeat: no-repeat;
background-position: center left;
}
dd:last-child {
border: none;
}
.document-added {
background-image: url('<!-- $document-added-background-image -->');
}
.document-deleted {
background-image: url('<!-- $document-deleted-background-image -->');
}
.document-edited {
background-image: url('<!-- $document-edited-background-image -->');
}
.document-moved {
background-image: url('<!-- $document-moved-background-image -->');
}
.no-buddy-icon {
@ -104,6 +127,11 @@
.event-info {
float: left;
padding: 15px;
margin-bottom: 6px;
width: 410px;
background-color: #fff;
border-bottom: 1px #ccc solid;
}
</style>
</head>

View file

@ -25,10 +25,10 @@ app_theme_icons = \
status,avatar-default-24.png \
status,avatar-default-32.png \
status,avatar-default-48.png \
status,document-added-16.png \
status,document-edited-16.png \
status,document-moved-16.png \
status,document-removed-16.png \
status,document-added-12.png \
status,document-edited-12.png \
status,document-deleted-12.png \
status,document-moved-12.png \
status,dialog-error-16.png \
status,dialog-error-24.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 459 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 487 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 333 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 618 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 610 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 589 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 318 B