| 132 pidgin_docklet_clicked(button); |
132 pidgin_docklet_clicked(button); |
| 133 #endif |
133 #endif |
| 134 } |
134 } |
| 135 |
135 |
| 136 static void |
136 static void |
| 137 docklet_gtk_status_update_icon(PurpleStatusPrimitive status, gboolean connecting, gboolean pending, gboolean blinked) |
137 docklet_gtk_status_update_icon(PurpleStatusPrimitive status, gboolean connecting, gboolean pending) |
| 138 { |
138 { |
| 139 const gchar *icon_name = NULL; |
139 const gchar *icon_name = NULL; |
| |
140 const gchar *current_icon_name = gtk_status_icon_get_icon_name(docklet); |
| 140 |
141 |
| 141 switch (status) { |
142 switch (status) { |
| 142 case PURPLE_STATUS_OFFLINE: |
143 case PURPLE_STATUS_OFFLINE: |
| 143 icon_name = PIDGIN_STOCK_TRAY_OFFLINE; |
144 icon_name = PIDGIN_STOCK_TRAY_OFFLINE; |
| 144 break; |
145 break; |
| 157 default: |
158 default: |
| 158 icon_name = PIDGIN_STOCK_TRAY_AVAILABLE; |
159 icon_name = PIDGIN_STOCK_TRAY_AVAILABLE; |
| 159 break; |
160 break; |
| 160 } |
161 } |
| 161 |
162 |
| 162 if (connecting) { |
163 if (connecting && strcmp(current_icon_name, PIDGIN_STOCK_TRAY_CONNECT) != 0) { |
| 163 icon_name = PIDGIN_STOCK_TRAY_CONNECT; |
164 icon_name = PIDGIN_STOCK_TRAY_CONNECT; |
| 164 } |
165 } |
| 165 |
166 |
| 166 if (!blinked && pending) { |
167 if (pending && strcmp(current_icon_name, PIDGIN_STOCK_TRAY_PENDING) != 0) { |
| 167 icon_name = PIDGIN_STOCK_TRAY_PENDING; |
168 icon_name = PIDGIN_STOCK_TRAY_PENDING; |
| 168 } |
169 } |
| 169 |
170 |
| 170 if (icon_name) { |
171 if (icon_name) { |
| 171 gtk_status_icon_set_from_icon_name(docklet, icon_name); |
172 gtk_status_icon_set_from_icon_name(docklet, icon_name); |