mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-04-06 14:03:54 -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
@ -123,14 +123,14 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
||||
|
||||
{
|
||||
QIcon icon ;
|
||||
icon.addPixmap(QPixmap(":/images/edit_add24.png")) ;
|
||||
icon.addPixmap(QPixmap(":/images/user/add_user24.png")) ;
|
||||
inviteFriendsButton->setIcon(icon) ;
|
||||
inviteFriendsButton->setIconSize(QSize(2*S,2*S)) ;
|
||||
}
|
||||
|
||||
connect(inviteFriendsButton, SIGNAL(clicked()), this , SLOT(inviteFriends()));
|
||||
|
||||
getChatWidget()->addChatBarWidget(inviteFriendsButton) ;
|
||||
getChatWidget()->addTitleBarWidget(inviteFriendsButton) ;
|
||||
|
||||
RsGxsId current_id;
|
||||
rsMsgs->getIdentityForChatLobby(lobbyId, current_id);
|
||||
@ -159,7 +159,7 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
||||
QIcon icon ;
|
||||
icon.addPixmap(QPixmap(":/images/door_in.png")) ;
|
||||
unsubscribeButton->setIcon(icon) ;
|
||||
unsubscribeButton->setIconSize(QSize(1.5*S,1.5*S)) ;
|
||||
unsubscribeButton->setIconSize(QSize(2*S,2*S)) ;
|
||||
}
|
||||
|
||||
/* Initialize splitter */
|
||||
@ -168,7 +168,7 @@ ChatLobbyDialog::ChatLobbyDialog(const ChatLobbyId& lid, QWidget *parent, Qt::Wi
|
||||
|
||||
connect(unsubscribeButton, SIGNAL(clicked()), this , SLOT(leaveLobby()));
|
||||
|
||||
getChatWidget()->addChatBarWidget(unsubscribeButton) ;
|
||||
getChatWidget()->addTitleBarWidget(unsubscribeButton) ;
|
||||
}
|
||||
|
||||
void ChatLobbyDialog::leaveLobby()
|
||||
|
@ -99,10 +99,6 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
ui->addFileButton->setIconSize(iconSize);
|
||||
ui->pushtoolsButton->setFixedSize(buttonSize);
|
||||
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->setIconSize(iconSize);
|
||||
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->markButton->setVisible(false);
|
||||
ui->leSearch->setVisible(false);
|
||||
ui->searchBefore->setVisible(false);
|
||||
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->actionChooseColor);
|
||||
menu->addAction(ui->actionResetFont);
|
||||
menu->addAction(ui->actionNoEmbed);
|
||||
menu->addAction(ui->actionSendAsPlainText);
|
||||
ui->fontButton->setMenu(menu);
|
||||
|
||||
menu = new QMenu();
|
||||
@ -195,8 +194,8 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
menu->addAction(ui->actionSaveChatHistory);
|
||||
menu->addAction(ui->actionMessageHistory);
|
||||
ui->pushtoolsButton->setMenu(menu);
|
||||
ui->sendAsPlainTextButton->setChecked(Settings->getChatSendAsPlainTextByDef());
|
||||
|
||||
ui->actionSendAsPlainText->setChecked(Settings->getChatSendAsPlainTextByDef());
|
||||
|
||||
ui->textBrowser->installEventFilter(this);
|
||||
ui->textBrowser->viewport()->installEventFilter(this);
|
||||
ui->chatTextEdit->installEventFilter(this);
|
||||
@ -1140,11 +1139,11 @@ void ChatWidget::sendChat()
|
||||
}
|
||||
|
||||
QString text;
|
||||
if (ui->sendAsPlainTextButton->isChecked()){
|
||||
if (ui->actionSendAsPlainText->isChecked()){
|
||||
text = chatWidget->toPlainText();
|
||||
text.replace(QChar(-4),"");//Char used when image on text.
|
||||
} 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();
|
||||
|
||||
@ -1199,7 +1198,7 @@ void ChatWidget::on_searchButton_clicked(bool bValue)
|
||||
qtcCurrent=QTextCursor(qtdDocument);
|
||||
}
|
||||
ui->leSearch->setVisible(bValue);
|
||||
|
||||
ui->markButton->setVisible(bValue);
|
||||
}
|
||||
void ChatWidget::on_searchBefore_clicked()
|
||||
{
|
||||
|
@ -513,42 +513,6 @@ border-image: url(:/images/closepressed.png)
|
||||
</property>
|
||||
</widget>
|
||||
</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>
|
||||
<widget class="QFrame" name="pluginButtonFrame">
|
||||
<property name="frameShape">
|
||||
@ -1070,6 +1034,36 @@ border-image: url(:/images/closepressed.png)
|
||||
<string>Save image</string>
|
||||
</property>
|
||||
</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>
|
||||
<customwidgets>
|
||||
<customwidget>
|
||||
|
@ -27,7 +27,7 @@
|
||||
<item>
|
||||
<widget class="QTabWidget" name="stabWidget">
|
||||
<property name="currentIndex">
|
||||
<number>2</number>
|
||||
<number>0</number>
|
||||
</property>
|
||||
<widget class="QWidget" name="tab">
|
||||
<attribute name="title">
|
||||
@ -175,7 +175,16 @@
|
||||
</item>
|
||||
<item>
|
||||
<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>
|
||||
</property>
|
||||
<item>
|
||||
@ -296,19 +305,12 @@ p, li { white-space: pre-wrap; }
|
||||
</attribute>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_3">
|
||||
<item>
|
||||
<widget class="QTextBrowser" name="textBrowser">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<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>
|
||||
</property>
|
||||
<property name="html">
|
||||
<string><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
|
||||
<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 name="wordWrap">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
Loading…
x
Reference in New Issue
Block a user