Changeset 2167 for trunk/jons-gtk-gui
- Timestamp:
- 07/20/00 16:27:56 (8 years ago)
- Location:
- trunk/jons-gtk-gui/src
- Files:
-
- 5 modified
-
contact_list.cpp (modified) (3 diffs)
-
convo.cpp (modified) (2 diffs)
-
extras.cpp (modified) (2 diffs)
-
licq_gtk.h (modified) (3 diffs)
-
main_window.cpp (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jons-gtk-gui/src/contact_list.cpp
r2140 r2167 32 32 struct status_icon *online, *offline, *away, *na, *dnd, *occ, *ffc, 33 33 *invisible, *message_icon, *file_icon, *chat_icon, *url_icon, 34 *secure_icon, *birthday_icon, *securebday_icon; 34 *secure_icon, *birthday_icon, *securebday_icon, *blank_icon; 35 gboolean bFlashOn = false; 36 gint nToFlash = -1; 35 37 36 38 list<unsigned long> AutoSecureList; 39 list<SFlash *> FlashList; 37 40 38 41 GtkWidget *contact_list_new(gint height, gint width) … … 65 68 } 66 69 70 gint flash_icons(gpointer data) 71 { 72 if(nToFlash < 0) 73 return -1; 74 75 list<SFlash *>::iterator it; 76 for(it = FlashList.begin(); it != FlashList.end(); it++) 77 { 78 if(!(*it)->bFlashOn) 79 { 80 (*it)->bFlashOn = true; 81 gtk_clist_set_pixmap(GTK_CLIST(contact_list), 82 (*it)->nRow, 1, blank_icon->pm, 83 blank_icon->bm); 84 } 85 else 86 { 87 (*it)->bFlashOn = false; 88 gtk_clist_set_pixmap(GTK_CLIST(contact_list), 89 (*it)->nRow, 1, (*it)->icon->pm, 90 (*it)->icon->bm); 91 } 92 } 93 94 return -1; 95 } 96 67 97 void contact_list_refresh() 68 98 { 69 99 gchar *blah[3]; 70 100 gint num_users = 0; 101 nToFlash = -1; 71 102 72 103 /* Don't update the clist window, so we can update all the users */ … … 136 167 gtk_clist_set_text(GTK_CLIST(contact_list), num_users, 137 168 0, "!"); 169 170 /* nToFlash++; 171 list<SFlash *>::iterator it; 172 for(it = FlashList.begin(); it != FlashList.end(); it++) 173 { 174 if((*it)->nUin != pUser->Uin()) 175 (*it)->nRow++; 176 } 177 */ 178 struct SFlash *flash = g_new0(struct SFlash, 1); 179 flash->nRow = ++nToFlash; 180 flash->icon = icon; 181 flash->bFlashOn = false; 182 flash->nUin = pUser->Uin(); 183 184 FlashList.push_back(flash); 185 138 186 } 139 187 -
trunk/jons-gtk-gui/src/convo.cpp
r2128 r2167 217 217 218 218 gtk_widget_show_all(c->window); 219 220 // Stop the flashing if necessary 221 if(c->user->NewMessages() > 0) 222 { 223 // Stop the flashing for this user 224 nToFlash--; 225 list<SFlash *>::iterator it; 226 int x = 0; 227 for(it = FlashList.begin(); it != FlashList.end(); it++) 228 { 229 x++; 230 if((*it)->nUin == c->user->Uin()) 231 { 232 g_free(*it); 233 FlashList.erase(it); 234 break; 235 } 236 } 237 238 for(it = FlashList.begin(); it != FlashList.end(); it++) 239 { 240 x--; 241 if(x <= 0) 242 (*it)->nRow--; 243 } 244 } 219 245 } 220 246 … … 350 376 { 351 377 system_status_refresh(); 352 return; 378 return; 353 379 } 354 380 -
trunk/jons-gtk-gui/src/extras.cpp
r2159 r2167 36 36 #include "pixmaps/birthday.xpm" 37 37 #include "pixmaps/securebday.xpm" 38 #include "pixmaps/blank.xpm" 38 39 39 40 #include "licq_countrycodes.h" … … 79 80 birthday_icon = make_pixmap(birthday_icon, (gchar **)birthday_xpm); 80 81 securebday_icon = make_pixmap(securebday_icon, (gchar **)securebday_xpm); 82 blank_icon = make_pixmap(blank_icon, (gchar **)blank_xpm); 81 83 } 82 84 -
trunk/jons-gtk-gui/src/licq_gtk.h
r2159 r2167 389 389 }; 390 390 391 struct SFlash 392 { 393 struct status_icon *icon; 394 gulong nUin; 395 gint nRow; 396 gboolean bFlashOn; 397 }; 398 391 399 /******************* Global Variables ******************/ 392 400 … … 398 406 extern struct status_icon *online, *away, *na, *dnd, *occ, *offline, *ffc, 399 407 *invisible, *message_icon, *file_icon, *chat_icon, *url_icon, 400 *secure_icon, *birthday_icon, *securebday_icon; 408 *secure_icon, *birthday_icon, *securebday_icon, *blank_icon; 409 extern int nToFlash; 410 extern list<SFlash *> FlashList; 401 411 402 412 /* Globals in chat_window.cpp */ … … 508 518 extern void contact_list_click(GtkWidget *, GdkEventButton *, gpointer); 509 519 extern void add_to_popup(const gchar *, GtkWidget *, GtkSignalFunc, ICQUser *); 520 extern gint flash_icons(gpointer); 510 521 511 522 -
trunk/jons-gtk-gui/src/main_window.cpp
r2157 r2167 27 27 GtkWidget *contact_list; 28 28 29 gint flash_icons(gpointer); 30 29 31 void main_window_delete_event(GtkWidget *mainwindow, gpointer data) 30 32 { … … 36 38 gint width) 37 39 { 40 gtk_timeout_add(1000, flash_icons, NULL); 41 38 42 /* Here's a good place to start the option defaults */ 39 43 const char *filename = g_strdup_printf("%s/licq_jons-gtk-gui.conf",
