From 83b79eb23390beda1fb04b00be48351fcf1b98af Mon Sep 17 00:00:00 2001 From: Chip Black Date: Wed, 3 Jun 2009 03:07:11 -0500 Subject: [PATCH] Moved SoupSettings down to core --- Makefile | 8 ++++++-- .../SoupSettings.c => SoupSettings.c | 0 WebThing.cs | 8 +++++++- WebThing.dll.config | 3 +++ plugins.conf | 1 - plugins/Makefile | 2 +- plugins/SoupSettings/Makefile | 16 ---------------- plugins/SoupSettings/SoupSettings.cs | 12 ------------ 8 files changed, 17 insertions(+), 33 deletions(-) rename plugins/SoupSettings/SoupSettings.c => SoupSettings.c (100%) create mode 100644 WebThing.dll.config delete mode 100644 plugins/SoupSettings/Makefile delete mode 100644 plugins/SoupSettings/SoupSettings.cs diff --git a/Makefile b/Makefile index 1ac11b5..48a29e5 100644 --- a/Makefile +++ b/Makefile @@ -1,15 +1,19 @@ +CFLAGS = `pkg-config glib-2.0 libsoup-2.4 webkit-1.0 --cflags` +LDFLAGS = `pkg-config glib-2.0 libsoup-2.4 webkit-1.0 --libs` CSFLAGS = -debug references = -r:webkit-sharp.dll -pkg:gtk-sharp-2.0 all: main.exe plugins -main.exe: main.cs WebThing.dll +main.exe: main.cs WebThing.dll SoupSettings.so gmcs $(CSFLAGS) -r:WebThing.dll main.cs WebThing.dll: WebThing.cs gmcs $(CSFLAGS) $(references) -target:library -out:$@ $< +SoupSettings.so: SoupSettings.c + $(CC) $(CFLAGS) -shared $(LDFLAGS) $< -o $@ + plugins: make -C plugins - .PHONY: plugins diff --git a/plugins/SoupSettings/SoupSettings.c b/SoupSettings.c similarity index 100% rename from plugins/SoupSettings/SoupSettings.c rename to SoupSettings.c diff --git a/WebThing.cs b/WebThing.cs index f325ec3..4bccfbb 100644 --- a/WebThing.cs +++ b/WebThing.cs @@ -3,6 +3,7 @@ using System.Collections.Generic; using System.Reflection; using System.IO; using System.Text.RegularExpressions; +using System.Runtime.InteropServices; using Gtk; using GtkSharp; using WebKit; @@ -47,13 +48,16 @@ namespace bytex64.WebThing { public Dictionary Options; public string[] Arguments; + [DllImport ("SoupSettings.dll")] + private static extern void soup_settings(); + public void Run() { Application.Init(); ParseArgs(); _Window = new Gtk.Window("WebThing"); - _Window.SetWmclass("WebThing", "webthing"); + _Window.SetWmclass("webthing", "WebThing"); _Window.Role = "browser"; _Window.Destroyed += delegate { Quit(); }; @@ -70,6 +74,8 @@ namespace bytex64.WebThing { _WebView.TitleChanged += delegate(object o, TitleChangedArgs e) { _Window.Title = e.Title + " - WebThing"; }; + soup_settings(); + _ScrolledWindow.Add(_WebView); _Window.ShowAll(); diff --git a/WebThing.dll.config b/WebThing.dll.config new file mode 100644 index 0000000..77cd104 --- /dev/null +++ b/WebThing.dll.config @@ -0,0 +1,3 @@ + + + diff --git a/plugins.conf b/plugins.conf index 271eca5..e8d29e4 100644 --- a/plugins.conf +++ b/plugins.conf @@ -1,4 +1,3 @@ -SoupSettings LoadProgress Vimish FFNav diff --git a/plugins/Makefile b/plugins/Makefile index 1583fde..993f955 100644 --- a/plugins/Makefile +++ b/plugins/Makefile @@ -1,7 +1,7 @@ CSFLAGS = -debug references = -r:../webkit-sharp.dll -pkg:gtk-sharp-2.0 -all: Vimish.dll FFNav.dll DefaultPage.dll SoupSettings.dll LoadProgress.dll +all: Vimish.dll FFNav.dll DefaultPage.dll LoadProgress.dll clean: rm -f *.dll *.mdb *.so diff --git a/plugins/SoupSettings/Makefile b/plugins/SoupSettings/Makefile deleted file mode 100644 index 6defa6a..0000000 --- a/plugins/SoupSettings/Makefile +++ /dev/null @@ -1,16 +0,0 @@ -CFLAGS = `pkg-config glib-2.0 libsoup-2.4 webkit-1.0 --cflags` -LDFLAGS = `pkg-config glib-2.0 libsoup-2.4 webkit-1.0 --libs` -CSFLAGS = -debug -references = -r:../../webkit-sharp.dll -pkg:gtk-sharp-2.0 - -all: ../SoupSettings.dll - -clean: - rm -f *.dll *.mdb ../SoupSettings.dll ../SoupSettings.so - -../%.dll: %.cs %.so ../../WebThing.dll - gmcs $(CSFLAGS) $(references) -r:../../WebThing.dll -target:library -out:$@ $< - -%.so: %.c - $(CC) $(CFLAGS) -shared $(LDFLAGS) $< -o $@ - cp $@ ../ diff --git a/plugins/SoupSettings/SoupSettings.cs b/plugins/SoupSettings/SoupSettings.cs deleted file mode 100644 index 1637c97..0000000 --- a/plugins/SoupSettings/SoupSettings.cs +++ /dev/null @@ -1,12 +0,0 @@ -using System; -using System.Runtime.InteropServices; -using bytex64.WebThing; - -public class Plugin { - [DllImport ("SoupSettings.so")] - private static extern void soup_settings(); - - public Plugin(WebThing wt) { - soup_settings(); - } -} -- 2.25.1