On Thu, 2011-06-16 at 09:02 +0100, Andrew Bird wrote: > The current UI requires the user to mouse-over and reveal a tool > tip (or click an indicator) to discover the registration state > (aka polling). If the user inadvertently re-registers on a > roaming network, the operation is silent until the user decides > to check the applet for network status, possibly incurring > expensive roaming tariffs in the mean time. > > So to prevent silent registration changes, alert the user with a > notification when the CDMA registration status changes to home or > to roaming.
For the record this did get applied, thanks! Dan > Signed-off-by: Andrew Bird <[email protected]> > --- > src/applet-device-cdma.c | 34 ++++++++++++++++++++++++++++++---- > 1 files changed, 30 insertions(+), 4 deletions(-) > > diff --git a/src/applet-device-cdma.c b/src/applet-device-cdma.c > index 7b0bf85..77fbc3d 100644 > --- a/src/applet-device-cdma.c > +++ b/src/applet-device-cdma.c > @@ -638,6 +638,26 @@ cdma_device_info_free (gpointer data) > } > > static void > +notify_user_of_cdma_reg_change (CdmaDeviceInfo *info) > +{ > + guint32 mb_state = cdma_state_to_mb_state (info); > + > + if (mb_state == MB_STATE_HOME) { > + applet_do_notify_with_pref (info->applet, > + _("CDMA network."), > + _("You are now registered on the > home network."), > + "nm-signal-100", > + > PREF_DISABLE_CONNECTED_NOTIFICATIONS); > + } else if (mb_state == MB_STATE_ROAMING) { > + applet_do_notify_with_pref (info->applet, > + _("CDMA network."), > + _("You are now registered on a > roaming network."), > + "nm-signal-100", > + > PREF_DISABLE_CONNECTED_NOTIFICATIONS); > + } > +} > + > +static void > reg_state_reply (DBusGProxy *proxy, DBusGProxyCall *call, gpointer user_data) > { > CdmaDeviceInfo *info = user_data; > @@ -648,8 +668,11 @@ reg_state_reply (DBusGProxy *proxy, DBusGProxyCall > *call, gpointer user_data) > G_TYPE_UINT, &cdma1x_state, > G_TYPE_UINT, &evdo_state, > G_TYPE_INVALID)) { > - info->cdma1x_state = cdma1x_state; > - info->evdo_state = evdo_state; > + if ((info->cdma1x_state != cdma1x_state) || (info->evdo_state > != evdo_state)) { > + info->cdma1x_state = cdma1x_state; > + info->evdo_state = evdo_state; > + notify_user_of_cdma_reg_change (info); > + } > applet_schedule_update_icon (info->applet); > } > > @@ -837,8 +860,11 @@ reg_state_changed_cb (DBusGProxy *proxy, > { > CdmaDeviceInfo *info = user_data; > > - info->cdma1x_state = cdma1x_state; > - info->evdo_state = evdo_state; > + if ((info->cdma1x_state != cdma1x_state) || (info->evdo_state != > evdo_state)) { > + info->cdma1x_state = cdma1x_state; > + info->evdo_state = evdo_state; > + notify_user_of_cdma_reg_change (info); > + } > info->skip_reg_poll = TRUE; > > applet_schedule_update_icon (info->applet); _______________________________________________ networkmanager-list mailing list [email protected] http://mail.gnome.org/mailman/listinfo/networkmanager-list
