Reduce the number of times the Gnome applet wakes up, especially when
it's doing absolutely nothing and is hidden. Initial patch by
Chris Aillon.
* gnome/applet/applet-dbus.c
- (nma_dbus_filter): when NM isn't around, or when it goes away,
kill the redraw timeout. When NM starts up, start the redraw
timeout. Also, if we get kicked off the bus for some reason,
start the reconnection timeout if one's not already running.
- (nma_dbus_init): better handling of error conditions, don't leak
a half-initialized dbus connection
- (nma_dbus_connection_watcher): consolidate places we reinitialize
the applet's data, just call nm_dbus_init_helper()
- (nma_start_dbus_connection_watch): new function, starts a periodic
timeout that calls nma_dbus_connection_watcher()
- (nma_dbus_init_helper): if we get a successful connection, kill the
reconnection timeout, and don't start the reconnection timeout
unconditionally anymore
* gnome/applet/applet-dbus.h
- Expose nma_start_dbus_connection_watch()
* gnome/applet/applet.c
- (nma_update_state): no longer static, called from applet-dbus.c for
immediate UI updates on certain events
- (nma_set_running): new function; take over setting applet->running,
when not running (ie, NM is not active), don't activate the redraw
timeout because we're not showing the applet anyway. When we are
running (ie, NM is active), and only when we're running, start the
redraw timeout.
- (nma_destroy): kill the redraw timeout by setting 'not running', and
kill any reconnection timeout
- (nma_get_instance): move one-off dbus initialization code here since
nm_dbus_init_helper() gets called more than once, possibly by the
reconnection timeout function too. And, when we start up, if we
can't get a connection to the bus, start the reconnection timeout.
But don't start the redraw timeout yet, only do that when we get
NM's state and find out if it's running or not.
* gnome/applet/applet.h
- Add the reconnection GSource ID
- Add prototypes for nma_set_running() and the no-longer-static
nma_update_state()
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2084 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/dhcp-manager/nm-dhcp-manager.c
- (get_ip4_string, get_ip4_uint32s): have the caller pass
the dbus connection and the device object path rather than
constructing it inside both functions. Saves a bit of memory
and clarifies a failure path.
- (nm_dhcp_manager_get_ip4_config): grab the dbus connection
and allocate device path here rather than each of the two
functions above.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2065 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/NetworkManager.c
- (nm_name_owner_changed_handler): handle NMI coming and going,
this somehow droppout in the refactor
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2064 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* Huge DBus refactor:
- Create a "DBus Manager" object which manages the connection and
sends signals on NameOwnerChanged and connection/disconnection events,
handles reconnection to the bus if NM gets kicked off, and abstracts
signal handling
- Remove DBusConnection members from places where they are no
longer needed due to the refactor, like the dbus-connection
property of the named manager, and from NMData
- Reformats a bunch of the code to gnome style
(8-space tabs, braces on same line as statement, 80-col width).
Consider it open season to reformat any bits to gnome style.
style that aren't already.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2061 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* src/vpn-manager/nm-vpn-manager.c
- (nm_vpn_manager_load_services): split and clean up
for readability and correctness. Restrict VPN service
files to ending in ".name", as was meant from the
beginning (but not coded in). Better error reporting.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2044 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
NetworkManager DBUS dict based VPN interface. (This allows the MTU
of a VPN connection to be passed back to NetworkManager)
- Currently disabled by default, need to add --enable-nm-vpn-dbus-dict
to configure.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2032 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
* test/Makefile.am
test/libnm-util/Makefile.am
test/nm-supplicant-test.c
- Add test program emulating the way NM drives wpa_supplicant
to help debug supplicant issues
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@2022 4912f4e0-d625-0410-9fb7-b9a5a253dbdc