Merge branch 'master' into master

This commit is contained in:
Corentin Noël 2019-04-12 14:25:56 +02:00 коммит произвёл GitHub
Родитель 42ce5c0c0d ac257cd65f
Коммит b11a4217c7
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
7 изменённых файлов: 636 добавлений и 366 удалений

Просмотреть файл

@ -1,296 +1,347 @@
clone:
git:
image: plugins/git
tags: true
depth: 1
kind: pipeline
name: qt-5.7
pipeline:
qt-5.7:
image: nextcloudci/client-5.7:client-5.7-4
commands:
# Install QtKeyChain
- /bin/bash -c "
source /opt/qt57/bin/qt57-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
source /opt/qt57/bin/qt57-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
when:
matrix:
TESTS: qt-5.7
qt-5.8:
image: nextcloudci/client-5.8:client-5.8-4
commands:
# Install QtKeyChain
- /bin/bash -c "
source /opt/qt58/bin/qt58-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
source /opt/qt58/bin/qt58-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
when:
matrix:
TESTS: qt-5.8
qt-5.9:
image: nextcloudci/client-5.9:client-5.9-5
commands:
# Install QtKeyChain
- /bin/bash -c "
source /opt/qt59/bin/qt59-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
source /opt/qt59/bin/qt59-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
when:
matrix:
TESTS: qt-5.9
qt-5.10:
image: nextcloudci/client-5.10:client-5.10-3
commands:
# Install QtKeyChain
- /bin/bash -c "
export CC=gcc-7 &&
export CXX=g++-7 &&
source /opt/qt510/bin/qt510-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
export CC=gcc-7 &&
export CXX=g++-7 &&
source /opt/qt510/bin/qt510-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
when:
matrix:
TESTS: qt-5.10
qt-5.11:
image: nextcloudci/client-5.11:client-5.11-3
commands:
# Install QtKeyChain
- /bin/bash -c "
export CC=gcc-7 &&
export CXX=g++-7 &&
source /opt/qt511/bin/qt511-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
export CC=gcc-7 &&
export CXX=g++-7 &&
source /opt/qt511/bin/qt511-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
when:
matrix:
TESTS: qt-5.11
steps:
- name: build and test
image: nextcloudci/client-5.7:client-5.7-4
commands:
# Install QtKeyChain
- /bin/bash -c "
source /opt/qt57/bin/qt57-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
source /opt/qt57/bin/qt57-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
trigger:
branch:
- master
event:
- pull_request
- push
qt-5.11-clang:
image: nextcloudci/client-5.11:client-5.11-3
commands:
# Install QtKeyChain
- /bin/bash -c "
export CC=clang-6.0 &&
export CXX=clang++-6.0 &&
source /opt/qt511/bin/qt511-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
export CC=clang-6.0 &&
export CXX=clang++-6.0 &&
source /opt/qt511/bin/qt511-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
when:
matrix:
TESTS: qt-5.11-clang
---
kind: pipeline
name: qt-5.8
qt-5.12:
image: nextcloudci/client-5.12:client-5.12-2
commands:
# Install QtKeyChain
- /bin/bash -c "
export CC=gcc-7 &&
export CXX=g++-7 &&
source /opt/qt512/bin/qt512-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
export CC=gcc-7 &&
export CXX=g++-7 &&
source /opt/qt512/bin/qt512-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
when:
matrix:
TESTS: qt-5.12
steps:
- name: build and test
image: nextcloudci/client-5.8:client-5.8-4
commands:
# Install QtKeyChain
- /bin/bash -c "
source /opt/qt58/bin/qt58-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
source /opt/qt58/bin/qt58-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
trigger:
branch:
- master
event:
- pull_request
- push
qt-5.12-clang:
image: nextcloudci/client-5.12:client-5.12-2
commands:
# Install QtKeyChain
- /bin/bash -c "
export CC=clang-6.0 &&
export CXX=clang++-6.0 &&
source /opt/qt512/bin/qt512-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
export CC=clang-6.0 &&
export CXX=clang++-6.0 &&
source /opt/qt512/bin/qt512-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
when:
matrix:
TESTS: qt-5.12-clang
---
kind: pipeline
name: qt-5.9
AppImage:
image: nextcloudci/client-5.12:client-5.12-2
commands:
- /bin/bash -c "./admin/linux/build-appimage.sh"
when:
matrix:
BUILD: AppImage
steps:
- name: build and test
image: nextcloudci/client-5.9:client-5.9-5
commands:
# Install QtKeyChain
- /bin/bash -c "
source /opt/qt59/bin/qt59-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
source /opt/qt59/bin/qt59-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
trigger:
branch:
- master
event:
- pull_request
- push
Debian:
image: nextcloudci/client-debian-ci:client-debian-ci-2
commands:
- /bin/bash -c "./admin/linux/debian/drone-build.sh"
secrets: [ DEBIAN_SECRET_KEY, DEBIAN_SECRET_IV ]
when:
matrix:
BUILD: Debian
---
kind: pipeline
name: qt-5.10
documentation:
image: nextcloudci/documentation:documentation-5
commands:
- cd doc
- make html
when:
matrix:
TESTS: documentation
steps:
- name: build and test
image: nextcloudci/client-5.10:client-5.10-3
commands:
# Install QtKeyChain
- /bin/bash -c "
export CC=gcc-7 &&
export CXX=g++-7 &&
source /opt/qt510/bin/qt510-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
export CC=gcc-7 &&
export CXX=g++-7 &&
source /opt/qt510/bin/qt510-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
trigger:
branch:
- master
event:
- pull_request
- push
matrix:
include:
- TESTS: qt-5.7
- TESTS: qt-5.8
- TESTS: qt-5.9
- TESTS: qt-5.10
- TESTS: qt-5.11
- TESTS: qt-5.11-clang
- TESTS: qt-5.12
- TESTS: qt-5.12-clang
- BUILD: AppImage
- BUILD: Debian
- TESTS: documentation
---
kind: pipeline
name: qt-5.11
branches: [ master, 2.* ]
steps:
- name: build and test
image: nextcloudci/client-5.11:client-5.11-3
commands:
# Install QtKeyChain
- /bin/bash -c "
export CC=gcc-7 &&
export CXX=g++-7 &&
source /opt/qt511/bin/qt511-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
export CC=gcc-7 &&
export CXX=g++-7 &&
source /opt/qt511/bin/qt511-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
trigger:
branch:
- master
event:
- pull_request
- push
---
kind: pipeline
name: qt-5.11-clang
steps:
- name: build and test
image: nextcloudci/client-5.11:client-5.11-3
commands:
# Install QtKeyChain
- /bin/bash -c "
export CC=clang-6.0 &&
export CXX=clang++-6.0 &&
source /opt/qt511/bin/qt511-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
export CC=clang-6.0 &&
export CXX=clang++-6.0 &&
source /opt/qt511/bin/qt511-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
trigger:
branch:
- master
event:
- pull_request
- push
---
kind: pipeline
name: qt-5.12
steps:
- name: build and test
image: nextcloudci/client-5.12:client-5.12-2
commands:
# Install QtKeyChain
- /bin/bash -c "
export CC=gcc-7 &&
export CXX=g++-7 &&
source /opt/qt512/bin/qt512-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
export CC=gcc-7 &&
export CXX=g++-7 &&
source /opt/qt512/bin/qt512-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
trigger:
branch:
- master
event:
- pull_request
- push
---
kind: pipeline
name: qt-5.12-clang
steps:
- name: build and test
image: nextcloudci/client-5.12:client-5.12-2
commands:
# Install QtKeyChain
- /bin/bash -c "
export CC=clang-6.0 &&
export CXX=clang++-6.0 &&
source /opt/qt512/bin/qt512-env.sh &&
cd /tmp &&
git clone https://github.com/frankosterfeld/qtkeychain.git &&
cd qtkeychain &&
git checkout v0.9.1 &&
mkdir build &&
cd build &&
cmake ../ &&
make &&
make install"
# Build client
- /bin/bash -c "
export CC=clang-6.0 &&
export CXX=clang++-6.0 &&
source /opt/qt512/bin/qt512-env.sh &&
mkdir build &&
cd build &&
cmake -D NO_SHIBBOLETH=1 -DCMAKE_BUILD_TYPE=Debug -DUNIT_TESTING=1 ../ &&
make &&
useradd -m -s /bin/bash test &&
chown -R test:test . &&
su -c 'ctest --output-on-failure' test"
trigger:
branch:
- master
event:
- pull_request
- push
---
kind: pipeline
name: AppImage
steps:
- name: build
image: nextcloudci/client-5.12:client-5.12-2
commands:
- /bin/bash -c "./admin/linux/build-appimage.sh"
trigger:
branch:
- master
event:
- pull_request
- push
---
kind: pipeline
name: Documentation
steps:
- name: build
image: nextcloudci/documentation:documentation-5
commands:
- cd doc
- make html
trigger:
branch:
- master
event:
- pull_request
- push

