From a1c8c8b321a424dc807949de633a178555b255ea Mon Sep 17 00:00:00 2001 From: Hylke Bons Date: Sat, 6 Nov 2010 15:05:48 +0000 Subject: [PATCH] [build] Add webkit --- README | 8 ++++-- SparkleShare/Makefile.am | 2 +- SparkleShare/SparkleLog.cs | 9 +++++-- SparkleShare/SparkleStatusIcon.cs | 3 +++ data/Makefile.am | 13 +++++----- data/html/Makefile.am | 18 +++++++++++++ data/html/day-entry.html | 11 ++++++++ data/html/event-entry.html | 11 ++++++++ data/html/event-log.html | 43 +++++++++++++++++++++++++++++++ 9 files changed, 107 insertions(+), 11 deletions(-) create mode 100644 data/html/Makefile.am create mode 100644 data/html/day-entry.html create mode 100644 data/html/event-entry.html create mode 100644 data/html/event-log.html diff --git a/README b/README index b57e249c..49c5889b 100644 --- a/README +++ b/README @@ -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: diff --git a/SparkleShare/Makefile.am b/SparkleShare/Makefile.am index 28025497..0f218304 100644 --- a/SparkleShare/Makefile.am +++ b/SparkleShare/Makefile.am @@ -4,7 +4,7 @@ SUBDIRS = \ ASSEMBLY = SparkleShare TARGET = exe -LINK = $(REF_SPARKLESHARE) +LINK = $(REF_SPARKLESHARE) -pkg:webkit-sharp-1.0 SOURCES = \ diff --git a/SparkleShare/SparkleLog.cs b/SparkleShare/SparkleLog.cs index 4984883c..d54bbdad 100644 --- a/SparkleShare/SparkleLog.cs +++ b/SparkleShare/SparkleLog.cs @@ -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 commits = new List (); 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 ("test", ""); - ScrolledWindow.AddWithViewport (wrapper); + ScrolledWindow.AddWithViewport (WebView); (ScrolledWindow.Child as Viewport).ShadowType = ShadowType.None; return ScrolledWindow; diff --git a/SparkleShare/SparkleStatusIcon.cs b/SparkleShare/SparkleStatusIcon.cs index 33cfd984..17b0c53c 100644 --- a/SparkleShare/SparkleStatusIcon.cs +++ b/SparkleShare/SparkleStatusIcon.cs @@ -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 (); } diff --git a/data/Makefile.am b/data/Makefile.am index 575bf8d8..78f0eb5e 100644 --- a/data/Makefile.am +++ b/data/Makefile.am @@ -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 diff --git a/data/html/Makefile.am b/data/html/Makefile.am new file mode 100644 index 00000000..5b5629d9 --- /dev/null +++ b/data/html/Makefile.am @@ -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 diff --git a/data/html/day-entry.html b/data/html/day-entry.html new file mode 100644 index 00000000..44bba4e7 --- /dev/null +++ b/data/html/day-entry.html @@ -0,0 +1,11 @@ +
+ +
+ +
+ +
+ +
+ +
diff --git a/data/html/event-entry.html b/data/html/event-entry.html new file mode 100644 index 00000000..4a1193b7 --- /dev/null +++ b/data/html/event-entry.html @@ -0,0 +1,11 @@ +
+ +
+ +
+ +
+ +
+ +
diff --git a/data/html/event-log.html b/data/html/event-log.html new file mode 100644 index 00000000..618a380f --- /dev/null +++ b/data/html/event-log.html @@ -0,0 +1,43 @@ + + + + + + Event Log + + + + + + + + + + +