mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-07 22:02:32 -04:00
Cleaned PopupChatDialog, NetworkDialog, SearchDialog, TransfersDialog, SharedFilesDialog, ChannelFeeds and updated german translation.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3477 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
5e2921ae98
commit
690194d38f
11 changed files with 3125 additions and 3283 deletions
|
@ -159,7 +159,7 @@ NetworkDialog::NetworkDialog(QWidget *parent)
|
||||||
|
|
||||||
setLogInfo(tr("Welcome to RetroShare."), QString::fromUtf8("blue"));
|
setLogInfo(tr("Welcome to RetroShare."), QString::fromUtf8("blue"));
|
||||||
|
|
||||||
QMenu *menu = new QMenu(tr("Menu"));
|
QMenu *menu = new QMenu();
|
||||||
//menu->addAction(ui.actionAddFriend);
|
//menu->addAction(ui.actionAddFriend);
|
||||||
//menu->addAction(ui.actionCopyKey);
|
//menu->addAction(ui.actionCopyKey);
|
||||||
//menu->addAction(ui.actionExportKey);
|
//menu->addAction(ui.actionExportKey);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -158,9 +158,9 @@ QString RemoteDirModel::getFlagsString(uint32_t flags)
|
||||||
{
|
{
|
||||||
switch(flags & (DIR_FLAGS_NETWORK_WIDE|DIR_FLAGS_BROWSABLE))
|
switch(flags & (DIR_FLAGS_NETWORK_WIDE|DIR_FLAGS_BROWSABLE))
|
||||||
{
|
{
|
||||||
case DIR_FLAGS_NETWORK_WIDE: return QString("Anonymous") ;
|
case DIR_FLAGS_NETWORK_WIDE: return tr("Anonymous") ;
|
||||||
case DIR_FLAGS_NETWORK_WIDE | DIR_FLAGS_BROWSABLE: return QString("Anonymous and browsable by friends") ;
|
case DIR_FLAGS_NETWORK_WIDE | DIR_FLAGS_BROWSABLE: return tr("Anonymous and browsable by friends") ;
|
||||||
case DIR_FLAGS_BROWSABLE: return QString("Only browsable by friends") ;
|
case DIR_FLAGS_BROWSABLE: return tr("Only browsable by friends") ;
|
||||||
default:
|
default:
|
||||||
return QString() ;
|
return QString() ;
|
||||||
}
|
}
|
||||||
|
|
|
@ -300,7 +300,7 @@ void SearchDialog::downloadDirectory(const QTreeWidgetItem *item, const QString
|
||||||
std::list<std::string> srcIds;
|
std::list<std::string> srcIds;
|
||||||
|
|
||||||
QString path = QString::fromStdString(rsFiles->getDownloadDirectory())
|
QString path = QString::fromStdString(rsFiles->getDownloadDirectory())
|
||||||
+ tr("/") + base + tr("/");
|
+ "/" + base + "/";
|
||||||
QString cleanPath = QDir::cleanPath(path);
|
QString cleanPath = QDir::cleanPath(path);
|
||||||
|
|
||||||
getSourceFriendsForHash((item->text(SR_HASH_COL)).toStdString(),srcIds) ;
|
getSourceFriendsForHash((item->text(SR_HASH_COL)).toStdString(),srcIds) ;
|
||||||
|
@ -325,7 +325,7 @@ void SearchDialog::downloadDirectory(const QTreeWidgetItem *item, const QString
|
||||||
if (base == tr(""))
|
if (base == tr(""))
|
||||||
path = item->text(SR_NAME_COL);
|
path = item->text(SR_NAME_COL);
|
||||||
else
|
else
|
||||||
path = base + tr("/") + item->text(SR_NAME_COL);
|
path = base + "/" + item->text(SR_NAME_COL);
|
||||||
QString cleanPath = QDir::cleanPath(path);
|
QString cleanPath = QDir::cleanPath(path);
|
||||||
|
|
||||||
// create this folder in download path
|
// create this folder in download path
|
||||||
|
@ -831,7 +831,7 @@ void SearchDialog::insertFile(const std::string& txt,qulonglong searchId, const
|
||||||
anonymousSource = modifiedResultCount.at(1).toInt() + 1;
|
anonymousSource = modifiedResultCount.at(1).toInt() + 1;
|
||||||
}
|
}
|
||||||
anonymousSource = anonymousSource + friendSource;
|
anonymousSource = anonymousSource + friendSource;
|
||||||
modifiedResult = QString::number(friendSource) + tr("/") + QString::number(anonymousSource);
|
modifiedResult = QString::number(friendSource) + "/" + QString::number(anonymousSource);
|
||||||
ui.searchResultWidget->topLevelItem(i)->setText(SR_ID_COL,modifiedResult);
|
ui.searchResultWidget->topLevelItem(i)->setText(SR_ID_COL,modifiedResult);
|
||||||
QTreeWidgetItem *item = ui.searchResultWidget->topLevelItem(i);
|
QTreeWidgetItem *item = ui.searchResultWidget->topLevelItem(i);
|
||||||
found = true ;
|
found = true ;
|
||||||
|
@ -962,7 +962,7 @@ void SearchDialog::insertFile(const std::string& txt,qulonglong searchId, const
|
||||||
}
|
}
|
||||||
|
|
||||||
anonymousSource = anonymousSource + friendSource;
|
anonymousSource = anonymousSource + friendSource;
|
||||||
modifiedResult =QString::number(friendSource) + tr("/") + QString::number(anonymousSource);
|
modifiedResult =QString::number(friendSource) + "/" + QString::number(anonymousSource);
|
||||||
item->setText(SR_ID_COL,modifiedResult);
|
item->setText(SR_ID_COL,modifiedResult);
|
||||||
item->setTextAlignment( SR_ID_COL, Qt::AlignRight );
|
item->setTextAlignment( SR_ID_COL, Qt::AlignRight );
|
||||||
item->setText(SR_SEARCH_ID_COL, sid_hexa);
|
item->setText(SR_SEARCH_ID_COL, sid_hexa);
|
||||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -1,70 +1,68 @@
|
||||||
<ui version="4.0" >
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<class>TrustView</class>
|
<ui version="4.0">
|
||||||
<widget class="QWidget" name="TrustView" >
|
<class>TrustView</class>
|
||||||
<property name="geometry" >
|
<widget class="QWidget" name="TrustView">
|
||||||
<rect>
|
<property name="geometry">
|
||||||
<x>0</x>
|
<rect>
|
||||||
<y>0</y>
|
<x>0</x>
|
||||||
<width>468</width>
|
<y>0</y>
|
||||||
<height>394</height>
|
<width>468</width>
|
||||||
</rect>
|
<height>394</height>
|
||||||
</property>
|
</rect>
|
||||||
<property name="windowTitle" >
|
</property>
|
||||||
<string>Form</string>
|
<layout class="QVBoxLayout" name="verticalLayout">
|
||||||
</property>
|
<item>
|
||||||
<layout class="QVBoxLayout" name="verticalLayout" >
|
<widget class="QTableWidget" name="trustTableTW">
|
||||||
<item>
|
<property name="editTriggers">
|
||||||
<widget class="QTableWidget" name="trustTableTW">
|
<set>QAbstractItemView::NoEditTriggers</set>
|
||||||
<property name="editTriggers">
|
</property>
|
||||||
<set>QAbstractItemView::NoEditTriggers</set>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||||
<item>
|
<item>
|
||||||
<layout class="QHBoxLayout" name="horizontalLayout" >
|
<widget class="Line" name="line">
|
||||||
<item>
|
<property name="orientation">
|
||||||
<widget class="Line" name="line" >
|
<enum>Qt::Vertical</enum>
|
||||||
<property name="orientation" >
|
</property>
|
||||||
<enum>Qt::Vertical</enum>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
<widget class="QLabel" name="label">
|
||||||
<item>
|
<property name="text">
|
||||||
<widget class="QLabel" name="label" >
|
<string>Zoom :</string>
|
||||||
<property name="text" >
|
</property>
|
||||||
<string>Zoom :</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
<widget class="QSlider" name="zoomHS">
|
||||||
<item>
|
<property name="maximum">
|
||||||
<widget class="QSlider" name="zoomHS" >
|
<number>100</number>
|
||||||
<property name="maximum" >
|
</property>
|
||||||
<number>100</number>
|
<property name="orientation">
|
||||||
</property>
|
<enum>Qt::Horizontal</enum>
|
||||||
<property name="orientation" >
|
</property>
|
||||||
<enum>Qt::Horizontal</enum>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
<widget class="QPushButton" name="updatePB">
|
||||||
<item>
|
<property name="text">
|
||||||
<widget class="QPushButton" name="updatePB" >
|
<string>Update</string>
|
||||||
<property name="text" >
|
</property>
|
||||||
<string>Update</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
<item>
|
||||||
</item>
|
<widget class="QLabel" name="showingLabel">
|
||||||
<item>
|
<property name="text">
|
||||||
<widget class="QLabel" name="showingLabel" >
|
<string>Showing: whole network</string>
|
||||||
<property name="text" >
|
</property>
|
||||||
<string>Showing: whole network</string>
|
</widget>
|
||||||
</property>
|
</item>
|
||||||
</widget>
|
</layout>
|
||||||
</item>
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</item>
|
</widget>
|
||||||
</layout>
|
<layoutdefault spacing="2" margin="3"/>
|
||||||
</widget>
|
<resources/>
|
||||||
<layoutdefault spacing="2" margin="3" />
|
<connections/>
|
||||||
<resources/>
|
</ui>
|
||||||
<connections/>
|
|
||||||
</ui>
|
|
||||||
|
|
|
@ -126,7 +126,6 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name,
|
||||||
connect(ui.fontButton, SIGNAL(clicked()), this, SLOT(getFont()));
|
connect(ui.fontButton, SIGNAL(clicked()), this, SLOT(getFont()));
|
||||||
connect(ui.colorButton, SIGNAL(clicked()), this, SLOT(setColor()));
|
connect(ui.colorButton, SIGNAL(clicked()), this, SLOT(setColor()));
|
||||||
connect(ui.emoteiconButton, SIGNAL(clicked()), this, SLOT(smileyWidget()));
|
connect(ui.emoteiconButton, SIGNAL(clicked()), this, SLOT(smileyWidget()));
|
||||||
connect(ui.styleButton, SIGNAL(clicked()), SLOT(changeStyle()));
|
|
||||||
connect(ui.actionSave_Chat_History, SIGNAL(triggered()), this, SLOT(fileSaveAs()));
|
connect(ui.actionSave_Chat_History, SIGNAL(triggered()), this, SLOT(fileSaveAs()));
|
||||||
|
|
||||||
connect(ui.textBrowser, SIGNAL(anchorClicked(const QUrl &)), SLOT(anchorClicked(const QUrl &)));
|
connect(ui.textBrowser, SIGNAL(anchorClicked(const QUrl &)), SLOT(anchorClicked(const QUrl &)));
|
||||||
|
@ -134,9 +133,6 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name,
|
||||||
connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(const QString&, int)), this, SLOT(updateStatus(const QString&, int)));
|
connect(NotifyQt::getInstance(), SIGNAL(peerStatusChanged(const QString&, int)), this, SLOT(updateStatus(const QString&, int)));
|
||||||
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewCustomStateString(const QString&, const QString&)), this, SLOT(updatePeersCustomStateString(const QString&, const QString&)));
|
connect(NotifyQt::getInstance(), SIGNAL(peerHasNewCustomStateString(const QString&, const QString&)), this, SLOT(updatePeersCustomStateString(const QString&, const QString&)));
|
||||||
|
|
||||||
// hide until it works
|
|
||||||
ui.styleButton->setVisible(false);
|
|
||||||
|
|
||||||
std::cerr << "Connecting custom context menu" << std::endl;
|
std::cerr << "Connecting custom context menu" << std::endl;
|
||||||
ui.chattextEdit->setContextMenuPolicy(Qt::CustomContextMenu) ;
|
ui.chattextEdit->setContextMenuPolicy(Qt::CustomContextMenu) ;
|
||||||
connect(ui.chattextEdit,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(contextMenu(QPoint)));
|
connect(ui.chattextEdit,SIGNAL(customContextMenuRequested(QPoint)),this,SLOT(contextMenu(QPoint)));
|
||||||
|
@ -157,7 +153,6 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name,
|
||||||
ui.textitalicButton->setIcon(QIcon(QString(":/images/edit-italic.png")));
|
ui.textitalicButton->setIcon(QIcon(QString(":/images/edit-italic.png")));
|
||||||
ui.fontButton->setIcon(QIcon(QString(":/images/fonts.png")));
|
ui.fontButton->setIcon(QIcon(QString(":/images/fonts.png")));
|
||||||
ui.emoteiconButton->setIcon(QIcon(QString(":/images/emoticons/kopete/kopete020.png")));
|
ui.emoteiconButton->setIcon(QIcon(QString(":/images/emoticons/kopete/kopete020.png")));
|
||||||
ui.styleButton->setIcon(QIcon(QString(":/images/looknfeel.png")));
|
|
||||||
|
|
||||||
ui.textboldButton->setCheckable(true);
|
ui.textboldButton->setCheckable(true);
|
||||||
ui.textunderlineButton->setCheckable(true);
|
ui.textunderlineButton->setCheckable(true);
|
||||||
|
@ -165,10 +160,7 @@ PopupChatDialog::PopupChatDialog(std::string id, std::string name,
|
||||||
|
|
||||||
setAcceptDrops(true);
|
setAcceptDrops(true);
|
||||||
ui.chattextEdit->setAcceptDrops(false);
|
ui.chattextEdit->setAcceptDrops(false);
|
||||||
|
|
||||||
/*Disabled style Button when will switch chat style RetroShare will crash need to be fix */
|
|
||||||
//ui.styleButton->setEnabled(false);
|
|
||||||
|
|
||||||
QMenu * toolmenu = new QMenu();
|
QMenu * toolmenu = new QMenu();
|
||||||
toolmenu->addAction(ui.actionClear_Chat);
|
toolmenu->addAction(ui.actionClear_Chat);
|
||||||
toolmenu->addAction(ui.actionSave_Chat_History);
|
toolmenu->addAction(ui.actionSave_Chat_History);
|
||||||
|
@ -632,7 +624,7 @@ void PopupChatDialog::sendChat()
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef CHAT_DEBUG
|
#ifdef CHAT_DEBUG
|
||||||
std::cout << "PopupChatDialog:sendChat " << styleHtm.toStdString() << std::endl;
|
std::cout << "PopupChatDialog:sendChat " << std::endl;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
addChatMsg(ownId, time(NULL), msg);
|
addChatMsg(ownId, time(NULL), msg);
|
||||||
|
@ -653,12 +645,12 @@ void PopupChatDialog::showAvatarFrame(bool show)
|
||||||
ui.avatarframe->setVisible(true);
|
ui.avatarframe->setVisible(true);
|
||||||
ui.avatarFrameButton->setChecked(true);
|
ui.avatarFrameButton->setChecked(true);
|
||||||
ui.avatarFrameButton->setToolTip(tr("Hide Avatar"));
|
ui.avatarFrameButton->setToolTip(tr("Hide Avatar"));
|
||||||
ui.avatarFrameButton->setIcon(QIcon(tr(":images/hide_toolbox_frame.png")));
|
ui.avatarFrameButton->setIcon(QIcon(":images/hide_toolbox_frame.png"));
|
||||||
} else {
|
} else {
|
||||||
ui.avatarframe->setVisible(false);
|
ui.avatarframe->setVisible(false);
|
||||||
ui.avatarFrameButton->setChecked(false);
|
ui.avatarFrameButton->setChecked(false);
|
||||||
ui.avatarFrameButton->setToolTip(tr("Show Avatar"));
|
ui.avatarFrameButton->setToolTip(tr("Show Avatar"));
|
||||||
ui.avatarFrameButton->setIcon(QIcon(tr(":images/show_toolbox_frame.png")));
|
ui.avatarFrameButton->setIcon(QIcon(":images/show_toolbox_frame.png"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -741,31 +733,6 @@ void PopupChatDialog::on_actionClear_Chat_triggered()
|
||||||
ui.textBrowser->clear();
|
ui.textBrowser->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void PopupChatDialog::changeStyle()
|
|
||||||
{
|
|
||||||
// QString newStyle = QFileDialog::getOpenFileName(this, tr("Open Style"),
|
|
||||||
// appDir + "/style/chat/",
|
|
||||||
// tr("Styles (*.htm)"));
|
|
||||||
// if(!newStyle.isEmpty())
|
|
||||||
// {
|
|
||||||
// QString wholeChat;
|
|
||||||
// styleHtm = newStyle;
|
|
||||||
//
|
|
||||||
//
|
|
||||||
// for(int i = 0; i < history.size(); i+=4)
|
|
||||||
// {
|
|
||||||
// QString formatMsg = loadEmptyStyle();
|
|
||||||
// wholeChat += formatMsg.replace("%timestamp%", history.at(i+1))
|
|
||||||
// .replace("%name%", history.at(i+2))
|
|
||||||
// .replace("%message%", history.at(i+3)) + "\n";
|
|
||||||
// }
|
|
||||||
// ui.textBrowser->setHtml(wholeChat);
|
|
||||||
// }
|
|
||||||
// QTextCursor cursor = ui.textBrowser->textCursor();
|
|
||||||
// cursor.movePosition(QTextCursor::End);
|
|
||||||
// ui.textBrowser->setTextCursor(cursor);
|
|
||||||
}
|
|
||||||
|
|
||||||
void PopupChatDialog::updatePeerAvatar(const std::string& peer_id)
|
void PopupChatDialog::updatePeerAvatar(const std::string& peer_id)
|
||||||
{
|
{
|
||||||
#ifdef CHAT_DEBUG
|
#ifdef CHAT_DEBUG
|
||||||
|
|
|
@ -59,7 +59,6 @@ public slots:
|
||||||
void smileyWidget();
|
void smileyWidget();
|
||||||
void addSmiley();
|
void addSmiley();
|
||||||
|
|
||||||
void changeStyle();
|
|
||||||
void fileHashingFinished(AttachFileItem* file);
|
void fileHashingFinished(AttachFileItem* file);
|
||||||
|
|
||||||
void resetStatusBar() ;
|
void resetStatusBar() ;
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Binary file not shown.
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue