mirror of
https://github.com/Ryujinx/GtkSharp.git
synced 2025-02-28 12:16:45 +00:00
2003-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
* 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
This commit is contained in:
parent
d7a08db9f6
commit
a02e962425
|
@ -1,3 +1,8 @@
|
||||||
|
2003-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
|
||||||
|
|
||||||
|
* 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 <gonzalo@ximian.com>
|
2003-03-22 Gonzalo Paniagua Javier <gonzalo@ximian.com>
|
||||||
|
|
||||||
* glue/adjustment.c:
|
* glue/adjustment.c:
|
||||||
|
|
|
@ -44,7 +44,7 @@ class Client {
|
||||||
PackToolbar ();
|
PackToolbar ();
|
||||||
box.PackStart (toolbar, false, false, 0);
|
box.PackStart (toolbar, false, false, 0);
|
||||||
|
|
||||||
UpdateView (null);
|
UpdateView ();
|
||||||
|
|
||||||
status = new Statusbar ();
|
status = new Statusbar ();
|
||||||
box.PackEnd (status, false, false, 0);
|
box.PackEnd (status, false, false, 0);
|
||||||
|
@ -100,7 +100,7 @@ class Client {
|
||||||
args.RetVal = true;
|
args.RetVal = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void UpdateView (Gtk.Object o)
|
static void UpdateView ()
|
||||||
{
|
{
|
||||||
if (tableau != null)
|
if (tableau != null)
|
||||||
tableau.Destroy ();
|
tableau.Destroy ();
|
||||||
|
@ -195,7 +195,7 @@ class Client {
|
||||||
dialog.ShowAll ();
|
dialog.ShowAll ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Db_Remove (Gtk.Object o)
|
static void Db_Remove ()
|
||||||
{
|
{
|
||||||
if (dialog != null) {
|
if (dialog != null) {
|
||||||
return;
|
return;
|
||||||
|
@ -259,7 +259,7 @@ class Client {
|
||||||
return hbox ;
|
return hbox ;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Db_Update (Gtk.Object o)
|
static void Db_Update ()
|
||||||
{
|
{
|
||||||
if (dialog != null) {
|
if (dialog != null) {
|
||||||
return;
|
return;
|
||||||
|
@ -288,7 +288,7 @@ class Client {
|
||||||
dialog.ShowAll ();
|
dialog.ShowAll ();
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Quit (Gtk.Object o)
|
static void Quit ()
|
||||||
{
|
{
|
||||||
Application.Quit ();
|
Application.Quit ();
|
||||||
}
|
}
|
||||||
|
@ -297,7 +297,7 @@ class Client {
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
Conn.Insert (UInt32.Parse (id_entry.Text), name_entry.Text, address_entry.Text);
|
Conn.Insert (UInt32.Parse (id_entry.Text), name_entry.Text, address_entry.Text);
|
||||||
UpdateView (o as Gtk.Object);
|
UpdateView ();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
PushMessage (e.Message);
|
PushMessage (e.Message);
|
||||||
}
|
}
|
||||||
|
@ -309,7 +309,7 @@ class Client {
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
Conn.Delete (UInt32.Parse (id_entry.Text));
|
Conn.Delete (UInt32.Parse (id_entry.Text));
|
||||||
UpdateView (o as Gtk.Object);
|
UpdateView ();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
PushMessage (e.Message);
|
PushMessage (e.Message);
|
||||||
}
|
}
|
||||||
|
@ -321,7 +321,7 @@ class Client {
|
||||||
{
|
{
|
||||||
try {
|
try {
|
||||||
Conn.Update (UInt32.Parse (id_entry.Text), name_entry.Text, address_entry.Text);
|
Conn.Update (UInt32.Parse (id_entry.Text), name_entry.Text, address_entry.Text);
|
||||||
UpdateView (o as Gtk.Object);
|
UpdateView ();
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
PushMessage (e.Message);
|
PushMessage (e.Message);
|
||||||
}
|
}
|
||||||
|
@ -452,8 +452,7 @@ class IdConnection : IDisposable
|
||||||
public IdConnection ()
|
public IdConnection ()
|
||||||
{
|
{
|
||||||
cnc = new SqlConnection ();
|
cnc = new SqlConnection ();
|
||||||
string connectionString = "" +
|
string connectionString = "hostaddr=127.0.0.1;" +
|
||||||
"" +
|
|
||||||
"user=monotest;" +
|
"user=monotest;" +
|
||||||
"dbname=monotest";
|
"dbname=monotest";
|
||||||
|
|
||||||
|
|
|
@ -248,10 +248,12 @@ public class BoardPiece : Gnome.CanvasGroup
|
||||||
switch (args.Event.Type) {
|
switch (args.Event.Type) {
|
||||||
case EventType.EnterNotify:
|
case EventType.EnterNotify:
|
||||||
piece.Text.FillColor = "white";
|
piece.Text.FillColor = "white";
|
||||||
|
args.RetVal = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EventType.LeaveNotify:
|
case EventType.LeaveNotify:
|
||||||
piece.Text.FillColor = "black";
|
piece.Text.FillColor = "black";
|
||||||
|
args.RetVal = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case EventType.ButtonPress:
|
case EventType.ButtonPress:
|
||||||
|
@ -286,16 +288,17 @@ public class BoardPiece : Gnome.CanvasGroup
|
||||||
piece.Board [piece.Position] = null;
|
piece.Board [piece.Position] = null;
|
||||||
piece.Position = new_position;
|
piece.Position = new_position;
|
||||||
piece.Move (dx * PIECE_SIZE, dy * PIECE_SIZE);
|
piece.Move (dx * PIECE_SIZE, dy * PIECE_SIZE);
|
||||||
|
canvas.UpdateNow ();
|
||||||
} else
|
} else
|
||||||
Print_Position ("to", piece.Position, false);
|
Print_Position ("to", piece.Position, false);
|
||||||
|
|
||||||
|
args.RetVal = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
|
args.RetVal = false;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
args.RetVal = false;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void Print_Position (string text, int position, bool newLine)
|
static void Print_Position (string text, int position, bool newLine)
|
||||||
|
|
Loading…
Reference in a new issue