[Gtk-sharp-list] build broken? rsvg-sharp without gnome-sharp

John Luke jluke@users.sourceforge.net
Sun, 13 Jun 2004 15:52:19 -0400


--=-MPJnNGZahM1ERFuzsrRA
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On Mon, 2004-06-14 at 04:07 +0900, Atsushi Eno wrote:
> Hi,
> 
> I was trying fresh gtk-sharp build from cvs but it wasn't successful.
> 
> make[3]: Entrying directory '/usr/local/src/gtk-sharp/sample/rsvg'
> make[3]: *** No rule to make targer '../../gnome/gnome-sharp.dll',
> needed by 'svghelloworld.exe'. Stop.
> make[3]: Leaving directory '/usr/local/src/gtk-sharp/sample/rsvg'
> 
> I didn't have some dependencies (maybe fedora core 2 default),
> thus configure disabled gnome-sharp.dll.
> 
> After enabling gnome-sharp.dll, it built fine.
> 

I reworked the rsvg example to work with just Gtk, patch is attached, ok
to commit?

There may be other cases where the Makefile's only check for one feature
and not others as it should though.

--=-MPJnNGZahM1ERFuzsrRA
Content-Disposition: attachment; filename=rsvg.patch
Content-Type: text/x-patch; name=rsvg.patch; charset=utf-8
Content-Transfer-Encoding: 7bit

? rsvg.patch
Index: Makefile.am
===================================================================
RCS file: /cvs/public/gtk-sharp/sample/rsvg/Makefile.am,v
retrieving revision 1.3
diff -u -r1.3 Makefile.am
--- Makefile.am	7 May 2004 14:22:20 -0000	1.3
+++ Makefile.am	13 Jun 2004 19:00:22 -0000
@@ -1,4 +1,4 @@
-assemblies = ../../glib/glib-sharp.dll ../../pango/pango-sharp.dll ../../atk/atk-sharp.dll ../../gdk/gdk-sharp.dll ../../gtk/gtk-sharp.dll ../../glade/glade-sharp.dll ../../art/art-sharp.dll ../../gnome/gnome-sharp.dll ../../rsvg/rsvg-sharp.dll
+assemblies = ../../glib/glib-sharp.dll ../../pango/pango-sharp.dll ../../atk/atk-sharp.dll ../../gdk/gdk-sharp.dll ../../gtk/gtk-sharp.dll ../../rsvg/rsvg-sharp.dll
 references = $(addprefix /r:, $(assemblies))
 
 if ENABLE_RSVG
Index: svghelloworld.cs
===================================================================
RCS file: /cvs/public/gtk-sharp/sample/rsvg/svghelloworld.cs,v
retrieving revision 1.2
diff -u -r1.2 svghelloworld.cs
--- svghelloworld.cs	10 Feb 2004 20:35:40 -0000	1.2
+++ svghelloworld.cs	13 Jun 2004 19:00:22 -0000
@@ -3,48 +3,38 @@
 //
 // Author: Charles Iliya Krempeaux
 //
+using System;
+using Gtk;
 
     class SvgHelloWorld
     {
-            static void Main(string[] args)
+            static void Main (string[] args)
             {
-                    Gnome.Program program =
-                    new Gnome.Program("Hello World", "1.0", Gnome.Modules.UI, args);
-
-                    MyMainWindow app = new MyMainWindow(program);
-                    app.Show();
+		    Application.Init ();
+                    MyMainWindow app = new MyMainWindow ();
+                    app.ShowAll ();
  
-                    program.Run();
+                    Application.Run ();
             }
     }
 
-
-
-    class MyMainWindow
-            : Gnome.App
+    class MyMainWindow : Gtk.Window
     {
-            Gnome.Program program;
-
-            public MyMainWindow(Gnome.Program gnome_program)
-                    : base("SVG Hello World", "SVG Hello World")
+            public MyMainWindow () : base ("SVG Hello World")
             {
-                    this.program = gnome_program;
-
                     this.DeleteEvent += new Gtk.DeleteEventHandler(delete_event);
-
-
                     string svg_file_name = "sample.svg";
-                    Gdk.Pixbuf pixbuf = Rsvg.Tool.PixbufFromFile(svg_file_name);
+                    Gdk.Pixbuf pixbuf = Rsvg.Tool.PixbufFromFile (svg_file_name);
 
                     Gtk.Image  image = new Gtk.Image();
                     image.Pixbuf = pixbuf;
 
-                    this.Contents = image;
+                    this.Add (image);
             }
 
             private void delete_event(object obj, Gtk.DeleteEventArgs args)
             {
-                    this.program.Quit();
+                    Application.Quit();
             }
     }
 

--=-MPJnNGZahM1ERFuzsrRA--