Removed the + button in channels and forums and moved the post button to the right side.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4205 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-05-16 21:24:16 +00:00
parent a8fdcaacb4
commit 7b4f45b686
4 changed files with 115 additions and 192 deletions

View File

@ -57,7 +57,7 @@ ChannelFeed::ChannelFeed(QWidget *parent)
/* Invoke the Qt Designer generated object setup routine */ /* Invoke the Qt Designer generated object setup routine */
setupUi(this); setupUi(this);
connect(actionCreate_Channel, SIGNAL(triggered()), this, SLOT(createChannel())); connect(newChannelButton, SIGNAL(clicked()), this, SLOT(createChannel()));
connect(postButton, SIGNAL(clicked()), this, SLOT(createMsg())); connect(postButton, SIGNAL(clicked()), this, SLOT(createMsg()));
connect(subscribeButton, SIGNAL( clicked( void ) ), this, SLOT( subscribeChannel ( void ) ) ); connect(subscribeButton, SIGNAL( clicked( void ) ), this, SLOT( subscribeChannel ( void ) ) );
connect(unsubscribeButton, SIGNAL( clicked( void ) ), this, SLOT( unsubscribeChannel ( void ) ) ); connect(unsubscribeButton, SIGNAL( clicked( void ) ), this, SLOT( unsubscribeChannel ( void ) ) );
@ -93,12 +93,6 @@ ChannelFeed::ChannelFeed(QWidget *parent)
nameLabel->setFont(QFont("MS SANS SERIF", 22)); nameLabel->setFont(QFont("MS SANS SERIF", 22));
nameLabel->setMinimumWidth(20); nameLabel->setMinimumWidth(20);
// Setup Channel Menu:
QMenu *channelmenu = new QMenu();
channelmenu->addAction(actionCreate_Channel);
channelmenu->addSeparator();
channelpushButton->setMenu(channelmenu);
/* load settings */ /* load settings */
processSettings(true); processSettings(true);

View File

@ -139,88 +139,6 @@ p, li { white-space: pre-wrap; }
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="4">
<widget class="QPushButton" name="channelpushButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Add</string>
</property>
<property name="styleSheet">
<string notr="true">QPushButton::menu-indicator {
subcontrol-origin: padding;
subcontrol-position: bottom right;
}
QPushButton::menu-indicator:pressed, QPushButton::menu-indicator:open {
position: relative;
top: 2px; left: 2px; /* shift the arrow by 2 px */
}
QPushButton:hover {
border: 1px solid #CCCCCC;
}</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/edit_add24.png</normaloff>:/images/edit_add24.png</iconset>
</property>
<property name="default">
<bool>false</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QToolButton" name="postButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>26</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Post to Channel</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/mail_send.png</normaloff>:/images/mail_send.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="3"> <item row="0" column="3">
<widget class="QPushButton" name="displayButton"> <widget class="QPushButton" name="displayButton">
<property name="focusPolicy"> <property name="focusPolicy">
@ -253,6 +171,26 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="4">
<widget class="QToolButton" name="newChannelButton">
<property name="enabled">
<bool>true</bool>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Create Channel</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/add_channel24.png</normaloff>:/images/add_channel24.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -355,12 +293,12 @@ p, li { white-space: pre-wrap; }
<item row="2" column="0"> <item row="2" column="0">
<layout class="QGridLayout" name="gridLayout"> <layout class="QGridLayout" name="gridLayout">
<property name="leftMargin"> <property name="leftMargin">
<number>9</number> <number>2</number>
</property> </property>
<property name="rightMargin"> <property name="rightMargin">
<number>9</number> <number>2</number>
</property> </property>
<item row="0" column="3"> <item row="0" column="4">
<widget class="QPushButton" name="unsubscribeButton"> <widget class="QPushButton" name="unsubscribeButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
@ -402,7 +340,7 @@ border-image: url(:/images/btn_26_pressed.png) 4;
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="2"> <item row="0" column="3">
<widget class="QPushButton" name="subscribeButton"> <widget class="QPushButton" name="subscribeButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
@ -454,7 +392,7 @@ border-image: url(:/images/btn_26_pressed.png) 4;
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="2">
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -467,7 +405,7 @@ border-image: url(:/images/btn_26_pressed.png) 4;
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="4"> <item row="0" column="5">
<widget class="QToolButton" name="setAllAsReadButton"> <widget class="QToolButton" name="setAllAsReadButton">
<property name="sizePolicy"> <property name="sizePolicy">
<sizepolicy hsizetype="Minimum" vsizetype="Fixed"> <sizepolicy hsizetype="Minimum" vsizetype="Fixed">
@ -506,7 +444,7 @@ border-image: url(:/images/btn_26_pressed.png) 4;
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="5"> <item row="0" column="6">
<widget class="QPushButton" name="autoDownload"> <widget class="QPushButton" name="autoDownload">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
@ -539,6 +477,47 @@ border-image: url(:/images/btn_26_pressed.png) 4;
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1">
<widget class="QToolButton" name="postButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Fixed">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="minimumSize">
<size>
<width>0</width>
<height>25</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>16777215</width>
<height>26</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Post to Channel</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/mail_send.png</normaloff>:/images/mail_send.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>
@ -575,7 +554,7 @@ border-image: url(:/images/btn_26_pressed.png) 4;
<rect> <rect>
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>452</width> <width>484</width>
<height>331</height> <height>331</height>
</rect> </rect>
</property> </property>
@ -617,15 +596,6 @@ border-image: url(:/images/btn_26_pressed.png) 4;
</widget> </widget>
</item> </item>
</layout> </layout>
<action name="actionCreate_Channel">
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/add_channel24.png</normaloff>:/images/add_channel24.png</iconset>
</property>
<property name="text">
<string>Create Channel</string>
</property>
</action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>

View File

@ -135,7 +135,7 @@ ForumsDialog::ForumsDialog(QWidget *parent)
connect( ui.forumTreeWidget, SIGNAL( treeCustomContextMenuRequested( QPoint ) ), this, SLOT( forumListCustomPopupMenu( QPoint ) ) ); connect( ui.forumTreeWidget, SIGNAL( treeCustomContextMenuRequested( QPoint ) ), this, SLOT( forumListCustomPopupMenu( QPoint ) ) );
connect( ui.threadTreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( threadListCustomPopupMenu( QPoint ) ) ); connect( ui.threadTreeWidget, SIGNAL( customContextMenuRequested( QPoint ) ), this, SLOT( threadListCustomPopupMenu( QPoint ) ) );
connect(ui.actionCreate_Forum, SIGNAL(triggered()), this, SLOT(newforum())); connect(ui.newForumButton, SIGNAL(clicked()), this, SLOT(newforum()));
connect(ui.newmessageButton, SIGNAL(clicked()), this, SLOT(createmessage())); connect(ui.newmessageButton, SIGNAL(clicked()), this, SLOT(createmessage()));
connect(ui.newthreadButton, SIGNAL(clicked()), this, SLOT(createthread())); connect(ui.newthreadButton, SIGNAL(clicked()), this, SLOT(createthread()));
@ -181,11 +181,6 @@ ForumsDialog::ForumsDialog(QWidget *parent)
ui.forumName->setFont(m_ForumNameFont); ui.forumName->setFont(m_ForumNameFont);
ui.threadTitle->setFont(m_ForumNameFont); ui.threadTitle->setFont(m_ForumNameFont);
QMenu *forummenu = new QMenu();
forummenu->addAction(ui.actionCreate_Forum);
forummenu->addSeparator();
ui.forumpushButton->setMenu(forummenu);
/* Initialize group tree */ /* Initialize group tree */
ui.forumTreeWidget->initDisplayMenu(ui.displayButton); ui.forumTreeWidget->initDisplayMenu(ui.displayButton);

View File

