mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
commit
e402a0abb1
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
|||
*.pro.user*
|
||||
libs
|
||||
|
|
71
README.md
71
README.md
|
@ -13,6 +13,7 @@ However, it is not a fork.
|
|||
- Audio calls
|
||||
- Video calls
|
||||
- Tox DNS
|
||||
- Translations in various languages
|
||||
|
||||
<h2>Requirements</h2>
|
||||
|
||||
|
@ -21,9 +22,77 @@ Linux and Mac users will have to compile the source code themselves.
|
|||
|
||||
<a href="https://jenkins.libtoxcore.so/job/tux3-toxgui-win32/lastSuccessfulBuild/artifact/toxgui-win32.zip">Windows download</a><br/>
|
||||
<a href="http://speedy.sh/XXtHa/toxgui">Linux download (1st July 2014 01:30 GMT)</a><br/>
|
||||
Note that the Linux download has not been tested.
|
||||
Note that the Linux download has not been tested and is not kept up to date.
|
||||
|
||||
<h3>Screenshots</h3>
|
||||
<h5>Note: The screenshots may not always be up to date, but they should give a good idea of the general look and features</h5>
|
||||
<img src="http://i.imgur.com/mMUdr6u.png"/>
|
||||
<img src="http://i.imgur.com/66ARBGC.png"/>
|
||||
|
||||
<h3>Compiling</h3>
|
||||
Compiling toxgui requires Qt 5.2 with the Qt Multimedia module and a C++11 compatible compiler.
|
||||
It also requires the toxcore and toxav libraries.
|
||||
|
||||
To compile, first clone or download the toxgui repository and open a terminal in the toxgui folder.
|
||||
Then run the script bootstrap.sh (for Linux and Mac) or bootsrap.bat (for Windows) to download an up-to-date toxcore.
|
||||
And finally run the commands "qmake" and "make" to start building toxgui.
|
||||
|
||||
|
||||
<h3>OSX Install Guide</h3>
|
||||
|
||||
<strong>This guide is intended for people who wish to use an existing or new ProjectTox-Core installation separate to the bundled installation with toxgui, if you do not wish to use a separate installation you can skip to the section titled 'Final Steps'.</strong>
|
||||
|
||||
Installation on OSX, isn't quite straight forward, here is a quick guide on how to install;
|
||||
|
||||
The first thing you need to do is install ProjectTox-Core with a/v support. Refer to the INSTALL guide in the ProjectTox-Core github repo.
|
||||
|
||||
Next you need to download QtTools (http://qt-project.org/downloads), at the time of writing this is at version 5.3.0.
|
||||
Make sure you deselect all the unnecessary components from the 5.3 checkbox (iOS/Android libs) otherwise you will end up with a very large download.
|
||||
|
||||
Once that is installed you will most likely need to set the path for qmake. To do this, open up terminal and paste in the following;
|
||||
|
||||
```bash
|
||||
export PATH=/location/to/qmake/binary:$PATH
|
||||
```
|
||||
|
||||
For myself, the qmake binary was located in /Users/mouseym/Qt/5.3/clang_64/bin/.
|
||||
|
||||
Once this is installed, do the following;
|
||||
|
||||
```bash
|
||||
git clone https://github.com/tux3/toxgui
|
||||
cd toxgui
|
||||
qmake
|
||||
```
|
||||
|
||||
Do not run make, as we need further modifications to toxgui.
|
||||
|
||||
Open up the Makefile in a text editor (TextEdit/TextWrangler, etc).
|
||||
|
||||
You will need to modify the Makefile to point to your toxcore libs/includes.
|
||||
|
||||
The first change you will need to make is to point the Makefile towards the tox libs installed on your system. (Generally this is /usr/local/libs/).
|
||||
|
||||
Look for the line in the Makefile which references /toxgui/lib/libs/ and replace with the above).
|
||||
|
||||
The second change to Makefile is to add the location of the includes (On my system these were placed in /usr/local/include/tox/).
|
||||
|
||||
To do this, search for the INCLUDES line and add the following to the end;
|
||||
|
||||
```bash
|
||||
-I/usr/local/include/tox/
|
||||
```
|
||||
|
||||
Save the Makefile.
|
||||
|
||||
<h5>Final Steps</h5>
|
||||
|
||||
The final step is to run
|
||||
```bash
|
||||
make
|
||||
```
|
||||
in the toxgui directory, or if you are using the bundled tox core installation, you can use
|
||||
```bash
|
||||
./bootstrap.sh
|
||||
```
|
||||
Assuming all went well you should now have a toxgui.app file within the directory. Double click and it should open!
|
||||
|
|
4
bootstrap.bat
Normal file
4
bootstrap.bat
Normal file
|
@ -0,0 +1,4 @@
|
|||
@mkdir %~dp0libs
|
||||
%~dp0tools\wget --no-check-certificate http://jenkins.libtoxcore.so/job/libtoxcore-win32-i686/lastSuccessfulBuild/artifact/libtoxcore-win32-i686.zip -O %~dp0libs\libtoxcore-latest.zip
|
||||
%~dp0tools\unzip -o %~dp0libs\libtoxcore-latest.zip -d %~dp0libs\
|
||||
@del %~dp0libs\libtoxcore-latest.zip
|
29
bootstrap.sh
Executable file
29
bootstrap.sh
Executable file
|
@ -0,0 +1,29 @@
|
|||
#!/bin/bash
|
||||
|
||||
# directory where the script is located
|
||||
SCRIPT_NAME=$(readlink -f $0)
|
||||
SCRIPT_DIR=`dirname $SCRIPT_NAME`
|
||||
|
||||
# create libs dir if necessary
|
||||
mkdir -p ${SCRIPT_DIR}/libs
|
||||
|
||||
# maybe an earlier run of this script failed
|
||||
# thus we should remove the libtoxcore-latest dir
|
||||
# if exists, otherwise cloning the git repo may fail
|
||||
rm -rf ${SCRIPT_DIR}/libs/libtoxcore-latest
|
||||
|
||||
# clone current master of libtoxcore
|
||||
git clone https://github.com/irungentoo/toxcore.git ${SCRIPT_DIR}/libs/libtoxcore-latest
|
||||
|
||||
# compile and install libtoxcore
|
||||
pushd ${SCRIPT_DIR}/libs/libtoxcore-latest
|
||||
./autogen.sh
|
||||
./configure --prefix=${SCRIPT_DIR}/libs/
|
||||
make -j2
|
||||
make install
|
||||
popd
|
||||
|
||||
# remove clone dir
|
||||
rm -rf ${SCRIPT_DIR}/libs/libtoxcore-latest
|
||||
|
||||
|
20
core.cpp
20
core.cpp
|
@ -137,12 +137,12 @@ void Core::onFriendRequest(Tox*/* tox*/, const uint8_t* cUserId, const uint8_t*
|
|||
emit static_cast<Core*>(core)->friendRequestReceived(CUserId::toString(cUserId), CString::toString(cMessage, cMessageSize));
|
||||
}
|
||||
|
||||
void Core::onFriendMessage(Tox*/* tox*/, int friendId, uint8_t* cMessage, uint16_t cMessageSize, void* core)
|
||||
void Core::onFriendMessage(Tox*/* tox*/, int friendId, const uint8_t* cMessage, uint16_t cMessageSize, void* core)
|
||||
{
|
||||
emit static_cast<Core*>(core)->friendMessageReceived(friendId, CString::toString(cMessage, cMessageSize));
|
||||
}
|
||||
|
||||
void Core::onFriendNameChange(Tox*/* tox*/, int friendId, uint8_t* cName, uint16_t cNameSize, void* core)
|
||||
void Core::onFriendNameChange(Tox*/* tox*/, int friendId, const uint8_t* cName, uint16_t cNameSize, void* core)
|
||||
{
|
||||
emit static_cast<Core*>(core)->friendUsernameChanged(friendId, CString::toString(cName, cNameSize));
|
||||
}
|
||||
|
@ -152,7 +152,7 @@ void Core::onFriendTypingChange(Tox*/* tox*/, int friendId, uint8_t isTyping, vo
|
|||
emit static_cast<Core*>(core)->friendTypingChanged(friendId, isTyping ? true : false);
|
||||
}
|
||||
|
||||
void Core::onStatusMessageChanged(Tox*/* tox*/, int friendId, uint8_t* cMessage, uint16_t cMessageSize, void* core)
|
||||
void Core::onStatusMessageChanged(Tox*/* tox*/, int friendId, const uint8_t* cMessage, uint16_t cMessageSize, void* core)
|
||||
{
|
||||
emit static_cast<Core*>(core)->friendStatusMessageChanged(friendId, CString::toString(cMessage, cMessageSize));
|
||||
}
|
||||
|
@ -186,18 +186,18 @@ void Core::onConnectionStatusChanged(Tox*/* tox*/, int friendId, uint8_t status,
|
|||
}
|
||||
}
|
||||
|
||||
void Core::onAction(Tox*/* tox*/, int friendId, uint8_t *cMessage, uint16_t cMessageSize, void *core)
|
||||
void Core::onAction(Tox*/* tox*/, int friendId, const uint8_t *cMessage, uint16_t cMessageSize, void *core)
|
||||
{
|
||||
emit static_cast<Core*>(core)->actionReceived(friendId, CString::toString(cMessage, cMessageSize));
|
||||
}
|
||||
|
||||
void Core::onGroupInvite(Tox*, int friendnumber, uint8_t *group_public_key, void *core)
|
||||
void Core::onGroupInvite(Tox*, int friendnumber, const uint8_t *group_public_key, void *core)
|
||||
{
|
||||
qDebug() << QString("Core: Group invite by %1").arg(friendnumber);
|
||||
emit static_cast<Core*>(core)->groupInviteReceived(friendnumber, group_public_key);
|
||||
}
|
||||
|
||||
void Core::onGroupMessage(Tox*, int groupnumber, int friendgroupnumber, uint8_t * message, uint16_t length, void *core)
|
||||
void Core::onGroupMessage(Tox*, int groupnumber, int friendgroupnumber, const uint8_t * message, uint16_t length, void *core)
|
||||
{
|
||||
emit static_cast<Core*>(core)->groupMessageReceived(groupnumber, friendgroupnumber, CString::toString(message, length));
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ void Core::onGroupNamelistChange(Tox*, int groupnumber, int peernumber, uint8_t
|
|||
}
|
||||
|
||||
void Core::onFileSendRequestCallback(Tox*, int32_t friendnumber, uint8_t filenumber, uint64_t filesize,
|
||||
uint8_t *filename, uint16_t filename_length, void *core)
|
||||
const uint8_t *filename, uint16_t filename_length, void *core)
|
||||
{
|
||||
qDebug() << QString("Core: Received file request %1 with friend %2").arg(filenumber).arg(friendnumber);
|
||||
|
||||
|
@ -218,7 +218,7 @@ void Core::onFileSendRequestCallback(Tox*, int32_t friendnumber, uint8_t filenum
|
|||
emit static_cast<Core*>(core)->fileReceiveRequested(fileRecvQueue.last());
|
||||
}
|
||||
void Core::onFileControlCallback(Tox*, int32_t friendnumber, uint8_t receive_send, uint8_t filenumber,
|
||||
uint8_t control_type, uint8_t*, uint16_t, void *core)
|
||||
uint8_t control_type, const uint8_t*, uint16_t, void *core)
|
||||
{
|
||||
ToxFile* file{nullptr};
|
||||
if (receive_send == 1)
|
||||
|
@ -287,7 +287,7 @@ void Core::onFileControlCallback(Tox*, int32_t friendnumber, uint8_t receive_sen
|
|||
}
|
||||
}
|
||||
|
||||
void Core::onFileDataCallback(Tox*, int32_t friendnumber, uint8_t filenumber, uint8_t *data, uint16_t length, void *core)
|
||||
void Core::onFileDataCallback(Tox*, int32_t friendnumber, uint8_t filenumber, const uint8_t *data, uint16_t length, void *core)
|
||||
{
|
||||
ToxFile* file{nullptr};
|
||||
for (ToxFile& f : fileRecvQueue)
|
||||
|
@ -798,7 +798,7 @@ QList<QString> Core::getGroupPeerNames(int groupId) const
|
|||
return names;
|
||||
}
|
||||
|
||||
int Core::joinGroupchat(int32_t friendnumber, uint8_t* friend_group_public_key) const
|
||||
int Core::joinGroupchat(int32_t friendnumber, const uint8_t* friend_group_public_key) const
|
||||
{
|
||||
qDebug() << QString("Trying to join groupchat invite by friend %1").arg(friendnumber);
|
||||
return tox_join_groupchat(tox, friendnumber, friend_group_public_key);
|
||||
|
|
24
core.h
24
core.h
|
@ -115,7 +115,7 @@ public:
|
|||
int getGroupNumberPeers(int groupId) const;
|
||||
QString getGroupPeerName(int groupId, int peerId) const;
|
||||
QList<QString> getGroupPeerNames(int groupId) const;
|
||||
int joinGroupchat(int32_t friendnumber, uint8_t* friend_group_public_key) const;
|
||||
int joinGroupchat(int32_t friendnumber, const uint8_t* friend_group_public_key) const;
|
||||
void quitGroupChat(int groupId) const;
|
||||
void dispatchVideoFrame(vpx_image img) const;
|
||||
|
||||
|
@ -180,7 +180,7 @@ signals:
|
|||
void friendLastSeenChanged(int friendId, const QDateTime& dateTime);
|
||||
|
||||
void emptyGroupCreated(int groupnumber);
|
||||
void groupInviteReceived(int friendnumber, uint8_t *group_public_key);
|
||||
void groupInviteReceived(int friendnumber, const uint8_t *group_public_key);
|
||||
void groupMessageReceived(int groupnumber, int friendgroupnumber, const QString& message);
|
||||
void groupNamelistChanged(int groupnumber, int peernumber, uint8_t change);
|
||||
|
||||
|
@ -224,21 +224,21 @@ signals:
|
|||
|
||||
private:
|
||||
static void onFriendRequest(Tox* tox, const uint8_t* cUserId, const uint8_t* cMessage, uint16_t cMessageSize, void* core);
|
||||
static void onFriendMessage(Tox* tox, int friendId, uint8_t* cMessage, uint16_t cMessageSize, void* core);
|
||||
static void onFriendNameChange(Tox* tox, int friendId, uint8_t* cName, uint16_t cNameSize, void* core);
|
||||
static void onFriendMessage(Tox* tox, int friendId, const uint8_t* cMessage, uint16_t cMessageSize, void* core);
|
||||
static void onFriendNameChange(Tox* tox, int friendId, const uint8_t* cName, uint16_t cNameSize, void* core);
|
||||
static void onFriendTypingChange(Tox* tox, int friendId, uint8_t isTyping, void* core);
|
||||
static void onStatusMessageChanged(Tox* tox, int friendId, uint8_t* cMessage, uint16_t cMessageSize, void* core);
|
||||
static void onStatusMessageChanged(Tox* tox, int friendId, const uint8_t* cMessage, uint16_t cMessageSize, void* core);
|
||||
static void onUserStatusChanged(Tox* tox, int friendId, uint8_t userstatus, void* core);
|
||||
static void onConnectionStatusChanged(Tox* tox, int friendId, uint8_t status, void* core);
|
||||
static void onAction(Tox* tox, int friendId, uint8_t* cMessage, uint16_t cMessageSize, void* core);
|
||||
static void onGroupInvite(Tox *tox, int friendnumber, uint8_t *group_public_key, void *userdata);
|
||||
static void onGroupMessage(Tox *tox, int groupnumber, int friendgroupnumber, uint8_t * message, uint16_t length, void *userdata);
|
||||
static void onAction(Tox* tox, int friendId, const uint8_t* cMessage, uint16_t cMessageSize, void* core);
|
||||
static void onGroupInvite(Tox *tox, int friendnumber, const uint8_t *group_public_key, void *userdata);
|
||||
static void onGroupMessage(Tox *tox, int groupnumber, int friendgroupnumber, const uint8_t * message, uint16_t length, void *userdata);
|
||||
static void onGroupNamelistChange(Tox *tox, int groupnumber, int peernumber, uint8_t change, void *userdata);
|
||||
static void onFileSendRequestCallback(Tox *tox, int32_t friendnumber, uint8_t filenumber, uint64_t filesize,
|
||||
uint8_t *filename, uint16_t filename_length, void *userdata);
|
||||
const uint8_t *filename, uint16_t filename_length, void *userdata);
|
||||
static void onFileControlCallback(Tox *tox, int32_t friendnumber, uint8_t receive_send, uint8_t filenumber,
|
||||
uint8_t control_type, uint8_t *data, uint16_t length, void *core);
|
||||
static void onFileDataCallback(Tox *tox, int32_t friendnumber, uint8_t filenumber, uint8_t *data, uint16_t length, void *userdata);
|
||||
uint8_t control_type, const uint8_t *data, uint16_t length, void *core);
|
||||
static void onFileDataCallback(Tox *tox, int32_t friendnumber, uint8_t filenumber, const uint8_t *data, uint16_t length, void *userdata);
|
||||
|
||||
static void onAvInvite(int32_t call_index, void* toxav);
|
||||
static void onAvStart(int32_t call_index, void* toxav);
|
||||
|
@ -273,7 +273,7 @@ private:
|
|||
private:
|
||||
Tox* tox;
|
||||
ToxAv* toxav;
|
||||
QTimer *toxTimer, *saveTimer, *fileTimer, *bootstrapTimer;
|
||||
QTimer *toxTimer, *fileTimer, *bootstrapTimer; //, *saveTimer;
|
||||
Camera* camera;
|
||||
QList<DhtServer> dhtServerList;
|
||||
int dhtServerId;
|
||||
|
|
BIN
img/status/dot_busy.png
Normal file
BIN
img/status/dot_busy.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 308 B |
BIN
img/status/dot_busy_2x.png
Normal file
BIN
img/status/dot_busy_2x.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 947 B |
BIN
img/status/dot_busy_notification.png
Normal file
BIN
img/status/dot_busy_notification.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 791 B |
16
main.cpp
16
main.cpp
|
@ -1,6 +1,8 @@
|
|||
#include "widget/widget.h"
|
||||
#include "settings.h"
|
||||
#include <QApplication>
|
||||
#include <QFontDatabase>
|
||||
#include <QTranslator>
|
||||
|
||||
int main(int argc, char *argv[])
|
||||
{
|
||||
|
@ -8,7 +10,19 @@ int main(int argc, char *argv[])
|
|||
a.setApplicationName("Toxgui");
|
||||
a.setOrganizationName("Tox");
|
||||
|
||||
// install Unicode 6.1 supporting font
|
||||
// Load translations
|
||||
QTranslator translator;
|
||||
if (Settings::getInstance().getUseTranslations())
|
||||
{
|
||||
QString locale = QLocale::system().name().section('_', 0, 0);
|
||||
if (translator.load(locale,":translations/"))
|
||||
qDebug() << "Loaded translation "+locale;
|
||||
else
|
||||
qDebug() << "Error loading translation "+locale;
|
||||
a.installTranslator(&translator);
|
||||
}
|
||||
|
||||
// Install Unicode 6.1 supporting font
|
||||
QFontDatabase::addApplicationFont("://DejaVuSans.ttf");
|
||||
|
||||
Widget* w = Widget::getInstance();
|
||||
|
|
5
res.qrc
5
res.qrc
|
@ -97,5 +97,10 @@
|
|||
<file>ui/window/restoreButtonPressed.png</file>
|
||||
<file>ui/friendList/friendList.css</file>
|
||||
<file>ui/window/window.css</file>
|
||||
<file>img/status/dot_busy.png</file>
|
||||
<file>img/status/dot_busy_2x.png</file>
|
||||
<file>img/status/dot_busy_notification.png</file>
|
||||
<file>translations/fr.qm</file>
|
||||
<file>translations/ru.qm</file>
|
||||
</qresource>
|
||||
</RCC>
|
||||
|
|
28
settings.cpp
28
settings.cpp
|
@ -72,18 +72,11 @@ void Settings::load()
|
|||
s.endArray();
|
||||
s.endGroup();
|
||||
|
||||
//NOTE: uncomment when logging will be implemented
|
||||
/*
|
||||
s.beginGroup("Logging");
|
||||
enableLogging = s.value("enableLogging", false).toBool();
|
||||
encryptLogs = s.value("encryptLogs", true).toBool();
|
||||
s.endGroup();
|
||||
*/
|
||||
|
||||
s.beginGroup("General");
|
||||
username = s.value("username", "My name").toString();
|
||||
statusMessage = s.value("statusMessage", "My status").toString();
|
||||
enableIPv6 = s.value("enableIPv6", true).toBool();
|
||||
useTranslations = s.value("useTranslations", true).toBool();
|
||||
s.endGroup();
|
||||
|
||||
s.beginGroup("Widgets");
|
||||
|
@ -132,18 +125,11 @@ void Settings::save()
|
|||
s.endArray();
|
||||
s.endGroup();
|
||||
|
||||
//NOTE: uncomment when logging will be implemented
|
||||
/*
|
||||
s.beginGroup("Logging");
|
||||
s.setValue("storeLogs", enableLogging);
|
||||
s.setValue("encryptLogs", encryptLogs);
|
||||
s.endGroup();
|
||||
*/
|
||||
|
||||
s.beginGroup("General");
|
||||
s.setValue("username", username);
|
||||
s.setValue("statusMessage", statusMessage);
|
||||
s.setValue("enableIPv6", enableIPv6);
|
||||
s.setValue("useTranslations",useTranslations);
|
||||
s.endGroup();
|
||||
|
||||
s.beginGroup("Widgets");
|
||||
|
@ -221,6 +207,16 @@ void Settings::setEnableIPv6(bool newValue)
|
|||
enableIPv6 = newValue;
|
||||
}
|
||||
|
||||
bool Settings::getUseTranslations() const
|
||||
{
|
||||
return useTranslations;
|
||||
}
|
||||
|
||||
void Settings::setUseTranslations(bool newValue)
|
||||
{
|
||||
useTranslations = newValue;
|
||||
}
|
||||
|
||||
bool Settings::getEnableLogging() const
|
||||
{
|
||||
return enableLogging;
|
||||
|
|
|
@ -52,6 +52,9 @@ public:
|
|||
bool getEnableIPv6() const;
|
||||
void setEnableIPv6(bool newValue);
|
||||
|
||||
bool getUseTranslations() const;
|
||||
void setUseTranslations(bool newValue);
|
||||
|
||||
bool getEnableLogging() const;
|
||||
void setEnableLogging(bool newValue);
|
||||
|
||||
|
@ -134,6 +137,7 @@ private:
|
|||
QString statusMessage;
|
||||
|
||||
bool enableIPv6;
|
||||
bool useTranslations;
|
||||
|
||||
bool enableLogging;
|
||||
bool encryptLogs;
|
||||
|
|
BIN
tools/libeay32.dll
Normal file
BIN
tools/libeay32.dll
Normal file
Binary file not shown.
BIN
tools/libiconv2.dll
Normal file
BIN
tools/libiconv2.dll
Normal file
Binary file not shown.
BIN
tools/libintl3.dll
Normal file
BIN
tools/libintl3.dll
Normal file
Binary file not shown.
BIN
tools/libssl32.dll
Normal file
BIN
tools/libssl32.dll
Normal file
Binary file not shown.
BIN
tools/unzip.exe
Normal file
BIN
tools/unzip.exe
Normal file
Binary file not shown.
BIN
tools/wget.exe
Normal file
BIN
tools/wget.exe
Normal file
Binary file not shown.
107
toxgui.pro
107
toxgui.pro
|
@ -5,11 +5,41 @@
|
|||
#-------------------------------------------------
|
||||
|
||||
QT += core gui multimedia multimediawidgets
|
||||
|
||||
greaterThan(QT_MAJOR_VERSION, 4): QT += widgets
|
||||
|
||||
TARGET = toxgui
|
||||
TEMPLATE = app
|
||||
FORMS += widget.ui
|
||||
CONFIG += c++11
|
||||
|
||||
TRANSLATIONS = translations/fr.ts \
|
||||
translations/ru.ts
|
||||
|
||||
RESOURCES += res.qrc
|
||||
|
||||
target.path = /usr/local/bin
|
||||
INSTALLS += target
|
||||
|
||||
INCLUDEPATH += libs/include
|
||||
win32 {
|
||||
LIBS += $$PWD/libs/lib/libtoxav.a $$PWD/libs/lib/libopus.a $$PWD/libs/lib/libvpx.a $$PWD/libs/lib/libtoxcore.a -lws2_32 $$PWD/libs/lib/libsodium.a
|
||||
} else {
|
||||
LIBS += -L$$PWD/libs/lib/ -ltoxcore -ltoxav -lsodium -lvpx
|
||||
}
|
||||
|
||||
#### Static linux build
|
||||
#LIBS += -Wl,-Bstatic -ltoxcore -ltoxav -lsodium -lvpx -lopus -lgstaudiodecoder -lgstcamerabin -lgstmediacapture \
|
||||
# -lgstmediaplayer -lqgsttools_p -lgstaudio-0.10 -lgstinterfaces-0.10 -lgstvideo-0.10 -lgstpbutils-0.10 \
|
||||
# -lgstapp-0.10 -lgstbase-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 \
|
||||
# -lqtaudio_alsa -lasound -lqtmultimedia_m3u \
|
||||
# -lqtaccessiblewidgets -lqconnmanbearer -lqgenericbearer -lqnmbearer \
|
||||
# -lqxcb -lX11-xcb -lXi -lxcb-render-util -lxcb-glx -lxcb-render -ldbus-1 \
|
||||
# -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr -lxcb-shape \
|
||||
# -lxcb-keysyms -lxcb-xkb -lfontconfig -lfreetype -lXrender -lXext -lX11 \
|
||||
# -lmtdev -lqdds -lqicns -lqico -lqjp2 -lqmng -lqtga -lqtiff -lqwbmp -lqwebp \
|
||||
# -lpng -lz -licui18n -licuuc -licudata -lm -ldl -lgthread-2.0 \
|
||||
# -pthread -lglib-2.0 -lrt -lGL -lpthread -Wl,-Bdynamic
|
||||
#QMAKE_CXXFLAGS += -Os -flto -static-libstdc++ -static-libgcc
|
||||
|
||||
HEADERS += widget/form/addfriendform.h \
|
||||
widget/form/chatform.h \
|
||||
|
@ -37,30 +67,8 @@ HEADERS += widget/form/addfriendform.h \
|
|||
widget/selfcamview.h \
|
||||
widget/videosurface.h \
|
||||
widget/camera.h \
|
||||
widget/netcamview.h
|
||||
|
||||
FORMS += widget.ui
|
||||
|
||||
CONFIG += c++11
|
||||
|
||||
RESOURCES += \
|
||||
res.qrc
|
||||
|
||||
LIBS += -ltoxcore -ltoxav -lsodium -lvpx
|
||||
|
||||
#### Static linux build
|
||||
#LIBS += -Wl,-Bstatic -ltoxcore -ltoxav -lsodium -lvpx -lopus -lgstaudiodecoder -lgstcamerabin -lgstmediacapture \
|
||||
# -lgstmediaplayer -lqgsttools_p -lgstaudio-0.10 -lgstinterfaces-0.10 -lgstvideo-0.10 -lgstpbutils-0.10 \
|
||||
# -lgstapp-0.10 -lgstbase-0.10 -lgstreamer-0.10 -lgobject-2.0 -lgmodule-2.0 -lxml2 \
|
||||
# -lqtaudio_alsa -lasound -lqtmultimedia_m3u \
|
||||
# -lqtaccessiblewidgets -lqconnmanbearer -lqgenericbearer -lqnmbearer \
|
||||
# -lqxcb -lX11-xcb -lXi -lxcb-render-util -lxcb-glx -lxcb-render -ldbus-1 \
|
||||
# -lxcb -lxcb-image -lxcb-icccm -lxcb-sync -lxcb-xfixes -lxcb-shm -lxcb-randr -lxcb-shape \
|
||||
# -lxcb-keysyms -lxcb-xkb -lfontconfig -lfreetype -lXrender -lXext -lX11 \
|
||||
# -lmtdev -lqdds -lqicns -lqico -lqjp2 -lqmng -lqtga -lqtiff -lqwbmp -lqwebp \
|
||||
# -lpng -lz -licui18n -licuuc -licudata -lm -ldl -lgthread-2.0 \
|
||||
# -pthread -lglib-2.0 -lrt -lGL -lpthread -Wl,-Bdynamic
|
||||
#QMAKE_CXXFLAGS += -Os -flto -static-libstdc++ -static-libgcc
|
||||
widget/netcamview.h \
|
||||
widget/tool/clickablelabel.h
|
||||
|
||||
SOURCES += \
|
||||
widget/form/addfriendform.cpp \
|
||||
|
@ -90,50 +98,5 @@ SOURCES += \
|
|||
widget/selfcamview.cpp \
|
||||
widget/videosurface.cpp \
|
||||
widget/camera.cpp \
|
||||
widget/netcamview.cpp
|
||||
|
||||
|
||||
|
||||
### EXAMPLE BUILD SETTINGS FOR WINDOWS
|
||||
#win32: LIBS += -L$$PWD/../../../../Downloads/libtoxcore-win32-i686/lib/ -ltoxcore
|
||||
|
||||
#INCLUDEPATH += $$PWD/../../../../Downloads/libtoxcore-win32-i686/include
|
||||
#DEPENDPATH += $$PWD/../../../../Downloads/libtoxcore-win32-i686/include
|
||||
|
||||
#win32:!win32-g++: PRE_TARGETDEPS += $$PWD/../../../../Downloads/libtoxcore-win32-i686/lib/toxcore.lib
|
||||
#else:win32-g++: PRE_TARGETDEPS += $$PWD/../../../../Downloads/libtoxcore-win32-i686/lib/libtoxcore.a
|
||||
|
||||
#win32: LIBS += -L$$PWD/../../../../Downloads/libtoxcore-win32-i686/lib/ -ltoxav
|
||||
|
||||
#INCLUDEPATH += $$PWD/../../../../Downloads/libtoxcore-win32-i686/include
|
||||
#DEPENDPATH += $$PWD/../../../../Downloads/libtoxcore-win32-i686/include
|
||||
|
||||
#win32:!win32-g++: PRE_TARGETDEPS += $$PWD/../../../../Downloads/libtoxcore-win32-i686/lib/toxav.lib
|
||||
#else:win32-g++: PRE_TARGETDEPS += $$PWD/../../../../Downloads/libtoxcore-win32-i686/lib/libtoxav.a
|
||||
|
||||
#win32: LIBS += -L$$PWD/../../../../Downloads/libtoxcore-win32-i686/lib/ -lvpx
|
||||
|
||||
#INCLUDEPATH += $$PWD/../../../../Downloads/libtoxcore-win32-i686/include
|
||||
#DEPENDPATH += $$PWD/../../../../Downloads/libtoxcore-win32-i686/include
|
||||
|
||||
#win32:!win32-g++: PRE_TARGETDEPS += $$PWD/../../../../Downloads/libtoxcore-win32-i686/lib/vpx.lib
|
||||
#else:win32-g++: PRE_TARGETDEPS += $$PWD/../../../../Downloads/libtoxcore-win32-i686/lib/libvpx.a
|
||||
|
||||
|
||||
#win32: LIBS += -L$$PWD/../../../../Downloads/libtoxcore-win32-i686/lib/ -lopus
|
||||
|
||||
#INCLUDEPATH += $$PWD/../../../../Downloads/libtoxcore-win32-i686/include
|
||||
#DEPENDPATH += $$PWD/../../../../Downloads/libtoxcore-win32-i686/include
|
||||
|
||||
#win32:!win32-g++: PRE_TARGETDEPS += $$PWD/../../../../Downloads/libtoxcore-win32-i686/lib/opus.lib
|
||||
#else:win32-g++: PRE_TARGETDEPS += $$PWD/../../../../Downloads/libtoxcore-win32-i686/lib/libopus.a
|
||||
|
||||
#win32: LIBS += -lws2_32
|
||||
|
||||
#win32: LIBS += -L$$PWD/../../../../Downloads/libtoxcore-win32-i686/lib/ -lsodium
|
||||
|
||||
#INCLUDEPATH += $$PWD/../../../../Downloads/libtoxcore-win32-i686/include
|
||||
#DEPENDPATH += $$PWD/../../../../Downloads/libtoxcore-win32-i686/include
|
||||
|
||||
#win32:!win32-g++: PRE_TARGETDEPS += $$PWD/../../../../Downloads/libtoxcore-win32-i686/lib/sodium.lib
|
||||
#else:win32-g++: PRE_TARGETDEPS += $$PWD/../../../../Downloads/libtoxcore-win32-i686/lib/libsodium.a
|
||||
widget/netcamview.cpp \
|
||||
widget/tool/clickablelabel.cpp
|
||||
|
|
BIN
translations/fr.qm
Normal file
BIN
translations/fr.qm
Normal file
Binary file not shown.
306
translations/fr.ts
Normal file
306
translations/fr.ts
Normal file
|
@ -0,0 +1,306 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.0" language="fr_FR">
|
||||
<context>
|
||||
<name>AddFriendForm</name>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="15"/>
|
||||
<source>Add Friends</source>
|
||||
<translation>Ajouter des amis</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="18"/>
|
||||
<source>Tox ID</source>
|
||||
<comment>Tox ID of the person you're sending a friend request to</comment>
|
||||
<translation>ID Tox</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="19"/>
|
||||
<source>Message</source>
|
||||
<comment>The message you send in friend requests</comment>
|
||||
<translation>Message</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="20"/>
|
||||
<source>Send friend request</source>
|
||||
<translation>Envoyer la demande d'ami</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="67"/>
|
||||
<source>Tox me maybe?</source>
|
||||
<comment>Default message in friend requests if the field is left blank. Write something appropriate!</comment>
|
||||
<translation>Je souhaiterais vous ajouter à mes contacts</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="75"/>
|
||||
<source>Please fill in a valid Tox ID</source>
|
||||
<comment>Tox ID of the friend you're sending a friend request to</comment>
|
||||
<translation>Merci de remplir un ID Tox valide</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="90"/>
|
||||
<source>Error while looking up DNS</source>
|
||||
<comment>The DNS gives the Tox ID associated to toxme.se addresses</comment>
|
||||
<translation>Erreur en consultant le serveur DNS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="96"/>
|
||||
<source>Unexpected number of text records</source>
|
||||
<comment>Error with the DNS</comment>
|
||||
<translation>Nombre d'entrées texte innatendu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="102"/>
|
||||
<source>Unexpected number of values in text record</source>
|
||||
<comment>Error with the DNS</comment>
|
||||
<translation>Nombre d'entrées numériques dans l'entrée texte innatendu</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="109"/>
|
||||
<source>The DNS lookup does not contain any Tox ID</source>
|
||||
<comment>Error with the DNS</comment>
|
||||
<translation>La réponse DNS ne contient aucun ID Tox</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="115"/>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="121"/>
|
||||
<source>The DNS lookup does not contain a valid Tox ID</source>
|
||||
<comment>Error with the DNS</comment>
|
||||
<translation>La réponse DNS ne contient pas d'ID Tox valide</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Camera</name>
|
||||
<message>
|
||||
<location filename="../widget/camera.cpp" line="145"/>
|
||||
<source>Camera eror</source>
|
||||
<translation>Erreur de caméra</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/camera.cpp" line="146"/>
|
||||
<source>Camera format %1 not supported, can't use the camera</source>
|
||||
<translation>Format %1 de la caméra non supporté, impossible de l'utiliser</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatForm</name>
|
||||
<message>
|
||||
<location filename="../widget/form/chatform.cpp" line="261"/>
|
||||
<source>Send a file</source>
|
||||
<translation>Envoyer un fichier</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/chatform.cpp" line="586"/>
|
||||
<location filename="../widget/form/chatform.cpp" line="592"/>
|
||||
<source>Save chat log</source>
|
||||
<translation>Sauvegarder l'historique de conversation</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CopyableElideLabel</name>
|
||||
<message>
|
||||
<location filename="../widget/tool/copyableelidelabel.cpp" line="29"/>
|
||||
<source>Copy</source>
|
||||
<translation>Copier</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FileTransfertWidget</name>
|
||||
<message>
|
||||
<location filename="../widget/filetransfertwidget.cpp" line="231"/>
|
||||
<source>Save a file</source>
|
||||
<comment>Title of the file saving dialog</comment>
|
||||
<translation>Sauvegarder un fichier</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FriendRequestDialog</name>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="30"/>
|
||||
<source>Friend request</source>
|
||||
<comment>Title of the window to aceept/deny a friend request</comment>
|
||||
<translation>Demande d'ami</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="32"/>
|
||||
<source>Someone wants to make friends with you</source>
|
||||
<translation>Quelqu'un veut devenir votre ami</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="33"/>
|
||||
<source>User ID:</source>
|
||||
<translation>ID utilisateur:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="37"/>
|
||||
<source>Friend request message:</source>
|
||||
<translation>Message de demande d'ami:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="44"/>
|
||||
<source>Accept</source>
|
||||
<comment>Accept a friend request</comment>
|
||||
<translation>Accepter</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="45"/>
|
||||
<source>Reject</source>
|
||||
<comment>Reject a friend request</comment>
|
||||
<translation>Rejeter</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FriendWidget</name>
|
||||
<message>
|
||||
<location filename="../widget/friendwidget.cpp" line="65"/>
|
||||
<source>Copy friend ID</source>
|
||||
<comment>Menu to copy the Tox ID of that friend</comment>
|
||||
<translation>Copier l'ID ami</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/friendwidget.cpp" line="66"/>
|
||||
<source>Invite in group</source>
|
||||
<comment>Menu to invite a friend in a groupchat</comment>
|
||||
<translation>Inviter dans un groupe</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/friendwidget.cpp" line="76"/>
|
||||
<source>Remove friend</source>
|
||||
<comment>Menu to remove the friend from our friendlist</comment>
|
||||
<translation>Supprimer ami</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>GroupChatForm</name>
|
||||
<message>
|
||||
<location filename="../widget/form/groupchatform.cpp" line="32"/>
|
||||
<source>%1 users in chat</source>
|
||||
<comment>Number of users in chat</comment>
|
||||
<translation>%1 personnes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/groupchatform.cpp" line="155"/>
|
||||
<source><Unknown></source>
|
||||
<translation><Inconnu></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/groupchatform.cpp" line="220"/>
|
||||
<source>%1 users in chat</source>
|
||||
<translation>%1 personnes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/groupchatform.cpp" line="239"/>
|
||||
<source>Save chat log</source>
|
||||
<translation>Sauvegarder l'historique de conversation</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>GroupWidget</name>
|
||||
<message>
|
||||
<location filename="../widget/groupwidget.cpp" line="38"/>
|
||||
<location filename="../widget/groupwidget.cpp" line="126"/>
|
||||
<source>%1 users in chat</source>
|
||||
<translation>%1 personnes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/groupwidget.cpp" line="40"/>
|
||||
<location filename="../widget/groupwidget.cpp" line="128"/>
|
||||
<source>0 users in chat</source>
|
||||
<translation>0 personnes</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/groupwidget.cpp" line="68"/>
|
||||
<source>Quit group</source>
|
||||
<comment>Menu to quit a groupchat</comment>
|
||||
<translation>Quitter le groupe</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SelfCamView</name>
|
||||
<message>
|
||||
<location filename="../widget/selfcamview.cpp" line="16"/>
|
||||
<source>Tox video test</source>
|
||||
<comment>Title of the window to test the video/webcam</comment>
|
||||
<translation>Test vidéo Tox</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsForm</name>
|
||||
<message>
|
||||
<location filename="../widget/form/settingsform.cpp" line="13"/>
|
||||
<source>User Settings</source>
|
||||
<comment>"Headline" of the window</comment>
|
||||
<translation>Configuration</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/settingsform.cpp" line="16"/>
|
||||
<source>Name</source>
|
||||
<comment>Username/nick</comment>
|
||||
<translation>Nom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/settingsform.cpp" line="17"/>
|
||||
<source>Status</source>
|
||||
<comment>Status message</comment>
|
||||
<translation>Status</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/settingsform.cpp" line="22"/>
|
||||
<source>Test video</source>
|
||||
<comment>Text on a button to test the video/webcam</comment>
|
||||
<translation>Tester la vidéo</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/settingsform.cpp" line="23"/>
|
||||
<source>Enable IPv6 (recommended)</source>
|
||||
<comment>Text on a checkbox to enable IPv6</comment>
|
||||
<translation>Activer IPv6 (recommandé)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Widget</name>
|
||||
<message>
|
||||
<location filename="../widget.ui" line="20"/>
|
||||
<source>Tox</source>
|
||||
<translation>Tox</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.ui" line="1593"/>
|
||||
<source>Your name</source>
|
||||
<translation>Votre nom</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.ui" line="1675"/>
|
||||
<source>Your status</source>
|
||||
<translation>Votre status</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.ui" line="2811"/>
|
||||
<source>Close</source>
|
||||
<translation>Fermer</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.ui" line="2814"/>
|
||||
<source>Ctrl+Q</source>
|
||||
<translation>Ctrl+Q</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/widget.cpp" line="1112"/>
|
||||
<source>Online</source>
|
||||
<comment>Button to set your status to 'Online'</comment>
|
||||
<translation>Connecté</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/widget.cpp" line="1113"/>
|
||||
<source>Away</source>
|
||||
<comment>Button to set your status to 'Away'</comment>
|
||||
<translation>Indisponnible</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/widget.cpp" line="1114"/>
|
||||
<source>Busy</source>
|
||||
<comment>Button to set your status to 'Busy'</comment>
|
||||
<translation>Occupé</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
BIN
translations/ru.qm
Normal file
BIN
translations/ru.qm
Normal file
Binary file not shown.
311
translations/ru.ts
Normal file
311
translations/ru.ts
Normal file
|
@ -0,0 +1,311 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="ru_RU">
|
||||
<context>
|
||||
<name>AddFriendForm</name>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="15"/>
|
||||
<source>Add Friends</source>
|
||||
<translation>Добавление друзей</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="18"/>
|
||||
<source>Tox ID</source>
|
||||
<comment>Tox ID of the person you're sending a friend request to</comment>
|
||||
<translation>Tox ID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="19"/>
|
||||
<source>Message</source>
|
||||
<comment>The message you send in friend requests</comment>
|
||||
<translation>Сообщение</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="20"/>
|
||||
<source>Send friend request</source>
|
||||
<translatorcomment>Мне не нравится, но другого не придумал, и фейсбук использует это</translatorcomment>
|
||||
<translation>Отправить запрос на добавление в друзья</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="67"/>
|
||||
<source>Tox me maybe?</source>
|
||||
<comment>Default message in friend requests if the field is left blank. Write something appropriate!</comment>
|
||||
<translatorcomment>Вот таким нехитрым и незамысловатым образом решаются сложные переводчиские проблемы</translatorcomment>
|
||||
<translation>Добавь меня, а?</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="75"/>
|
||||
<source>Please fill in a valid Tox ID</source>
|
||||
<comment>Tox ID of the friend you're sending a friend request to</comment>
|
||||
<translation>Пожалуйста, введите корректный Tox ID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="92"/>
|
||||
<source>Error while looking up DNS</source>
|
||||
<comment>The DNS gives the Tox ID associated to toxme.se addresses</comment>
|
||||
<translation>Ошибка при просмотре DNS</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="98"/>
|
||||
<source>Unexpected number of text records</source>
|
||||
<comment>Error with the DNS</comment>
|
||||
<translation>Непредвиденное количество текстовых записей</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="104"/>
|
||||
<source>Unexpected number of values in text record</source>
|
||||
<comment>Error with the DNS</comment>
|
||||
<translation>Непредвиденное количество значений в текстовой записи</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="111"/>
|
||||
<source>The DNS lookup does not contain any Tox ID</source>
|
||||
<comment>Error with the DNS</comment>
|
||||
<translation>В ответе DNS ни одного Tox ID</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="117"/>
|
||||
<location filename="../widget/form/addfriendform.cpp" line="123"/>
|
||||
<source>The DNS lookup does not contain a valid Tox ID</source>
|
||||
<comment>Error with the DNS</comment>
|
||||
<translation>Ответ DNS не содержит корректных Tox ID</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Camera</name>
|
||||
<message>
|
||||
<location filename="../widget/camera.cpp" line="145"/>
|
||||
<source>Camera eror</source>
|
||||
<translation>Ошибка камеры</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/camera.cpp" line="146"/>
|
||||
<source>Camera format %1 not supported, can't use the camera</source>
|
||||
<translation>Формат камеры %1 не поддерживается, невозможно использовать камеру</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>ChatForm</name>
|
||||
<message>
|
||||
<location filename="../widget/form/chatform.cpp" line="261"/>
|
||||
<source>Send a file</source>
|
||||
<translation type="unfinished">Отправить файл</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/chatform.cpp" line="586"/>
|
||||
<location filename="../widget/form/chatform.cpp" line="592"/>
|
||||
<source>Save chat log</source>
|
||||
<translation>Сохранить лог чата</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>CopyableElideLabel</name>
|
||||
<message>
|
||||
<location filename="../widget/tool/copyableelidelabel.cpp" line="29"/>
|
||||
<source>Copy</source>
|
||||
<translation>Копировать</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FileTransfertWidget</name>
|
||||
<message>
|
||||
<location filename="../widget/filetransfertwidget.cpp" line="233"/>
|
||||
<source>Save a file</source>
|
||||
<comment>Title of the file saving dialog</comment>
|
||||
<translation>Сохранить файл</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FriendRequestDialog</name>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="30"/>
|
||||
<source>Friend request</source>
|
||||
<comment>Title of the window to aceept/deny a friend request</comment>
|
||||
<translatorcomment>Мне не нравится, но другого не придумал, и фейсбук использует это</translatorcomment>
|
||||
<translation>Запрос на добавление в друзья</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="32"/>
|
||||
<source>Someone wants to make friends with you</source>
|
||||
<translatorcomment>«Подружиться», вероятно, недостаточно вежливо</translatorcomment>
|
||||
<translation>Кто-то хочет добавить вас в друзья</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="33"/>
|
||||
<source>User ID:</source>
|
||||
<translation>ID пользователя:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="37"/>
|
||||
<source>Friend request message:</source>
|
||||
<translation>Текст запроса:</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="44"/>
|
||||
<source>Accept</source>
|
||||
<comment>Accept a friend request</comment>
|
||||
<translation>Принять</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/tool/friendrequestdialog.cpp" line="45"/>
|
||||
<source>Reject</source>
|
||||
<comment>Reject a friend request</comment>
|
||||
<translation>Отклонить</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>FriendWidget</name>
|
||||
<message>
|
||||
<location filename="../widget/friendwidget.cpp" line="71"/>
|
||||
<source>Copy friend ID</source>
|
||||
<comment>Menu to copy the Tox ID of that friend</comment>
|
||||
<translation>Копировать ID друга</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/friendwidget.cpp" line="72"/>
|
||||
<source>Invite in group</source>
|
||||
<comment>Menu to invite a friend in a groupchat</comment>
|
||||
<translation>Пригласить в группу</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/friendwidget.cpp" line="82"/>
|
||||
<source>Remove friend</source>
|
||||
<comment>Menu to remove the friend from our friendlist</comment>
|
||||
<translation>Удалить друга</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>GroupChatForm</name>
|
||||
<message>
|
||||
<location filename="../widget/form/groupchatform.cpp" line="32"/>
|
||||
<source>%1 users in chat</source>
|
||||
<comment>Number of users in chat</comment>
|
||||
<translation>%1 пользователей в чате</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/groupchatform.cpp" line="155"/>
|
||||
<source><Unknown></source>
|
||||
<translation><Неизвестно></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/groupchatform.cpp" line="220"/>
|
||||
<source>%1 users in chat</source>
|
||||
<translation>%1 пользователей в чате</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/groupchatform.cpp" line="239"/>
|
||||
<source>Save chat log</source>
|
||||
<translation>Сохранить лог чата</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>GroupWidget</name>
|
||||
<message>
|
||||
<location filename="../widget/groupwidget.cpp" line="73"/>
|
||||
<source>Quit group</source>
|
||||
<comment>Menu to quit a groupchat</comment>
|
||||
<translation>Покинуть группу</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/groupwidget.cpp" line="38"/>
|
||||
<location filename="../widget/groupwidget.cpp" line="128"/>
|
||||
<source>%1 users in chat</source>
|
||||
<translation>%1 пользователей в чате</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/groupwidget.cpp" line="40"/>
|
||||
<location filename="../widget/groupwidget.cpp" line="130"/>
|
||||
<source>0 users in chat</source>
|
||||
<translation>Ни одного пользователя в чате</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SelfCamView</name>
|
||||
<message>
|
||||
<location filename="../widget/selfcamview.cpp" line="16"/>
|
||||
<source>Tox video test</source>
|
||||
<comment>Title of the window to test the video/webcam</comment>
|
||||
<translation>Проверка видео</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>SettingsForm</name>
|
||||
<message>
|
||||
<location filename="../widget/form/settingsform.cpp" line="13"/>
|
||||
<source>User Settings</source>
|
||||
<comment>"Headline" of the window</comment>
|
||||
<translation>Пользовательские настройки</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/settingsform.cpp" line="16"/>
|
||||
<source>Name</source>
|
||||
<comment>Username/nick</comment>
|
||||
<translation>Имя</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/settingsform.cpp" line="17"/>
|
||||
<source>Status</source>
|
||||
<comment>Status message</comment>
|
||||
<translation>Статус</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/settingsform.cpp" line="22"/>
|
||||
<source>Test video</source>
|
||||
<comment>Text on a button to test the video/webcam</comment>
|
||||
<translation>Проверить видео</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/form/settingsform.cpp" line="23"/>
|
||||
<source>Enable IPv6 (recommended)</source>
|
||||
<comment>Text on a checkbox to enable IPv6</comment>
|
||||
<translation>Включить IPv6 (рекомендуется)</translation>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
<name>Widget</name>
|
||||
<message>
|
||||
<location filename="../widget.ui" line="26"/>
|
||||
<source>Tox</source>
|
||||
<translation>Tox</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.ui" line="1683"/>
|
||||
<source>Your name</source>
|
||||
<translation>Ваше имя</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.ui" line="1759"/>
|
||||
<source>Your status</source>
|
||||
<translation>Ваш статус</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.ui" line="3005"/>
|
||||
<source>Close</source>
|
||||
<translation>Закрыть</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget.ui" line="3008"/>
|
||||
<source>Ctrl+Q</source>
|
||||
<translation>Ctrl+Q</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/widget.cpp" line="1149"/>
|
||||
<source>Online</source>
|
||||
<comment>Button to set your status to 'Online'</comment>
|
||||
<translation>В сети</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/widget.cpp" line="1150"/>
|
||||
<source>Away</source>
|
||||
<comment>Button to set your status to 'Away'</comment>
|
||||
<translatorcomment>Вероятно, это не столь долгое путешествие</translatorcomment>
|
||||
<translation>Отошёл</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../widget/widget.cpp" line="1151"/>
|
||||
<source>Busy</source>
|
||||
<comment>Button to set your status to 'Busy'</comment>
|
||||
<translation>Занят</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
48
widget.ui
48
widget.ui
|
@ -781,16 +781,7 @@
|
|||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -1788,7 +1779,7 @@
|
|||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="statImg">
|
||||
<widget class="ClickableLabel" name="statImg">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>40</width>
|
||||
|
@ -1808,7 +1799,7 @@
|
|||
<string/>
|
||||
</property>
|
||||
<property name="pixmap">
|
||||
<pixmap>../../c/toxgui/img/status/dot_away_2x.png</pixmap>
|
||||
<pixmap resource="res.qrc">:/img/status/dot_away_2x.png</pixmap>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
|
@ -1821,10 +1812,6 @@
|
|||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
<zorder>profilePicture</zorder>
|
||||
<zorder>statImg</zorder>
|
||||
<zorder>nameLabel</zorder>
|
||||
<zorder>statusLabel</zorder>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
|
@ -1858,7 +1845,7 @@
|
|||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>225</width>
|
||||
<width>258</width>
|
||||
<height>199</height>
|
||||
</rect>
|
||||
</property>
|
||||
|
@ -2304,16 +2291,7 @@
|
|||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -2914,16 +2892,7 @@
|
|||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<property name="margin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
|
@ -3047,6 +3016,11 @@
|
|||
<extends>QLabel</extends>
|
||||
<header>widget/tool/editablelabelwidget.h</header>
|
||||
</customwidget>
|
||||
<customwidget>
|
||||
<class>ClickableLabel</class>
|
||||
<extends>QLabel</extends>
|
||||
<header>widget/tool/clickablelabel.h</header>
|
||||
</customwidget>
|
||||
</customwidgets>
|
||||
<resources>
|
||||
<include location="res.qrc"/>
|
||||
|
|
|
@ -142,8 +142,8 @@ bool Camera::isFormatSupported(const QVideoSurfaceFormat& format) const
|
|||
}
|
||||
else
|
||||
{
|
||||
QMessageBox::warning(0, "Camera eror",
|
||||
QString("Camera format %1 not supported, can't use the camera")
|
||||
QMessageBox::warning(0, tr("Camera eror"),
|
||||
tr("Camera format %1 not supported, can't use the camera")
|
||||
.arg(format.pixelFormat()));
|
||||
return false;
|
||||
}
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#include "filetransfertwidget.h"
|
||||
#include "widget.h"
|
||||
#include "core.h"
|
||||
#include "math.h"
|
||||
#include <QFileDialog>
|
||||
#include <QPixmap>
|
||||
|
||||
|
@ -229,7 +230,7 @@ void FileTransfertWidget::rejectRecvRequest()
|
|||
|
||||
void FileTransfertWidget::acceptRecvRequest()
|
||||
{
|
||||
QString path = QFileDialog::getSaveFileName(0,"Save a file",QDir::currentPath()+'/'+filename->text());
|
||||
QString path = QFileDialog::getSaveFileName(0,tr("Save a file","Title of the file saving dialog"),QDir::currentPath()+'/'+filename->text());
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
|
||||
|
|
|
@ -12,12 +12,12 @@ AddFriendForm::AddFriendForm() : dns(this)
|
|||
main = new QWidget(), head = new QWidget();
|
||||
QFont bold;
|
||||
bold.setBold(true);
|
||||
headLabel.setText("Add Friends");
|
||||
headLabel.setText(tr("Add Friends"));
|
||||
headLabel.setFont(bold);
|
||||
|
||||
toxIdLabel.setText("Tox ID");
|
||||
messageLabel.setText("Message");
|
||||
sendButton.setText("Send friend request");
|
||||
toxIdLabel.setText(tr("Tox ID","Tox ID of the person you're sending a friend request to"));
|
||||
messageLabel.setText(tr("Message","The message you send in friend requests"));
|
||||
sendButton.setText(tr("Send friend request"));
|
||||
|
||||
main->setLayout(&layout);
|
||||
layout.addWidget(&toxIdLabel);
|
||||
|
@ -64,7 +64,7 @@ void AddFriendForm::showWarning(const QString &message) const
|
|||
QString AddFriendForm::getMessage() const
|
||||
{
|
||||
const QString msg = message.toPlainText();
|
||||
return !msg.isEmpty() ? msg : "Tox me maybe?";
|
||||
return !msg.isEmpty() ? msg : tr("Tox me maybe?","Default message in friend requests if the field is left blank. Write something appropriate!");
|
||||
}
|
||||
|
||||
void AddFriendForm::onSendTriggered()
|
||||
|
@ -72,7 +72,7 @@ void AddFriendForm::onSendTriggered()
|
|||
QString id = toxId.text().trimmed();
|
||||
|
||||
if (id.isEmpty()) {
|
||||
showWarning("Please fill in a valid Tox ID");
|
||||
showWarning(tr("Please fill in a valid Tox ID","Tox ID of the friend you're sending a friend request to"));
|
||||
} else if (isToxId(id)) {
|
||||
emit friendRequested(id, getMessage());
|
||||
this->toxId.setText("");
|
||||
|
@ -89,38 +89,38 @@ void AddFriendForm::handleDnsLookup()
|
|||
const QString idKeyWord("id=");
|
||||
|
||||
if (dns.error() != QDnsLookup::NoError) {
|
||||
showWarning("Error while looking up DNS");
|
||||
showWarning(tr("Error while looking up DNS","The DNS gives the Tox ID associated to toxme.se addresses"));
|
||||
return;
|
||||
}
|
||||
|
||||
const QList<QDnsTextRecord> textRecords = dns.textRecords();
|
||||
if (textRecords.length() != 1) {
|
||||
showWarning("Unexpected number of text records");
|
||||
showWarning(tr("Unexpected number of text records", "Error with the DNS"));
|
||||
return;
|
||||
}
|
||||
|
||||
const QList<QByteArray> textRecordValues = textRecords.first().values();
|
||||
if (textRecordValues.length() != 1) {
|
||||
showWarning("Unexpected number of values in text record");
|
||||
showWarning(tr("Unexpected number of values in text record", "Error with the DNS"));
|
||||
return;
|
||||
}
|
||||
|
||||
const QString entry(textRecordValues.first());
|
||||
int idx = entry.indexOf(idKeyWord);
|
||||
if (idx < 0) {
|
||||
showWarning("The DNS lookup does not contain any Tox ID");
|
||||
showWarning(tr("The DNS lookup does not contain any Tox ID", "Error with the DNS"));
|
||||
return;
|
||||
}
|
||||
|
||||
idx += idKeyWord.length();
|
||||
if (entry.length() < idx + static_cast<int>(TOX_ID_SIZE)) {
|
||||
showWarning("The DNS lookup does not contain a valid Tox ID");
|
||||
showWarning(tr("The DNS lookup does not contain a valid Tox ID", "Error with the DNS"));
|
||||
return;
|
||||
}
|
||||
|
||||
const QString friendAdress = entry.mid(idx, TOX_ID_SIZE);
|
||||
if (!isToxId(friendAdress)) {
|
||||
showWarning("The DNS lookup does not contain a valid Tox ID");
|
||||
showWarning(tr("The DNS lookup does not contain a valid Tox ID", "Error with the DNS"));
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -258,7 +258,7 @@ void ChatForm::addMessage(QLabel* author, QLabel* message, QLabel* date)
|
|||
|
||||
void ChatForm::onAttachClicked()
|
||||
{
|
||||
QString path = QFileDialog::getOpenFileName(0,"Send a file");
|
||||
QString path = QFileDialog::getOpenFileName(0,tr("Send a file"));
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
|
||||
|
@ -583,13 +583,13 @@ void ChatForm::onChatContextMenuRequested(QPoint pos)
|
|||
QWidget* sender = (QWidget*)QObject::sender();
|
||||
pos = sender->mapToGlobal(pos);
|
||||
QMenu menu;
|
||||
menu.addAction("Save chat log", this, SLOT(onSaveLogClicked()));
|
||||
menu.addAction(tr("Save chat log"), this, SLOT(onSaveLogClicked()));
|
||||
menu.exec(pos);
|
||||
}
|
||||
|
||||
void ChatForm::onSaveLogClicked()
|
||||
{
|
||||
QString path = QFileDialog::getSaveFileName(0,"Save chat log");
|
||||
QString path = QFileDialog::getSaveFileName(0,tr("Save chat log"));
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
|
||||
|
|
|
@ -29,7 +29,7 @@ GroupChatForm::GroupChatForm(Group* chatGroup)
|
|||
name->setText(group->widget->name.text());
|
||||
name->setFont(bold);
|
||||
nusers->setFont(small);
|
||||
nusers->setText(QString("%1 users in chat").arg(group->peers.size()));
|
||||
nusers->setText(GroupChatForm::tr("%1 users in chat","Number of users in chat").arg(group->peers.size()));
|
||||
avatar->setPixmap(QPixmap(":/img/group.png"));
|
||||
QString names;
|
||||
for (QString& s : group->peers)
|
||||
|
@ -152,7 +152,7 @@ void GroupChatForm::addGroupMessage(QString message, int peerId)
|
|||
if (group->peers.contains(peerId))
|
||||
msgAuthor = new QLabel(group->peers[peerId]);
|
||||
else
|
||||
msgAuthor = new QLabel("<Unknown>");
|
||||
msgAuthor = new QLabel(tr("<Unknown>"));
|
||||
|
||||
QLabel *msgText = new QLabel(message);
|
||||
QLabel *msgDate = new QLabel(QTime::currentTime().toString("hh:mm"));
|
||||
|
@ -217,7 +217,7 @@ void GroupChatForm::onSliderRangeChanged()
|
|||
|
||||
void GroupChatForm::onUserListChanged()
|
||||
{
|
||||
nusers->setText(QString("%1 users in chat").arg(group->nPeers));
|
||||
nusers->setText(tr("%1 users in chat").arg(group->nPeers));
|
||||
QString names;
|
||||
for (QString& s : group->peers)
|
||||
names.append(s+", ");
|
||||
|
@ -236,7 +236,7 @@ void GroupChatForm::onChatContextMenuRequested(QPoint pos)
|
|||
|
||||
void GroupChatForm::onSaveLogClicked()
|
||||
{
|
||||
QString path = QFileDialog::getSaveFileName(0,"Save chat log");
|
||||
QString path = QFileDialog::getSaveFileName(0,tr("Save chat log"));
|
||||
if (path.isEmpty())
|
||||
return;
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
#include "widget/widget.h"
|
||||
#include "settings.h"
|
||||
#include <QFont>
|
||||
#include <QClipboard>
|
||||
#include <QApplication>
|
||||
|
||||
SettingsForm::SettingsForm()
|
||||
: QObject()
|
||||
|
@ -9,19 +11,25 @@ SettingsForm::SettingsForm()
|
|||
main = new QWidget(), head = new QWidget();
|
||||
QFont bold, small;
|
||||
bold.setBold(true);
|
||||
small.setPixelSize(7);
|
||||
headLabel.setText("User Settings");
|
||||
small.setPixelSize(13);
|
||||
headLabel.setText(tr("User Settings","\"Headline\" of the window"));
|
||||
headLabel.setFont(bold);
|
||||
|
||||
nameLabel.setText("Name");
|
||||
statusTextLabel.setText("Status");
|
||||
idLabel.setText("Tox ID");
|
||||
nameLabel.setText(tr("Name","Username/nick"));
|
||||
statusTextLabel.setText(tr("Status","Status message"));
|
||||
idLabel.setText("Tox ID (click here to copy)");
|
||||
id.setFont(small);
|
||||
id.setTextInteractionFlags(Qt::TextSelectableByMouse);
|
||||
id.setReadOnly(true);
|
||||
id.setFrameStyle(QFrame::NoFrame);
|
||||
id.setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
|
||||
id.setFixedHeight(id.document()->size().height());
|
||||
|
||||
videoTest.setText("Test video");
|
||||
enableIPv6.setText("Enable IPv6 (recommended)");
|
||||
videoTest.setText(tr("Test video","Text on a button to test the video/webcam"));
|
||||
enableIPv6.setText(tr("Enable IPv6 (recommended)","Text on a checkbox to enable IPv6"));
|
||||
enableIPv6.setChecked(Settings::getInstance().getEnableIPv6());
|
||||
useTranslations.setText(tr("Use translations","Text on a checkbox to enable translations"));
|
||||
useTranslations.setChecked(Settings::getInstance().getUseTranslations());
|
||||
|
||||
main->setLayout(&layout);
|
||||
layout.addWidget(&nameLabel);
|
||||
|
@ -32,6 +40,7 @@ SettingsForm::SettingsForm()
|
|||
layout.addWidget(&id);
|
||||
layout.addWidget(&videoTest);
|
||||
layout.addWidget(&enableIPv6);
|
||||
layout.addWidget(&useTranslations);
|
||||
layout.addStretch();
|
||||
|
||||
head->setLayout(&headLayout);
|
||||
|
@ -39,6 +48,7 @@ SettingsForm::SettingsForm()
|
|||
|
||||
connect(&videoTest, SIGNAL(clicked()), this, SLOT(onTestVideoClicked()));
|
||||
connect(&enableIPv6, SIGNAL(stateChanged(int)), this, SLOT(onEnableIPv6Updated()));
|
||||
connect(&idLabel, SIGNAL(clicked()), this, SLOT(copyIdClicked()));
|
||||
}
|
||||
|
||||
SettingsForm::~SettingsForm()
|
||||
|
@ -69,3 +79,14 @@ void SettingsForm::onEnableIPv6Updated()
|
|||
{
|
||||
Settings::getInstance().setEnableIPv6(enableIPv6.isChecked());
|
||||
}
|
||||
|
||||
void SettingsForm::copyIdClicked()
|
||||
{
|
||||
id.selectAll();;
|
||||
QApplication::clipboard()->setText(id.toPlainText());
|
||||
}
|
||||
|
||||
void SettingsForm::onUseTranslationUpdated()
|
||||
{
|
||||
Settings::getInstance().setUseTranslations(useTranslations.isChecked());
|
||||
}
|
||||
|
|
|
@ -8,6 +8,9 @@
|
|||
#include <QObject>
|
||||
#include <QSpacerItem>
|
||||
#include <QCheckBox>
|
||||
#include <QPushButton>
|
||||
#include <QTextEdit>
|
||||
#include "widget/tool/clickablelabel.h"
|
||||
#include "ui_widget.h"
|
||||
#include "widget/selfcamview.h"
|
||||
|
||||
|
@ -26,11 +29,15 @@ public slots:
|
|||
private slots:
|
||||
void onTestVideoClicked();
|
||||
void onEnableIPv6Updated();
|
||||
void onUseTranslationUpdated();
|
||||
void copyIdClicked();
|
||||
|
||||
private:
|
||||
QLabel headLabel, nameLabel, statusTextLabel, idLabel, id;
|
||||
QLabel headLabel, nameLabel, statusTextLabel;
|
||||
QTextEdit id;
|
||||
ClickableLabel idLabel;
|
||||
QPushButton videoTest;
|
||||
QCheckBox enableIPv6;
|
||||
QCheckBox enableIPv6, useTranslations;
|
||||
QVBoxLayout layout, headLayout;
|
||||
QWidget *main, *head;
|
||||
|
||||
|
|
|
@ -68,8 +68,8 @@ void FriendWidget::contextMenuEvent(QContextMenuEvent * event)
|
|||
{
|
||||
QPoint pos = event->globalPos();
|
||||
QMenu menu;
|
||||
menu.addAction("Copy friend ID");
|
||||
QMenu* inviteMenu = menu.addMenu("Invite in group");
|
||||
QAction* copyId = menu.addAction(tr("Copy friend ID","Menu to copy the Tox ID of that friend"));
|
||||
QMenu* inviteMenu = menu.addMenu(tr("Invite in group","Menu to invite a friend in a groupchat"));
|
||||
QMap<QAction*, Group*> groupActions;
|
||||
for (Group* group : GroupList::groupList)
|
||||
{
|
||||
|
@ -79,17 +79,17 @@ void FriendWidget::contextMenuEvent(QContextMenuEvent * event)
|
|||
if (groupActions.isEmpty())
|
||||
inviteMenu->setEnabled(false);
|
||||
menu.addSeparator();
|
||||
menu.addAction("Remove friend");
|
||||
QAction* removeFriendAction = menu.addAction(tr("Remove friend", "Menu to remove the friend from our friendlist"));
|
||||
|
||||
QAction* selectedItem = menu.exec(pos);
|
||||
if (selectedItem)
|
||||
{
|
||||
if (selectedItem->text() == "Copy friend ID")
|
||||
if (selectedItem == copyId)
|
||||
{
|
||||
emit copyFriendIdToClipboard(friendId);
|
||||
return;
|
||||
}
|
||||
else if (selectedItem->text() == "Remove friend")
|
||||
else if (selectedItem == removeFriendAction)
|
||||
{
|
||||
hide();
|
||||
emit removeFriend(friendId);
|
||||
|
|
|
@ -35,9 +35,9 @@ GroupWidget::GroupWidget(int GroupId, QString Name)
|
|||
this->setPalette(pal3);
|
||||
Group* g = GroupList::findGroup(groupId);
|
||||
if (g)
|
||||
nusers.setText(QString("%1 users in chat").arg(g->peers.size()));
|
||||
nusers.setText(GroupWidget::tr("%1 users in chat").arg(g->peers.size()));
|
||||
else
|
||||
nusers.setText("0 users in chat");
|
||||
nusers.setText(GroupWidget::tr("0 users in chat"));
|
||||
|
||||
textLayout.addStretch();
|
||||
textLayout.addWidget(&name);
|
||||
|
@ -70,19 +70,16 @@ void GroupWidget::contextMenuEvent(QContextMenuEvent * event)
|
|||
{
|
||||
QPoint pos = event->globalPos();
|
||||
QMenu menu;
|
||||
menu.addAction("Quit group");
|
||||
QAction* quitGroup = menu.addAction(tr("Quit group","Menu to quit a groupchat"));
|
||||
|
||||
QAction* selectedItem = menu.exec(pos);
|
||||
if (selectedItem)
|
||||
{
|
||||
if (selectedItem->text() == "Quit group")
|
||||
if (selectedItem == quitGroup)
|
||||
{
|
||||
hide();
|
||||
emit removeGroup(groupId);
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void GroupWidget::mousePressEvent(QMouseEvent *event)
|
||||
{
|
||||
|
@ -128,9 +125,9 @@ void GroupWidget::onUserListChanged()
|
|||
{
|
||||
Group* g = GroupList::findGroup(groupId);
|
||||
if (g)
|
||||
nusers.setText(QString("%1 users in chat").arg(g->nPeers));
|
||||
nusers.setText(tr("%1 users in chat").arg(g->nPeers));
|
||||
else
|
||||
nusers.setText("0 users in chat");
|
||||
nusers.setText(tr("0 users in chat"));
|
||||
}
|
||||
|
||||
void GroupWidget::setAsActiveChatroom()
|
||||
|
|
|
@ -13,7 +13,7 @@ SelfCamView::SelfCamView(Camera* Cam, QWidget* parent)
|
|||
mainLayout{new QHBoxLayout()}, cam(Cam)
|
||||
{
|
||||
setLayout(mainLayout);
|
||||
setWindowTitle("Tox video test");
|
||||
setWindowTitle(SelfCamView::tr("Tox video test","Title of the window to test the video/webcam"));
|
||||
setMinimumSize(320,240);
|
||||
|
||||
updateDisplayTimer.setInterval(5);
|
||||
|
|
11
widget/tool/clickablelabel.cpp
Normal file
11
widget/tool/clickablelabel.cpp
Normal file
|
@ -0,0 +1,11 @@
|
|||
#include "clickablelabel.h"
|
||||
|
||||
ClickableLabel::ClickableLabel(QWidget *parent) :
|
||||
QLabel(parent)
|
||||
{
|
||||
}
|
||||
|
||||
void ClickableLabel::mousePressEvent(QMouseEvent*)
|
||||
{
|
||||
emit clicked();
|
||||
}
|
20
widget/tool/clickablelabel.h
Normal file
20
widget/tool/clickablelabel.h
Normal file
|
@ -0,0 +1,20 @@
|
|||
#ifndef CLICKABLELABEL_H
|
||||
#define CLICKABLELABEL_H
|
||||
|
||||
#include <QLabel>
|
||||
|
||||
class ClickableLabel : public QLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit ClickableLabel(QWidget *parent = 0);
|
||||
|
||||
signals:
|
||||
void clicked();
|
||||
|
||||
protected:
|
||||
void mousePressEvent ( QMouseEvent * event );
|
||||
|
||||
};
|
||||
|
||||
#endif // CLICKABLELABEL_H
|
|
@ -26,7 +26,7 @@ CopyableElideLabel::CopyableElideLabel(QWidget* parent) :
|
|||
setContextMenuPolicy(Qt::CustomContextMenu);
|
||||
connect(this, &CopyableElideLabel::customContextMenuRequested, this, &CopyableElideLabel::showContextMenu);
|
||||
|
||||
actionCopy = new QAction(tr("Copy"), this);
|
||||
actionCopy = new QAction(CopyableElideLabel::tr("Copy"), this);
|
||||
connect(actionCopy, &QAction::triggered, [this]() {
|
||||
QApplication::clipboard()->setText(text());
|
||||
});
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
|
||||
class CopyableElideLabel : public ElideLabel
|
||||
{
|
||||
Q_OBJECT
|
||||
public:
|
||||
explicit CopyableElideLabel(QWidget* parent = 0);
|
||||
|
||||
|
|
|
@ -27,22 +27,22 @@ FriendRequestDialog::FriendRequestDialog(QWidget *parent, const QString &userId,
|
|||
QDialog(parent)
|
||||
{
|
||||
setWindowFlags(windowFlags() & ~Qt::WindowContextHelpButtonHint);
|
||||
setWindowTitle("Friend request");
|
||||
setWindowTitle(tr("Friend request","Title of the window to aceept/deny a friend request"));
|
||||
|
||||
QLabel *friendsLabel = new QLabel("Someone wants to make friends with you.", this);
|
||||
QLabel *userIdLabel = new QLabel("User ID:", this);
|
||||
QLabel *friendsLabel = new QLabel(tr("Someone wants to make friends with you"), this);
|
||||
QLabel *userIdLabel = new QLabel(tr("User ID:"), this);
|
||||
QLineEdit *userIdEdit = new QLineEdit(userId, this);
|
||||
userIdEdit->setCursorPosition(0);
|
||||
userIdEdit->setReadOnly(true);
|
||||
QLabel *messageLabel = new QLabel("Friend request message:", this);
|
||||
QLabel *messageLabel = new QLabel(tr("Friend request message:"), this);
|
||||
QPlainTextEdit *messageEdit = new QPlainTextEdit(message, this);
|
||||
messageEdit->setReadOnly(true);
|
||||
|
||||
|
||||
QDialogButtonBox *buttonBox = new QDialogButtonBox(Qt::Horizontal, this);
|
||||
|
||||
buttonBox->addButton("Accept", QDialogButtonBox::AcceptRole);
|
||||
buttonBox->addButton("Reject", QDialogButtonBox::RejectRole);
|
||||
buttonBox->addButton(tr("Accept","Accept a friend request"), QDialogButtonBox::AcceptRole);
|
||||
buttonBox->addButton(tr("Reject","Reject a friend request"), QDialogButtonBox::RejectRole);
|
||||
|
||||
connect(buttonBox, &QDialogButtonBox::accepted, this, &FriendRequestDialog::accept);
|
||||
connect(buttonBox, &QDialogButtonBox::rejected, this, &FriendRequestDialog::reject);
|
||||
|
|
|
@ -160,7 +160,6 @@ Widget::Widget(QWidget *parent) :
|
|||
ui->pbMin->setMouseTracking(true);
|
||||
ui->pbMax->setMouseTracking(true);
|
||||
ui->pbClose->setMouseTracking(true);
|
||||
ui->statusHead->setAttribute(Qt::WA_TransparentForMouseEvents);
|
||||
ui->statusHead->setMouseTracking(true);
|
||||
|
||||
QList<int> currentSizes = ui->centralWidget->sizes();
|
||||
|
@ -214,6 +213,7 @@ Widget::Widget(QWidget *parent) :
|
|||
connect(ui->settingsButton, SIGNAL(clicked()), this, SLOT(onSettingsClicked()));
|
||||
connect(ui->nameLabel, SIGNAL(textChanged(QString,QString)), this, SLOT(onUsernameChanged(QString,QString)));
|
||||
connect(ui->statusLabel, SIGNAL(textChanged(QString,QString)), this, SLOT(onStatusMessageChanged(QString,QString)));
|
||||
connect(ui->statImg, SIGNAL(clicked()), this, SLOT(onStatusImgClicked()));
|
||||
connect(&settingsForm.name, SIGNAL(textChanged(QString)), this, SLOT(onUsernameChanged(QString)));
|
||||
connect(&settingsForm.statusText, SIGNAL(textChanged(QString)), this, SLOT(onStatusMessageChanged(QString)));
|
||||
connect(&friendForm, SIGNAL(friendRequested(QString,QString)), this, SIGNAL(friendRequested(QString,QString)));
|
||||
|
@ -258,7 +258,7 @@ Widget* Widget::getInstance()
|
|||
|
||||
//Super ugly hack to enable resizable friend widgets
|
||||
//There should be a way to set them to resize automagicly, but I can't seem to find it.
|
||||
void Widget::splitterMoved(int pos, int index)
|
||||
void Widget::splitterMoved(int, int)
|
||||
{
|
||||
updateFriendListWidth();
|
||||
}
|
||||
|
@ -307,8 +307,10 @@ void Widget::onStatusSet(Status status)
|
|||
{
|
||||
if (status == Status::Online)
|
||||
ui->statImg->setPixmap(QPixmap(":img/status/dot_online_2x.png"));
|
||||
else if (status == Status::Busy || status == Status::Away)
|
||||
else if (status == Status::Away)
|
||||
ui->statImg->setPixmap(QPixmap(":img/status/dot_idle_2x.png"));
|
||||
else if (status == Status::Busy)
|
||||
ui->statImg->setPixmap(QPixmap(":img/status/dot_busy_2x.png"));
|
||||
else if (status == Status::Offline)
|
||||
ui->statImg->setPixmap(QPixmap(":img/status/dot_away_2x.png"));
|
||||
}
|
||||
|
@ -540,10 +542,14 @@ void Widget::updateFriendStatusLights(int friendId)
|
|||
f->widget->statusPic.setPixmap(QPixmap(":img/status/dot_online.png"));
|
||||
else if (status == Status::Online && f->hasNewMessages == 1)
|
||||
f->widget->statusPic.setPixmap(QPixmap(":img/status/dot_online_notification.png"));
|
||||
else if ((status == Status::Busy || status == Status::Away) && f->hasNewMessages == 0)
|
||||
else if (status == Status::Away && f->hasNewMessages == 0)
|
||||
f->widget->statusPic.setPixmap(QPixmap(":img/status/dot_idle.png"));
|
||||
else if ((status == Status::Busy || status == Status::Away) && f->hasNewMessages == 1)
|
||||
else if (status == Status::Away && f->hasNewMessages == 1)
|
||||
f->widget->statusPic.setPixmap(QPixmap(":img/status/dot_idle_notification.png"));
|
||||
else if (status == Status::Busy && f->hasNewMessages == 0)
|
||||
f->widget->statusPic.setPixmap(QPixmap(":img/status/dot_busy.png"));
|
||||
else if (status == Status::Busy && f->hasNewMessages == 1)
|
||||
f->widget->statusPic.setPixmap(QPixmap(":img/status/dot_busy_notification.png"));
|
||||
else if (status == Status::Offline && f->hasNewMessages == 0)
|
||||
f->widget->statusPic.setPixmap(QPixmap(":img/status/dot_away.png"));
|
||||
else if (status == Status::Offline && f->hasNewMessages == 1)
|
||||
|
@ -587,7 +593,7 @@ void Widget::copyFriendIdToClipboard(int friendId)
|
|||
}
|
||||
}
|
||||
|
||||
void Widget::onGroupInviteReceived(int32_t friendId, uint8_t* publicKey)
|
||||
void Widget::onGroupInviteReceived(int32_t friendId, const uint8_t* publicKey)
|
||||
{
|
||||
int groupId = core->joinGroupchat(friendId, publicKey);
|
||||
if (groupId == -1)
|
||||
|
@ -1137,3 +1143,19 @@ void Widget::minimizeBtnClicked()
|
|||
}
|
||||
}
|
||||
|
||||
void Widget::onStatusImgClicked()
|
||||
{
|
||||
QMenu menu;
|
||||
QAction* online = menu.addAction(tr("Online","Button to set your status to 'Online'"));
|
||||
QAction* away = menu.addAction(tr("Away","Button to set your status to 'Away'"));
|
||||
QAction* busy = menu.addAction(tr("Busy","Button to set your status to 'Busy'"));
|
||||
|
||||
QPoint pos = QCursor::pos();
|
||||
QAction* selectedItem = menu.exec(pos);
|
||||
if (selectedItem == online)
|
||||
core->setStatus(Status::Online);
|
||||
else if (selectedItem == away)
|
||||
core->setStatus(Status::Away);
|
||||
else if (selectedItem == busy)
|
||||
core->setStatus(Status::Busy);
|
||||
}
|
||||
|
|
|
@ -85,13 +85,14 @@ private slots:
|
|||
void onFriendMessageReceived(int friendId, const QString& message);
|
||||
void onFriendRequestReceived(const QString& userId, const QString& message);
|
||||
void onEmptyGroupCreated(int groupId);
|
||||
void onGroupInviteReceived(int32_t friendId, uint8_t *publicKey);
|
||||
void onGroupInviteReceived(int32_t friendId, const uint8_t *publicKey);
|
||||
void onGroupMessageReceived(int groupnumber, int friendgroupnumber, const QString& message);
|
||||
void onGroupNamelistChanged(int groupnumber, int peernumber, uint8_t change);
|
||||
void onGroupWidgetClicked(GroupWidget* widget);
|
||||
void removeFriend(int friendId);
|
||||
void copyFriendIdToClipboard(int friendId);
|
||||
void removeGroup(int groupId);
|
||||
void onStatusImgClicked();
|
||||
void splitterMoved(int pos, int index);
|
||||
|
||||
protected slots:
|
||||
|
|
Loading…
Reference in New Issue
Block a user