Просмотреть файл

@ -0,0 +1,201 @@
[Desktop Entry]
Categories=Utility;X-SuSE-SyncUtility;
Type=Application
Exec=@APPLICATION_EXECUTABLE@
Name=@APPLICATION_NAME@ desktop sync client
Comment=@APPLICATION_NAME@ desktop synchronization client
GenericName=Folder Sync
Icon=@APPLICATION_ICON_NAME@
Keywords=@APPLICATION_NAME@;syncing;file;sharing;
X-GNOME-Autostart-Delay=3
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
# Translations
GenericName[ar]=مزامنة المجلد

Просмотреть файл

@ -24,7 +24,7 @@ extern "C" {
CloudProvidersProviderExporter *_providerExporter;
void on_bus_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data)
void on_name_acquired (GDBusConnection *connection, const gchar *name, gpointer user_data)
{
Q_UNUSED(name);
CloudProviderManager *self;
@ -34,6 +34,14 @@ void on_bus_acquired (GDBusConnection *connection, const gchar *name, gpointer u
self->registerSignals();
}
void on_name_lost (GDBusConnection *connection, const gchar *name, gpointer user_data)
{
Q_UNUSED(connection);
Q_UNUSED(name);
Q_UNUSED(user_data);
g_clear_object (&_providerExporter);
}
void CloudProviderManager::registerSignals()
{
OCC::FolderMan *folderManager = OCC::FolderMan::instance();
@ -45,7 +53,7 @@ CloudProviderManager::CloudProviderManager(QObject *parent) : QObject(parent)
{
_map = new QMap<QString, CloudProviderWrapper*>();
QString busName = QString(LIBCLOUDPROVIDERS_DBUS_BUS_NAME);
g_bus_own_name (G_BUS_TYPE_SESSION, busName.toAscii().data(), G_BUS_NAME_OWNER_FLAGS_NONE, on_bus_acquired, nullptr, nullptr, this, nullptr);
g_bus_own_name (G_BUS_TYPE_SESSION, busName.toAscii().data(), G_BUS_NAME_OWNER_FLAGS_NONE, nullptr, on_name_acquired, nullptr, this, nullptr);
}
void CloudProviderManager::slotFolderListChanged(const Folder::Map &folderMap)

Просмотреть файл

@ -33,33 +33,25 @@ using namespace OCC;
GSimpleActionGroup *actionGroup = nullptr;
static
gchar* qstring_to_gchar(const QString &string)
{
QByteArray ba = string.toUtf8();
char* data = ba.data();
return g_strdup(data);
}
CloudProviderWrapper::CloudProviderWrapper(QObject *parent, Folder *folder, CloudProvidersProviderExporter* cloudprovider) : QObject(parent)
, _folder(folder)
{
GMenuModel *model;
GActionGroup *action_group;
_recentlyChanged = new QList<QPair<QString, QString>>();
gchar *accountName = g_strdup_printf ("Account%sFolder%s",
qstring_to_gchar(folder->alias()),
qstring_to_gchar(folder->accountState()->account()->id()));
QString accountName = QString("Account%1Folder%2").arg(folder->alias(), folder->accountState()->account()->id());
_cloudProvider = CLOUD_PROVIDERS_PROVIDER_EXPORTER(cloudprovider);
_cloudProviderAccount = cloud_providers_account_exporter_new(_cloudProvider, accountName);
_cloudProviderAccount = cloud_providers_account_exporter_new(_cloudProvider, accountName.toUtf8().data());
gchar* folderName = qstring_to_gchar(folder->shortGuiLocalPath());
gchar* folderPath = qstring_to_gchar(folder->cleanPath());
cloud_providers_account_exporter_set_name (_cloudProviderAccount, folderName);
cloud_providers_account_exporter_set_name (_cloudProviderAccount, folder->shortGuiLocalPath().toUtf8().data());
cloud_providers_account_exporter_set_icon (_cloudProviderAccount, g_icon_new_for_string(APPLICATION_ICON_NAME, nullptr));
cloud_providers_account_exporter_set_path (_cloudProviderAccount, folderPath);
cloud_providers_account_exporter_set_path (_cloudProviderAccount, folder->cleanPath().toUtf8().data());
cloud_providers_account_exporter_set_status (_cloudProviderAccount, CLOUD_PROVIDERS_ACCOUNT_STATUS_IDLE);
cloud_providers_account_exporter_set_menu_model (_cloudProviderAccount, getMenuModel());
cloud_providers_account_exporter_set_action_group (_cloudProviderAccount, getActionGroup());
model = getMenuModel();
cloud_providers_account_exporter_set_menu_model (_cloudProviderAccount, model);
action_group = getActionGroup();
cloud_providers_account_exporter_set_action_group (_cloudProviderAccount, action_group);
connect(ProgressDispatcher::instance(), SIGNAL(progressInfo(QString, ProgressInfo)), this, SLOT(slotUpdateProgress(QString, ProgressInfo)));
connect(_folder, SIGNAL(syncStarted()), this, SLOT(slotSyncStarted()));
@ -68,10 +60,8 @@ CloudProviderWrapper::CloudProviderWrapper(QObject *parent, Folder *folder, Clou
_paused = _folder->syncPaused();
updatePauseStatus();
g_free(accountName);
g_free(folderName);
g_free(folderPath);
g_clear_object (&model);
g_clear_object (&action_group);
}
CloudProviderWrapper::~CloudProviderWrapper()
@ -93,6 +83,16 @@ static bool shouldShowInRecentsMenu(const SyncFileItem &item)
&& item._instruction != CSYNC_INSTRUCTION_NONE;
}
static GMenuItem *menu_item_new(const QString &label, const gchar *detailed_action)
{
return g_menu_item_new(label.toUtf8 ().data(), detailed_action);
}
static GMenuItem *menu_item_new_submenu(const QString &label, GMenuModel *submenu)
{
return g_menu_item_new_submenu(label.toUtf8 ().data(), submenu);
}
void CloudProviderWrapper::slotUpdateProgress(const QString &folder, const ProgressInfo &progress)
{
// Only update progress for the current folder
@ -154,30 +154,25 @@ void CloudProviderWrapper::slotUpdateProgress(const QString &folder, const Progr
if(!_recentlyChanged->isEmpty()) {
QList<QPair<QString, QString>>::iterator i;
for (i = _recentlyChanged->begin(); i != _recentlyChanged->end(); i++) {
gchar *file;
QString label = i->first;
QString fullPath = i->second;
file = g_strdup(qstring_to_gchar(label));
item = g_menu_item_new(file, "cloudprovider.showfile");
g_menu_item_set_action_and_target_value(item, "cloudprovider.showfile", g_variant_new_string(qstring_to_gchar(fullPath)));
item = menu_item_new(label, "cloudprovider.showfile");
g_menu_item_set_action_and_target_value(item, "cloudprovider.showfile", g_variant_new_string(fullPath.toUtf8().data()));
g_menu_append_item(_recentMenu, item);
g_clear_object (&item);
}
} else {
item = g_menu_item_new("No recently changed files", nullptr);
item = menu_item_new(tr("No recently changed files"), nullptr);
g_menu_append_item(_recentMenu, item);
g_clear_object (&item);
}
}
}
void CloudProviderWrapper::updateStatusText(QString statusText)
{
char* state = qstring_to_gchar(_folder->accountState()->stateString(_folder->accountState()->state()));
char* statusChar = qstring_to_gchar(statusText);
char* status = g_strdup_printf("%s - %s", state, statusChar);
cloud_providers_account_exporter_set_status_details(_cloudProviderAccount, status);
g_free(state);
g_free(statusChar);
g_free(status);
QString status = QString("%1 - %2").arg(_folder->accountState()->stateString(_folder->accountState()->state()), statusText);
cloud_providers_account_exporter_set_status_details(_cloudProviderAccount, status.toUtf8().data());
}
void CloudProviderWrapper::updatePauseStatus()
@ -217,38 +212,53 @@ GMenuModel* CloudProviderWrapper::getMenuModel() {
GMenu* section;
GMenuItem* item;
QString item_label;
_mainMenu = g_menu_new();
section = g_menu_new();
item = g_menu_item_new("Open website", "cloudprovider.openwebsite");
item = menu_item_new(tr("Open website"), "cloudprovider.openwebsite");
g_menu_append_item(section, item);
g_clear_object (&item);
g_menu_append_section(_mainMenu, nullptr, G_MENU_MODEL(section));
g_clear_object (&section);
_recentMenu = g_menu_new();
item = g_menu_item_new("No recently changed files", nullptr);
item = menu_item_new(tr("No recently changed files"), nullptr);
g_menu_append_item(_recentMenu, item);
section = g_menu_new();
item = g_menu_item_new_submenu("Recently changed", G_MENU_MODEL(_recentMenu));
g_menu_append_item(section, item);
g_menu_append_section(_mainMenu, nullptr, G_MENU_MODEL(section));
g_clear_object (&item);
section = g_menu_new();
item = g_menu_item_new("Pause synchronization", "cloudprovider.pause");
item = menu_item_new_submenu(tr("Recently changed"), G_MENU_MODEL(_recentMenu));
g_menu_append_item(section, item);
g_clear_object (&item);
g_menu_append_section(_mainMenu, nullptr, G_MENU_MODEL(section));
g_clear_object (&section);
section = g_menu_new();
item = g_menu_item_new("Help", "cloudprovider.openhelp");
g_menu_append_item(section, item);
item = g_menu_item_new("Settings", "cloudprovider.opensettings");
g_menu_append_item(section, item);
item = g_menu_item_new("Log out", "cloudprovider.logout");
g_menu_append_item(section, item);
item = g_menu_item_new("Quit sync client", "cloudprovider.quit");
item = menu_item_new(tr("Pause synchronization"), "cloudprovider.pause");
g_menu_append_item(section, item);
g_clear_object (&item);
g_menu_append_section(_mainMenu, nullptr, G_MENU_MODEL(section));
g_clear_object (&section);
section = g_menu_new();
item = menu_item_new(tr("Help"), "cloudprovider.openhelp");
g_menu_append_item(section, item);
g_clear_object (&item);
item = menu_item_new(tr("Settings"), "cloudprovider.opensettings");
g_menu_append_item(section, item);
g_clear_object (&item);
item = menu_item_new(tr("Log out"), "cloudprovider.logout");
g_menu_append_item(section, item);
g_clear_object (&item);
item = menu_item_new(tr("Quit sync client"), "cloudprovider.quit");
g_menu_append_item(section, item);
g_clear_object (&item);
g_menu_append_section(_mainMenu, nullptr, G_MENU_MODEL(section));
g_clear_object (&section);
g_clear_object (&_recentMenu);
return G_MENU_MODEL(_mainMenu);
}
@ -277,11 +287,10 @@ activate_action_open (GSimpleAction *action, GVariant *parameter, gpointer user_
}
if(g_str_equal(name, "showfile")) {
gchar *path;
g_variant_get (parameter, "s", &path);
g_print("showfile => %s\n", path);
showInFileManager(QString(path));
}
const gchar *path = g_variant_get_string (parameter, NULL);
g_print("showfile => %s\n", path);
showInFileManager(QString(path));
}
if(g_str_equal(name, "logout")) {
self->folder()->accountState()->signOutByUi();
@ -331,12 +340,13 @@ static GActionEntry actions[] = {
GActionGroup* CloudProviderWrapper::getActionGroup()
{
g_clear_object (&actionGroup);
actionGroup = g_simple_action_group_new ();
g_action_map_add_action_entries (G_ACTION_MAP (actionGroup), actions, G_N_ELEMENTS (actions), this);
bool state = _folder->syncPaused();
GAction *pause = g_action_map_lookup_action(G_ACTION_MAP(actionGroup), "pause");
g_simple_action_set_state(G_SIMPLE_ACTION(pause), g_variant_new_boolean(state));
return G_ACTION_GROUP (actionGroup);
return G_ACTION_GROUP (g_object_ref (actionGroup));
}
void CloudProviderWrapper::slotSyncPausedChanged(Folder *folder, bool state)

Просмотреть файл

@ -519,7 +519,7 @@
<message>
<location filename="../src/gui/activitywidget.cpp" line="183"/>
<source>Synced</source>
<translation type="unfinished"/>
<translation></translation>
</message>
<message>
<location filename="../src/gui/activitywidget.cpp" line="218"/>

Просмотреть файл

@ -233,7 +233,7 @@
<message>
<location filename="../src/gui/accountsettings.cpp" line="234"/>
<source>Show E2E mnemonic</source>
<translation>Mostrar mnemônico E2E</translation>
<translation>Exibir mnemônico E2E</translation>
</message>
<message>
<location filename="../src/gui/accountsettings.cpp" line="542"/>
@ -1298,7 +1298,7 @@ Continuar a sincronização como normal fará com que todos os seus arquivos sej
<message>
<location filename="../src/gui/generalsettings.ui" line="89"/>
<source>Show Server &amp;Notifications</source>
<translation>Mostrar &amp;Notificações do Servidor</translation>
<translation>Exibir &amp;Notificações do Servidor</translation>
</message>
<message>
<location filename="../src/gui/generalsettings.ui" line="163"/>
@ -1339,7 +1339,7 @@ Continuar a sincronização como normal fará com que todos os seus arquivos sej
<message>
<location filename="../src/gui/generalsettings.ui" line="250"/>
<source>Show sync folders in &amp;Explorer&apos;s Navigation Pane</source>
<translation>Mostrar pastas de sincronização no &amp;Painel de Navegação do Explorer</translation>
<translation>Exibir pastas de sincronização no Painel de Navegação do &amp;Explorer</translation>
</message>
<message>
<location filename="../src/gui/generalsettings.ui" line="267"/>

Просмотреть файл

@ -9,27 +9,27 @@
<message>
<location filename="../src/gui/cloudproviders/cloudproviderwrapper.cpp" line="124"/>
<source>Checking for changes in &apos;%1&apos;</source>
<translation type="unfinished"/>
<translation>Kontrolujú sa zmeny v %1</translation>
</message>
<message>
<location filename="../src/gui/cloudproviders/cloudproviderwrapper.cpp" line="129"/>
<source>Syncing %1 of %2 (%3 left)</source>
<translation type="unfinished"/>
<translation>Synchronizuje sa %1 z %2 (zostáva %3)</translation>
</message>
<message>
<location filename="../src/gui/cloudproviders/cloudproviderwrapper.cpp" line="134"/>
<source>Syncing %1 of %2</source>
<translation type="unfinished"/>
<translation>Synchronizuje sa %1 z %2</translation>
</message>
<message>
<location filename="../src/gui/cloudproviders/cloudproviderwrapper.cpp" line="141"/>
<source>Syncing %1 (%2 left)</source>
<translation type="unfinished"/>
<translation>Synchronizuje sa %1 (zostáva %2)</translation>
</message>
<message>
<location filename="../src/gui/cloudproviders/cloudproviderwrapper.cpp" line="144"/>
<source>Syncing %1</source>
<translation type="unfinished"/>
<translation>Synchronizuje sa %1</translation>
</message>
<message>
<location filename="../src/gui/cloudproviders/cloudproviderwrapper.cpp" line="186"/>
@ -47,7 +47,7 @@
<message>
<location filename="../src/gui/mnemonicdialog.ui" line="23"/>
<source>Dialog</source>
<translation type="unfinished"/>
<translation>Dialóg</translation>
</message>
<message>
<location filename="../src/gui/mnemonicdialog.ui" line="58"/>
@ -3766,7 +3766,7 @@ Nie je vhodné ju používať.</translation>
<message>
<location filename="../src/gui/wizard/owncloudsetupnocredspage.ui" line="288"/>
<source>Server Address</source>
<translation type="unfinished"/>
<translation>Adresa servera</translation>
</message>
<message>
<location filename="../src/gui/wizard/owncloudsetupnocredspage.ui" line="304"/>
@ -3813,22 +3813,22 @@ Nie je vhodné ju používať.</translation>
<message numerus="yes">
<location filename="../src/common/utility.cpp" line="437"/>
<source>%n day ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>pred %n dňom</numerusform><numerusform>pred %n dňami</numerusform><numerusform>pred %n dňami</numerusform><numerusform>pred %n dňami</numerusform></translation>
</message>
<message numerus="yes">
<location filename="../src/common/utility.cpp" line="439"/>
<source>%n days ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>pred %n dňom</numerusform><numerusform>pred %n dňami</numerusform><numerusform>pred %n dňami</numerusform><numerusform>pred %n dňami</numerusform></translation>
</message>
<message numerus="yes">
<location filename="../src/common/utility.cpp" line="449"/>
<source>%n hour ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>pred %n hodinou</numerusform><numerusform>pred %n hodinami</numerusform><numerusform>pred %n hodinami</numerusform><numerusform>pred %n hodinami</numerusform></translation>
</message>
<message numerus="yes">
<location filename="../src/common/utility.cpp" line="451"/>
<source>%n hours ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>pred %n hodinou</numerusform><numerusform>pred %n hodinami</numerusform><numerusform>pred %n hodinami</numerusform><numerusform>pred %n hodinami</numerusform></translation>
</message>
<message>
<location filename="../src/common/utility.cpp" line="458"/>
@ -3843,12 +3843,12 @@ Nie je vhodné ju používať.</translation>
<message numerus="yes">
<location filename="../src/common/utility.cpp" line="464"/>
<source>%n minute ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>pred %n minútou</numerusform><numerusform>pred %n minútami</numerusform><numerusform>pred %n minútami</numerusform><numerusform>pred %n minútami</numerusform></translation>
</message>
<message numerus="yes">
<location filename="../src/common/utility.cpp" line="466"/>
<source>%n minutes ago</source>
<translation type="unfinished"><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform><numerusform></numerusform></translation>
<translation><numerusform>pred %n minútou</numerusform><numerusform>pred %n minútami</numerusform><numerusform>pred %n minútami</numerusform><numerusform>pred %n minútami</numerusform></translation>
</message>
<message>
<location filename="../src/common/utility.cpp" line="470"/>
@ -3925,17 +3925,17 @@ Nie je vhodné ju používať.</translation>
<message>
<location filename="../src/common/checksums.cpp" line="233"/>
<source>The checksum header is malformed.</source>
<translation type="unfinished"/>
<translation>Hlavička kontrolného súčtu je poškodená.</translation>
</message>
<message>
<location filename="../src/common/checksums.cpp" line="248"/>
<source>The checksum header contained an unknown checksum type &apos;%1&apos;</source>
<translation type="unfinished"/>
<translation>Hlavička kontrolného súčtu obsahovala neznámy typ kontrolného súčtu %1</translation>
</message>
<message>
<location filename="../src/common/checksums.cpp" line="252"/>
<source>The downloaded file does not match the checksum, it will be resumed.</source>
<translation type="unfinished"/>
<translation>Stiahnutý súbor nemá správny kontrolný súčet, bude stiahnutý znovu.</translation>
</message>
</context>
<context>
@ -3964,7 +3964,7 @@ Nie je vhodné ju používať.</translation>
<message>
<location filename="../src/libsync/theme.cpp" line="328"/>
<source>&lt;p&gt;&lt;small&gt;Built from Git revision &lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt; on %3, %4 using Qt %5, %6&lt;/small&gt;&lt;/p&gt;</source>
<translation type="unfinished"/>
<translation>&lt;p&gt;&lt;small&gt;Zostavené z Git revízie &lt;a href=&quot;%1&quot;&gt;%2&lt;/a&gt; na %3, %4 s použitím Qt %5, %6&lt;/small&gt;&lt;/p&gt;</translation>
</message>
</context>
<context>
@ -4120,7 +4120,7 @@ Nie je vhodné ju používať.</translation>
<message>
<location filename="../src/gui/guiutility.cpp" line="35"/>
<source>There was an error when launching the browser to go to URL %1. Maybe no default browser is configured?</source>
<translation type="unfinished"/>
<translation>Pri spustení prehliadača sa vyskytla chyba, keď sa prejsť na adresu URL %1. Možno nie je nakonfigurovaný žiadny predvolený prehliadač?</translation>
</message>
<message>
<location filename="../src/gui/guiutility.cpp" line="58"/>
@ -4130,7 +4130,7 @@ Nie je vhodné ju používať.</translation>
<message>
<location filename="../src/gui/guiutility.cpp" line="59"/>
<source>There was an error when launching the email client to create a new message. Maybe no default email client is configured?</source>
<translation type="unfinished"/>
<translation>Pri vytváraní novej správy sa pri spustení e-mailového klienta vyskytla chyba. Možno nie je nakonfigurovaný žiadny predvolený e-mailový klient?</translation>
</message>
</context>
</TS>