[build] Add webkit

This commit is contained in:
Hylke Bons 2010-11-06 15:05:48 +00:00
parent ad3b78b911
commit a1c8c8b321
9 changed files with 107 additions and 11 deletions

8
README
View file

@ -39,6 +39,8 @@ SparkleShare currently requires:
- intltool
- nautilus-python
- pygtk
- webkitgtk
- webkit-sharp
Run the service:
@ -54,8 +56,9 @@ For help:
Note:
SparkleShare creates its own RSA keypair in ~/.ssh and uses that for authentication.
Please mind this if you're planning to set up your own server by hand.
SparkleShare creates its own RSA keypair in ~/.ssh and uses that for
authentication. Please mind this if you're planning to set up your own server
by hand.
Build
@ -71,6 +74,7 @@ To build SparkleShare you need:
- ndesk-dbus-glib-devel >= 0.6
- nautilus-python-devel
- nant
- webkit-sharp-devel
You can build and install SparkleShare like this:

View file

@ -4,7 +4,7 @@ SUBDIRS = \
ASSEMBLY = SparkleShare
TARGET = exe
LINK = $(REF_SPARKLESHARE)
LINK = $(REF_SPARKLESHARE) -pkg:webkit-sharp-1.0
SOURCES = \

View file

@ -21,6 +21,7 @@ using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Text.RegularExpressions;
using WebKit;
namespace SparkleShare {
@ -30,6 +31,7 @@ namespace SparkleShare {
private VBox LayoutVertical;
private ScrolledWindow ScrolledWindow;
private MenuBar MenuBar;
private WebView WebView;
// Short alias for the translations
public static string _ (string s)
@ -184,7 +186,7 @@ namespace SparkleShare {
List <SparkleCommit> commits = new List <SparkleCommit> ();
foreach (SparkleRepo repo in SparkleShare.Controller.Repositories) {
// Controller.GetCommits (LocalPath);
// Get commits from the repository
if (repo.LocalPath.Equals (LocalPath)) {
@ -479,13 +481,16 @@ namespace SparkleShare {
}
WebView = new WebView ();
ScrolledWindow = new ScrolledWindow ();
EventBox wrapper = new EventBox ();
wrapper.ModifyBg (StateType.Normal, background_color);
wrapper.Add (layout_vertical);
WebView.LoadHtmlString ("<b>test</b>", "");
ScrolledWindow.AddWithViewport (wrapper);
ScrolledWindow.AddWithViewport (WebView);
(ScrolledWindow.Child as Viewport).ShadowType = ShadowType.None;
return ScrolledWindow;

View file

@ -55,6 +55,7 @@ namespace SparkleShare {
SetNormalState ();
CreateMenu ();
// TODO: Move all event hookups to SparkleUI
SparkleShare.Controller.FolderSizeChanged += delegate {
Application.Invoke (delegate {
@ -296,6 +297,8 @@ namespace SparkleShare {
Menu.Add (status_menu_item);
Menu.ReorderChild (status_menu_item, 0);
// TODO: relist the folders as well
Menu.ShowAll ();
}

View file

@ -1,5 +1,6 @@
SUBDIRS = \
icons
icons \
html
EXTRA_DIST = \
sparkleshare-gnome.svg \
@ -11,10 +12,10 @@ MAINTAINERCLEANFILES = \
Makefile.in
install-data-local:
$(mkinstalldirs) $(DESTDIR)$(datadir)/pixmaps
$(INSTALL_DATA) $(srcdir)/side-splash.png $(DESTDIR)$(datadir)/pixmaps/side-splash.png
$(INSTALL_DATA) $(srcdir)/sparkleshare-about.png $(DESTDIR)$(datadir)/pixmaps/sparkleshare-about.png
$(mkinstalldirs) $(pkgdatadir)/pixmaps
$(INSTALL_DATA) $(srcdir)/side-splash.png $(pkgdatadir)/pixmaps/side-splash.png
$(INSTALL_DATA) $(srcdir)/sparkleshare-about.png $(pkgdatadir)/pixmaps/sparkleshare-about.png
uninstall-hook:
rm -f $(DESTDIR)$(datadir)/pixmaps/side-splash.png
rm -f $(DESTDIR)$(datadir)/pixmaps/sparkleshare-about.png
rm -f $(pkgdatadir)/pixmaps/side-splash.png
rm -f $(pkgdatadir)/pixmaps/sparkleshare-about.png

18
data/html/Makefile.am Normal file
View file

@ -0,0 +1,18 @@
EXTRA_DIST = \
day-entry.html \
event-entry.html \
event-log.html
MAINTAINERCLEANFILES = \
Makefile.in
install-data-local:
$(mkinstalldirs) $(pkgdatadir)/html
$(INSTALL_DATA) $(srcdir)/day-entry.html $(pkgdatadir)/html/day-entry.html
$(INSTALL_DATA) $(srcdir)/event-entry.html $(pkgdatadir)/html/event-entry.html
$(INSTALL_DATA) $(srcdir)/event-log.html $(pkgdatadir)/html/event-log.html
uninstall-hook:
rm -f $(pkgdatadir)/html/day-entry.html
rm -f $(pkgdatadir)/html/event-entry.html
rm -f $(pkgdatadir)/html/event-log.html

11
data/html/day-entry.html Normal file
View file

@ -0,0 +1,11 @@
<div class='day-entry'>
<div class='day-entry-header'>
<!-- $day-entry-header-->
</div>
<div class='day-entry-content'>
<!-- $day-entry-content-->
</div>
</div>

View file

@ -0,0 +1,11 @@
<div class='event-entry'>
<div class='event-entry-header'>
<!-- $event-entry-header-->
</div>
<div class='event-entry-content'>
<!-- $event-entry-content-->
</div>
</div>

43
data/html/event-log.html Normal file
View file

@ -0,0 +1,43 @@
<!doctype html>
<html>
<head>
<title>Event Log</title>
<link rel="stylesheet" media="screen" href="style.css" />
<style>
body {
background-color: <!-- $body-background-color -->;
color: <!-- $body-color -->;
font-size: <!-- $body-font-size -->;
}
small {
font-size: <!-- $small-font-size -->;
color: <!-- $small-color -->;
}
.day-entry-header {
background-color: <!-- $day-entry-header-background-color -->;
}
a {
color: <!-- $a-color -->;
text-decoration: none;
}
a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<!-- $log-->
</body>
</html>