mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 08:29:26 -05:00
Move SearchBar to Tool Bar and remove Show/Hide action.
As asked by Cyril in PR#346
This commit is contained in:
parent
c5873f3216
commit
42a2b37abb
@ -107,7 +107,6 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
connect(ui->actionMoveToCursor, SIGNAL(triggered()), this, SLOT(toogle_MoveToCursor()));
|
||||
connect(ui->actionSearchWithoutLimit, SIGNAL(triggered()), this, SLOT(toogle_SeachWithoutLimit()));
|
||||
connect(ui->searchButton, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(contextMenuSearchButton(QPoint)));
|
||||
connect(ui->actionSearch_History, SIGNAL(triggered()), this, SLOT(searchHistory()));
|
||||
|
||||
notify=NULL;
|
||||
ui->notifyButton->setVisible(false);
|
||||
@ -146,9 +145,6 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
ui->infoFrame->setVisible(false);
|
||||
ui->statusMessageLabel->hide();
|
||||
|
||||
ui->actionSearch_History->setChecked(Settings->getChatSearchShowBarByDefault());
|
||||
searchHistory();
|
||||
|
||||
setAcceptDrops(true);
|
||||
ui->chatTextEdit->setAcceptDrops(false);
|
||||
ui->hashBox->setDropWidget(this);
|
||||
@ -165,7 +161,6 @@ ChatWidget::ChatWidget(QWidget *parent) :
|
||||
menu->addAction(ui->actionDeleteChatHistory);
|
||||
menu->addAction(ui->actionSaveChatHistory);
|
||||
menu->addAction(ui->actionMessageHistory);
|
||||
menu->addAction(ui->actionSearch_History);
|
||||
ui->pushtoolsButton->setMenu(menu);
|
||||
|
||||
ui->textBrowser->installEventFilter(this);
|
||||
@ -235,7 +230,6 @@ void ChatWidget::addTitleBarWidget(QWidget *w)
|
||||
void ChatWidget::hideChatText(bool hidden)
|
||||
{
|
||||
ui->chatTextFrame->setHidden(hidden); ;
|
||||
ui->searchFrame->setVisible(ui->actionSearch_History->isChecked() && !hidden); ;
|
||||
}
|
||||
|
||||
RSButtonOnText* ChatWidget::getNewButtonOnTextBrowser()
|
||||
@ -316,7 +310,6 @@ void ChatWidget::init(const ChatId &chat_id, const QString &title)
|
||||
messageCount = Settings->getPublicChatHistoryCount();
|
||||
|
||||
ui->titleBarFrame->setVisible(false);
|
||||
ui->actionSearch_History->setVisible(false);
|
||||
}
|
||||
|
||||
if (rsHistory->getEnable(hist_chat_type))
|
||||
@ -1427,16 +1420,6 @@ void ChatWidget::messageHistory()
|
||||
imBrowser.exec();
|
||||
}
|
||||
|
||||
void ChatWidget::searchHistory()
|
||||
{
|
||||
if(ui->actionSearch_History->isChecked()){
|
||||
ui->searchFrame->show();
|
||||
}else {
|
||||
ui->searchFrame->hide();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
void ChatWidget::addExtraFile()
|
||||
{
|
||||
QStringList files;
|
||||
|
@ -132,8 +132,6 @@ private slots:
|
||||
void deleteChatHistory();
|
||||
void messageHistory();
|
||||
void resetStatusBar() ;
|
||||
void searchHistory();
|
||||
|
||||
|
||||
signals:
|
||||
void infoChanged(ChatWidget*);
|
||||
|
@ -569,6 +569,146 @@ border-image: url(:/images/closepressed.png)
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="markButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/highlight.png</normaloff>:/images/highlight.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="LineEditClear" name="leSearch"/>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="searchBefore">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/arrow-left.png</normaloff>:/images/arrow-left.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="searchAfter">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/arrow-right.png</normaloff>:/images/arrow-right.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QToolButton" name="searchButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/find.png</normaloff>:/images/find.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="toolBarHSpacer">
|
||||
<property name="orientation">
|
||||
@ -738,170 +878,6 @@ border-image: url(:/images/closepressed.png)
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QFrame" name="searchFrame">
|
||||
<property name="frameShape">
|
||||
<enum>QFrame::StyledPanel</enum>
|
||||
</property>
|
||||
<property name="frameShadow">
|
||||
<enum>QFrame::Raised</enum>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="searchFrameGLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="5">
|
||||
<widget class="QToolButton" name="searchButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="contextMenuPolicy">
|
||||
<enum>Qt::CustomContextMenu</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/find.png</normaloff>:/images/find.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="3">
|
||||
<widget class="QToolButton" name="searchAfter">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/arrow-right.png</normaloff>:/images/arrow-right.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="2">
|
||||
<widget class="LineEditClear" name="leSearch"/>
|
||||
</item>
|
||||
<item row="0" column="4">
|
||||
<widget class="QToolButton" name="searchBefore">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>14</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/arrow-left.png</normaloff>:/images/arrow-left.png</iconset>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<widget class="QToolButton" name="markButton">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="maximumSize">
|
||||
<size>
|
||||
<width>28</width>
|
||||
<height>28</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="focusPolicy">
|
||||
<enum>Qt::NoFocus</enum>
|
||||
</property>
|
||||
<property name="icon">
|
||||
<iconset resource="../images.qrc">
|
||||
<normaloff>:/images/highlight.png</normaloff>:/images/highlight.png</iconset>
|
||||
</property>
|
||||
<property name="iconSize">
|
||||
<size>
|
||||
<width>24</width>
|
||||
<height>24</height>
|
||||
</size>
|
||||
</property>
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="autoRaise">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
@ -1033,17 +1009,6 @@ border-image: url(:/images/closepressed.png)
|
||||
<string>Choose color</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionSearch_History">
|
||||
<property name="checkable">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Display Search Box</string>
|
||||
</property>
|
||||
<property name="toolTip">
|
||||
<string>Search Box</string>
|
||||
</property>
|
||||
</action>
|
||||
<action name="actionQuote">
|
||||
<property name="text">
|
||||
<string>Quote</string>
|
||||
|
@ -130,7 +130,6 @@ ChatPage::save(QString &/*errmsg*/)
|
||||
|
||||
Settings->setChatSendMessageWithCtrlReturn(ui.sendMessageWithCtrlReturn->isChecked());
|
||||
|
||||
Settings->setChatSearchShowBarByDefault(ui.cbSearch_ShowBar->isChecked());
|
||||
Settings->setChatSearchCharToStartSearch(ui.sbSearch_CharToStart->value());
|
||||
Settings->setChatSearchCaseSensitively(ui.cbSearch_CaseSensitively->isChecked());
|
||||
Settings->setChatSearchWholeWords(ui.cbSearch_WholeWords->isChecked());
|
||||
@ -238,7 +237,6 @@ ChatPage::load()
|
||||
|
||||
ui.sendMessageWithCtrlReturn->setChecked(Settings->getChatSendMessageWithCtrlReturn());
|
||||
|
||||
ui.cbSearch_ShowBar->setChecked(Settings->getChatSearchShowBarByDefault());
|
||||
ui.sbSearch_CharToStart->setValue(Settings->getChatSearchCharToStartSearch());
|
||||
ui.cbSearch_CaseSensitively->setChecked(Settings->getChatSearchCaseSensitively());
|
||||
ui.cbSearch_WholeWords->setChecked(Settings->getChatSearchWholeWords());
|
||||
|
@ -512,16 +512,6 @@ void RshareSettings::setChatSendMessageWithCtrlReturn(bool bValue)
|
||||
setValueToGroup("Chat", "SendMessageWithCtrlReturn", bValue);
|
||||
}
|
||||
|
||||
bool RshareSettings::getChatSearchShowBarByDefault()
|
||||
{
|
||||
return valueFromGroup("Chat", "SearchShowBarByDefault", false).toBool();
|
||||
}
|
||||
|
||||
void RshareSettings::setChatSearchShowBarByDefault(bool bValue)
|
||||
{
|
||||
setValueToGroup("Chat", "SearchShowBarByDefault", bValue);
|
||||
}
|
||||
|
||||
void RshareSettings::setChatSearchCharToStartSearch(int iValue)
|
||||
{
|
||||
setValueToGroup("Chat", "SearchCharToStartSearch", iValue);
|
||||
|
@ -209,9 +209,6 @@ public:
|
||||
bool getChatSendMessageWithCtrlReturn();
|
||||
void setChatSendMessageWithCtrlReturn(bool bValue);
|
||||
|
||||
bool getChatSearchShowBarByDefault();
|
||||
void setChatSearchShowBarByDefault(bool bValue);
|
||||
|
||||
void setChatSearchCharToStartSearch(int iValue);
|
||||
int getChatSearchCharToStartSearch();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user