MessageComposer:

- Removed standard subject "No Title"
- Corrected tabstops
- Set focus to subject after asking "Do you want to send the message without a subject ?"

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4005 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2011-01-31 20:35:09 +00:00
parent 23782a9d28
commit 3f67782ce1
2 changed files with 114 additions and 57 deletions

View File

@ -951,8 +951,6 @@ MessageComposer *MessageComposer::newMsg(const std::string &msgId /*= ""*/)
} }
msgComposer->ui.msgText->document()->setModified(false); msgComposer->ui.msgText->document()->setModified(false);
} else {
msgComposer->insertTitleText(tr("No Title"));
} }
msgComposer->calculateTitle(); msgComposer->calculateTitle();
@ -1130,6 +1128,7 @@ bool MessageComposer::sendMessage_internal(bool bDraftbox)
/* check for existing title */ /* check for existing title */
if (bDraftbox == false && mi.title.empty()) { if (bDraftbox == false && mi.title.empty()) {
if (QMessageBox::warning(this, tr("RetroShare"), tr("Do you want to send the message without a subject ?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No) { if (QMessageBox::warning(this, tr("RetroShare"), tr("Do you want to send the message without a subject ?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::No) == QMessageBox::No) {
ui.titleEdit->setFocus();
return false; // Don't send with an empty subject return false; // Don't send with an empty subject
} }
} }

View File

