=== modified file 'Docky.DBus/Docky.DBus/DockyDBusItem.cs' --- Docky.DBus/Docky.DBus/DockyDBusItem.cs 2010-04-14 19:01:31 +0000 +++ Docky.DBus/Docky.DBus/DockyDBusItem.cs 2010-05-25 19:27:14 +0000 @@ -87,7 +87,7 @@ uint number; do { - // should we ever get 100,000 items in here, I hope we crash, though we will likely get an infinite loop + //FIXME should we ever get 100,000 items in here, I hope we crash, though we will likely get an infinite loop number = (uint) rand.Next (0, 100000); } while (known_ids.BinarySearch (number) >= 0); @@ -216,7 +216,7 @@ items[id] = entry; update_time[id] = DateTime.UtcNow; - //Insert items into list... this is stupid but whatever fix later + //TODO Insert items into list... this is stupid but whatever fix later foreach (MenuItem item in items.Values) owner.RemoteMenuItems.Remove (item); @@ -262,6 +262,8 @@ if (items.ContainsKey (item)) { RemoteMenuEntry entry = items[item]; + entry.Clicked -= HandleActivated; + items.Remove (item); owner.RemoteMenuItems.Remove (entry); @@ -332,13 +334,24 @@ if (MenuItemActivated != null) MenuItemActivated ((sender as RemoteMenuEntry).ID); } + #region IDisposable implementation public void Dispose () { if (timer > 0) GLib.Source.Remove (timer); + + known_ids.Clear (); + update_time.Clear (); + + foreach (RemoteMenuEntry m in items.Values) { + m.Clicked -= HandleActivated; + m.Dispose (); + } + items.Clear (); + + owner = null; } - #endregion } } === modified file 'Docky.Items/Docky.Items/AbstractDockItem.cs' --- Docky.Items/Docky.Items/AbstractDockItem.cs 2010-02-17 15:10:07 +0000 +++ Docky.Items/Docky.Items/AbstractDockItem.cs 2010-05-25 19:27:14 +0000 @@ -634,69 +634,71 @@ if (string.IsNullOrEmpty (BadgeText)) return; - Pango.Layout layout = DockServices.Drawing.ThemedPangoLayout (); - layout.Width = Pango.Units.FromPixels (surface.Height / 2); - layout.Ellipsize = Pango.EllipsizeMode.None; - layout.FontDescription = new Gtk.Style().FontDescription; - layout.FontDescription.Weight = Pango.Weight.Bold; - - Pango.Rectangle inkRect, logicalRect; - int tsize = 3; - do { - layout.FontDescription.AbsoluteSize = Pango.Units.FromPixels (tsize); - layout.SetText (BadgeText); - layout.GetPixelExtents (out inkRect, out logicalRect); - tsize++; - } while (Math.Max (logicalRect.Width, logicalRect.Height) < surface.Height / (IsSmall ? 1 : 2) - 8); - - int size = Math.Max (logicalRect.Width, logicalRect.Height); - int padding = 4; - int lineWidth = 2; - int x = surface.Width - size / 2 - padding - lineWidth; - int y = size / 2 + padding + lineWidth; - - if (!IsSmall) { - // draw outline shadow - surface.Context.LineWidth = lineWidth; - surface.Context.Color = new Cairo.Color (0, 0, 0, 0.5); - surface.Context.Arc (x, y + 1, size / 2 + padding, 0, Math.PI * 2); - surface.Context.Stroke (); - - // draw filled gradient - RadialGradient rg = new RadialGradient (x, lineWidth, 0, x, lineWidth, size + 2 * padding); - rg.AddColorStop (0, badgeColors [0]); - rg.AddColorStop (1.0, badgeColors [1]); - - surface.Context.Pattern = rg; - surface.Context.Arc (x, y, size / 2 + padding, 0, Math.PI * 2); + using (Pango.Layout layout = DockServices.Drawing.ThemedPangoLayout ()) + { + layout.Width = Pango.Units.FromPixels (surface.Height / 2); + layout.Ellipsize = Pango.EllipsizeMode.None; + layout.FontDescription = new Gtk.Style ().FontDescription; + layout.FontDescription.Weight = Pango.Weight.Bold; + + Pango.Rectangle inkRect, logicalRect; + int tsize = 3; + do { + layout.FontDescription.AbsoluteSize = Pango.Units.FromPixels (tsize); + layout.SetText (BadgeText); + layout.GetPixelExtents (out inkRect, out logicalRect); + tsize++; + } while (Math.Max (logicalRect.Width, logicalRect.Height) < surface.Height / (IsSmall ? 1 : 2) - 8); + + int size = Math.Max (logicalRect.Width, logicalRect.Height); + int padding = 4; + int lineWidth = 2; + int x = surface.Width - size / 2 - padding - lineWidth; + int y = size / 2 + padding + lineWidth; + + if (!IsSmall) { + // draw outline shadow + surface.Context.LineWidth = lineWidth; + surface.Context.Color = new Cairo.Color (0, 0, 0, 0.5); + surface.Context.Arc (x, y + 1, size / 2 + padding, 0, Math.PI * 2); + surface.Context.Stroke (); + + // draw filled gradient + RadialGradient rg = new RadialGradient (x, lineWidth, 0, x, lineWidth, size + 2 * padding); + rg.AddColorStop (0, badgeColors [0]); + rg.AddColorStop (1.0, badgeColors [1]); + + surface.Context.Pattern = rg; + surface.Context.Arc (x, y, size / 2 + padding, 0, Math.PI * 2); + surface.Context.Fill (); + rg.Destroy (); + + // draw outline + surface.Context.Color = new Cairo.Color (1, 1, 1, 1); + surface.Context.Arc (x, y, size / 2 + padding, 0, Math.PI * 2); + surface.Context.Stroke (); + + surface.Context.LineWidth = lineWidth / 2; + surface.Context.Color = badgeColors [1]; + surface.Context.Arc (x, y, size / 2 + padding - lineWidth, 0, Math.PI * 2); + surface.Context.Stroke (); + + surface.Context.Color = new Cairo.Color (0, 0, 0, 0.2); + } else { + x = surface.Width - logicalRect.Width / 2; + y = logicalRect.Height / 2; + surface.Context.Color = new Cairo.Color (0, 0, 0, 0.6); + } + + // draw text + surface.Context.MoveTo (x - logicalRect.Width / 2, y - logicalRect.Height / 2); + + Pango.CairoHelper.LayoutPath (surface.Context, layout); + surface.Context.LineWidth = 2; + surface.Context.StrokePreserve (); + surface.Context.Color = new Cairo.Color (1, 1, 1, 1); surface.Context.Fill (); - rg.Destroy (); - - // draw outline - surface.Context.Color = new Cairo.Color (1, 1, 1, 1); - surface.Context.Arc (x, y, size / 2 + padding, 0, Math.PI * 2); - surface.Context.Stroke (); - - surface.Context.LineWidth = lineWidth / 2; - surface.Context.Color = badgeColors [1]; - surface.Context.Arc (x, y, size / 2 + padding - lineWidth, 0, Math.PI * 2); - surface.Context.Stroke (); - - surface.Context.Color = new Cairo.Color (0, 0, 0, 0.2); - } else { - x = surface.Width - logicalRect.Width / 2; - y = logicalRect.Height / 2; - surface.Context.Color = new Cairo.Color (0, 0, 0, 0.6); } - - // draw text - surface.Context.MoveTo (x - logicalRect.Width / 2, y - logicalRect.Height / 2); - - Pango.CairoHelper.LayoutPath (surface.Context, layout); - surface.Context.LineWidth = 2; - surface.Context.StrokePreserve (); - surface.Context.Color = new Cairo.Color (1, 1, 1, 1); - surface.Context.Fill (); } /// @@ -718,32 +720,31 @@ if (text_buffer == null) { - Pango.Layout layout = DockServices.Drawing.ThemedPangoLayout (); - - layout.FontDescription = style.FontDescription; - layout.FontDescription.AbsoluteSize = Pango.Units.FromPixels (11); - layout.FontDescription.Weight = Pango.Weight.Bold; - layout.Ellipsize = Pango.EllipsizeMode.End; - layout.Width = Pango.Units.FromPixels (500); - - layout.SetText (HoverText); - - Pango.Rectangle inkRect, logicalRect; - layout.GetPixelExtents (out inkRect, out logicalRect); - - int textWidth = inkRect.Width; - int textHeight = logicalRect.Height; - int buffer = HoverTextHeight - textHeight; - text_buffer = new DockySurface (Math.Max (HoverTextHeight, textWidth + buffer), HoverTextHeight, model); - - Cairo.Context cr = text_buffer.Context; - - cr.MoveTo ((text_buffer.Width - textWidth) / 2, buffer / 2); - Pango.CairoHelper.LayoutPath (cr, layout); - cr.Color = isLight ? new Cairo.Color (0.1, 0.1, 0.1) : new Cairo.Color (1, 1, 1); - cr.Fill (); - - layout.Dispose (); + using (Pango.Layout layout = DockServices.Drawing.ThemedPangoLayout ()) + { + layout.FontDescription = style.FontDescription; + layout.FontDescription.AbsoluteSize = Pango.Units.FromPixels (11); + layout.FontDescription.Weight = Pango.Weight.Bold; + layout.Ellipsize = Pango.EllipsizeMode.End; + layout.Width = Pango.Units.FromPixels (500); + + layout.SetText (HoverText); + + Pango.Rectangle inkRect, logicalRect; + layout.GetPixelExtents (out inkRect, out logicalRect); + + int textWidth = inkRect.Width; + int textHeight = logicalRect.Height; + int buffer = HoverTextHeight - textHeight; + text_buffer = new DockySurface (Math.Max (HoverTextHeight, textWidth + buffer), HoverTextHeight, model); + + Cairo.Context cr = text_buffer.Context; + + cr.MoveTo ((text_buffer.Width - textWidth) / 2, buffer / 2); + Pango.CairoHelper.LayoutPath (cr, layout); + cr.Color = isLight ? new Cairo.Color (0.1, 0.1, 0.1) : new Cairo.Color (1, 1, 1); + cr.Fill (); + } } return text_buffer; === modified file 'Docky.Items/Docky.Items/ApplicationDockItem.cs' --- Docky.Items/Docky.Items/ApplicationDockItem.cs 2010-04-14 19:01:31 +0000 +++ Docky.Items/Docky.Items/ApplicationDockItem.cs 2010-05-25 19:47:12 +0000 @@ -142,6 +142,12 @@ Windows = Enumerable.Empty (); } + public void RecollectWindows () + { + UpdateWindows (); + OnPaintNeeded (); + } + protected override MenuList OnGetMenuItems () { MenuList list = base.OnGetMenuItems (); === modified file 'Docky.Items/Docky.Items/FileApplicationProvider.cs' --- Docky.Items/Docky.Items/FileApplicationProvider.cs 2010-02-17 15:10:07 +0000 +++ Docky.Items/Docky.Items/FileApplicationProvider.cs 2010-05-25 19:47:12 +0000 @@ -89,9 +89,7 @@ // update the transient items when something happens in a desktop file directory // It is possible that a .desktop file was created for a window that didn't have one before, // this would associate that desktop file with the existing window. - WindowMatcher.DesktopFileChanged += delegate { - UpdateTransientItems (); - }; + WindowMatcher.DesktopFileChanged += HandleWindowMatcherDesktopFileChanged; Wnck.Screen.Default.WindowOpened += WnckScreenDefaultWindowOpened; Wnck.Screen.Default.WindowClosed += WnckScreenDefaultWindowClosed; @@ -99,6 +97,11 @@ Wnck.Screen.Default.ActiveWorkspaceChanged += WnckScreenDefaultActiveWorkspaceChanged; } + void HandleWindowMatcherDesktopFileChanged (object sender, DesktopFileChangedEventArgs e) + { + UpdateTransientItems (); + } + void WnckScreenDefaultActiveWorkspaceChanged (object o, ActiveWorkspaceChangedArgs args) { UpdateTransientItems (); @@ -114,23 +117,33 @@ if (args.Window.IsSkipTasklist) return; - if (!WindowMatcher.Default.WindowIsReadyForMatch (args.Window)) { - int i = 0; - // try to give open office enough time to open and set its title - GLib.Timeout.Add (150, delegate { - if (!WindowMatcher.Default.WindowIsReadyForMatch (args.Window) && i < 20) { - i++; - return true; - } - UpdateTransientItems (); - return false; - }); - } else { - // ensure we run last (more or less) so that all icons can update first - GLib.Timeout.Add (150, delegate { - UpdateTransientItems (); - return false; - }); + // ensure we run last (more or less) so that all icons can update first + GLib.Timeout.Add (150, delegate { + if (WindowMatcher.Default.WindowIsReadyForMatch (args.Window)) { + UpdateTransientItems (); + } else { + // handle applications which set their proper (matchable) window title very late, + // like OpenOffice + // their windows will be monitored for name changes (give up after 5 seconds) + args.Window.NameChanged += HandleUnmatchedWindowNameChanged; + GLib.Timeout.Add (5000, delegate { + if (!WindowMatcher.Default.WindowIsReadyForMatch (args.Window)) { + args.Window.NameChanged -= HandleUnmatchedWindowNameChanged; + UpdateTransientItems (); + } + return false; + }); + } + return false; + }); + } + + void HandleUnmatchedWindowNameChanged (object sender, EventArgs e) + { + Wnck.Window window = (sender as Wnck.Window); + if (WindowMatcher.Default.WindowIsReadyForMatch (window)) { + window.NameChanged -= HandleUnmatchedWindowNameChanged; + UpdateTransientItems (); } } @@ -172,6 +185,19 @@ desktopFile = WindowMatcher.Default.DesktopFileForWindow (window); if (!string.IsNullOrEmpty (desktopFile)) { + //This fixes WindowMatching for OpenOffice which is a bit slow setting up its window title + //Check if a existing ApplicationDockItem already uses this DesktopItem + ApplicationDockItem appdi; + if ((appdi = transient_items + .Where (adi => (adi is ApplicationDockItem && (adi as ApplicationDockItem).OwnedItem.Location == desktopFile)) + .Cast () + .FirstOrDefault ()) != null) { + + //Try again to gain this missing window + appdi.RecollectWindows (); + continue; + } + item = ApplicationDockItem.NewFromUri (new Uri (desktopFile).AbsoluteUri); } else { item = new WindowDockItem (window); @@ -361,6 +387,8 @@ public override void Dispose () { + WindowMatcher.DesktopFileChanged -= HandleWindowMatcherDesktopFileChanged; + Wnck.Screen.Default.WindowOpened -= WnckScreenDefaultWindowOpened; Wnck.Screen.Default.WindowClosed -= WnckScreenDefaultWindowClosed; Wnck.Screen.Default.ViewportsChanged -= WnckScreenDefaultViewportsChanged; === modified file 'Docky.Items/Docky.Items/IconDockItem.cs' --- Docky.Items/Docky.Items/IconDockItem.cs 2010-02-17 15:10:07 +0000 +++ Docky.Items/Docky.Items/IconDockItem.cs 2010-05-25 19:27:14 +0000 @@ -99,15 +99,19 @@ Emblems.RemoveAll (e => e.Position == emblem.Position); // add the new emblem Emblems.Add (emblem); - QueueRedraw (); - emblem.Changed += delegate { - QueueRedraw (); - }; + emblem.Changed += HandleEmblemChanged; + QueueRedraw (); + } + + void HandleEmblemChanged (object sender, EventArgs e) + { + QueueRedraw (); } public void RemoveEmblem (IconEmblem emblem) { if (Emblems.Contains (emblem)) { + emblem.Changed -= HandleEmblemChanged; Emblems.Remove (emblem); QueueRedraw (); } @@ -188,5 +192,21 @@ if (IconUpdated != null) IconUpdated (this, EventArgs.Empty); } + + public override void Dispose () + { + if (Emblems.Any ()) + Emblems.ForEach (emblem => { + emblem.Changed -= HandleEmblemChanged; + emblem.Dispose (); + }); + Emblems.Clear (); + + if (forced_pixbuf != null) + forced_pixbuf.Dispose (); + forced_pixbuf = null; + + base.Dispose (); + } } } === modified file 'Docky.Items/Docky.Items/IconEmblem.cs' --- Docky.Items/Docky.Items/IconEmblem.cs 2010-02-17 15:10:07 +0000 +++ Docky.Items/Docky.Items/IconEmblem.cs 2010-05-25 19:27:14 +0000 @@ -118,5 +118,12 @@ if (Changed != null) Changed (this, EventArgs.Empty); } + + public void Dispose () + { + if (forced_pixbuf != null) + forced_pixbuf.Dispose (); + forced_pixbuf = null; + } } } === modified file 'Docky.Items/Docky.Items/WindowDockItem.cs' --- Docky.Items/Docky.Items/WindowDockItem.cs 2010-02-17 15:10:07 +0000 +++ Docky.Items/Docky.Items/WindowDockItem.cs 2010-05-25 19:27:14 +0000 @@ -98,5 +98,13 @@ Windows = Enumerable.Empty (); } } + + public override void Dispose () + { + Wnck.Screen.Default.WindowOpened -= WnckScreenDefaultWindowOpened; + Wnck.Screen.Default.WindowClosed -= WnckScreenDefaultWindowClosed; + + base.Dispose (); + } } } === modified file 'Docky.Items/Docky.Menus/IconMenuItem.cs' --- Docky.Items/Docky.Menus/IconMenuItem.cs 2010-02-17 15:10:07 +0000 +++ Docky.Items/Docky.Menus/IconMenuItem.cs 2010-05-25 19:27:14 +0000 @@ -46,6 +46,7 @@ Clicked += onClicked; } #endregion + #region pixbuf icon constructors public IconMenuItem (string text, Pixbuf icon, bool disabled) : this (text, "", disabled) { === modified file 'Docky.Items/Docky.Menus/MenuItem.cs' --- Docky.Items/Docky.Menus/MenuItem.cs 2010-04-14 19:01:31 +0000 +++ Docky.Items/Docky.Menus/MenuItem.cs 2010-05-25 19:27:14 +0000 @@ -27,7 +27,7 @@ namespace Docky.Menus { - public class MenuItem + public class MenuItem : IDisposable { public event EventHandler DisabledChanged; public event EventHandler TextChanged; @@ -152,5 +152,19 @@ { Clicked += onClicked; } + + #region IDisposable implementation + public void Dispose () + { + if (forced_pixbuf != null) + forced_pixbuf.Dispose (); + forced_pixbuf = null; + + Clicked = null; + IconChanged = null; + DisabledChanged = null; + TextChanged = null; + } + #endregion } } === modified file 'Docky.Items/Docky.Menus/MenuList.cs' --- Docky.Items/Docky.Menus/MenuList.cs 2010-02-17 15:10:07 +0000 +++ Docky.Items/Docky.Menus/MenuList.cs 2010-05-25 19:27:14 +0000 @@ -33,7 +33,7 @@ Footer, } - public class MenuList + public class MenuList : IDisposable { Dictionary> list; Dictionary titles; @@ -126,5 +126,17 @@ return result; } + + #region IDisposable implementation + public void Dispose () + { + foreach (List sublist in list.Values) + sublist.Clear (); + list.Clear (); + titles.Clear (); + list = null; + titles = null; + } + #endregion } } === modified file 'Docky.Items/Docky.Painters/PagingDockPainter.cs' --- Docky.Items/Docky.Painters/PagingDockPainter.cs 2010-02-17 15:10:07 +0000 +++ Docky.Items/Docky.Painters/PagingDockPainter.cs 2010-05-25 19:27:14 +0000 @@ -258,8 +258,7 @@ { lock (buffers) { for (int i = 0; i < buffers.Length; i++) - if (buffers [i] != null) - { + if (buffers [i] != null) { buffers [i].Dispose (); buffers [i] = null; } === modified file 'Docky.Services/AssemblyInfo.cs' --- Docky.Services/AssemblyInfo.cs 2010-04-14 19:01:31 +0000 +++ Docky.Services/AssemblyInfo.cs 2010-05-25 19:27:14 +0000 @@ -50,8 +50,8 @@ { internal static class AssemblyInfo { - public const string DisplayVersion = "2.0.2"; - public const string VersionDetails = "bzr docky-2.0 r1210"; + public const string DisplayVersion = "2.0.3.1"; + public const string VersionDetails = "bzr docky-2.0 r1228"; public const string LocaleDirectory = "/usr/share/locale"; public const string DataDirectory = "/usr/share"; } === modified file 'Docky.Services/Docky.Services/Preferences.cs' --- Docky.Services/Docky.Services/Preferences.cs 2010-04-14 19:01:31 +0000 +++ Docky.Services/Docky.Services/Preferences.cs 2010-05-25 19:27:14 +0000 @@ -23,6 +23,7 @@ using System.Linq; using System.Text; using System.Text.RegularExpressions; +using System.Threading; using GConf; using Gnome.Keyring; @@ -45,12 +46,12 @@ try { result = client.Get (AbsolutePathForKey (key, GConfPrefix)); } catch (GConf.NoSuchKeyException) { - Log.Debug ("Key {0} does not exist, creating.", key); + Log>.Debug ("Key {0} does not exist, creating.", key); Set (key, def); return def; } catch (Exception e) { - Log.Error ("Failed to get gconf value for {0} : '{1}'", key, e.Message); - Log.Info (e.StackTrace); + Log>.Error ("Failed to get gconf value for {0} : '{1}'", key, e.Message); + Log>.Info (e.StackTrace); return def; } @@ -66,8 +67,8 @@ try { client.Set (AbsolutePathForKey (key, GConfPrefix), val); } catch (Exception e) { - Log.Error ("Encountered error setting GConf key {0}: '{1}'", key, e.Message); - Log.Info (e.StackTrace); + Log>.Error ("Encountered error setting GConf key {0}: '{1}'", key, e.Message); + Log>.Info (e.StackTrace); success = false; } return success; @@ -90,8 +91,8 @@ try { client.AddNotify (path, handler); } catch (Exception e) { - Log.Error ("Error removing notification handler, {0}", e.Message); - Log.Debug (e.StackTrace); + Log>.Error ("Error removing notification handler, {0}", e.Message); + Log>.Debug (e.StackTrace); } } @@ -100,73 +101,92 @@ try { client.RemoveNotify (path, handler); } catch (Exception e) { - Log.Error ("Error removing notification handler, {0}", e.Message); - Log.Debug (e.StackTrace); + Log>.Error ("Error removing notification handler, {0}", e.Message); + Log>.Debug (e.StackTrace); } } #endregion #region IPreferences - secure, based on Gnome Keyring - object KeyringLock = new Object (); + + AutoResetEvent autoEvent = new AutoResetEvent(false); readonly string ErrorSavingMessage = "Error saving {0} : '{0}'"; readonly string KeyNotFoundMessage = "Key \"{0}\" not found in keyring"; readonly string KeyringUnavailableMessage = "gnome-keyring-daemon could not be reached!"; - const string DefaultRootPath = "docky"; + readonly string GnomeKeyringPrefix = "docky-2/" + typeof (TOwner).FullName.Replace (".", "/"); public bool SetSecure (string key, T val) { - lock (KeyringLock) { - if (typeof (T) != typeof (string)) - throw new NotImplementedException ("Unimplemented for non string values"); - - if (!Ring.Available) { - Log.Error (KeyringUnavailableMessage); - return false; - } - - Hashtable keyData = new Hashtable (); - keyData [AbsolutePathForKey (key, DefaultRootPath)] = key; - - try { - Ring.CreateItem (Ring.GetDefaultKeyring (), ItemType.GenericSecret, AbsolutePathForKey (key, DefaultRootPath), keyData, val.ToString (), true); - } catch (KeyringException e) { - Log.Error (ErrorSavingMessage, key, e.Message); - Log.Info (e.StackTrace); - return false; - } - - return true; + if (typeof (T) != typeof (string)) + throw new NotImplementedException ("Unimplemented for non string values"); + + bool success = false; + + lock (autoEvent) { + DockServices.System.RunOnMainThread (() => { + try { + if (!Ring.Available) { + Log>.Error (KeyringUnavailableMessage); + return; + } + + Hashtable keyData = new Hashtable (); + keyData [AbsolutePathForKey (key, GnomeKeyringPrefix)] = key; + + Ring.CreateItem (Ring.GetDefaultKeyring (), ItemType.GenericSecret, AbsolutePathForKey (key, GnomeKeyringPrefix), keyData, val.ToString (), true); + success = true; + } catch (KeyringException e) { + Log>.Error (ErrorSavingMessage, key, e.Message); + Log>.Info (e.StackTrace); + } finally { + autoEvent.Set (); + } + }); + + autoEvent.WaitOne (1000); } + + return success; } public T GetSecure (string key, T def) { - lock (KeyringLock) { - if (!Ring.Available) { - Log.Error (KeyringUnavailableMessage); - return def; - } - - Hashtable keyData = new Hashtable (); - keyData [AbsolutePathForKey (key, DefaultRootPath)] = key; - - try { - foreach (ItemData item in Ring.Find (ItemType.GenericSecret, keyData)) { - if (!item.Attributes.ContainsKey (AbsolutePathForKey (key, DefaultRootPath))) continue; + T val = def; + + lock (autoEvent) { + DockServices.System.RunOnMainThread (() => { + try { + if (!Ring.Available) { + Log>.Error (KeyringUnavailableMessage); + return; + } + + Hashtable keyData = new Hashtable (); + keyData [AbsolutePathForKey (key, GnomeKeyringPrefix)] = key; + + foreach (ItemData item in Ring.Find (ItemType.GenericSecret, keyData)) { + if (!item.Attributes.ContainsKey (AbsolutePathForKey (key, GnomeKeyringPrefix))) continue; - string secureValue = item.Secret; - return (T) Convert.ChangeType (secureValue, typeof (T)); + val = (T) Convert.ChangeType (item.Secret, typeof (T)); + return; + } + } catch (KeyringException e) { + Log>.Error (KeyNotFoundMessage, AbsolutePathForKey (key, GnomeKeyringPrefix), e.Message); + Log>.Info (e.StackTrace); + } finally { + autoEvent.Set (); } - } catch (KeyringException) { - Log.Error (KeyNotFoundMessage, AbsolutePathForKey (key, DefaultRootPath)); - } + }); - return def; + autoEvent.WaitOne (1000); } + + return val; } + #endregion } } === modified file 'Docky.Services/Docky.Services/SystemService.cs' --- Docky.Services/Docky.Services/SystemService.cs 2010-04-14 19:01:31 +0000 +++ Docky.Services/Docky.Services/SystemService.cs 2010-05-25 19:27:14 +0000 @@ -34,6 +34,8 @@ { public class SystemService { + public static System.Threading.Thread MainThread { get; set; } + internal SystemService () { InitializeBattery (); @@ -51,6 +53,7 @@ const string PROXY = "/system/http_proxy"; const string PROXY_USE_PROXY = PROXY + "/" + "use_http_proxy"; + const string PROXY_USE_AUTH = PROXY + "/" + "use_authentication"; const string PROXY_HOST = PROXY + "/" + "host"; const string PROXY_PORT = PROXY + "/" + "port"; const string PROXY_USER = PROXY + "/" + "authentication_user"; @@ -75,7 +78,7 @@ GConf.AddNotify (PROXY, ProxySettingsChanged); Proxy = GetWebProxy (); - } + } public event EventHandler ConnectionStatusChanged; @@ -161,8 +164,9 @@ proxy.BypassArrayList.Add (string.Format ("http://{0}", host)); } } - proxy.Credentials = new NetworkCredential (GConf.Get (PROXY_USER, ""), - GConf.Get ( PROXY_PASSWORD, "")); + if (GConf.Get (PROXY_USE_AUTH, false)) + proxy.Credentials = new NetworkCredential (GConf.Get (PROXY_USER, ""), + GConf.Get (PROXY_PASSWORD, "")); } catch (Exception e) { Log.Error ("Error creating web proxy, {0}", e.Message); Log.Debug (e.StackTrace); @@ -466,14 +470,17 @@ public void RunOnMainThread (Action action) { - Gtk.Application.Invoke ((sender, arg) => { - try { - action (); - } catch (Exception e) { - Log.Error ("Error in RunOnMainThread: {0}", e.Message); - Log.Debug (e.StackTrace); - } - }); + if (System.Threading.Thread.CurrentThread.Equals (MainThread)) + action (); + else + Gtk.Application.Invoke ((sender, arg) => { + try { + action (); + } catch (Exception e) { + Log.Error ("Error in RunOnMainThread: {0}", e.Message); + Log.Debug (e.StackTrace); + } + }); } public void RunOnMainThread (Action action, int delay) === modified file 'Docky.Widgets/Docky.Widgets/AbstractTileObject.cs' --- Docky.Widgets/Docky.Widgets/AbstractTileObject.cs 2010-02-17 15:10:07 +0000 +++ Docky.Widgets/Docky.Widgets/AbstractTileObject.cs 2010-05-25 19:27:14 +0000 @@ -23,7 +23,7 @@ namespace Docky.Widgets { - public abstract class AbstractTileObject + public abstract class AbstractTileObject : IDisposable { /// /// Triggered when the icon for this tile is updated @@ -289,5 +289,20 @@ OnButtonsUpdated (); } } + + #region IDisposable implementation + public virtual void Dispose () + { + if (force_pbuf != null) + force_pbuf.Dispose (); + force_pbuf = null; + + ExtraButtons.ForEach (button => { + button.Dispose (); + button.Destroy (); + }); + ExtraButtons.Clear (); + } + #endregion } } === modified file 'Docky.Widgets/Docky.Widgets/AnimatedBox.cs' --- Docky.Widgets/Docky.Widgets/AnimatedBox.cs 2010-02-17 15:10:07 +0000 +++ Docky.Widgets/Docky.Widgets/AnimatedBox.cs 2010-05-25 19:27:14 +0000 @@ -540,6 +540,13 @@ } #endregion - + + public override void Dispose () + { + stage.ActorStep -= OnActorStep; + border_stage.Iteration -= OnBorderIteration; + + base.Dispose (); + } } } \ No newline at end of file === modified file 'Docky.Widgets/Docky.Widgets/ListOnlyTileView.cs' --- Docky.Widgets/Docky.Widgets/ListOnlyTileView.cs 2010-02-17 15:10:07 +0000 +++ Docky.Widgets/Docky.Widgets/ListOnlyTileView.cs 2010-05-25 19:47:05 +0000 @@ -36,11 +36,11 @@ public override void OnTileActiveChanged (object o, EventArgs args) { + base.OnTileActiveChanged (o, args); + Tile t = o as Tile; RemoveTile (t.OwnedObject); - - base.OnTileActiveChanged (o, args); } } } === modified file 'Docky.Widgets/Docky.Widgets/Tile.cs' --- Docky.Widgets/Docky.Widgets/Tile.cs 2010-02-17 15:10:07 +0000 +++ Docky.Widgets/Docky.Widgets/Tile.cs 2010-05-25 19:27:14 +0000 @@ -1,3 +1,19 @@ +// +// Copyright (C) 2010 Rico Tzschichholz +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// // // Tile.cs // @@ -61,17 +77,9 @@ { OwnedObject = obj; - OwnedObject.IconUpdated += delegate { - SetImage (); - }; - - OwnedObject.TextUpdated += delegate { - SetText (); - }; - - OwnedObject.ButtonsUpdated += delegate { - UpdateButtons (); - }; + OwnedObject.IconUpdated += HandleOwnedObjectIconUpdated; + OwnedObject.TextUpdated += HandleOwnedObjectTextUpdated; + OwnedObject.ButtonsUpdated += HandleOwnedObjectButtonsUpdated; IconSize = iconSize; @@ -247,5 +255,31 @@ UpdateState (); QueueResize (); } + + void HandleOwnedObjectButtonsUpdated (object sender, EventArgs e) + { + UpdateButtons (); + } + + void HandleOwnedObjectTextUpdated (object sender, EventArgs e) + { + SetText (); + } + + void HandleOwnedObjectIconUpdated (object sender, EventArgs e) + { + SetImage (); + } + + public override void Dispose () + { + OwnedObject.IconUpdated -= HandleOwnedObjectIconUpdated; + OwnedObject.TextUpdated -= HandleOwnedObjectTextUpdated; + OwnedObject.ButtonsUpdated -= HandleOwnedObjectButtonsUpdated; + + OwnedObject = null; + + base.Dispose (); + } } } \ No newline at end of file === modified file 'Docky.Widgets/Docky.Widgets/TileView.cs' --- Docky.Widgets/Docky.Widgets/TileView.cs 2010-02-17 15:10:07 +0000 +++ Docky.Widgets/Docky.Widgets/TileView.cs 2010-05-25 19:47:05 +0000 @@ -1,3 +1,19 @@ +// +// Copyright (C) 2010 Rico Tzschichholz +// +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program. If not, see . +// // // AddinView.cs // @@ -68,12 +84,33 @@ public void Clear () { + tiles.ForEach (tile => { + tile.Hide (); + tile.ActiveChanged -= OnTileActiveChanged; + tile.SizeAllocated -= OnTileSizeAllocated; + tile.Owner = null; + }); tiles.Clear (); + foreach (Widget child in box.Children) { box.Remove (child); + child.Dispose (); + child.Destroy (); } } + public virtual void AppendTile (AbstractTileObject tileObject) + { + Tile tile = new Tile (tileObject, IconSize); + tile.Owner = this; + tile.ActiveChanged += OnTileActiveChanged; + tile.SizeAllocated += OnTileSizeAllocated; + tile.Show (); + tiles.Add (tile); + + box.PackStart (tile, false, false, 0); + } + public virtual void RemoveTile (AbstractTileObject tileObject) { Tile tile = tiles.First (t => t.OwnedObject == tileObject); @@ -83,8 +120,16 @@ if (selected_index == tiles.IndexOf (tile)) ClearSelection (); + + tile.Hide (); + tile.ActiveChanged -= OnTileActiveChanged; + tile.SizeAllocated -= OnTileSizeAllocated; + tile.Owner = null; + tiles.Remove (tile); box.Remove (tile); + tile.Dispose (); + tile.Destroy (); } public virtual void ClearSelection () @@ -96,18 +141,6 @@ selected_index = -1; } - public virtual void AppendTile (AbstractTileObject tileObject) - { - Tile tile = new Tile (tileObject, IconSize); - tile.Owner = this; - tile.ActiveChanged += OnTileActiveChanged; - tile.SizeAllocated += OnTileSizeAllocated; - tile.Show (); - tiles.Add (tile); - - box.PackStart (tile, false, false, 0); - } - private bool changing_styles = false; protected override void OnStyleSet (Style previous_style) @@ -228,5 +261,17 @@ QueueResize (); } + + public override void Dispose () + { + Clear (); + + if (box != null) { + box.Dispose (); + box.Destroy (); + } + + base.Dispose (); + } } } === modified file 'Docky.Windowing/Windowing/DesktopItem.cs' --- Docky.Windowing/Windowing/DesktopItem.cs 2010-02-17 15:10:07 +0000 +++ Docky.Windowing/Windowing/DesktopItem.cs 2010-05-25 19:27:14 +0000 @@ -189,7 +189,12 @@ public void Launch (IEnumerable uris) { - DockServices.System.Open (GLib.DesktopAppInfo.NewFromFilename (Location), uris.Select (uri => GLib.FileFactory.NewForUri (uri))); + if (!File.Exists (Location)) + return; + + using (GLib.DesktopAppInfo appinfo = GLib.DesktopAppInfo.NewFromFilename (Location)) { + DockServices.System.Open (appinfo, uris.Select (uri => GLib.FileFactory.NewForUri (uri))); + } } #region IDisposable implementation === modified file 'Docky.Windowing/Windowing/WindowMatcher.cs' --- Docky.Windowing/Windowing/WindowMatcher.cs 2010-04-14 19:01:31 +0000 +++ Docky.Windowing/Windowing/WindowMatcher.cs 2010-05-25 19:27:14 +0000 @@ -629,11 +629,17 @@ using (GLib.DataInputStream stream = new GLib.DataInputStream (launcher.Read (null))) { ulong len; string line; - while ((line = stream.ReadLine (out len, null)) != null) { - if (line.StartsWith ("exec")) { - execLine = line; - break; + try { + while ((line = stream.ReadLine (out len, null)) != null) { + if (line.StartsWith ("exec")) { + execLine = line; + break; + } } + } catch (Exception e) { + Log.Error (e.Message); + Log.Error (e.StackTrace); + continue; } } === modified file 'Docky/AssemblyInfo.cs' --- Docky/AssemblyInfo.cs 2010-04-14 19:01:31 +0000 +++ Docky/AssemblyInfo.cs 2010-05-25 19:27:14 +0000 @@ -46,7 +46,7 @@ // // You can specify all values by your own or you can build default build and revision // numbers with the '*' character (the default): -[assembly: AssemblyVersion("1210")] +[assembly: AssemblyVersion("1228")] // The following attributes specify the key for the sign of your assembly. See the // .NET Framework documentation for more information about signing. @@ -58,8 +58,8 @@ { internal static class AssemblyInfo { - public const string DisplayVersion = "2.0.2"; - public const string VersionDetails = "bzr docky-2.0 r1210"; + public const string DisplayVersion = "2.0.3.1"; + public const string VersionDetails = "bzr docky-2.0 r1228"; public const string LocaleDirectory = "/usr/share/locale"; public const string InstallData = "/usr/share"; } === modified file 'Docky/Docky/DockletTile.cs' --- Docky/Docky/DockletTile.cs 2010-02-17 15:10:07 +0000 +++ Docky/Docky/DockletTile.cs 2010-05-25 19:27:14 +0000 @@ -92,5 +92,13 @@ UpdateInfo (); } + + public override void Dispose () + { + Addin = null; + Provider = null; + + base.Dispose (); + } } } === modified file 'Docky/Docky/Docky.cs' --- Docky/Docky/Docky.cs 2010-04-14 19:01:31 +0000 +++ Docky/Docky/Docky.cs 2010-05-25 19:27:14 +0000 @@ -20,6 +20,7 @@ using System.ComponentModel; using System.Linq; using System.Text; +using System.Threading; using System.IO; using Mono.Unix; @@ -72,6 +73,9 @@ // set process name DockServices.System.SetProcessName ("docky"); + // cache main thread + SystemService.MainThread = Thread.CurrentThread; + // check compositing CheckComposite (); Gdk.Screen.Default.CompositedChanged += delegate { === modified file 'Docky/Docky/HelperTile.cs' --- Docky/Docky/HelperTile.cs 2010-02-17 15:10:07 +0000 +++ Docky/Docky/HelperTile.cs 2010-05-25 19:27:14 +0000 @@ -34,9 +34,7 @@ public HelperTile (Helper helper) { this.Helper = helper; - Helper.HelperStatusChanged += delegate(object sender, HelperStatusChangedEventArgs e) { - SetProps (); - }; + Helper.HelperStatusChanged += HandleHelperHelperStatusChanged; ButtonStateDisabledText = Catalog.GetString ("_Enable"); ButtonStateEnabledText = Catalog.GetString ("_Disable"); @@ -67,7 +65,7 @@ SetProps (); } - + void SetProps () { SubDescriptionText = Helper.IsRunning ? Catalog.GetString ("Running") : Catalog.GetString ("Stopped"); @@ -79,5 +77,18 @@ Helper.Enabled = !Enabled; SetProps (); } + + void HandleHelperHelperStatusChanged (object sender, HelperStatusChangedEventArgs e) + { + SetProps (); + } + + public override void Dispose () + { + Helper.HelperStatusChanged -= HandleHelperHelperStatusChanged; + Helper = null; + + base.Dispose (); + } } } === modified file 'Docky/Docky/Interface/DockWindow.cs' --- Docky/Docky/Interface/DockWindow.cs 2010-04-14 19:01:31 +0000 +++ Docky/Docky/Interface/DockWindow.cs 2010-05-25 19:27:14 +0000 @@ -262,6 +262,10 @@ update_screen_regions = true; SetTooltipVisibility (); + if (background_buffer != null) { + background_buffer.Dispose (); + background_buffer = null; + } AnimatedDraw (); } } @@ -780,14 +784,16 @@ void HandleMenuHidden (object sender, EventArgs e) { + update_screen_regions = true; SetTooltipVisibility (); AnimatedDraw (); } void HandleMenuShown (object sender, EventArgs e) { + update_screen_regions = true; + SetTooltipVisibility (); AnimatedDraw (); - SetTooltipVisibility (); } void DockyControllerThemeChanged (object sender, EventArgs e) @@ -1535,7 +1541,7 @@ DockySurface surface = item.IconSurface (main_buffer, IconSize, IconSize, VisibleDockHeight); width = surface.Width; - height = surface.Height; + height = surface.Height; if (item.RotateWithDock && VerticalDock) { int tmp = width; @@ -1798,7 +1804,7 @@ Gdk.Rectangle region = hoverArea; region.X += window_position.X; region.Y += window_position.Y; - if (ConfigurationMode || Painter != null) + if (Menu.Visible || ConfigurationMode || Painter != null) adi.SetScreenRegion (Screen, new Gdk.Rectangle (0, 0, 0, 0)); else adi.SetScreenRegion (Screen, region); @@ -2521,6 +2527,12 @@ background_buffer = new DockySurface (BackgroundWidth, BackgroundHeight, surface); } + if (ConfigurationMode) { + background_buffer.Context.Rectangle (0, 0, BackgroundWidth, BackgroundHeight); + background_buffer.Context.Color = new Cairo.Color (1, 1, 1, 0.10); + background_buffer.Context.Fill (); + } + Gdk.Pixbuf background = DockServices.Drawing.LoadIcon (Docky.Controller.BackgroundSvg); Gdk.Pixbuf tmp; === modified file 'Docky/Docky/Items/DockyItem.cs' --- Docky/Docky/Items/DockyItem.cs 2010-04-14 19:01:31 +0000 +++ Docky/Docky/Items/DockyItem.cs 2010-05-25 19:27:14 +0000 @@ -89,7 +89,6 @@ protected override MenuList OnGetMenuItems () { - // intentionally dont inherit MenuList list = new MenuList (); list[MenuListContainer.Actions].Add (new MenuItem (Catalog.GetString ("_Settings"), PrefsIcon, (o, a) => ConfigurationWindow.Instance.Show ())); list[MenuListContainer.Actions].Add (new MenuItem (Catalog.GetString ("_About"), AboutIcon, (o, a) => Docky.ShowAbout ())); === modified file 'Docky/Docky/Menus/DockItemMenu.cs' --- Docky/Docky/Menus/DockItemMenu.cs 2010-02-17 15:10:07 +0000 +++ Docky/Docky/Menus/DockItemMenu.cs 2010-05-25 19:27:14 +0000 @@ -145,6 +145,8 @@ { if (Container.Child != null) { foreach (Gtk.Widget widget in (Container.Child as VBox).Children) { + if (widget is MenuItemWidget) + (widget as MenuItemWidget).SelectedChanged -= HandleSelectedChanged; widget.Dispose (); widget.Destroy (); } @@ -194,16 +196,20 @@ } } vbox.SetSizeRequest (width, -1); - + Container.ShowAll (); } public override void Dispose () { - if (Container != null && Container.Child != null && (Container.Child as VBox).Children != null) - foreach (Gtk.Widget widget in (Container.Child as VBox).Children) + if (Container != null && Container.Child != null && (Container.Child as VBox).Children != null) { + foreach (Gtk.Widget widget in (Container.Child as VBox).Children) { if (widget is MenuItemWidget) (widget as MenuItemWidget).SelectedChanged -= HandleSelectedChanged; + widget.Dispose (); + widget.Destroy (); + } + } base.Dispose (); } === modified file 'Docky/Docky/Menus/MenuItemWidget.cs' --- Docky/Docky/Menus/MenuItemWidget.cs 2010-02-17 15:10:07 +0000 +++ Docky/Docky/Menus/MenuItemWidget.cs 2010-05-25 19:27:14 +0000 @@ -296,9 +296,18 @@ { if (icon_surface != null) icon_surface.Dispose (); + icon_surface = null; if (emblem_surface != null) emblem_surface.Dispose (); + emblem_surface = null; + + item.IconChanged -= ItemIconChanged; + item.TextChanged -= ItemTextChanged; + item.DisabledChanged -= ItemDisabledChanged; + item.Dispose (); + item = null; + base.Dispose (); } } === modified file 'Makefile.am' --- Makefile.am 2010-02-17 15:10:07 +0000 +++ Makefile.am 2010-05-25 19:27:14 +0000 @@ -1,4 +1,7 @@ -EXTRA_DIST = config.rpath COPYRIGHT +EXTRA_DIST = \ + config.rpath \ + COPYRIGHT \ + NEWS ACLOCAL_AMFLAGS = -I m4 -I m4/shamrock === modified file 'Makefile.in' --- Makefile.in 2010-02-17 15:10:07 +0000 +++ Makefile.in 2010-05-25 19:27:14 +0000 @@ -45,7 +45,7 @@ $(top_srcdir)/StandardPlugins/RecentDocuments/Resources/RecentDocuments.addin.xml.in \ $(top_srcdir)/StandardPlugins/Trash/Resources/Trash.addin.xml.in \ $(top_srcdir)/StandardPlugins/Weather/Resources/Weather.addin.xml.in \ - $(top_srcdir)/configure AUTHORS COPYING config.rpath \ + $(top_srcdir)/configure AUTHORS COPYING NEWS config.rpath \ install-sh missing py-compile ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/m4/shamrock/expansions.m4 \ @@ -307,7 +307,11 @@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ -EXTRA_DIST = config.rpath COPYRIGHT +EXTRA_DIST = \ + config.rpath \ + COPYRIGHT \ + NEWS + ACLOCAL_AMFLAGS = -I m4 -I m4/shamrock SUBDIRS = \ . \ === added file 'NEWS' --- NEWS 1970-01-01 00:00:00 +0000 +++ NEWS 2010-05-25 19:27:14 +0000 @@ -0,0 +1,106 @@ +Docky: The finest dock no money can buy! + + +2.0.3.1 "You should have heard from us by now" (2010-05-03) +=============================================================================== + * Bug-fix and Maintenance Release + * update translations + + CORE: + * fix gnome-keyring related crash in Lucid caused by GMail docklet - #555562 + * catch exception for read-failure of cxoffice launcher - #573294 + * check if authentication is used before using network proxy + * make sure to update screen regions when showing menus + * make transparent themed docks still glow in configuration mode - #572416 + * Memory Leaks + - some unlinked handlers and pixbufs (DockItemMenu, WindowDockItem, ...) + - proper disposal of tile-widgets in preferences dialog + - properly using DesktopAppInfo for launching application + + DOCKLETS: + * GMail: fix exception when reloading - #573991 + * CLOCK: popup menu must always show icons - #574003 + + HELPER: + * helpers crash when dbus isn't available - #540688 + + +2.0.2 "Living on the screen's edge" (2010-04-12) +=============================================================================== + * Bug-fix and Maintenance Release + * update translations + * fix MonoDevelop build + * update homepage link in about dialog + + CORE: + * add automatic enabling of --nvidia flag + * respect system proxy settings - #546135 + * add directions to select a dock to configure to the settings dialog + docklets tab - #555153 + * fix freeze when MaxIconSize updates - #495155 #506436 #518304 + #519938 #543123 + * add locking to secure preferences, possibly avoid a gnome-keyring + related crash + * fix hiding with fullscreen windows with multiple monitors - #533872 + * fix right alignment of docklets when no launchers - #550417 + * fix manual override of Docky icon color - #549154 + * let urgent glow pulse for 10s (5 pulses) + * fix render bug with painter icons + * add UPower support for lucid + * fix helper status updating in config dialog - #547115 + * Memory Leaks + - fix leak associated with GLib.FileInfo + - fix leak in NativeInterop + - fix leak in ApplicationDockItem + * WindowMatcher + - use a NoDisplay launcher if there isn't already a launcher for that + exec - #558755 + - fix matching executables that end in a version number - #558780 + - fix OpenOffice.org matching in more cases and clean up matching code + - add support for matching windows based on StartupWMClass launcher + attribute - #518828 + this gives a workaround/solution for #484610 + - fix Wine application matching regression - #552396 + - fix bug where custom launchers were not being matched - #543837 + + DOCKLETS: + * adding icon fallbacks to some docklets + * Gmail: fix handling of labels with strange chars and escaping problems + * Gmail: fix checking date parse problem - #554333 + * Mounter: really fix NullReferenceException - #536915 + * Weather/Gmail: add proper thread shutdown + + +2.0.1 "We require somewhere new" (2010-03-16) +=============================================================================== + * Bug-fix and Maintenance Release + * update translations + + CORE: + * add timeouts to HttpWebRequests + * properly initialize config window - information-text is not shown when + there is more than one dock + * fix version output on console + * Handle InvalidOperationException thrown by AddinManger.Initalize + * properly disable plugin when it gets dragged of a dock + * set a min height on the calendar painter + + DOCKLETS: + * GMail: prevent concurrent mail checking + * Mounter: fix a crash and a possible crash - #536915 + * RecentDocuments: sort list before limiting it - #538027 + * Trash: nicer description + * Weather: prevent concurrent reloads + * Weather: fix painter crash - #527952 + + HELPER: + * Banshee: cover folder fix for 1.5.5 - #538728 + * Helper metadata are not scripts. Install them as data, rather than as + executables + + +2.0.0 "People love our huge docks" (2010-02-16) +=============================================================================== + * Initial Release + + === modified file 'StandardPlugins/Clock/src/ClockDockItem.cs' --- StandardPlugins/Clock/src/ClockDockItem.cs 2010-02-17 15:10:07 +0000 +++ StandardPlugins/Clock/src/ClockDockItem.cs 2010-05-25 19:27:14 +0000 @@ -418,19 +418,19 @@ protected override MenuList OnGetMenuItems () { MenuList list = base.OnGetMenuItems (); - list[MenuListContainer.Actions].Add (new MenuItem (Catalog.GetString ("Di_gital Clock"), ShowDigital ? "gtk-apply" : "gtk-remove", (o, a) => + list[MenuListContainer.Actions].Add (new IconMenuItem (Catalog.GetString ("Di_gital Clock"), ShowDigital ? "gtk-apply" : "gtk-remove", (o, a) => { ShowDigital = !ShowDigital; QueueRedraw (); })); - list[MenuListContainer.Actions].Add (new MenuItem (Catalog.GetString ("24-Hour _Clock"), ShowMilitary ? "gtk-apply" : "gtk-remove", (o, a) => + list[MenuListContainer.Actions].Add (new IconMenuItem (Catalog.GetString ("24-Hour _Clock"), ShowMilitary ? "gtk-apply" : "gtk-remove", (o, a) => { ShowMilitary = !ShowMilitary; QueueRedraw (); }, !ShowDigital)); - list[MenuListContainer.Actions].Add (new MenuItem (Catalog.GetString ("Show _Date"), ShowDate ? "gtk-apply" : "gtk-remove", (o, a) => + list[MenuListContainer.Actions].Add (new IconMenuItem (Catalog.GetString ("Show _Date"), ShowDate ? "gtk-apply" : "gtk-remove", (o, a) => { ShowDate = !ShowDate; QueueRedraw (); === modified file 'StandardPlugins/GMail/src/GMailAtom.cs' --- StandardPlugins/GMail/src/GMailAtom.cs 2010-04-14 19:01:31 +0000 +++ StandardPlugins/GMail/src/GMailAtom.cs 2010-05-25 19:27:14 +0000 @@ -196,11 +196,14 @@ void CheckGMail () { - if (string.IsNullOrEmpty (GMailPreferences.User) || string.IsNullOrEmpty (GMailPreferences.Password)) { - OnGMailFailed (Catalog.GetString ("Username or Password not set")); + string password = GMailPreferences.Password; + if (string.IsNullOrEmpty (GMailPreferences.User) || string.IsNullOrEmpty (password)) { + Gtk.Application.Invoke (delegate { + OnGMailFailed (Catalog.GetString ("Username or Password not set")); + }); return; } - + checkerThread = DockServices.System.RunOnThread (() => { try { Gtk.Application.Invoke (delegate { OnGMailChecking (); }); @@ -217,7 +220,7 @@ HttpWebRequest request = (HttpWebRequest) WebRequest.Create (url); request.Timeout = 60000; request.UserAgent = DockServices.System.UserAgent; - request.Credentials = new NetworkCredential (GMailPreferences.User, GMailPreferences.Password); + request.Credentials = new NetworkCredential (GMailPreferences.User, password); if (DockServices.System.UseProxy) request.Proxy = DockServices.System.Proxy; // FIXME remove when ServicePointManager.ServerCertificateValidationCallback implemented in mono @@ -278,6 +281,8 @@ messages = tmp; Gtk.Application.Invoke (delegate { OnGMailChecked (); }); + } catch (ThreadAbortException) { + // do nothing } catch (NullReferenceException) { Gtk.Application.Invoke (delegate { OnGMailFailed (Catalog.GetString ("Feed Error")); === modified file 'configure' --- configure 2010-04-14 19:01:31 +0000 +++ configure 2010-05-25 19:27:14 +0000 @@ -1,6 +1,6 @@ #! /bin/sh # Guess values for system-dependent variables and create Makefiles. -# Generated by GNU Autoconf 2.65 for docky 2.0.2. +# Generated by GNU Autoconf 2.65 for docky 2.0.3.1. # # # Copyright (C) 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, @@ -609,8 +609,8 @@ # Identity of this package. PACKAGE_NAME='docky' PACKAGE_TARNAME='docky' -PACKAGE_VERSION='2.0.2' -PACKAGE_STRING='docky 2.0.2' +PACKAGE_VERSION='2.0.3.1' +PACKAGE_STRING='docky 2.0.3.1' PACKAGE_BUGREPORT='' PACKAGE_URL='' @@ -1465,7 +1465,7 @@ # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF -\`configure' configures docky 2.0.2 to adapt to many kinds of systems. +\`configure' configures docky 2.0.3.1 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... @@ -1531,7 +1531,7 @@ if test -n "$ac_init_help"; then case $ac_init_help in - short | recursive ) echo "Configuration of docky 2.0.2:";; + short | recursive ) echo "Configuration of docky 2.0.3.1:";; esac cat <<\_ACEOF @@ -1714,7 +1714,7 @@ test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF -docky configure 2.0.2 +docky configure 2.0.3.1 generated by GNU Autoconf 2.65 Copyright (C) 2009 Free Software Foundation, Inc. @@ -2079,7 +2079,7 @@ This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. -It was created by docky $as_me 2.0.2, which was +It was created by docky $as_me 2.0.3.1, which was generated by GNU Autoconf 2.65. Invocation command line was $ $0 $@ @@ -2887,7 +2887,7 @@ # Define the identity of the package. PACKAGE='docky' - VERSION='2.0.2' + VERSION='2.0.3.1' cat >>confdefs.h <<_ACEOF @@ -9856,7 +9856,7 @@ # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" -This file was extended by docky $as_me 2.0.2, which was +This file was extended by docky $as_me 2.0.3.1, which was generated by GNU Autoconf 2.65. Invocation command line was CONFIG_FILES = $CONFIG_FILES @@ -9913,7 +9913,7 @@ cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ -docky config.status 2.0.2 +docky config.status 2.0.3.1 configured by $0, generated by GNU Autoconf 2.65, with options \\"\$ac_cs_config\\" === modified file 'configure.ac' --- configure.ac 2010-04-14 19:01:31 +0000 +++ configure.ac 2010-05-25 19:27:14 +0000 @@ -1,7 +1,7 @@ dnl Process this file with autoconf to produce a configure script. AC_PREREQ([2.54]) -AC_INIT([docky], [2.0.2]) +AC_INIT([docky], [2.0.3.1]) AM_INIT_AUTOMAKE([foreign tar-pax]) AC_CONFIG_MACRO_DIR([m4]) === modified file 'debian/changelog' --- debian/changelog 2010-04-14 19:01:31 +0000 +++ debian/changelog 2010-05-25 19:44:27 +0000 @@ -1,3 +1,37 @@ +docky (2.0.3.1-0ubuntu1) lucid-proposed; urgency=low + + * New upstream release 2.0.3.1 "You should have heard from us by now", + changes include: + + fix gnome-keyring related crash in Lucid caused by GMail docklet + (LP: #555562) + + catch exception for read-failure of cxoffice launcher (LP: #573294) + + check if authentication is used before using network proxy + + make sure to update screen regions when showing menus + + make transparent themed docks still glow in configuration mode + (LP: #572416) + + Memory Leaks + - some unlinked handlers and pixbufs (DockItemMenu, WindowDockItem, ...) + - proper disposal of tile-widgets in preferences dialog + - properly using DesktopAppInfo for launching application + + GMail: fix exception when reloading (LP: #573991) + + CLOCK: popup menu must always show icons (LP: #574003) + + helpers crash when dbus isn't available (LP: #540688) + * debian/rules: Don't byte compile python helpers as this causes them to + appear in the prefs window twice (and the compiled ones don't work) + * debian/control: Add dep on librsvg2-common to fix installability when this + isn't otherwise available. + * debian/patches/mail_label_crash: Add patch cherrypicked from upstream to + fix a crash bug when deleting mail labels. (LP: #576596) + * debian/patches/window_grouping_reliability: Add patch cherrypicked from + upstream to improve the window grouping reliability. Previously some + applications, particularly OOo, would show two icons when the windows + should have been grouped into one. (LP: #486887) + * debian/control: Add python dep to docky manually. When we stopped byte + compiling the helpers, this dependency wasn't removed, but we do still + need to have a python interpreter around to use them. + + -- Iain Lane Tue, 04 May 2010 16:15:39 +0100 + docky (2.0.2-1) unstable; urgency=low [ Stefan Ebner ] === modified file 'debian/control' --- debian/control 2010-04-14 19:01:31 +0000 +++ debian/control 2010-05-25 19:58:25 +0000 @@ -1,7 +1,8 @@ Source: docky Section: x11 Priority: optional -Maintainer: Debian CLI Applications Team +Maintainer: Ubuntu Developers +XSBC-Original-Maintainer: Debian CLI Applications Team Uploaders: Christopher James Halse Rogers Build-Depends: debhelper (>= 7.0.50~), autotools-dev, @@ -36,7 +37,8 @@ Depends: ${shlibs:Depends}, ${misc:Depends}, ${cli:Depends}, - ${python:Depends}, + python, + librsvg2-common, python-docky Description: Elegant, powerful, clean dock A full fledged dock application that makes opening common applications and === modified file 'debian/rules' --- debian/rules 2010-04-14 19:01:31 +0000 +++ debian/rules 2010-05-25 20:00:11 +0000 @@ -6,7 +6,8 @@ include /usr/share/cli-common/cli.make override_dh_pysupport: - dh_pysupport usr/share/docky/helpers +# Don't byte compile helpers — causes broken ones to also show up in prefs + dh_pysupport -X /usr/share/docky/helpers/ override_dh_auto_configure: dh_auto_configure -- MCS=/usr/bin/mono-csc @@ -23,4 +24,4 @@ dh_makeclilibs -X usr/lib/docky/* %: - dh $@ + dh $@ === modified file 'po/ast.po' === modified file 'po/bg.po' === modified file 'po/bn.po' === modified file 'po/ca.po' === modified file 'po/de.po' === modified file 'po/en_GB.po' === modified file 'po/es.po' === modified file 'po/eu.po' === modified file 'po/fi.po' === modified file 'po/fr.po' === modified file 'po/gl.po' === modified file 'po/he.po' === modified file 'po/hi.po' === modified file 'po/hr.po' === modified file 'po/hu.po' === modified file 'po/id.po' === modified file 'po/is.po' === modified file 'po/it.po' === modified file 'po/ja.po' === modified file 'po/ko.po' === modified file 'po/pl.po' === modified file 'po/pt_BR.po' === modified file 'po/ro.po' === modified file 'po/ru.po' === modified file 'po/sv.po' === modified file 'po/tr.po' === modified file 'po/uk.po' === modified file 'po/zh_CN.po' === modified file 'scripts/docky/docky.py' --- scripts/docky/docky.py 2010-04-14 19:01:31 +0000 +++ scripts/docky/docky.py 2010-05-25 19:27:14 +0000 @@ -39,11 +39,15 @@ self.bus = dbus.SessionBus() self.id_map = {} - obj = self.bus.get_object(dockybus, self.path) - self.iface = dbus.Interface(obj, itemiface) - - self.bus.add_signal_receiver(self.menu_pressed_signal, "MenuItemActivated", itemiface, dockybus, self.path) - self.bus.add_signal_receiver(self.item_confirmation_needed, "ItemConfirmationNeeded", itemiface, dockybus, self.path) + try: + obj = self.bus.get_object(dockybus, self.path) + self.iface = dbus.Interface(obj, itemiface) + + self.bus.add_signal_receiver(self.menu_pressed_signal, "MenuItemActivated", itemiface, dockybus, self.path) + self.bus.add_signal_receiver(self.item_confirmation_needed, "ItemConfirmationNeeded", itemiface, dockybus, self.path) + except dbus.DBusException, e: + print "DockyItem(): %s" % e + sys.exit(0) def menu_pressed_signal(self, menu_id): if self.id_map.has_key(menu_id): @@ -76,23 +80,23 @@ try: obj = self.bus.get_object(dockybus, dockypath) self._iface = dbus.Interface(obj, dockyiface) + + paths = self._iface.DockItemPaths() + + self.bus.add_signal_receiver(self.item_added, "ItemAdded", dockyiface, dockybus, dockypath) + self.bus.add_signal_receiver(self.item_removed, "ItemRemoved", dockyiface, dockybus, dockypath) + self.bus.add_signal_receiver(self.shut_down, "ShuttingDown", dockyiface, dockybus, dockypath) + + for pathtoitem in paths: + obj = self.bus.get_object(dockybus, pathtoitem) + item = dbus.Interface(obj, itemiface) + self.item_path_found(pathtoitem, item) + + self.bus.add_signal_receiver(self.name_owner_changed_cb, dbus_interface='org.freedesktop.DBus', signal_name='NameOwnerChanged') except dbus.DBusException, e: print "DockySink(): %s" % e sys.exit(0) - paths = self._iface.DockItemPaths() - - self.bus.add_signal_receiver(self.item_added, "ItemAdded", dockyiface, dockybus, dockypath) - self.bus.add_signal_receiver(self.item_removed, "ItemRemoved", dockyiface, dockybus, dockypath) - self.bus.add_signal_receiver(self.shut_down, "ShuttingDown", dockyiface, dockybus, dockypath) - - for pathtoitem in paths: - obj = self.bus.get_object(dockybus, pathtoitem) - item = dbus.Interface(obj, itemiface) - self.item_path_found(pathtoitem, item) - - self.bus.add_signal_receiver(self.name_owner_changed_cb, dbus_interface='org.freedesktop.DBus', signal_name='NameOwnerChanged') - def name_owner_changed_cb(self, name, old_owner, new_owner): if name == dockybus and not new_owner: print "DockyDBus %s is gone, quitting now..." % name === modified file 'scripts/docky/docky.py.in' --- scripts/docky/docky.py.in 2010-02-17 15:10:07 +0000 +++ scripts/docky/docky.py.in 2010-05-25 19:27:14 +0000 @@ -39,11 +39,15 @@ self.bus = dbus.SessionBus() self.id_map = {} - obj = self.bus.get_object(dockybus, self.path) - self.iface = dbus.Interface(obj, itemiface) - - self.bus.add_signal_receiver(self.menu_pressed_signal, "MenuItemActivated", itemiface, dockybus, self.path) - self.bus.add_signal_receiver(self.item_confirmation_needed, "ItemConfirmationNeeded", itemiface, dockybus, self.path) + try: + obj = self.bus.get_object(dockybus, self.path) + self.iface = dbus.Interface(obj, itemiface) + + self.bus.add_signal_receiver(self.menu_pressed_signal, "MenuItemActivated", itemiface, dockybus, self.path) + self.bus.add_signal_receiver(self.item_confirmation_needed, "ItemConfirmationNeeded", itemiface, dockybus, self.path) + except dbus.DBusException, e: + print "DockyItem(): %s" % e + sys.exit(0) def menu_pressed_signal(self, menu_id): if self.id_map.has_key(menu_id): @@ -76,23 +80,23 @@ try: obj = self.bus.get_object(dockybus, dockypath) self._iface = dbus.Interface(obj, dockyiface) + + paths = self._iface.DockItemPaths() + + self.bus.add_signal_receiver(self.item_added, "ItemAdded", dockyiface, dockybus, dockypath) + self.bus.add_signal_receiver(self.item_removed, "ItemRemoved", dockyiface, dockybus, dockypath) + self.bus.add_signal_receiver(self.shut_down, "ShuttingDown", dockyiface, dockybus, dockypath) + + for pathtoitem in paths: + obj = self.bus.get_object(dockybus, pathtoitem) + item = dbus.Interface(obj, itemiface) + self.item_path_found(pathtoitem, item) + + self.bus.add_signal_receiver(self.name_owner_changed_cb, dbus_interface='org.freedesktop.DBus', signal_name='NameOwnerChanged') except dbus.DBusException, e: print "DockySink(): %s" % e sys.exit(0) - paths = self._iface.DockItemPaths() - - self.bus.add_signal_receiver(self.item_added, "ItemAdded", dockyiface, dockybus, dockypath) - self.bus.add_signal_receiver(self.item_removed, "ItemRemoved", dockyiface, dockybus, dockypath) - self.bus.add_signal_receiver(self.shut_down, "ShuttingDown", dockyiface, dockybus, dockypath) - - for pathtoitem in paths: - obj = self.bus.get_object(dockybus, pathtoitem) - item = dbus.Interface(obj, itemiface) - self.item_path_found(pathtoitem, item) - - self.bus.add_signal_receiver(self.name_owner_changed_cb, dbus_interface='org.freedesktop.DBus', signal_name='NameOwnerChanged') - def name_owner_changed_cb(self, name, old_owner, new_owner): if name == dockybus and not new_owner: print "DockyDBus %s is gone, quitting now..." % name