diff --git a/retroshare-gui/src/gui/MessagesDialog.cpp b/retroshare-gui/src/gui/MessagesDialog.cpp
index ba20eefe8..3735da5aa 100644
--- a/retroshare-gui/src/gui/MessagesDialog.cpp
+++ b/retroshare-gui/src/gui/MessagesDialog.cpp
@@ -231,7 +231,7 @@ MessagesDialog::MessagesDialog(QWidget *parent)
QMenu *printmenu = new QMenu();
printmenu->addAction(ui.actionPrint);
printmenu->addAction(ui.actionPrintPreview);
- ui.printbutton->setMenu(printmenu);
+ ui.printButton->setMenu(printmenu);
QMenu *viewmenu = new QMenu();
viewmenu->addAction(ui.actionTextBesideIcon);
@@ -346,9 +346,8 @@ void MessagesDialog::processSettings(bool load)
}
// state of splitter
- ui.msgSplitter->restoreState(Settings->value("Splitter").toByteArray());
- ui.msgSplitter_2->restoreState(Settings->value("Splitter2").toByteArray());
- ui.listSplitter->restoreState(Settings->value("Splitter3").toByteArray());
+ ui.msgSplitter->restoreState(Settings->value("SplitterMsg").toByteArray());
+ ui.listSplitter->restoreState(Settings->value("SplitterList").toByteArray());
/* toolbar button style */
Qt::ToolButtonStyle style = (Qt::ToolButtonStyle) Settings->value("ToolButon_Style", Qt::ToolButtonIconOnly).toInt();
@@ -361,9 +360,8 @@ void MessagesDialog::processSettings(bool load)
Settings->setValue("MessageTreeVersion", messageTreeVersion);
// state of splitter
- Settings->setValue("Splitter", ui.msgSplitter->saveState());
- Settings->setValue("Splitter2", ui.msgSplitter_2->saveState());
- Settings->setValue("Splitter3", ui.listSplitter->saveState());
+ Settings->setValue("SplitterMsg", ui.msgSplitter->saveState());
+ Settings->setValue("SplitterList", ui.listSplitter->saveState());
/* toolbar button style */
Settings->setValue("ToolButon_Style", ui.newmessageButton->toolButtonStyle());
@@ -1527,8 +1525,8 @@ void MessagesDialog::insertMsgTxtAndFiles(QTreeWidgetItem *item, bool bSetToRead
}
}
- msgWidget->fill(mCurrMsgId);
updateInterface();
+ msgWidget->fill(mCurrMsgId);
}
bool MessagesDialog::getCurrentMsg(std::string &cid, std::string &mid)
@@ -1607,7 +1605,7 @@ void MessagesDialog::setToolbarButtonStyle(Qt::ToolButtonStyle style)
ui.replyallmessageButton->setToolButtonStyle(style);
ui.forwardmessageButton->setToolButtonStyle(style);
ui.tagButton->setToolButtonStyle(style);
- ui.printbutton->setToolButtonStyle(style);
+ ui.printButton->setToolButtonStyle(style);
ui.viewtoolButton->setToolButtonStyle(style);
}
@@ -1710,23 +1708,23 @@ void MessagesDialog::updateMessageSummaryList()
{
case ROW_INBOX:
textTotal = tr("Total:") + " " + QString::number(inboxCount);
- ui.total_label->setText(textTotal);
+ ui.totalLabel->setText(textTotal);
break;
case ROW_OUTBOX:
textTotal = tr("Total:") + " " + QString::number(newOutboxCount);
- ui.total_label->setText(textTotal);
+ ui.totalLabel->setText(textTotal);
break;
case ROW_DRAFTBOX:
textTotal = tr("Total:") + " " + QString::number(newDraftCount);
- ui.total_label->setText(textTotal);
+ ui.totalLabel->setText(textTotal);
break;
case ROW_SENTBOX:
textTotal = tr("Total:") + " " + QString::number(newSentboxCount);
- ui.total_label->setText(textTotal);
+ ui.totalLabel->setText(textTotal);
break;
case ROW_TRASHBOX:
textTotal = tr("Total:") + " " + QString::number(trashboxCount);
- ui.total_label->setText(textTotal);
+ ui.totalLabel->setText(textTotal);
break;
}
@@ -1967,7 +1965,7 @@ void MessagesDialog::connectActions()
ui.replymessageButton->disconnect();
ui.replyallmessageButton->disconnect();
ui.forwardmessageButton->disconnect();
- ui.printbutton->disconnect();
+ ui.printButton->disconnect();
ui.actionPrint->disconnect();
ui.actionPrintPreview->disconnect();
ui.actionSaveAs->disconnect();
@@ -1994,7 +1992,7 @@ void MessagesDialog::connectActions()
msg->connectAction(MessageWidget::ACTION_REPLY, ui.replymessageButton);
msg->connectAction(MessageWidget::ACTION_REPLY_ALL, ui.replyallmessageButton);
msg->connectAction(MessageWidget::ACTION_FORWARD, ui.forwardmessageButton);
- msg->connectAction(MessageWidget::ACTION_PRINT, ui.printbutton);
+ msg->connectAction(MessageWidget::ACTION_PRINT, ui.printButton);
msg->connectAction(MessageWidget::ACTION_PRINT, ui.actionPrint);
msg->connectAction(MessageWidget::ACTION_PRINT_PREVIEW, ui.actionPrintPreview);
msg->connectAction(MessageWidget::ACTION_SAVE_AS, ui.actionSaveAs);
@@ -2019,7 +2017,7 @@ void MessagesDialog::updateInterface()
ui.replymessageButton->setEnabled(count == 1);
ui.replyallmessageButton->setEnabled(count == 1);
ui.forwardmessageButton->setEnabled(count == 1);
- ui.printbutton->setEnabled(count == 1);
+ ui.printButton->setEnabled(count == 1);
ui.actionPrint->setEnabled(count == 1);
ui.actionPrintPreview->setEnabled(count == 1);
ui.actionSaveAs->setEnabled(count == 1);
diff --git a/retroshare-gui/src/gui/MessagesDialog.ui b/retroshare-gui/src/gui/MessagesDialog.ui
index e3e33b670..1203a1eb2 100644
--- a/retroshare-gui/src/gui/MessagesDialog.ui
+++ b/retroshare-gui/src/gui/MessagesDialog.ui
@@ -49,7 +49,7 @@
QFrame::Sunken
-
+
2
@@ -66,7 +66,7 @@
6
-
-
+
Qt::Vertical
@@ -219,7 +219,7 @@
-
-
+
0
@@ -454,7 +454,7 @@
Qt::NoFocus
-
+
:/icons/help_64.png:/icons/help_64.png
@@ -466,7 +466,7 @@
-
-
+
Qt::Horizontal
@@ -479,7 +479,7 @@
-
-
+
Qt::Horizontal
@@ -495,7 +495,7 @@
-
-
+
Qt::Vertical
@@ -513,7 +513,7 @@
Main Tab
-
+
0
@@ -535,7 +535,7 @@
Qt::Horizontal
-
+
0
@@ -629,7 +629,7 @@
-
-
+
0
@@ -646,7 +646,7 @@
true
-
+
3
@@ -687,7 +687,7 @@
QFrame::Raised
-
+
3
@@ -726,38 +726,33 @@
Qt::Vertical
-
-
- Qt::Vertical
+
+
+ Qt::CustomContextMenu
-
-
- Qt::CustomContextMenu
+
+ QAbstractItemView::ExtendedSelection
+
+
+ false
+
+
+ true
+
+
+ true
+
+
+ false
+
+
+
+ 1
-
- QAbstractItemView::ExtendedSelection
-
-
- false
-
-
- true
-
-
- true
-
-
- false
-
-
-
- 1
-
-
-
-
-
-
+
+
+
+
@@ -838,6 +833,11 @@
+
+ StyledLabel
+ QLabel
+
+
LineEditClear
QLineEdit
@@ -854,19 +854,14 @@
1
-
- StyledLabel
- QLabel
-
-
replymessageButton
listWidget
-
+
diff --git a/retroshare-gui/src/gui/msgs/MessageWidget.cpp b/retroshare-gui/src/gui/msgs/MessageWidget.cpp
index fa3ecf5c0..2f00bcded 100644
--- a/retroshare-gui/src/gui/msgs/MessageWidget.cpp
+++ b/retroshare-gui/src/gui/msgs/MessageWidget.cpp
@@ -122,7 +122,7 @@ MessageWidget *MessageWidget::openMsg(const std::string &msgId, bool window)
/** Constructor */
MessageWidget::MessageWidget(bool controlled, QWidget *parent, Qt::WindowFlags flags)
-: QWidget(parent, flags)
+ : QWidget(parent, flags), toolButtonReply(NULL)
{
/* Invoke the Qt Designer generated object setup routine */
ui.setupUi(this);
@@ -196,6 +196,7 @@ void MessageWidget::connectAction(enumActionType actionType, QToolButton* button
break;
case ACTION_REPLY:
connect(button, SIGNAL(clicked()), this, SLOT(reply()));
+ toolButtonReply = button;
break;
case ACTION_REPLY_ALL:
connect(button, SIGNAL(clicked()), this, SLOT(replyAll()));
@@ -600,9 +601,11 @@ void MessageWidget::fill(const std::string &msgId)
if ((msgInfo.msgflags & RS_MSG_SYSTEM) && msgInfo.rspeerid_srcId == ownId) {
ui.fromText->setText("RetroShare");
+ if (toolButtonReply) toolButtonReply->setEnabled(false);
} else {
ui.fromText->setText(link.toHtml());
ui.fromText->setToolTip(tooltip_string) ;
+ if (toolButtonReply) toolButtonReply->setEnabled(true);
}
ui.subjectText->setText(QString::fromUtf8(msgInfo.title.c_str()));
diff --git a/retroshare-gui/src/gui/msgs/MessageWidget.h b/retroshare-gui/src/gui/msgs/MessageWidget.h
index e4d26068b..b7255143f 100644
--- a/retroshare-gui/src/gui/msgs/MessageWidget.h
+++ b/retroshare-gui/src/gui/msgs/MessageWidget.h
@@ -95,6 +95,8 @@ private:
QList tagLabels;
+ QToolButton* toolButtonReply;
+
/** Qt Designer generated object */
Ui::MessageWidget ui;
};
diff --git a/retroshare-gui/src/gui/msgs/MessageWindow.cpp b/retroshare-gui/src/gui/msgs/MessageWindow.cpp
index 9ad274b1e..a4ff106e6 100644
--- a/retroshare-gui/src/gui/msgs/MessageWindow.cpp
+++ b/retroshare-gui/src/gui/msgs/MessageWindow.cpp
@@ -68,7 +68,7 @@ MessageWindow::MessageWindow(QWidget *parent, Qt::WindowFlags flags)
QMenu *printmenu = new QMenu();
printmenu->addAction(ui.actionPrint);
printmenu->addAction(ui.actionPrint_Preview);
- ui.printbutton->setMenu(printmenu);
+ ui.printButton->setMenu(printmenu);
// create view menu
QMenu *viewmenu = new QMenu();
@@ -120,7 +120,7 @@ void MessageWindow::addWidget(MessageWidget *widget)
msgWidget->connectAction(MessageWidget::ACTION_REPLY, ui.replymessageButton);
msgWidget->connectAction(MessageWidget::ACTION_REPLY_ALL, ui.replyallmessageButton);
msgWidget->connectAction(MessageWidget::ACTION_FORWARD, ui.forwardmessageButton);
- msgWidget->connectAction(MessageWidget::ACTION_PRINT, ui.printbutton);
+ msgWidget->connectAction(MessageWidget::ACTION_PRINT, ui.printButton);
msgWidget->connectAction(MessageWidget::ACTION_PRINT, ui.actionPrint);
msgWidget->connectAction(MessageWidget::ACTION_PRINT, actionPrint);
msgWidget->connectAction(MessageWidget::ACTION_PRINT_PREVIEW, ui.actionPrint_Preview);
@@ -216,7 +216,7 @@ void MessageWindow::setToolbarButtonStyle(Qt::ToolButtonStyle style)
ui.replyallmessageButton->setToolButtonStyle(style);
ui.forwardmessageButton->setToolButtonStyle(style);
ui.tagButton->setToolButtonStyle(style);
- ui.printbutton->setToolButtonStyle(style);
+ ui.printButton->setToolButtonStyle(style);
ui.viewtoolButton->setToolButtonStyle(style);
}
diff --git a/retroshare-gui/src/gui/msgs/MessageWindow.ui b/retroshare-gui/src/gui/msgs/MessageWindow.ui
index 445fd4c9d..7c5689dd7 100644
--- a/retroshare-gui/src/gui/msgs/MessageWindow.ui
+++ b/retroshare-gui/src/gui/msgs/MessageWindow.ui
@@ -11,11 +11,20 @@
-
-
+
+
0
-
+
+ 0
+
+
+ 0
+
+
+ 0
+
+
0
-
@@ -44,8 +53,17 @@
QFrame::Sunken
-
-
+
+
+ 2
+
+
+ 2
+
+
+ 2
+
+
2
@@ -81,7 +99,7 @@
-
-
+
Qt::Vertical
@@ -187,7 +205,7 @@
-
-
+
Qt::Vertical
@@ -223,7 +241,7 @@
-
-
+
Qt::NoFocus
@@ -281,7 +299,7 @@
-
-
+
Qt::Horizontal