mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-29 11:01:22 -04:00
Clean up the Chat Toolbar Buttons
Fixed display of Info Text on PGg details
This commit is contained in:
parent
6b74a8a1b6
commit
da11995ca3
4 changed files with 58 additions and 63 deletions
|
@ -123,14 +123,14 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
||||||
|
|
||||||
{
|
{
|
||||||
QIcon icon ;
|
QIcon icon ;
|
||||||
icon.addPixmap(QPixmap(":/images/edit_add24.png")) ;
|
icon.addPixmap(QPixmap(":/images/user/add_user24.png")) ;
|
||||||
inviteFriendsButton->setIcon(icon) ;
|
inviteFriendsButton->setIcon(icon) ;
|
||||||
inviteFriendsButton->setIconSize(QSize(2*S,2*S)) ;
|
inviteFriendsButton->setIconSize(QSize(2*S,2*S)) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
connect(inviteFriendsButton, SIGNAL(clicked()), this , SLOT(inviteFriends()));
|
connect(inviteFriendsButton, SIGNAL(clicked()), this , SLOT(inviteFriends()));
|
||||||
|
|
||||||
getChatWidget()->addChatBarWidget(inviteFriendsButton) ;
|
getChatWidget()->addTitleBarWidget(inviteFriendsButton) ;
|
||||||
|
|
||||||
RsGxsId current_id;
|
RsGxsId current_id;
|
||||||
rsMsgs->getIdentityForChatLobby(lobbyId, current_id);
|
rsMsgs->getIdentityForChatLobby(lobbyId, current_id);
|
||||||
|
@ -159,7 +159,7 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
||||||
QIcon icon ;
|
QIcon icon ;
|
||||||
icon.addPixmap(QPixmap(":/images/door_in.png")) ;
|
icon.addPixmap(QPixmap(":/images/door_in.png")) ;
|
||||||
unsubscribeButton->setIcon(icon) ;
|
unsubscribeButton->setIcon(icon) ;
|
||||||
unsubscribeButton->setIconSize(QSize(1.5*S,1.5*S)) ;
|
unsubscribeButton->setIconSize(QSize(2*S,2*S)) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Initialize splitter */
|
/* Initialize splitter */
|
||||||
|
@ -168,7 +168,7 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
||||||
|
|
||||||
connect(unsubscribeButton, SIGNAL(clicked()), this , SLOT(leaveLobby()));
|
connect(unsubscribeButton, SIGNAL(clicked()), this , SLOT(leaveLobby()));
|
||||||
|
|
||||||
getChatWidget()->addChatBarWidget(unsubscribeButton) ;
|
getChatWidget()->addTitleBarWidget(unsubscribeButton) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
void ChatLobbyDialog::leaveLobby()
|
void ChatLobbyDialog::leaveLobby()
|
||||||
|
|
|
@ -99,10 +99,6 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||||
ui->addFileButton->setIconSize(iconSize);
|
ui->addFileButton->setIconSize(iconSize);
|
||||||
ui->pushtoolsButton->setFixedSize(buttonSize);
|
ui->pushtoolsButton->setFixedSize(buttonSize);
|
||||||
ui->pushtoolsButton->setIconSize(iconSize);
|
ui->pushtoolsButton->setIconSize(iconSize);
|
||||||
ui->sendAsPlainTextButton->setFixedSize(buttonSize);
|
|
||||||
ui->sendAsPlainTextButton->setIconSize(iconSize);
|
|
||||||
ui->noEmbedButton->setFixedSize(buttonSize);
|
|
||||||
ui->noEmbedButton->setIconSize(iconSize);
|
|
||||||
ui->notifyButton->setFixedSize(buttonSize);
|
ui->notifyButton->setFixedSize(buttonSize);
|
||||||
ui->notifyButton->setIconSize(iconSize);
|
ui->notifyButton->setIconSize(iconSize);
|
||||||
ui->markButton->setFixedSize(buttonSize);
|
ui->markButton->setFixedSize(buttonSize);
|
||||||
|
@ -125,6 +121,7 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||||
|
|
||||||
ui->actionSearchWithoutLimit->setText(tr("Don't stop to color after")+" "+QString::number(uiMaxSearchLimitColor)+" "+tr("items found (need more CPU)"));
|
ui->actionSearchWithoutLimit->setText(tr("Don't stop to color after")+" "+QString::number(uiMaxSearchLimitColor)+" "+tr("items found (need more CPU)"));
|
||||||
|
|
||||||
|
ui->markButton->setVisible(false);
|
||||||
ui->leSearch->setVisible(false);
|
ui->leSearch->setVisible(false);
|
||||||
ui->searchBefore->setVisible(false);
|
ui->searchBefore->setVisible(false);
|
||||||
ui->searchBefore->setToolTip(tr("<b>Find Previous </b><br/><i>Ctrl+Shift+G</i>"));
|
ui->searchBefore->setToolTip(tr("<b>Find Previous </b><br/><i>Ctrl+Shift+G</i>"));
|
||||||
|
@ -187,6 +184,8 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||||
menu->addAction(ui->actionChooseFont);
|
menu->addAction(ui->actionChooseFont);
|
||||||
menu->addAction(ui->actionChooseColor);
|
menu->addAction(ui->actionChooseColor);
|
||||||
menu->addAction(ui->actionResetFont);
|
menu->addAction(ui->actionResetFont);
|
||||||
|
menu->addAction(ui->actionNoEmbed);
|
||||||
|
menu->addAction(ui->actionSendAsPlainText);
|
||||||
ui->fontButton->setMenu(menu);
|
ui->fontButton->setMenu(menu);
|
||||||
|
|
||||||
menu = new QMenu();
|
menu = new QMenu();
|
||||||
|
@ -195,8 +194,8 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||||
menu->addAction(ui->actionSaveChatHistory);
|
menu->addAction(ui->actionSaveChatHistory);
|
||||||
menu->addAction(ui->actionMessageHistory);
|
menu->addAction(ui->actionMessageHistory);
|
||||||
ui->pushtoolsButton->setMenu(menu);
|
ui->pushtoolsButton->setMenu(menu);
|
||||||
ui->sendAsPlainTextButton->setChecked(Settings->getChatSendAsPlainTextByDef());
|
ui->actionSendAsPlainText->setChecked(Settings->getChatSendAsPlainTextByDef());
|
||||||
|
|
||||||
ui->textBrowser->installEventFilter(this);
|
ui->textBrowser->installEventFilter(this);
|
||||||
ui->textBrowser->viewport()->installEventFilter(this);
|
ui->textBrowser->viewport()->installEventFilter(this);
|
||||||
ui->chatTextEdit->installEventFilter(this);
|
ui->chatTextEdit->installEventFilter(this);
|
||||||
|
@ -1140,11 +1139,11 @@ void ChatWidget::sendChat()
|
||||||
}
|
}
|
||||||
|
|
||||||
QString text;
|
QString text;
|
||||||
if (ui->sendAsPlainTextButton->isChecked()){
|
if (ui->actionSendAsPlainText->isChecked()){
|
||||||
text = chatWidget->toPlainText();
|
text = chatWidget->toPlainText();
|
||||||
text.replace(QChar(-4),"");//Char used when image on text.
|
text.replace(QChar(-4),"");//Char used when image on text.
|
||||||
} else {
|
} else {
|
||||||
RsHtml::optimizeHtml(chatWidget, text, (ui->noEmbedButton->isChecked() ? RSHTML_FORMATTEXT_NO_EMBED : 0));
|
RsHtml::optimizeHtml(chatWidget, text, (ui->actionNoEmbed->isChecked() ? RSHTML_FORMATTEXT_NO_EMBED : 0));
|
||||||
}
|
}
|
||||||
std::string msg = text.toUtf8().constData();
|
std::string msg = text.toUtf8().constData();
|
||||||
|
|
||||||
|
@ -1199,7 +1198,7 @@ void ChatWidget::on_searchButton_clicked(bool bValue)
|
||||||
qtcCurrent=QTextCursor(qtdDocument);
|
qtcCurrent=QTextCursor(qtdDocument);
|
||||||
}
|
}
|
||||||
ui->leSearch->setVisible(bValue);
|
ui->leSearch->setVisible(bValue);
|
||||||
|
ui->markButton->setVisible(bValue);
|
||||||
}
|
}
|
||||||
void ChatWidget::on_searchBefore_clicked()
|
void ChatWidget::on_searchBefore_clicked()
|
||||||
{
|
{
|
||||||
|
|
|
@ -513,42 +513,6 @@ border-image: url(:/images/closepressed.png)
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="sendAsPlainTextButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Send as plain text without font.</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images.qrc">
|
|
||||||
<normaloff>:/images/ColoredText.png</normaloff>
|
|
||||||
<normalon>:/images/SimpleText.png</normalon>:/images/ColoredText.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
|
||||||
<widget class="QToolButton" name="noEmbedButton">
|
|
||||||
<property name="toolTip">
|
|
||||||
<string>Don't replace tag with Emote Icon.</string>
|
|
||||||
</property>
|
|
||||||
<property name="icon">
|
|
||||||
<iconset resource="../images.qrc">
|
|
||||||
<normaloff>:/images/emoticons/kopete/kopete020.png</normaloff>
|
|
||||||
<normalon>:/images/SmileyText.png</normalon>:/images/emoticons/kopete/kopete020.png</iconset>
|
|
||||||
</property>
|
|
||||||
<property name="checkable">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="autoRaise">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item>
|
<item>
|
||||||
<widget class="QFrame" name="pluginButtonFrame">
|
<widget class="QFrame" name="pluginButtonFrame">
|
||||||
<property name="frameShape">
|
<property name="frameShape">
|
||||||
|
@ -1070,6 +1034,36 @@ border-image: url(:/images/closepressed.png)
|
||||||
<string>Save image</string>
|
<string>Save image</string>
|
||||||
</property>
|
</property>
|
||||||
</action>
|
</action>
|
||||||
|
<action name="actionSendAsPlainText">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/SimpleText.png</normaloff>:/images/SimpleText.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Send as PlainText</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Send as plain text without font.</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
|
<action name="actionNoEmbed">
|
||||||
|
<property name="checkable">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
<property name="icon">
|
||||||
|
<iconset resource="../images.qrc">
|
||||||
|
<normaloff>:/images/SmileyText.png</normaloff>:/images/SmileyText.png</iconset>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Don't replace tag with Emote Icon.</string>
|
||||||
|
</property>
|
||||||
|
<property name="toolTip">
|
||||||
|
<string>Don't replace tag with Emote Icon.</string>
|
||||||
|
</property>
|
||||||
|
</action>
|
||||||
</widget>
|
</widget>
|
||||||
<customwidgets>
|
<customwidgets>
|
||||||
<customwidget>
|
<customwidget>
|
||||||
|
|
|
@ -27,7 +27,7 @@
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="stabWidget">
|
<widget class="QTabWidget" name="stabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>2</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tab">
|
<widget class="QWidget" name="tab">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
|
@ -175,7 +175,16 @@
|
||||||
</item>
|
</item>
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="friendAndSignLayout">
|
<layout class="QHBoxLayout" name="friendAndSignLayout">
|
||||||
<property name="margin">
|
<property name="leftMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="topMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="rightMargin">
|
||||||
|
<number>6</number>
|
||||||
|
</property>
|
||||||
|
<property name="bottomMargin">
|
||||||
<number>6</number>
|
<number>6</number>
|
||||||
</property>
|
</property>
|
||||||
<item>
|
<item>
|
||||||
|
@ -296,19 +305,12 @@ p, li { white-space: pre-wrap; }
|
||||||
</attribute>
|
</attribute>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||||
<item>
|
<item>
|
||||||
<widget class="QTextBrowser" name="textBrowser">
|
<widget class="QLabel" name="label_4">
|
||||||
<property name="sizePolicy">
|
<property name="text">
|
||||||
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
|
<string>Below is the node's PGP key. It identifies the node and all its locations. A "Retroshare certificate" that you can exchange in order to make friends, is in the the "details" of each separate location.</string>
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>0</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
</property>
|
||||||
<property name="html">
|
<property name="wordWrap">
|
||||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
<bool>true</bool>
|
||||||
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
|
|
||||||
p, li { white-space: pre-wrap; }
|
|
||||||
</style></head><body style=" font-family:'Sans'; font-size:9pt; font-weight:400; font-style:normal;">
|
|
||||||
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;">Below is the node's PGP key. It identifies the node and all its locations. A &quot;Retroshare certificate&quot; that you can exchange in order to make friends, is in the the &quot;details&quot; of each separate location.</p></body></html></string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue