Author: debacker
Date: 2007-12-27 18:06:33 -0500 (Thu, 27 Dec 2007)
New Revision: 91969

Added:
   trunk/gtk-sharp-ribbon/Ribbons/ChangeLog
   trunk/gtk-sharp-ribbon/Sample/ChangeLog
Modified:
   trunk/gtk-sharp-ribbon/Ribbons/Button.cs
   trunk/gtk-sharp-ribbon/Ribbons/Gallery.cs
   trunk/gtk-sharp-ribbon/Ribbons/Ribbon.cs
   trunk/gtk-sharp-ribbon/Ribbons/RibbonGroup.cs
   trunk/gtk-sharp-ribbon/Ribbons/Ribbons.mdp
   trunk/gtk-sharp-ribbon/Ribbons/Theme.cs
   trunk/gtk-sharp-ribbon/Ribbons/Tile.cs
   trunk/gtk-sharp-ribbon/Ribbons/ToggleButton.cs
   trunk/gtk-sharp-ribbon/Ribbons/gtk-gui/generated.cs
   trunk/gtk-sharp-ribbon/Ribbons/gtk-gui/gui.stetic
   trunk/gtk-sharp-ribbon/Ribbons/gtk-gui/objects.xml
   trunk/gtk-sharp-ribbon/Sample/MainWindow.cs
Log:
* Sample/MainWindow.cs, Ribbons/Ribbon.cs, Ribbons/ToggleButton.cs,
  Ribbons/RibbonGroup.cs, Ribbons/Tile.cs, Ribbons/Gallery.cs,
  Ribbons/Theme.cs, Ribbons/gtk-gui/generated.cs,
  Ribbons/gtk-gui/objects.xml, Ribbons/gtk-gui/gui.stetic,
  Ribbons/Ribbons.mdp, Ribbons/Button.cs, Ribbons/ChangeLog,
  Sample/ChangeLog: Fixing calls to Dispose() and Destroy()

Modified: trunk/gtk-sharp-ribbon/Ribbons/Button.cs
===================================================================
--- trunk/gtk-sharp-ribbon/Ribbons/Button.cs    2007-12-27 22:46:27 UTC (rev 
91968)
+++ trunk/gtk-sharp-ribbon/Ribbons/Button.cs    2007-12-27 23:06:33 UTC (rev 
91969)
@@ -225,6 +225,9 @@
                        cr.Clip ();
                        Draw (cr);
                        
+                       ((IDisposable)cr.Target).Dispose ();
+                       ((IDisposable)cr).Dispose ();
+                       
                        return base.OnExposeEvent (evnt);
                }
                

Added: trunk/gtk-sharp-ribbon/Ribbons/ChangeLog
===================================================================
--- trunk/gtk-sharp-ribbon/Ribbons/ChangeLog    2007-12-27 22:46:27 UTC (rev 
91968)
+++ trunk/gtk-sharp-ribbon/Ribbons/ChangeLog    2007-12-27 23:06:33 UTC (rev 
91969)
@@ -0,0 +1,7 @@
+2007-12-28  Laurent Debacker <[EMAIL PROTECTED]> 
+
+       * Ribbon.cs, ToggleButton.cs, RibbonGroup.cs, Tile.cs, Gallery.cs, 
Theme.cs,
+         gtk-gui/generated.cs, gtk-gui/objects.xml, gtk-gui/gui.stetic,
+         Ribbons.mdp, Button.cs, ChangeLog: Fixing calls to Dispose() and
+         Destroy()
+

Modified: trunk/gtk-sharp-ribbon/Ribbons/Gallery.cs
===================================================================
--- trunk/gtk-sharp-ribbon/Ribbons/Gallery.cs   2007-12-27 22:46:27 UTC (rev 
91968)
+++ trunk/gtk-sharp-ribbon/Ribbons/Gallery.cs   2007-12-27 23:06:33 UTC (rev 
91969)
@@ -383,6 +383,9 @@
                        cr.Clip ();
                        Draw (cr);
                        
+                       ((IDisposable)cr.Target).Dispose ();
+                       ((IDisposable)cr).Dispose ();                   
+                       
                        return base.OnExposeEvent (evnt);
                }
                

Modified: trunk/gtk-sharp-ribbon/Ribbons/Ribbon.cs
===================================================================
--- trunk/gtk-sharp-ribbon/Ribbons/Ribbon.cs    2007-12-27 22:46:27 UTC (rev 
91968)
+++ trunk/gtk-sharp-ribbon/Ribbons/Ribbon.cs    2007-12-27 23:06:33 UTC (rev 
91969)
@@ -425,6 +425,9 @@
                        cr.Clip ();
                        Draw (cr);
                        
+                       ((IDisposable)cr.Target).Dispose ();
+                       ((IDisposable)cr).Dispose ();                   
+                       
                        return base.OnExposeEvent (evnt);
                }
                

Modified: trunk/gtk-sharp-ribbon/Ribbons/RibbonGroup.cs
===================================================================
--- trunk/gtk-sharp-ribbon/Ribbons/RibbonGroup.cs       2007-12-27 22:46:27 UTC 
(rev 91968)
+++ trunk/gtk-sharp-ribbon/Ribbons/RibbonGroup.cs       2007-12-27 23:06:33 UTC 
(rev 91969)
@@ -193,6 +193,9 @@
                        cr.Clip ();
                        Draw (cr);
                        
+                       ((IDisposable)cr.Target).Dispose ();
+                       ((IDisposable)cr).Dispose ();
+                       
                        return base.OnExposeEvent (evnt);
                }
        }

Modified: trunk/gtk-sharp-ribbon/Ribbons/Ribbons.mdp
===================================================================
--- trunk/gtk-sharp-ribbon/Ribbons/Ribbons.mdp  2007-12-27 22:46:27 UTC (rev 
91968)
+++ trunk/gtk-sharp-ribbon/Ribbons/Ribbons.mdp  2007-12-27 23:06:33 UTC (rev 
91969)
@@ -1,46 +1,46 @@
 <Project name="Ribbons" fileversion="2.0" language="C#" clr-version="Net_2_0" 
ctype="DotNetProject">
   <Configurations active="Debug">
     <Configuration name="Debug" ctype="DotNetProjectConfiguration">
-      <Output directory="./bin/Debug" assembly="Ribbons" />
+      <Output directory="bin/Debug" assembly="Ribbons" />
       <Build debugmode="True" target="Library" />
       <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" 
clr-version="Net_2_0" />
-      <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" 
unsafecodeallowed="True" generateoverflowchecks="True" mainclass="" 
generatexmldocumentation="False" win32Icon="./" 
ctype="CSharpCompilerParameters" />
+      <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" 
unsafecodeallowed="True" generateoverflowchecks="True" mainclass="" 
generatexmldocumentation="False" win32Icon="." ctype="CSharpCompilerParameters" 
/>
     </Configuration>
     <Configuration name="Release" ctype="DotNetProjectConfiguration">
-      <Output directory="./bin/Release" assembly="Ribbons" />
+      <Output directory="bin/Release" assembly="Ribbons" />
       <Build debugmode="False" target="Library" />
       <Execution runwithwarnings="True" consolepause="True" runtime="MsNet" 
clr-version="Net_2_0" />
-      <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" 
unsafecodeallowed="True" generateoverflowchecks="True" mainclass="" 
generatexmldocumentation="False" win32Icon="./" 
ctype="CSharpCompilerParameters" />
+      <CodeGeneration compiler="Mcs" warninglevel="4" optimize="True" 
unsafecodeallowed="True" generateoverflowchecks="True" mainclass="" 
generatexmldocumentation="False" win32Icon="." ctype="CSharpCompilerParameters" 
/>
     </Configuration>
   </Configurations>
   <Contents>
