added Start new Thread Button

added MessageBox Info when no Forum is selected

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@1953 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-01-01 15:37:45 +00:00
parent 2a107ad706
commit 5ae41c8de9
3 changed files with 36 additions and 18 deletions

View File

@ -42,6 +42,7 @@
#include <QDateTime>
#include <QHeaderView>
#include <QTimer>
#include <QMessageBox>
/* Images for context menu icons */
#define IMAGE_MESSAGE ":/images/folder-draft.png"
@ -76,7 +77,7 @@ ForumsDialog::ForumsDialog(QWidget *parent)
connect(ui.newForumButton, SIGNAL(clicked()), this, SLOT(newforum()));
connect(ui.newmessageButton, SIGNAL(clicked()), this, SLOT(createmessage()));
connect(ui.newthreadButton, SIGNAL(clicked()), this, SLOT(showthread()));
connect( ui.forumTreeWidget, SIGNAL( currentItemChanged ( QTreeWidgetItem *, QTreeWidgetItem *) ), this,
SLOT( changedForum( QTreeWidgetItem *, QTreeWidgetItem * ) ) );
@ -830,10 +831,12 @@ void ForumsDialog::showthread()
{
if (mCurrForumId == "")
{
QMessageBox::information(this, tr("RetroShare"),tr("No Forum Selected!"));
return;
}
CreateForumMsg *cfm = new CreateForumMsg(mCurrForumId, "");
cfm->setWindowTitle(tr("Start New Thread"));
cfm->show();
}
@ -878,10 +881,3 @@ static ForumDisplay *fui = new ForumDisplay();
}

View File

@ -32,8 +32,8 @@ class ForumsDialog : public MainPage
public:
ForumsDialog(QWidget *parent = 0);
void insertForums();
void insertPost();
void insertForums();
void insertPost();
private slots:
@ -44,14 +44,14 @@ private slots:
void newforum();
void checkUpdate();
void checkUpdate();
void changedForum( QTreeWidgetItem *curr, QTreeWidgetItem *prev );
void changedThread( QTreeWidgetItem *curr, QTreeWidgetItem *prev );
void changedThread2();
void changedForum( QTreeWidgetItem *curr, QTreeWidgetItem *prev );
void changedThread( QTreeWidgetItem *curr, QTreeWidgetItem *prev );
void changedThread2();
void changeBox( int newrow );
void updateMessages ( QTreeWidgetItem * item, int column );
void changeBox( int newrow );
void updateMessages ( QTreeWidgetItem * item, int column );
void newmessage();

View File

@ -570,9 +570,13 @@
<item>
<layout class="QHBoxLayout">
<item>
<widget class="QPushButton" name="newmessageButton">
<widget class="QPushButton" name="newthreadButton">
<property name="toolTip">
<string>New Message</string>
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Start new Thread for Selected Forum&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
@ -583,6 +587,24 @@
</property>
</widget>
</item>
<item>
<widget class="QPushButton" name="newmessageButton">
<property name="toolTip">
<string>&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.0//EN&quot; &quot;http://www.w3.org/TR/REC-html40/strict.dtd&quot;&gt;
&lt;html&gt;&lt;head&gt;&lt;meta name=&quot;qrichtext&quot; content=&quot;1&quot; /&gt;&lt;style type=&quot;text/css&quot;&gt;
p, li { white-space: pre-wrap; }
&lt;/style&gt;&lt;/head&gt;&lt;body style=&quot; font-family:'Arial'; font-size:8pt; font-weight:400; font-style:normal;&quot;&gt;
&lt;p style=&quot; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px;&quot;&gt;Reply Message&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/mail_reply.png</normaloff>:/images/mail_reply.png</iconset>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="label_17">
<property name="sizePolicy">