2005-01-21 Dan Williams <dcbw@redhat.com>
* Add new icons, more frames of animation * Remove some hacks to get the panel applet to display correct status, an NM update will soon follow that will fix the real issue. git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@385 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
@@ -1,3 +1,10 @@
|
|||||||
|
2005-01-21 Dan Williams <dcbw@redhat.com>
|
||||||
|
|
||||||
|
* Add new icons, more frames of animation
|
||||||
|
* Remove some hacks to get the panel applet to display correct
|
||||||
|
status, an NM update will soon follow that will fix the
|
||||||
|
real issue.
|
||||||
|
|
||||||
2005-01-19 Kjartan Maraas <kmaraas@gnome.org>
|
2005-01-19 Kjartan Maraas <kmaraas@gnome.org>
|
||||||
|
|
||||||
* panel-applet/NMWirelessApplet.c: #include <config.h> must be
|
* panel-applet/NMWirelessApplet.c: #include <config.h> must be
|
||||||
|
@@ -109,47 +109,41 @@ static GObject *nmwa_constructor (GType type,
|
|||||||
*/
|
*/
|
||||||
static void nmwa_update_network_state (NMWirelessApplet *applet)
|
static void nmwa_update_network_state (NMWirelessApplet *applet)
|
||||||
{
|
{
|
||||||
|
static AppletState old_state = 0;
|
||||||
|
|
||||||
g_return_if_fail (applet != NULL);
|
g_return_if_fail (applet != NULL);
|
||||||
|
|
||||||
if (!applet->connection)
|
if (!applet->connection)
|
||||||
{
|
{
|
||||||
applet->applet_state = APPLET_STATE_NO_NM;
|
applet->applet_state = APPLET_STATE_NO_NM;
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (applet->applet_state == APPLET_STATE_NO_NM)
|
if (applet->applet_state == APPLET_STATE_NO_NM)
|
||||||
return;
|
goto out;
|
||||||
|
|
||||||
if (!applet->nm_status)
|
if (!applet->nm_status)
|
||||||
{
|
{
|
||||||
applet->applet_state = APPLET_STATE_NO_CONNECTION;
|
applet->applet_state = APPLET_STATE_NO_CONNECTION;
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ( applet->forcing_device
|
|
||||||
&& (applet->applet_state == APPLET_STATE_WIRELESS_CONNECTING)
|
|
||||||
&& (strcmp (applet->nm_status, "connected") == 0))
|
|
||||||
{
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
applet->forcing_device = FALSE;
|
|
||||||
|
|
||||||
if (strcmp (applet->nm_status, "scanning") == 0)
|
if (strcmp (applet->nm_status, "scanning") == 0)
|
||||||
{
|
{
|
||||||
applet->applet_state = APPLET_STATE_WIRELESS_SCANNING;
|
applet->applet_state = APPLET_STATE_WIRELESS_SCANNING;
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp (applet->nm_status, "disconnected") == 0)
|
if (strcmp (applet->nm_status, "disconnected") == 0)
|
||||||
{
|
{
|
||||||
applet->applet_state = APPLET_STATE_NO_CONNECTION;
|
applet->applet_state = APPLET_STATE_NO_CONNECTION;
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!applet->active_device)
|
if (!applet->active_device)
|
||||||
{
|
{
|
||||||
applet->applet_state = APPLET_STATE_NO_CONNECTION;
|
applet->applet_state = APPLET_STATE_NO_CONNECTION;
|
||||||
return;
|
goto out;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* If the device is not 802.x, we don't show state for it (yet) */
|
/* If the device is not 802.x, we don't show state for it (yet) */
|
||||||
@@ -157,7 +151,6 @@ static void nmwa_update_network_state (NMWirelessApplet *applet)
|
|||||||
&& (applet->active_device->type != DEVICE_TYPE_WIRELESS_ETHERNET))
|
&& (applet->active_device->type != DEVICE_TYPE_WIRELESS_ETHERNET))
|
||||||
{
|
{
|
||||||
applet->applet_state = APPLET_STATE_NO_CONNECTION;
|
applet->applet_state = APPLET_STATE_NO_CONNECTION;
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
else if (applet->active_device->type == DEVICE_TYPE_WIRED_ETHERNET)
|
else if (applet->active_device->type == DEVICE_TYPE_WIRED_ETHERNET)
|
||||||
{
|
{
|
||||||
@@ -173,6 +166,21 @@ static void nmwa_update_network_state (NMWirelessApplet *applet)
|
|||||||
else if (strcmp (applet->nm_status, "connected") == 0)
|
else if (strcmp (applet->nm_status, "connected") == 0)
|
||||||
applet->applet_state = APPLET_STATE_WIRELESS;
|
applet->applet_state = APPLET_STATE_WIRELESS;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
out:
|
||||||
|
if (applet->applet_state != old_state)
|
||||||
|
{
|
||||||
|
applet->animation_step = 0;
|
||||||
|
if (applet->applet_state == APPLET_STATE_NO_NM)
|
||||||
|
{
|
||||||
|
/* We can only do this because we are called with
|
||||||
|
* the applet->data_mutex locked.
|
||||||
|
*/
|
||||||
|
g_free (applet->nm_status);
|
||||||
|
applet->nm_status = NULL;
|
||||||
|
}
|
||||||
|
old_state = applet->applet_state;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -182,27 +190,33 @@ animation_timeout (NMWirelessApplet *applet)
|
|||||||
switch (applet->applet_state)
|
switch (applet->applet_state)
|
||||||
{
|
{
|
||||||
case (APPLET_STATE_WIRED_CONNECTING):
|
case (APPLET_STATE_WIRED_CONNECTING):
|
||||||
applet->animation_step ++;
|
|
||||||
if (applet->animation_step >= NUM_WIRED_CONNECTING_FRAMES)
|
if (applet->animation_step >= NUM_WIRED_CONNECTING_FRAMES)
|
||||||
applet->animation_step = 0;
|
applet->animation_step = 0;
|
||||||
gtk_image_set_from_pixbuf (GTK_IMAGE (applet->pixmap),
|
gtk_image_set_from_pixbuf (GTK_IMAGE (applet->pixmap),
|
||||||
applet->wired_connecting_icons[applet->animation_step]);
|
applet->wired_connecting_icons[applet->animation_step]);
|
||||||
break;
|
|
||||||
case (APPLET_STATE_WIRELESS_CONNECTING):
|
|
||||||
applet->animation_step ++;
|
applet->animation_step ++;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (APPLET_STATE_WIRELESS_CONNECTING):
|
||||||
if (applet->animation_step >= NUM_WIRELESS_CONNECTING_FRAMES)
|
if (applet->animation_step >= NUM_WIRELESS_CONNECTING_FRAMES)
|
||||||
applet->animation_step = 0;
|
applet->animation_step = 0;
|
||||||
gtk_image_set_from_pixbuf (GTK_IMAGE (applet->pixmap),
|
gtk_image_set_from_pixbuf (GTK_IMAGE (applet->pixmap),
|
||||||
applet->wireless_connecting_icons[applet->animation_step]);
|
applet->wireless_connecting_icons[applet->animation_step]);
|
||||||
break;
|
|
||||||
case (APPLET_STATE_NO_NM):
|
|
||||||
case (APPLET_STATE_WIRELESS_SCANNING):
|
|
||||||
applet->animation_step ++;
|
applet->animation_step ++;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (APPLET_STATE_NO_NM):
|
||||||
|
applet->animation_step = 0;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case (APPLET_STATE_WIRELESS_SCANNING):
|
||||||
if (applet->animation_step >= NUM_WIRELESS_SCANNING_FRAMES)
|
if (applet->animation_step >= NUM_WIRELESS_SCANNING_FRAMES)
|
||||||
applet->animation_step = 0;
|
applet->animation_step = 0;
|
||||||
gtk_image_set_from_pixbuf (GTK_IMAGE (applet->pixmap),
|
gtk_image_set_from_pixbuf (GTK_IMAGE (applet->pixmap),
|
||||||
applet->wireless_scanning_icons[applet->animation_step]);
|
applet->wireless_scanning_icons[applet->animation_step]);
|
||||||
|
applet->animation_step ++;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -264,9 +278,8 @@ nmwa_update_state (NMWirelessApplet *applet)
|
|||||||
GSList *list;
|
GSList *list;
|
||||||
for (list = applet->active_device->networks; list; list = list->next)
|
for (list = applet->active_device->networks; list; list = list->next)
|
||||||
{
|
{
|
||||||
WirelessNetwork *network;
|
WirelessNetwork *network = (WirelessNetwork *) list->data;
|
||||||
|
|
||||||
network = (WirelessNetwork *) list->data;
|
|
||||||
if (network->active)
|
if (network->active)
|
||||||
strength = CLAMP ((int) network->strength, 0, 100);
|
strength = CLAMP ((int) network->strength, 0, 100);
|
||||||
}
|
}
|
||||||
@@ -277,8 +290,7 @@ nmwa_update_state (NMWirelessApplet *applet)
|
|||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
/* Only show icon if there's more than one device and at least one is wireless */
|
/* Only show icon if there's more than one device and at least one is wireless */
|
||||||
if (g_slist_length (applet->device_list) == 1 &&
|
if (g_slist_length (applet->device_list) == 1 && applet->applet_state != APPLET_STATE_NO_NM)
|
||||||
applet->applet_state != APPLET_STATE_NO_NM)
|
|
||||||
{
|
{
|
||||||
if (((NetworkDevice *)applet->device_list->data)->type == DEVICE_TYPE_WIRED_ETHERNET)
|
if (((NetworkDevice *)applet->device_list->data)->type == DEVICE_TYPE_WIRED_ETHERNET)
|
||||||
show_applet = FALSE;
|
show_applet = FALSE;
|
||||||
@@ -294,23 +306,24 @@ nmwa_update_state (NMWirelessApplet *applet)
|
|||||||
show_applet = FALSE;
|
show_applet = FALSE;
|
||||||
tip = g_strdup (_("No network connection"));
|
tip = g_strdup (_("No network connection"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (APPLET_STATE_WIRED):
|
case (APPLET_STATE_WIRED):
|
||||||
pixbuf = applet->wired_icon;
|
pixbuf = applet->wired_icon;
|
||||||
tip = g_strdup (_("Wired network connection"));
|
tip = g_strdup (_("Wired network connection"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (APPLET_STATE_WIRED_CONNECTING):
|
case (APPLET_STATE_WIRED_CONNECTING):
|
||||||
applet->animation_step = CLAMP (applet->animation_step, 0, NUM_WIRED_CONNECTING_FRAMES - 1);
|
|
||||||
pixbuf = applet->wired_connecting_icons[applet->animation_step];
|
|
||||||
need_animation = TRUE;
|
need_animation = TRUE;
|
||||||
tip = g_strdup (_("Connecting to a wired network..."));
|
tip = g_strdup (_("Connecting to a wired network..."));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (APPLET_STATE_WIRELESS):
|
case (APPLET_STATE_WIRELESS):
|
||||||
if (applet->active_device)
|
if (applet->active_device)
|
||||||
{
|
{
|
||||||
if (applet->is_adhoc)
|
if (applet->is_adhoc)
|
||||||
{
|
{
|
||||||
pixbuf = applet->adhoc_icon;
|
pixbuf = applet->adhoc_icon;
|
||||||
tip = g_strdup_printf (_("Connected to an Ad-Hoc wireless network"));
|
tip = g_strdup (_("Connected to an Ad-Hoc wireless network"));
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@@ -330,21 +343,22 @@ nmwa_update_state (NMWirelessApplet *applet)
|
|||||||
else
|
else
|
||||||
tip = g_strdup (_("Wireless network connection"));
|
tip = g_strdup (_("Wireless network connection"));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (APPLET_STATE_WIRELESS_CONNECTING):
|
case (APPLET_STATE_WIRELESS_CONNECTING):
|
||||||
applet->animation_step = CLAMP (applet->animation_step, 0, NUM_WIRELESS_CONNECTING_FRAMES - 1);
|
|
||||||
pixbuf = applet->wireless_connecting_icons[applet->animation_step];
|
|
||||||
need_animation = TRUE;
|
need_animation = TRUE;
|
||||||
tip = g_strdup (_("Connecting to a wireless network..."));
|
tip = g_strdup (_("Connecting to a wireless network..."));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case (APPLET_STATE_NO_NM):
|
case (APPLET_STATE_NO_NM):
|
||||||
show_applet = FALSE;
|
show_applet = FALSE;
|
||||||
tip = g_strdup (_("NetworkManager is not running"));
|
tip = g_strdup (_("NetworkManager is not running"));
|
||||||
|
break;
|
||||||
|
|
||||||
case (APPLET_STATE_WIRELESS_SCANNING):
|
case (APPLET_STATE_WIRELESS_SCANNING):
|
||||||
applet->animation_step = CLAMP (applet->animation_step, 0, NUM_WIRELESS_SCANNING_FRAMES - 1);
|
|
||||||
pixbuf = applet->wireless_scanning_icons[applet->animation_step];
|
|
||||||
need_animation = TRUE;
|
need_animation = TRUE;
|
||||||
if (!tip)
|
|
||||||
tip = g_strdup (_("Scanning for wireless networks..."));
|
tip = g_strdup (_("Scanning for wireless networks..."));
|
||||||
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -355,8 +369,6 @@ nmwa_update_state (NMWirelessApplet *applet)
|
|||||||
gtk_tooltips_set_tip (applet->tooltips, applet->event_box, tip, NULL);
|
gtk_tooltips_set_tip (applet->tooltips, applet->event_box, tip, NULL);
|
||||||
g_free (tip);
|
g_free (tip);
|
||||||
|
|
||||||
gtk_image_set_from_pixbuf (GTK_IMAGE (applet->pixmap), pixbuf);
|
|
||||||
|
|
||||||
/*determine if we should hide the notification icon*/
|
/*determine if we should hide the notification icon*/
|
||||||
if (show_applet)
|
if (show_applet)
|
||||||
gtk_widget_show (GTK_WIDGET (applet));
|
gtk_widget_show (GTK_WIDGET (applet));
|
||||||
@@ -366,8 +378,9 @@ nmwa_update_state (NMWirelessApplet *applet)
|
|||||||
if (applet->animation_id)
|
if (applet->animation_id)
|
||||||
g_source_remove (applet->animation_id);
|
g_source_remove (applet->animation_id);
|
||||||
if (need_animation)
|
if (need_animation)
|
||||||
applet->animation_id =
|
applet->animation_id = g_timeout_add (100, (GSourceFunc) (animation_timeout), applet);
|
||||||
g_timeout_add (125, (GSourceFunc) (animation_timeout), applet);
|
else
|
||||||
|
gtk_image_set_from_pixbuf (GTK_IMAGE (applet->pixmap), pixbuf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -565,12 +578,8 @@ static void nmwa_menu_item_activate (GtkMenuItem *item, gpointer user_data)
|
|||||||
dev = nmwa_get_device_for_nm_device (applet, tag);
|
dev = nmwa_get_device_for_nm_device (applet, tag);
|
||||||
|
|
||||||
if (dev)
|
if (dev)
|
||||||
{
|
|
||||||
applet->applet_state = APPLET_STATE_WIRELESS_CONNECTING;
|
|
||||||
applet->forcing_device = TRUE;
|
|
||||||
nmwa_dbus_set_device (applet->connection, dev, net, -1, NULL);
|
nmwa_dbus_set_device (applet->connection, dev, net, -1, NULL);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -581,6 +590,10 @@ static void nmwa_menu_item_activate (GtkMenuItem *item, gpointer user_data)
|
|||||||
*/
|
*/
|
||||||
static void nmwa_toplevel_menu_activate (GtkWidget *menu, NMWirelessApplet *applet)
|
static void nmwa_toplevel_menu_activate (GtkWidget *menu, NMWirelessApplet *applet)
|
||||||
{
|
{
|
||||||
|
if (!applet->tooltips)
|
||||||
|
applet->tooltips = gtk_tooltips_new ();
|
||||||
|
gtk_tooltips_set_tip (applet->tooltips, applet->event_box, NULL, NULL);
|
||||||
|
|
||||||
nmwa_dispose_menu_items (applet);
|
nmwa_dispose_menu_items (applet);
|
||||||
nmwa_populate_menu (applet);
|
nmwa_populate_menu (applet);
|
||||||
gtk_widget_show (applet->menu);
|
gtk_widget_show (applet->menu);
|
||||||
@@ -1018,8 +1031,6 @@ static GtkWidget * nmwa_get_instance (NMWirelessApplet *applet)
|
|||||||
|
|
||||||
g_signal_connect (applet,"destroy", G_CALLBACK (nmwa_destroy), NULL);
|
g_signal_connect (applet,"destroy", G_CALLBACK (nmwa_destroy), NULL);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/* Start redraw timeout */
|
/* Start redraw timeout */
|
||||||
nmwa_start_redraw_timeout (applet);
|
nmwa_start_redraw_timeout (applet);
|
||||||
|
|
||||||
@@ -1081,38 +1092,58 @@ nmwa_icons_free (NMWirelessApplet *applet)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
nmwa_icons_load_from_disk (NMWirelessApplet *applet,
|
nmwa_icons_load_from_disk (NMWirelessApplet *applet, GtkIconTheme *icon_theme)
|
||||||
GtkIconTheme *icon_theme)
|
|
||||||
{
|
{
|
||||||
gint icon_size;
|
/* Assume icons are square */
|
||||||
|
gint con_icon_size = 24;
|
||||||
|
gint norm_icon_size = 22;
|
||||||
|
|
||||||
/* Assume icon is square */
|
applet->no_nm_icon = gtk_icon_theme_load_icon (icon_theme, "nm-device-broken", norm_icon_size, 0, NULL);
|
||||||
icon_size = 22;
|
applet->wired_icon = gtk_icon_theme_load_icon (icon_theme, "nm-device-wired", norm_icon_size, 0, NULL);
|
||||||
|
applet->adhoc_icon = gtk_icon_theme_load_icon (icon_theme, "nm-adhoc", norm_icon_size, 0, NULL);
|
||||||
applet->no_nm_icon = gtk_icon_theme_load_icon (icon_theme, "nm-device-broken", icon_size, 0, NULL);
|
applet->wired_connecting_icons[0] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting01", con_icon_size, 0, NULL);
|
||||||
applet->wired_icon = gtk_icon_theme_load_icon (icon_theme, "nm-device-wired", icon_size, 0, NULL);
|
applet->wired_connecting_icons[1] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting02", con_icon_size, 0, NULL);
|
||||||
applet->adhoc_icon = gtk_icon_theme_load_icon (icon_theme, "nm-adhoc", icon_size, 0, NULL);
|
applet->wired_connecting_icons[2] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting03", con_icon_size, 0, NULL);
|
||||||
applet->wired_connecting_icons[0] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting00", icon_size, 0, NULL);
|
applet->wired_connecting_icons[3] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting04", con_icon_size, 0, NULL);
|
||||||
applet->wired_connecting_icons[1] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting01", icon_size, 0, NULL);
|
applet->wired_connecting_icons[4] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting05", con_icon_size, 0, NULL);
|
||||||
applet->wired_connecting_icons[2] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting02", icon_size, 0, NULL);
|
applet->wired_connecting_icons[5] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting06", con_icon_size, 0, NULL);
|
||||||
applet->wired_connecting_icons[3] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting03", icon_size, 0, NULL);
|
applet->wired_connecting_icons[6] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting07", con_icon_size, 0, NULL);
|
||||||
applet->wireless_00_icon = gtk_icon_theme_load_icon (icon_theme, "nm-signal-00", icon_size, 0, NULL);
|
applet->wired_connecting_icons[7] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting08", con_icon_size, 0, NULL);
|
||||||
applet->wireless_25_icon = gtk_icon_theme_load_icon (icon_theme, "nm-signal-25", icon_size, 0, NULL);
|
applet->wired_connecting_icons[8] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting09", con_icon_size, 0, NULL);
|
||||||
applet->wireless_50_icon = gtk_icon_theme_load_icon (icon_theme, "nm-signal-50", icon_size, 0, NULL);
|
applet->wired_connecting_icons[9] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting10", con_icon_size, 0, NULL);
|
||||||
applet->wireless_75_icon = gtk_icon_theme_load_icon (icon_theme, "nm-signal-75", icon_size, 0, NULL);
|
applet->wired_connecting_icons[10] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting11", con_icon_size, 0, NULL);
|
||||||
applet->wireless_100_icon = gtk_icon_theme_load_icon (icon_theme, "nm-signal-100", icon_size, 0, NULL);
|
applet->wireless_00_icon = gtk_icon_theme_load_icon (icon_theme, "nm-signal-00", norm_icon_size, 0, NULL);
|
||||||
applet->wireless_connecting_icons[0] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting00", icon_size, 0, NULL);
|
applet->wireless_25_icon = gtk_icon_theme_load_icon (icon_theme, "nm-signal-25", norm_icon_size, 0, NULL);
|
||||||
applet->wireless_connecting_icons[1] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting01", icon_size, 0, NULL);
|
applet->wireless_50_icon = gtk_icon_theme_load_icon (icon_theme, "nm-signal-50", norm_icon_size, 0, NULL);
|
||||||
applet->wireless_connecting_icons[2] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting02", icon_size, 0, NULL);
|
applet->wireless_75_icon = gtk_icon_theme_load_icon (icon_theme, "nm-signal-75", norm_icon_size, 0, NULL);
|
||||||
applet->wireless_connecting_icons[3] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting03", icon_size, 0, NULL);
|
applet->wireless_100_icon = gtk_icon_theme_load_icon (icon_theme, "nm-signal-100", norm_icon_size, 0, NULL);
|
||||||
applet->wireless_scanning_icons[0] = gtk_icon_theme_load_icon (icon_theme, "nm-detect00", icon_size, 0, NULL);
|
applet->wireless_connecting_icons[0] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting01", con_icon_size, 0, NULL);
|
||||||
applet->wireless_scanning_icons[1] = gtk_icon_theme_load_icon (icon_theme, "nm-detect01", icon_size, 0, NULL);
|
applet->wireless_connecting_icons[1] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting02", con_icon_size, 0, NULL);
|
||||||
applet->wireless_scanning_icons[2] = gtk_icon_theme_load_icon (icon_theme, "nm-detect02", icon_size, 0, NULL);
|
applet->wireless_connecting_icons[2] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting03", con_icon_size, 0, NULL);
|
||||||
applet->wireless_scanning_icons[3] = gtk_icon_theme_load_icon (icon_theme, "nm-detect03", icon_size, 0, NULL);
|
applet->wireless_connecting_icons[3] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting04", con_icon_size, 0, NULL);
|
||||||
applet->wireless_scanning_icons[4] = gtk_icon_theme_load_icon (icon_theme, "nm-detect04", icon_size, 0, NULL);
|
applet->wireless_connecting_icons[4] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting05", con_icon_size, 0, NULL);
|
||||||
applet->wireless_scanning_icons[5] = gtk_icon_theme_load_icon (icon_theme, "nm-detect05", icon_size, 0, NULL);
|
applet->wireless_connecting_icons[5] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting06", con_icon_size, 0, NULL);
|
||||||
applet->wireless_scanning_icons[6] = gtk_icon_theme_load_icon (icon_theme, "nm-detect06", icon_size, 0, NULL);
|
applet->wireless_connecting_icons[6] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting07", con_icon_size, 0, NULL);
|
||||||
applet->wireless_scanning_icons[7] = gtk_icon_theme_load_icon (icon_theme, "nm-detect07", icon_size, 0, NULL);
|
applet->wireless_connecting_icons[7] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting08", con_icon_size, 0, NULL);
|
||||||
|
applet->wireless_connecting_icons[8] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting09", con_icon_size, 0, NULL);
|
||||||
|
applet->wireless_connecting_icons[9] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting10", con_icon_size, 0, NULL);
|
||||||
|
applet->wireless_connecting_icons[10] = gtk_icon_theme_load_icon (icon_theme, "nm-connecting11", con_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[0] = gtk_icon_theme_load_icon (icon_theme, "nm-detect01", norm_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[1] = gtk_icon_theme_load_icon (icon_theme, "nm-detect02", norm_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[2] = gtk_icon_theme_load_icon (icon_theme, "nm-detect03", norm_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[3] = gtk_icon_theme_load_icon (icon_theme, "nm-detect04", norm_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[4] = gtk_icon_theme_load_icon (icon_theme, "nm-detect05", norm_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[5] = gtk_icon_theme_load_icon (icon_theme, "nm-detect06", norm_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[6] = gtk_icon_theme_load_icon (icon_theme, "nm-detect07", norm_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[7] = gtk_icon_theme_load_icon (icon_theme, "nm-detect08", norm_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[8] = gtk_icon_theme_load_icon (icon_theme, "nm-detect09", norm_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[9] = gtk_icon_theme_load_icon (icon_theme, "nm-detect10", norm_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[10] = gtk_icon_theme_load_icon (icon_theme, "nm-detect11", norm_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[11] = gtk_icon_theme_load_icon (icon_theme, "nm-detect12", norm_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[12] = gtk_icon_theme_load_icon (icon_theme, "nm-detect13", norm_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[13] = gtk_icon_theme_load_icon (icon_theme, "nm-detect14", norm_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[14] = gtk_icon_theme_load_icon (icon_theme, "nm-detect15", norm_icon_size, 0, NULL);
|
||||||
|
applet->wireless_scanning_icons[15] = gtk_icon_theme_load_icon (icon_theme, "nm-detect16", norm_icon_size, 0, NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
|
@@ -111,7 +111,6 @@ typedef struct
|
|||||||
/* Data model elements */
|
/* Data model elements */
|
||||||
GMutex *data_mutex;
|
GMutex *data_mutex;
|
||||||
AppletState applet_state;
|
AppletState applet_state;
|
||||||
gboolean forcing_device;
|
|
||||||
gboolean is_adhoc;
|
gboolean is_adhoc;
|
||||||
GSList *device_list;
|
GSList *device_list;
|
||||||
NetworkDevice *active_device;
|
NetworkDevice *active_device;
|
||||||
@@ -121,16 +120,16 @@ typedef struct
|
|||||||
GdkPixbuf *no_nm_icon;
|
GdkPixbuf *no_nm_icon;
|
||||||
GdkPixbuf *wired_icon;
|
GdkPixbuf *wired_icon;
|
||||||
GdkPixbuf *adhoc_icon;
|
GdkPixbuf *adhoc_icon;
|
||||||
#define NUM_WIRED_CONNECTING_FRAMES 4
|
#define NUM_WIRED_CONNECTING_FRAMES 11
|
||||||
GdkPixbuf *wired_connecting_icons[NUM_WIRED_CONNECTING_FRAMES];
|
GdkPixbuf *wired_connecting_icons[NUM_WIRED_CONNECTING_FRAMES];
|
||||||
GdkPixbuf *wireless_00_icon;
|
GdkPixbuf *wireless_00_icon;
|
||||||
GdkPixbuf *wireless_25_icon;
|
GdkPixbuf *wireless_25_icon;
|
||||||
GdkPixbuf *wireless_50_icon;
|
GdkPixbuf *wireless_50_icon;
|
||||||
GdkPixbuf *wireless_75_icon;
|
GdkPixbuf *wireless_75_icon;
|
||||||
GdkPixbuf *wireless_100_icon;
|
GdkPixbuf *wireless_100_icon;
|
||||||
#define NUM_WIRELESS_CONNECTING_FRAMES 4
|
#define NUM_WIRELESS_CONNECTING_FRAMES 11
|
||||||
GdkPixbuf *wireless_connecting_icons[NUM_WIRELESS_CONNECTING_FRAMES];
|
GdkPixbuf *wireless_connecting_icons[NUM_WIRELESS_CONNECTING_FRAMES];
|
||||||
#define NUM_WIRELESS_SCANNING_FRAMES 8
|
#define NUM_WIRELESS_SCANNING_FRAMES 16
|
||||||
GdkPixbuf *wireless_scanning_icons[NUM_WIRELESS_SCANNING_FRAMES];
|
GdkPixbuf *wireless_scanning_icons[NUM_WIRELESS_SCANNING_FRAMES];
|
||||||
|
|
||||||
/* Animation stuff */
|
/* Animation stuff */
|
||||||
|
@@ -1068,11 +1068,9 @@ static DBusHandlerResult nmwa_dbus_filter (DBusConnection *connection, DBusMessa
|
|||||||
}
|
}
|
||||||
else if ( dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNowActive")
|
else if ( dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNowActive")
|
||||||
|| dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNoLongerActive")
|
|| dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceNoLongerActive")
|
||||||
|| dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceActivating"))
|
|| dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceActivating")
|
||||||
{
|
|| dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DeviceStatusChanged")
|
||||||
nmwa_dbus_update_devices (applet);
|
|| dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DevicesChanged"))
|
||||||
}
|
|
||||||
else if (dbus_message_is_signal (message, NM_DBUS_INTERFACE, "DevicesChanged"))
|
|
||||||
{
|
{
|
||||||
nmwa_dbus_update_devices (applet);
|
nmwa_dbus_update_devices (applet);
|
||||||
}
|
}
|
||||||
|
@@ -384,8 +384,6 @@ void nmwa_other_network_dialog_run (NMWirelessApplet *applet, gboolean create_ne
|
|||||||
nm_key_type = NM_ENC_TYPE_UNKNOWN;
|
nm_key_type = NM_ENC_TYPE_UNKNOWN;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
applet->applet_state = APPLET_STATE_WIRELESS_CONNECTING;
|
|
||||||
applet->forcing_device = TRUE;
|
|
||||||
if (create_network)
|
if (create_network)
|
||||||
nmwa_dbus_create_network (applet->connection, def_dev, net, nm_key_type, passphrase);
|
nmwa_dbus_create_network (applet->connection, def_dev, net, nm_key_type, passphrase);
|
||||||
else
|
else
|
||||||
|
@@ -5,15 +5,21 @@ largeicon_DATA=\
|
|||||||
nm-device-wireless.png
|
nm-device-wireless.png
|
||||||
|
|
||||||
|
|
||||||
smallicondir=${datadir}/icons/hicolor/22x22/apps
|
smallicondir=${datadir}/icons/hicolor/24x24/apps
|
||||||
smallicon_DATA= \
|
smallicon_DATA= \
|
||||||
nm-device-wired.png \
|
nm-device-wired.png \
|
||||||
nm-adhoc.png \
|
nm-adhoc.png \
|
||||||
nm-connecting00.png \
|
|
||||||
nm-connecting01.png \
|
nm-connecting01.png \
|
||||||
nm-connecting02.png \
|
nm-connecting02.png \
|
||||||
nm-connecting03.png \
|
nm-connecting03.png \
|
||||||
nm-detect00.png \
|
nm-connecting04.png \
|
||||||
|
nm-connecting05.png \
|
||||||
|
nm-connecting06.png \
|
||||||
|
nm-connecting07.png \
|
||||||
|
nm-connecting08.png \
|
||||||
|
nm-connecting09.png \
|
||||||
|
nm-connecting10.png \
|
||||||
|
nm-connecting11.png \
|
||||||
nm-detect01.png \
|
nm-detect01.png \
|
||||||
nm-detect02.png \
|
nm-detect02.png \
|
||||||
nm-detect03.png \
|
nm-detect03.png \
|
||||||
@@ -21,6 +27,15 @@ smallicon_DATA=\
|
|||||||
nm-detect05.png \
|
nm-detect05.png \
|
||||||
nm-detect06.png \
|
nm-detect06.png \
|
||||||
nm-detect07.png \
|
nm-detect07.png \
|
||||||
|
nm-detect08.png \
|
||||||
|
nm-detect09.png \
|
||||||
|
nm-detect10.png \
|
||||||
|
nm-detect11.png \
|
||||||
|
nm-detect12.png \
|
||||||
|
nm-detect13.png \
|
||||||
|
nm-detect14.png \
|
||||||
|
nm-detect15.png \
|
||||||
|
nm-detect16.png \
|
||||||
nm-signal-00.png \
|
nm-signal-00.png \
|
||||||
nm-signal-25.png \
|
nm-signal-25.png \
|
||||||
nm-signal-50.png \
|
nm-signal-50.png \
|
||||||
|
Before Width: | Height: | Size: 895 B |
Before Width: | Height: | Size: 956 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 976 B After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 959 B After Width: | Height: | Size: 1.2 KiB |
BIN
panel-applet/icons/nm-connecting04.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
panel-applet/icons/nm-connecting05.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
panel-applet/icons/nm-connecting06.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
panel-applet/icons/nm-connecting07.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
panel-applet/icons/nm-connecting08.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
panel-applet/icons/nm-connecting09.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
BIN
panel-applet/icons/nm-connecting10.png
Normal file
After Width: | Height: | Size: 1.3 KiB |
BIN
panel-applet/icons/nm-connecting11.png
Normal file
After Width: | Height: | Size: 1.2 KiB |
Before Width: | Height: | Size: 550 B |
Before Width: | Height: | Size: 643 B After Width: | Height: | Size: 658 B |
Before Width: | Height: | Size: 557 B After Width: | Height: | Size: 743 B |
Before Width: | Height: | Size: 699 B After Width: | Height: | Size: 760 B |
Before Width: | Height: | Size: 575 B After Width: | Height: | Size: 746 B |
Before Width: | Height: | Size: 735 B After Width: | Height: | Size: 627 B |
Before Width: | Height: | Size: 538 B After Width: | Height: | Size: 800 B |
Before Width: | Height: | Size: 664 B After Width: | Height: | Size: 751 B |
BIN
panel-applet/icons/nm-detect08.png
Normal file
After Width: | Height: | Size: 802 B |
BIN
panel-applet/icons/nm-detect09.png
Normal file
After Width: | Height: | Size: 780 B |
BIN
panel-applet/icons/nm-detect10.png
Normal file
After Width: | Height: | Size: 827 B |
BIN
panel-applet/icons/nm-detect11.png
Normal file
After Width: | Height: | Size: 774 B |
BIN
panel-applet/icons/nm-detect12.png
Normal file
After Width: | Height: | Size: 812 B |
BIN
panel-applet/icons/nm-detect13.png
Normal file
After Width: | Height: | Size: 806 B |
BIN
panel-applet/icons/nm-detect14.png
Normal file
After Width: | Height: | Size: 794 B |
BIN
panel-applet/icons/nm-detect15.png
Normal file
After Width: | Height: | Size: 923 B |
BIN
panel-applet/icons/nm-detect16.png
Normal file
After Width: | Height: | Size: 787 B |