From a7a0bf80426466ad59132e92c357e456e37748b3 Mon Sep 17 00:00:00 2001 From: John Luke Date: Fri, 18 Jun 2004 21:38:57 +0000 Subject: [PATCH] 2004-06-18 John Luke * sample/rsvg/Makefile.am: do not reference gnome-sharp and art-sharp * sample/rsvg/svghelloworld.cs: rework with just gtk (no gnome deps) svn path=/trunk/gtk-sharp/; revision=29923 --- ChangeLog | 5 +++++ sample/rsvg/Makefile.am | 2 +- sample/rsvg/svghelloworld.cs | 34 ++++++++++++---------------------- 3 files changed, 18 insertions(+), 23 deletions(-) diff --git a/ChangeLog b/ChangeLog index 23e6630fb..b093f55f9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2004-06-18 John Luke + + * sample/rsvg/Makefile.am: do not reference gnome-sharp and art-sharp + * sample/rsvg/svghelloworld.cs: rework with just gtk (no gnome deps) + 2004-06-15 Mike Kestner * gtk/Gtk.metadata : hide the button_new_from_stock ctor. diff --git a/sample/rsvg/Makefile.am b/sample/rsvg/Makefile.am index 0960cbfd0..b448da82f 100644 --- a/sample/rsvg/Makefile.am +++ b/sample/rsvg/Makefile.am @@ -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 diff --git a/sample/rsvg/svghelloworld.cs b/sample/rsvg/svghelloworld.cs index d92c12199..106a2241b 100644 --- a/sample/rsvg/svghelloworld.cs +++ b/sample/rsvg/svghelloworld.cs @@ -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(); } }