2004-02-10 Mike Kestner <mkestner@ximian.com>

* gconf/GConf.PropertyEditors/PropertyEditorColorPicker.cs :
	nuke a GnomeSharp.
	* generator/Signal.cs : move eventhandlers and args into the
	base namespace instead of a *Sharp namespace.
	* sample/*.cs : nuke using *Sharp.

svn path=/trunk/gtk-sharp/; revision=22956
This commit is contained in:
Mike Kestner 2004-02-10 20:35:40 +00:00
parent d41f6593b0
commit f774796311
54 changed files with 34 additions and 84 deletions

View file

@ -1,3 +1,11 @@
2004-02-10 Mike Kestner <mkestner@ximian.com>
* gconf/GConf.PropertyEditors/PropertyEditorColorPicker.cs :
nuke a GnomeSharp.
* generator/Signal.cs : move eventhandlers and args into the
base namespace instead of a *Sharp namespace.
* sample/*.cs : nuke using *Sharp.
2004-02-10 Mike Kestner <mkestner@ximian.com> 2004-02-10 Mike Kestner <mkestner@ximian.com>
* art/Art.metadata : mark a field private * art/Art.metadata : mark a field private

View file

@ -24,7 +24,7 @@ namespace GConf.PropertyEditors
return (byte) (val >> 8); return (byte) (val >> 8);
} }
void Changed (object obj, GnomeSharp.ColorSetArgs args) void Changed (object obj, Gnome.ColorSetArgs args)
{ {
ColorPicker picker = (ColorPicker) Control; ColorPicker picker = (ColorPicker) Control;
Color color = Color.FromArgb (ToByte (picker.Red), ToByte (picker.Green), ToByte (picker.Blue)); Color color = Color.FromArgb (ToByte (picker.Red), ToByte (picker.Green), ToByte (picker.Blue));
@ -34,7 +34,7 @@ namespace GConf.PropertyEditors
protected override void ConnectHandlers () protected override void ConnectHandlers ()
{ {
ColorPicker picker = (ColorPicker) Control; ColorPicker picker = (ColorPicker) Control;
picker.ColorSet += new GnomeSharp.ColorSetHandler (Changed); picker.ColorSet += new Gnome.ColorSetHandler (Changed);
} }
public PropertyEditorColorPicker (string key, ColorPicker picker) : base (key, picker) public PropertyEditorColorPicker (string key, ColorPicker picker) : base (key, picker)

View file

@ -74,7 +74,7 @@ namespace GtkSharp.Generation {
if (sig_handler.Name == "voidObjectSignal") if (sig_handler.Name == "voidObjectSignal")
return "System.EventArgs"; return "System.EventArgs";
else else
return container_type.NS + "Sharp." + Name + "Args"; return container_type.NS + "." + Name + "Args";
} }
} }
@ -82,7 +82,9 @@ namespace GtkSharp.Generation {
get { get {
if (sig_handler.Name == "voidObjectSignal") if (sig_handler.Name == "voidObjectSignal")
return "EventHandler"; return "EventHandler";
else else if (SymbolTable.Table [container_type.NS + Name + "Handler"] != null)
return Name + "EventHandler";
else
return Name + "Handler"; return Name + "Handler";
} }
} }
@ -92,7 +94,7 @@ namespace GtkSharp.Generation {
if (sig_handler.Name == "voidObjectSignal") if (sig_handler.Name == "voidObjectSignal")
return "System.EventHandler"; return "System.EventHandler";
else else
return container_type.NS + "Sharp." + Name + "Handler"; return container_type.NS + "." + EventHandlerName;
} }
} }
@ -143,9 +145,9 @@ namespace GtkSharp.Generation {
string ns = container_type.NS; string ns = container_type.NS;
StreamWriter sw = gen_info.OpenStream (ns + "Sharp." + EventHandlerName); StreamWriter sw = gen_info.OpenStream (EventHandlerName);
sw.WriteLine ("namespace " + ns + "Sharp {"); sw.WriteLine ("namespace " + ns + " {");
sw.WriteLine (); sw.WriteLine ();
sw.WriteLine ("\tusing System;"); sw.WriteLine ("\tusing System;");

View file

@ -7,7 +7,6 @@
namespace GtkSamples { namespace GtkSamples {
using Gtk; using Gtk;
using GtkSharp;
using System; using System;
using System.Drawing; using System.Drawing;

View file

@ -4,7 +4,6 @@
using Gtk; using Gtk;
using Gdk; using Gdk;
using System; using System;
using GtkSharp;
using Cairo; using Cairo;
class X { class X {

View file

@ -7,7 +7,6 @@
namespace GtkSamples { namespace GtkSamples {
using Gtk; using Gtk;
using GtkSharp;
using System; using System;
using System.Drawing; using System.Drawing;

View file

@ -9,7 +9,6 @@ namespace GtkSamples {
using Gnome; using Gnome;
using Gtk; using Gtk;
using Gdk; using Gdk;
using GtkSharp;
using System; using System;
public class CanvasExample { public class CanvasExample {
@ -89,7 +88,7 @@ namespace GtkSamples {
item.OutlineColor = "black"; item.OutlineColor = "black";
item.WidthUnits = 1.0; item.WidthUnits = 1.0;
item.CanvasEvent += new GnomeSharp.CanvasEventHandler (Item_Event); item.CanvasEvent += new Gnome.CanvasEventHandler (Item_Event);
} }
void ChangeItemColor (CanvasRE item) void ChangeItemColor (CanvasRE item)
@ -98,7 +97,7 @@ namespace GtkSamples {
item.FillColor = colors[random.Next (colors.Length)]; item.FillColor = colors[random.Next (colors.Length)];
} }
void Item_Event (object obj, GnomeSharp.CanvasEventArgs args) { void Item_Event (object obj, Gnome.CanvasEventArgs args) {
EventButton ev = EventButton.New (args.Event.Handle); EventButton ev = EventButton.New (args.Event.Handle);
CanvasRE item = (CanvasRE) obj; CanvasRE item = (CanvasRE) obj;

View file

@ -1,9 +1,7 @@
using System; using System;
using Gda; using Gda;
using GnomeDb; using GnomeDb;
using GdaSharp;
using Gtk; using Gtk;
using GtkSharp;
class GnomeDbClient { class GnomeDbClient {
@ -61,7 +59,7 @@ class GnomeDbClient {
if (dialog.Run () == true) { if (dialog.Run () == true) {
if (client == null) { if (client == null) {
client = new Gda.Client (); client = new Gda.Client ();
client.EventNotification += new GdaSharp.EventNotificationHandler (Client_Event); client.EventNotification += new Gda.EventNotificationHandler (Client_Event);
} }
cnc = client.OpenConnection (dialog.Dsn, dialog.Username, dialog.Password, cnc = client.OpenConnection (dialog.Dsn, dialog.Username, dialog.Password,

View file

@ -5,7 +5,6 @@ using System.Data;
using System.Data.SqlClient; using System.Data.SqlClient;
using Gtk; using Gtk;
using GtkSharp;
enum DialogType enum DialogType
{ {

View file

@ -4,7 +4,6 @@ using System.Drawing;
using Gtk; using Gtk;
using Gdk; using Gdk;
using Gnome; using Gnome;
using GtkSharp;
public class Fifteen public class Fifteen
@ -212,7 +211,7 @@ public class BoardPiece : Gnome.CanvasGroup
text.FillColor = "black"; text.FillColor = "black";
this.Text = text; this.Text = text;
this.CanvasEvent += new GnomeSharp.CanvasEventHandler (Piece_Event); this.CanvasEvent += new Gnome.CanvasEventHandler (Piece_Event);
} }
public string Color { public string Color {
@ -239,7 +238,7 @@ public class BoardPiece : Gnome.CanvasGroup
} }
} }
static void Piece_Event (object o, GnomeSharp.CanvasEventArgs args) static void Piece_Event (object o, Gnome.CanvasEventArgs args)
{ {
BoardPiece piece = (BoardPiece) o; BoardPiece piece = (BoardPiece) o;
Canvas canvas = piece.Canvas; Canvas canvas = piece.Canvas;

View file

@ -9,7 +9,6 @@ namespace GladeSamples {
using Gtk; using Gtk;
using Glade; using Glade;
using GtkSharp;
public class GladeTest public class GladeTest
{ {

View file

@ -8,7 +8,6 @@ namespace GtkSamples {
using Gtk; using Gtk;
using Gdk; using Gdk;
using GtkSharp;
using Gnome; using Gnome;
using System; using System;
using System.IO; using System.IO;
@ -57,7 +56,7 @@ namespace GtkSamples {
entry.desc); entry.desc);
} }
icons.IconSelected += new GnomeSharp.IconSelectedHandler (icon_selected_cb); icons.IconSelected += new Gnome.IconSelectedHandler (icon_selected_cb);
return icons; return icons;
} }
@ -149,7 +148,7 @@ namespace GtkSamples {
[DllImport("glib-2.0")] [DllImport("glib-2.0")]
static extern bool g_spawn_command_line_async (string command, IntPtr err); static extern bool g_spawn_command_line_async (string command, IntPtr err);
void icon_selected_cb (object obj, GnomeSharp.IconSelectedArgs args) void icon_selected_cb (object obj, Gnome.IconSelectedArgs args)
{ {
int idx = args.Num; int idx = args.Num;
Event ev_any = args.Event; Event ev_any = args.Event;

View file

@ -16,7 +16,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace GtkDemo namespace GtkDemo
{ {

View file

@ -14,7 +14,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace GtkDemo namespace GtkDemo
{ {

View file

@ -16,7 +16,6 @@ using System;
using Gdk; using Gdk;
using Gtk; using Gtk;
using GtkSharp;
namespace GtkDemo namespace GtkDemo
@ -77,8 +76,7 @@ namespace GtkDemo
true, true,
area.X, area.Y, area.X, area.Y,
area.Width, area.Height); area.Width, area.Height);
SignalArgs sa = (SignalArgs) args; args.RetVal = true;
sa.RetVal = true;
} }
private void ChangeColorCallback (object o, EventArgs args) private void ChangeColorCallback (object o, EventArgs args)

View file

@ -19,7 +19,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace GtkDemo namespace GtkDemo
{ {

View file

@ -27,7 +27,6 @@ using System;
using Gtk; using Gtk;
using Gdk; using Gdk;
using GtkSharp;
namespace GtkDemo { namespace GtkDemo {
public class DemoDrawingArea public class DemoDrawingArea
@ -148,8 +147,7 @@ namespace GtkDemo {
} }
// return true because we've handled this event, so no // return true because we've handled this event, so no
// further processing is required. // further processing is required.
SignalArgs sa = (SignalArgs) args; args.RetVal = true;
sa.RetVal = true;
} }
@ -168,8 +166,7 @@ namespace GtkDemo {
area.X, area.Y, area.X, area.Y,
area.X, area.Y, area.X, area.Y,
area.Width, area.Height); area.Width, area.Height);
SignalArgs sa = (SignalArgs) args; args.RetVal = false;
sa.RetVal = false;
} }
// Create a new pixmap of the appropriate size to store our scribbles // Create a new pixmap of the appropriate size to store our scribbles
@ -185,9 +182,8 @@ namespace GtkDemo {
// Initialize the pixmap to white // Initialize the pixmap to white
pixmap.DrawRectangle (drawingArea1.Style.WhiteGC, true, 0, 0, pixmap.DrawRectangle (drawingArea1.Style.WhiteGC, true, 0, 0,
allocation.Width, allocation.Height); allocation.Width, allocation.Height);
SignalArgs sa = (SignalArgs) args;
// We've handled the configure event, no need for further processing. // We've handled the configure event, no need for further processing.
sa.RetVal = true; args.RetVal = true;
} }
private void ScribbleMotionNotify (object o, MotionNotifyEventArgs args) private void ScribbleMotionNotify (object o, MotionNotifyEventArgs args)
@ -221,8 +217,7 @@ namespace GtkDemo {
if ((state & ModifierType.Button1Mask) != 0 && pixmap != null) if ((state & ModifierType.Button1Mask) != 0 && pixmap != null)
DrawBrush (x, y); DrawBrush (x, y);
/* We've handled it, stop processing */ /* We've handled it, stop processing */
SignalArgs sa = (SignalArgs) args; args.RetVal = true;
sa.RetVal = true;
} }
@ -249,8 +244,7 @@ namespace GtkDemo {
if (ev.Button == 1 && pixmap != null) if (ev.Button == 1 && pixmap != null)
DrawBrush (ev.X, ev.Y); DrawBrush (ev.X, ev.Y);
//We've handled the event, stop processing //We've handled the event, stop processing
SignalArgs sa = (SignalArgs) args; args.RetVal = true;
sa.RetVal = true;
} }
} }
} }

