summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swift/QtUI')
-rw-r--r--Swift/QtUI/QtChatTabs.cpp6
-rw-r--r--Swift/QtUI/QtChatWindow.cpp6
-rw-r--r--Swift/QtUI/QtColorToolButton.cpp1
-rw-r--r--Swift/QtUI/QtSoundSelectionStyledItemDelegate.h1
-rw-r--r--Swift/QtUI/QtStrings.h12
-rw-r--r--Swift/QtUI/QtTabWidget.cpp4
-rw-r--r--Swift/QtUI/QtUIFactory.cpp2
-rw-r--r--Swift/QtUI/SConscript2
-rw-r--r--Swift/QtUI/Trellis/QtDynamicGridLayout.cpp2
-rw-r--r--Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp2
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.cpp1
-rw-r--r--Swift/QtUI/UserSearch/QtUserSearchWindow.h3
-rw-r--r--Swift/QtUI/main.cpp2
13 files changed, 30 insertions, 14 deletions
diff --git a/Swift/QtUI/QtChatTabs.cpp b/Swift/QtUI/QtChatTabs.cpp
index ad95a07..f4d0d46 100644
--- a/Swift/QtUI/QtChatTabs.cpp
+++ b/Swift/QtUI/QtChatTabs.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -18,8 +18,8 @@
#include <QMenu>
#include <QTabBar>
#include <QTabWidget>
-#include <QtGlobal>
#include <QWindow>
+#include <QtGlobal>
#include <Swiften/Base/Log.h>
@@ -112,8 +112,6 @@ void QtChatTabs::setViewMenu(QMenu* viewMenu) {
if (trellisMode_) {
viewMenu->addSeparator();
QAction* action = new QAction(tr("Change &layout"), this);
- action->setShortcutContext(Qt::ApplicationShortcut);
- action->setShortcut(QKeySequence(tr("Ctrl+Alt+L")));
connect(action, SIGNAL(triggered()), this, SLOT(handleOpenLayoutChangeDialog()));
viewMenu->addAction(action);
diff --git a/Swift/QtUI/QtChatWindow.cpp b/Swift/QtUI/QtChatWindow.cpp
index 7051683..874f710 100644
--- a/Swift/QtUI/QtChatWindow.cpp
+++ b/Swift/QtUI/QtChatWindow.cpp
@@ -707,9 +707,9 @@ void QtChatWindow::handleEmojiClicked(QString emoji) {
if (isVisible()) {
input_->textCursor().insertText(emoji);
input_->setFocus();
- // The next line also deletes the emojisGrid_, as it was added to the
- // layout of the emojisMenu_.
- emojisMenu_.reset();
+ // We cannot delete the emojisGrid_
+ // Grid may not close yet and we should not try to destroy it.
+ emojisMenu_->setVisible(false);
}
}
diff --git a/Swift/QtUI/QtColorToolButton.cpp b/Swift/QtUI/QtColorToolButton.cpp
index b349a47..6452cf4 100644
--- a/Swift/QtUI/QtColorToolButton.cpp
+++ b/Swift/QtUI/QtColorToolButton.cpp
@@ -36,6 +36,7 @@ void QtColorToolButton::setColor(const QColor& color)
void QtColorToolButton::onClicked()
{
QColor c = QColorDialog::getColor(color_, this);
+ window()->raise();
if (c.isValid()) {
setColor(c);
}
diff --git a/Swift/QtUI/QtSoundSelectionStyledItemDelegate.h b/Swift/QtUI/QtSoundSelectionStyledItemDelegate.h
index fabf668..f03cacc 100644
--- a/Swift/QtUI/QtSoundSelectionStyledItemDelegate.h
+++ b/Swift/QtUI/QtSoundSelectionStyledItemDelegate.h
@@ -11,6 +11,7 @@
namespace Swift {
class QtSoundSelectionStyledItemDelegate : public QStyledItemDelegate {
+ Q_OBJECT
public:
QtSoundSelectionStyledItemDelegate(QObject* parent = nullptr);
diff --git a/Swift/QtUI/QtStrings.h b/Swift/QtUI/QtStrings.h
index d0cd421..84bc7f9 100644
--- a/Swift/QtUI/QtStrings.h
+++ b/Swift/QtUI/QtStrings.h
@@ -26,6 +26,14 @@ QT_TRANSLATE_NOOP("QLineEdit", "&Copy");
QT_TRANSLATE_NOOP("QLineEdit", "&Paste");
QT_TRANSLATE_NOOP("QLineEdit", "Delete");
+QT_TRANSLATE_NOOP("QWidgetTextControl", "Select All");
+QT_TRANSLATE_NOOP("QWidgetTextControl", "&Undo");
+QT_TRANSLATE_NOOP("QWidgetTextControl", "&Redo");
+QT_TRANSLATE_NOOP("QWidgetTextControl", "Cu&t");
+QT_TRANSLATE_NOOP("QWidgetTextControl", "&Copy");
+QT_TRANSLATE_NOOP("QWidgetTextControl", "&Paste");
+QT_TRANSLATE_NOOP("QWidgetTextControl", "Delete");
+
QT_TRANSLATE_NOOP("QScrollBar", "Scroll here");
QT_TRANSLATE_NOOP("QScrollBar", "Top");
QT_TRANSLATE_NOOP("QScrollBar", "Bottom");
@@ -76,6 +84,10 @@ QT_TRANSLATE_NOOP("QDialogButtonBox", "Cancel");
QT_TRANSLATE_NOOP("QMessageBox", "Show Details...");
QT_TRANSLATE_NOOP("QMessageBox", "Hide Details...");
+QT_TRANSLATE_NOOP("QPlatformTheme", "OK");
+QT_TRANSLATE_NOOP("QPlatformTheme", "Cancel");
+QT_TRANSLATE_NOOP("QPlatformTheme", "Restore Defaults");
+
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU", "Services");
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU", "Hide %1");
QT_TRANSLATE_NOOP("MAC_APPLICATION_MENU", "Hide Others");
diff --git a/Swift/QtUI/QtTabWidget.cpp b/Swift/QtUI/QtTabWidget.cpp
index 67e3ae9..99ef6ee 100644
--- a/Swift/QtUI/QtTabWidget.cpp
+++ b/Swift/QtUI/QtTabWidget.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2017 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -57,7 +57,7 @@ void QtTabWidget::paintEvent(QPaintEvent * event) {
label.setAlignment(Qt::AlignHCenter | Qt::AlignVCenter);
label.setGeometry(QRect(QPoint(0,0), size()) - QMargins(10,10,10,10));
label.setWordWrap(true);
- label.setText(tr("This empty cell is a placeholder for chat windows. You can move existing chats to this cell by dragging the tab over here. You can change the number of cells via the 'Change layout' dialog under the 'View' menu or by using the %1 shortcut.").arg(QKeySequence(tr("Ctrl+Alt+L")).toString(QKeySequence::NativeText)));
+ label.setText(tr("This empty cell is a placeholder for chat windows. You can move existing chats to this cell by dragging the tab over here. You can change the number of cells via the 'Change layout' dialog under the 'View' menu."));
QPainter painter(this);
painter.drawPixmap(label.geometry().topLeft(), label.grab());
}
diff --git a/Swift/QtUI/QtUIFactory.cpp b/Swift/QtUI/QtUIFactory.cpp
index d3b30de..583c477 100644
--- a/Swift/QtUI/QtUIFactory.cpp
+++ b/Swift/QtUI/QtUIFactory.cpp
@@ -50,7 +50,7 @@ QtUIFactory::QtUIFactory(SettingsProviderHierachy* settings, QtSettingsProvider*
QtUIFactory::~QtUIFactory() {
SWIFT_LOG(debug) << "Entering QtUIFactory destructor. chatWindows size:" << chatWindows.size() << std::endl;
for (auto chat : chatWindows) {
- SWIFT_LOG_ASSERT(!chat.isNull(), debug) << "QtUIFactory has active chat windows and has not been reset properly" << std::endl;
+ SWIFT_LOG_ASSERT(chat.isNull(), debug) << "QtUIFactory has active chat windows and has not been reset properly" << std::endl;
}
}
diff --git a/Swift/QtUI/SConscript b/Swift/QtUI/SConscript
index 112a66e..54f0450 100644
--- a/Swift/QtUI/SConscript
+++ b/Swift/QtUI/SConscript
@@ -497,7 +497,7 @@ if env["PLATFORM"] == "win32" :
signresult = 0
for x in range (1, 4) :
print "Attemping to sign the packages [%s]" % x
- signresult = env.Execute('signtool.exe sign /fd SHA256 /f "${SIGNTOOL_KEY_PFX}" /t "${SIGNTOOL_TIMESTAMP_URL}" ' + str(target[0]))
+ signresult = env.Execute('signtool.exe sign /fd SHA256 /f "${SIGNTOOL_KEY_PFX}" /t "${SIGNTOOL_TIMESTAMP_URL}" /d "Swift Installer" ' + str(target[0]))
if signresult != 1 :
break
#If all 3 attemps to sign the package failed, stop the build.
diff --git a/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp b/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp
index b753ffa..2509b3f 100644
--- a/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp
+++ b/Swift/QtUI/Trellis/QtDynamicGridLayout.cpp
@@ -144,7 +144,9 @@ void QtDynamicGridLayout::removeTab(int index) {
int tabIndex = -1;
QtTabWidget* tabWidget = indexToTabWidget(index, tabIndex);
if (tabWidget) {
+ QWidget* tab = tabWidget->widget(tabIndex);
tabWidget->removeTab(tabIndex);
+ tab->setParent(nullptr);
}
}
diff --git a/Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp b/Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp
index 8c46e38..e55ee80 100644
--- a/Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp
+++ b/Swift/QtUI/UserSearch/QtSuggestingJIDInput.cpp
@@ -205,7 +205,7 @@ void QtSuggestingJIDInput::hidePopup() {
// Give focus back to input widget because the hide() call passes the focus to the wrong widget.
setFocus();
-#if defined(Q_WS_MAC)
+#if defined(Q_OS_MAC)
// This workaround is needed on OS X, to bring the dialog containing this widget back to the front after
// the popup is hidden. Ubuntu 16.04 and Windows 8 do not have this issue.
window()->raise();
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
index 8d15739..4489bc0 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.cpp
@@ -606,6 +606,7 @@ void QtUserSearchWindow::clear() {
howText = QString(tr("Who do you want to invite to the chat?"));
}
firstMultiJIDPage_->howLabel_->setText(howText);
+ firstMultiJIDPage_->groupBox->setEnabled(true);
}
clearForm();
resultsPage_->results_->setModel(nullptr);
diff --git a/Swift/QtUI/UserSearch/QtUserSearchWindow.h b/Swift/QtUI/UserSearch/QtUserSearchWindow.h
index 0714ac1..fe536ab 100644
--- a/Swift/QtUI/UserSearch/QtUserSearchWindow.h
+++ b/Swift/QtUI/UserSearch/QtUserSearchWindow.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2010-2016 Isode Limited.
+ * Copyright (c) 2010-2018 Isode Limited.
* All rights reserved.
* See the COPYING file for more information.
*/
@@ -8,6 +8,7 @@
#include <set>
+#include <QAbstractItemModel>
#include <QWizard>
#include <Swiften/Base/Override.h>
diff --git a/Swift/QtUI/main.cpp b/Swift/QtUI/main.cpp
index 81dc670..3e20e23 100644
--- a/Swift/QtUI/main.cpp
+++ b/Swift/QtUI/main.cpp
@@ -100,7 +100,7 @@ int main(int argc, char* argv[]) {
qtTranslator.load(QString(SWIFT_APPLICATION_NAME).toLower() + "_" + P2QSTRING(language), P2QSTRING(Swift::pathToString(someTranslationPath.parent_path())));
}
else {
- qtTranslator.load(QLocale::system(), QString(SWIFT_APPLICATION_NAME).toLower(), "_", P2QSTRING(Swift::pathToString(someTranslationPath)));
+ qtTranslator.load(QLocale::system(), QString(SWIFT_APPLICATION_NAME).toLower(), "_", P2QSTRING(Swift::pathToString(someTranslationPath.parent_path())));
}
#else
//std::cout << "Loading " << std::string(QLocale::system().name().toUtf8()) << std::endl;