-    <File name="./gtk-gui/gui.stetic" subtype="Code" 
buildaction="EmbedAsResource" />
-    <File name="./gtk-gui/generated.cs" subtype="Code" buildaction="Compile" />
-    <File name="./gtk-gui/objects.xml" subtype="Code" 
buildaction="EmbedAsResource" />
-    <File name="./RibbonGroup.cs" subtype="Code" buildaction="Compile" />
-    <File name="./Theme.cs" subtype="Code" buildaction="Compile" />
-    <File name="./ColorScheme.cs" subtype="Code" buildaction="Compile" />
-    <File name="./Ribbon.cs" subtype="Code" buildaction="Compile" />
-    <File name="./SyntheticWindow.cs" subtype="Code" buildaction="Compile" />
-    <File name="./SyntheticEventCrossing.cs" subtype="Code" 
buildaction="Compile" />
-    <File name="./Button.cs" subtype="Code" buildaction="Compile" />
-    <File name="./GroupStyle.cs" subtype="Code" buildaction="Compile" />
-    <File name="./PageSelectedHandler.cs" subtype="Code" buildaction="Compile" 
/>
-    <File name="./PageAddedHandler.cs" subtype="Code" buildaction="Compile" />
-    <File name="./PageMovedHandler.cs" subtype="Code" buildaction="Compile" />
-    <File name="./PageRemovedHandler.cs" subtype="Code" buildaction="Compile" 
/>
-    <File name="./PageEventArgs.cs" subtype="Code" buildaction="Compile" />
-    <File name="./ToolPack.cs" subtype="Code" buildaction="Compile" />
-    <File name="./ToolBox.cs" subtype="Code" buildaction="Compile" />
-    <File name="./Tile.cs" subtype="Code" buildaction="Compile" />
-    <File name="./Gallery.cs" subtype="Code" buildaction="Compile" />
-    <File name="./TileSelectedHandler.cs" subtype="Code" buildaction="Compile" 
/>
-    <File name="./TileSelectedEventArgs.cs" subtype="Code" 
buildaction="Compile" />
-    <File name="./FlowLayoutContainer.cs" subtype="Code" buildaction="Compile" 
/>
-    <File name="./GalleryPopupWindow.cs" subtype="Code" buildaction="Compile" 
/>
-    <File name="./ExtraEventBox.cs" subtype="Code" buildaction="Compile" />
-    <File name="./ToggleButton.cs" subtype="Code" buildaction="Compile" />
-    <File name="./BaseButton.cs" subtype="Code" buildaction="Compile" />
+    <File name="gtk-gui/generated.cs" subtype="Code" buildaction="Compile" />
+    <File name="RibbonGroup.cs" subtype="Code" buildaction="Compile" />
+    <File name="Theme.cs" subtype="Code" buildaction="Compile" />
+    <File name="ColorScheme.cs" subtype="Code" buildaction="Compile" />
+    <File name="Ribbon.cs" subtype="Code" buildaction="Compile" />
+    <File name="SyntheticWindow.cs" subtype="Code" buildaction="Compile" />
+    <File name="SyntheticEventCrossing.cs" subtype="Code" 
buildaction="Compile" />
+    <File name="Button.cs" subtype="Code" buildaction="Compile" />
+    <File name="GroupStyle.cs" subtype="Code" buildaction="Compile" />
+    <File name="PageSelectedHandler.cs" subtype="Code" buildaction="Compile" />
+    <File name="PageAddedHandler.cs" subtype="Code" buildaction="Compile" />
+    <File name="PageMovedHandler.cs" subtype="Code" buildaction="Compile" />
+    <File name="PageRemovedHandler.cs" subtype="Code" buildaction="Compile" />
+    <File name="PageEventArgs.cs" subtype="Code" buildaction="Compile" />
+    <File name="ToolPack.cs" subtype="Code" buildaction="Compile" />
+    <File name="ToolBox.cs" subtype="Code" buildaction="Compile" />
+    <File name="Tile.cs" subtype="Code" buildaction="Compile" />
+    <File name="Gallery.cs" subtype="Code" buildaction="Compile" />
+    <File name="TileSelectedHandler.cs" subtype="Code" buildaction="Compile" />
+    <File name="TileSelectedEventArgs.cs" subtype="Code" buildaction="Compile" 
/>
+    <File name="FlowLayoutContainer.cs" subtype="Code" buildaction="Compile" />
+    <File name="GalleryPopupWindow.cs" subtype="Code" buildaction="Compile" />
+    <File name="ExtraEventBox.cs" subtype="Code" buildaction="Compile" />
+    <File name="ToggleButton.cs" subtype="Code" buildaction="Compile" />
+    <File name="BaseButton.cs" subtype="Code" buildaction="Compile" />
+    <File name="gtk-gui/gui.stetic" subtype="Code" 
buildaction="EmbedAsResource" />
+    <File name="gtk-gui/objects.xml" subtype="Code" 
buildaction="EmbedAsResource" />
   </Contents>
   <References>
     <ProjectReference type="Gac" localcopy="True" refto="gdk-sharp, 
Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
@@ -50,7 +50,7 @@
     <ProjectReference type="Gac" localcopy="True" refto="pango-sharp, 
