mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-02-25 09:11:28 -05:00
Set in Release Mode.
Bugfixes in CreateForumMsg git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@810 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1c16cc8d22
commit
fa1d123b62
@ -138,13 +138,13 @@ ApplicationWindow::ApplicationWindow(QWidget* parent, Qt::WFlags flags)
|
||||
ui.stackPages->add(blogDialog = new BlogDialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_BLOGS), tr("Blog Feed"), grp));
|
||||
|
||||
ChannelFeed *channelFeed = NULL;
|
||||
ui.stackPages->add(channelFeed = new ChannelFeed(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_CHANNELS), tr("Channel Feed"), grp));
|
||||
|
||||
ForumsDialog *forumsDialog = NULL;
|
||||
ui.stackPages->add(forumsDialog = new ForumsDialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_FORUMS), tr("Forums"), grp));
|
||||
// ChannelFeed *channelFeed = NULL;
|
||||
// ui.stackPages->add(channelFeed = new ChannelFeed(ui.stackPages),
|
||||
// createPageAction(QIcon(IMAGE_CHANNELS), tr("Channel Feed"), grp));
|
||||
//
|
||||
// ForumsDialog *forumsDialog = NULL;
|
||||
// ui.stackPages->add(forumsDialog = new ForumsDialog(ui.stackPages),
|
||||
// createPageAction(QIcon(IMAGE_FORUMS), tr("Forums"), grp));
|
||||
|
||||
GamesDialog *gamesDialog = NULL;
|
||||
ui.stackPages->add(gamesDialog = new GamesDialog(ui.stackPages),
|
||||
|
@ -204,7 +204,7 @@ void ForumsDialog::threadListCustomPopupMenu( QPoint point )
|
||||
QAction *replyAct = new QAction(QIcon(IMAGE_MESSAGEREPLY), tr( "Reply" ), this );
|
||||
connect( replyAct , SIGNAL( triggered() ), this, SLOT( createmessage() ) );
|
||||
|
||||
QAction *viewAct = new QAction(QIcon(IMAGE_DOWNLOADALL), tr( "View Whole Thread" ), this );
|
||||
QAction *viewAct = new QAction(QIcon(IMAGE_DOWNLOADALL), tr( "Start New Thread" ), this );
|
||||
connect( viewAct , SIGNAL( triggered() ), this, SLOT( showthread() ) );
|
||||
|
||||
contextMnu.clear();
|
||||
|
@ -28,6 +28,7 @@
|
||||
#include <QPixmap>
|
||||
|
||||
#include "ChannelFeed.h"
|
||||
#include "ForumsDialog.h"
|
||||
#include "LinksDialog.h"
|
||||
#include "GamesDialog.h"
|
||||
#include "PhotoDialog.h"
|
||||
@ -66,6 +67,7 @@
|
||||
#define IMAGE_LINKS ":/images/knewsticker24.png"
|
||||
#define IMAGE_FILES ":/images/fileshare24.png"
|
||||
#define IMAGE_CHANNELS ":/images/channels.png"
|
||||
#define IMAGE_FORUMS ":/images/konversation.png"
|
||||
#define IMAGE_PREFERENCES ":/images/kcmsystem24.png"
|
||||
#define IMAGE_CHAT ":/images/groupchat.png"
|
||||
#define IMAGE_RETROSHARE ":/images/rstray3.png"
|
||||
@ -102,7 +104,6 @@
|
||||
|
||||
#define RS_RELEASE_VERSION 1
|
||||
|
||||
|
||||
/** Constructor */
|
||||
MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||
: RWindow("MainWindow", parent, flags)
|
||||
@ -185,11 +186,17 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||
|
||||
#ifdef RS_RELEASE_VERSION
|
||||
channelsDialog = NULL;
|
||||
ui.stackPages->add(linksDialog = new LinksDialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_LINKS), tr("Links Cloud"), grp));
|
||||
|
||||
ChannelFeed *channelFeed = NULL;
|
||||
ui.stackPages->add(channelFeed = new ChannelFeed(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_CHANNELS), tr("Channel Feed"), grp));
|
||||
|
||||
ForumsDialog *forumsDialog = NULL;
|
||||
ui.stackPages->add(forumsDialog = new ForumsDialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_FORUMS), tr("Forums"), grp));
|
||||
|
||||
#else
|
||||
channelsDialog = NULL;
|
||||
ui.stackPages->add(linksDialog = new LinksDialog(ui.stackPages),
|
||||
@ -198,6 +205,10 @@ MainWindow::MainWindow(QWidget* parent, Qt::WFlags flags)
|
||||
ui.stackPages->add(channelsDialog = new ChannelsDialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_CHANNELS), tr("Channels"), grp));
|
||||
|
||||
ForumsDialog *forumsDialog = NULL;
|
||||
ui.stackPages->add(forumsDialog = new ForumsDialog(ui.stackPages),
|
||||
createPageAction(QIcon(IMAGE_FORUMS), tr("Forums"), grp));
|
||||
|
||||
#endif
|
||||
|
||||
//ui.stackPages->add(new HelpDialog(ui.stackPages),
|
||||
|
@ -37,8 +37,8 @@ CreateForumMsg::CreateForumMsg(std::string fId, std::string pId)
|
||||
config.loadWidgetInformation(this);
|
||||
|
||||
// connect up the buttons.
|
||||
connect( ui.postmessage_action, SIGNAL( triggered (bool) ), this, SLOT( cancelMsg( ) ) );
|
||||
connect( ui.close_action, SIGNAL( triggered (bool) ), this, SLOT( createMsg( ) ) );
|
||||
connect( ui.postmessage_action, SIGNAL( triggered (bool) ), this, SLOT( createMsg( ) ) );
|
||||
connect( ui.close_action, SIGNAL( triggered (bool) ), this, SLOT( cancelMsg( ) ) );
|
||||
|
||||
newMsg();
|
||||
|
||||
@ -48,6 +48,26 @@ CreateForumMsg::CreateForumMsg(std::string fId, std::string pId)
|
||||
void CreateForumMsg::newMsg()
|
||||
{
|
||||
/* clear all */
|
||||
ForumInfo fi;
|
||||
if (rsForums->getForumInfo(mForumId, fi))
|
||||
{
|
||||
ForumMsgInfo msg;
|
||||
|
||||
QString name = QString::fromStdWString(fi.forumName);
|
||||
QString subj;
|
||||
if ((mParentId != "") && (rsForums->getForumMessage(
|
||||
mForumId, mParentId, msg)))
|
||||
{
|
||||
name += " In Reply to: ";
|
||||
name += QString::fromStdWString(msg.title);
|
||||
subj = "Re: " + QString::fromStdWString(msg.title);
|
||||
}
|
||||
|
||||
ui.forumName->setText(name);
|
||||
ui.forumSubject->setText(subj);
|
||||
}
|
||||
|
||||
ui.forumMessage->setText("");
|
||||
}
|
||||
|
||||
void CreateForumMsg::createMsg()
|
||||
@ -66,6 +86,9 @@ void CreateForumMsg::createMsg()
|
||||
msgInfo.title = name.toStdWString();
|
||||
msgInfo.msg = desc.toStdWString();
|
||||
|
||||
if ((msgInfo.msg == L"") && (msgInfo.title == L""))
|
||||
return; /* do nothing */
|
||||
|
||||
rsForums->ForumMessageSend(msgInfo);
|
||||
|
||||
close();
|
||||
|
@ -13,26 +13,17 @@
|
||||
<string>Post Forum Message</string>
|
||||
</property>
|
||||
<property name="windowIcon" >
|
||||
<iconset resource="../images.qrc" >
|
||||
<normaloff>:/images/rstray3.png</normaloff>:/images/rstray3.png</iconset>
|
||||
<iconset resource="../images.qrc" >:/images/rstray3.png</iconset>
|
||||
</property>
|
||||
<property name="toolButtonStyle" >
|
||||
<enum>Qt::ToolButtonTextUnderIcon</enum>
|
||||
</property>
|
||||
<widget class="QWidget" name="centralwidget" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>52</y>
|
||||
<width>441</width>
|
||||
<height>301</height>
|
||||
</rect>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout" >
|
||||
<layout class="QGridLayout" >
|
||||
<item row="0" column="0" >
|
||||
<layout class="QVBoxLayout" >
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_2" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2" >
|
||||
<property name="text" >
|
||||
@ -41,12 +32,16 @@
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="forumName" />
|
||||
<widget class="QLineEdit" name="forumName" >
|
||||
<property name="enabled" >
|
||||
<bool>false</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_3" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="label" >
|
||||
<property name="text" >
|
||||
@ -60,7 +55,7 @@
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="_4" >
|
||||
<layout class="QHBoxLayout" >
|
||||
<item>
|
||||
<widget class="QLabel" name="label_5" >
|
||||
<property name="text" >
|
||||
@ -73,7 +68,7 @@
|
||||
<property name="orientation" >
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0" >
|
||||
<property name="sizeHint" >
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
@ -98,14 +93,6 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<widget class="QToolBar" name="toolBar" >
|
||||
<property name="geometry" >
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>441</width>
|
||||
<height>52</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle" >
|
||||
<string>toolBar</string>
|
||||
</property>
|
||||
@ -120,8 +107,7 @@
|
||||
</widget>
|
||||
<action name="postmessage_action" >
|
||||
<property name="icon" >
|
||||
<iconset resource="../images.qrc" >
|
||||
<normaloff>:/images/mail_send24.png</normaloff>:/images/mail_send24.png</iconset>
|
||||
<iconset resource="../images.qrc" >:/images/mail_send24.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Post Forum Msg</string>
|
||||
@ -129,8 +115,7 @@
|
||||
</action>
|
||||
<action name="close_action" >
|
||||
<property name="icon" >
|
||||
<iconset resource="../images.qrc" >
|
||||
<normaloff>:/images/button_cancel.png</normaloff>:/images/button_cancel.png</iconset>
|
||||
<iconset resource="../images.qrc" >:/images/button_cancel.png</iconset>
|
||||
</property>
|
||||
<property name="text" >
|
||||
<string>Close</string>
|
||||
|
Loading…
x
Reference in New Issue
Block a user