@ -617,70 +617,6 @@ p, li { white-space: pre-wrap; }
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="5">
<widget class="QPushButton" name="forumpushButton">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Add</string>
</property>
<property name="styleSheet">
<string notr="true">QPushButton::menu-indicator {
subcontrol-origin: padding;
subcontrol-position: bottom right;
}
QPushButton::menu-indicator:pressed, QPushButton::menu-indicator:open {
position: relative;
top: 2px; left: 2px; /* shift the arrow by 2 px */
}
QPushButton:hover {
border: 1px solid #CCCCCC;
}</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/edit_add24.png</normaloff>:/images/edit_add24.png</iconset>
</property>
<property name="default">
<bool>false</bool>
</property>
<property name="flat">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="3">
<widget class="QToolButton" name="newthreadButton">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Start new Thread for Selected Forum</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/mail_new.png</normaloff>:/images/mail_new.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="4"> <item row="0" column="4">
<widget class="QPushButton" name="displayButton"> <widget class="QPushButton" name="displayButton">
<property name="focusPolicy"> <property name="focusPolicy">
@ -713,6 +649,23 @@ p, li { white-space: pre-wrap; }
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="5">
<widget class="QToolButton" name="newForumButton">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Create Forum</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/new_forum16.png</normaloff>:/images/new_forum16.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -1067,7 +1020,7 @@ border: 1px solid #CCCCCC;}</string>
<property name="margin"> <property name="margin">
<number>2</number> <number>2</number>
</property> </property>
<item row="0" column="2"> <item row="0" column="3">
<layout class="QHBoxLayout" name="horizontalLayout"> <layout class="QHBoxLayout" name="horizontalLayout">
<property name="spacing"> <property name="spacing">
<number>2</number> <number>2</number>
@ -1140,7 +1093,7 @@ border-image: url(:/images/closepressed.png)
</item> </item>
</layout> </layout>
</item> </item>
<item row="0" column="3"> <item row="0" column="4">
<widget class="QComboBox" name="filterColumnComboBox"> <widget class="QComboBox" name="filterColumnComboBox">
<property name="minimumSize"> <property name="minimumSize">
<size> <size>
@ -1178,7 +1131,7 @@ border-image: url(:/images/closepressed.png)
</item> </item>
</widget> </widget>
</item> </item>
<item row="0" column="0"> <item row="0" column="1">
<widget class="QToolButton" name="newmessageButton"> <widget class="QToolButton" name="newmessageButton">
<property name="maximumSize"> <property name="maximumSize">
<size> <size>
@ -1192,9 +1145,6 @@ border-image: url(:/images/closepressed.png)
<property name="toolTip"> <property name="toolTip">
<string>Reply Message</string> <string>Reply Message</string>
</property> </property>
<property name="text">
<string/>
</property>
<property name="icon"> <property name="icon">
<iconset resource="images.qrc"> <iconset resource="images.qrc">
<normaloff>:/images/mail_reply.png</normaloff>:/images/mail_reply.png</iconset> <normaloff>:/images/mail_reply.png</normaloff>:/images/mail_reply.png</iconset>
@ -1204,7 +1154,7 @@ border-image: url(:/images/closepressed.png)
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="1"> <item row="0" column="2">
<spacer name="horizontalSpacer"> <spacer name="horizontalSpacer">
<property name="orientation"> <property name="orientation">
<enum>Qt::Horizontal</enum> <enum>Qt::Horizontal</enum>
@ -1220,6 +1170,29 @@ border-image: url(:/images/closepressed.png)
</property> </property>
</spacer> </spacer>
</item> </item>
<item row="0" column="0">
<widget class="QToolButton" name="newthreadButton">
<property name="maximumSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Start new Thread for Selected Forum</string>
</property>
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/mail_new.png</normaloff>:/images/mail_new.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</widget> </widget>
</item> </item>
@ -1258,15 +1231,6 @@ border-image: url(:/images/closepressed.png)
<string>PrintPreview</string> <string>PrintPreview</string>
</property> </property>
</action> </action>
<action name="actionCreate_Forum">
<property name="icon">
<iconset resource="images.qrc">
<normaloff>:/images/new_forum16.png</normaloff>:/images/new_forum16.png</iconset>
</property>
<property name="text">
<string>Create Forum</string>
</property>
</action>
</widget> </widget>
<customwidgets> <customwidgets>
<customwidget> <customwidget>