diff --git a/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp b/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp index 3274d6555..a831c6f9a 100644 --- a/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp +++ b/plugins/VOIP/gui/VOIPChatWidgetHolder.cpp @@ -108,8 +108,8 @@ VOIPChatWidgetHolder::VOIPChatWidgetHolder(ChatWidget *chatWidget) // Make a widget with two video devices, one for echo, and one for the talking peer. videoWidget = new QWidget(mChatWidget) ; videoWidget->setLayout(new QVBoxLayout()) ; - videoWidget->layout()->addWidget(echoVideoDevice = new QVideoOutputDevice(videoWidget)) ; videoWidget->layout()->addWidget(outputVideoDevice = new QVideoOutputDevice(videoWidget)) ; + videoWidget->layout()->addWidget(echoVideoDevice = new QVideoOutputDevice(videoWidget)) ; videoWidget->hide(); connect(inputVideoDevice, SIGNAL(networkPacketReady()), this, SLOT(sendVideoData())); @@ -159,6 +159,11 @@ void VOIPChatWidgetHolder::hangupCall() if (outputAudioDevice) { outputAudioDevice->stop(); } + + if (mChatWidget) { + mChatWidget->addChatMsg(true, tr("VoIP Status"), QDateTime::currentDateTime(), QDateTime::currentDateTime(), tr("Outgoing Call stopped."), ChatWidget::MSGTYPE_SYSTEM); + } + audioListenToggleButton->setChecked(false); audioCaptureToggleButton->setChecked(false); hangupButton->hide(); @@ -219,6 +224,9 @@ void VOIPChatWidgetHolder::toggleVideoCapture() videoCaptureToggleButton->setToolTip(tr("Activate camera")); outputVideoDevice->showFrameOff(); videoWidget->hide(); + + if (mChatWidget) + mChatWidget->addChatMsg(true, tr("VoIP Status"), QDateTime::currentDateTime(), QDateTime::currentDateTime(), tr("Video call stopped"), ChatWidget::MSGTYPE_SYSTEM); } } diff --git a/retroshare-gui/src/gui/chat/ChatWidget.cpp b/retroshare-gui/src/gui/chat/ChatWidget.cpp index f16de6028..badd90503 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.cpp +++ b/retroshare-gui/src/gui/chat/ChatWidget.cpp @@ -108,17 +108,14 @@ ChatWidget::ChatWidget(QWidget *parent) : connect(ui->sendButton, SIGNAL(clicked()), this, SLOT(sendChat())); connect(ui->addFileButton, SIGNAL(clicked()), this , SLOT(addExtraFile())); - //connect(ui->textboldButton, SIGNAL(clicked()), this, SLOT(setFont())); - //connect(ui->textunderlineButton, SIGNAL(clicked()), this, SLOT(setFont())); - //connect(ui->textitalicButton, SIGNAL(clicked()), this, SLOT(setFont())); connect(ui->attachPictureButton, SIGNAL(clicked()), this, SLOT(addExtraPicture())); - connect(ui->colorButton, SIGNAL(clicked()), this, SLOT(chooseColor())); connect(ui->emoteiconButton, SIGNAL(clicked()), this, SLOT(smileyWidget())); connect(ui->actionSaveChatHistory, SIGNAL(triggered()), this, SLOT(fileSaveAs())); connect(ui->actionClearChatHistory, SIGNAL(triggered()), this, SLOT(clearChatHistory())); connect(ui->actionDeleteChatHistory, SIGNAL(triggered()), this, SLOT(deleteChatHistory())); connect(ui->actionMessageHistory, SIGNAL(triggered()), this, SLOT(messageHistory())); connect(ui->actionChooseFont, SIGNAL(triggered()), this, SLOT(chooseFont())); + connect(ui->actionChooseColor, SIGNAL(triggered()), this, SLOT(chooseColor())); connect(ui->actionResetFont, SIGNAL(triggered()), this, SLOT(resetFont())); connect(ui->hashBox, SIGNAL(fileHashingFinished(QList)), this, SLOT(fileHashingFinished(QList))); @@ -143,6 +140,7 @@ ChatWidget::ChatWidget(QWidget *parent) : QMenu *menu = new QMenu(); menu->addAction(ui->actionChooseFont); + menu->addAction(ui->actionChooseColor); menu->addAction(ui->actionResetFont); ui->fontButton->setMenu(menu); @@ -246,7 +244,6 @@ void ChatWidget::init(const RsPeerId &peerId, const QString &title) currentFont.fromString(PeerSettings->getPrivateChatFont(peerId)); colorChanged(); - //fontChanged(); setColorAndFont(); // load style @@ -1112,7 +1109,7 @@ void ChatWidget::colorChanged() { QPixmap pix(16, 16); pix.fill(currentColor); - ui->colorButton->setIcon(pix); + ui->actionChooseColor->setIcon(pix); } void ChatWidget::chooseFont() @@ -1121,7 +1118,6 @@ void ChatWidget::chooseFont() QFont font = QFontDialog::getFont(&ok, currentFont, this); if (ok) { currentFont = font; - //fontChanged(); setFont(); } } @@ -1129,22 +1125,11 @@ void ChatWidget::chooseFont() void ChatWidget::resetFont() { currentFont.fromString(Settings->getChatScreenFont()); - //fontChanged(); setFont(); } -void ChatWidget::fontChanged() -{ - //ui->textboldButton->setChecked(currentFont.bold()); - //ui->textunderlineButton->setChecked(currentFont.underline()); - //ui->textitalicButton->setChecked(currentFont.italic()); -} - void ChatWidget::setColorAndFont() { - //currentFont.setBold(ui->textboldButton->isChecked()); - //currentFont.setUnderline(ui->textunderlineButton->isChecked()); - //currentFont.setItalic(ui->textitalicButton->isChecked()); ui->chatTextEdit->setFont(currentFont); ui->chatTextEdit->setTextColor(currentColor); diff --git a/retroshare-gui/src/gui/chat/ChatWidget.h b/retroshare-gui/src/gui/chat/ChatWidget.h index 195a23d7c..47d83f577 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.h +++ b/retroshare-gui/src/gui/chat/ChatWidget.h @@ -22,26 +22,26 @@ #ifndef CHATWIDGET_H #define CHATWIDGET_H - -#include -#include -#include -#include -#include "gui/common/HashBox.h" -#include "ChatStyle.h" -#include "gui/style/RSStyle.h" + +#include +#include +#include +#include +#include "gui/common/HashBox.h" +#include "ChatStyle.h" +#include "gui/style/RSStyle.h" #include #include class QAction; -class QTextEdit; -class QPushButton; -class ChatWidget; -class QMenu; - -namespace Ui { -class ChatWidget; +class QTextEdit; +class QPushButton; +class ChatWidget; +class QMenu; + +namespace Ui { +class ChatWidget; } // a Container for the logic behind buttons in a PopupChatDialog @@ -95,11 +95,11 @@ public: bool setStyle(); const RSStyle *getStyle() { return &style; } - // Adds one widget in the chat bar. Used to add e.g. new buttons. The widget should be - // small enough in size. + // Adds one widget in the chat bar. Used to add e.g. new buttons. The widget should be + // small enough in size. void addChatBarWidget(QWidget *w) ; - - // Adds a new horizonal widget in the layout of the chat window. + + // Adds a new horizonal widget in the layout of the chat window. void addChatHorizontalWidget(QWidget *w) ; bool isActive(); @@ -128,32 +128,32 @@ protected: virtual void showEvent(QShowEvent *event); virtual void resizeEvent(QResizeEvent *event); void updateTitle(); - -private slots: - void contextMenuTextBrowser(QPoint); - void contextMenuSearchButton(QPoint); - void chatCharFormatChanged(); - - void fileHashingFinished(QList hashedFiles); + +private slots: + void contextMenuTextBrowser(QPoint); + void contextMenuSearchButton(QPoint); + void chatCharFormatChanged(); + + void fileHashingFinished(QList hashedFiles); void smileyWidget(); void addSmiley(); - void addExtraFile(); - void addExtraPicture(); - void on_closeInfoFrameButton_clicked(); - void on_searchButton_clicked(bool bValue); - void on_searchBefore_clicked(); - void on_searchAfter_clicked(); - void toogle_FindCaseSensitively(); - void toogle_FindWholeWords(); - void toogle_MoveToCursor(); - void toogle_SeachWithoutLimit(); - - void on_markButton_clicked(bool bValue); - - void chooseColor(); - void chooseFont(); + void addExtraFile(); + void addExtraPicture(); + void on_closeInfoFrameButton_clicked(); + void on_searchButton_clicked(bool bValue); + void on_searchBefore_clicked(); + void on_searchAfter_clicked(); + void toogle_FindCaseSensitively(); + void toogle_FindWholeWords(); + void toogle_MoveToCursor(); + void toogle_SeachWithoutLimit(); + + void on_markButton_clicked(bool bValue); + + void chooseColor(); + void chooseFont(); void resetFont(); void setFont(); @@ -163,17 +163,16 @@ private slots: void updatePeersCustomStateString(const QString& peer_id, const QString& status_string) ; bool fileSave(); - bool fileSaveAs(); - -private: - bool findText(const QString& qsStringToFind); - bool findText(const QString& qsStringToFind, bool bBackWard, bool bForceMove); - void removeFoundText(); - void updateStatusTyping(); - void setCurrentFileName(const QString &fileName); - + bool fileSaveAs(); + +private: + bool findText(const QString& qsStringToFind); + bool findText(const QString& qsStringToFind, bool bBackWard, bool bForceMove); + void removeFoundText(); + void updateStatusTyping(); + void setCurrentFileName(const QString &fileName); + void colorChanged(); - void fontChanged(); void setColorAndFont(); void processSettings(bool load); @@ -200,26 +199,26 @@ private: ChatStyle chatStyle; RSStyle style; - - bool firstShow; - bool inChatCharFormatChanged; - bool firstSearch; - QPalette qpSave_leSearch; - std::map smFoundCursor; - int iCharToStartSearch; - bool bFindCaseSensitively; - bool bFindWholeWords; - bool bMoveToCursor; - bool bSearchWithoutLimit; - uint uiMaxSearchLimitColor; - QColor cFoundColor; - QString qsLastsearchText; - QTextCursor qtcCurrent; - - QTextCursor qtcMark; - - TransferRequestFlags mDefaultExtraFileFlags ; // flags for extra files shared in this chat. Will be 0 by default, but might be ANONYMOUS for chat lobbies. - QDate lastMsgDate ; + + bool firstShow; + bool inChatCharFormatChanged; + bool firstSearch; + QPalette qpSave_leSearch; + std::map smFoundCursor; + int iCharToStartSearch; + bool bFindCaseSensitively; + bool bFindWholeWords; + bool bMoveToCursor; + bool bSearchWithoutLimit; + uint uiMaxSearchLimitColor; + QColor cFoundColor; + QString qsLastsearchText; + QTextCursor qtcCurrent; + + QTextCursor qtcMark; + + TransferRequestFlags mDefaultExtraFileFlags ; // flags for extra files shared in this chat. Will be 0 by default, but might be ANONYMOUS for chat lobbies. + QDate lastMsgDate ; QCompleter *completer; diff --git a/retroshare-gui/src/gui/chat/ChatWidget.ui b/retroshare-gui/src/gui/chat/ChatWidget.ui index 50d71b6b0..90a6bd2ba 100644 --- a/retroshare-gui/src/gui/chat/ChatWidget.ui +++ b/retroshare-gui/src/gui/chat/ChatWidget.ui @@ -540,14 +540,20 @@ border-image: url(:/images/closepressed.png) - Qt::NoFocus + Qt::TabFocus - Font + Set text font & color - :/images/fonts.png:/images/fonts.png + :/images/textedit/format-text-color.png:/images/textedit/format-text-color.png + + + + 22 + 22 + QToolButton::InstantPopup @@ -557,31 +563,6 @@ border-image: url(:/images/closepressed.png) - - - - - 28 - 28 - - - - - 28 - 28 - - - - Qt::NoFocus - - - Text Color - - - true - - - @@ -629,7 +610,7 @@ border-image: url(:/images/closepressed.png) Qt::NoFocus - Add a File for your Friend + Attach a File @@ -836,6 +817,11 @@ border-image: url(:/images/closepressed.png) WARNING: Could take long time on big history. + + + Choose color + + diff --git a/retroshare-gui/src/gui/chat/PopupChatDialog.ui b/retroshare-gui/src/gui/chat/PopupChatDialog.ui index d944866f7..91acd093c 100644 --- a/retroshare-gui/src/gui/chat/PopupChatDialog.ui +++ b/retroshare-gui/src/gui/chat/PopupChatDialog.ui @@ -102,10 +102,7 @@ - - 0 - - + 0 diff --git a/retroshare-gui/src/gui/chat/PopupChatWindow.ui b/retroshare-gui/src/gui/chat/PopupChatWindow.ui index af4de9983..244d6eb8f 100644 --- a/retroshare-gui/src/gui/chat/PopupChatWindow.ui +++ b/retroshare-gui/src/gui/chat/PopupChatWindow.ui @@ -41,12 +41,6 @@ - - - 16777215 - 32 - - false @@ -55,8 +49,8 @@ - 24 - 24 + 32 + 32 diff --git a/retroshare-gui/src/util/rsguiversion.h b/retroshare-gui/src/util/rsguiversion.h index 4a0b5c961..55b3b02bd 100644 --- a/retroshare-gui/src/util/rsguiversion.h +++ b/retroshare-gui/src/util/rsguiversion.h @@ -25,7 +25,7 @@ QString retroshareVersion(); QString retroshareRevision(); #define GUI_VERSION "0.6.x" -#define GUI_REVISION "Revision: 7106" +#define GUI_REVISION "Revision: 7669"