From a02e962425c5c4c90bd4f10c873ecf47c5006bf0 Mon Sep 17 00:00:00 2001 From: Gonzalo Paniagua Javier Date: Sat, 22 Mar 2003 17:48:43 +0000 Subject: [PATCH] 2003-03-22 Gonzalo Paniagua Javier * sample/Fifteen.cs: work-around for bug 106145 in gnome bugzilla. * sample/DbClient/client.cs: updated to make it compile again. svn path=/trunk/gtk-sharp/; revision=12752 --- ChangeLog | 5 +++++ sample/DbClient/client.cs | 19 +++++++++---------- sample/Fifteen.cs | 7 +++++-- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/ChangeLog b/ChangeLog index 4fd413f40..3573eb13a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2003-03-22 Gonzalo Paniagua Javier + + * sample/Fifteen.cs: work-around for bug 106145 in gnome bugzilla. + * sample/DbClient/client.cs: updated to make it compile again. + 2003-03-22 Gonzalo Paniagua Javier * glue/adjustment.c: diff --git a/sample/DbClient/client.cs b/sample/DbClient/client.cs index c57edd316..ff7f48e81 100644 --- a/sample/DbClient/client.cs +++ b/sample/DbClient/client.cs @@ -44,7 +44,7 @@ class Client { PackToolbar (); box.PackStart (toolbar, false, false, 0); - UpdateView (null); + UpdateView (); status = new Statusbar (); box.PackEnd (status, false, false, 0); @@ -100,7 +100,7 @@ class Client { args.RetVal = true; } - static void UpdateView (Gtk.Object o) + static void UpdateView () { if (tableau != null) tableau.Destroy (); @@ -195,7 +195,7 @@ class Client { dialog.ShowAll (); } - static void Db_Remove (Gtk.Object o) + static void Db_Remove () { if (dialog != null) { return; @@ -259,7 +259,7 @@ class Client { return hbox ; } - static void Db_Update (Gtk.Object o) + static void Db_Update () { if (dialog != null) { return; @@ -288,7 +288,7 @@ class Client { dialog.ShowAll (); } - static void Quit (Gtk.Object o) + static void Quit () { Application.Quit (); } @@ -297,7 +297,7 @@ class Client { { try { Conn.Insert (UInt32.Parse (id_entry.Text), name_entry.Text, address_entry.Text); - UpdateView (o as Gtk.Object); + UpdateView (); } catch (Exception e) { PushMessage (e.Message); } @@ -309,7 +309,7 @@ class Client { { try { Conn.Delete (UInt32.Parse (id_entry.Text)); - UpdateView (o as Gtk.Object); + UpdateView (); } catch (Exception e) { PushMessage (e.Message); } @@ -321,7 +321,7 @@ class Client { { try { Conn.Update (UInt32.Parse (id_entry.Text), name_entry.Text, address_entry.Text); - UpdateView (o as Gtk.Object); + UpdateView (); } catch (Exception e) { PushMessage (e.Message); } @@ -452,8 +452,7 @@ class IdConnection : IDisposable public IdConnection () { cnc = new SqlConnection (); - string connectionString = "" + - "" + + string connectionString = "hostaddr=127.0.0.1;" + "user=monotest;" + "dbname=monotest"; diff --git a/sample/Fifteen.cs b/sample/Fifteen.cs index d3e81bf31..73f2f6391 100644 --- a/sample/Fifteen.cs +++ b/sample/Fifteen.cs @@ -248,10 +248,12 @@ public class BoardPiece : Gnome.CanvasGroup switch (args.Event.Type) { case EventType.EnterNotify: piece.Text.FillColor = "white"; + args.RetVal = true; break; case EventType.LeaveNotify: piece.Text.FillColor = "black"; + args.RetVal = true; break; case EventType.ButtonPress: @@ -286,16 +288,17 @@ public class BoardPiece : Gnome.CanvasGroup piece.Board [piece.Position] = null; piece.Position = new_position; piece.Move (dx * PIECE_SIZE, dy * PIECE_SIZE); + canvas.UpdateNow (); } else Print_Position ("to", piece.Position, false); + args.RetVal = true; break; default: + args.RetVal = false; break; } - - args.RetVal = false; } static void Print_Position (string text, int position, bool newLine)