Version=2.10.0.0, Culture=neutral, PublicKeyToken=35e10195dab3c99f" />
     <ProjectReference type="Gac" localcopy="True" refto="Mono.Posix, 
Version=2.0.0.0, Culture=neutral, PublicKeyToken=0738eb9f132ed756" />
   </References>
-  <GtkDesignInfo partialTypes="True" isWidgetLibrary="True">
+  <GtkDesignInfo isWidgetLibrary="True">
     <ExportedWidgets>
       <Widget>Ribbons.RibbonButton</Widget>
       <Widget>Ribbons.Label</Widget>

Modified: trunk/gtk-sharp-ribbon/Ribbons/Theme.cs
===================================================================
--- trunk/gtk-sharp-ribbon/Ribbons/Theme.cs     2007-12-27 22:46:27 UTC (rev 
91968)
+++ trunk/gtk-sharp-ribbon/Ribbons/Theme.cs     2007-12-27 23:06:33 UTC (rev 
91969)
@@ -48,6 +48,7 @@
                                linGrad.AddColorStop (1.0, 
colorScheme.PrettyDark);
                                cr.Pattern = linGrad;
                                cr.Fill ();
+                               linGrad.Destroy ();
                                
                                double frameSize = 2*lineWidth + space;
                                double availableHorizontalSpace = r.Width - 2 * 
frameSize;
@@ -77,6 +78,7 @@
                        linGrad.AddColorStop (1.0, colorScheme.PrettyDark);
                        cr.Pattern = linGrad;
                        cr.Stroke ();
+                       linGrad.Destroy ();
                }
                
                public Gdk.Color GetForecolorForRibbonTabs (bool Selected)
@@ -136,6 +138,7 @@
                                        linGrad.AddColorStop (1.0, new Color 
(0, 0, 0, 0.075));
                                        cr.Pattern = linGrad;
                                        cr.Fill ();
+                                       linGrad.Destroy ();
                                        
                                        cr.Arc (x0 + roundSize, y1 - roundSize, 
roundSize - lineWidth, Math.PI/2, Math.PI);
                                        cr.LineTo (x0 + lineWidth, ymid);
@@ -147,6 +150,7 @@
                                        linGrad.AddColorStop (0.5, new Color 
(0, 0, 0, 0.0));
                                        cr.Pattern = linGrad;
                                        cr.Fill ();
+                                       linGrad.Destroy ();
                                }
                                
                                /*** TAB ***/
@@ -169,6 +173,7 @@
                                linGrad.AddColorStop (1.0, c);
                                cr.Pattern = linGrad;
                                cr.Fill ();
