mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-28 08:59:37 -05:00
Merge pull request #1620 from csoler/v0.6-ImprovedGUI
V0.6 improved gui
This commit is contained in:
commit
acdc8089ec
@ -22,6 +22,7 @@
|
|||||||
|
|
||||||
#include <QPixmap>
|
#include <QPixmap>
|
||||||
#include <QCloseEvent>
|
#include <QCloseEvent>
|
||||||
|
#include <QMenu>
|
||||||
|
|
||||||
#include "PopupChatWindow.h"
|
#include "PopupChatWindow.h"
|
||||||
#include "ChatDialog.h"
|
#include "ChatDialog.h"
|
||||||
@ -75,21 +76,30 @@ PopupChatWindow::PopupChatWindow(bool tabbed, QWidget *parent, Qt::WindowFlags f
|
|||||||
|
|
||||||
ui.tabWidget->setVisible(tabbedWindow);
|
ui.tabWidget->setVisible(tabbedWindow);
|
||||||
|
|
||||||
if (Settings->getChatFlags() & RS_CHAT_TABBED_WINDOW) {
|
// if (Settings->getChatFlags() & RS_CHAT_TABBED_WINDOW) {
|
||||||
ui.actionDockTab->setVisible(tabbedWindow == false);
|
// ui.actionDockTab->setVisible(tabbedWindow == false);
|
||||||
ui.actionUndockTab->setVisible(tabbedWindow);
|
// ui.actionUndockTab->setVisible(tabbedWindow);
|
||||||
} else {
|
// } else {
|
||||||
ui.actionDockTab->setVisible(false);
|
// ui.actionDockTab->setVisible(false);
|
||||||
ui.actionUndockTab->setVisible(false);
|
// ui.actionUndockTab->setVisible(false);
|
||||||
}
|
//
|
||||||
|
// }
|
||||||
|
|
||||||
|
// ui.actionAvatar->setVisible(false); // removed because it is already handled by clicking on your own avatar.
|
||||||
|
// ui.actionSetOnTop->setVisible(false);// removed, because the window manager should handle this already.
|
||||||
|
// ui.actionColor->setVisible(false);// moved to the context menu
|
||||||
|
|
||||||
|
ui.chattoolBar->hide(); // no widgets left!
|
||||||
|
|
||||||
setAttribute(Qt::WA_DeleteOnClose, true);
|
setAttribute(Qt::WA_DeleteOnClose, true);
|
||||||
|
|
||||||
connect(ui.actionAvatar, SIGNAL(triggered()),this, SLOT(getAvatar()));
|
// connect(ui.actionAvatar, SIGNAL(triggered()),this, SLOT(getAvatar()));
|
||||||
connect(ui.actionColor, SIGNAL(triggered()), this, SLOT(setStyle()));
|
// connect(ui.actionColor, SIGNAL(triggered()), this, SLOT(setStyle()));
|
||||||
connect(ui.actionDockTab, SIGNAL(triggered()), this, SLOT(dockTab()));
|
// connect(ui.actionDockTab, SIGNAL(triggered()), this, SLOT(dockTab()));
|
||||||
connect(ui.actionUndockTab, SIGNAL(triggered()), this, SLOT(undockTab()));
|
// connect(ui.actionUndockTab, SIGNAL(triggered()), this, SLOT(undockTab()));
|
||||||
connect(ui.actionSetOnTop, SIGNAL(toggled(bool)), this, SLOT(setOnTop()));
|
// connect(ui.actionSetOnTop, SIGNAL(toggled(bool)), this, SLOT(setOnTop()));
|
||||||
|
|
||||||
|
connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(showContextMenu(QPoint)));
|
||||||
|
|
||||||
connect(ui.tabWidget, SIGNAL(tabChanged(ChatDialog*)), this, SLOT(tabChanged(ChatDialog*)));
|
connect(ui.tabWidget, SIGNAL(tabChanged(ChatDialog*)), this, SLOT(tabChanged(ChatDialog*)));
|
||||||
connect(ui.tabWidget, SIGNAL(tabClosed(ChatDialog*)), this, SLOT(tabClosed(ChatDialog*)));
|
connect(ui.tabWidget, SIGNAL(tabClosed(ChatDialog*)), this, SLOT(tabClosed(ChatDialog*)));
|
||||||
@ -102,6 +112,21 @@ PopupChatWindow::PopupChatWindow(bool tabbed, QWidget *parent, Qt::WindowFlags f
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void PopupChatWindow::showContextMenu(QPoint)
|
||||||
|
{
|
||||||
|
QMenu contextMnu(this);
|
||||||
|
contextMnu.addAction(QIcon(":/images/highlight.png"),tr("Choose window color..."),this,SLOT(setStyle()));
|
||||||
|
|
||||||
|
if (Settings->getChatFlags() & RS_CHAT_TABBED_WINDOW)
|
||||||
|
{
|
||||||
|
if(tabbedWindow)
|
||||||
|
contextMnu.addAction(QIcon(":/images/tab-dock.png"),tr("Dock window"),this,SLOT(docTab()));
|
||||||
|
|
||||||
|
contextMnu.addAction(QIcon(":/images/tab-undock.png"),tr("Dock window"),this,SLOT(undockTab()));
|
||||||
|
}
|
||||||
|
contextMnu.exec(QCursor::pos());
|
||||||
|
}
|
||||||
|
|
||||||
/** Destructor. */
|
/** Destructor. */
|
||||||
PopupChatWindow::~PopupChatWindow()
|
PopupChatWindow::~PopupChatWindow()
|
||||||
{
|
{
|
||||||
|
@ -55,6 +55,7 @@ protected:
|
|||||||
void closeEvent(QCloseEvent *event);
|
void closeEvent(QCloseEvent *event);
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
|
void setStyle();
|
||||||
void getAvatar();
|
void getAvatar();
|
||||||
void tabChanged(ChatDialog *dialog);
|
void tabChanged(ChatDialog *dialog);
|
||||||
void tabInfoChanged(ChatDialog *dialog);
|
void tabInfoChanged(ChatDialog *dialog);
|
||||||
@ -63,9 +64,9 @@ private slots:
|
|||||||
void dialogClose(ChatDialog *dialog);
|
void dialogClose(ChatDialog *dialog);
|
||||||
void dockTab();
|
void dockTab();
|
||||||
void undockTab();
|
void undockTab();
|
||||||
void setStyle();
|
|
||||||
void setOnTop();
|
void setOnTop();
|
||||||
void blink(bool on);
|
void blink(bool on);
|
||||||
|
void showContextMenu(QPoint p);
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool tabbedWindow;
|
bool tabbedWindow;
|
||||||
|
@ -10,6 +10,9 @@
|
|||||||
<height>451</height>
|
<height>451</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="contextMenuPolicy">
|
||||||
|
<enum>Qt::CustomContextMenu</enum>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string notr="true">MainWindow</string>
|
<string notr="true">MainWindow</string>
|
||||||
</property>
|
</property>
|
||||||
|
@ -183,6 +183,14 @@ void ConnectProgressDialog::initDialog()
|
|||||||
ui->UdpResult->hide();
|
ui->UdpResult->hide();
|
||||||
ui->UdpProgressBar->hide();
|
ui->UdpProgressBar->hide();
|
||||||
ui->UdpLabel->hide();
|
ui->UdpLabel->hide();
|
||||||
|
|
||||||
|
ui->DhtLabel->hide();
|
||||||
|
ui->DhtProgressBar->hide();
|
||||||
|
ui->DhtResult->hide();
|
||||||
|
|
||||||
|
ui->LookupLabel->hide();
|
||||||
|
ui->LookupProgressBar->hide();
|
||||||
|
ui->LookupResult->hide();
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
@ -187,9 +187,6 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
|||||||
//setting default filter by column as subject
|
//setting default filter by column as subject
|
||||||
ui.filterLineEdit->setCurrentFilter(RsMessageModel::COLUMN_THREAD_SUBJECT);
|
ui.filterLineEdit->setCurrentFilter(RsMessageModel::COLUMN_THREAD_SUBJECT);
|
||||||
|
|
||||||
// load settings
|
|
||||||
processSettings(true);
|
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
// Post "load settings" actions (which makes sure they are not affected by settings) //
|
// Post "load settings" actions (which makes sure they are not affected by settings) //
|
||||||
///////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////
|
||||||
@ -234,6 +231,9 @@ MessagesDialog::MessagesDialog(QWidget *parent)
|
|||||||
// fill quick view
|
// fill quick view
|
||||||
fillQuickView();
|
fillQuickView();
|
||||||
|
|
||||||
|
// load settings
|
||||||
|
processSettings(true);
|
||||||
|
|
||||||
//ui.messageTreeWidget->installEventFilter(this);
|
//ui.messageTreeWidget->installEventFilter(this);
|
||||||
|
|
||||||
// remove close button of the the first tab
|
// remove close button of the the first tab
|
||||||
@ -345,9 +345,8 @@ void MessagesDialog::processSettings(bool load)
|
|||||||
ui.filterLineEdit->setCurrentFilter(Settings->value("filterColumn", RsMessageModel::COLUMN_THREAD_SUBJECT).toInt());
|
ui.filterLineEdit->setCurrentFilter(Settings->value("filterColumn", RsMessageModel::COLUMN_THREAD_SUBJECT).toInt());
|
||||||
|
|
||||||
// state of message tree
|
// state of message tree
|
||||||
if (Settings->value("MessageTreeVersion").toInt() == messageTreeVersion) {
|
if (Settings->value("MessageTreeVersion").toInt() == messageTreeVersion)
|
||||||
msgwheader->restoreState(Settings->value("MessageTree").toByteArray());
|
msgwheader->restoreState(Settings->value("MessageTree").toByteArray());
|
||||||
}
|
|
||||||
|
|
||||||
// state of splitter
|
// state of splitter
|
||||||
ui.msgSplitter->restoreState(Settings->value("SplitterMsg").toByteArray());
|
ui.msgSplitter->restoreState(Settings->value("SplitterMsg").toByteArray());
|
||||||
|
@ -81,6 +81,13 @@ GeneralPage::GeneralPage(QWidget * parent, Qt::WindowFlags flags) :
|
|||||||
|
|
||||||
ui.checkCloseToTray->setChecked(false) ; // default should be false because some systems to not support this.
|
ui.checkCloseToTray->setChecked(false) ; // default should be false because some systems to not support this.
|
||||||
|
|
||||||
|
if(!QSystemTrayIcon::isSystemTrayAvailable())
|
||||||
|
{
|
||||||
|
ui.checkCloseToTray->setChecked(false) ; // default should be false because some systems to not support this.
|
||||||
|
ui.checkCloseToTray->setToolTip(tr("No Qt-compatible system tray was found on this system."));
|
||||||
|
Settings->setCloseToTray(false);
|
||||||
|
}
|
||||||
|
|
||||||
/* Connect signals */
|
/* Connect signals */
|
||||||
connect(ui.useLocalServer, SIGNAL(toggled(bool)), this,SLOT(updateUseLocalServer())) ;
|
connect(ui.useLocalServer, SIGNAL(toggled(bool)), this,SLOT(updateUseLocalServer())) ;
|
||||||
connect(ui.idleSpinBox, SIGNAL(valueChanged(int)), this,SLOT(updateMaxTimeBeforeIdle())) ;
|
connect(ui.idleSpinBox, SIGNAL(valueChanged(int)), this,SLOT(updateMaxTimeBeforeIdle())) ;
|
||||||
|
@ -81,6 +81,8 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
|
|||||||
|
|
||||||
manager = NULL ;
|
manager = NULL ;
|
||||||
|
|
||||||
|
if(RsAccounts::isHiddenNode())
|
||||||
|
{
|
||||||
if(RsAccounts::isTorAuto())
|
if(RsAccounts::isTorAuto())
|
||||||
{
|
{
|
||||||
// Here we use absolute numbers instead of consts defined above, because the consts correspond to the tab number *after* this tab removal.
|
// Here we use absolute numbers instead of consts defined above, because the consts correspond to the tab number *after* this tab removal.
|
||||||
@ -103,6 +105,12 @@ ServerPage::ServerPage(QWidget * parent, Qt::WindowFlags flags)
|
|||||||
ui.hiddenpage_outHeader->setText(tr("Tor has been automatically configured by Retroshare. You shouldn't need to change anything here.")) ;
|
ui.hiddenpage_outHeader->setText(tr("Tor has been automatically configured by Retroshare. You shouldn't need to change anything here.")) ;
|
||||||
ui.hiddenpage_inHeader->setText(tr("Tor has been automatically configured by Retroshare. You shouldn't need to change anything here.")) ;
|
ui.hiddenpage_inHeader->setText(tr("Tor has been automatically configured by Retroshare. You shouldn't need to change anything here.")) ;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
ui.hiddenServiceTab->removeTab(TAB_HIDDEN_SERVICE_I2P_BOB); // warning: the order of operation here is very important.
|
||||||
|
ui.hiddenServiceTab->removeTab(TAB_HIDDEN_SERVICE_INCOMING);
|
||||||
|
}
|
||||||
|
|
||||||
ui.filteredIpsTable->setHorizontalHeaderItem(COLUMN_RANGE,new QTableWidgetItem(tr("IP Range"))) ;
|
ui.filteredIpsTable->setHorizontalHeaderItem(COLUMN_RANGE,new QTableWidgetItem(tr("IP Range"))) ;
|
||||||
ui.filteredIpsTable->setHorizontalHeaderItem(COLUMN_STATUS,new QTableWidgetItem(tr("Status"))) ;
|
ui.filteredIpsTable->setHorizontalHeaderItem(COLUMN_STATUS,new QTableWidgetItem(tr("Status"))) ;
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>1283</width>
|
<width>1283</width>
|
||||||
<height>917</height>
|
<height>929</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QVBoxLayout" name="ServerPageVLayout">
|
<layout class="QVBoxLayout" name="ServerPageVLayout">
|
||||||
@ -26,7 +26,7 @@
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QTabWidget" name="tabWidget">
|
<widget class="QTabWidget" name="tabWidget">
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>0</number>
|
<number>1</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="tabNetConf">
|
<widget class="QWidget" name="tabNetConf">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -539,7 +539,7 @@ behind a firewall or a VPN.</string>
|
|||||||
</sizepolicy>
|
</sizepolicy>
|
||||||
</property>
|
</property>
|
||||||
<property name="currentIndex">
|
<property name="currentIndex">
|
||||||
<number>1</number>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QWidget" name="hiddenServiceTabManual">
|
<widget class="QWidget" name="hiddenServiceTabManual">
|
||||||
<attribute name="title">
|
<attribute name="title">
|
||||||
@ -549,7 +549,7 @@ behind a firewall or a VPN.</string>
|
|||||||
<item>
|
<item>
|
||||||
<widget class="QLabel" name="hiddenpage_outHeader">
|
<widget class="QLabel" name="hiddenpage_outHeader">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string><html><head/><body><p>Configure your Tor and I2P SOCKS proxy here. <br/>If you prefer to use BOB to automatically manage I2P check the other tab.</p></body></html></string>
|
<string><html><head/><body><p>Configure your Tor and I2P SOCKS proxy here. It will allow you to also connect </p><p>to hidden nodes.</p></body></html></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
@ -66,6 +66,7 @@ void HashingStatus::updateHashingInfo(const QString& s)
|
|||||||
{
|
{
|
||||||
statusHashing->hide() ;
|
statusHashing->hide() ;
|
||||||
hashloader->hide() ;
|
hashloader->hide() ;
|
||||||
|
setToolTip(QString());
|
||||||
|
|
||||||
movie->stop() ;
|
movie->stop() ;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user