mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-25 06:40:58 -04:00
Cleaned ForumsDialog and MessagesDialog and updated german translation.
New class for working with tag translation - TagDefs. git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3476 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
1e3a1d7ddb
commit
5e2921ae98
11 changed files with 3287 additions and 3223 deletions
|
@ -19,11 +19,13 @@
|
|||
* Boston, MA 02110-1301, USA.
|
||||
****************************************************************/
|
||||
|
||||
#include "MessagePage.h"
|
||||
#include "rshare.h"
|
||||
#include "rsharesettings.h"
|
||||
#include "retroshare/rsmsgs.h"
|
||||
|
||||
#include "MessagePage.h"
|
||||
#include "gui/common/TagDefs.h"
|
||||
|
||||
#include <algorithm>
|
||||
|
||||
#include "../MainWindow.h"
|
||||
|
@ -104,12 +106,8 @@ void MessagePage::fillTags()
|
|||
|
||||
std::map<uint32_t, std::pair<std::string, uint32_t> >::iterator Tag;
|
||||
for (Tag = m_pTags->types.begin(); Tag != m_pTags->types.end(); Tag++) {
|
||||
QString text;
|
||||
if (Tag->first < RS_MSGTAGTYPE_USER) {
|
||||
text = tr(Tag->second.first.c_str());
|
||||
} else {
|
||||
text = QString::fromStdString(Tag->second.first);
|
||||
}
|
||||
QString text = TagDefs::name(Tag->first, Tag->second.first);
|
||||
|
||||
QListWidgetItem *pItemWidget = new QListWidgetItem(text, ui.tags_listWidget);
|
||||
pItemWidget->setTextColor(QColor(Tag->second.second));
|
||||
pItemWidget->setData(Qt::UserRole, Tag->first);
|
||||
|
@ -123,12 +121,8 @@ void MessagePage::addTag()
|
|||
std::map<uint32_t, std::pair<std::string, uint32_t> >::iterator Tag;
|
||||
Tag = m_pTags->types.find(TagDlg.m_nId);
|
||||
if (Tag != m_pTags->types.end()) {
|
||||
QString text;
|
||||
if (Tag->first < RS_MSGTAGTYPE_USER) {
|
||||
text = tr(Tag->second.first.c_str());
|
||||
} else {
|
||||
text = QString::fromStdString(Tag->second.first);
|
||||
}
|
||||
QString text = TagDefs::name(Tag->first, Tag->second.first);
|
||||
|
||||
QListWidgetItem *pItemWidget = new QListWidgetItem(text, ui.tags_listWidget);
|
||||
pItemWidget->setTextColor(QColor(Tag->second.second));
|
||||
pItemWidget->setData(Qt::UserRole, TagDlg.m_nId);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue