diff options
author | Christopher Aillon <caillon@redhat.com> | 2005-11-02 06:40:10 +0000 |
---|---|---|
committer | Chris Aillon <caillon@redhat.com> | 2005-11-02 06:40:10 +0000 |
commit | 5db5b5a80bdfd09ffac68ce7a61d648c2d64e6ec (patch) | |
tree | 2d648ccf63f74d8b2fb5dff8152ef72600c36509 | |
parent | d52b45a03a186feafd5535bfffa95710bd20ba71 (diff) | |
download | NetworkManager-5db5b5a80bdfd09ffac68ce7a61d648c2d64e6ec.tar.gz |
2005-11-02 Christopher Aillon <caillon@redhat.com>
* gnome/applet/applet.c:
* gnome/applet/applet.h:
Partial backout of Dan's timeout animation patch.
Timeout IDs cannot legally be 0, so revert the code in place to handle
a timeout ID of 0 to denote the timeout isn't running.
git-svn-id: http://svn-archive.gnome.org/svn/NetworkManager/trunk@1089 4912f4e0-d625-0410-9fb7-b9a5a253dbdc
-rw-r--r-- | ChangeLog | 8 | ||||
-rw-r--r-- | gnome/applet/applet.c | 18 | ||||
-rw-r--r-- | gnome/applet/applet.h | 1 |
3 files changed, 15 insertions, 12 deletions
@@ -1,5 +1,13 @@ 2005-11-02 Christopher Aillon <caillon@redhat.com> + * gnome/applet/applet.c: + * gnome/applet/applet.h: + Partial backout of Dan's timeout animation patch. + Timeout IDs cannot legally be 0, so revert the code in place to handle + a timeout ID of 0 to denote the timeout isn't running. + +2005-11-02 Christopher Aillon <caillon@redhat.com> + * src/NetworkManagerPolicy.c: (nm_policy_device_change_check) Clarify wireless switch nm_info text diff --git a/gnome/applet/applet.c b/gnome/applet/applet.c index 933cdac092..a67c74fc29 100644 --- a/gnome/applet/applet.c +++ b/gnome/applet/applet.c @@ -126,7 +126,7 @@ NetworkDevice * nmwa_get_first_active_device (GSList *dev_list) static void nmwa_init (NMWirelessApplet *applet) { - applet->animation_active = FALSE; + applet->animation_id = 0; applet->animation_step = 0; glade_gnome_init (); @@ -1016,7 +1016,7 @@ static gboolean animation_timeout (NMWirelessApplet *applet) if (!applet->nm_running) { applet->animation_step = 0; - applet->animation_active = FALSE; + applet->animation_id = 0; return FALSE; } @@ -1024,7 +1024,7 @@ static gboolean animation_timeout (NMWirelessApplet *applet) if (!act_dev) { applet->animation_step = 0; - applet->animation_active = FALSE; + applet->animation_id = 0; return FALSE; } @@ -1054,7 +1054,6 @@ static gboolean animation_timeout (NMWirelessApplet *applet) else { applet->animation_step = 0; - applet->animation_active = FALSE; nmwa_update_state (applet); return FALSE; } @@ -1166,17 +1165,14 @@ done: g_free (tip); applet->animation_step = 0; - if (need_animation && !applet->animation_active) - { + if (need_animation && applet->animation_id == 0) applet->animation_id = g_timeout_add (100, (GSourceFunc) animation_timeout, applet); - applet->animation_active = TRUE; - } else if (!need_animation) { - if (applet->animation_active) + if (applet->animation_id) { g_source_remove (applet->animation_id); - applet->animation_active = FALSE; + applet->animation_id = 0; } if (pixbuf) @@ -1201,7 +1197,7 @@ done: */ static int nmwa_redraw_timeout (NMWirelessApplet *applet) { - if (!applet->animation_active) + if (!applet->animation_id) nmwa_update_state (applet); return TRUE; diff --git a/gnome/applet/applet.h b/gnome/applet/applet.h index a52c815411..c397de1fd1 100644 --- a/gnome/applet/applet.h +++ b/gnome/applet/applet.h @@ -108,7 +108,6 @@ typedef struct /* Animation stuff */ int animation_step; - gboolean animation_active; guint animation_id; /* Direct UI elements */ |