Changeset 2168 for trunk/jons-gtk-gui
- Timestamp:
- 07/21/00 10:37:20 (8 years ago)
- Location:
- trunk/jons-gtk-gui/src
- Files:
-
- 4 modified
-
contact_list.cpp (modified) (2 diffs)
-
convo.cpp (modified) (2 diffs)
-
licq_gtk.h (modified) (2 diffs)
-
option_window.cpp (modified) (9 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/jons-gtk-gui/src/contact_list.cpp
r2167 r2168 70 70 gint flash_icons(gpointer data) 71 71 { 72 if(nToFlash < 0) 72 // If we aren't supposed to flash or there are no things to flash 73 if(!flash_events || (nToFlash < 0)) 73 74 return -1; 74 75 75 76 list<SFlash *>::iterator it; 76 77 for(it = FlashList.begin(); it != FlashList.end(); it++) … … 168 169 0, "!"); 169 170 170 /* nToFlash++; 171 list<SFlash *>::iterator it; 172 for(it = FlashList.begin(); it != FlashList.end(); it++) 171 if(flash_events) 173 172 { 174 if((*it)->nUin != pUser->Uin()) 175 (*it)->nRow++; 173 struct SFlash *flash = g_new0(struct SFlash, 1); 174 flash->nRow = ++nToFlash; 175 flash->icon = icon; 176 flash->bFlashOn = false; 177 flash->nUin = pUser->Uin(); 178 179 FlashList.push_back(flash); 176 180 } 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 181 186 182 } -
trunk/jons-gtk-gui/src/convo.cpp
r2167 r2168 219 219 220 220 // Stop the flashing if necessary 221 if( c->user->NewMessages() > 0)221 if((c->user->NewMessages() > 0) && flash_events) 222 222 { 223 223 // Stop the flashing for this user … … 243 243 } 244 244 } 245 246 // Clear the flash list 247 else if((c->user->NewMessages() > 0) && !flash_events) 248 { 249 nToFlash = -1; 250 FlashList.clear(); 251 } 245 252 } 246 253 -
trunk/jons-gtk-gui/src/licq_gtk.h
r2167 r2168 307 307 GtkWidget *show_offline; 308 308 GtkWidget *enter_sends; 309 GtkWidget *flash_events; 309 310 }; 310 311 … … 444 445 extern bool show_ignored_users; 445 446 extern bool enter_sends; 447 extern bool flash_events; 446 448 447 449 /* Globals in random_chat.cpp */ -
trunk/jons-gtk-gui/src/option_window.cpp
r2128 r2168 29 29 bool show_ignored_users; 30 30 bool enter_sends; 31 bool flash_events; 31 32 32 33 /* The "Options" selection under the menu in the main window */ … … 75 76 GTK_FILL, 3, 3); 76 77 78 // Flash events 79 ow->flash_events = gtk_check_button_new_with_label("Flash events"); 80 gtk_table_attach(GTK_TABLE(table), ow->flash_events, 1, 2, 1, 2, 81 GtkAttachOptions(GTK_FILL | GTK_EXPAND), GTK_FILL, 3, 3); 82 77 83 /* Set the check buttons */ 78 84 set_options(ow); … … 129 135 GTK_FILL, GTK_FILL, 3, 3); 130 136 137 // Away color label 138 label = gtk_label_new("Away Color"); 139 gtk_table_attach(GTK_TABLE(clr_table), label, 0, 1, 2, 3, 140 GTK_FILL, GTK_FILL, 3, 3); 141 142 // Offline color browse button 143 int *chg_away_color = new int; 144 *chg_away_color = 3; 145 146 GtkWidget *away_browse = gtk_button_new_with_label("Browse"); 147 gtk_signal_connect(GTK_OBJECT(away_browse), "clicked", 148 GTK_SIGNAL_FUNC(show_on_color_dlg), (gpointer)chg_away_color); 149 gtk_table_attach(GTK_TABLE(clr_table), away_browse, 2, 3, 2, 3, 150 GTK_FILL, GTK_FILL, 3, 3); 151 131 152 label = gtk_label_new("Contact List"); 132 153 gtk_notebook_append_page(GTK_NOTEBOOK(notebook), table, label); … … 149 170 { 150 171 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ow->show_ignored), 151 show_ignored_users);172 show_ignored_users); 152 173 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ow->show_offline), 153 show_offline_users);174 show_offline_users); 154 175 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ow->enter_sends), 155 enter_sends); 176 enter_sends); 177 gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(ow->flash_events), 178 flash_events); 156 179 } 157 180 … … 167 190 GTK_TOGGLE_BUTTON(ow->show_ignored)); 168 191 enter_sends = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(ow->enter_sends)); 192 flash_events = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON( 193 ow->flash_events)); 169 194 170 195 gtk_widget_destroy(ow->window); … … 196 221 licqConf.WriteBool("ShowIgnoredUsres", show_ignored_users); 197 222 licqConf.WriteBool("EnterSends", enter_sends); 223 licqConf.WriteBool("FlashEvents", flash_events); 198 224 199 225 licqConf.FlushFile(); … … 240 266 licqConf.ReadBool("ShowIgnoredUsers", show_ignored_users, false); 241 267 licqConf.ReadBool("EnterSends", enter_sends, true); 268 licqConf.ReadBool("FlashEvents", flash_events, true); 242 269 } 243 270 … … 260 287 color[2] = (gdouble)offline_color->blue / 65535; 261 288 color[3] = (gdouble)offline_color->pixel / 65535; 289 break; 290 case 3: 291 color[0] = (gdouble)away_color->red / 65535; 292 color[1] = (gdouble)away_color->green / 65535; 293 color[2] = (gdouble)away_color->blue / 65535; 294 color[3] = (gdouble)away_color->pixel / 65535; 262 295 break; 263 296 } … … 317 350 offline_color->pixel = (gulong)new_color[3]; 318 351 break; 352 case 3: 353 away_color->red = (guint16)(new_color[0] * 65535.0); 354 away_color->green = (guint16)(new_color[1] * 65535.0); 355 away_color->blue = (guint16)(new_color[2] * 65535.0); 356 away_color->pixel = (gulong)new_color[3]; 357 break; 319 358 } 320 359
