| 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) |
137 docklet_gtk_status_update_icon(PurpleStatusPrimitive status, gboolean connecting, gboolean pending, gboolean blinked) |
| 138 { |
138 { |
| 139 const gchar *icon_name = NULL; |
139 const gchar *icon_name = NULL; |
| 140 |
140 |
| 141 switch (status) { |
141 switch (status) { |
| 142 case PURPLE_STATUS_OFFLINE: |
142 case PURPLE_STATUS_OFFLINE: |
| 157 default: |
157 default: |
| 158 icon_name = PIDGIN_STOCK_TRAY_AVAILABLE; |
158 icon_name = PIDGIN_STOCK_TRAY_AVAILABLE; |
| 159 break; |
159 break; |
| 160 } |
160 } |
| 161 |
161 |
| 162 if (pending) |
162 if (connecting) { |
| |
163 icon_name = PIDGIN_STOCK_TRAY_CONNECT; |
| |
164 } |
| |
165 |
| |
166 if (!blinked && pending) { |
| 163 icon_name = PIDGIN_STOCK_TRAY_PENDING; |
167 icon_name = PIDGIN_STOCK_TRAY_PENDING; |
| 164 if (connecting) |
168 } |
| 165 icon_name = PIDGIN_STOCK_TRAY_CONNECT; |
|
| 166 |
169 |
| 167 if (icon_name) { |
170 if (icon_name) { |
| 168 gtk_status_icon_set_from_icon_name(docklet, icon_name); |
171 gtk_status_icon_set_from_icon_name(docklet, icon_name); |
| 169 } |
|
| 170 |
|
| 171 if (purple_prefs_get_bool(PIDGIN_PREFS_ROOT "/docklet/blink")) { |
|
| 172 gtk_status_icon_set_blinking(docklet, (pending && !connecting)); |
|
| 173 } else if (gtk_status_icon_get_blinking(docklet)) { |
|
| 174 gtk_status_icon_set_blinking(docklet, FALSE); |
|
| 175 } |
172 } |
| 176 } |
173 } |
| 177 |
174 |
| 178 static void |
175 static void |
| 179 docklet_gtk_status_set_tooltip(gchar *tooltip) |
176 docklet_gtk_status_set_tooltip(gchar *tooltip) |