ChatRoom * linphone_qt_init_chatroom(LinphoneChatRoom *cr, const char *with){ ChatRoom *chatw; QString tmp; chatw = new ChatRoom(w); tmp.sprintf("Chat with %s",with); chatw->setWindowTitle(tmp); chatw->setLinphoneChatRoom(cr); linphone_chat_room_set_user_data(cr,w); chatw->setAttribute(Qt::WA_DeleteOnClose); chatw->show(); return chatw; }
GtkWidget * linphone_gtk_init_chatroom(LinphoneChatRoom *cr, const char *with){ GtkWidget *w; GtkTextBuffer *b; gchar *tmp; w=linphone_gtk_create_window("chatroom"); tmp=g_strdup_printf(_("Chat with %s"),with); gtk_window_set_title(GTK_WINDOW(w),tmp); g_free(tmp); g_object_set_data(G_OBJECT(w),"cr",cr); gtk_widget_show(w); linphone_chat_room_set_user_data(cr,w); b=gtk_text_view_get_buffer(GTK_TEXT_VIEW(linphone_gtk_get_widget(w,"textlog"))); gtk_text_buffer_create_tag(b,"blue","foreground","blue",NULL); gtk_text_buffer_create_tag(b,"green","foreground","green",NULL); return w; }
void ChatRoom::on_buttonBox_rejected() { linphone_chat_room_set_user_data(cr_, NULL); this->close(); return; }