+                               linGrad.Destroy ();
                                
                                /*** TAB :: DARK BORDER ***/
                                
@@ -198,6 +203,7 @@
                                linGrad.AddColorStop (1.0, 
ColorScheme.SetAlphaChannel (colorScheme.Bright, 0));
                                cr.Pattern = linGrad;
                                cr.Stroke ();
+                               linGrad.Destroy ();
                                
                                /*** TAB :: SHADOW ***/
                                
@@ -285,6 +291,7 @@
                                
                                cr.Pattern = bodyPattern;
                                cr.Fill ();
+                               bodyPattern.Destroy ();
                                
                                x0 = bodyAllocation.X + lineWidth15; y0 = 
bodyAllocation.Y + lineWidth15;
                                x1 = bodyAllocation.X + bodyAllocation.Width - 
lineWidth15; y1 = bodyAllocation.Y + bodyAllocation.Height - lineWidth15;
@@ -308,6 +315,7 @@
                                
                                cr.Pattern = innerBorderPattern;
                                cr.Stroke ();
+                               innerBorderPattern.Destroy ();
                                
                                x0 = bodyAllocation.X + lineWidth05; y0 = 
bodyAllocation.Y + lineWidth05;
                                x1 = bodyAllocation.X + bodyAllocation.Width - 
lineWidth05; y1 = bodyAllocation.Y + bodyAllocation.Height - lineWidth05;
@@ -353,6 +361,7 @@
                                
                                cr.Pattern = bodyPattern;
                                cr.Fill ();
+                               bodyPattern.Destroy ();
                                
                                if(widget.GroupStyle != GroupStyle.Left)
                                {
@@ -465,6 +474,7 @@
                                cr.Pattern = grad;
                                cr.Rectangle (bodyAllocation);
                                cr.Fill ();
+                               grad.Destroy ();
                        }
                        
                        cr.Color = new Color (1, 1, 1);

Modified: trunk/gtk-sharp-ribbon/Ribbons/Tile.cs
===================================================================
--- trunk/gtk-sharp-ribbon/Ribbons/Tile.cs      2007-12-27 22:46:27 UTC (rev 
91968)
+++ trunk/gtk-sharp-ribbon/Ribbons/Tile.cs      2007-12-27 23:06:33 UTC (rev 
91969)
@@ -91,6 +91,9 @@
                        
                        DrawContent (cr, contentArea);
                        
+                       ((IDisposable)cr.Target).Dispose ();
+                       ((IDisposable)cr).Dispose ();
+                       
                        return base.OnExposeEvent (evnt);
                }
                

Modified: trunk/gtk-sharp-ribbon/Ribbons/ToggleButton.cs
===================================================================
--- trunk/gtk-sharp-ribbon/Ribbons/ToggleButton.cs      2007-12-27 22:46:27 UTC 
(rev 91968)
+++ trunk/gtk-sharp-ribbon/Ribbons/ToggleButton.cs      2007-12-27 23:06:33 UTC 
(rev 91969)
@@ -144,6 +144,9 @@
                        cr.Clip ();
                        Draw (cr);
                        
+                       ((IDisposable)cr.Target).Dispose ();
+                       ((IDisposable)cr).Dispose ();
+                       
                        return base.OnExposeEvent (evnt);
                }
                

Modified: trunk/gtk-sharp-ribbon/Ribbons/gtk-gui/generated.cs
===================================================================
--- trunk/gtk-sharp-ribbon/Ribbons/gtk-gui/generated.cs 2007-12-27 22:46:27 UTC 
(rev 91968)
+++ trunk/gtk-sharp-ribbon/Ribbons/gtk-gui/generated.cs 2007-12-27 23:06:33 UTC 
(rev 91969)
@@ -15,7 +15,7 @@
         
         private static bool initialized;
         
