Moved SoupSettings down to core
authorChip Black <bytex64@bytex64.net>
Wed, 3 Jun 2009 08:07:11 +0000 (03:07 -0500)
committerChip Black <bytex64@bytex64.net>
Wed, 3 Jun 2009 08:07:11 +0000 (03:07 -0500)
Makefile
SoupSettings.c [moved from plugins/SoupSettings/SoupSettings.c with 100% similarity]
WebThing.cs
WebThing.dll.config [new file with mode: 0644]
plugins.conf
plugins/Makefile
plugins/SoupSettings/Makefile [deleted file]
plugins/SoupSettings/SoupSettings.cs [deleted file]

index 1ac11b5..48a29e5 100644 (file)
--- 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
index f325ec3..4bccfbb 100644 (file)
@@ -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<string,string> 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 (file)
index 0000000..77cd104
--- /dev/null
@@ -0,0 +1,3 @@
+<configuration>
+    <dllmap dll="SoupSettings.dll" target="SoupSettings.so"/>
+</configuration>
index 271eca5..e8d29e4 100644 (file)
@@ -1,4 +1,3 @@
-SoupSettings
 LoadProgress
 Vimish
 FFNav
index 1583fde..993f955 100644 (file)
@@ -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 (file)
index 6defa6a..0000000
+++ /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 (file)
index 1637c97..0000000
+++ /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();
-       }
-}