@ -7,7 +7,7 @@
<x>0</x> <x>0</x>
<y>0</y> <y>0</y>
<width>796</width> <width>796</width>
<height>564</height> <height>588</height>
</rect> </rect>
</property> </property>
<property name="contextMenuPolicy"> <property name="contextMenuPolicy">
@ -17,7 +17,7 @@
<string>Compose</string> <string>Compose</string>
</property> </property>
<property name="windowIcon"> <property name="windowIcon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/folder-draft.png</normaloff>:/images/folder-draft.png</iconset> <normaloff>:/images/folder-draft.png</normaloff>:/images/folder-draft.png</iconset>
</property> </property>
<property name="styleSheet"> <property name="styleSheet">
@ -108,6 +108,9 @@
<family>MS Shell Dlg 2</family> <family>MS Shell Dlg 2</family>
</font> </font>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Reset</string> <string>Reset</string>
</property> </property>
@ -299,6 +302,9 @@ border: 1px solid #CCCCCC;}</string>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<item> <item>
<property name="text"> <property name="text">
<string>Paragraph</string> <string>Paragraph</string>
@ -349,6 +355,9 @@ border: 1px solid #CCCCCC;}</string>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
</widget> </widget>
</item> </item>
<item row="0" column="2"> <item row="0" column="2">
@ -359,6 +368,9 @@ border: 1px solid #CCCCCC;}</string>
<height>16777215</height> <height>16777215</height>
</size> </size>
</property> </property>
<property name="focusPolicy">
<enum>Qt::ClickFocus</enum>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Font size</string> <string>Font size</string>
</property> </property>
@ -372,6 +384,9 @@ border: 1px solid #CCCCCC;}</string>
<height>1677</height> <height>1677</height>
</size> </size>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Increase font size</string> <string>Increase font size</string>
</property> </property>
@ -379,7 +394,7 @@ border: 1px solid #CCCCCC;}</string>
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/textedit/format_font_size_more.png</normaloff>:/images/textedit/format_font_size_more.png</iconset> <normaloff>:/images/textedit/format_font_size_more.png</normaloff>:/images/textedit/format_font_size_more.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
@ -401,6 +416,9 @@ border: 1px solid #CCCCCC;}</string>
<height>167</height> <height>167</height>
</size> </size>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Decrease font size</string> <string>Decrease font size</string>
</property> </property>
@ -408,7 +426,7 @@ border: 1px solid #CCCCCC;}</string>
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/textedit/format_font_size_less.png</normaloff>:/images/textedit/format_font_size_less.png</iconset> <normaloff>:/images/textedit/format_font_size_less.png</normaloff>:/images/textedit/format_font_size_less.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
@ -436,6 +454,9 @@ border: 1px solid #CCCCCC;}</string>
<height>1677</height> <height>1677</height>
</size> </size>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Bold</string> <string>Bold</string>
</property> </property>
@ -443,7 +464,7 @@ border: 1px solid #CCCCCC;}</string>
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/textedit/textbold.png</normaloff>:/images/textedit/textbold.png</iconset> <normaloff>:/images/textedit/textbold.png</normaloff>:/images/textedit/textbold.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
@ -460,44 +481,6 @@ border: 1px solid #CCCCCC;}</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="7">
<widget class="QToolButton" name="underlinebtn">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>167</width>
<height>167</height>
</size>
</property>
<property name="toolTip">
<string>Underline</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset>
<normaloff>:/images/textedit/textunder.png</normaloff>:/images/textedit/textunder.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item row="0" column="8"> <item row="0" column="8">
<widget class="QToolButton" name="italicbtn"> <widget class="QToolButton" name="italicbtn">
<property name="minimumSize"> <property name="minimumSize">
@ -512,6 +495,9 @@ border: 1px solid #CCCCCC;}</string>
<height>167</height> <height>167</height>
</size> </size>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Italic</string> <string>Italic</string>
</property> </property>
@ -519,7 +505,7 @@ border: 1px solid #CCCCCC;}</string>
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/textedit/textitalic.png</normaloff>:/images/textedit/textitalic.png</iconset> <normaloff>:/images/textedit/textitalic.png</normaloff>:/images/textedit/textitalic.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
@ -550,6 +536,9 @@ border: 1px solid #CCCCCC;}</string>
<height>167</height> <height>167</height>
</size> </size>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Select Color</string> <string>Select Color</string>
</property> </property>
@ -575,6 +564,9 @@ border: 1px solid #CCCCCC;}</string>
<height>167</height> <height>167</height>
</size> </size>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Alignment</string> <string>Alignment</string>
</property> </property>
@ -609,6 +601,9 @@ border: 1px solid #CCCCCC;}</string>
<height>167</height> <height>167</height>
</size> </size>
</property> </property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Add a Image</string> <string>Add a Image</string>
</property> </property>
@ -616,7 +611,7 @@ border: 1px solid #CCCCCC;}</string>
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/add_image24.png</normaloff>:/images/add_image24.png</iconset> <normaloff>:/images/add_image24.png</normaloff>:/images/add_image24.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
@ -632,6 +627,9 @@ border: 1px solid #CCCCCC;}</string>
</item> </item>
<item row="0" column="9"> <item row="0" column="9">
<widget class="QToolButton" name="codeButton"> <widget class="QToolButton" name="codeButton">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip"> <property name="toolTip">
<string>Sets text font to code style</string> <string>Sets text font to code style</string>
</property> </property>
@ -639,7 +637,7 @@ border: 1px solid #CCCCCC;}</string>
<string/> <string/>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/textedit/hi22-action-format-text-code.png</normaloff>:/images/textedit/hi22-action-format-text-code.png</iconset> <normaloff>:/images/textedit/hi22-action-format-text-code.png</normaloff>:/images/textedit/hi22-action-format-text-code.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
@ -668,8 +666,11 @@ border: 1px solid #CCCCCC;}</string>
</item> </item>
<item row="0" column="3"> <item row="0" column="3">
<widget class="QToolButton" name="emoticonButton"> <widget class="QToolButton" name="emoticonButton">
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/emoticons/kopete/kopete020.png</normaloff>:/images/emoticons/kopete/kopete020.png</iconset> <normaloff>:/images/emoticons/kopete/kopete020.png</normaloff>:/images/emoticons/kopete/kopete020.png</iconset>
</property> </property>
<property name="iconSize"> <property name="iconSize">
@ -683,6 +684,47 @@ border: 1px solid #CCCCCC;}</string>
</property> </property>
</widget> </widget>
</item> </item>
<item row="0" column="7">
<widget class="QToolButton" name="underlinebtn">
<property name="minimumSize">
<size>
<width>0</width>
<height>0</height>
</size>
</property>
<property name="maximumSize">
<size>
<width>167</width>
<height>167</height>
</size>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Underline</string>
</property>
<property name="text">
<string/>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/textedit/textunder.png</normaloff>:/images/textedit/textunder.png</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="checkable">
<bool>true</bool>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
</layout> </layout>
</item> </item>
</layout> </layout>
@ -751,6 +793,9 @@ border: 1px solid #CCCCCC;}</string>
<height>68</height> <height>68</height>
</size> </size>
</property> </property>
<property name="tabKeyNavigation">
<bool>false</bool>
</property>
<property name="selectionMode"> <property name="selectionMode">
<enum>QAbstractItemView::SingleSelection</enum> <enum>QAbstractItemView::SingleSelection</enum>
</property> </property>
@ -919,7 +964,7 @@ border: 1px solid #CCCCCC;}</string>
</widget> </widget>
<action name="actionSend"> <action name="actionSend">
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/send24.png</normaloff>:/images/send24.png</iconset> <normaloff>:/images/send24.png</normaloff>:/images/send24.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -931,7 +976,7 @@ border: 1px solid #CCCCCC;}</string>
</action> </action>
<action name="actionReply"> <action name="actionReply">
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/replymail24.png</normaloff>:/images/replymail24.png</iconset> <normaloff>:/images/replymail24.png</normaloff>:/images/replymail24.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -940,7 +985,7 @@ border: 1px solid #CCCCCC;}</string>
</action> </action>
<action name="actionContactsView"> <action name="actionContactsView">
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/contacts24.png</normaloff>:/images/contacts24.png</iconset> <normaloff>:/images/contacts24.png</normaloff>:/images/contacts24.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -952,7 +997,7 @@ border: 1px solid #CCCCCC;}</string>
</action> </action>
<action name="actionSaveas"> <action name="actionSaveas">
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/save24.png</normaloff>:/images/save24.png</iconset> <normaloff>:/images/save24.png</normaloff>:/images/save24.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -964,7 +1009,7 @@ border: 1px solid #CCCCCC;}</string>
</action> </action>
<action name="actionAttach"> <action name="actionAttach">
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/attach.png</normaloff>:/images/attach.png</iconset> <normaloff>:/images/attach.png</normaloff>:/images/attach.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -979,7 +1024,7 @@ border: 1px solid #CCCCCC;}</string>
<bool>true</bool> <bool>true</bool>
</property> </property>
<property name="icon"> <property name="icon">
<iconset> <iconset resource="../images.qrc">
<normaloff>:/images/quote_24.png</normaloff>:/images/quote_24.png</iconset> <normaloff>:/images/quote_24.png</normaloff>:/images/quote_24.png</iconset>
</property> </property>
<property name="text"> <property name="text">
@ -991,10 +1036,23 @@ border: 1px solid #CCCCCC;}</string>
</action> </action>
</widget> </widget>
<tabstops> <tabstops>
<tabstop>msgSendList</tabstop> <tabstop>recipientWidget</tabstop>
<tabstop>titleEdit</tabstop>
<tabstop>msgText</tabstop> <tabstop>msgText</tabstop>
<tabstop>msgFileList</tabstop> <tabstop>msgFileList</tabstop>
<tabstop>filterPatternLineEdit</tabstop>
<tabstop>msgSendList</tabstop>
<tabstop>addToButton</tabstop>
<tabstop>addCcButton</tabstop>
<tabstop>addBccButton</tabstop>
<tabstop>addRecommendButton</tabstop>
<tabstop>comboSize</tabstop>
<tabstop>comboStyle</tabstop>
<tabstop>comboFont</tabstop>
<tabstop>hashBox</tabstop>
</tabstops> </tabstops>
<resources/> <resources>
<include location="../images.qrc"/>
</resources>
<connections/> <connections/>
</ui> </ui>