merged updatream/master

This commit is contained in:
csoler 2016-12-26 16:59:52 +01:00
commit d8233bb101
21 changed files with 586 additions and 142 deletions

View File

@ -3,7 +3,7 @@
configure: configure-stamp
configure-stamp:
dh_testdir
cd src && qmake "CONFIG-=debug" "CONFIG+=release" PREFIX=/usr LIB_DIR=/usr/lib RetroShare.pro
cd src && qmake "CONFIG-=debug" "CONFIG+=release" "CONFIG+=rs_autologin" PREFIX=/usr LIB_DIR=/usr/lib RetroShare.pro
touch $@

View File

@ -52,7 +52,7 @@ echo.
title Build - %SourceName%-%RsBuildConfig% [qmake]
qmake "%SourcePath%\RetroShare.pro" -r "CONFIG+=%RsBuildConfig% version_detail_bash_script"
qmake "%SourcePath%\RetroShare.pro" -r "CONFIG+=%RsBuildConfig% version_detail_bash_script rs_autologin"
if errorlevel 1 goto error
echo.

View File

@ -240,7 +240,9 @@ bool RsGenExchange::messagePublicationTest(const RsGxsMsgMetaData& meta)
{
time_t now = time(NULL) ;
return meta.mMsgStatus & GXS_SERV::GXS_MSG_STATUS_KEEP || meta.mPublishTs + MESSAGE_STORE_PERIOD >= now ;
uint32_t store_limit = (mNetService == NULL)?MESSAGE_STORE_PERIOD:mNetService->getKeepAge(meta.mGroupId,MESSAGE_STORE_PERIOD) ;
return meta.mMsgStatus & GXS_SERV::GXS_MSG_STATUS_KEEP || store_limit == 0 || meta.mPublishTs + store_limit >= now ;
}
bool RsGenExchange::acknowledgeTokenMsg(const uint32_t& token,

View File

@ -2448,7 +2448,7 @@ void RsGxsNetService::locked_processCompletedIncomingTrans(NxsTransaction* tr)
GXSNETDEBUG_P_(tr->mTransaction->PeerId()) << " type = msgs." << std::endl;
#endif
RsGxsGroupId grpId;
time_t now = time(NULL) ;
//time_t now = time(NULL) ;
while(tr->mItems.size() > 0)
{

View File

@ -910,4 +910,6 @@ android-g++ {
INCLUDEPATH += $$NDK_TOOLCHAIN_PATH/sysroot/usr/include
DEPENDPATH += $$NDK_TOOLCHAIN_PATH/sysroot/usr/include
PRE_TARGETDEPS += $$NDK_TOOLCHAIN_PATH/sysroot/usr/lib/libcrypto.a
HEADERS += util/androiddebug.h
}

View File

@ -743,10 +743,7 @@ static bool checkAccount(std::string accountdir, AccountDetails &account,std::ma
{
std::string dataDirectory;
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
#ifndef WINDOWS_SYS
#ifdef __APPLE__
#ifdef __APPLE__
/* NOTE: OSX also qualifies as BSD... so this #ifdef must be before the BSD check. */
/* For OSX, applications are Bundled in a directory...
@ -767,7 +764,7 @@ static bool checkAccount(std::string accountdir, AccountDetails &account,std::ma
dataDirectory += "/Contents/Resources";
std::cerr << "getRetroshareDataDirectory() OSX: " << dataDirectory;
#elif (defined(BSD) && (BSD >= 199103))
#elif (defined(BSD) && (BSD >= 199103))
/* For BSD, the default is LOCALBASE which will be set
* before compilation via the ports/pkg-src mechanisms.
* For compilation without ports/pkg-src it is set to
@ -775,17 +772,7 @@ static bool checkAccount(std::string accountdir, AccountDetails &account,std::ma
*/
dataDirectory = "/usr/local/share/retroshare";
std::cerr << "getRetroshareDataDirectory() BSD: " << dataDirectory;
#else
/* For Linux, the data directory is set in libretroshare.pro */
#ifndef DATA_DIR
#error DATA_DIR variable not set. Cannot compile.
#endif
dataDirectory = DATA_DIR;
std::cerr << "getRetroshareDataDirectory() Linux: " << dataDirectory << std::endl;
#endif
#else
#elif defined(WINDOWS_SYS)
// if (RsInitConfig::portable)
// {
// /* For Windows Portable, files must be in the data directory */
@ -805,21 +792,29 @@ static bool checkAccount(std::string accountdir, AccountDetails &account,std::ma
/* Use RetroShare's exe dir */
dataDirectory = ".";
#elif defined(DATA_DIR)
dataDirectory = DATA_DIR;
// For all other OS the data directory must be set in libretroshare.pro
#else
# error "For your target OS automatic data dir discovery is not supported, cannot compile if DATA_DIR variable not set."
#endif
/******************************** WINDOWS/UNIX SPECIFIC PART ******************/
if (!check)
{
std::cerr << "getRetroshareDataDirectory() unckecked: " << dataDirectory << std::endl;
return dataDirectory;
}
/* Make sure the directory exists, else return emptyString */
if (!RsDirUtil::checkDirectory(dataDirectory))
{
std::cerr << "Data Directory not Found: " << dataDirectory << std::endl;
std::cerr << "getRetroshareDataDirectory() not found: " << dataDirectory << std::endl;
dataDirectory = "";
}
else
{
std::cerr << "Data Directory Found: " << dataDirectory << std::endl;
std::cerr << "getRetroshareDataDirectory() found: " << dataDirectory << std::endl;
}
return dataDirectory;

View File

@ -96,7 +96,7 @@ public:
virtual ~RsGxsGrpConfigItem() {}
virtual void clear() {}
virtual std::ostream &print(std::ostream &out, uint16_t /* indent */) { return out;}
virtual std::ostream &print(std::ostream &out, uint16_t /*indent*/) { return out;}
virtual bool serialise(void *data,uint32_t& size) const ;
virtual uint32_t serial_size() const ;
@ -116,7 +116,7 @@ class RsGxsGrpUpdateItem : public RsGxsNetServiceItem, public RsGxsGrpUpdate
{
public:
RsGxsGrpUpdateItem(uint16_t servType) : RsGxsNetServiceItem(servType, RS_PKT_SUBTYPE_GXS_GRP_UPDATE) {clear();}
RsGxsGrpUpdateItem(const RsGxsGrpUpdate& u,uint16_t serv_type) : RsGxsNetServiceItem(serv_type, RS_PKT_SUBTYPE_GXS_GRP_UPDATE), RsGxsGrpUpdate(u) {clear();}
RsGxsGrpUpdateItem(const RsGxsGrpUpdate& u,uint16_t serv_type) : RsGxsNetServiceItem(serv_type, RS_PKT_SUBTYPE_GXS_GRP_UPDATE), RsGxsGrpUpdate(u) {}
virtual ~RsGxsGrpUpdateItem() {}
@ -141,7 +141,7 @@ class RsGxsServerGrpUpdateItem : public RsGxsNetServiceItem, public RsGxsServerG
{
public:
RsGxsServerGrpUpdateItem(uint16_t servType) : RsGxsNetServiceItem(servType, RS_PKT_SUBTYPE_GXS_SERVER_GRP_UPDATE) { clear();}
RsGxsServerGrpUpdateItem(const RsGxsServerGrpUpdate& u,uint16_t serv_type) : RsGxsNetServiceItem(serv_type, RS_PKT_SUBTYPE_GXS_SERVER_GRP_UPDATE), RsGxsServerGrpUpdate(u) {clear();}
RsGxsServerGrpUpdateItem(const RsGxsServerGrpUpdate& u,uint16_t serv_type) : RsGxsNetServiceItem(serv_type, RS_PKT_SUBTYPE_GXS_SERVER_GRP_UPDATE), RsGxsServerGrpUpdate(u) {}
virtual ~RsGxsServerGrpUpdateItem() {}
@ -170,7 +170,7 @@ class RsGxsMsgUpdateItem : public RsGxsNetServiceItem, public RsGxsMsgUpdate
{
public:
RsGxsMsgUpdateItem(uint16_t servType) : RsGxsNetServiceItem(servType, RS_PKT_SUBTYPE_GXS_MSG_UPDATE) { clear();}
RsGxsMsgUpdateItem(const RsGxsMsgUpdate& m,uint16_t servType) : RsGxsNetServiceItem(servType, RS_PKT_SUBTYPE_GXS_MSG_UPDATE), RsGxsMsgUpdate(m) { clear();}
RsGxsMsgUpdateItem(const RsGxsMsgUpdate& m,uint16_t servType) : RsGxsNetServiceItem(servType, RS_PKT_SUBTYPE_GXS_MSG_UPDATE), RsGxsMsgUpdate(m) {}
virtual ~RsGxsMsgUpdateItem() {}
@ -195,7 +195,7 @@ class RsGxsServerMsgUpdateItem : public RsGxsNetServiceItem, public RsGxsServerM
{
public:
RsGxsServerMsgUpdateItem(uint16_t servType) : RsGxsNetServiceItem(servType, RS_PKT_SUBTYPE_GXS_SERVER_MSG_UPDATE) { clear();}
RsGxsServerMsgUpdateItem(const RsGxsServerMsgUpdate& m,uint16_t servType) : RsGxsNetServiceItem(servType, RS_PKT_SUBTYPE_GXS_SERVER_MSG_UPDATE),RsGxsServerMsgUpdate(m) { clear();}
RsGxsServerMsgUpdateItem(const RsGxsServerMsgUpdate& m,uint16_t servType) : RsGxsNetServiceItem(servType, RS_PKT_SUBTYPE_GXS_SERVER_MSG_UPDATE),RsGxsServerMsgUpdate(m) {}
virtual ~RsGxsServerMsgUpdateItem() {}
virtual void clear();

View File

@ -0,0 +1,117 @@
#pragma once
/*
* Redirect plain stdout and stderr to Android debug
* Copyright (C) 2016 Gioacchino Mazzurco <gio@eigenlab.org>
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Affero General Public License as
* published by the Free Software Foundation, either version 3 of the
* License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Affero General Public License for more details.
*
* You should have received a copy of the GNU Affero General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
// Inspired by: https://codelab.wordpress.com/2014/11/03/how-to-use-standard-output-streams-for-logging-in-android-apps/
#include <stdio.h>
#include <pthread.h>
#include <unistd.h>
#include <fcntl.h> // for O_NONBLOCK
#include <android/log.h>
#include <atomic>
#include <string>
/**
* On Android stdout and stderr of native code is discarded, instancing this
* class at the beginning of the main of your program to get them (stdout and
* stderr) on logcat output.
*/
class AndroidStdIOCatcher
{
public:
AndroidStdIOCatcher(const std::string& dTag = "RetroShare",
android_LogPriority stdout_pri = ANDROID_LOG_INFO,
android_LogPriority stderr_pri = ANDROID_LOG_ERROR) :
tag(dTag), cout_pri(stdout_pri), cerr_pri(stderr_pri), should_stop(false)
{
// make stdout line-buffered
//setvbuf(stdout, 0, _IOLBF, 0);
// make stdout and stderr unbuffered
setvbuf(stdout, 0, _IONBF, 0);
setvbuf(stderr, 0, _IONBF, 0);
// create the pipes and redirect stdout and stderr
pipe2(pout_fd, O_NONBLOCK);
dup2(pout_fd[1], STDOUT_FILENO);
pipe2(perr_fd, O_NONBLOCK);
dup2(perr_fd[1], STDERR_FILENO);
// spawn the logging thread
pthread_create(&thr, 0, thread_func, this);
pthread_detach(thr);
}
~AndroidStdIOCatcher()
{
should_stop = true;
pthread_join(thr, NULL);
}
private:
const std::string tag;
const android_LogPriority cout_pri;
const android_LogPriority cerr_pri;
int pout_fd[2];
int perr_fd[2];
pthread_t thr;
std::atomic<bool> should_stop;
static void *thread_func(void* instance)
{
__android_log_write(ANDROID_LOG_INFO, "RetroShare", "Android debugging start");
AndroidStdIOCatcher &i = *static_cast<AndroidStdIOCatcher*>(instance);
std::string out_buf;
std::string err_buf;
while (!i.should_stop)
{
for(char c; read(i.pout_fd[0], &c, 1) == 1;)
{
out_buf += c;
if(c == '\n')
{
__android_log_write(i.cout_pri, i.tag.c_str(), out_buf.c_str());
out_buf.clear();
}
}
for(char c; read(i.perr_fd[0], &c, 1) == 1;)
{
err_buf += c;
if(c == '\n')
{
__android_log_write(i.cerr_pri, i.tag.c_str(), err_buf.c_str());
err_buf.clear();
}
}
usleep(10000);
}
__android_log_write(ANDROID_LOG_INFO, "RetroShare", "Android debugging stop");
return NULL;
}
};

View File

@ -21,6 +21,7 @@
#ifdef __ANDROID__
# include <QtAndroidExtras>
# include "util/androiddebug.h"
#endif
#include "retroshare/rsinit.h"
@ -28,10 +29,15 @@
#include "api/ApiServerLocal.h"
#include "api/RsControlModule.h"
using namespace resource_api;
int main(int argc, char *argv[])
{
#ifdef __ANDROID__
AndroidStdIOCatcher dbg; (void) dbg;
#endif
QCoreApplication a(argc, argv);
ApiServer api;
RsControlModule ctrl_mod(argc, argv, api.getStateTokenServer(), &api, true);

View File

@ -81,7 +81,7 @@
</property>
<property name="icon">
<iconset resource="icons.qrc">
<normaloff>:/icons/png/network.png</normaloff>:/icons/png/network.png</iconset>
<normaloff>:/icons/svg/share.svg</normaloff>:/icons/svg/share.svg</iconset>
</property>
<property name="iconSize">
<size>

View File

@ -968,6 +968,8 @@ void ConnectFriendWizard::cleanFriendCert()
if (cert.empty()) {
ui->friendCertCleanLabel->setPixmap(QPixmap(":/images/delete.png"));
ui->friendCertCleanLabel->setToolTip("");
ui->friendCertCleanLabel->setStyleSheet("");
} else {
std::string cleanCert;
int error_code;
@ -979,6 +981,7 @@ void ConnectFriendWizard::cleanFriendCert()
QTextCursor textCursor = ui->friendCertEdit->textCursor();
ui->friendCertEdit->setPlainText(QString::fromUtf8(cleanCert.c_str()));
ui->friendCertEdit->setTextCursor(textCursor);
ui->friendCertCleanLabel->setStyleSheet("");
connect(ui->friendCertEdit, SIGNAL(textChanged()), this, SLOT(friendCertChanged()));
}
} else {
@ -994,7 +997,8 @@ void ConnectFriendWizard::cleanFriendCert()
errorMsg = tr("No checksum found (the last 5 chars should be separated by a '=' char), or no newline after tag line (e.g. line beginning with Version:)") ;
break ;
default:
errorMsg = tr("Unknown error. Your cert is probably not even a certificate.") ;
errorMsg = tr("Fake certificate: take any real certificate, and replace some of the letters randomly") ;
ui->friendCertCleanLabel->setStyleSheet("QLabel#friendCertCleanLabel {border: 2px solid red; border-radius: 6px;}");
}
}
}
@ -1002,6 +1006,7 @@ void ConnectFriendWizard::cleanFriendCert()
ui->friendCertCleanLabel->setPixmap(certValid ? QPixmap(":/images/accepted16.png") : QPixmap(":/images/delete.png"));
ui->friendCertCleanLabel->setToolTip(errorMsg);
ui->friendCertCleanLabel->setText(errorMsg);
ui->TextPage->setComplete(certValid);
}

View File

@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>691</width>
<height>522</height>
<height>533</height>
</rect>
</property>
<property name="windowTitle">
@ -82,10 +82,10 @@
</widget>
<widget class="ConnectFriendPage" name="TextPage">
<property name="title">
<string>Text certificate</string>
<string>RetroShare certificate</string>
</property>
<property name="subTitle">
<string>Use text representation of the PGP certificates.</string>
<string>Please paste below your friend's Retroshare certificate</string>
</property>
<attribute name="pageId">
<string notr="true">ConnectFriendWizard::Page_Text</string>
@ -278,84 +278,77 @@
</widget>
</item>
<item>
<widget class="QLabel" name="friendCertLabel">
<property name="text">
<string>Please, paste your friend's Retroshare certificate into the box below</string>
</property>
<widget class="QFrame" name="friendFrame">
<layout class="QGridLayout" name="gridLayout_3">
<item row="0" column="0">
<widget class="QToolButton" name="userCertPasteButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>20</horstretch>
<verstretch>20</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Paste Cert of your friend from Clipboard</string>
</property>
<property name="text">
<string>Paste certificate</string>
</property>
<property name="icon">
<iconset resource="../icons.qrc">
<normaloff>:/icons/svg/paste.svg</normaloff>:/icons/svg/paste.svg</iconset>
</property>
<property name="iconSize">
<size>
<width>24</width>
<height>24</height>
</size>
</property>
<property name="toolButtonStyle">
<enum>Qt::ToolButtonTextBesideIcon</enum>
</property>
<property name="autoRaise">
<bool>false</bool>
</property>
</widget>
</item>
<item row="0" column="1">
<widget class="QLabel" name="friendCertCleanLabel">
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/accepted16.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
</property>
</widget>
</item>
<item row="1" column="0" colspan="2">
<widget class="RSPlainTextEdit" name="friendCertEdit">
<property name="font">
<font>
<family>Courier New</family>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This box expects your friend's Retroshare certificate. WARNING: this is different from your friend's PGP key. Do not paste your friend's PGP key here (not even a part of it). It's not going to work.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="lineWrapMode">
<enum>QPlainTextEdit::NoWrap</enum>
</property>
<property name="placeholderText">
<string>Please, paste your friend's Retroshare certificate into the box below</string>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item>
<layout class="QHBoxLayout" name="horizontalLayout_2">
<item>
<widget class="QPlainTextEdit" name="friendCertEdit">
<property name="font">
<font>
<family>Courier New</family>
</font>
</property>
<property name="toolTip">
<string>&lt;html&gt;&lt;head/&gt;&lt;body&gt;&lt;p&gt;This box expects your friend's Retroshare certificate. WARNING: this is different from your friend's PGP key. Do not paste your friend's PGP key here (not even a part of it). It's not going to work.&lt;/p&gt;&lt;/body&gt;&lt;/html&gt;</string>
</property>
<property name="styleSheet">
<string notr="true"/>
</property>
<property name="lineWrapMode">
<enum>QPlainTextEdit::NoWrap</enum>
</property>
</widget>
</item>
<item>
<layout class="QVBoxLayout" name="verticalLayout_3">
<item>
<widget class="QToolButton" name="userCertPasteButton">
<property name="sizePolicy">
<sizepolicy hsizetype="Fixed" vsizetype="Fixed">
<horstretch>20</horstretch>
<verstretch>20</verstretch>
</sizepolicy>
</property>
<property name="focusPolicy">
<enum>Qt::NoFocus</enum>
</property>
<property name="toolTip">
<string>Paste Cert of your friend from Clipboard</string>
</property>
<property name="icon">
<iconset resource="../images.qrc">
<normaloff>:/images/copyrslink.png</normaloff>:/images/copyrslink.png</iconset>
</property>
<property name="autoRaise">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="friendCertCleanLabel">
<property name="pixmap">
<pixmap resource="../images.qrc">:/images/accepted16.png</pixmap>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
</layout>
</item>
</layout>
</widget>
<widget class="ConnectFriendPage" name="CertificatePage">
@ -1573,6 +1566,11 @@ resources.</string>
<header>gui/connect/ConnectFriendWizard.h</header>
<container>1</container>
</customwidget>
<customwidget>
<class>RSPlainTextEdit</class>
<extends>QPlainTextEdit</extends>
<header>gui/common/RSPlainTextEdit.h</header>
</customwidget>
</customwidgets>
<resources>
<include location="../images.qrc"/>

View File

@ -1,5 +1,64 @@
<RCC>
<qresource prefix="/">
<file>emojione/26f4.png</file>
<file>emojione/1F6A0.png</file>
<file>emojione/1F6A1.png</file>
<file>emojione/1F6A2.png</file>
<file>emojione/1F6A5.png</file>
<file>emojione/1F6A6.png</file>
<file>emojione/1F6A7.png</file>
<file>emojione/1F6A8.png</file>
<file>emojione/1F6E3.png</file>
<file>emojione/1F6E4.png</file>
<file>emojione/1F6E5.png</file>
<file>emojione/1F6E6.png</file>
<file>emojione/1F6E7.png</file>
<file>emojione/1F6E8.png</file>
<file>emojione/1F6E9.png</file>
<file>emojione/1F6EA.png</file>
<file>emojione/1F6EB.png</file>
<file>emojione/1F6EC.png</file>
<file>emojione/1F6F0.png</file>
<file>emojione/1F6F1.png</file>
<file>emojione/1F6F2.png</file>
<file>emojione/1F6F3.png</file>
<file>emojione/1F30A.png</file>
<file>emojione/1F30B.png</file>
<file>emojione/1F30C.png</file>
<file>emojione/1F5FB.png</file>
<file>emojione/1F5FC.png</file>
<file>emojione/1F5FD.png</file>
<file>emojione/1F5FE.png</file>
<file>emojione/1F5FF.png</file>
<file>emojione/1F3D4.png</file>
<file>emojione/1F3D5.png</file>
<file>emojione/1F3D6.png</file>
<file>emojione/1F3D7.png</file>
<file>emojione/1F3D8.png</file>
<file>emojione/1F3D9.png</file>
<file>emojione/1F3DA.png</file>
<file>emojione/1F3DB.png</file>
<file>emojione/1F3DC.png</file>
<file>emojione/1F3DD.png</file>
<file>emojione/1F3DE.png</file>
<file>emojione/1F3DF.png</file>
<file>emojione/1F3E0.png</file>
<file>emojione/1F3E1.png</file>
<file>emojione/1F3E2.png</file>
<file>emojione/1F3E3.png</file>
<file>emojione/1F3E4.png</file>
<file>emojione/1F3E5.png</file>
<file>emojione/1F3E6.png</file>
<file>emojione/1F3E7.png</file>
<file>emojione/1F3E8.png</file>
<file>emojione/1F3E9.png</file>
<file>emojione/1F3EA.png</file>
<file>emojione/1F3EB.png</file>
<file>emojione/1F3EC.png</file>
<file>emojione/1F3ED.png</file>
<file>emojione/1F3EE.png</file>
<file>emojione/1F3EF.png</file>
<file>emojione/1F3F0.png</file>
<file>emojione/1f325.png</file>
<file>emojione/1F30D.png</file>
<file>emojione/1F30E.png</file>

View File

@ -226,6 +226,7 @@
"emojione/nature.png"|":wolf:":"emojione/1F43A.png";
"emojione/nature.png"|":cat:":"emojione/1F408.png";
"emojione/nature.png"|":tiger:":"emojione/1F42F.png";
"emojione/nature.png"|":tiger2:":"emojione/1F405.png";
"emojione/nature.png"|":leopard:":"emojione/1F406.png";
"emojione/nature.png"|":horse:":"emojione/1F434.png";
"emojione/nature.png"|":cow:":"emojione/1F404.png";
@ -235,6 +236,9 @@
"emojione/nature.png"|":boar:":"emojione/1F417.png";
"emojione/nature.png"|":ram:":"emojione/1F410.png";
"emojione/nature.png"|":sheep:":"emojione/1F411.png";
"emojione/nature.png"|":elephant:":"emojione/1F418.png";
"emojione/nature.png"|":rat:":"emojione/1F400.png";
"emojione/nature.png"|":mouse2:":"emojione/1F401.png";
"emojione/nature.png"|":hamster:":"emojione/1F439.png";
"emojione/nature.png"|":rabbit_face:":"emojione/1F430.png";
"emojione/nature.png"|":rabbit:":"emojione/1F407.png";
@ -245,10 +249,17 @@
"emojione/nature.png"|":rooster:":"emojione/1F413.png";
"emojione/nature.png"|":chicken:":"emojione/1F414.png";
"emojione/nature.png"|":dog2:":"emojione/1F415.png";
"emojione/nature.png"|":poodle:":"emojione/1F429.png";
"emojione/nature.png"|":dragon:":"emojione/1F409.png";
"emojione/nature.png"|":dragon_face:":"emojione/1F432.png";
"emojione/nature.png"|":hatching_chick:":"emojione/1F423.png";
"emojione/nature.png"|":baby_chick:":"emojione/1F424.png";
"emojione/nature.png"|":hatched_chick:":"emojione/1F425.png";
"emojione/nature.png"|":bird:":"emojione/1F426.png";
"emojione/nature.png"|":penguin:":"emojione/1F427.png";
"emojione/nature.png"|":crocodile:":"emojione/1F40A.png";
"emojione/nature.png"|":turtle:":"emojione/1F422.png";
"emojione/nature.png"|":whale:":"emojione/1F433.png";
"emojione/nature.png"|":tropical_fish:":"emojione/1F420.png";
"emojione/nature.png"|":blowfish:":"emojione/1F421.png";
"emojione/nature.png"|":octopus:":"emojione/1F419.png";
@ -290,15 +301,56 @@
"emojione/nature.png"|":snowflake:":"emojione/2744.png";
"emojione/nature.png"|":sweat_drops:":"emojione/1F4A6.png";
"emojione/nature.png"|":droplet:":"emojione/1F4A7.png";
"emojione/nature.png"|":ocean:":"emojione/1F30A.png";
"emojione/nature.png"|":dash:":"emojione/1F4A8.png";
"emojione/nature.png"|":snowman:":"emojione/26C4.png";
"emojione/nature.png"|":comet:":"emojione/2604.png";
"emojione/nature.png"|":fire:|:flame:":"emojione/1F525.png";
"emojione/nature.png"|":jack_o_lantern:":"emojione/1F383.png";
"emojione/nature.png"|":christmas_tree:":"emojione/1F384.png";
"emojione/travel.png"|":stars:":"emojione/1F320.png";
"emojione/travel.png"|":airplane:":"emojione/2708.png";
"emojione/travel.png"|":rocket:":"emojione/1F680.png";
"emojione/travel.png"|":japan:":"emojione/1F5FE.png";
"emojione/travel.png"|":mountain_snow:":"emojione/1F3D4.png";
"emojione/travel.png"|":volcano:":"emojione/1F30B.png";
"emojione/travel.png"|":mount_fuji:":"emojione/1F5FB.png";
"emojione/travel.png"|":camping:":"emojione/1F3D5.png";
"emojione/travel.png"|":beach:":"emojione/1F3D6.png";
"emojione/travel.png"|":construction_site:":"emojione/1F3D7.png";
"emojione/travel.png"|":homes:":"emojione/1F3D8.png";
"emojione/travel.png"|":cityscape:":"emojione/1F3D9.png";
"emojione/travel.png"|":house_abandoned:":"emojione/1F3DA.png";
"emojione/travel.png"|":classical_building:":"emojione/1F3DB.png";
"emojione/travel.png"|":desert:":"emojione/1F3DC.png";
"emojione/travel.png"|":island:":"emojione/1F3DD.png";
"emojione/travel.png"|":park:":"emojione/1F3DE.png";
"emojione/travel.png"|":stadium:":"emojione/1F3DF.png";
"emojione/travel.png"|":house:":"emojione/1F3E0.png";
"emojione/travel.png"|":house_with_garden:":"emojione/1F3E1.png";
"emojione/travel.png"|":office:":"emojione/1F3E2.png";
"emojione/travel.png"|":post_office:":"emojione/1F3E3.png";
"emojione/travel.png"|":european_post_office:":"emojione/1F3E4.png";
"emojione/travel.png"|":hospital:":"emojione/1F3E5.png";
"emojione/travel.png"|":bank:":"emojione/1F3E6.png";
"emojione/travel.png"|":hotel:":"emojione/1F3E8.png";
"emojione/travel.png"|":love_hotel:":"emojione/1F3E9.png";
"emojione/travel.png"|":convenience_store:":"emojione/1F3EA.png";
"emojione/travel.png"|":school:":"emojione/1F3EB.png";
"emojione/travel.png"|":department_store:":"emojione/1F3EC.png";
"emojione/travel.png"|":factory:":"emojione/1F3ED.png";
"emojione/travel.png"|":japanese_castle:":"emojione/1F3EF.png";
"emojione/travel.png"|":european_castle:":"emojione/1F3F0.png";
"emojione/travel.png"|":tokyo_tower:":"emojione/1F5FC.png";
"emojione/travel.png"|":statue_of_liberty:":"emojione/1F5FD.png";
"emojione/travel.png"|":church:":"emojione/26EA.png";
"emojione/travel.png"|":fountain:":"emojione/26F2.png";
"emojione/travel.png"|":tent:":"emojione/26FA.png";
"emojione/travel.png"|":foggy:":"emojione/1F301.png";
"emojione/travel.png"|":night_with_stars:":"emojione/1F303.png";
"emojione/travel.png"|":sunrise_over_mountains:":"emojione/1F304.png";
"emojione/travel.png"|":sunrise:":"emojione/1F305.png";
"emojione/travel.png"|":city_dusk:":"emojione/1F306.png";
"emojione/travel.png"|":city_sunset:":"emojione/1F307.png";
"emojione/travel.png"|":bridge_at_night:":"emojione/1F309.png";
"emojione/travel.png"|":milky_way:":"emojione/1F30C.png";
"emojione/travel.png"|":helicopter:":"emojione/1F681.png";
"emojione/travel.png"|":steam_locomotive:":"emojione/1F682.png";
"emojione/travel.png"|":railway_car:":"emojione/1F683.png";
@ -327,9 +379,32 @@
"emojione/travel.png"|":truck:":"emojione/1F69A.png";
"emojione/travel.png"|":articulated_lorry:":"emojione/1F69B.png";
"emojione/travel.png"|":tractor:":"emojione/1F69C.png";
"emojione/travel.png"|":motorway:":"emojione/1F6E3.png";
"emojione/travel.png"|":railway_track:":"emojione/1F6E4.png";
"emojione/travel.png"|":fuelpump:":"emojione/26FD.png";
"emojione/travel.png"|":monorail:":"emojione/1F69D.png";
"emojione/travel.png"|":mountain_railway:":"emojione/1F69E.png";
"emojione/travel.png"|":suspension_railway:":"emojione/1F69F.png";
"emojione/travel.png"|":mountain_cableway:":"emojione/1F6A0.png";
"emojione/travel.png"|":aerial_tramway:":"emojione/1F6A1.png";
"emojione/travel.png"|":traffic_light:":"emojione/1F6A5.png";
"emojione/travel.png"|":vertical_traffic_light:":"emojione/1F6A6.png";
"emojione/travel.png"|":construction:":"emojione/1F6A7.png";
"emojione/travel.png"|":rotating_light:":"emojione/1F6A8.png";
"emojione/travel.png"|":sailboat:":"emojione/26F5.png";
"emojione/travel.png"|":cruise_ship:":"emojione/1F6F3.png";
"emojione/travel.png"|":ferry:":"emojione/26f4.png";
"emojione/travel.png"|":motorboat:":"emojione/1F6E5.png";
"emojione/travel.png"|":ship:":"emojione/1F6A2.png";
"emojione/travel.png"|":airplane:":"emojione/2708.png";
"emojione/travel.png"|":airplane_small:":"emojione/1F6E9.png";
"emojione/travel.png"|":airplane_departure:":"emojione/1F6EB.png";
"emojione/travel.png"|":airplane_arriving:":"emojione/1F6EC.png";
"emojione/travel.png"|":rocket:":"emojione/1F680.png";
"emojione/travel.png"|":satellite_orbital:":"emojione/1F6F0.png";
"emojione/travel.png"|":stars:":"emojione/1F320.png";
"emojione/travel.png"|":rainbow:":"emojione/1F308.png";
"emojione/travel.png"|":rice_scene:":"emojione/1F391.png";
"emojione/objects.png"|"skull_crossbones":"emojione/2620.png";
"emojione/objects.png"|":love_letter:":"emojione/1F48C.png";
"emojione/objects.png"|":bomb:":"emojione/1F4A3.png";
@ -376,6 +451,7 @@
"emojione/objects.png"|":newspaper:":"emojione/1F4F0.png";
"emojione/objects.png"|":dagger:":"emojione/1F5E1.png";
"emojione/objects.png"|":shield:":"emojione/1F6E1.png";
"emojione/objects.png"|":moyai:":"emojione/1F5FF.png";
"emojione/symbols.png"|":100:|<3":"emojione/1F4AF.png";
"emojione/symbols.png"|":cupid:":"emojione/1F498.png";
"emojione/symbols.png"|":heart:|<3":"emojione/2764.png";
@ -397,4 +473,7 @@
"emojione/symbols.png"|":boom:":"emojione/1F4A5.png";
"emojione/symbols.png"|":loudspeaker:":"emojione/1F4E2.png";
"emojione/symbols.png"|":mega:":"emojione/1F4E3.png";
"emojione/symbols.png"|":atm:":"emojione/1F3E7.png";
"emojione/symbols.png"|":copyright:":"emojione/00A9.png";
"emojione/symbols.png"|":registered:":"emojione/00AE.png";
}

View File

@ -171,6 +171,7 @@
<file>icons/svg/newsfeed-notify.svg</file>
<file>icons/svg/newsfeed.svg</file>
<file>icons/svg/options.svg</file>
<file>icons/svg/paste.svg</file>
<file>icons/svg/people-notify.svg</file>
<file>icons/svg/people.svg</file>
<file>icons/svg/person.svg</file>
@ -188,6 +189,7 @@
<file>icons/svg/send-message-blocked.svg</file>
<file>icons/svg/send-message.svg</file>
<file>icons/svg/settings.svg</file>
<file>icons/svg/share.svg</file>
<file>icons/svg/smiley.svg</file>
<file>icons/svg/speaker_mute.svg</file>
<file>icons/svg/speaker.svg</file>

View File

@ -0,0 +1,90 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg4155"
version="1.1"
inkscape:version="0.91 r13725"
xml:space="preserve"
width="80"
height="80"
viewBox="0 0 80 80"
sodipodi:docname="paste.svg"><metadata
id="metadata4161"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs4159" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="706"
id="namedview4157"
showgrid="true"
inkscape:zoom="5.11875"
inkscape:cx="18.247631"
inkscape:cy="50.207249"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g4163"
showguides="false"><inkscape:grid
type="xygrid"
id="grid4142" /></sodipodi:namedview><g
id="g4163"
inkscape:groupmode="layer"
inkscape:label="ink_ext_XXXXXX"
transform="matrix(1.25,0,0,-1.25,0,80)"><path
inkscape:connector-curvature="0"
id="path4167"
style="fill:#039bd5;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 64,32 C 64,14.327 49.673,0 32,0 14.327,0 0,14.327 0,32 0,49.673 14.327,64 32,64 49.673,64 64,49.673 64,32" /><g
id="g3"
style="fill:#ffffff;fill-opacity:1"
transform="matrix(0.14477231,0,0,-0.14477231,11.273682,52.969371)"><path
inkscape:connector-curvature="0"
style="fill:#ffffff;fill-opacity:1"
d="m 130.21376,204.922 c 10.62,10.62 16.672,11.031 27.72,0 l 81.212,-83.242 c 7.625,-12.846 1.386,-23.349 -13.856,-23.349 l -36.517,0 0,-80.453 C 188.77476,8.01 180.76476,0 170.89676,0 l -53.635,0 c -9.869,0 -17.877999,8.01 -17.877999,17.878 l 0,80.453 -36.526001,0 c -15.241,0 -21.481,10.512 -13.856,23.349 l 81.212,83.242 z m 139.014,36.436 -250.298,0 c -9.8680005,0 -17.8780005,8.009 -17.8780005,17.878 l 0,8.939 c 0,9.878 8.01,17.878 17.8780005,17.878 l 250.297,0 c 9.869,0 17.878,-8.001 17.878,-17.878 l 0,-8.939 c 10e-4,-9.869 -8.009,-17.878 -17.877,-17.878 z"
id="path5" /></g><g
id="g7"
transform="matrix(0.14859684,0,0,-0.14859684,10.175642,54.063388)" /><g
id="g9"
transform="matrix(0.14859684,0,0,-0.14859684,10.175642,54.063388)" /><g
id="g11"
transform="matrix(0.14859684,0,0,-0.14859684,10.175642,54.063388)" /><g
id="g13"
transform="matrix(0.14859684,0,0,-0.14859684,10.175642,54.063388)" /><g
id="g15"
transform="matrix(0.14859684,0,0,-0.14859684,10.175642,54.063388)" /><g
id="g17"
transform="matrix(0.14859684,0,0,-0.14859684,10.175642,54.063388)" /><g
id="g19"
transform="matrix(0.14859684,0,0,-0.14859684,10.175642,54.063388)" /><g
id="g21"
transform="matrix(0.14859684,0,0,-0.14859684,10.175642,54.063388)" /><g
id="g23"
transform="matrix(0.14859684,0,0,-0.14859684,10.175642,54.063388)" /><g
id="g25"
transform="matrix(0.14859684,0,0,-0.14859684,10.175642,54.063388)" /><g
id="g27"
transform="matrix(0.14859684,0,0,-0.14859684,10.175642,54.063388)" /><g
id="g29"
transform="matrix(0.14859684,0,0,-0.14859684,10.175642,54.063388)" /><g
id="g31"
transform="matrix(0.14859684,0,0,-0.14859684,10.175642,54.063388)" /><g
id="g33"
transform="matrix(0.14859684,0,0,-0.14859684,10.175642,54.063388)" /><g
id="g35"
transform="matrix(0.14859684,0,0,-0.14859684,10.175642,54.063388)" /></g></svg>

After

Width:  |  Height:  |  Size: 4.1 KiB

View File

@ -0,0 +1,81 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
id="svg4155"
version="1.1"
inkscape:version="0.91 r13725"
xml:space="preserve"
width="80"
height="80"
viewBox="0 0 80 80"
sodipodi:docname="share.svg"><metadata
id="metadata4161"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title></dc:title></cc:Work></rdf:RDF></metadata><defs
id="defs4159" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1366"
inkscape:window-height="706"
id="namedview4157"
showgrid="false"
inkscape:zoom="3.6195029"
inkscape:cx="51.482179"
inkscape:cy="38.118053"
inkscape:window-x="-8"
inkscape:window-y="-8"
inkscape:window-maximized="1"
inkscape:current-layer="g4163" /><g
id="g4163"
inkscape:groupmode="layer"
inkscape:label="ink_ext_XXXXXX"
transform="matrix(1.25,0,0,-1.25,0,80)"><path
inkscape:connector-curvature="0"
id="path4167"
style="fill:#039bd5;fill-opacity:1;fill-rule:nonzero;stroke:none"
d="M 64,32 C 64,14.327 49.673,0 32,0 14.327,0 0,14.327 0,32 0,49.673 14.327,64 32,64 49.673,64 64,49.673 64,32" /><g
transform="matrix(0.15803826,0,0,-0.15803826,-7.2047942,71.41466)"
id="g5"><circle
style="fill:#ffffff"
cx="146.489"
cy="248.96899"
r="53.806999"
id="circle7" /><circle
style="fill:#ffffff"
cx="310.74899"
cy="153.319"
r="53.806999"
id="circle9" /><circle
style="fill:#ffffff"
cx="310.74899"
cy="342.83899"
r="53.806999"
id="circle11" /><rect
x="214.155"
y="104.29"
transform="matrix(-0.5032,-0.8642,0.8642,-0.5032,171.424,497.1939)"
style="fill:#ffffff"
width="28.933001"
height="190.06799"
id="rect13" /><rect
x="133.608"
y="280.52802"
transform="matrix(-0.8642,-0.5032,0.5032,-0.8642,277.774,664.974)"
style="fill:#ffffff"
width="190.06799"
height="28.933001"
id="rect15" /></g></g></svg>

After

Width:  |  Height:  |  Size: 2.8 KiB

View File

@ -664,8 +664,7 @@ ConnectFriendWizard QRadioButton {
}
ConnectFriendWizard QPlainTextEdit#friendCertEdit {
border: 2px solid #0099cc;
border-radius: 6px;
border: none;
background: white;
}
@ -675,14 +674,14 @@ HomePage QPlainTextEdit#userCertEdit {
background: white;
}
HomePage QPlainTextEdit#friendCertEdit {
border: 2px solid #0099cc;
border-radius: 6px;
background: white;
}
HomePage QFrame#addframe{
border: 2px solid #0099cc;
border-radius: 6px;
background: white;
}
ConnectFriendWizard QFrame#friendFrame {
border: 2px solid #0099cc;
border-radius: 6px;
background: white;
}

