Added a headerFrame to Create distant chat

Enabled default context menu icons for Subscribe, Unsubscribe actions
Added a default stylesheet for the info label

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6686 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2013-09-05 00:57:48 +00:00
parent af229eb9a7
commit 40ded5d97d
6 changed files with 162 additions and 97 deletions

View File

@ -32,16 +32,16 @@
#define TYPE_FOLDER 0
#define TYPE_LOBBY 1
#define IMAGE_CREATE ""
#define IMAGE_PUBLIC ":/images/chat_x24.png"
#define IMAGE_PRIVATE ":/images/chat_red24.png"
#define IMAGE_UNSUBSCRIBE ""
#define IMAGE_SUBSCRIBE ""
#define IMAGE_PEER_ENTERING ":images/user/add_user24.png"
#define IMAGE_PEER_LEAVING ":images/user/remove_user24.png"
#define IMAGE_TYPING ":images/typing.png"
#define IMAGE_MESSAGE ":images/chat.png"
#define IMAGE_AUTOSUBSCRIBE ":images/accepted16.png"
#define IMAGE_CREATE ""
#define IMAGE_PUBLIC ":/images/chat_x24.png"
#define IMAGE_PRIVATE ":/images/chat_red24.png"
#define IMAGE_SUBSCRIBE ":/images/edit_add24.png"
#define IMAGE_UNSUBSCRIBE ":/images/cancel.png"
#define IMAGE_PEER_ENTERING ":images/user/add_user24.png"
#define IMAGE_PEER_LEAVING ":images/user/remove_user24.png"
#define IMAGE_TYPING ":images/typing.png"
#define IMAGE_MESSAGE ":images/chat.png"
#define IMAGE_AUTOSUBSCRIBE ":images/accepted16.png"
ChatLobbyWidget::ChatLobbyWidget(QWidget *parent, Qt::WFlags flags)
: RsAutoUpdatePage(5000, parent, flags)
@ -173,7 +173,7 @@ void ChatLobbyWidget::lobbyTreeWidgetCustomPopupMenu(QPoint)
if (item->data(COLUMN_DATA, ROLE_AUTOSUBSCRIBE).toBool()) {
contextMnu.addAction(QIcon(IMAGE_AUTOSUBSCRIBE), tr("Remove Auto Subscribe"), this, SLOT(autoSubscribeItem()));
} else {
contextMnu.addAction(QIcon(IMAGE_UNSUBSCRIBE), tr("Add Auto Subscribe"), this, SLOT(autoSubscribeItem()));
contextMnu.addAction(QIcon(IMAGE_SUBSCRIBE), tr("Add Auto Subscribe"), this, SLOT(autoSubscribeItem()));
}
}

View File

@ -37,6 +37,9 @@ CreateMsgLinkDialog::CreateMsgLinkDialog()
setAttribute(Qt::WA_DeleteOnClose, false);
QObject::connect(_create_link_PB,SIGNAL(clicked()),this,SLOT(createLink())) ;
headerFrame->setHeaderImage(QPixmap(":/images/d-chat64.png"));
headerFrame->setHeaderText(tr("Create distant chat"));
friendSelectionWidget->setModus(FriendSelectionWidget::MODUS_SINGLE) ;
friendSelectionWidget->setShowType(FriendSelectionWidget::SHOW_NON_FRIEND_GPG | FriendSelectionWidget::SHOW_GPG) ;

View File

