| 147 | | /* Do we even want to be here? */ |
| 148 | | struct request_chat *rc = rc_find(user->Uin()); |
| 149 | | |
| 150 | | // No get outta here, bitch! |
| 151 | | if(rc != 0) |
| 152 | | return; |
| 153 | | |
| 154 | | rc = rc_new(user); |
| 155 | | |
| 156 | | GtkWidget *scroll; |
| 157 | | GtkWidget *statusbar; |
| 158 | | GtkWidget *multiparty; |
| 159 | | GtkWidget *single; |
| 160 | | GtkWidget *ok; |
| 161 | | GtkWidget *cancel; |
| 162 | | GtkWidget *table; |
| 163 | | GtkWidget *h_box; |
| 164 | | gchar *title = g_strdup_printf("Licq - Request Chat With %s", |
| 165 | | user->GetAlias()); |
| 166 | | |
| 167 | | /* Make the request_chat structure */ |
| 168 | | rc->etd = g_new0(struct e_tag_data, 1); |
| 169 | | |
| 170 | | rc->user = user; |
| 171 | | |
| 172 | | /* Create the table and hbox */ |
| 173 | | table = gtk_table_new(4, 2, FALSE); |
| 174 | | h_box = gtk_hbox_new(FALSE, 5); |
| 175 | | |
| 176 | | /* Create the window */ |
| 177 | | rc->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
| 178 | | gtk_window_set_title(GTK_WINDOW(rc->window), title); |
| 179 | | gtk_window_set_position(GTK_WINDOW(rc->window), GTK_WIN_POS_CENTER); |
| 180 | | gtk_container_add(GTK_CONTAINER(rc->window), table); |
| 181 | | g_signal_connect(G_OBJECT(rc->window), "destroy", |
| 182 | | G_CALLBACK(cancel_request_chat), (gpointer)rc); |
| 183 | | |
| 184 | | /*Create the scrolled window with text and attach it to the window */ |
| 185 | | scroll = gtk_scrolled_window_new(0, 0); |
| 186 | | gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), |
| 187 | | GTK_POLICY_NEVER, |
| 188 | | GTK_POLICY_AUTOMATIC); |
| 189 | | rc->text_box = gtk_text_view_new(); |
| 190 | | gtk_text_view_set_editable(GTK_TEXT_VIEW(rc->text_box), TRUE); |
| 191 | | gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(rc->text_box), GTK_WRAP_WORD); |
| 192 | | gtk_container_add(GTK_CONTAINER(scroll), rc->text_box); |
| 193 | | gtk_table_attach(GTK_TABLE(table), scroll, 0, 2, 0, 1, |
| 194 | | GtkAttachOptions(GTK_FILL | GTK_EXPAND), |
| 195 | | GtkAttachOptions(GTK_FILL | GTK_EXPAND), |
| 196 | | 3, 3); |
| 197 | | gtk_widget_show(scroll); |
| 198 | | |
| 199 | | /* The send as buttons */ |
| 200 | | rc->send_norm = gtk_radio_button_new_with_label(0, "Send Normal"); |
| 201 | | rc->send_urg = gtk_radio_button_new_with_label_from_widget( |
| 202 | | GTK_RADIO_BUTTON(rc->send_norm), "Send Urgent"); |
| 203 | | rc->send_list = gtk_radio_button_new_with_label_from_widget( |
| 204 | | GTK_RADIO_BUTTON(rc->send_norm), "Send To List"); |
| 205 | | |
| 206 | | /* Pack them to a box */ |
| 207 | | gtk_box_pack_start(GTK_BOX(h_box), rc->send_norm, FALSE, FALSE, 0); |
| 208 | | gtk_box_pack_start(GTK_BOX(h_box), rc->send_urg, FALSE, FALSE, 0); |
| 209 | | gtk_box_pack_start(GTK_BOX(h_box), rc->send_list, FALSE, FALSE, 0); |
| 210 | | |
| 211 | | /* Attach the box to the table */ |
| 212 | | gtk_table_attach(GTK_TABLE(table), h_box, 0, 2, 1, 2, |
| 213 | | GtkAttachOptions(GTK_FILL | GTK_EXPAND), |
| 214 | | GTK_FILL, 3, 3); |
| 215 | | |
| 216 | | /* Progress bar */ |
| 217 | | statusbar = gtk_statusbar_new(); |
| 218 | | gtk_table_attach(GTK_TABLE(table), statusbar, 0, 2, 2, 3, |
| 219 | | GtkAttachOptions(GTK_FILL | GTK_EXPAND), |
| 220 | | GTK_FILL, 3, 3); |
| 221 | | |
| 222 | | /* e_tag stuff */ |
| 223 | | rc->etd->statusbar = statusbar; |
| 224 | | strcpy(rc->etd->buf, ""); |
| 225 | | |
| 226 | | // Ok.. this is where the combo box for multi party chats goes |
| 227 | | // but it isn't shown until it's needed |
| 228 | | h_box = gtk_hbox_new(FALSE, 5); |
| 229 | | GtkWidget *label = gtk_label_new("Current Chats:"); |
| 230 | | rc->chat_list = gtk_combo_new(); |
| 231 | | gtk_box_pack_start(GTK_BOX(h_box), label, false, false, 0); |
| 232 | | gtk_box_pack_start(GTK_BOX(h_box), rc->chat_list, false, false, 0); |
| 233 | | gtk_table_attach(GTK_TABLE(table), h_box, 0, 2, 3, 4, |
| 234 | | GtkAttachOptions(GTK_FILL | GTK_EXPAND), |
| 235 | | GTK_FILL, 3, 3); |
| 236 | | |
| 237 | | /* The button box */ |
| 238 | | h_box = gtk_hbox_new(TRUE, 5); |
| 239 | | multiparty = gtk_button_new_with_mnemonic("_Multi-Party"); |
| 240 | | single = gtk_button_new_with_mnemonic("_Single-Party"); |
| 241 | | ok = gtk_button_new_with_mnemonic("_Invite"); |
| 242 | | cancel = gtk_button_new_from_stock(GTK_STOCK_CANCEL); |
| 243 | | gtk_box_pack_start(GTK_BOX(h_box), multiparty, true, true, 0); |
| 244 | | gtk_box_pack_start(GTK_BOX(h_box), single, true, true, 0); |
| 245 | | gtk_box_pack_start(GTK_BOX(h_box), ok, true, true, 0); |
| 246 | | gtk_box_pack_start(GTK_BOX(h_box), cancel, true, true, 0); |
| 247 | | gtk_table_attach(GTK_TABLE(table), h_box, 0, 2, 4, 5, |
| 248 | | GtkAttachOptions(GTK_FILL | GTK_EXPAND), |
| 249 | | GTK_FILL, 3, 3); |
| 250 | | |
| 251 | | /* Connect the signals */ |
| 252 | | g_signal_connect(G_OBJECT(multiparty), "clicked", |
| 253 | | G_CALLBACK(multi_request_chat), (gpointer)rc); |
| 254 | | g_signal_connect(G_OBJECT(single), "clicked", |
| 255 | | G_CALLBACK(single_request_chat), (gpointer)rc); |
| 256 | | g_signal_connect(G_OBJECT(ok), "clicked", |
| 257 | | G_CALLBACK(ok_request_chat), (gpointer)rc); |
| 258 | | g_signal_connect(G_OBJECT(cancel), "clicked", |
| 259 | | G_CALLBACK(cancel_request_chat), (gpointer)rc); |
| 260 | | |
| 261 | | // Set chat list sensitive till needed and show everything |
| 262 | | gtk_widget_set_sensitive(rc->chat_list, false); |
| 263 | | gtk_widget_show_all(rc->window); |
| 264 | | |
| 265 | | g_free(title); |
| 266 | | } |
| 267 | | |
| 268 | | struct request_chat *rc_new(ICQUser *user) |
| 269 | | { |
| 270 | | struct request_chat *rc; |
| 271 | | |
| 272 | | /* Does it already exist? */ |
| 273 | | rc = rc_find(user->Uin()); |
| 274 | | |
| 275 | | /* Don't make it if it's already there, return it */ |
| 276 | | if(rc != 0) |
| 277 | | return rc; |
| 278 | | |
| 279 | | rc = g_new0(struct request_chat, 1); |
| 280 | | rc->user = user; |
| 281 | | rc_list = g_slist_append(rc_list, rc); |
| 282 | | |
| 283 | | return rc; |
| 284 | | } |
| 285 | | |
| 286 | | struct request_chat *rc_find(gulong uin) |
| 287 | | { |
| 288 | | struct request_chat *rc; |
| 289 | | GSList *temp_rc_list = rc_list; |
| 290 | | |
| 291 | | while(temp_rc_list) |
| 292 | | { |
| 293 | | rc = (struct request_chat *)temp_rc_list->data; |
| 294 | | if(rc->user->Uin() == uin) |
| 295 | | return rc; |
| 296 | | |
| 297 | | temp_rc_list = temp_rc_list->next; |
| 298 | | } |
| 299 | | |
| 300 | | /* It wasn't found, return null */ |
| 301 | | return 0; |
| 302 | | } |
| 303 | | |
| 304 | | void multi_request_chat(GtkWidget *widget, gpointer _rc) |
| 305 | | { |
| 306 | | struct request_chat *rc = (struct request_chat *)_rc; |
| 307 | | |
| 308 | | // Save some time by checking to see if we should be here |
| 309 | | if(GTK_WIDGET_SENSITIVE(rc->chat_list)) |
| 310 | | return; |
| 311 | | |
| 312 | | // Make a GList with the current chats in it |
| 313 | | GList *items = 0; |
| 314 | | |
| 315 | | ChatDlgList::iterator iter; |
| 316 | | for(iter = chat_list.begin(); iter != chat_list.end(); iter++) |
| 317 | | items = g_list_append(items, (*iter)->chatman->ClientsStr()); |
| 318 | | |
| 319 | | // Make sure there are chats to show |
| 320 | | if(items == 0) |
| 321 | | return; |
| 322 | | |
| 323 | | gtk_combo_set_popdown_strings(GTK_COMBO(rc->chat_list), items); |
| 324 | | |
| 325 | | // Allright show it |
| 326 | | gtk_widget_set_sensitive(rc->chat_list, true); |
| 327 | | } |
| 328 | | |
| 329 | | void single_request_chat(GtkWidget *widget, gpointer _rc) |
| 330 | | { |
| 331 | | struct request_chat *rc = (struct request_chat *)_rc; |
| 332 | | |
| 333 | | // Just take care of it.. I think it'll take some more time |
| 334 | | // to check if we should be here or not. |
| 335 | | gtk_widget_set_sensitive(rc->chat_list, false); |
| 336 | | } |
| 337 | | |
| 338 | | void ok_request_chat(GtkWidget *widget, gpointer _rc) |
| 339 | | { |
| 340 | | struct request_chat *rc = (struct request_chat *)_rc; |
| 341 | | guint id; |
| 342 | | guint send_as = ICQ_TCPxMSG_NORMAL; |
| 343 | | |
| 344 | | if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(rc->send_urg))) |
| 345 | | send_as = ICQ_TCPxMSG_URGENT; |
| 346 | | else if(gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(rc->send_list))) |
| 347 | | send_as = ICQ_TCPxMSG_LIST; |
| 348 | | |
| 349 | | id = gtk_statusbar_get_context_id(GTK_STATUSBAR(rc->etd->statusbar), |
| 350 | | "sta"); |
| 351 | | gtk_statusbar_pop(GTK_STATUSBAR(rc->etd->statusbar), id); |
| 352 | | gtk_statusbar_push(GTK_STATUSBAR(rc->etd->statusbar), id, |
| 353 | | "Requesting Chat ... "); |
| 354 | | |
| 355 | | strcpy(rc->etd->buf, ""); |
| 356 | | strcpy(rc->etd->buf, "Requesting Chat ... "); |
| 357 | | |
| 358 | | GtkTextBuffer *tb = gtk_text_view_get_buffer(GTK_TEXT_VIEW(rc->text_box)); |
| 359 | | GtkTextIter b, e; |
| 360 | | gtk_text_buffer_get_start_iter(tb, &b); |
| 361 | | gtk_text_buffer_get_end_iter(tb, &e); |
| 362 | | gchar *txt = gtk_text_buffer_get_text(tb, &b, &e, FALSE); |
| 363 | | |
| 364 | | // Are we doing single or multi? |
| 365 | | if(GTK_WIDGET_SENSITIVE(rc->chat_list)) |
| 366 | | { |
| 367 | | // Multi |
| 368 | | unsigned short nPort = 0; |
| 369 | | |
| 370 | | // Find the chat |
| 371 | | ChatDlgList::iterator iter; |
| 372 | | for(iter = chat_list.begin(); iter != chat_list.end(); iter++) |
| 373 | | { |
| 374 | | if(strcmp((*iter)->chatman->ClientsStr(), |
| 375 | | gtk_entry_get_text(GTK_ENTRY( |
| 376 | | GTK_COMBO(rc->chat_list)->entry)) ) |
| 377 | | == 0) |
| 378 | | { |
| 379 | | nPort = (*iter)->chatman->LocalPort(); |
| 380 | | break; |
| 381 | | } |
| 382 | | } |
| 383 | | |
| 384 | | if(iter == chat_list.end()) |
| 385 | | { |
| 386 | | gtk_statusbar_pop(GTK_STATUSBAR(rc->etd->statusbar), |
| 387 | | id); |
| 388 | | gtk_statusbar_push(GTK_STATUSBAR(rc->etd->statusbar), |
| 389 | | id, "Requesting Chat ... Invalid Chat"); |
| 390 | | message_box("Invalid Multi-Party Chat"); |
| 391 | | return; |
| 392 | | } |
| 393 | | |
| 394 | | |
| 395 | | rc->etd->e_tag = icq_daemon->icqMultiPartyChatRequest( |
| 396 | | rc->user->Uin(), |
| 397 | | txt, |
| 398 | | gtk_entry_get_text(GTK_ENTRY( |
| 399 | | GTK_COMBO(rc->chat_list)->entry)), |
| 400 | | nPort, |
| 401 | | send_as, false); |
| 402 | | } |
| 403 | | |
| 404 | | else |
| 405 | | { |
| 406 | | // Single |
| 407 | | rc->etd->e_tag = icq_daemon->icqChatRequest(rc->user->Uin(), |
| 408 | | txt, |
| 409 | | send_as, false); |
| 410 | | } |
| 411 | | |
| 412 | | g_free(txt); |
| 413 | | |
| 414 | | /* The event catcher list */ |
| 415 | | catcher = g_slist_append(catcher, rc->etd); |
| 416 | | } |
| 417 | | |
| 418 | | void cancel_request_chat(GtkWidget *widget, gpointer _rc) |
| 419 | | { |
| 420 | | struct request_chat *rc = (struct request_chat *)_rc; |
| 421 | | icq_daemon->CancelEvent(rc->etd->e_tag); |
| 422 | | catcher = g_slist_remove(catcher, rc->etd); |
| 423 | | close_request_chat(rc); |
| 424 | | } |
| 425 | | |
| 426 | | void close_request_chat(struct request_chat *rc) |
| 427 | | { |
| 428 | | rc_list = g_slist_remove(rc_list, rc); |
| 429 | | gtk_widget_destroy(rc->window); |
| | 222 | /* Do we even want to be here? */ |
| | 223 | struct request_chat *rc = rc_find(user->Uin()); |
| | 224 | |
| | 225 | // No get outta here, bitch! |
| | 226 | if (rc != 0) |
| | 227 | return; |
| | 228 | |
| | 229 | rc = rc_new(user); |
| | 230 | |
| | 231 | GtkWidget *scroll; |
| | 232 | GtkWidget *multiparty; |
| | 233 | GtkWidget *single; |
| | 234 | GtkWidget *ok; |
| | 235 | GtkWidget *cancel; |
| | 236 | GtkWidget *table; |
| | 237 | GtkWidget *h_box; |
| | 238 | gchar *title = g_strdup_printf("Licq - Request Chat With %s", |
| | 239 | user->GetAlias()); |
| | 240 | |
| | 241 | /* Make the request_chat structure */ |
| | 242 | rc->etd = g_new0(struct e_tag_data, 1); |
| | 243 | rc->user = user; |
| | 244 | rc->etd->buf[0] = '\0'; |
| | 245 | |
| | 246 | /* Create the table and hbox */ |
| | 247 | table = gtk_table_new(4, 2, FALSE); |
| | 248 | h_box = gtk_hbox_new(FALSE, 5); |
| | 249 | |
| | 250 | /* Create the window */ |
| | 251 | rc->window = gtk_window_new(GTK_WINDOW_TOPLEVEL); |
| | 252 | gtk_window_set_title(GTK_WINDOW(rc->window), title); |
| | 253 | g_free(title); |
| | 254 | |
| | 255 | gtk_window_set_position(GTK_WINDOW(rc->window), GTK_WIN_POS_CENTER); |
| | 256 | gtk_container_add(GTK_CONTAINER(rc->window), table); |
| | 257 | g_signal_connect(G_OBJECT(rc->window), "destroy", |
| | 258 | G_CALLBACK(cancel_request_chat), rc); |
| | 259 | |
| | 260 | /*Create the scrolled window with text and attach it to the window */ |
| | 261 | scroll = gtk_scrolled_window_new(0, 0); |
| | 262 | gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scroll), |
| | 263 | GTK_POLICY_NEVER, |
| | 264 | GTK_POLICY_AUTOMATIC); |
| | 265 | rc->text_box = gtk_text_view_new(); |
| | 266 | gtk_text_view_set_editable(GTK_TEXT_VIEW(rc->text_box), TRUE); |
| | 267 | gtk_text_view_set_wrap_mode(GTK_TEXT_VIEW(rc->text_box), GTK_WRAP_WORD); |
| | 268 | gtk_container_add(GTK_CONTAINER(scroll), rc->text_box); |
| | 269 | gtk_table_attach(GTK_TABLE(table), scroll, 0, 2, 0, 1, |
| | 270 | GtkAttachOptions(GTK_FILL | GTK_EXPAND), |
| | 271 | GtkAttachOptions(GTK_FILL | GTK_EXPAND), |
| | 272 | 3, 3); |
| | 273 | gtk_widget_show(scroll); |
| | 274 | |
| | 275 | /* The send as buttons */ |
| | 276 | rc->send_norm = gtk_radio_button_new_with_label(0, "Send Normal"); |
| | 277 | rc->send_urg = |
| | 278 | gtk_radio_button_new_with_label_from_widget( |
| | 279 | GTK_RADIO_BUTTON(rc->send_norm), "Send Urgent"); |
| | 280 | rc->send_list = |
| | 281 | gtk_radio_button_new_with_label_from_widget( |
| | 282 | GTK_RADIO_BUTTON(rc->send_norm), "Send To List"); |
| | 283 | |
| | 284 | /* Pack them to a box */ |
| | 285 | gtk_box_pack_start(GTK_BOX(h_box), rc->send_norm, FALSE, FALSE, 0); |
| | 286 | gtk_box_pack_start(GTK_BOX(h_box), rc->send_urg, FALSE, FALSE, 0); |
| | 287 | gtk_box_pack_start(GTK_BOX(h_box), rc->send_list, FALSE, FALSE, 0); |
| | 288 | |
| | 289 | /* Attach the box to the table */ |
| | 290 | gtk_table_attach(GTK_TABLE(table), h_box, 0, 2, 1, 2, |
| | 291 | GtkAttachOptions(GTK_FILL | GTK_EXPAND), |
| | 292 | GTK_FILL, 3, 3); |
| | 293 | |
| | 294 | /* Progress bar */ |
| | 295 | rc->etd->statusbar = gtk_statusbar_new(); |
| | 296 | gtk_table_attach(GTK_TABLE(table), rc->etd->statusbar, 0, 2, 2, 3, |
| | 297 | GtkAttachOptions(GTK_FILL | GTK_EXPAND), |
| | 298 | GTK_FILL, 3, 3); |
| | 299 | |
| | 300 | // Ok.. this is where the combo box for multi party chats goes |
| | 301 | // but it isn't shown until it's needed |
| | 302 | h_box = gtk_hbox_new(FALSE, 5); |
| | 303 | GtkWidget *label = gtk_label_new("Current Chats:"); |
| | 304 | rc->chat_list = gtk_combo_new(); |
| | 305 | gtk_box_pack_start(GTK_BOX(h_box), label, false, false, 0); |
| | 306 | gtk_box_pack_start(GTK_BOX(h_box), rc->chat_list, false, false, 0); |
| | 307 | gtk_table_attach(GTK_TABLE(table), h_box, 0, 2, 3, 4, |
| | 308 | GtkAttachOptions(GTK_FILL | GTK_EXPAND), |
| | 309 | GTK_FILL, 3, 3); |
| | 310 | |
| | 311 | /* The button box */ |
| | 312 | h_box = gtk_hbox_new(TRUE, 5); |
| | 313 | multiparty = gtk_button_new_with_mnemonic("_Multi-Party"); |
| | 314 | single = gtk_button_new_with_mnemonic("_Single-Party"); |
| | 315 | ok = gtk_button_new_with_mnemonic("_Invite"); |
| | 316 | cancel = gtk_button_new_from_stock(GTK_STOCK_CANCEL); |
| | 317 | gtk_box_pack_start(GTK_BOX(h_box), multiparty, true, true, 0); |
| | 318 | gtk_box_pack_start(GTK_BOX(h_box), single, true, true, 0); |
| | 319 | gtk_box_pack_start(GTK_BOX(h_box), ok, true, true, 0); |
| | 320 | gtk_box_pack_start(GTK_BOX(h_box), cancel, true, true, 0); |
| | 321 | gtk_table_attach(GTK_TABLE(table), h_box, 0, 2, 4, 5, |
| | 322 | GtkAttachOptions(GTK_FILL | GTK_EXPAND), |
| | 323 | GTK_FILL, 3, 3); |
| | 324 | |
| | 325 | /* Connect the signals */ |
| | 326 | g_signal_connect(G_OBJECT(multiparty), "clicked", |
| | 327 | G_CALLBACK(multi_request_chat), rc); |
| | 328 | g_signal_connect(G_OBJECT(single), "clicked", |
| | 329 | G_CALLBACK(single_request_chat), rc); |
| | 330 | g_signal_connect(G_OBJECT(ok), "clicked", |
| | 331 | G_CALLBACK(ok_request_chat), rc); |
| | 332 | g_signal_connect(G_OBJECT(cancel), "clicked", |
| | 333 | G_CALLBACK(window_close), rc->window); |
| | 334 | |
| | 335 | // Set chat list sensitive till needed and show everything |
| | 336 | gtk_widget_set_sensitive(rc->chat_list, false); |
| | 337 | gtk_widget_show_all(rc->window); |
| | 338 | } |
| | 339 | |
| | 340 | void ok_request_chat(GtkWidget *widget, struct request_chat *rc) |
| | 341 | { |
| | 342 | guint send_as; |
| | 343 | if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(rc->send_urg))) |
| | 344 | send_as = ICQ_TCPxMSG_URGENT; |
| | 345 | else if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(rc->send_list))) |
| | 346 | send_as = ICQ_TCPxMSG_LIST; |
| | 347 | else |
| | 348 | send_as = ICQ_TCPxMSG_NORMAL; |
| | 349 | |
| | 350 | strcpy(rc->etd->buf, "Requesting Chat ... "); |
| | 351 | status_change(rc->etd->statusbar, "sta", rc->etd->buf); |
| | 352 | |
| | 353 | GtkTextBuffer *tb = gtk_text_view_get_buffer(GTK_TEXT_VIEW(rc->text_box)); |
| | 354 | GtkTextIter b, e; |
| | 355 | gtk_text_buffer_get_start_iter(tb, &b); |
| | 356 | gtk_text_buffer_get_end_iter(tb, &e); |
| | 357 | gchar *txt = gtk_text_buffer_get_text(tb, &b, &e, FALSE); |
| | 358 | |
| | 359 | // Are we doing single or multi? |
| | 360 | if (GTK_WIDGET_SENSITIVE(rc->chat_list)) { |
| | 361 | // Multi |
| | 362 | unsigned short nPort = 0; |
| | 363 | |
| | 364 | // Find the chat |
| | 365 | ChatDlgList::iterator iter; |
| | 366 | for (iter = chat_list.begin(); iter != chat_list.end(); ++iter) { |
| | 367 | if (strcmp((*iter)->chatman->ClientsStr(), |
| | 368 | entry_get_chars(GTK_COMBO(rc->chat_list)->entry).c_str()) |
| | 369 | == 0) { |
| | 370 | nPort = (*iter)->chatman->LocalPort(); |
| | 371 | break; |
| | 372 | } |
| | 373 | } |
| | 374 | |
| | 375 | if (iter == chat_list.end()) { |
| | 376 | status_change(rc->etd->statusbar, "sta", |
| | 377 | "Requesting Chat ... Invalid Chat"); |
| | 378 | message_box("Invalid Multi-Party Chat"); |
| | 379 | return; |
| | 380 | } |
| | 381 | |
| | 382 | rc->etd->e_tag = icq_daemon->icqMultiPartyChatRequest( |
| | 383 | rc->user->Uin(), |
| | 384 | txt, |
| | 385 | entry_get_chars(GTK_COMBO(rc->chat_list)->entry).c_str(), |
| | 386 | nPort, |
| | 387 | send_as, |
| | 388 | false); |
| | 389 | } |
| | 390 | else { |
| | 391 | // Single |
| | 392 | rc->etd->e_tag = icq_daemon->icqChatRequest( |
| | 393 | rc->user->Uin(), |
| | 394 | txt, |
| | 395 | send_as, |
| | 396 | false); |
| | 397 | } |
| | 398 | |
| | 399 | g_free(txt); |
| | 400 | |
| | 401 | /* The event catcher list */ |
| | 402 | catcher = g_slist_append(catcher, rc->etd); |