~ubuntu-branches/ubuntu/oneiric/docky/oneiric

« back to all changes in this revision

Viewing changes to StandardPlugins/NetworkManager/src/ConnectionManager.cs

  • Committer: Bazaar Package Importer
  • Author(s): Rico Tzschichholz
  • Date: 2010-07-01 21:21:50 UTC
  • mfrom: (1.1.5 upstream)
  • Revision ID: james.westby@ubuntu.com-20100701212150-1dqehqxey8rrvtlo
Tags: 2.0.5-1
* New upstream release 2.0.5 "Be proud of your dock",
  changes include:
  + remove --debug flag from launcher for lower memory usage
  + update the about dialog credits to list documenters and make translation 
    tab easier to read
  + change url in about dialog to the launchpad project page
  + Window-Matching
    - fix for applications commandline
    - properly match qt creator (LP: #594814)
    - prefer local over global launchers (LP: #588073) (LP: #592841)
    - match prefix for gksudo (LP: #516433)
    - fix nautilus items showing active indicator when desktop 
      is focused (LP: #487113)
    - fix matching wine apps that use a prefixed launcher (LP: #596092)
  + Memory Leaks
    - dispose of calendar painter when the clock item is disposed
    - fix leak in AutoHideManager
    - several fixes using Cairo.Context.Target and Pango.Layout
    - fix leak in PagingPainters
    - fix leak in recursive file-deletion
    - fix leaking SeparatorItems, WnckDockItems
    - fix leaks with FileEmblems
    - fix Pixbuf related leaks
    - fix some leaks regarding FileMonitors
    - fix leaks regarding Tiles and AbtractTileObjects
    - fix leaking Glib.FileAdapter caused by unreferenced Action in 
      FileDockItem
  + Handle invalid desktopfile entry and UriFormatException in 
    FileApplicationProvider (LP: #595921)
  + fix potential crash for invalid HelperMetadata
  + handle drops correctly
  + fix handling of Helpers in HelperService
  + make the sliders in preferences behave better
  + fix drawing of rotated items
  + fix HoveredItem click-position
  + avoids fatal errors on console when loading embedded icons when no 
    height or width is specified and when dock items have a null Icon
  + fix icon theme change not refreshing the dock icons (LP: #590205)
  + fix SVG rendering bug
  + fix iconsize temporarily getting large when adding to full dock 
    (LP: #579576)
  + fix the 'crash in PinToDock' (LP: #588073)
  + make 3d background height more consistent and a tad larger (LP: #503038)
  + fix dragging multiple files to a folder on the dock, which caused 
    a crash and data corruption (LP: #579049)
  + don't request animations if urgent state is removed from a window and 
    fix glow location (LP: #596422)
  + fix window previews being offset (LP: #495065)
  + fix broken zoom after shrinking icon size (LP: #598924)
  + fix problem with hovers still visible when painters show
  + fix displaying default icon in place of missing file emblem (LP: #534651)
  + fix crash when gconf key for menus_have_icons is not set (LP: #573751)
  + make sure painters fit on screen (LP: #589978)
  + fix icon minimize animations not working immediately for some newly 
    opened windows
  + don't dispose our static DockyItem
  + fix CurrentDesktopOnly not working when dragging a window across desktops
    (LP: #600290)
  + GMail: 
    - fix thread-guards and remove deprecated code
    - fix problem with feeds that don't have an author entry (LP: #595530)
  + NPR: fix bug where removing your last NPR station unloaded the docklet
    and fix station icon
  + NetworkManager: fix crash caused when NM goes away
    and fix icons and add another fallback icon (LP: #588581)
  + Mounter:
    - fixed some leaks
    - only remove mounted items if they were successfully unmounted 
      (LP: #597637)
    - fix duplicate icons showing in mounter (LP: #525306)
  + Weather: fix feels like temp showing incorrect for metric (LP: #597670)
  + RecentDocuments: 
    - fixed some leaks
    - fix sensitivity of recent docs clear menu item - even if docky shows 
      the list as empty does not mean it cant be cleared
* debian/patches/01_use_cli_for_wrapper.patch:
  + patch wrapper script to meet the Debian CLI Policy
* debian/control:
  + Bump Standards version to 3.9.0 (no changes needed)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
//  
2
2
//  Copyright (C) 2009 Chris Szikszoy
 
3
//  Copyright (C) 2010 Robert Dyer
3
4
// 
4
5
//  This program is free software: you can redistribute it and/or modify
5
6
//  it under the terms of the GNU General Public License as published by
22
23
using NDesk.DBus;
23
24
using org.freedesktop.DBus;
24
25
 
 
26
using Docky.Services;
 
27
 
25
28
namespace NetworkManagerDocklet
26
29
{
27
30
        public class ConnectionManager
71
74
                {
72
75
                        lock (SystemConnections) {
73
76
                                SystemConnections.Clear ();
74
 
                                foreach (string con in SystemConnectionManager.BusObject.ListConnections ())
75
 
                                {
76
 
                                        NetworkConnection connection = new NetworkConnection (SystemBus, con, ConnectionOwner.System);
77
 
                                        if (connection.Settings.ContainsKey ("802-11-wireless"))
78
 
                                                connection = new WirelessConnection (SystemBus, con, ConnectionOwner.System);
79
 
                                        else if (connection.Settings.ContainsKey ("802-3-ethernet"))
80
 
                                                connection = new WiredConnection (SystemBus, con, ConnectionOwner.System);
81
 
                                        else 
82
 
                                                continue;
83
 
                                        //connection.ConnectionRemoved += OnNetworkConnectionRemoved;
84
 
                                        SystemConnections.Add (connection);
 
77
                                try {
 
78
                                        foreach (string con in SystemConnectionManager.BusObject.ListConnections ())
 
79
                                        {
 
80
                                                NetworkConnection connection = new NetworkConnection (SystemBus, con, ConnectionOwner.System);
 
81
                                                if (connection.Settings.ContainsKey ("802-11-wireless"))
 
82
                                                        connection = new WirelessConnection (SystemBus, con, ConnectionOwner.System);
 
83
                                                else if (connection.Settings.ContainsKey ("802-3-ethernet"))
 
84
                                                        connection = new WiredConnection (SystemBus, con, ConnectionOwner.System);
 
85
                                                else 
 
86
                                                        continue;
 
87
                                                //connection.ConnectionRemoved += OnNetworkConnectionRemoved;
 
88
                                                SystemConnections.Add (connection);
 
89
                                        }
 
90
                                } catch (Exception e) {
 
91
                                        Log<ConnectionManager>.Error (e.Message);
 
92
                                        Log<ConnectionManager>.Debug (e.StackTrace);
85
93
                                }
86
94
                        }
87
95
                        
88
96
                        lock (UserConnections) {
89
97
                                UserConnections.Clear ();
90
 
                                foreach (string con in UserConnectionManager.BusObject.ListConnections ())
91
 
                                {
92
 
                                        NetworkConnection connection = new NetworkConnection (UserBus, con, ConnectionOwner.User);
93
 
                                        if (connection.Settings.ContainsKey ("802-11-wireless"))
94
 
                                                connection = new WirelessConnection (UserBus, con, ConnectionOwner.User);
95
 
                                        else if (connection.Settings.ContainsKey ("802-3-ethernet"))
96
 
                                                connection = new WiredConnection (UserBus, con, ConnectionOwner.User);
97
 
                                        else 
98
 
                                                continue;
99
 
                                        
100
 
                                        //connection.ConnectionRemoved += OnNetworkConnectionRemoved;
101
 
                                        UserConnections.Add (connection);
 
98
                                try {
 
99
                                        foreach (string con in UserConnectionManager.BusObject.ListConnections ())
 
100
                                        {
 
101
                                                NetworkConnection connection = new NetworkConnection (UserBus, con, ConnectionOwner.User);
 
102
                                                if (connection.Settings.ContainsKey ("802-11-wireless"))
 
103
                                                        connection = new WirelessConnection (UserBus, con, ConnectionOwner.User);
 
104
                                                else if (connection.Settings.ContainsKey ("802-3-ethernet"))
 
105
                                                        connection = new WiredConnection (UserBus, con, ConnectionOwner.User);
 
106
                                                else 
 
107
                                                        continue;
 
108
                                                
 
109
                                                //connection.ConnectionRemoved += OnNetworkConnectionRemoved;
 
110
                                                UserConnections.Add (connection);
 
111
                                        }
 
112
                                } catch (Exception e) {
 
113
                                        Log<ConnectionManager>.Error (e.Message);
 
114
                                        Log<ConnectionManager>.Debug (e.StackTrace);
102
115
                                }
103
116
                        }
104
117
                }