1
0
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:
Dubslow 2015-03-27 17:33:53 -05:00
No known key found for this signature in database
GPG Key ID: 3DB8E05315C220AA
6 changed files with 23 additions and 8 deletions

View File

@ -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

View File

@ -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 \

View File

@ -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

View File

@ -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();

View File

@ -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);

View File

@ -1,4 +1,4 @@
#!/bin/bash
#!/usr/bin/env bash
# Config (Update me if needed !)
VERSION_UPSTREAM="1.0"