NetworkManager r3546 - in trunk: . system-settings/src



Author: dcbw
Date: Tue Apr  8 18:55:52 2008
New Revision: 3546
URL: http://svn.gnome.org/viewvc/NetworkManager?rev=3546&view=rev

Log:
2008-04-08  Dan Williams  <dcbw redhat com>

	* system-settings/src/main.c
		- (load_stuff, device_added_cb, device_removed_cb): device added/removed
			callbacks take a device type too



Modified:
   trunk/ChangeLog
   trunk/system-settings/src/main.c

Modified: trunk/system-settings/src/main.c
==============================================================================
--- trunk/system-settings/src/main.c	(original)
+++ trunk/system-settings/src/main.c	Tue Apr  8 18:55:52 2008
@@ -70,7 +70,7 @@
 static void dbus_cleanup (Application *app);
 static gboolean start_dbus_service (Application *app);
 static void destroy_cb (DBusGProxy *proxy, gpointer user_data);
-static void device_added_cb (DBusGProxy *proxy, const char *udi, gpointer user_data);
+static void device_added_cb (DBusGProxy *proxy, const char *udi, NMDeviceType devtype, gpointer user_data);
 
 
 static GQuark
@@ -302,7 +302,7 @@
 	/* Grab wired devices to make default DHCP connections for them if needed */
 	devs = nm_system_config_hal_manager_get_devices_of_type (app->hal_mgr, DEVICE_TYPE_802_3_ETHERNET);
 	for (iter = devs; iter; iter = g_slist_next (iter))
-		device_added_cb (NULL, (const char *) iter->data, app);
+		device_added_cb (NULL, (const char *) iter->data, DEVICE_TYPE_802_3_ETHERNET, app);
 
 	if (!start_dbus_service (app)) {
 		g_main_loop_quit (app->loop);
@@ -491,12 +491,12 @@
 }
 
 static void
-device_added_cb (DBusGProxy *proxy, const char *udi, gpointer user_data)
+device_added_cb (DBusGProxy *proxy, const char *udi, NMDeviceType devtype, gpointer user_data)
 {
 	Application *app = (Application *) user_data;
 	WiredDeviceInfo *info;
 
-	if (nm_system_config_hal_manager_get_type_for_udi (app->hal_mgr, udi) != DEVICE_TYPE_802_3_ETHERNET)
+	if (devtype != DEVICE_TYPE_802_3_ETHERNET)
 		return;
 
 	/* Wait for a plugin to figure out if the device should be managed or not */
@@ -508,7 +508,7 @@
 }
 
 static void
-device_removed_cb (DBusGProxy *proxy, const char *udi, gpointer user_data)
+device_removed_cb (DBusGProxy *proxy, const char *udi, NMDeviceType devtype, gpointer user_data)
 {
 	Application *app = (Application *) user_data;
 	WiredDeviceInfo *info;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]