View File

@ -209,6 +209,9 @@ QString misc::userFriendlyDuration(qlonglong seconds)
QString misc::timeRelativeToNow(uint32_t mtime)
{
if( mtime == 0)
return QString() ;
time_t now = time(NULL) ;
if(mtime > now)
return misc::userFriendlyDuration(mtime - (int)now) + " (ahead of now)";

View File

@ -66,14 +66,7 @@ Item
onClicked:
{
var jsonData = {"chat_id":chatView.chatId, "msg":msgComposer.text}
sendRsApi.request("/chat/send_message", JSON.stringify(jsonData))
}
LibresapiLocalClient
{
id: sendRsApi
onGoodResponseReceived: { msgComposer.text = ""; console.log(msg)}
Component.onCompleted: { openConnection(apiSocketPath) }
rsApi.request("/chat/send_message", JSON.stringify(jsonData), function(par) { msgComposer.text = ""; console.log(msg) })
}
}

View File

@ -18,22 +18,13 @@
import QtQuick 2.0
import QtQuick.Controls 1.4
import org.retroshare.qml_components.LibresapiLocalClient 1.0
import "jsonpath.js" as JSONPath
Item
{
function refreshData() { rsApi.request("/peers/*", "") }
function refreshData() { rsApi.request("/peers/*", "", function(par) { jsonModel.json = par.response }) }
onFocusChanged: focus && refreshData()
LibresapiLocalClient
{
id: rsApi
onGoodResponseReceived: jsonModel.json = msg
Component.onCompleted: { openConnection(apiSocketPath) }
}
JSONListModel
{
id: jsonModel
@ -46,11 +37,33 @@ Item
anchors.top: parent.top
anchors.bottom: bottomButton.top
model: jsonModel.model
delegate: Text
delegate: Item
{
text: model.name
onTextChanged: color = JSONPath.jsonPath(JSON.parse(jsonModel.json), "$.data[?(@.pgp_id=='"+model.pgp_id+"')].locations[*].is_online").reduce(function(cur,acc){return cur || acc}, false) ? "lime" : "darkslategray"
}
height: 50
Row
{
height: 30
Text
{
text: model.name
onTextChanged: color = JSONPath.jsonPath(JSON.parse(jsonModel.json), "$.data[?(@.pgp_id=='"+model.pgp_id+"')].locations[*].is_online").reduce(function(cur,acc){return cur || acc}, false) ? "lime" : "darkslategray"
}
Rectangle
{
height: parent.height
width: parent.height
color: "red"
MouseArea
{
height: parent.height
width: parent.height
onClicked: rsApi.request("/peers/"+model.pgp_id+"/delete")
}
}
}
}
}
Button