Author: jonpryor
Date: 2005-04-12 10:33:53 -0400 (Tue, 12 Apr 2005)
New Revision: 42835

Modified:
   trunk/type-reflector/ChangeLog
   trunk/type-reflector/TypeFactory.cs
   trunk/type-reflector/displayers/gtk/AppWindowManager.cs
   trunk/type-reflector/displayers/gtk/ChangeLog
   trunk/type-reflector/displayers/gtk/GtkTypeDisplayer.cs
   trunk/type-reflector/type-reflector.exe.config
Log:
        * displayers/gtk/AppWindowManager.cs, 
displayers/gtk/GtkTypeDisplayer.cs: 
    Change namespace to `...gtk' from `...Gtk' (note: it's now fully 
lowercase). 
    Why?  To work around C# "issue" where it prefers names from the current 
    (nested) namespace over the global namespace.  So it would look for
    Mono.TypeReflector.Displayers.Gtk.Window instead of using Gtk.Window
    --> BAD.  The name change fixes this.
    Thanks to Alexmipego for noticing this.
  * displayers/gtk/AppWindowManager.cs: Directly set the MenuItem child text 
    instead of iterating over children.  The loop shouldn't be necessary.
  * displayers/gtk/GtkTypeDisplayer.cs: Destroy the main window when closing.
  * type-reflector.exe.config: Change fully-qualified name of the Gtk# type
    displayer (namespace had to change).
  * TypeFactory.cs: protect against a null entry (if no suck key exists).


Modified: trunk/type-reflector/ChangeLog
===================================================================
--- trunk/type-reflector/ChangeLog      2005-04-12 14:18:13 UTC (rev 42834)
+++ trunk/type-reflector/ChangeLog      2005-04-12 14:33:53 UTC (rev 42835)
@@ -1,3 +1,8 @@
+2005-04-12  Jonathan Pryor <[EMAIL PROTECTED]>
+       * type-reflector.exe.config: Change fully-qualified name of the Gtk# 
type
+         displayer (namespace had to change).
+       * TypeFactory.cs: protect against a null entry (if no suck key exists).
+
 2005-02-09
 
        * type-reflector.in: Added; used so the installed script knows which

Modified: trunk/type-reflector/TypeFactory.cs
===================================================================
--- trunk/type-reflector/TypeFactory.cs 2005-04-12 14:18:13 UTC (rev 42834)
+++ trunk/type-reflector/TypeFactory.cs 2005-04-12 14:33:53 UTC (rev 42835)
@@ -157,7 +157,7 @@
                        catch (Exception e) {
                                Trace.WriteLineIf (info.Enabled, string.Format (
                                        "Exception creating ({0}, {1}): {2})", 
-                                       key, entry.Type, e.ToString()));
+                                       key, entry == null ? null : entry.Type, 
e.ToString()));
                                return null;
                        }
                }

Modified: trunk/type-reflector/displayers/gtk/AppWindowManager.cs
===================================================================
--- trunk/type-reflector/displayers/gtk/AppWindowManager.cs     2005-04-12 
14:18:13 UTC (rev 42834)
+++ trunk/type-reflector/displayers/gtk/AppWindowManager.cs     2005-04-12 
14:33:53 UTC (rev 42835)
@@ -15,7 +15,7 @@
 using GtkSharp;
 using Glade;
 
-namespace Mono.TypeReflector.Displayers.Gtk
+namespace Mono.TypeReflector.Displayers.gtk
 {
        public sealed class AppWindowInfo
        {
@@ -294,11 +294,14 @@
 
                private void UpdateMenuItem (MenuItem mi, string title, int 
accel)
                {
+                       ((Label) mi.Child).Text = title;
+                       /*
                        foreach (Label l in mi.Children) {
                                // Console.WriteLine ("    updating menu item; 
was={0}; is={1}",
                                //              l.Text, title);
                                l.Text = title;
                        }
+                        */
                        AppWindowInfo d = (AppWindowInfo) windows[accel];
                        // TODO: clear out mi.Activated, so we don't have lots 
of windows try to
                        // present themselves...

Modified: trunk/type-reflector/displayers/gtk/ChangeLog
===================================================================
--- trunk/type-reflector/displayers/gtk/ChangeLog       2005-04-12 14:18:13 UTC 
(rev 42834)
+++ trunk/type-reflector/displayers/gtk/ChangeLog       2005-04-12 14:33:53 UTC 
(rev 42835)
@@ -1,3 +1,15 @@
+2005-04-12  Jonathan Pryor <[EMAIL PROTECTED]>
+       * GtkTypeDisplayer.cs, AppWindowManager: Change namespace to `...gtk' 
+         from `...Gtk' (note: it's now fully lowercase).  Why?  To work around 
C# 
+         "issue" where it prefers names from the current (nested) namespace 
over 
+         the global namespace.  So it would look for 
+         Mono.TypeReflector.Displayers.Gtk.Window instead of using Gtk.Window 
+         --> BAD.  The name change fixes this.
+         Thanks to Alexmipego for noticing this.
+       * AppWindowManager.cs: Directly set the MenuItem child text instead of
+         iterating over children.  The loop shouldn't be necessary.
+       * GtkTypeDisplayer.cs: Destroy the main window when closing.
+
 2004-10-09  Jonathan Pryor <[EMAIL PROTECTED]>
        * GtkTypeDisplayer.cs: Add file drag-and-drop support.  You can now DnD
          files from nautilus onto Type Reflector to open & inspect assemblies.

Modified: trunk/type-reflector/displayers/gtk/GtkTypeDisplayer.cs
===================================================================
--- trunk/type-reflector/displayers/gtk/GtkTypeDisplayer.cs     2005-04-12 
14:18:13 UTC (rev 42834)
+++ trunk/type-reflector/displayers/gtk/GtkTypeDisplayer.cs     2005-04-12 
14:33:53 UTC (rev 42835)
@@ -27,7 +27,7 @@
 using Pixbuf = Gdk.Pixbuf;
 using System.Drawing;
 
-namespace Mono.TypeReflector.Displayers.Gtk
+namespace Mono.TypeReflector.Displayers.gtk
 {
        delegate void OpenFileSuccess (string[] filenames);
 
@@ -827,6 +827,7 @@
                        treeView.QueueDraw ();
                        base.Clear ();
                        close.Sensitive = false;
+                       mainWindow.Destroy ();
                }
 
                private void RemoveWidgetFromTreeView (Widget o)

Modified: trunk/type-reflector/type-reflector.exe.config
===================================================================
--- trunk/type-reflector/type-reflector.exe.config      2005-04-12 14:18:13 UTC 
(rev 42834)
+++ trunk/type-reflector/type-reflector.exe.config      2005-04-12 14:33:53 UTC 
(rev 42835)
@@ -39,7 +39,7 @@
     <add  key="console:Console"
           value="Mono.TypeReflector.Displayers.ConsoleTypeDisplayer" />
     <add  key="gtk:Gtk#"
-          value="Mono.TypeReflector.Displayers.Gtk.GtkTypeDisplayer" />
+          value="Mono.TypeReflector.Displayers.gtk.GtkTypeDisplayer" />
     <add  key="swf:Windows Forms"
           value="Mono.TypeReflector.Displayers.Swf.SwfTypeDisplayer" />
   </displayers>

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

Reply via email to