2005-05-05 Dan Williams <dcbw@redhat.com>
* Expose activation stages to NetworkManager clients, like the applet * Add Diana's progress icons to the applet, cued off NM activation stage * Use more descriptive tooltips, cued off NM activation stage git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@611 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
@@ -1,3 +1,9 @@
|
||||
2005-05-05 Dan Williams <dcbw@redhat.com>
|
||||
|
||||
* Expose activation stages to NetworkManager clients, like the applet
|
||||
* Add Diana's progress icons to the applet, cued off NM activation stage
|
||||
* Use more descriptive tooltips, cued off NM activation stage
|
||||
|
||||
2005-05-05 Ray Strode <rstrode@redhat.com>
|
||||
|
||||
* src/nm-netlink-monitor.c:
|
||||
|
@@ -186,4 +186,23 @@ typedef enum NMVPNState
|
||||
NM_VPN_STATE_STOPPED
|
||||
} NMVPNState;
|
||||
|
||||
|
||||
/*
|
||||
* Device activation stages
|
||||
*/
|
||||
typedef enum NMActStage
|
||||
{
|
||||
NM_ACT_STAGE_UNKNOWN = 0,
|
||||
NM_ACT_STAGE_DEVICE_PREPARE,
|
||||
NM_ACT_STAGE_DEVICE_CONFIG,
|
||||
NM_ACT_STAGE_NEED_USER_KEY,
|
||||
NM_ACT_STAGE_IP_CONFIG_START,
|
||||
NM_ACT_STAGE_IP_CONFIG_GET,
|
||||
NM_ACT_STAGE_IP_CONFIG_COMMIT,
|
||||
NM_ACT_STAGE_ACTIVATED,
|
||||
NM_ACT_STAGE_FAILED,
|
||||
NM_ACT_STAGE_CANCELLED
|
||||
} NMActStage;
|
||||
|
||||
|
||||
#endif
|
||||
|
@@ -835,6 +835,7 @@ void nmwa_dbus_device_properties_cb (DBusPendingCall *pcall, void *user_data)
|
||||
dbus_uint32_t driver_support_level = 0;
|
||||
char ** networks = NULL;
|
||||
int num_networks = 0;
|
||||
NMActStage act_stage = NM_ACT_STAGE_UNKNOWN;
|
||||
|
||||
g_return_if_fail (pcall != NULL);
|
||||
g_return_if_fail (applet != NULL);
|
||||
@@ -858,6 +859,7 @@ void nmwa_dbus_device_properties_cb (DBusPendingCall *pcall, void *user_data)
|
||||
DBUS_TYPE_UINT32, &type,
|
||||
DBUS_TYPE_STRING, &udi,
|
||||
DBUS_TYPE_BOOLEAN,&active,
|
||||
DBUS_TYPE_UINT32, &act_stage,
|
||||
DBUS_TYPE_UINT32, &ip4_address,
|
||||
DBUS_TYPE_STRING, &hw_addr,
|
||||
DBUS_TYPE_UINT32, &mode,
|
||||
@@ -876,6 +878,7 @@ void nmwa_dbus_device_properties_cb (DBusPendingCall *pcall, void *user_data)
|
||||
network_device_set_active (dev, active);
|
||||
network_device_set_link (dev, link_active);
|
||||
network_device_set_driver_support_level (dev, driver_support_level);
|
||||
network_device_set_act_stage (dev, act_stage);
|
||||
|
||||
/* If the device already exists in our list for some reason, remove it so we
|
||||
* can add the new one with updated data.
|
||||
@@ -1054,14 +1057,14 @@ void nmwa_dbus_set_device (DBusConnection *connection, NetworkDevice *dev, const
|
||||
g_return_if_fail (connection != NULL);
|
||||
g_return_if_fail (dev != NULL);
|
||||
|
||||
if ((network_device_get_type (dev) == DEVICE_TYPE_WIRED_ETHERNET) && !passphrase && (key_type != -1))
|
||||
if (network_device_is_wired (dev) && !passphrase && (key_type != -1))
|
||||
return;
|
||||
|
||||
if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "setActiveDevice")))
|
||||
{
|
||||
const char *dev_path = network_device_get_nm_path (dev);
|
||||
|
||||
if ((network_device_get_type (dev) == DEVICE_TYPE_WIRELESS_ETHERNET) && essid)
|
||||
if (network_device_is_wireless (dev) && essid)
|
||||
{
|
||||
nm_info ("Forcing device '%s' and network '%s' %s passphrase\n", dev_path, essid, passphrase ? "with" : "without");
|
||||
|
||||
@@ -1100,7 +1103,7 @@ void nmwa_dbus_create_network (DBusConnection *connection, NetworkDevice *dev, c
|
||||
g_return_if_fail (connection != NULL);
|
||||
g_return_if_fail (dev != NULL);
|
||||
g_return_if_fail (essid != NULL);
|
||||
g_return_if_fail (network_device_get_type (dev) == DEVICE_TYPE_WIRELESS_ETHERNET);
|
||||
g_return_if_fail (network_device_is_wireless (dev));
|
||||
|
||||
if ((message = dbus_message_new_method_call (NM_DBUS_SERVICE, NM_DBUS_PATH, NM_DBUS_INTERFACE, "createWirelessNetwork")))
|
||||
{
|
||||
@@ -1312,13 +1315,13 @@ sort_devices_function (gconstpointer a, gconstpointer b)
|
||||
{
|
||||
return strcmp (name_a, name_b);
|
||||
}
|
||||
if (network_device_get_type (dev_a) == DEVICE_TYPE_WIRED_ETHERNET)
|
||||
if (network_device_is_wired (dev_a))
|
||||
return -1;
|
||||
if (network_device_get_type (dev_b) == DEVICE_TYPE_WIRED_ETHERNET)
|
||||
if (network_device_is_wired (dev_b))
|
||||
return 1;
|
||||
if (network_device_get_type (dev_a) == DEVICE_TYPE_WIRELESS_ETHERNET)
|
||||
if (network_device_is_wireless (dev_a))
|
||||
return -1;
|
||||
if (network_device_get_type (dev_b) == DEVICE_TYPE_WIRELESS_ETHERNET)
|
||||
if (network_device_is_wireless (dev_b))
|
||||
return 1;
|
||||
|
||||
/* Unknown device types. Sort by name only at this point. */
|
||||
|
@@ -404,13 +404,23 @@ static DBusHandlerResult nmwa_dbus_filter (DBusConnection *connection, DBusMessa
|
||||
{
|
||||
NMWirelessApplet *applet = (NMWirelessApplet *)user_data;
|
||||
gboolean handled = TRUE;
|
||||
DBusError error;
|
||||
|
||||
const char * object_path;
|
||||
const char * member;
|
||||
const char * interface;
|
||||
|
||||
g_return_val_if_fail (applet != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
|
||||
g_return_val_if_fail (connection != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
|
||||
g_return_val_if_fail (message != NULL, DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
|
||||
|
||||
dbus_error_init (&error);
|
||||
if (!(object_path = dbus_message_get_path (message)))
|
||||
return FALSE;
|
||||
if (!(member = dbus_message_get_member (message)))
|
||||
return FALSE;
|
||||
if (!(interface = dbus_message_get_interface (message)))
|
||||
return FALSE;
|
||||
|
||||
/* nm_info ("signal(): got signal op='%s' member='%s' interface='%s'", object_path, member, interface); */
|
||||
|
||||
if (dbus_message_is_signal (message, DBUS_INTERFACE_DBUS, "NameOwnerChanged"))
|
||||
{
|
||||
@@ -418,7 +428,7 @@ static DBusHandlerResult nmwa_dbus_filter (DBusConnection *connection, DBusMessa
|
||||
char *old_owner;
|
||||
char *new_owner;
|
||||
|
||||
if (dbus_message_get_args (message, &error,
|
||||
if (dbus_message_get_args (message, NULL,
|
||||
DBUS_TYPE_STRING, &service,
|
||||
DBUS_TYPE_STRING, &old_owner,
|
||||
DBUS_TYPE_STRING, &new_owner,
|
||||
@@ -460,7 +470,7 @@ static DBusHandlerResult nmwa_dbus_filter (DBusConnection *connection, DBusMessa
|
||||
*/
|
||||
if ( (state == NM_STATE_CONNECTING)
|
||||
&& act_dev
|
||||
&& (network_device_get_type (act_dev) == DEVICE_TYPE_WIRELESS_ETHERNET))
|
||||
&& network_device_is_wireless (act_dev))
|
||||
{
|
||||
nmwa_dbus_device_update_one_device (applet, network_device_get_nm_path (act_dev));
|
||||
}
|
||||
@@ -552,18 +562,10 @@ static DBusHandlerResult nmwa_dbus_filter (DBusConnection *connection, DBusMessa
|
||||
{
|
||||
char *dev = NULL;
|
||||
char *net = NULL;
|
||||
DBusError error;
|
||||
|
||||
dbus_error_init (&error);
|
||||
if (!dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &dev, DBUS_TYPE_STRING, &net, DBUS_TYPE_INVALID))
|
||||
{
|
||||
if (dbus_error_is_set (&error))
|
||||
dbus_error_free (&error);
|
||||
dbus_error_init (&error);
|
||||
dbus_message_get_args (message, &error, DBUS_TYPE_STRING, &dev, DBUS_TYPE_INVALID);
|
||||
}
|
||||
if (dbus_error_is_set (&error))
|
||||
dbus_error_free (&error);
|
||||
if (!dbus_message_get_args (message, NULL, DBUS_TYPE_STRING, &dev, DBUS_TYPE_STRING, &net, DBUS_TYPE_INVALID))
|
||||
dbus_message_get_args (message, NULL, DBUS_TYPE_STRING, &dev, DBUS_TYPE_INVALID);
|
||||
|
||||
if (dev && net)
|
||||
{
|
||||
char *string = g_strdup_printf (_("Connection to the wireless network '%s' failed.\n"), net);
|
||||
@@ -573,12 +575,25 @@ static DBusHandlerResult nmwa_dbus_filter (DBusConnection *connection, DBusMessa
|
||||
else if (dev)
|
||||
nmwa_schedule_warning_dialog (applet, _("Connection to the wired network failed.\n"));
|
||||
}
|
||||
else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceActivationStage"))
|
||||
{
|
||||
char * dev_path = NULL;
|
||||
NMActStage stage;
|
||||
|
||||
if (dbus_message_get_args (message, NULL, DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_UINT32, &stage, DBUS_TYPE_INVALID))
|
||||
{
|
||||
NetworkDevice *dev;
|
||||
|
||||
if ((dev = nmwa_get_device_for_nm_device (applet->dbus_device_list, dev_path)))
|
||||
network_device_set_act_stage (dev, stage);
|
||||
|
||||
if ((dev = nmwa_get_device_for_nm_device (applet->gui_device_list, dev_path)))
|
||||
network_device_set_act_stage (dev, stage);
|
||||
}
|
||||
}
|
||||
else
|
||||
handled = FALSE;
|
||||
|
||||
if (dbus_error_is_set (&error))
|
||||
dbus_error_free (&error);
|
||||
|
||||
return (handled ? DBUS_HANDLER_RESULT_HANDLED : DBUS_HANDLER_RESULT_NOT_YET_HANDLED);
|
||||
}
|
||||
|
||||
|
@@ -622,6 +622,17 @@ static void nmwa_set_icon (NMWirelessApplet *applet, GdkPixbuf *new_icon)
|
||||
}
|
||||
|
||||
|
||||
static void nmwa_set_progress (NMWirelessApplet *applet, GdkPixbuf *progress_icon)
|
||||
{
|
||||
g_return_if_fail (applet != NULL);
|
||||
|
||||
gtk_image_set_from_pixbuf (GTK_IMAGE (applet->progress_bar), progress_icon);
|
||||
if (!progress_icon)
|
||||
gtk_widget_hide (applet->progress_bar);
|
||||
else
|
||||
gtk_widget_show (applet->progress_bar);
|
||||
}
|
||||
|
||||
/*
|
||||
* animation_timeout
|
||||
*
|
||||
@@ -642,7 +653,7 @@ static gboolean animation_timeout (NMWirelessApplet *applet)
|
||||
switch (applet->gui_nm_state)
|
||||
{
|
||||
case NM_STATE_CONNECTING:
|
||||
if (act_dev && (network_device_get_type (act_dev) == DEVICE_TYPE_WIRELESS_ETHERNET))
|
||||
if (act_dev && network_device_is_wireless (act_dev))
|
||||
{
|
||||
if (applet->animation_step >= NUM_WIRELESS_CONNECTING_FRAMES)
|
||||
applet->animation_step = 0;
|
||||
@@ -665,6 +676,82 @@ static gboolean animation_timeout (NMWirelessApplet *applet)
|
||||
}
|
||||
|
||||
|
||||
static GdkPixbuf * nmwa_act_stage_to_pixbuf (NMWirelessApplet *applet, NetworkDevice *dev, WirelessNetwork *net, char **tip)
|
||||
{
|
||||
const char *essid;
|
||||
const char *iface;
|
||||
|
||||
g_return_val_if_fail (applet != NULL, NULL);
|
||||
g_return_val_if_fail (dev != NULL, NULL);
|
||||
g_return_val_if_fail (tip != NULL, NULL);
|
||||
|
||||
iface = network_device_get_iface (dev);
|
||||
essid = net ? wireless_network_get_essid (net) : NULL;
|
||||
switch (network_device_get_act_stage (dev))
|
||||
{
|
||||
case NM_ACT_STAGE_DEVICE_PREPARE:
|
||||
{
|
||||
if (network_device_is_wired (dev))
|
||||
*tip = g_strdup_printf (_("Preparing device %s for the wired network..."), iface);
|
||||
else if (network_device_is_wireless (dev))
|
||||
*tip = g_strdup_printf (_("Preparing device %s for the wireless network '%s'..."), iface, essid);
|
||||
return applet->progress_icons[1];
|
||||
}
|
||||
|
||||
case NM_ACT_STAGE_DEVICE_CONFIG:
|
||||
{
|
||||
if (network_device_is_wired (dev))
|
||||
*tip = g_strdup_printf (_("Configuring device %s for the wired network..."), iface);
|
||||
else if (network_device_is_wireless (dev))
|
||||
*tip = g_strdup_printf (_("Configuring device %s for the wireless network '%s'..."), iface, essid);
|
||||
return applet->progress_icons[3];
|
||||
}
|
||||
|
||||
case NM_ACT_STAGE_NEED_USER_KEY:
|
||||
{
|
||||
if (network_device_is_wireless (dev))
|
||||
*tip = g_strdup_printf (_("Waiting for Network Key for the wireless network '%s'..."), essid);
|
||||
return applet->progress_icons[4];
|
||||
}
|
||||
|
||||
case NM_ACT_STAGE_IP_CONFIG_START:
|
||||
{
|
||||
if (network_device_is_wired (dev))
|
||||
*tip = g_strdup_printf (_("Requesting a network address from the wired network..."));
|
||||
else if (network_device_is_wireless (dev))
|
||||
*tip = g_strdup_printf (_("Requesting a network address from the wireless network '%s'..."), essid);
|
||||
return applet->progress_icons[5];
|
||||
}
|
||||
|
||||
case NM_ACT_STAGE_IP_CONFIG_GET:
|
||||
{
|
||||
if (network_device_is_wired (dev))
|
||||
*tip = g_strdup_printf (_("Requesting a network address from the wired network..."));
|
||||
else if (network_device_is_wireless (dev))
|
||||
*tip = g_strdup_printf (_("Requesting a network address from the wireless network '%s'..."), essid);
|
||||
return applet->progress_icons[8];
|
||||
}
|
||||
|
||||
case NM_ACT_STAGE_IP_CONFIG_COMMIT:
|
||||
{
|
||||
if (network_device_is_wired (dev))
|
||||
*tip = g_strdup_printf (_("Finishing connection to the wired network..."));
|
||||
else if (network_device_is_wireless (dev))
|
||||
*tip = g_strdup_printf (_("Finishing connection to the wireless network '%s'..."), essid);
|
||||
return applet->progress_icons[10];
|
||||
}
|
||||
|
||||
default:
|
||||
case NM_ACT_STAGE_ACTIVATED:
|
||||
case NM_ACT_STAGE_FAILED:
|
||||
case NM_ACT_STAGE_CANCELLED:
|
||||
case NM_ACT_STAGE_UNKNOWN:
|
||||
break;
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* nmwa_update_state
|
||||
*
|
||||
@@ -678,6 +765,7 @@ static void nmwa_update_state (NMWirelessApplet *applet)
|
||||
gboolean need_animation = FALSE;
|
||||
gboolean active_vpn = FALSE;
|
||||
GdkPixbuf * pixbuf = NULL;
|
||||
GdkPixbuf * progress = NULL;
|
||||
gint strength = -1;
|
||||
char * tip = NULL;
|
||||
WirelessNetwork * active_network = NULL;
|
||||
@@ -686,7 +774,7 @@ static void nmwa_update_state (NMWirelessApplet *applet)
|
||||
g_mutex_lock (applet->data_mutex);
|
||||
|
||||
act_dev = nmwa_get_first_active_device (applet->gui_device_list);
|
||||
if (act_dev && (network_device_get_type (act_dev) == DEVICE_TYPE_WIRELESS_ETHERNET))
|
||||
if (act_dev && network_device_is_wireless (act_dev))
|
||||
{
|
||||
active_network = network_device_get_active_wireless_network (act_dev);
|
||||
strength = CLAMP ((int)network_device_get_strength (act_dev), 0, 100);
|
||||
@@ -710,12 +798,12 @@ static void nmwa_update_state (NMWirelessApplet *applet)
|
||||
break;
|
||||
|
||||
case NM_STATE_CONNECTED:
|
||||
if (network_device_get_type (act_dev) == DEVICE_TYPE_WIRED_ETHERNET)
|
||||
if (network_device_is_wired (act_dev))
|
||||
{
|
||||
pixbuf = applet->wired_icon;
|
||||
tip = g_strdup (_("Wired network connection"));
|
||||
}
|
||||
else if (network_device_get_type (act_dev) == DEVICE_TYPE_WIRELESS_ETHERNET)
|
||||
else if (network_device_is_wireless (act_dev))
|
||||
{
|
||||
if (applet->is_adhoc)
|
||||
{
|
||||
@@ -741,11 +829,7 @@ static void nmwa_update_state (NMWirelessApplet *applet)
|
||||
break;
|
||||
|
||||
case NM_STATE_CONNECTING:
|
||||
if (network_device_get_type (act_dev) == DEVICE_TYPE_WIRED_ETHERNET)
|
||||
tip = g_strdup (_("Connecting to a wired network..."));
|
||||
else if (network_device_get_type (act_dev) == DEVICE_TYPE_WIRELESS_ETHERNET)
|
||||
tip = g_strdup_printf (_("Connecting to wireless network '%s'..."),
|
||||
active_network ? wireless_network_get_essid (active_network) : "(unknown)");
|
||||
progress = nmwa_act_stage_to_pixbuf (applet, act_dev, active_network, &tip);
|
||||
need_animation = TRUE;
|
||||
break;
|
||||
|
||||
@@ -761,6 +845,8 @@ done:
|
||||
gtk_tooltips_set_tip (applet->tooltips, applet->event_box, tip, NULL);
|
||||
g_free (tip);
|
||||
|
||||
nmwa_set_progress (applet, progress);
|
||||
|
||||
if (applet->animation_id)
|
||||
g_source_remove (applet->animation_id);
|
||||
if (need_animation)
|
||||
@@ -1198,7 +1284,7 @@ static void nmwa_menu_device_add_networks (GtkWidget *menu, NetworkDevice *dev,
|
||||
g_return_if_fail (applet != NULL);
|
||||
g_return_if_fail (dev != NULL);
|
||||
|
||||
if (network_device_get_type (dev) != DEVICE_TYPE_WIRELESS_ETHERNET)
|
||||
if (!network_device_is_wireless (dev))
|
||||
return;
|
||||
|
||||
/* Check for any security */
|
||||
@@ -1674,11 +1760,17 @@ static void nmwa_setup_widgets (NMWirelessApplet *applet)
|
||||
applet->dropdown_menu = nmwa_dropdown_menu_create (GTK_MENU_ITEM (applet->top_menu_item), applet);
|
||||
|
||||
applet->pixmap = gtk_image_new ();
|
||||
applet->progress_bar = gtk_image_new ();
|
||||
|
||||
applet->icon_box = gtk_hbox_new (FALSE, 3);
|
||||
gtk_container_set_border_width (GTK_CONTAINER (applet->icon_box), 0);
|
||||
|
||||
/* Set up the widget structure and show the applet */
|
||||
gtk_container_add (GTK_CONTAINER(applet->top_menu_item), applet->pixmap);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL(menu_bar), applet->top_menu_item);
|
||||
gtk_container_add (GTK_CONTAINER(applet->event_box), menu_bar);
|
||||
gtk_container_add (GTK_CONTAINER (applet->icon_box), applet->progress_bar);
|
||||
gtk_container_add (GTK_CONTAINER (applet->icon_box), applet->pixmap);
|
||||
gtk_container_add (GTK_CONTAINER (applet->top_menu_item), applet->icon_box);
|
||||
gtk_menu_shell_append (GTK_MENU_SHELL (menu_bar), applet->top_menu_item);
|
||||
gtk_container_add (GTK_CONTAINER (applet->event_box), menu_bar);
|
||||
gtk_container_add (GTK_CONTAINER (applet), applet->event_box);
|
||||
gtk_widget_show_all (GTK_WIDGET (applet));
|
||||
|
||||
@@ -1932,7 +2024,7 @@ nmwa_icons_load_from_disk (NMWirelessApplet *applet, GtkIconTheme *icon_theme)
|
||||
{
|
||||
char * name;
|
||||
int i;
|
||||
gboolean success = TRUE;
|
||||
gboolean success = FALSE;
|
||||
|
||||
/* Assume icons are square */
|
||||
gint icon_size = 22;
|
||||
@@ -1951,7 +2043,16 @@ nmwa_icons_load_from_disk (NMWirelessApplet *applet, GtkIconTheme *icon_theme)
|
||||
if (!applet->no_connection_icon || !applet->wired_icon || !applet->adhoc_icon || !applet->vpn_lock_icon
|
||||
|| !applet->wireless_00_icon || !applet->wireless_25_icon || !applet->wireless_50_icon || !applet->wireless_75_icon
|
||||
|| !applet->wireless_100_icon)
|
||||
success = FALSE;
|
||||
goto out;
|
||||
|
||||
for (i = 0; i < NUM_PROGRESS_FRAMES; i++)
|
||||
{
|
||||
name = g_strdup_printf ("nm-progress%02d", i+1);
|
||||
applet->progress_icons[i] = gtk_icon_theme_load_icon (icon_theme, name, icon_size, 0, NULL);
|
||||
g_free (name);
|
||||
if (!applet->progress_icons[i])
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (i = 0; i < NUM_WIRED_CONNECTING_FRAMES; i++)
|
||||
{
|
||||
@@ -1959,7 +2060,7 @@ nmwa_icons_load_from_disk (NMWirelessApplet *applet, GtkIconTheme *icon_theme)
|
||||
applet->wired_connecting_icons[i] = gtk_icon_theme_load_icon (icon_theme, name, icon_size, 0, NULL);
|
||||
g_free (name);
|
||||
if (!applet->wired_connecting_icons[i])
|
||||
success = FALSE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
for (i = 0; i < NUM_WIRELESS_CONNECTING_FRAMES; i++)
|
||||
@@ -1968,9 +2069,12 @@ nmwa_icons_load_from_disk (NMWirelessApplet *applet, GtkIconTheme *icon_theme)
|
||||
applet->wireless_connecting_icons[i] = gtk_icon_theme_load_icon (icon_theme, name, icon_size, 0, NULL);
|
||||
g_free (name);
|
||||
if (!applet->wireless_connecting_icons[i])
|
||||
success = FALSE;
|
||||
goto out;
|
||||
}
|
||||
|
||||
success = TRUE;
|
||||
|
||||
out:
|
||||
if (!success)
|
||||
{
|
||||
show_warning_dialog (_("The NetworkManager applet could not find some required resources. It cannot continue.\n"));
|
||||
|
@@ -101,6 +101,8 @@ typedef struct
|
||||
GdkPixbuf * no_connection_icon;
|
||||
GdkPixbuf * wired_icon;
|
||||
GdkPixbuf * adhoc_icon;
|
||||
#define NUM_PROGRESS_FRAMES 11
|
||||
GdkPixbuf * progress_icons[NUM_PROGRESS_FRAMES];
|
||||
#define NUM_WIRED_CONNECTING_FRAMES 11
|
||||
GdkPixbuf * wired_connecting_icons[NUM_WIRED_CONNECTING_FRAMES];
|
||||
GdkPixbuf * wireless_00_icon;
|
||||
@@ -117,7 +119,9 @@ typedef struct
|
||||
guint animation_id;
|
||||
|
||||
/* Direct UI elements */
|
||||
GtkWidget * icon_box;
|
||||
GtkWidget * pixmap;
|
||||
GtkWidget * progress_bar;
|
||||
GtkWidget * top_menu_item;
|
||||
GtkWidget * dropdown_menu;
|
||||
GtkWidget * vpn_menu;
|
||||
|
@@ -21,6 +21,18 @@ smallicon_DATA= \
|
||||
nm-connecting09.png \
|
||||
nm-connecting10.png \
|
||||
nm-connecting11.png \
|
||||
nm-progress11.png \
|
||||
nm-progress01.png \
|
||||
nm-progress02.png \
|
||||
nm-progress03.png \
|
||||
nm-progress04.png \
|
||||
nm-progress05.png \
|
||||
nm-progress06.png \
|
||||
nm-progress07.png \
|
||||
nm-progress08.png \
|
||||
nm-progress09.png \
|
||||
nm-progress10.png \
|
||||
nm-progress11.png \
|
||||
nm-signal-00.png \
|
||||
nm-signal-25.png \
|
||||
nm-signal-50.png \
|
||||
|
BIN
gnome/applet/icons/nm-progress01.png
Normal file
After Width: | Height: | Size: 174 B |
BIN
gnome/applet/icons/nm-progress02.png
Normal file
After Width: | Height: | Size: 183 B |
BIN
gnome/applet/icons/nm-progress03.png
Normal file
After Width: | Height: | Size: 191 B |
BIN
gnome/applet/icons/nm-progress04.png
Normal file
After Width: | Height: | Size: 213 B |
BIN
gnome/applet/icons/nm-progress05.png
Normal file
After Width: | Height: | Size: 235 B |
BIN
gnome/applet/icons/nm-progress06.png
Normal file
After Width: | Height: | Size: 245 B |
BIN
gnome/applet/icons/nm-progress07.png
Normal file
After Width: | Height: | Size: 247 B |
BIN
gnome/applet/icons/nm-progress08.png
Normal file
After Width: | Height: | Size: 253 B |
BIN
gnome/applet/icons/nm-progress09.png
Normal file
After Width: | Height: | Size: 259 B |
BIN
gnome/applet/icons/nm-progress10.png
Normal file
After Width: | Height: | Size: 256 B |
BIN
gnome/applet/icons/nm-progress11.png
Normal file
After Width: | Height: | Size: 252 B |
BIN
gnome/applet/icons/nm-progress12.png
Normal file
After Width: | Height: | Size: 244 B |
@@ -83,7 +83,7 @@ void wired_menu_item_update (NMWiredMenuItem *item, NetworkDevice *dev, const gi
|
||||
|
||||
g_return_if_fail (dev != NULL);
|
||||
g_return_if_fail (item != NULL);
|
||||
g_assert (network_device_get_type (dev) == DEVICE_TYPE_WIRED_ETHERNET);
|
||||
g_assert (network_device_is_wired (dev));
|
||||
|
||||
dev_name = network_device_get_desc (dev) ? network_device_get_desc (dev) : network_device_get_iface (dev);
|
||||
|
||||
@@ -157,7 +157,7 @@ void wireless_menu_item_update (NMWirelessMenuItem *item, NetworkDevice *dev, co
|
||||
|
||||
g_return_if_fail (dev != NULL);
|
||||
g_return_if_fail (item != NULL);
|
||||
g_assert (network_device_get_type (dev) == DEVICE_TYPE_WIRELESS_ETHERNET);
|
||||
g_assert (network_device_is_wireless (dev));
|
||||
|
||||
n_essids = network_device_get_num_wireless_networks (dev);
|
||||
dev_name = network_device_get_desc (dev) ? network_device_get_desc (dev) : network_device_get_iface (dev);
|
||||
|
@@ -44,6 +44,7 @@ struct NetworkDevice
|
||||
char * udi;
|
||||
gint strength;
|
||||
GSList * networks;
|
||||
NMActStage act_stage;
|
||||
};
|
||||
|
||||
|
||||
@@ -97,6 +98,7 @@ NetworkDevice *network_device_copy (NetworkDevice *src)
|
||||
dev->desc = g_strdup (src->desc);
|
||||
dev->udi = g_strdup (src->udi);
|
||||
dev->active = src->active;
|
||||
dev->act_stage = src->act_stage;
|
||||
dev->strength = src->strength;
|
||||
|
||||
for (elt = src->networks; elt; elt = g_slist_next (elt))
|
||||
@@ -154,6 +156,22 @@ void network_device_unref (NetworkDevice *dev)
|
||||
}
|
||||
|
||||
|
||||
gboolean network_device_is_wired (NetworkDevice *dev)
|
||||
{
|
||||
g_return_val_if_fail (dev != NULL, FALSE);
|
||||
|
||||
return (network_device_get_type (dev) == DEVICE_TYPE_WIRED_ETHERNET);
|
||||
}
|
||||
|
||||
|
||||
gboolean network_device_is_wireless (NetworkDevice *dev)
|
||||
{
|
||||
g_return_val_if_fail (dev != NULL, FALSE);
|
||||
|
||||
return (network_device_get_type (dev) == DEVICE_TYPE_WIRELESS_ETHERNET);
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* network_device_get_active_wireless_network
|
||||
*
|
||||
@@ -510,3 +528,20 @@ void network_device_set_desc (NetworkDevice *dev, const char *desc)
|
||||
dev->desc = g_strdup (desc);
|
||||
}
|
||||
|
||||
/*
|
||||
* Accessors for activation stage
|
||||
*/
|
||||
NMActStage network_device_get_act_stage (NetworkDevice *dev)
|
||||
{
|
||||
g_return_val_if_fail (dev != NULL, FALSE);
|
||||
|
||||
return (dev->act_stage);
|
||||
}
|
||||
|
||||
void network_device_set_act_stage (NetworkDevice *dev, NMActStage act_stage)
|
||||
{
|
||||
g_return_if_fail (dev != NULL);
|
||||
|
||||
dev->act_stage = act_stage;
|
||||
}
|
||||
|
||||
|
@@ -37,6 +37,9 @@ NetworkDevice * network_device_copy (NetworkDevice *src);
|
||||
void network_device_ref (NetworkDevice *dev);
|
||||
void network_device_unref (NetworkDevice *dev);
|
||||
|
||||
gboolean network_device_is_wired (NetworkDevice *dev);
|
||||
gboolean network_device_is_wireless (NetworkDevice *dev);
|
||||
|
||||
NMDeviceType network_device_get_type (NetworkDevice *dev);
|
||||
|
||||
WirelessNetwork * network_device_get_wireless_network_by_essid (NetworkDevice *dev, const char *essid);
|
||||
@@ -79,4 +82,7 @@ void network_device_set_active (NetworkDevice *dev, gboolean active);
|
||||
const char * network_device_get_desc (NetworkDevice *dev);
|
||||
void network_device_set_desc (NetworkDevice *dev, const char *desc);
|
||||
|
||||
NMActStage network_device_get_act_stage (NetworkDevice *dev);
|
||||
void network_device_set_act_stage (NetworkDevice *dev, NMActStage act_stage);
|
||||
|
||||
#endif
|
||||
|
@@ -111,7 +111,7 @@ static GtkTreeModel *create_wireless_adapter_model (NMWirelessApplet *applet)
|
||||
NetworkDevice *dev = (NetworkDevice *)(element->data);
|
||||
|
||||
g_assert (dev);
|
||||
if (network_device_get_type (dev) == DEVICE_TYPE_WIRELESS_ETHERNET)
|
||||
if (network_device_is_wireless (dev))
|
||||
{
|
||||
GtkTreeIter iter;
|
||||
const char *dev_name;
|
||||
@@ -244,7 +244,7 @@ static GtkDialog *nmwa_other_network_dialog_init (GladeXML *xml, NMWirelessApple
|
||||
NetworkDevice *dev = (NetworkDevice *)(element->data);
|
||||
|
||||
g_assert (dev);
|
||||
if (network_device_get_type (dev) == DEVICE_TYPE_WIRELESS_ETHERNET)
|
||||
if (network_device_is_wireless (dev))
|
||||
{
|
||||
if (!*def_dev)
|
||||
{
|
||||
|
@@ -618,7 +618,7 @@ void nm_dbus_get_user_key_for_network (DBusConnection *connection, NMActRequest
|
||||
if (dbus_connection_send_with_reply (connection, message, &pcall, INT_MAX) && pcall)
|
||||
{
|
||||
nm_act_request_ref (req);
|
||||
nm_act_request_set_stage (req, ACT_STAGE_NEED_USER_KEY);
|
||||
nm_act_request_set_stage (req, NM_ACT_STAGE_NEED_USER_KEY);
|
||||
nm_act_request_set_user_key_pending_call (req, pcall);
|
||||
dbus_pending_call_set_notify (pcall, (DBusPendingCallNotifyFunction) nm_dbus_get_user_key_for_network_cb, req, NULL);
|
||||
}
|
||||
|
@@ -1827,7 +1827,7 @@ gboolean nm_device_activation_start (NMActRequest *req)
|
||||
|
||||
nm_info ("Activation (%s) started...", nm_device_get_iface (dev));
|
||||
|
||||
nm_act_request_set_stage (req, ACT_STAGE_DEVICE_PREPARE);
|
||||
nm_act_request_set_stage (req, NM_ACT_STAGE_DEVICE_PREPARE);
|
||||
nm_device_activate_schedule_stage1_device_prepare (req);
|
||||
|
||||
nm_schedule_state_change_signal_broadcast (data);
|
||||
@@ -2011,7 +2011,7 @@ void nm_device_activate_schedule_stage1_device_prepare (NMActRequest *req)
|
||||
dev = nm_act_request_get_dev (req);
|
||||
g_assert (dev);
|
||||
|
||||
nm_act_request_set_stage (req, ACT_STAGE_DEVICE_PREPARE);
|
||||
nm_act_request_set_stage (req, NM_ACT_STAGE_DEVICE_PREPARE);
|
||||
nm_info ("Activation (%s) Stage 1 (Device Prepare) scheduled...", nm_device_get_iface (dev));
|
||||
|
||||
source = g_idle_source_new ();
|
||||
@@ -2462,7 +2462,7 @@ static void nm_device_wireless_configure (NMActRequest *req)
|
||||
nm_info ("Activation (%s/wireless) Stage 2 (Device Configure) successful. Connected to access point '%s'.", nm_device_get_iface (dev), nm_ap_get_essid (ap) ? nm_ap_get_essid (ap) : "(none)");
|
||||
nm_device_activate_schedule_stage3_ip_config_start (req);
|
||||
}
|
||||
else if (!nm_device_activation_should_cancel (dev) && (nm_act_request_get_stage (req) != ACT_STAGE_NEED_USER_KEY))
|
||||
else if (!nm_device_activation_should_cancel (dev) && (nm_act_request_get_stage (req) != NM_ACT_STAGE_NEED_USER_KEY))
|
||||
nm_policy_schedule_activation_failed (req);
|
||||
}
|
||||
|
||||
@@ -2563,7 +2563,7 @@ void nm_device_activate_schedule_stage2_device_config (NMActRequest *req)
|
||||
dev = nm_act_request_get_dev (req);
|
||||
g_assert (dev);
|
||||
|
||||
nm_act_request_set_stage (req, ACT_STAGE_DEVICE_CONFIG);
|
||||
nm_act_request_set_stage (req, NM_ACT_STAGE_DEVICE_CONFIG);
|
||||
|
||||
source = g_idle_source_new ();
|
||||
g_source_set_callback (source, (GSourceFunc) nm_device_activate_stage2_device_config, req, NULL);
|
||||
@@ -2643,7 +2643,7 @@ static void nm_device_activate_schedule_stage3_ip_config_start (NMActRequest *re
|
||||
dev = nm_act_request_get_dev (req);
|
||||
g_assert (dev);
|
||||
|
||||
nm_act_request_set_stage (req, ACT_STAGE_IP_CONFIG_START);
|
||||
nm_act_request_set_stage (req, NM_ACT_STAGE_IP_CONFIG_START);
|
||||
|
||||
source = g_idle_source_new ();
|
||||
g_source_set_callback (source, (GSourceFunc) nm_device_activate_stage3_ip_config_start, req, NULL);
|
||||
@@ -2775,7 +2775,7 @@ void nm_device_activate_schedule_stage4_ip_config_get (NMActRequest *req)
|
||||
dev = nm_act_request_get_dev (req);
|
||||
g_assert (dev);
|
||||
|
||||
nm_act_request_set_stage (req, ACT_STAGE_IP_CONFIG_GET);
|
||||
nm_act_request_set_stage (req, NM_ACT_STAGE_IP_CONFIG_GET);
|
||||
nm_info ("Activation (%s) Stage 4 (IP Configure Get) scheduled...", nm_device_get_iface (dev));
|
||||
|
||||
source = g_idle_source_new ();
|
||||
@@ -2869,7 +2869,7 @@ void nm_device_activate_schedule_stage4_ip_config_timeout (NMActRequest *req)
|
||||
dev = nm_act_request_get_dev (req);
|
||||
g_assert (dev);
|
||||
|
||||
nm_act_request_set_stage (req, ACT_STAGE_IP_CONFIG_GET);
|
||||
nm_act_request_set_stage (req, NM_ACT_STAGE_IP_CONFIG_GET);
|
||||
|
||||
source = g_idle_source_new ();
|
||||
g_source_set_callback (source, (GSourceFunc) nm_device_activate_stage4_ip_config_timeout, req, NULL);
|
||||
@@ -2955,7 +2955,7 @@ static void nm_device_activate_schedule_stage5_ip_config_commit (NMActRequest *r
|
||||
dev = nm_act_request_get_dev (req);
|
||||
g_assert (dev);
|
||||
|
||||
nm_act_request_set_stage (req, ACT_STAGE_IP_CONFIG_COMMIT);
|
||||
nm_act_request_set_stage (req, NM_ACT_STAGE_IP_CONFIG_COMMIT);
|
||||
|
||||
source = g_idle_source_new ();
|
||||
g_source_set_callback (source, (GSourceFunc) nm_device_activate_stage5_ip_config_commit, req, NULL);
|
||||
@@ -2985,19 +2985,19 @@ gboolean nm_device_is_activating (NMDevice *dev)
|
||||
stage = nm_act_request_get_stage (req);
|
||||
switch (stage)
|
||||
{
|
||||
case ACT_STAGE_DEVICE_PREPARE:
|
||||
case ACT_STAGE_DEVICE_CONFIG:
|
||||
case ACT_STAGE_NEED_USER_KEY:
|
||||
case ACT_STAGE_IP_CONFIG_START:
|
||||
case ACT_STAGE_IP_CONFIG_GET:
|
||||
case ACT_STAGE_IP_CONFIG_COMMIT:
|
||||
case NM_ACT_STAGE_DEVICE_PREPARE:
|
||||
case NM_ACT_STAGE_DEVICE_CONFIG:
|
||||
case NM_ACT_STAGE_NEED_USER_KEY:
|
||||
case NM_ACT_STAGE_IP_CONFIG_START:
|
||||
case NM_ACT_STAGE_IP_CONFIG_GET:
|
||||
case NM_ACT_STAGE_IP_CONFIG_COMMIT:
|
||||
activating = TRUE;
|
||||
break;
|
||||
|
||||
case ACT_STAGE_ACTIVATED:
|
||||
case ACT_STAGE_FAILED:
|
||||
case ACT_STAGE_CANCELLED:
|
||||
case ACT_STAGE_UNKNOWN:
|
||||
case NM_ACT_STAGE_ACTIVATED:
|
||||
case NM_ACT_STAGE_FAILED:
|
||||
case NM_ACT_STAGE_CANCELLED:
|
||||
case NM_ACT_STAGE_UNKNOWN:
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@@ -3059,12 +3059,12 @@ void nm_device_activation_cancel (NMDevice *dev)
|
||||
dev->quit_activation = TRUE;
|
||||
|
||||
/* If the device is waiting for DHCP or a user key, force its current request to stop. */
|
||||
if (nm_act_request_get_stage (req) == ACT_STAGE_NEED_USER_KEY)
|
||||
if (nm_act_request_get_stage (req) == NM_ACT_STAGE_NEED_USER_KEY)
|
||||
{
|
||||
nm_dbus_cancel_get_user_key_for_network (dev->app_data->dbus_connection, req);
|
||||
clear_act_request = TRUE;
|
||||
}
|
||||
else if (nm_act_request_get_stage (req) == ACT_STAGE_IP_CONFIG_START)
|
||||
else if (nm_act_request_get_stage (req) == NM_ACT_STAGE_IP_CONFIG_START)
|
||||
{
|
||||
nm_dhcp_manager_cancel_transaction (dev->app_data->dhcp_manager, req);
|
||||
clear_act_request = TRUE;
|
||||
|
@@ -73,7 +73,7 @@ gboolean nm_policy_activation_finish (NMActRequest *req)
|
||||
nm_dbus_add_network_address (data->dbus_connection, NETWORK_TYPE_ALLOWED, nm_ap_get_essid (ap), &addr);
|
||||
}
|
||||
|
||||
nm_act_request_set_stage (req, ACT_STAGE_ACTIVATED);
|
||||
nm_act_request_set_stage (req, NM_ACT_STAGE_ACTIVATED);
|
||||
nm_info ("Activation (%s) successful, device activated.", nm_device_get_iface (dev));
|
||||
|
||||
nm_schedule_state_change_signal_broadcast (data);
|
||||
@@ -178,7 +178,7 @@ void nm_policy_schedule_activation_failed (NMActRequest *req)
|
||||
dev = nm_act_request_get_dev (req);
|
||||
g_assert (dev);
|
||||
|
||||
nm_act_request_set_stage (req, ACT_STAGE_FAILED);
|
||||
nm_act_request_set_stage (req, NM_ACT_STAGE_FAILED);
|
||||
|
||||
source = g_idle_source_new ();
|
||||
g_source_set_priority (source, G_PRIORITY_HIGH_IDLE);
|
||||
|
@@ -206,7 +206,7 @@ gboolean nm_dhcp_manager_handle_timeout (NMActRequest *req)
|
||||
|
||||
nm_info ("Device '%s' DHCP transaction took too long (>25s), stopping it.", nm_device_get_iface (dev));
|
||||
|
||||
if (nm_act_request_get_stage (req) == ACT_STAGE_IP_CONFIG_START)
|
||||
if (nm_act_request_get_stage (req) == NM_ACT_STAGE_IP_CONFIG_START)
|
||||
{
|
||||
nm_act_request_set_dhcp_timeout (req, 0);
|
||||
nm_dhcp_manager_cancel_transaction (data->dhcp_manager, req);
|
||||
@@ -579,7 +579,7 @@ gboolean nm_dhcp_manager_process_signal (NMDHCPManager *manager, DBusMessage *me
|
||||
case 3: /* RENEW */
|
||||
case 4: /* REBOOT */
|
||||
case 5: /* REBIND */
|
||||
if (nm_act_request_get_stage (req) == ACT_STAGE_IP_CONFIG_START)
|
||||
if (nm_act_request_get_stage (req) == NM_ACT_STAGE_IP_CONFIG_START)
|
||||
{
|
||||
nm_device_activate_schedule_stage4_ip_config_get (req);
|
||||
remove_timeout (manager, req);
|
||||
@@ -587,7 +587,7 @@ gboolean nm_dhcp_manager_process_signal (NMDHCPManager *manager, DBusMessage *me
|
||||
break;
|
||||
|
||||
case 8: /* TIMEOUT - timed out trying to contact server */
|
||||
if (nm_act_request_get_stage (req) == ACT_STAGE_IP_CONFIG_START)
|
||||
if (nm_act_request_get_stage (req) == NM_ACT_STAGE_IP_CONFIG_START)
|
||||
{
|
||||
nm_device_activate_schedule_stage4_ip_config_timeout (req);
|
||||
remove_timeout (manager, req);
|
||||
@@ -597,7 +597,7 @@ gboolean nm_dhcp_manager_process_signal (NMDHCPManager *manager, DBusMessage *me
|
||||
case 9: /* FAIL */
|
||||
case 13: /* ABEND */
|
||||
// case 14: /* END */
|
||||
if (nm_act_request_get_stage (req) == ACT_STAGE_IP_CONFIG_START)
|
||||
if (nm_act_request_get_stage (req) == NM_ACT_STAGE_IP_CONFIG_START)
|
||||
{
|
||||
nm_policy_schedule_activation_failed (req);
|
||||
remove_timeout (manager, req);
|
||||
|
@@ -22,8 +22,10 @@
|
||||
|
||||
#include <glib.h>
|
||||
#include <string.h>
|
||||
#include <dbus/dbus.h>
|
||||
#include "nm-activation-request.h"
|
||||
#include "NetworkManagerDevice.h"
|
||||
#include "NetworkManagerDbus.h"
|
||||
#include "nm-dhcp-manager.h"
|
||||
#include "nm-utils.h"
|
||||
|
||||
@@ -160,16 +162,40 @@ void nm_act_request_set_ip4_config (NMActRequest *req, NMIP4Config *ip4_config)
|
||||
|
||||
NMActStage nm_act_request_get_stage (NMActRequest *req)
|
||||
{
|
||||
g_return_val_if_fail (req != NULL, ACT_STAGE_UNKNOWN);
|
||||
g_return_val_if_fail (req != NULL, NM_ACT_STAGE_UNKNOWN);
|
||||
|
||||
return req->stage;
|
||||
}
|
||||
|
||||
void nm_act_request_set_stage (NMActRequest *req, NMActStage stage)
|
||||
{
|
||||
DBusMessage * message;
|
||||
char * dev_path;
|
||||
|
||||
g_return_if_fail (req != NULL);
|
||||
|
||||
req->stage = stage;
|
||||
|
||||
g_return_if_fail (req->data);
|
||||
g_return_if_fail (req->dev);
|
||||
|
||||
if (!(dev_path = nm_dbus_get_object_path_for_device (req->dev)))
|
||||
return;
|
||||
|
||||
if (!(message = dbus_message_new_signal (NM_DBUS_PATH, NM_DBUS_INTERFACE, "DeviceActivationStage")))
|
||||
{
|
||||
nm_warning ("nm_act_request_set_stage(): Not enough memory for new dbus message!");
|
||||
g_free (dev_path);
|
||||
return;
|
||||
}
|
||||
|
||||
dbus_message_append_args (message, DBUS_TYPE_OBJECT_PATH, &dev_path, DBUS_TYPE_UINT32, &stage, DBUS_TYPE_INVALID);
|
||||
g_free (dev_path);
|
||||
|
||||
if (!dbus_connection_send (req->data->dbus_connection, message, NULL))
|
||||
nm_warning ("nm_act_request_set_stage(): Could not raise the signal!");
|
||||
|
||||
dbus_message_unref (message);
|
||||
}
|
||||
|
||||
DBusPendingCall * nm_act_request_get_user_key_pending_call (NMActRequest *req)
|
||||
|
@@ -31,20 +31,6 @@
|
||||
#include "nm-ip4-config.h"
|
||||
|
||||
|
||||
typedef enum NMActStage
|
||||
{
|
||||
ACT_STAGE_UNKNOWN = 0,
|
||||
ACT_STAGE_DEVICE_PREPARE,
|
||||
ACT_STAGE_DEVICE_CONFIG,
|
||||
ACT_STAGE_NEED_USER_KEY,
|
||||
ACT_STAGE_IP_CONFIG_START,
|
||||
ACT_STAGE_IP_CONFIG_GET,
|
||||
ACT_STAGE_IP_CONFIG_COMMIT,
|
||||
ACT_STAGE_ACTIVATED,
|
||||
ACT_STAGE_FAILED,
|
||||
ACT_STAGE_CANCELLED
|
||||
} NMActStage;
|
||||
|
||||
|
||||
NMActRequest * nm_act_request_new (NMData *data, NMDevice *dev, NMAccessPoint *ap, gboolean user_requested);
|
||||
void nm_act_request_ref (NMActRequest *req);
|
||||
|
@@ -362,6 +362,7 @@ static DBusMessage *nm_dbus_device_get_properties (DBusConnection *connection, D
|
||||
char ** networks = NULL;
|
||||
int num_networks = 0;
|
||||
dbus_bool_t active = nm_device_get_act_request (dev) ? TRUE : FALSE;
|
||||
NMActStage act_stage = active ? nm_act_request_get_stage (nm_device_get_act_request (dev)) : NM_ACT_STAGE_UNKNOWN;
|
||||
|
||||
nm_device_get_hw_address (dev, &hw_addr);
|
||||
memset (hw_addr_buf, 0, 20);
|
||||
@@ -414,6 +415,7 @@ static DBusMessage *nm_dbus_device_get_properties (DBusConnection *connection, D
|
||||
DBUS_TYPE_UINT32, &type,
|
||||
DBUS_TYPE_STRING, &udi,
|
||||
DBUS_TYPE_BOOLEAN,&active,
|
||||
DBUS_TYPE_UINT32, &act_stage,
|
||||
DBUS_TYPE_UINT32, &ip4_address,
|
||||
DBUS_TYPE_STRING, &hw_addr_buf_ptr,
|
||||
DBUS_TYPE_UINT32, &mode,
|
||||
|