@ -13,9 +13,31 @@
<property name="windowTitle">
<string>Create distant chat invite</string>
</property>
<layout class="QVBoxLayout" name="verticalLayout_6">
<item>
<layout class="QGridLayout" name="gridLayout_2">
<property name="margin">
<number>0</number>
</property>
<property name="spacing">
<number>0</number>
</property>
<item row="0" column="0">
<widget class="HeaderFrame" name="headerFrame">
<property name="frameShape">
<enum>QFrame::NoFrame</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Plain</enum>
</property>
</widget>
</item>
<item row="1" column="0">
<widget class="QFrame" name="_new_link_F">
<property name="font">
<font>
<family>Tahoma</family>
<pointsize>9</pointsize>
</font>
</property>
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
@ -24,7 +46,12 @@
</property>
<layout class="QVBoxLayout" name="verticalLayout_5">
<item>
<widget class="QLabel" name="label_3">
<widget class="QLabel" name="distantchatinfo_label">
<property name="font">
<font>
<pointsize>10</pointsize>
</font>
</property>
<property name="text">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p align=&quot;justify&quot;&gt;To create a private chat invite for a non-friend person, select his key below and a validity time for your invite, then press &amp;quot;Create&amp;quot;. The invite will contain the information required to open a tunnel to chat with you. &lt;/p&gt;&lt;p align=&quot;justify&quot;&gt;The invite is encrypted, and does not reveal your identity. Only the selected peer can decrypt the link, and use it to contact you.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
@ -37,95 +64,113 @@
<property name="wordWrap">
<bool>true</bool>
</property>
<property name="margin">
<number>2</number>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Invite type:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="_link_type_CB">
<item>
<property name="text">
<string>Private chat</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Validity time :</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="_validity_time_SB">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>30</number>
</property>
<property name="value">
<number>5</number>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="_validity_time_CB">
<item>
<property name="text">
<string>hour</string>
</property>
</item>
<item>
<property name="text">
<string>day</string>
</property>
</item>
<item>
<property name="text">
<string>week</string>
</property>
</item>
<item>
<property name="text">
<string>month</string>
</property>
</item>
<item>
<property name="text">
<string>year</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QPushButton" name="_create_link_PB">
<property name="text">
<string>Create!</string>
</property>
</widget>
</item>
</layout>
</item>
<item>
<widget class="FriendSelectionWidget" name="friendSelectionWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
<item row="2" column="0">
<widget class="QFrame" name="frame">
<property name="frameShape">
<enum>QFrame::StyledPanel</enum>
</property>
<property name="frameShadow">
<enum>QFrame::Raised</enum>
</property>
<layout class="QGridLayout" name="gridLayout">
<property name="topMargin">
<number>0</number>
</property>
<item row="0" column="0">
<layout class="QHBoxLayout" name="horizontalLayout">
<item>
<widget class="QLabel" name="label">
<property name="text">
<string>Invite type:</string>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="_link_type_CB">
<item>
<property name="text">
<string>Private chat</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QLabel" name="label_2">
<property name="text">
<string>Validity time :</string>
</property>
</widget>
</item>
<item>
<widget class="QSpinBox" name="_validity_time_SB">
<property name="minimum">
<number>1</number>
</property>
<property name="maximum">
<number>30</number>
</property>
<property name="value">
<number>5</number>
</property>
</widget>
</item>
<item>
<widget class="QComboBox" name="_validity_time_CB">
<item>
<property name="text">
<string>hour</string>
</property>
</item>
<item>
<property name="text">
<string>day</string>
</property>
</item>
<item>
<property name="text">
<string>week</string>
</property>
</item>
<item>
<property name="text">
<string>month</string>
</property>
</item>
<item>
<property name="text">
<string>year</string>
</property>
</item>
</widget>
</item>
<item>
<widget class="QPushButton" name="_create_link_PB">
<property name="text">
<string>Create!</string>
</property>
</widget>
</item>
</layout>
</item>
<item row="1" column="0">
<widget class="FriendSelectionWidget" name="friendSelectionWidget" native="true">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Expanding">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
</widget>
</item>
</layout>
</widget>
</item>
</layout>
@ -137,6 +182,12 @@
<header>gui/common/FriendSelectionWidget.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>HeaderFrame</class>
<extends>QFrame</extends>
<header>gui/common/headerframe.h</header>
<container>1</container>
</customwidget>
</customwidgets>
<resources/>
<connections/>

View File

@ -3,6 +3,7 @@
<file>images/add_chat24.png</file>
<file>images/inbox_22.png</file>
<file>images/blue_lock.png</file>
<file>images/d-chat64.png</file>
<file>images/edit_24.png</file>
<file>images/stock_signature_bad.png</file>
<file>images/stock_signature_ok.png</file>

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.4 KiB

View File

@ -91,6 +91,16 @@ MessengerWindow QFrame#logoFrame {
border: 1px solid #CCCCCC;
}
/* Create Distant Chat Invite */
CreateMsgLinkDialog QLabel#distantchatinfo_label
{
border: 1px solid #DCDC41;
border-radius: 6px;
background: #FFFFD7;
background-color: qlineargradient(x1:0, y1:0, x2:0, y2:1, stop:0 #FFFFD7, stop:1 #FFFFB2);
}
/* Chat lobby */
ChatLobbyDialog QFrame#participantsFrame {