View file

@ -18,7 +18,6 @@ using System;
using System.Collections; using System.Collections;
using Gtk; using Gtk;
using GtkSharp;
namespace GtkDemo namespace GtkDemo
{ {

View file

@ -30,8 +30,6 @@ using System.IO;
using Gtk; using Gtk;
using Gdk; using Gdk;
using GtkSharp;
using GdkSharp;
namespace GtkDemo { namespace GtkDemo {
public class DemoImages public class DemoImages

View file

@ -18,7 +18,6 @@ using System.IO;
using Gtk; using Gtk;
using Gdk; using Gdk;
using GtkSharp;
namespace GtkDemo namespace GtkDemo
{ {

View file

@ -18,7 +18,6 @@ using System;
using System.Collections; using System.Collections;
using Gtk; using Gtk;
using GtkSharp;
namespace GtkDemo namespace GtkDemo
{ {

View file

@ -11,7 +11,6 @@ using System.Collections;
using Gdk; using Gdk;
using Gtk; using Gtk;
using GtkSharp;
using Pango; using Pango;
namespace GtkDemo namespace GtkDemo

View file

@ -43,7 +43,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace GtkDemo namespace GtkDemo
{ {

View file

@ -24,7 +24,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace GtkDemo namespace GtkDemo
{ {

View file

@ -22,7 +22,6 @@
using Gdk; using Gdk;
using Gtk; using Gtk;
using GtkSharp;
using System; using System;

View file

@ -24,7 +24,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace GtkDemo namespace GtkDemo
{ {

View file

@ -8,7 +8,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace GtkDemo namespace GtkDemo
{ {

View file

@ -20,7 +20,6 @@ using System.IO;
using Gdk; using Gdk;
using Gtk; using Gtk;
using GtkSharp;
namespace GtkDemo namespace GtkDemo
{ {

View file

@ -18,7 +18,6 @@ using System;
using System.Collections; using System.Collections;
using Gtk; using Gtk;
using GtkSharp;
using GLib; using GLib;
namespace GtkDemo namespace GtkDemo

View file

@ -8,7 +8,6 @@ namespace GtkSamples {
using Gtk; using Gtk;
using Gdk; using Gdk;
using GtkSharp;
using System; using System;
public class HelloWorld { public class HelloWorld {

View file

@ -10,7 +10,6 @@ namespace GtkSamples {
using System.Runtime.InteropServices; using System.Runtime.InteropServices;
using Gtk; using Gtk;
using GtkSharp;
public class TreeViewDemo { public class TreeViewDemo {
private static ListStore store = null; private static ListStore store = null;

View file

@ -9,7 +9,6 @@ namespace GtkSharp.Samples {
using System; using System;
using System.Drawing; using System.Drawing;
using Gtk; using Gtk;
using GtkSharp;
public class MenuApp { public class MenuApp {

View file

@ -1,6 +1,5 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
using Gnome; using Gnome;
class PrintSample class PrintSample

View file

@ -8,7 +8,6 @@ namespace GtkSamples {
using Gtk; using Gtk;
using Gdk; using Gdk;
using GtkSharp;
using System; using System;
public class Scribble { public class Scribble {

View file

@ -8,7 +8,6 @@ namespace GtkSamples {
using Gtk; using Gtk;
using Gdk; using Gdk;
using GtkSharp;
using System; using System;
public class SizeTest { public class SizeTest {

View file

@ -7,7 +7,6 @@
namespace GtkSamples { namespace GtkSamples {
using Gtk; using Gtk;
using GtkSharp;
using System; using System;
using System.Drawing; using System.Drawing;

View file

@ -1,6 +1,5 @@
using Gtk; using Gtk;
using Gdk; using Gdk;
using GtkSharp;
using GLib; using GLib;
using System; using System;

View file

@ -9,7 +9,6 @@ namespace GtkSamples {
using System.Reflection; using System.Reflection;
using Gtk; using Gtk;
using GtkSharp;
public class TreeViewDemo { public class TreeViewDemo {
private static TreeStore store = null; private static TreeStore store = null;

View file

@ -1,10 +1,7 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
using Gnome; using Gnome;
using GnomeSharp;
using Vte; using Vte;
using VteSharp;
class T class T
{ {
@ -31,7 +28,7 @@ class T
term.DeleteBinding = TerminalEraseBinding.Auto; term.DeleteBinding = TerminalEraseBinding.Auto;
term.Encoding = "UTF-8"; term.Encoding = "UTF-8";
term.FontFromString = "Monospace"; term.FontFromString = "Monospace";
term.Commit += new VteSharp.CommitHandler (OnCommit); term.Commit += new Vte.CommitHandler (OnCommit);
term.TextDeleted += new EventHandler (OnTextDeleted); term.TextDeleted += new EventHandler (OnTextDeleted);
Gdk.Color white = new Gdk.Color (); Gdk.Color white = new Gdk.Color ();
@ -59,7 +56,7 @@ class T
program.Run (); program.Run ();
} }
private void OnCommit (object o, VteSharp.CommitArgs args) private void OnCommit (object o, Vte.CommitArgs args)
{ {
Terminal term = (Terminal) o; Terminal term = (Terminal) o;
if (args.P0 == "\r") if (args.P0 == "\r")

View file

@ -30,7 +30,7 @@
{ {
this.program = gnome_program; this.program = gnome_program;
this.DeleteEvent += new GtkSharp.DeleteEventHandler(delete_event); this.DeleteEvent += new Gtk.DeleteEventHandler(delete_event);
string svg_file_name = "sample.svg"; string svg_file_name = "sample.svg";
@ -42,7 +42,7 @@
this.Contents = image; this.Contents = image;
} }
private void delete_event(object obj, GtkSharp.DeleteEventArgs args) private void delete_event(object obj, Gtk.DeleteEventArgs args)
{ {
this.program.Quit(); this.program.Quit();
} }

View file

@ -9,7 +9,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace WidgetViewer { namespace WidgetViewer {
public class TestCheckButton public class TestCheckButton

View file

@ -10,7 +10,6 @@ using System;
using System.Text; using System.Text;
using Gtk; using Gtk;
using GtkSharp;
namespace WidgetViewer { namespace WidgetViewer {
public class TestColorSelection public class TestColorSelection

View file

@ -9,7 +9,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace WidgetViewer { namespace WidgetViewer {
public class TestCombo public class TestCombo

View file

@ -10,7 +10,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace WidgetViewer { namespace WidgetViewer {
public class TestDialog public class TestDialog

View file

@ -9,7 +9,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace WidgetViewer { namespace WidgetViewer {
public class TestFileSelection public class TestFileSelection

View file

@ -9,7 +9,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace WidgetViewer { namespace WidgetViewer {
public class TestFlipping { public class TestFlipping {

View file

@ -9,7 +9,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace WidgetViewer { namespace WidgetViewer {
public class TestMenus { public class TestMenus {

View file

@ -9,7 +9,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace WidgetViewer { namespace WidgetViewer {
public class TestRadioButton public class TestRadioButton

View file

@ -9,7 +9,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace WidgetViewer { namespace WidgetViewer {

View file

@ -9,7 +9,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace WidgetViewer { namespace WidgetViewer {
public class TestSizeGroup { public class TestSizeGroup {

View file

@ -9,7 +9,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace WidgetViewer { namespace WidgetViewer {

View file

@ -9,7 +9,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace WidgetViewer { namespace WidgetViewer {
public class TestToolbar { public class TestToolbar {

View file

@ -9,7 +9,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace WidgetViewer { namespace WidgetViewer {
public class TestToolTip public class TestToolTip

View file

@ -9,7 +9,6 @@
using System; using System;
using Gtk; using Gtk;
using GtkSharp;
namespace WidgetViewer { namespace WidgetViewer {
public class Viewer public class Viewer