mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2026-04-07 18:46:49 +02:00
Compare commits
63 Commits
v1.4.0-bet
...
v1.4.0-rc1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
18a58f73de | ||
|
|
d1451a3c90 | ||
|
|
0bef47b2f3 | ||
|
|
ccc05d6658 | ||
|
|
c15de69156 | ||
|
|
8bfb44fd28 | ||
|
|
79d3b84fad | ||
|
|
b97701586e | ||
|
|
b120345fe7 | ||
|
|
ec5c65a530 | ||
|
|
77e7a1fa8d | ||
|
|
f6d45b68ef | ||
|
|
24d76a0d75 | ||
|
|
c3326efe94 | ||
|
|
c0e056bb84 | ||
|
|
8a7df36701 | ||
|
|
39ec6b1bb2 | ||
|
|
30b2406533 | ||
|
|
076d5dda0e | ||
|
|
e78eab46ff | ||
|
|
19a08f8d5e | ||
|
|
c6319117fd | ||
|
|
4c10ed4ada | ||
|
|
b0ab3ca80b | ||
|
|
9f89a2fe76 | ||
|
|
e386bfb550 | ||
|
|
0189a3f1bd | ||
|
|
d3a333e03c | ||
|
|
04d3e282fb | ||
|
|
4be5f970d5 | ||
|
|
31ceff181e | ||
|
|
42abf4101c | ||
|
|
f09cae74fb | ||
|
|
13a6393ec5 | ||
|
|
ace57f9dd4 | ||
|
|
e5117a98c9 | ||
|
|
c1f7af7e6f | ||
|
|
b4c116e2a2 | ||
|
|
a19a960b5e | ||
|
|
29d2094626 | ||
|
|
c3b82e6818 | ||
|
|
1a7c89326b | ||
|
|
3a1f04ac2d | ||
|
|
2c8e95a0f4 | ||
|
|
a9d94ef732 | ||
|
|
2756d17873 | ||
|
|
34d7f84fc2 | ||
|
|
cea9b389bf | ||
|
|
71b1e881d8 | ||
|
|
7ba47e9d44 | ||
|
|
be48cb646c | ||
|
|
47eb5ff1d9 | ||
|
|
b608f5a670 | ||
|
|
e81dc34c4e | ||
|
|
1603e627a3 | ||
|
|
bf978b3e0f | ||
|
|
0fdaf33288 | ||
|
|
367c4153c1 | ||
|
|
395c673a24 | ||
|
|
22de23c651 | ||
|
|
23926d2461 | ||
|
|
c03f31b6ba | ||
|
|
a1060a8538 |
@@ -13,12 +13,16 @@ else ()
|
||||
include ( ${CMAKE_SOURCE_DIR}/OWNCLOUD.cmake )
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED APPLICATION_SHORTNAME)
|
||||
set ( APPLICATION_SHORTNAME ${APPLICATION_NAME} )
|
||||
endif()
|
||||
|
||||
include(${CMAKE_SOURCE_DIR}/VERSION.cmake)
|
||||
configure_file( ${CMAKE_SOURCE_DIR}/src/mirall/version.h.in "${CMAKE_CURRENT_BINARY_DIR}/src/mirall/version.h" )
|
||||
include_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR} "${CMAKE_CURRENT_BINARY_DIR}/src/mirall/")
|
||||
|
||||
include(GNUInstallDirs)
|
||||
|
||||
include(DefineInstallationPaths)
|
||||
include(GetGitRevisionDescription)
|
||||
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||
|
||||
@@ -34,10 +38,8 @@ if (${GIT_SHA1} STREQUAL "GITDIR-NOTFOUND")
|
||||
endif()
|
||||
endif()
|
||||
|
||||
## stupid, we should upstream this
|
||||
if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT CMAKE_INSTALL_SYSCONFDIR)
|
||||
set(CMAKE_INSTALL_SYSCONFDIR "/etc")
|
||||
endif()
|
||||
set(SYSCONFDIR ${SYSCONF_INSTALL_DIR})
|
||||
set(DATADIR ${DATA_INSTALL_DIR})
|
||||
|
||||
#####
|
||||
## handle BUILD_OWNCLOUD_OSX_BUNDLE
|
||||
@@ -83,25 +85,6 @@ set(USE_INOTIFY ${INOTIFY_FOUND})
|
||||
|
||||
configure_file(config.h.in ${CMAKE_CURRENT_BINARY_DIR}/config.h)
|
||||
|
||||
set(CPACK_SOURCE_IGNORE_FILES
|
||||
# hidden files
|
||||
"/\\\\..+$"
|
||||
# temporary files
|
||||
"\\\\.swp$"
|
||||
# backup files
|
||||
"~$"
|
||||
# others
|
||||
"\\\\.#"
|
||||
"/#"
|
||||
"/build/"
|
||||
"/_build/"
|
||||
# used before
|
||||
"\\\\.o$"
|
||||
"\\\\.lo$"
|
||||
"\\\\.la$"
|
||||
"Makefile\\\\.in$"
|
||||
)
|
||||
|
||||
include(OwnCloudCPack.cmake)
|
||||
|
||||
add_definitions(-DUNICODE)
|
||||
@@ -123,5 +106,5 @@ endif(UNIT_TESTING)
|
||||
if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||
configure_file(sync-exclude.lst ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/sync-exclude.lst COPYONLY)
|
||||
else()
|
||||
install( FILES sync-exclude.lst DESTINATION ${CMAKE_INSTALL_SYSCONFDIR} )
|
||||
install( FILES sync-exclude.lst DESTINATION ${SYSCONFDIR}/${APPLICATION_SHORTNAME} )
|
||||
endif()
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
set( APPLICATION_SHORTNAME "owncloud" )
|
||||
set( APPLICATION_NAME "ownCloud" )
|
||||
set( APPLICATION_EXECUTABLE "owncloud" )
|
||||
set( APPLICATION_DOMAIN "owncloud.com" )
|
||||
set( APPLICATION_VENDOR "ownCloud, Inc" )
|
||||
set( THEME_CLASS "ownCloudTheme" )
|
||||
#set( APPLICATION_SHORTNAME ${APPLICATION_NAME} )
|
||||
set( APPLICATION_EXECUTABLE "owncloud" )
|
||||
set( APPLICATION_DOMAIN "owncloud.com" )
|
||||
set( APPLICATION_VENDOR "ownCloud, Inc" )
|
||||
set( THEME_CLASS "ownCloudTheme" )
|
||||
set( APPLICATION_REV_DOMAIN "com.owncloud.desktopclient" )
|
||||
set( WIN_SETUP_BITMAP_PATH "${CMAKE_SOURCE_DIR}/admin/win/nsi" )
|
||||
# set( THEME_INCLUDE "${OEM_THEME_DIR}/mytheme.h" )
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
set( VERSION_MAJOR 1 )
|
||||
set( VERSION_MINOR 4 )
|
||||
set( VERSION_PATCH 0 )
|
||||
set( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX}beta2")
|
||||
set( VERSION "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX}rc1")
|
||||
set( SOVERSION 0 )
|
||||
|
||||
|
||||
@@ -10,8 +10,7 @@ mount="/Volumes/$(basename $src_dmg|cut -d"-" -f1)"
|
||||
|
||||
test -e $tmp_dmg && rm -rf $tmp_dmg
|
||||
hdiutil convert $src_dmg -format UDRW -o $tmp_dmg
|
||||
open $tmp_dmg
|
||||
sleep 12s
|
||||
hdiutil attach $tmp_dmg
|
||||
pushd $mount
|
||||
codesign -s "$identity" $mount/*.app
|
||||
popd
|
||||
|
||||
108
cmake/modules/DefineInstallationPaths.cmake
Normal file
108
cmake/modules/DefineInstallationPaths.cmake
Normal file
@@ -0,0 +1,108 @@
|
||||
if (UNIX)
|
||||
# Suffix for Linux
|
||||
SET(LIB_SUFFIX
|
||||
CACHE STRING "Define suffix of directory name (32/64)"
|
||||
)
|
||||
|
||||
SET(EXEC_INSTALL_PREFIX
|
||||
"${CMAKE_INSTALL_PREFIX}"
|
||||
CACHE PATH "Base directory for executables and libraries"
|
||||
)
|
||||
SET(SHARE_INSTALL_PREFIX
|
||||
"${CMAKE_INSTALL_PREFIX}/share"
|
||||
CACHE PATH "Base directory for files which go to share/"
|
||||
)
|
||||
SET(DATA_INSTALL_PREFIX
|
||||
"${SHARE_INSTALL_PREFIX}/${APPLICATION_SHORT_NAME}"
|
||||
CACHE PATH "The parent directory where applications can install their data")
|
||||
|
||||
# The following are directories where stuff will be installed to
|
||||
SET(BIN_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/bin"
|
||||
CACHE PATH "The ${APPLICATION_SHORT_NAME} binary install dir (default prefix/bin)"
|
||||
)
|
||||
SET(SBIN_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/sbin"
|
||||
CACHE PATH "The ${APPLICATION_SHORT_NAME} sbin install dir (default prefix/sbin)"
|
||||
)
|
||||
SET(LIB_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/lib${LIB_SUFFIX}"
|
||||
CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/lib)"
|
||||
)
|
||||
SET(LIBEXEC_INSTALL_DIR
|
||||
"${EXEC_INSTALL_PREFIX}/libexec"
|
||||
CACHE PATH "The subdirectory relative to the install prefix where libraries will be installed (default is prefix/libexec)"
|
||||
)
|
||||
SET(PLUGIN_INSTALL_DIR
|
||||
"${LIB_INSTALL_DIR}/${APPLICATION_SHORT_NAME}"
|
||||
CACHE PATH "The subdirectory relative to the install prefix where plugins will be installed (default is prefix/lib/${APPLICATION_SHORT_NAME})"
|
||||
)
|
||||
SET(INCLUDE_INSTALL_DIR
|
||||
"${CMAKE_INSTALL_PREFIX}/include"
|
||||
CACHE PATH "The subdirectory to the header prefix (default prefix/include)"
|
||||
)
|
||||
|
||||
SET(DATA_INSTALL_DIR
|
||||
"${DATA_INSTALL_PREFIX}"
|
||||
CACHE PATH "The parent directory where applications can install their data (default prefix/share/${APPLICATION_SHORT_NAME})"
|
||||
)
|
||||
SET(HTML_INSTALL_DIR
|
||||
"${DATA_INSTALL_PREFIX}/doc/HTML"
|
||||
CACHE PATH "The HTML install dir for documentation (default data/doc/html)"
|
||||
)
|
||||
SET(ICON_INSTALL_DIR
|
||||
"${DATA_INSTALL_PREFIX}/icons"
|
||||
CACHE PATH "The icon install dir (default data/icons/)"
|
||||
)
|
||||
SET(SOUND_INSTALL_DIR
|
||||
"${DATA_INSTALL_PREFIX}/sounds"
|
||||
CACHE PATH "The install dir for sound files (default data/sounds)"
|
||||
)
|
||||
|
||||
SET(LOCALE_INSTALL_DIR
|
||||
"${SHARE_INSTALL_PREFIX}/locale"
|
||||
CACHE PATH "The install dir for translations (default prefix/share/locale)"
|
||||
)
|
||||
|
||||
SET(XDG_APPS_DIR
|
||||
"${SHARE_INSTALL_PREFIX}/applications/"
|
||||
CACHE PATH "The XDG apps dir"
|
||||
)
|
||||
SET(XDG_DIRECTORY_DIR
|
||||
"${SHARE_INSTALL_PREFIX}/desktop-directories"
|
||||
CACHE PATH "The XDG directory"
|
||||
)
|
||||
|
||||
IF(NOT "${EXEC_INSTALL_PREFIX}" STREQUAL "/usr")
|
||||
SET(SYSCONFDIR_INSTALL_PREFIX "${EXEC_INSTALL_PREFIX}")
|
||||
endif()
|
||||
|
||||
SET(SYSCONF_INSTALL_DIR
|
||||
"${SYSCONFDIR_INSTALL_PREFIX}/etc"
|
||||
CACHE PATH "The ${APPLICATION_SHORT_NAME} sysconfig install dir (default prefix/etc)"
|
||||
)
|
||||
SET(MAN_INSTALL_DIR
|
||||
"${SHARE_INSTALL_PREFIX}/man"
|
||||
CACHE PATH "The ${APPLICATION_SHORT_NAME} man install dir (default prefix/man)"
|
||||
)
|
||||
SET(INFO_INSTALL_DIR
|
||||
"${SHARE_INSTALL_PREFIX}/info"
|
||||
CACHE PATH "The ${APPLICATION_SHORT_NAME} info install dir (default prefix/info)"
|
||||
)
|
||||
endif (UNIX)
|
||||
|
||||
if (WIN32)
|
||||
# Same same
|
||||
set(SHARE_INSTALL_PREFIX "share" CACHE PATH "-")
|
||||
set(BIN_INSTALL_DIR "." CACHE PATH "-")
|
||||
set(SBIN_INSTALL_DIR "." CACHE PATH "-")
|
||||
set(LIB_INSTALL_DIR "lib" CACHE PATH "-")
|
||||
set(INCLUDE_INSTALL_DIR "include" CACHE PATH "-")
|
||||
set(PLUGIN_INSTALL_DIR "plugins" CACHE PATH "-")
|
||||
set(HTML_INSTALL_DIR "doc/HTML" CACHE PATH "-")
|
||||
set(ICON_INSTALL_DIR "." CACHE PATH "-")
|
||||
set(SOUND_INSTALL_DIR "." CACHE PATH "-")
|
||||
set(LOCALE_INSTALL_DIR "lang" CACHE PATH "-")
|
||||
set(SYSCONF_INSTALL_DIR "config" CACHE PATH "-")
|
||||
set(MAN_INSTALL_DIR "man" CACHE PATH "-")
|
||||
endif (WIN32)
|
||||
@@ -1,6 +1,6 @@
|
||||
;ownCloud installer script.
|
||||
|
||||
!define APPLICATION_SHORTNAME "@APPLICATION_SHORTNAME@"
|
||||
!define APPLICATION_SHORTNAME "@APPLICATION_EXECUTABLE@"
|
||||
!define APPLICATION_NAME "@APPLICATION_NAME@"
|
||||
!define APPLICATION_VENDOR "@APPLICATION_VENDOR@"
|
||||
!define APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@.exe"
|
||||
|
||||
@@ -8,4 +8,10 @@
|
||||
#cmakedefine APPLICATION_DOMAIN @APPLICATION_DOMAIN@
|
||||
#cmakedefine THEME_CLASS @THEME_CLASS@
|
||||
#cmakedefine THEME_INCLUDE @THEME_INCLUDE@
|
||||
|
||||
#cmakedefine APPLICATION_NAME "@APPLICATION_NAME@"
|
||||
#cmakedefine APPLICATION_SHORTNAME "@APPLICATION_SHORTNAME@"
|
||||
|
||||
#cmakedefine SYSCONFDIR "@SYSCONFDIR@"
|
||||
#cmakedefine DATADIR "@DATADIR@"
|
||||
#endif
|
||||
|
||||
@@ -4,5 +4,5 @@ Type=Application
|
||||
Exec=@APPLICATION_EXECUTABLE@
|
||||
Name=@APPLICATION_NAME@ desktop sync client
|
||||
GenericName=Folder Sync
|
||||
Icon=@APPLICATION_SHORTNAME@
|
||||
Icon=@APPLICATION_EXECUTABLE@
|
||||
Keywords=@APPLICATION_NAME@;syncing;file;sharing
|
||||
|
||||
@@ -11,7 +11,7 @@ else()
|
||||
set(theme_dir ${CMAKE_CURRENT_SOURCE_DIR}/../theme)
|
||||
endif()
|
||||
|
||||
set(synclib_NAME ${APPLICATION_SHORTNAME}sync)
|
||||
set(synclib_NAME ${APPLICATION_EXECUTABLE}sync)
|
||||
|
||||
set(mirall_UI
|
||||
mirall/folderwizardsourcepage.ui
|
||||
@@ -168,8 +168,8 @@ if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||
)
|
||||
if(NOT WIN32)
|
||||
configure_file(${CMAKE_SOURCE_DIR}/mirall.desktop.in
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_SHORTNAME}.desktop)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_SHORTNAME}.desktop DESTINATION share/applications )
|
||||
${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop)
|
||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop DESTINATION share/applications )
|
||||
endif()
|
||||
else()
|
||||
install(TARGETS ${synclib_NAME} DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
|
||||
@@ -254,7 +254,7 @@ set( final_src
|
||||
include( AddAppIconMacro )
|
||||
set(ownCloud_old ${ownCloud})
|
||||
|
||||
kde4_add_app_icon( ownCloud "${theme_dir}/colored/${APPLICATION_SHORTNAME}-icon*.png")
|
||||
kde4_add_app_icon( ownCloud "${theme_dir}/colored/${APPLICATION_EXECUTABLE}-icon*.png")
|
||||
list(APPEND final_src ${ownCloud})
|
||||
set(ownCloud ${ownCloud_old})
|
||||
|
||||
@@ -262,16 +262,15 @@ if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||
set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||
|
||||
if(NOT WIN32)
|
||||
file( GLOB _icons "${theme_dir}/colored/${APPLICATION_SHORTNAME}-icon-*.png" )
|
||||
file( GLOB _icons "${theme_dir}/colored/${APPLICATION_EXECUTABLE}-icon-*.png" )
|
||||
foreach( _file ${_icons} )
|
||||
string( REPLACE "${theme_dir}/colored/${APPLICATION_SHORTNAME}-icon-" "" _res ${_file} )
|
||||
string( REPLACE "${theme_dir}/colored/${APPLICATION_EXECUTABLE}-icon-" "" _res ${_file} )
|
||||
string( REPLACE ".png" "" _res ${_res} )
|
||||
install( FILES ${_file} RENAME ${APPLICATION_SHORTNAME}.png DESTINATION
|
||||
${CMAKE_INSTALL_DATADIR}/icons/hicolor/${_res}x${_res}/apps )
|
||||
install( FILES ${_file} RENAME ${APPLICATION_EXECUTABLE}.png DESTINATION ${DATADIR}/icons/hicolor/${_res}x${_res}/apps )
|
||||
endforeach( _file )
|
||||
endif(NOT WIN32)
|
||||
|
||||
install(FILES ${mirall_I18N} DESTINATION share/${APPLICATION_SHORTNAME}/i18n)
|
||||
install(FILES ${mirall_I18N} DESTINATION share/${APPLICATION_EXECUTABLE}/i18n)
|
||||
|
||||
# we may not add MACOSX_BUNDLE here, if not building one
|
||||
|
||||
|
||||
@@ -39,7 +39,7 @@ int main(int argc, char **argv)
|
||||
}
|
||||
return 0;
|
||||
} else {
|
||||
if (!QSystemTrayIcon::isSystemTrayAvailable()) {
|
||||
if (!QSystemTrayIcon::isSystemTrayAvailable() && qgetenv("DESKTOP_SESSION") != "ubuntu") {
|
||||
QMessageBox::critical(0, qApp->translate("main.cpp", "System Tray not available"),
|
||||
qApp->translate("main.cpp", "%1 requires on a working system tray. "
|
||||
"If you are running XFCE, please follow "
|
||||
|
||||
@@ -38,6 +38,16 @@
|
||||
|
||||
namespace Mirall {
|
||||
|
||||
static const char progressBarStyleC[] =
|
||||
"QProgressBar {"
|
||||
"border: 1px solid grey;"
|
||||
"border-radius: 5px;"
|
||||
"text-align: center;"
|
||||
"}"
|
||||
"QProgressBar::chunk {"
|
||||
"background-color: %1; width: 1px;"
|
||||
"}";
|
||||
|
||||
AccountSettings::AccountSettings(QWidget *parent) :
|
||||
QWidget(parent),
|
||||
ui(new Ui::AccountSettings),
|
||||
@@ -48,6 +58,7 @@ AccountSettings::AccountSettings(QWidget *parent) :
|
||||
_model = new FolderStatusModel;
|
||||
_model->setParent(this);
|
||||
FolderStatusDelegate *delegate = new FolderStatusDelegate;
|
||||
delegate->setParent(this);
|
||||
|
||||
ui->_folderList->setItemDelegate( delegate );
|
||||
ui->_folderList->setModel( _model );
|
||||
@@ -74,6 +85,8 @@ AccountSettings::AccountSettings(QWidget *parent) :
|
||||
connect(ui->_folderList, SIGNAL(clicked(QModelIndex)), SLOT(slotFolderActivated(QModelIndex)));
|
||||
connect(ui->_folderList, SIGNAL(doubleClicked(QModelIndex)),SLOT(slotDoubleClicked(QModelIndex)));
|
||||
|
||||
QColor color = palette().highlight().color();
|
||||
ui->quotaProgressBar->setStyleSheet(QString::fromLatin1(progressBarStyleC).arg(color.name()));
|
||||
ownCloudInfo *ocInfo = ownCloudInfo::instance();
|
||||
slotUpdateQuota(ocInfo->lastQuotaTotalBytes(), ocInfo->lastQuotaUsedBytes());
|
||||
connect(ocInfo, SIGNAL(quotaUpdated(qint64,qint64)), SLOT(slotUpdateQuota(qint64,qint64)));
|
||||
@@ -209,7 +222,11 @@ void AccountSettings::folderToModelItem( QStandardItem *item, Folder *f )
|
||||
SyncResult res = f->syncResult();
|
||||
SyncResult::Status status = res.status();
|
||||
|
||||
QString errors = res.errorStrings().join(QLatin1String("<br/>"));
|
||||
QStringList errorList = res.errorStrings();
|
||||
QString errors;
|
||||
if( ! errorList.isEmpty() ) {
|
||||
errors = res.errorStrings().join(QLatin1String("<br/>"));
|
||||
}
|
||||
|
||||
Theme *theme = Theme::instance();
|
||||
item->setData( theme->statusHeaderText( status ), Qt::ToolTipRole );
|
||||
@@ -221,6 +238,12 @@ void AccountSettings::folderToModelItem( QStandardItem *item, Folder *f )
|
||||
item->setData( theme->statusHeaderText( status ), FolderStatusDelegate::FolderStatus );
|
||||
item->setData( errors, FolderStatusDelegate::FolderErrorMsg );
|
||||
|
||||
if( errors.isEmpty() && (status == SyncResult::Error ||
|
||||
status == SyncResult::SetupError ||
|
||||
status == SyncResult::Unavailable )) {
|
||||
item->setData( theme->statusHeaderText(status), FolderStatusDelegate::FolderErrorMsg);
|
||||
}
|
||||
|
||||
bool ongoing = false;
|
||||
item->setData( QVariant(res.warnCount()), FolderStatusDelegate::WarningCount );
|
||||
if( status == SyncResult::SyncRunning ) {
|
||||
@@ -425,7 +448,9 @@ void AccountSettings::slotOCInfo( const QString& url, const QString& versionStr,
|
||||
qDebug() << "#-------# oC found on " << url;
|
||||
/* enable the open button */
|
||||
ui->connectLabel->setOpenExternalLinks(true);
|
||||
ui->connectLabel->setText( tr("Connected to <a href=\"%1\">%1</a>.").arg(url) );
|
||||
QUrl safeUrl(url);
|
||||
safeUrl.setPassword(QString()); // Remove the password from the URL to avoid showing it in the UI
|
||||
ui->connectLabel->setText( tr("Connected to <a href=\"%1\">%2</a>.").arg(url, safeUrl.toString()) );
|
||||
ui->connectLabel->setToolTip( tr("Version: %1 (%2)").arg(versionStr).arg(version));
|
||||
ui->_ButtonAdd->setEnabled(true);
|
||||
|
||||
@@ -649,7 +674,9 @@ void AccountSettings::slotUpdateQuota(qint64 total, qint64 used)
|
||||
ui->quotaProgressBar->setEnabled(true);
|
||||
// workaround the label only accepting ints (which may be only 32 bit wide)
|
||||
ui->quotaProgressBar->setMaximum(100);
|
||||
ui->quotaProgressBar->setValue(round(used/(double)total * 100));
|
||||
int qVal = qRound(used/(double)total * 100);
|
||||
if( qVal > 100 ) qVal = 100;
|
||||
ui->quotaProgressBar->setValue(qVal);
|
||||
QString usedStr = Utility::octetsToString(used);
|
||||
QString totalStr = Utility::octetsToString(total);
|
||||
ui->quotaLabel->setText(tr("%1 of %2 in use.").arg(usedStr, totalStr));
|
||||
|
||||
@@ -37,19 +37,6 @@
|
||||
</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>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -16,6 +16,8 @@
|
||||
|
||||
#include <iostream>
|
||||
|
||||
#include "config.h"
|
||||
|
||||
#include "mirall/application.h"
|
||||
#include "mirall/systray.h"
|
||||
#include "mirall/folder.h"
|
||||
@@ -81,8 +83,7 @@ static const char optionsC[] =
|
||||
QString applicationTrPath()
|
||||
{
|
||||
#ifdef Q_OS_LINUX
|
||||
// FIXME - proper path!
|
||||
return QString::fromLatin1("/usr/share/%1/i18n/").arg(Theme::instance()->appName());
|
||||
return QString::fromLatin1(DATADIR"/i18n/");
|
||||
#endif
|
||||
#ifdef Q_OS_MAC
|
||||
return QApplication::applicationDirPath()+QLatin1String("/../Resources/Translations"); // path defaults to app dir.
|
||||
@@ -183,6 +184,11 @@ Application::Application(int &argc, char **argv) :
|
||||
|
||||
Application::~Application()
|
||||
{
|
||||
if (_settingsDialog) {
|
||||
delete _settingsDialog.data();
|
||||
}
|
||||
|
||||
delete _logBrowser;
|
||||
delete _tray; // needed, see ctor
|
||||
|
||||
qDebug() << "* Mirall shutdown";
|
||||
@@ -408,7 +414,9 @@ void Application::setupContextMenu()
|
||||
_contextMenu->addMenu(_recentActionsMenu);
|
||||
_contextMenu->addSeparator();
|
||||
_contextMenu->addAction(_actionSettings);
|
||||
_contextMenu->addAction(_actionHelp);
|
||||
if (!_theme->helpUrl().isEmpty()) {
|
||||
_contextMenu->addAction(_actionHelp);
|
||||
}
|
||||
_contextMenu->addSeparator();
|
||||
|
||||
_contextMenu->addAction(_actionQuit);
|
||||
@@ -511,6 +519,9 @@ void Application::slotSetupProxy()
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
FolderMan::instance()->setDirtyProxy(true);
|
||||
FolderMan::instance()->slotScheduleAllFolders();
|
||||
}
|
||||
|
||||
void Application::slotRefreshQuotaDisplay( qint64 total, qint64 used )
|
||||
@@ -552,9 +563,9 @@ void Application::rebuildRecentMenus()
|
||||
_recentActionsMenu->addAction(tr("No items synced recently"));
|
||||
} else {
|
||||
QListIterator<Progress::Info> i(progressInfoList);
|
||||
i.toBack();
|
||||
while(i.hasPrevious()) {
|
||||
Progress::Info info = i.previous();
|
||||
|
||||
while(i.hasNext()) {
|
||||
Progress::Info info = i.next();
|
||||
QString kindStr = Progress::asResultString(info.kind);
|
||||
QString timeStr = info.timestamp.toString("hh:mm");
|
||||
|
||||
|
||||
@@ -140,19 +140,19 @@ QString CSyncThread::csyncErrorToString( CSYNC_ERROR_CODE err, const char *errSt
|
||||
errStr = tr("A HTTP transmission error happened.");
|
||||
break;
|
||||
case CSYNC_ERR_PERM:
|
||||
errStr = tr("CSync failed due to not handled permission deniend.");
|
||||
errStr = tr("CSync: Permission deniend.");
|
||||
break;
|
||||
case CSYNC_ERR_NOT_FOUND:
|
||||
errStr = tr("CSync failed to find a specific file.");
|
||||
errStr = tr("CSync: File not found.");
|
||||
break;
|
||||
case CSYNC_ERR_EXISTS:
|
||||
errStr = tr("CSync tried to create a directory that already exists.");
|
||||
errStr = tr("CSync: Directory already exists.");
|
||||
break;
|
||||
case CSYNC_ERR_NOSPC:
|
||||
errStr = tr("CSync: No space on %1 server available.").arg(Theme::instance()->appNameGUI());
|
||||
errStr = tr("CSync: No space left on %1 server.").arg(Theme::instance()->appNameGUI());
|
||||
break;
|
||||
case CSYNC_ERR_UNSPEC:
|
||||
errStr = tr("CSync unspecified error.");
|
||||
errStr = tr("CSync: unspecified error.");
|
||||
|
||||
default:
|
||||
errStr = tr("An internal error number %1 happend.").arg( (int) err );
|
||||
|
||||
@@ -205,7 +205,7 @@ void Folder::setSyncEnabled( bool doit )
|
||||
_syncResult.clearErrors();
|
||||
evaluateSync( QStringList() );
|
||||
} else {
|
||||
// disable folder. Done through the _enabled-flag set above
|
||||
_pollTimer.stop();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -283,9 +283,13 @@ void Folder::bubbleUpSyncResult()
|
||||
SyncFileItem firstItemDeleted;
|
||||
SyncFileItem firstItemUpdated;
|
||||
|
||||
Logger *logger = Logger::instance();
|
||||
|
||||
foreach (const SyncFileItem &item, _syncResult.syncFileItemVector() ) {
|
||||
if( item._instruction == CSYNC_INSTRUCTION_ERROR ) {
|
||||
slotCSyncError( tr("File %1: %2").arg(item._file).arg(item._errorString) );
|
||||
logger->postGuiLog(tr("File %1").arg(item._file), item._errorString);
|
||||
|
||||
} else {
|
||||
if (item._dir == SyncFileItem::Down) {
|
||||
switch (item._instruction) {
|
||||
@@ -293,11 +297,21 @@ void Folder::bubbleUpSyncResult()
|
||||
newItems++;
|
||||
if (firstItemNew.isEmpty())
|
||||
firstItemNew = item;
|
||||
|
||||
if (item._type == SyncFileItem::Directory) {
|
||||
_watcher->addPath(path() + item._file);
|
||||
}
|
||||
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_REMOVE:
|
||||
removedItems++;
|
||||
if (firstItemDeleted.isEmpty())
|
||||
firstItemDeleted = item;
|
||||
|
||||
if (item._type == SyncFileItem::Directory) {
|
||||
_watcher->removePath(path() + item._file);
|
||||
}
|
||||
|
||||
break;
|
||||
case CSYNC_INSTRUCTION_UPDATED:
|
||||
updatedItems++;
|
||||
@@ -321,8 +335,6 @@ void Folder::bubbleUpSyncResult()
|
||||
|
||||
_syncResult.setWarnCount(ignoredItems);
|
||||
|
||||
Logger *logger = Logger::instance();
|
||||
|
||||
qDebug() << "OO folder slotSyncFinished: result: " << int(_syncResult.status());
|
||||
if (newItems > 0) {
|
||||
QString file = QDir::toNativeSeparators(firstItemNew._file);
|
||||
@@ -486,6 +498,8 @@ void Folder::setProxy()
|
||||
csync_set_module_property(_csync_ctx, "proxy_port", &proxyPort );
|
||||
csync_set_module_property(_csync_ctx, "proxy_user", proxy.user().toUtf8().data() );
|
||||
csync_set_module_property(_csync_ctx, "proxy_pwd" , proxy.password().toUtf8().data() );
|
||||
|
||||
FolderMan::instance()->setDirtyProxy(false);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -524,6 +538,8 @@ void Folder::startSync(const QStringList &pathList)
|
||||
QMetaObject::invokeMethod(this, "slotCSyncFinished", Qt::QueuedConnection);
|
||||
return;
|
||||
}
|
||||
} else if (FolderMan::instance()->isDirtyProxy()) {
|
||||
setProxy();
|
||||
}
|
||||
|
||||
if (_thread && _thread->isRunning()) {
|
||||
|
||||
@@ -37,7 +37,8 @@ FolderMan* FolderMan::_instance = 0;
|
||||
|
||||
FolderMan::FolderMan(QObject *parent) :
|
||||
QObject(parent),
|
||||
_syncEnabled( true )
|
||||
_syncEnabled( true ),
|
||||
_dirtyProxy( true )
|
||||
{
|
||||
// if QDir::mkpath would not be so stupid, I would not need to have this
|
||||
// duplication of folderConfigPath() here
|
||||
|
||||
@@ -109,6 +109,9 @@ public slots:
|
||||
|
||||
void slotScheduleAllFolders();
|
||||
|
||||
bool isDirtyProxy() { return _dirtyProxy; }
|
||||
void setDirtyProxy(bool value = true) { _dirtyProxy = value; }
|
||||
|
||||
private slots:
|
||||
// slot to add a folder to the syncing queue
|
||||
void slotScheduleSync( const QString & );
|
||||
@@ -136,6 +139,7 @@ private:
|
||||
QString _currentSyncFolder;
|
||||
bool _syncEnabled;
|
||||
QQueue<QString> _scheduleQueue;
|
||||
bool _dirtyProxy; // If the proxy need to be re-configured
|
||||
|
||||
explicit FolderMan(QObject *parent = 0);
|
||||
static FolderMan *_instance;
|
||||
|
||||
@@ -243,7 +243,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
||||
// Sync File Progress Bar: Show it if syncFile is not empty.
|
||||
if( !overallString.isEmpty()) {
|
||||
int fileNameTextHeight = subFm.boundingRect(tr("File")).height();
|
||||
int barHeight = fileNameTextHeight;
|
||||
int barHeight = qMax(fileNameTextHeight, aliasFm.height()+2); ;
|
||||
int overallWidth = option.rect.width()-2*aliasMargin;
|
||||
|
||||
painter->save();
|
||||
@@ -260,6 +260,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
||||
pBRect.setWidth( overallWidth - progressTextWidth - margin );
|
||||
|
||||
QStyleOptionProgressBarV2 pBarOpt;
|
||||
|
||||
pBarOpt.state = option.state | QStyle::State_Horizontal;
|
||||
pBarOpt.minimum = 0;
|
||||
pBarOpt.maximum = 100;
|
||||
@@ -280,6 +281,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
||||
|
||||
QString elidedText = progressFm.elidedText(overallString, Qt::ElideLeft, overallProgressRect.width());
|
||||
painter->drawText( overallProgressRect, Qt::AlignRight+Qt::AlignVCenter, elidedText);
|
||||
// painter->drawRect(overallProgressRect);
|
||||
|
||||
// Individual File Progress
|
||||
QRect fileRect;
|
||||
|
||||
@@ -172,5 +172,16 @@ void FolderWatcher::changeDetected(const QString& f)
|
||||
setProcessTimer();
|
||||
}
|
||||
|
||||
void FolderWatcher::addPath(const QString &path )
|
||||
{
|
||||
_d->addPath(path);
|
||||
}
|
||||
|
||||
void FolderWatcher::removePath(const QString &path )
|
||||
{
|
||||
_d->removePath(path);
|
||||
}
|
||||
|
||||
|
||||
} // namespace Mirall
|
||||
|
||||
|
||||
@@ -88,6 +88,15 @@ public:
|
||||
void setEventInterval(int seconds);
|
||||
|
||||
QStringList ignores() const;
|
||||
|
||||
/**
|
||||
* Not all backends are recursive by default.
|
||||
* Those need to be notified when a directory is added or removed while the watcher is disabled.
|
||||
* This is a no-op for backend that are recursive
|
||||
*/
|
||||
void addPath(const QString&);
|
||||
void removePath(const QString&);
|
||||
|
||||
public slots:
|
||||
/**
|
||||
* Enabled or disables folderChanged() events.
|
||||
|
||||
@@ -119,9 +119,8 @@ void FolderWatcherPrivate::slotINotifyEvent(int mask, int /*cookie*/, const QStr
|
||||
}
|
||||
else if (mask & IN_DELETE) {
|
||||
//qDebug() << cookie << " DELETE: " << path;
|
||||
if ( QFileInfo(path).isDir() && _inotify->directories().contains(path) ) {
|
||||
qDebug() << "(-) Watcher:" << path;
|
||||
_inotify->removePath(path);
|
||||
if ( QFileInfo(path).isDir() ) {
|
||||
removePath(path);
|
||||
}
|
||||
}
|
||||
else if (mask & IN_CLOSE_WRITE) {
|
||||
@@ -160,4 +159,13 @@ void FolderWatcherPrivate::slotINotifyEvent(int mask, int /*cookie*/, const QStr
|
||||
_parent->setProcessTimer();
|
||||
}
|
||||
|
||||
void FolderWatcherPrivate::removePath(const QString &path )
|
||||
{
|
||||
if (_inotify->directories().contains(path) ) {
|
||||
qDebug() << "(-) Watcher:" << path;
|
||||
_inotify->removePath(path);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
} // namespace Mirall
|
||||
|
||||
@@ -26,6 +26,8 @@ class FolderWatcherPrivate : public QObject {
|
||||
Q_OBJECT
|
||||
public:
|
||||
FolderWatcherPrivate(FolderWatcher *p);
|
||||
void addPath(const QString &path) { slotAddFolderRecursive(path); }
|
||||
void removePath(const QString &);
|
||||
signals:
|
||||
void error(const QString& error);
|
||||
private slots:
|
||||
|
||||
@@ -31,6 +31,9 @@ public:
|
||||
FolderWatcherPrivate(FolderWatcher *p);
|
||||
~FolderWatcherPrivate();
|
||||
|
||||
void addPath(const QString &) {}
|
||||
void removePath(const QString &) {}
|
||||
|
||||
void startWatching();
|
||||
void doNotifyParent();
|
||||
|
||||
|
||||
@@ -48,6 +48,10 @@ class FolderWatcherPrivate : public QObject {
|
||||
public:
|
||||
FolderWatcherPrivate(FolderWatcher *p);
|
||||
~FolderWatcherPrivate();
|
||||
|
||||
void addPath(const QString &) {}
|
||||
void removePath(const QString &) {}
|
||||
|
||||
private:
|
||||
FolderWatcher *_parent;
|
||||
WatcherThread *_thread;
|
||||
|
||||
@@ -103,8 +103,11 @@ void ItemProgressDialog::setSyncResult( const SyncResult& result )
|
||||
for (i = items.begin(); i != items.end(); ++i) {
|
||||
const SyncFileItem& item = *i;
|
||||
QString errMsg;
|
||||
QString tooltip;
|
||||
// handle ignored files here.
|
||||
if( item._instruction == CSYNC_INSTRUCTION_IGNORE ) {
|
||||
|
||||
if( item._instruction == CSYNC_INSTRUCTION_IGNORE
|
||||
|| item._instruction == CSYNC_INSTRUCTION_CONFLICT ) {
|
||||
QStringList columns;
|
||||
QString timeStr = timeString(dt);
|
||||
QString longTimeStr = timeString(dt, QLocale::LongFormat);
|
||||
@@ -112,22 +115,41 @@ void ItemProgressDialog::setSyncResult( const SyncResult& result )
|
||||
columns << timeStr;
|
||||
columns << item._file;
|
||||
columns << folder;
|
||||
if( item._type == SyncFileItem::File ) {
|
||||
errMsg = tr("File ignored.");
|
||||
} else if( item._type == SyncFileItem::Directory ){
|
||||
errMsg = tr("Directory ignored.");
|
||||
} else if( item._type == SyncFileItem::SoftLink ) {
|
||||
errMsg = tr("Soft Link ignored.");
|
||||
if( item._instruction == CSYNC_INSTRUCTION_IGNORE) {
|
||||
if( item._type == SyncFileItem::File ) {
|
||||
errMsg = tr("File ignored.");
|
||||
tooltip = tr("The file was ignored because it is listed in the clients ignore list\n"
|
||||
"or the filename contains characters that are not syncable\nin a cross platform "
|
||||
"environment.");
|
||||
} else if( item._type == SyncFileItem::Directory ){
|
||||
errMsg = tr("Directory ignored.");
|
||||
tooltip = tr("The directory was ignored because it is listed in the clients\nignore list "
|
||||
"or the directory name contains\ncharacters that are not syncable in a cross "
|
||||
"platform environment.");
|
||||
} else if( item._type == SyncFileItem::SoftLink ) {
|
||||
errMsg = tr("Soft Link ignored.");
|
||||
tooltip = tr("Softlinks break the semantics of synchronization.\nPlease do not "
|
||||
"use them in synced directories.");
|
||||
} else {
|
||||
errMsg = tr("Ignored.");
|
||||
}
|
||||
} else if( item._instruction == CSYNC_INSTRUCTION_CONFLICT ) {
|
||||
errMsg = tr("Conflict file.");
|
||||
tooltip = tr("The file was changed on server and local repository and as a result it\n"
|
||||
"created a so called conflict. The local change is copied to the conflict\n"
|
||||
"file while the file from the server side is available under the original\n"
|
||||
"name");
|
||||
} else {
|
||||
errMsg = tr("Ignored.");
|
||||
Q_ASSERT(!"unhandled instruction.");
|
||||
}
|
||||
columns << errMsg;
|
||||
|
||||
QTreeWidgetItem *twitem = new QTreeWidgetItem(columns);
|
||||
twitem->setData(0, ErrorIndicatorRole, QVariant(true) );
|
||||
twitem->setToolTip(0, longTimeStr);
|
||||
twitem->setToolTip(3, tooltip);
|
||||
twitem->setIcon(0, Theme::instance()->syncStateIcon(SyncResult::Problem, true));
|
||||
_ui->_treeWidget->addTopLevelItem(twitem);
|
||||
_ui->_treeWidget->insertTopLevelItem(0, twitem);
|
||||
|
||||
}
|
||||
}
|
||||
@@ -181,28 +203,22 @@ void ItemProgressDialog::copyToClipboard()
|
||||
|
||||
int topLevelItems = _ui->_treeWidget->topLevelItemCount();
|
||||
for (int i = 0; i < topLevelItems; i++) {
|
||||
QTreeWidgetItem *item = _ui->_treeWidget->topLevelItem(i);
|
||||
ts << left << qSetFieldWidth(0)
|
||||
<< item->data(0, Qt::DisplayRole).toString()
|
||||
<< endl;
|
||||
int childItems = item->childCount();
|
||||
for (int j = 0; j < childItems; j++) {
|
||||
QTreeWidgetItem *child =item->child(j);
|
||||
// time stamp
|
||||
ts << left << qSetFieldWidth(10)
|
||||
<< child->data(0,Qt::DisplayRole).toString()
|
||||
// file name
|
||||
<< qSetFieldWidth(50)
|
||||
<< child->data(1,Qt::DisplayRole).toString()
|
||||
// action
|
||||
<< qSetFieldWidth(15)
|
||||
<< child->data(2, Qt::DisplayRole).toString()
|
||||
// size
|
||||
<< qSetFieldWidth(10)
|
||||
<< child->data(3, Qt::DisplayRole).toString()
|
||||
<< qSetFieldWidth(0)
|
||||
<< endl;
|
||||
}
|
||||
QTreeWidgetItem *child = _ui->_treeWidget->topLevelItem(i);
|
||||
// time stamp
|
||||
ts << left << qSetFieldWidth(10)
|
||||
<< child->data(0,Qt::DisplayRole).toString()
|
||||
// file name
|
||||
<< qSetFieldWidth(64)
|
||||
<< child->data(1,Qt::DisplayRole).toString()
|
||||
<< qSetFieldWidth(0) << ' '
|
||||
// action
|
||||
<< qSetFieldWidth(15)
|
||||
<< child->data(3, Qt::DisplayRole).toString()
|
||||
// size
|
||||
<< qSetFieldWidth(10)
|
||||
<< child->data(4, Qt::DisplayRole).toString()
|
||||
<< qSetFieldWidth(0)
|
||||
<< endl;
|
||||
}
|
||||
|
||||
QApplication::clipboard()->setText(text);
|
||||
@@ -272,7 +288,7 @@ void ItemProgressDialog::slotProgressErrors( const QString& folder, const Progre
|
||||
// by error_code. A quota problem is considered an error, others might not??
|
||||
item->setIcon(0, Theme::instance()->syncStateIcon(SyncResult::Error, true));
|
||||
item->setToolTip(0, longTimeStr);
|
||||
_ui->_treeWidget->addTopLevelItem(item);
|
||||
_ui->_treeWidget->insertTopLevelItem(0, item);
|
||||
Q_UNUSED(item);
|
||||
}
|
||||
|
||||
@@ -303,7 +319,7 @@ void ItemProgressDialog::slotProgressInfo( const QString& folder, const Progress
|
||||
|
||||
QTreeWidgetItem *item = new QTreeWidgetItem(columns);
|
||||
item->setToolTip(0, longTimeStr);
|
||||
_ui->_treeWidget->addTopLevelItem(item);
|
||||
_ui->_treeWidget->insertTopLevelItem(0, item);
|
||||
Q_UNUSED(item);
|
||||
}
|
||||
|
||||
|
||||
@@ -39,9 +39,6 @@
|
||||
<property name="uniformRowHeights">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="sortingEnabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
<property name="columnCount">
|
||||
<number>4</number>
|
||||
</property>
|
||||
|
||||
@@ -128,11 +128,15 @@ LogBrowser::LogBrowser(QWidget *parent) :
|
||||
|
||||
LogBrowser::~LogBrowser()
|
||||
{
|
||||
MirallConfigFile cfg;
|
||||
cfg.saveGeometry(this);
|
||||
}
|
||||
|
||||
void LogBrowser::slotNewLog( const QString& msg )
|
||||
{
|
||||
_logWidget->appendPlainText( msg );
|
||||
if( _logWidget->isVisible() ) {
|
||||
_logWidget->appendPlainText( msg );
|
||||
}
|
||||
|
||||
if( _logstream ) {
|
||||
(*_logstream) << msg << endl;
|
||||
@@ -225,11 +229,4 @@ void LogBrowser::slotClearLog()
|
||||
_logWidget->clear();
|
||||
}
|
||||
|
||||
void LogBrowser::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
MirallConfigFile cfg;
|
||||
cfg.saveGeometry(this);
|
||||
QWidget::closeEvent(event);
|
||||
}
|
||||
|
||||
} // namespace
|
||||
|
||||
@@ -47,9 +47,6 @@ public:
|
||||
|
||||
void setLogFile(const QString& , bool );
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event);
|
||||
|
||||
protected slots:
|
||||
void slotNewLog( const QString &msg );
|
||||
void slotFind();
|
||||
|
||||
@@ -193,7 +193,7 @@ QString MirallConfigFile::excludeFile(Scope scope) const
|
||||
fi.setFile( QApplication::applicationDirPath(), exclFile );
|
||||
#endif
|
||||
#ifdef Q_OS_UNIX
|
||||
fi.setFile( QString("/etc/%1").arg(Theme::instance()->appName()), exclFile );
|
||||
fi.setFile( QString( SYSCONFDIR "/%1").arg(Theme::instance()->appName()), exclFile );
|
||||
#endif
|
||||
#ifdef Q_OS_MAC
|
||||
// exec path is inside the bundle
|
||||
@@ -595,7 +595,7 @@ QString MirallConfigFile::proxyPassword() const
|
||||
|
||||
int MirallConfigFile::useUploadLimit() const
|
||||
{
|
||||
return getValue(useUploadLimitC, QString::null, -1).toInt();
|
||||
return getValue(useUploadLimitC, QString::null, 0).toInt();
|
||||
}
|
||||
|
||||
bool MirallConfigFile::useDownloadLimit() const
|
||||
|
||||
@@ -113,7 +113,7 @@ void NetworkSettings::loadBWLimitSettings()
|
||||
if ( uploadLimit >= 1 ) {
|
||||
_ui->uploadLimitRadioButton->setChecked(true);
|
||||
} else if (uploadLimit == 0){
|
||||
_ui->noDownloadLimitRadioButton->setChecked(true);
|
||||
_ui->noUploadLimitRadioButton->setChecked(true);
|
||||
} else {
|
||||
_ui->autoUploadLimitRadioButton->setChecked(true);
|
||||
}
|
||||
|
||||
@@ -229,7 +229,7 @@
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QRadioButton" name="noDownloadLimitRadioButton">
|
||||
<property name="text">
|
||||
<string>No Limit</string>
|
||||
<string>No limit</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
@@ -254,6 +254,12 @@
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QGroupBox" name="groupBox_2">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Preferred">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="title">
|
||||
<string>Upload Bandwidth</string>
|
||||
</property>
|
||||
@@ -261,7 +267,7 @@
|
||||
<item row="0" column="0" colspan="2">
|
||||
<widget class="QRadioButton" name="noUploadLimitRadioButton">
|
||||
<property name="text">
|
||||
<string>No Limit</string>
|
||||
<string>No limit</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -138,7 +138,10 @@ QNetworkReply* ownCloudInfo::mkdirRequest( const QString& dir )
|
||||
qDebug() << "OCInfo Making dir " << dir;
|
||||
_authAttempts = 0;
|
||||
QNetworkRequest req;
|
||||
req.setUrl( QUrl( webdavUrl(_connection) + dir ) );
|
||||
QUrl url = QUrl(webdavUrl(_connection));
|
||||
url.setEncodedPath(url.encodedPath()+QUrl::toPercentEncoding(dir, "/"));
|
||||
|
||||
req.setUrl( url );
|
||||
QNetworkReply *reply = davRequest("MKCOL", req, 0);
|
||||
|
||||
// remember the confighandle used for this request
|
||||
|
||||
@@ -47,8 +47,11 @@ OwncloudSetupWizard::OwncloudSetupWizard(QObject* parent) :
|
||||
this, SLOT(slotConnectToOCUrl( const QString& )));
|
||||
connect( _ocWizard, SIGNAL(createLocalAndRemoteFolders(QString, QString)),
|
||||
this, SLOT(slotCreateLocalAndRemoteFolders(QString, QString)));
|
||||
connect( _ocWizard, SIGNAL(finished(int)),this,SLOT(slotAssistantFinished(int)));
|
||||
|
||||
/* basicSetupFinished might be called from a reply from the network.
|
||||
slotAssistantFinished might destroy the temporary QNetworkAccessManager.
|
||||
Therefore Qt::QueuedConnection is required */
|
||||
connect( _ocWizard, SIGNAL(basicSetupFinished(int)),
|
||||
this, SLOT(slotAssistantFinished(int)), Qt::QueuedConnection);
|
||||
connect( _ocWizard, SIGNAL(clearPendingRequests()),
|
||||
this, SLOT(slotClearPendingRequests()));
|
||||
}
|
||||
|
||||
@@ -33,15 +33,6 @@ ownCloudTheme::ownCloudTheme()
|
||||
// qDebug() << " ** running ownCloud theme!";
|
||||
}
|
||||
|
||||
QString ownCloudTheme::appName() const
|
||||
{
|
||||
/* If this is changed, existing configs are not found any more
|
||||
* because the value is used by QDesktopServices to find the config
|
||||
* file. Be aware.
|
||||
*/
|
||||
return QLatin1String("ownCloud");
|
||||
}
|
||||
|
||||
QString ownCloudTheme::configFileName() const
|
||||
{
|
||||
return QLatin1String("owncloud.cfg");
|
||||
|
||||
@@ -25,7 +25,6 @@ class ownCloudTheme : public Theme
|
||||
public:
|
||||
ownCloudTheme();
|
||||
|
||||
virtual QString appName() const;
|
||||
QString configFileName() const;
|
||||
QString about() const;
|
||||
QPixmap splashScreen() const;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
#include <QObject>
|
||||
#include <QMetaType>
|
||||
#include <QDebug>
|
||||
|
||||
#include <QCoreApplication>
|
||||
|
||||
namespace Mirall {
|
||||
|
||||
@@ -28,35 +28,35 @@ QString Progress::asResultString( Kind kind )
|
||||
switch(kind) {
|
||||
case Download:
|
||||
case EndDownload:
|
||||
re = QObject::tr("Download");
|
||||
re = QCoreApplication::translate( "progress", "Download");
|
||||
break;
|
||||
case Upload:
|
||||
re = QObject::tr("Upload");
|
||||
re = QCoreApplication::translate( "progress", "Upload");
|
||||
break;
|
||||
case Context:
|
||||
re = QObject::tr("Context");
|
||||
re = QCoreApplication::translate( "progress", "Context" );
|
||||
break;
|
||||
case Inactive:
|
||||
re = QObject::tr("Inactive");
|
||||
re = QCoreApplication::translate( "progress", "Inactive");
|
||||
break;
|
||||
case StartDownload:
|
||||
re = QObject::tr("Download");
|
||||
re = QCoreApplication::translate( "progress", "Download");
|
||||
break;
|
||||
case StartUpload:
|
||||
case EndUpload:
|
||||
re = QObject::tr("Upload");
|
||||
re = QCoreApplication::translate( "progress", "Upload");
|
||||
break;
|
||||
case StartSync:
|
||||
re = QObject::tr("Start");
|
||||
re = QCoreApplication::translate( "progress", "Start");
|
||||
break;
|
||||
case EndSync:
|
||||
re = QObject::tr("Finished");
|
||||
re = QCoreApplication::translate( "progress", "Finished");
|
||||
break;
|
||||
case StartDelete:
|
||||
re = QObject::tr("For deletion");
|
||||
re = QCoreApplication::translate( "progress", "For deletion");
|
||||
break;
|
||||
case EndDelete:
|
||||
re = QObject::tr("deleted");
|
||||
re = QCoreApplication::translate( "progress", "deleted");
|
||||
break;
|
||||
default:
|
||||
Q_ASSERT(false);
|
||||
@@ -71,40 +71,40 @@ QString Progress::asActionString( Kind kind )
|
||||
|
||||
switch(kind) {
|
||||
case Download:
|
||||
re = QObject::tr("downloading");
|
||||
re = QCoreApplication::translate( "progress", "downloading");
|
||||
break;
|
||||
case Upload:
|
||||
re = QObject::tr("uploading");
|
||||
re = QCoreApplication::translate( "progress", "uploading");
|
||||
break;
|
||||
case Context:
|
||||
re = QObject::tr("Context");
|
||||
re = QCoreApplication::translate( "progress", "Context");
|
||||
break;
|
||||
case Inactive:
|
||||
re = QObject::tr("inactive");
|
||||
re = QCoreApplication::translate( "progress", "inactive");
|
||||
break;
|
||||
case StartDownload:
|
||||
re = QObject::tr("downloading");
|
||||
re = QCoreApplication::translate( "progress", "downloading");
|
||||
break;
|
||||
case StartUpload:
|
||||
re = QObject::tr("uploading");
|
||||
re = QCoreApplication::translate( "progress", "uploading");
|
||||
break;
|
||||
case EndDownload:
|
||||
re = QObject::tr("downloading");
|
||||
re = QCoreApplication::translate( "progress", "downloading");
|
||||
break;
|
||||
case EndUpload:
|
||||
re = QObject::tr("uploading");
|
||||
re = QCoreApplication::translate( "progress", "uploading");
|
||||
break;
|
||||
case StartSync:
|
||||
re = QObject::tr("starting");
|
||||
re = QCoreApplication::translate( "progress", "starting");
|
||||
break;
|
||||
case EndSync:
|
||||
re = QObject::tr("finished");
|
||||
re = QCoreApplication::translate( "progress", "finished");
|
||||
break;
|
||||
case StartDelete:
|
||||
re = QObject::tr("delete");
|
||||
re = QCoreApplication::translate( "progress", "delete");
|
||||
break;
|
||||
case EndDelete:
|
||||
re = QObject::tr("deleted");
|
||||
re = QCoreApplication::translate( "progress", "deleted");
|
||||
break;
|
||||
default:
|
||||
Q_ASSERT(false);
|
||||
@@ -121,7 +121,7 @@ ProgressDispatcher* ProgressDispatcher::instance() {
|
||||
|
||||
ProgressDispatcher::ProgressDispatcher(QObject *parent) :
|
||||
QObject(parent),
|
||||
_problemQueueSize(50)
|
||||
_QueueSize(50)
|
||||
{
|
||||
|
||||
}
|
||||
@@ -163,9 +163,9 @@ void ProgressDispatcher::setProgressInfo(const QString& folder, const Progress::
|
||||
err.error_code = newProgress.current_file_bytes;
|
||||
err.timestamp = QDateTime::currentDateTime();
|
||||
|
||||
_recentProblems.enqueue( err );
|
||||
if( _recentProblems.size() > _problemQueueSize ) {
|
||||
_recentProblems.dequeue();
|
||||
_recentProblems.prepend( err );
|
||||
if( _recentProblems.size() > _QueueSize ) {
|
||||
_recentProblems.removeLast();
|
||||
}
|
||||
emit progressSyncProblem( folder, err );
|
||||
} else {
|
||||
@@ -180,7 +180,10 @@ void ProgressDispatcher::setProgressInfo(const QString& folder, const Progress::
|
||||
if( newProgress.kind == Progress::EndDownload ||
|
||||
newProgress.kind == Progress::EndUpload ||
|
||||
newProgress.kind == Progress::EndDelete ) {
|
||||
_recentChanges.enqueue(newProgress);
|
||||
_recentChanges.prepend(newProgress);
|
||||
if( _recentChanges.size() > _QueueSize ) {
|
||||
_recentChanges.removeLast();
|
||||
}
|
||||
}
|
||||
// store the last real action to help clients that start during
|
||||
// the Context-phase of an upload or download.
|
||||
|
||||
@@ -25,9 +25,8 @@ namespace Mirall {
|
||||
/**
|
||||
* @brief The FolderScheduler class schedules folders for sync
|
||||
*/
|
||||
class Progress
|
||||
namespace Progress
|
||||
{
|
||||
public:
|
||||
typedef enum {
|
||||
Invalid,
|
||||
StartSync,
|
||||
@@ -69,9 +68,9 @@ public:
|
||||
QDateTime timestamp;
|
||||
} SyncProblem;
|
||||
|
||||
static QString asActionString( Kind );
|
||||
static QString asResultString( Kind );
|
||||
};
|
||||
QString asActionString( Kind );
|
||||
QString asResultString( Kind );
|
||||
}
|
||||
|
||||
/**
|
||||
* @file progressdispatcher.h
|
||||
@@ -112,9 +111,9 @@ protected:
|
||||
|
||||
private:
|
||||
ProgressDispatcher(QObject* parent = 0);
|
||||
const int _problemQueueSize;
|
||||
QQueue<Progress::Info> _recentChanges;
|
||||
QQueue<Progress::SyncProblem> _recentProblems;
|
||||
const int _QueueSize;
|
||||
QList<Progress::Info> _recentChanges;
|
||||
QList<Progress::SyncProblem> _recentProblems;
|
||||
|
||||
QHash<QString, Progress::Kind> _currentAction;
|
||||
static ProgressDispatcher* _instance;
|
||||
|
||||
@@ -48,6 +48,10 @@ SettingsDialog::SettingsDialog(Application *app, QWidget *parent) :
|
||||
|
||||
setWindowTitle(tr("%1").arg(Theme::instance()->appNameGUI()));
|
||||
|
||||
_accountSettings = new AccountSettings(this);
|
||||
addAccount(tr("Account"), _accountSettings);
|
||||
slotUpdateAccountState();
|
||||
|
||||
QIcon generalIcon(QLatin1String(":/mirall/resources/settings.png"));
|
||||
QListWidgetItem *general = new QListWidgetItem(generalIcon, tr("General"), _ui->labelWidget);
|
||||
general->setSizeHint(QSize(0, 32));
|
||||
@@ -62,14 +66,9 @@ SettingsDialog::SettingsDialog(Application *app, QWidget *parent) :
|
||||
NetworkSettings *networkSettings = new NetworkSettings;
|
||||
_ui->stack->addWidget(networkSettings);
|
||||
connect(networkSettings, SIGNAL(proxySettingsChanged()), app, SLOT(slotSetupProxy()));
|
||||
connect(networkSettings, SIGNAL(proxySettingsChanged()), FolderMan::instance(), SLOT(slotScheduleAllFolders()));
|
||||
|
||||
//connect(generalSettings, SIGNAL(resizeToSizeHint()), SLOT(resizeToSizeHint()));
|
||||
|
||||
_accountSettings = new AccountSettings(this);
|
||||
addAccount(tr("Account"), _accountSettings);
|
||||
slotUpdateAccountState();
|
||||
|
||||
connect( app, SIGNAL(folderStateChanged(Folder*)), _accountSettings, SLOT(slotUpdateFolderState(Folder*)));
|
||||
connect( app, SIGNAL(folderStateChanged(Folder*)), SLOT(slotUpdateAccountState()));
|
||||
|
||||
@@ -83,7 +82,7 @@ SettingsDialog::SettingsDialog(Application *app, QWidget *parent) :
|
||||
connect( ProgressDispatcher::instance(), SIGNAL(progressSyncProblem(QString,Progress::SyncProblem)),
|
||||
_accountSettings, SLOT(slotProgressProblem(QString,Progress::SyncProblem)) );
|
||||
|
||||
_ui->labelWidget->setCurrentRow(_ui->labelWidget->row(general));
|
||||
_ui->labelWidget->setCurrentRow(_ui->labelWidget->row(_accountItem));
|
||||
|
||||
connect(_ui->labelWidget, SIGNAL(currentRowChanged(int)),
|
||||
_ui->stack, SLOT(setCurrentIndex(int)));
|
||||
@@ -102,6 +101,9 @@ SettingsDialog::SettingsDialog(Application *app, QWidget *parent) :
|
||||
|
||||
SettingsDialog::~SettingsDialog()
|
||||
{
|
||||
MirallConfigFile cfg;
|
||||
cfg.saveGeometry(this);
|
||||
|
||||
delete _ui;
|
||||
}
|
||||
|
||||
@@ -114,13 +116,6 @@ void SettingsDialog::addAccount(const QString &title, QWidget *widget)
|
||||
|
||||
}
|
||||
|
||||
void SettingsDialog::closeEvent(QCloseEvent *event)
|
||||
{
|
||||
MirallConfigFile cfg;
|
||||
cfg.saveGeometry(this);
|
||||
QWidget::closeEvent(event);
|
||||
}
|
||||
|
||||
void SettingsDialog::slotUpdateAccountState()
|
||||
{
|
||||
FolderMan *folderMan = FolderMan::instance();
|
||||
|
||||
@@ -41,9 +41,6 @@ public:
|
||||
|
||||
void addAccount(const QString &title, QWidget *widget);
|
||||
|
||||
protected:
|
||||
void closeEvent(QCloseEvent *event);
|
||||
|
||||
protected slots:
|
||||
void slotUpdateAccountState();
|
||||
|
||||
|
||||
@@ -6,15 +6,24 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>704</width>
|
||||
<height>299</height>
|
||||
<width>693</width>
|
||||
<height>457</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>Settings</string>
|
||||
</property>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<property name="margin">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="topMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="bottomMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="spacing">
|
||||
|
||||
@@ -45,35 +45,45 @@ QString Theme::statusHeaderText( SyncResult::Status status ) const
|
||||
|
||||
switch( status ) {
|
||||
case SyncResult::Undefined:
|
||||
resultStr = QObject::tr("Status undefined");
|
||||
resultStr = QCoreApplication::translate("theme", "Status undefined");
|
||||
break;
|
||||
case SyncResult::NotYetStarted:
|
||||
resultStr = QObject::tr("Waiting to start sync");
|
||||
resultStr = QCoreApplication::translate("theme", "Waiting to start sync");
|
||||
break;
|
||||
case SyncResult::SyncRunning:
|
||||
resultStr = QObject::tr("Sync is running");
|
||||
resultStr = QCoreApplication::translate("theme", "Sync is running");
|
||||
break;
|
||||
case SyncResult::Success:
|
||||
resultStr = QObject::tr("Sync Success");
|
||||
resultStr = QCoreApplication::translate("theme", "Sync Success");
|
||||
break;
|
||||
case SyncResult::Problem:
|
||||
resultStr = QObject::tr("Sync Success, problems with individual files.");
|
||||
resultStr = QCoreApplication::translate("theme", "Sync Success, problems with individual files.");
|
||||
break;
|
||||
case SyncResult::Error:
|
||||
resultStr = QObject::tr("Sync Error - Click info button for details.");
|
||||
resultStr = QCoreApplication::translate("theme", "Sync Error - Click info button for details.");
|
||||
break;
|
||||
case SyncResult::SetupError:
|
||||
resultStr = QObject::tr( "Setup Error" );
|
||||
resultStr = QCoreApplication::translate("theme", "Setup Error" );
|
||||
break;
|
||||
default:
|
||||
resultStr = QObject::tr("Status undefined");
|
||||
case SyncResult::Unavailable:
|
||||
resultStr = QCoreApplication::translate("theme", "The server is currently unavailable" );
|
||||
break;
|
||||
case SyncResult::SyncPrepare:
|
||||
resultStr = QCoreApplication::translate("theme", "Preparing to sync" );
|
||||
break;
|
||||
|
||||
}
|
||||
return resultStr;
|
||||
}
|
||||
|
||||
QString Theme::appNameGUI() const
|
||||
{
|
||||
return appName();
|
||||
return QLatin1String(APPLICATION_NAME);
|
||||
}
|
||||
|
||||
QString Theme::appName() const
|
||||
{
|
||||
return QLatin1String(APPLICATION_SHORTNAME);
|
||||
}
|
||||
|
||||
QString Theme::version() const
|
||||
|
||||
@@ -48,7 +48,8 @@ public:
|
||||
* Use and redefine this if the human readable name contains spaces,
|
||||
* special chars and such.
|
||||
*
|
||||
* By default, appName() is returned.
|
||||
* By default, the name is derived from the APPLICATION_NAME
|
||||
* cmake variable.
|
||||
*
|
||||
* @return QString with human readable app name.
|
||||
*/
|
||||
@@ -61,9 +62,16 @@ public:
|
||||
* it is used for config files etc. If you need a more sophisticated
|
||||
* name in the GUI, redefine appNameGUI.
|
||||
*
|
||||
* By default, the name is derived from the APPLICATION_SHORTNAME
|
||||
* cmake variable, and should be the same. This method is only
|
||||
* reimplementable for legacy reasons.
|
||||
*
|
||||
* Warning: Do not modify this value, as many things, e.g. settings
|
||||
* depend on it! You most likely want to modify \ref appNameGUI().
|
||||
*
|
||||
* @return QString with app name.
|
||||
*/
|
||||
virtual QString appName() const = 0;
|
||||
virtual QString appName() const;
|
||||
|
||||
/**
|
||||
* @brief configFileName
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
|
||||
#include <QCoreApplication>
|
||||
#include <QSettings>
|
||||
#include <QTextStream>
|
||||
#include <QDir>
|
||||
#include <QFile>
|
||||
#include <QUrl>
|
||||
@@ -286,16 +287,24 @@ void Utility::setLaunchOnStartup(const QString &appName, const QString& guiName,
|
||||
qDebug() << "Could not create autostart directory";
|
||||
return;
|
||||
}
|
||||
QSettings desktopFile(desktopFileLocation, QSettings::IniFormat);
|
||||
desktopFile.beginGroup("Desktop Entry");
|
||||
desktopFile.setValue(QLatin1String("Name"), guiName);
|
||||
desktopFile.setValue(QLatin1String("GenericName"), QLatin1String("File Synchronizer"));
|
||||
desktopFile.setValue(QLatin1String("Exec"), QCoreApplication::applicationFilePath());
|
||||
desktopFile.setValue(QLatin1String("Terminal"), false);
|
||||
desktopFile.setValue(QLatin1String("Icon"), appName);
|
||||
desktopFile.setValue(QLatin1String("Categories"), QLatin1String("Network"));
|
||||
desktopFile.setValue(QLatin1String("StartupNotify"), false);
|
||||
desktopFile.endGroup();
|
||||
QFile iniFile(desktopFileLocation);
|
||||
if (!iniFile.open(QIODevice::WriteOnly)) {
|
||||
qDebug() << "Could not write auto start entry" << desktopFileLocation;
|
||||
return;
|
||||
}
|
||||
QTextStream ts(&iniFile);
|
||||
ts.setCodec("UTF-8");
|
||||
ts << QLatin1String("[Desktop Entry]") << endl
|
||||
<< QLatin1String("Name=") << guiName << endl
|
||||
<< QLatin1String("GenericName=") << QLatin1String("File Synchronizer") << endl
|
||||
<< QLatin1String("Exec=") << QCoreApplication::applicationFilePath() << endl
|
||||
<< QLatin1String("Terminal=") << "false" << endl
|
||||
<< QLatin1String("Icon=") << appName << endl
|
||||
<< QLatin1String("Categories=") << QLatin1String("Network") << endl
|
||||
<< QLatin1String("Type=") << QLatin1String("Application") << endl
|
||||
<< QLatin1String("StartupNotify=") << "false" << endl
|
||||
<< QLatin1String("X-GNOME-Autostart-enabled=") << "true" << endl
|
||||
;
|
||||
} else {
|
||||
if (!QFile::remove(desktopFileLocation)) {
|
||||
qDebug() << "Could not remove autostart desktop file";
|
||||
|
||||
@@ -54,6 +54,7 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage()
|
||||
setupCustomization();
|
||||
|
||||
connect( _ui.pbSelectLocalFolder, SIGNAL(clicked()), SLOT(slotSelectFolder()));
|
||||
setButtonText(QWizard::NextButton, tr("Connect..."));
|
||||
}
|
||||
|
||||
void OwncloudAdvancedSetupPage::setupCustomization()
|
||||
|
||||
@@ -46,11 +46,13 @@ OwncloudWizard::OwncloudWizard(QWidget *parent)
|
||||
_setupLog(),
|
||||
_configExists(false)
|
||||
{
|
||||
setPage(WizardCommon::Page_ServerSetup, _setupPage );
|
||||
setPage(WizardCommon::Page_ServerSetup, _setupPage);
|
||||
setPage(WizardCommon::Page_HttpCreds, _httpCredsPage);
|
||||
setPage(WizardCommon::Page_ShibbolethCreds, _shibbolethCredsPage);
|
||||
setPage(WizardCommon::Page_AdvancedSetup, _advancedSetupPage);
|
||||
setPage(WizardCommon::Page_Result, _resultPage );
|
||||
setPage(WizardCommon::Page_Result, _resultPage);
|
||||
|
||||
connect(this, SIGNAL(finished(int)), SIGNAL(basicSetupFinished(int)));
|
||||
|
||||
// note: start Id is set by the calling class depending on if the
|
||||
// welcome text is to be shown or not.
|
||||
@@ -145,12 +147,13 @@ void OwncloudWizard::slotCurrentPageChanged( int id )
|
||||
qDebug() << "Current Wizard page changed to " << id;
|
||||
|
||||
if( id == WizardCommon::Page_ServerSetup ) {
|
||||
setButtonText( QWizard::NextButton, tr("Connect...") );
|
||||
emit clearPendingRequests();
|
||||
_setupPage->initializePage();
|
||||
}
|
||||
|
||||
if( id == WizardCommon::Page_Result ) {
|
||||
disconnect(this, SIGNAL(finished(int)), this, SIGNAL(basicSetupFinished(int)));
|
||||
emit basicSetupFinished(QDialog::Accepted);
|
||||
appendToConfigurationLog( QString::null );
|
||||
}
|
||||
}
|
||||
|
||||
@@ -69,6 +69,8 @@ signals:
|
||||
void determineAuthType(const QString&);
|
||||
void connectToOCUrl( const QString& );
|
||||
void createLocalAndRemoteFolders(const QString&, const QString&);
|
||||
// make sure to connect to this, rather than finished(int)!!
|
||||
void basicSetupFinished( int );
|
||||
|
||||
private:
|
||||
OwncloudSetupPage* _setupPage;
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
*.filepart
|
||||
*~
|
||||
*.bak
|
||||
*.part
|
||||
*.crdownload
|
||||
|
||||
@@ -17,10 +16,6 @@ csync_journal.db.ctmp
|
||||
desktop.ini
|
||||
|
||||
*.kate-swp
|
||||
*.aux
|
||||
*.nav
|
||||
*.out
|
||||
*.toc
|
||||
|
||||
*_conflict-*
|
||||
]*.~*
|
||||
|
||||
@@ -10,7 +10,7 @@ macro(owncloud_add_test test_class)
|
||||
add_executable(${OWNCLOUD_TEST_CLASS}Test test${OWNCLOUD_TEST_CLASS_LOWERCASE}.cpp ${${OWNCLOUD_TEST_CLASS}_MOCS})
|
||||
|
||||
target_link_libraries(${OWNCLOUD_TEST_CLASS}Test
|
||||
${APPLICATION_SHORTNAME}sync
|
||||
${APPLICATION_EXECUTABLE}sync
|
||||
${QT_QTTEST_LIBRARY}
|
||||
${QT_QTCORE_LIBRARY}
|
||||
)
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user