mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Merge branches 'pr1474', 'pr1406', 'pr1463' and 'pr1472'
This commit is contained in:
commit
2e388f03df
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
WINDOWS_VERSION=$(cmd.exe /c ver 2>/dev/null | grep "Microsoft Windows")
|
||||
if [ ! -z "$WINDOWS_VERSION" ]; then
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#! /bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
if which apt-get; then
|
||||
sudo apt-get install build-essential qt5-qmake qt5-default libopenal-dev libopencv-dev \
|
||||
|
|
|
@ -67,6 +67,7 @@ void AddFriendForm::show(Ui::MainWindow &ui)
|
|||
ui.mainHead->layout()->addWidget(head);
|
||||
main->show();
|
||||
head->show();
|
||||
toxId.setFocus();
|
||||
}
|
||||
|
||||
QString AddFriendForm::getMessage() const
|
||||
|
|
|
@ -123,6 +123,10 @@ void ChatForm::onSendTriggered()
|
|||
QList<CString> splittedMsg = Core::splitMessage(msg, TOX_MAX_MESSAGE_LENGTH);
|
||||
QDateTime timestamp = QDateTime::currentDateTime();
|
||||
|
||||
msgEdit->setLastMessage(msg); //set last message only when sending it
|
||||
|
||||
bool status = !Settings::getInstance().getFauxOfflineMessaging();
|
||||
|
||||
for (CString& c_msg : splittedMsg)
|
||||
{
|
||||
QString qt_msg = CString::toString(c_msg.data(), c_msg.size());
|
||||
|
@ -130,12 +134,10 @@ void ChatForm::onSendTriggered()
|
|||
if (isAction)
|
||||
qt_msg_hist = "/me " + qt_msg;
|
||||
|
||||
bool status = !Settings::getInstance().getFauxOfflineMessaging();
|
||||
|
||||
int id = HistoryKeeper::getInstance()->addChatEntry(f->getToxID().publicKey, qt_msg_hist,
|
||||
Core::getInstance()->getSelfId().publicKey, timestamp, status);
|
||||
|
||||
ChatMessage::Ptr ma = addSelfMessage(msg, isAction, timestamp, false);
|
||||
ChatMessage::Ptr ma = addSelfMessage(qt_msg, isAction, timestamp, false);
|
||||
|
||||
int rec;
|
||||
if (isAction)
|
||||
|
@ -144,8 +146,6 @@ void ChatForm::onSendTriggered()
|
|||
rec = Core::getInstance()->sendMessage(f->getFriendID(), qt_msg);
|
||||
|
||||
getOfflineMsgEngine()->registerReceipt(rec, id, ma);
|
||||
|
||||
msgEdit->setLastMessage(msg); //set last message only when sending it
|
||||
}
|
||||
|
||||
msgEdit->clear();
|
||||
|
|
|
@ -59,6 +59,7 @@
|
|||
#include <QList>
|
||||
#include <QDesktopServices>
|
||||
#include <QProcess>
|
||||
#include <qlibraryinfo.h>
|
||||
#include <tox/tox.h>
|
||||
|
||||
#ifdef Q_OS_ANDROID
|
||||
|
@ -218,7 +219,20 @@ void Widget::setTranslation()
|
|||
return;
|
||||
|
||||
if (translator->load(locale, ":translations/"))
|
||||
{
|
||||
qDebug() << "Loaded translation" << locale;
|
||||
|
||||
// system menu translation
|
||||
QTranslator *qtTranslator = new QTranslator();
|
||||
QString s_locale = "qt_"+locale;
|
||||
if ( qtTranslator->load(s_locale, QLibraryInfo::location(QLibraryInfo::TranslationsPath)) )
|
||||
{
|
||||
QApplication::installTranslator(qtTranslator);
|
||||
qDebug() << "System translation loaded" << locale;
|
||||
}
|
||||
else
|
||||
qDebug() << "System translation not loaded" << locale;
|
||||
}
|
||||
else
|
||||
qDebug() << "Error loading translation" << locale;
|
||||
QCoreApplication::installTranslator(translator);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Config (Update me if needed !)
|
||||
VERSION_UPSTREAM="1.0"
|
||||
|
|
Loading…
Reference in New Issue
Block a user