Changeset 3256


Ignore:
Timestamp:
10/23/07 12:34:59 (6 years ago)
Author:
mickey
Message:

openmoko-panel-gsm: update the panel icon once we receive a connection event

Location:
trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/ChangeLog

    r3185 r3256  
     12007-10-23      Michael Lauer <mickey@openmoko.org> 
     2 
     3        * src/openmoko-panel-gsm.c: (gsm_applet_network_registration_cb): 
     4        Update the icon as well, once we receive a connection event. 
     5 
    162007-10-16  Daniel Willmann <alphaone@openmoko.org> 
    27 
  • trunk/src/target/OM-2007.2/panel-plugins/openmoko-panel-gsm/src/openmoko-panel-gsm.c

    r3185 r3256  
    3333    MokoGsmdConnection* gsm; 
    3434} GsmApplet; 
     35 
     36static GsmApplet* theApplet = NULL; 
    3537 
    3638static void 
     
    7375    moko_panel_applet_set_icon( applet->mokoapplet, image ); 
    7476 
    75     g_free (image); 
     77    g_free( image ); 
    7678} 
    7779 
     
    8284                                  int cell) 
    8385{ 
    84   NotifyNotification* nn; 
    85   static MokoGsmdConnectionNetregType prev_type = MOKO_GSMD_CONNECTION_NETREG_NONE; 
     86    NotifyNotification* nn; 
     87    static MokoGsmdConnectionNetregType prev_type = MOKO_GSMD_CONNECTION_NETREG_NONE; 
    8688 
    87   if ((type == MOKO_GSMD_CONNECTION_NETREG_HOME) || (type == MOKO_GSMD_CONNECTION_NETREG_ROAMING) && 
    88       ((prev_type != MOKO_GSMD_CONNECTION_NETREG_HOME)&&(prev_type != MOKO_GSMD_CONNECTION_NETREG_ROAMING))) 
    89   { 
    90     nn = notify_notification_new ("Connected to Network", NULL, NULL, NULL); 
    91     notify_notification_show (nn, NULL); 
    92   } 
    93   prev_type = type; 
     89    if ( (type == MOKO_GSMD_CONNECTION_NETREG_HOME) || (type == MOKO_GSMD_CONNECTION_NETREG_ROAMING) && 
     90       ( (prev_type != MOKO_GSMD_CONNECTION_NETREG_HOME) && (prev_type != MOKO_GSMD_CONNECTION_NETREG_ROAMING) ) ) 
     91    { 
     92        gsm_applet_update_signal_strength( self, 0, theApplet ); 
     93        nn = notify_notification_new ("Connected to GSM Network", NULL, NULL, NULL); 
     94        notify_notification_show (nn, NULL); 
     95    } 
     96    prev_type = type; 
    9497} 
    9598 
     
    119122{ 
    120123    GsmApplet* applet = g_slice_new(GsmApplet); 
     124    theApplet = applet; // nasty global variable 
    121125    MokoPanelApplet* mokoapplet = applet->mokoapplet = MOKO_PANEL_APPLET(moko_panel_applet_new()); 
    122126 
Note: See TracChangeset for help on using the changeset viewer.