-        internal static void Initialize() {
+        internal static void Initialize(Gtk.Widget iconRenderer) {
             if ((Stetic.Gui.initialized == false)) {
                 Stetic.Gui.initialized = true;
             }

Modified: trunk/gtk-sharp-ribbon/Ribbons/gtk-gui/gui.stetic
===================================================================
--- trunk/gtk-sharp-ribbon/Ribbons/gtk-gui/gui.stetic   2007-12-27 22:46:27 UTC 
(rev 91968)
+++ trunk/gtk-sharp-ribbon/Ribbons/gtk-gui/gui.stetic   2007-12-27 23:06:33 UTC 
(rev 91969)
@@ -1,6 +1,2 @@
-<?xml version="1.0" encoding="utf-8"?>
 <stetic-interface>
-  <import>
-    <widget-library name="../bin/Debug/Ribbons.dll" />
-  </import>
-</stetic-interface>
\ No newline at end of file
+</stetic-interface>

Modified: trunk/gtk-sharp-ribbon/Ribbons/gtk-gui/objects.xml
===================================================================
--- trunk/gtk-sharp-ribbon/Ribbons/gtk-gui/objects.xml  2007-12-27 22:46:27 UTC 
(rev 91968)
+++ trunk/gtk-sharp-ribbon/Ribbons/gtk-gui/objects.xml  2007-12-27 23:06:33 UTC 
(rev 91969)
@@ -1,2 +1 @@
-<objects>
-</objects>
\ No newline at end of file
+<objects />
\ No newline at end of file

Added: trunk/gtk-sharp-ribbon/Sample/ChangeLog
===================================================================
--- trunk/gtk-sharp-ribbon/Sample/ChangeLog     2007-12-27 22:46:27 UTC (rev 
91968)
+++ trunk/gtk-sharp-ribbon/Sample/ChangeLog     2007-12-27 23:06:33 UTC (rev 
91969)
@@ -0,0 +1,4 @@
+2007-12-28  Laurent Debacker <[EMAIL PROTECTED]> 
+
+       * MainWindow.cs, ChangeLog: Fixing calls to Dispose() and Destroy()
+

Modified: trunk/gtk-sharp-ribbon/Sample/MainWindow.cs
===================================================================
--- trunk/gtk-sharp-ribbon/Sample/MainWindow.cs 2007-12-27 22:46:27 UTC (rev 
91968)
+++ trunk/gtk-sharp-ribbon/Sample/MainWindow.cs 2007-12-27 23:06:33 UTC (rev 
91969)
@@ -17,7 +17,7 @@
                public MainWindow() : base (WindowType.Toplevel)
                {
                        AddEvents ((int)(Gdk.EventMask.ButtonPressMask | 
Gdk.EventMask.ButtonReleaseMask | Gdk.EventMask.PointerMotionMask));
-                       
+               
                        VBox master = new VBox ();
                        master.AddEvents ((int)(Gdk.EventMask.ButtonPressMask | 
Gdk.EventMask.ButtonReleaseMask | Gdk.EventMask.PointerMotionMask));
                        
@@ -29,7 +29,7 @@
                        group0 = new RibbonGroup ();
                        group0.Label = "Summer of Code";
                        group0.Child = button0;
-                       group0.Expand += onClick;
+                       //group0.Expand += onClick;
                        
                        Menu openMenu = new Menu ();
                        MenuItem abc_txt = new MenuItem ("abc.txt");
@@ -154,7 +154,7 @@
                        master.PackStart (txt, true, true, 0);
                        
                        Add (master);
-                       
+
                        ScreenChanged += Window_OnScreenChanged;
                        Window_OnScreenChanged (this, null);
                        ExposeEvent += Window_OnExpose;
@@ -187,6 +187,9 @@
                        cr.Operator = Operator.Source;
                        cr.Paint ();
                        
+                       ((IDisposable)cr.Target).Dispose();
+                       ((IDisposable)cr).Dispose();                    
+                       
                        args.RetVal = false;
                }
                

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

Reply via email to