Author: rafael
Date: 2005-03-30 07:31:51 -0500 (Wed, 30 Mar 2005)
New Revision: 42369

Modified:
   trunk/gtkspell-sharp/ChangeLog
   trunk/gtkspell-sharp/sample/TestGtkSpell.cs
Log:
24-03-2005 Rafael Teixeira <[EMAIL PROTECTED]>
        sample/TestGtkSpell.cs
        -- added a delete event handler to end the application when closing the 
window
        -- now accepts an optional command line argument to specify locale. 
           Ex: "mono TestGtkSpell.exe pt-br", defaults to en-us as before


Modified: trunk/gtkspell-sharp/ChangeLog
===================================================================
--- trunk/gtkspell-sharp/ChangeLog      2005-03-30 12:14:32 UTC (rev 42368)
+++ trunk/gtkspell-sharp/ChangeLog      2005-03-30 12:31:51 UTC (rev 42369)
@@ -0,0 +1,5 @@
+24-03-2005 Rafael Teixeira <[EMAIL PROTECTED]>
+       sample/TestGtkSpell.cs
+       -- added a delete event handler to end the application when closing the 
window
+       -- now accepts an optional command line argument to specify locale. 
+          Ex: "mono TestGtkSpell.exe pt-br", defaults to en-us as before

Modified: trunk/gtkspell-sharp/sample/TestGtkSpell.cs
===================================================================
--- trunk/gtkspell-sharp/sample/TestGtkSpell.cs 2005-03-30 12:14:32 UTC (rev 
42368)
+++ trunk/gtkspell-sharp/sample/TestGtkSpell.cs 2005-03-30 12:31:51 UTC (rev 
42369)
@@ -4,7 +4,7 @@
 
 public class GtkHelloWorld {
  
-  public static void Main() {
+  public static void Main(string[] args) {
     Application.Init();
 
     //Create the Window
@@ -14,8 +14,13 @@
     //Create a TextView 
     TextView myTextView = new TextView();
     
+    SpellCheck mySpellCheck;
+    
     //Bind GtkSpell to our textview
-    SpellCheck mySpellCheck = new SpellCheck(myTextView, "en-us");
+    if (args.Length > 0)
+           mySpellCheck = new SpellCheck(myTextView, args[0]);
+       else    
+           mySpellCheck = new SpellCheck(myTextView, "en-us");
 
     //spellCheck.Detach();
     //spellCheck.();
@@ -26,6 +31,13 @@
     //Show Everything     
     myWin.ShowAll();
     
+       myWin.DeleteEvent += new DeleteEventHandler(delete);
+    
     Application.Run();   
    }
+   
+   static void delete(object o, DeleteEventArgs args)
+   {
+    Application.Quit();
+   }
 }

_______________________________________________
Mono-patches maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches

Reply via email to