mirror of
https://github.com/chylex/Nextcloud-Desktop.git
synced 2026-04-25 03:12:24 +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 )
|
include ( ${CMAKE_SOURCE_DIR}/OWNCLOUD.cmake )
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if (NOT DEFINED APPLICATION_SHORTNAME)
|
||||||
|
set ( APPLICATION_SHORTNAME ${APPLICATION_NAME} )
|
||||||
|
endif()
|
||||||
|
|
||||||
include(${CMAKE_SOURCE_DIR}/VERSION.cmake)
|
include(${CMAKE_SOURCE_DIR}/VERSION.cmake)
|
||||||
configure_file( ${CMAKE_SOURCE_DIR}/src/mirall/version.h.in "${CMAKE_CURRENT_BINARY_DIR}/src/mirall/version.h" )
|
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_directories(BEFORE ${CMAKE_CURRENT_BINARY_DIR} "${CMAKE_CURRENT_BINARY_DIR}/src/mirall/")
|
||||||
|
|
||||||
include(GNUInstallDirs)
|
include(GNUInstallDirs)
|
||||||
|
include(DefineInstallationPaths)
|
||||||
include(GetGitRevisionDescription)
|
include(GetGitRevisionDescription)
|
||||||
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
get_git_head_revision(GIT_REFSPEC GIT_SHA1)
|
||||||
|
|
||||||
@@ -34,10 +38,8 @@ if (${GIT_SHA1} STREQUAL "GITDIR-NOTFOUND")
|
|||||||
endif()
|
endif()
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
## stupid, we should upstream this
|
set(SYSCONFDIR ${SYSCONF_INSTALL_DIR})
|
||||||
if("${CMAKE_INSTALL_PREFIX}" STREQUAL "/usr" AND NOT CMAKE_INSTALL_SYSCONFDIR)
|
set(DATADIR ${DATA_INSTALL_DIR})
|
||||||
set(CMAKE_INSTALL_SYSCONFDIR "/etc")
|
|
||||||
endif()
|
|
||||||
|
|
||||||
#####
|
#####
|
||||||
## handle BUILD_OWNCLOUD_OSX_BUNDLE
|
## 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)
|
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)
|
include(OwnCloudCPack.cmake)
|
||||||
|
|
||||||
add_definitions(-DUNICODE)
|
add_definitions(-DUNICODE)
|
||||||
@@ -123,5 +106,5 @@ endif(UNIT_TESTING)
|
|||||||
if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
if(BUILD_OWNCLOUD_OSX_BUNDLE)
|
||||||
configure_file(sync-exclude.lst ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/sync-exclude.lst COPYONLY)
|
configure_file(sync-exclude.lst ${OWNCLOUD_OSX_BUNDLE}/Contents/Resources/sync-exclude.lst COPYONLY)
|
||||||
else()
|
else()
|
||||||
install( FILES sync-exclude.lst DESTINATION ${CMAKE_INSTALL_SYSCONFDIR} )
|
install( FILES sync-exclude.lst DESTINATION ${SYSCONFDIR}/${APPLICATION_SHORTNAME} )
|
||||||
endif()
|
endif()
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
set( APPLICATION_SHORTNAME "owncloud" )
|
|
||||||
set( APPLICATION_NAME "ownCloud" )
|
set( APPLICATION_NAME "ownCloud" )
|
||||||
set( APPLICATION_EXECUTABLE "owncloud" )
|
#set( APPLICATION_SHORTNAME ${APPLICATION_NAME} )
|
||||||
set( APPLICATION_DOMAIN "owncloud.com" )
|
set( APPLICATION_EXECUTABLE "owncloud" )
|
||||||
set( APPLICATION_VENDOR "ownCloud, Inc" )
|
set( APPLICATION_DOMAIN "owncloud.com" )
|
||||||
set( THEME_CLASS "ownCloudTheme" )
|
set( APPLICATION_VENDOR "ownCloud, Inc" )
|
||||||
|
set( THEME_CLASS "ownCloudTheme" )
|
||||||
set( APPLICATION_REV_DOMAIN "com.owncloud.desktopclient" )
|
set( APPLICATION_REV_DOMAIN "com.owncloud.desktopclient" )
|
||||||
set( WIN_SETUP_BITMAP_PATH "${CMAKE_SOURCE_DIR}/admin/win/nsi" )
|
set( WIN_SETUP_BITMAP_PATH "${CMAKE_SOURCE_DIR}/admin/win/nsi" )
|
||||||
# set( THEME_INCLUDE "${OEM_THEME_DIR}/mytheme.h" )
|
# set( THEME_INCLUDE "${OEM_THEME_DIR}/mytheme.h" )
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
set( VERSION_MAJOR 1 )
|
set( VERSION_MAJOR 1 )
|
||||||
set( VERSION_MINOR 4 )
|
set( VERSION_MINOR 4 )
|
||||||
set( VERSION_PATCH 0 )
|
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 )
|
set( SOVERSION 0 )
|
||||||
|
|
||||||
|
|||||||
@@ -10,8 +10,7 @@ mount="/Volumes/$(basename $src_dmg|cut -d"-" -f1)"
|
|||||||
|
|
||||||
test -e $tmp_dmg && rm -rf $tmp_dmg
|
test -e $tmp_dmg && rm -rf $tmp_dmg
|
||||||
hdiutil convert $src_dmg -format UDRW -o $tmp_dmg
|
hdiutil convert $src_dmg -format UDRW -o $tmp_dmg
|
||||||
open $tmp_dmg
|
hdiutil attach $tmp_dmg
|
||||||
sleep 12s
|
|
||||||
pushd $mount
|
pushd $mount
|
||||||
codesign -s "$identity" $mount/*.app
|
codesign -s "$identity" $mount/*.app
|
||||||
popd
|
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.
|
;ownCloud installer script.
|
||||||
|
|
||||||
!define APPLICATION_SHORTNAME "@APPLICATION_SHORTNAME@"
|
!define APPLICATION_SHORTNAME "@APPLICATION_EXECUTABLE@"
|
||||||
!define APPLICATION_NAME "@APPLICATION_NAME@"
|
!define APPLICATION_NAME "@APPLICATION_NAME@"
|
||||||
!define APPLICATION_VENDOR "@APPLICATION_VENDOR@"
|
!define APPLICATION_VENDOR "@APPLICATION_VENDOR@"
|
||||||
!define APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@.exe"
|
!define APPLICATION_EXECUTABLE "@APPLICATION_EXECUTABLE@.exe"
|
||||||
|
|||||||
@@ -8,4 +8,10 @@
|
|||||||
#cmakedefine APPLICATION_DOMAIN @APPLICATION_DOMAIN@
|
#cmakedefine APPLICATION_DOMAIN @APPLICATION_DOMAIN@
|
||||||
#cmakedefine THEME_CLASS @THEME_CLASS@
|
#cmakedefine THEME_CLASS @THEME_CLASS@
|
||||||
#cmakedefine THEME_INCLUDE @THEME_INCLUDE@
|
#cmakedefine THEME_INCLUDE @THEME_INCLUDE@
|
||||||
|
|
||||||
|
#cmakedefine APPLICATION_NAME "@APPLICATION_NAME@"
|
||||||
|
#cmakedefine APPLICATION_SHORTNAME "@APPLICATION_SHORTNAME@"
|
||||||
|
|
||||||
|
#cmakedefine SYSCONFDIR "@SYSCONFDIR@"
|
||||||
|
#cmakedefine DATADIR "@DATADIR@"
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -4,5 +4,5 @@ Type=Application
|
|||||||
Exec=@APPLICATION_EXECUTABLE@
|
Exec=@APPLICATION_EXECUTABLE@
|
||||||
Name=@APPLICATION_NAME@ desktop sync client
|
Name=@APPLICATION_NAME@ desktop sync client
|
||||||
GenericName=Folder Sync
|
GenericName=Folder Sync
|
||||||
Icon=@APPLICATION_SHORTNAME@
|
Icon=@APPLICATION_EXECUTABLE@
|
||||||
Keywords=@APPLICATION_NAME@;syncing;file;sharing
|
Keywords=@APPLICATION_NAME@;syncing;file;sharing
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ else()
|
|||||||
set(theme_dir ${CMAKE_CURRENT_SOURCE_DIR}/../theme)
|
set(theme_dir ${CMAKE_CURRENT_SOURCE_DIR}/../theme)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(synclib_NAME ${APPLICATION_SHORTNAME}sync)
|
set(synclib_NAME ${APPLICATION_EXECUTABLE}sync)
|
||||||
|
|
||||||
set(mirall_UI
|
set(mirall_UI
|
||||||
mirall/folderwizardsourcepage.ui
|
mirall/folderwizardsourcepage.ui
|
||||||
@@ -168,8 +168,8 @@ if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
|
|||||||
)
|
)
|
||||||
if(NOT WIN32)
|
if(NOT WIN32)
|
||||||
configure_file(${CMAKE_SOURCE_DIR}/mirall.desktop.in
|
configure_file(${CMAKE_SOURCE_DIR}/mirall.desktop.in
|
||||||
${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_SHORTNAME}.desktop)
|
${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop)
|
||||||
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_SHORTNAME}.desktop DESTINATION share/applications )
|
install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${APPLICATION_EXECUTABLE}.desktop DESTINATION share/applications )
|
||||||
endif()
|
endif()
|
||||||
else()
|
else()
|
||||||
install(TARGETS ${synclib_NAME} DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
|
install(TARGETS ${synclib_NAME} DESTINATION ${OWNCLOUD_OSX_BUNDLE}/Contents/MacOS)
|
||||||
@@ -254,7 +254,7 @@ set( final_src
|
|||||||
include( AddAppIconMacro )
|
include( AddAppIconMacro )
|
||||||
set(ownCloud_old ${ownCloud})
|
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})
|
list(APPEND final_src ${ownCloud})
|
||||||
set(ownCloud ${ownCloud_old})
|
set(ownCloud ${ownCloud_old})
|
||||||
|
|
||||||
@@ -262,16 +262,15 @@ if(NOT BUILD_OWNCLOUD_OSX_BUNDLE)
|
|||||||
set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
set(BIN_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin")
|
||||||
|
|
||||||
if(NOT WIN32)
|
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} )
|
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} )
|
string( REPLACE ".png" "" _res ${_res} )
|
||||||
install( FILES ${_file} RENAME ${APPLICATION_SHORTNAME}.png DESTINATION
|
install( FILES ${_file} RENAME ${APPLICATION_EXECUTABLE}.png DESTINATION ${DATADIR}/icons/hicolor/${_res}x${_res}/apps )
|
||||||
${CMAKE_INSTALL_DATADIR}/icons/hicolor/${_res}x${_res}/apps )
|
|
||||||
endforeach( _file )
|
endforeach( _file )
|
||||||
endif(NOT WIN32)
|
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
|
# we may not add MACOSX_BUNDLE here, if not building one
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ int main(int argc, char **argv)
|
|||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
} else {
|
} else {
|
||||||
if (!QSystemTrayIcon::isSystemTrayAvailable()) {
|
if (!QSystemTrayIcon::isSystemTrayAvailable() && qgetenv("DESKTOP_SESSION") != "ubuntu") {
|
||||||
QMessageBox::critical(0, qApp->translate("main.cpp", "System Tray not available"),
|
QMessageBox::critical(0, qApp->translate("main.cpp", "System Tray not available"),
|
||||||
qApp->translate("main.cpp", "%1 requires on a working system tray. "
|
qApp->translate("main.cpp", "%1 requires on a working system tray. "
|
||||||
"If you are running XFCE, please follow "
|
"If you are running XFCE, please follow "
|
||||||
|
|||||||
@@ -38,6 +38,16 @@
|
|||||||
|
|
||||||
namespace Mirall {
|
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) :
|
AccountSettings::AccountSettings(QWidget *parent) :
|
||||||
QWidget(parent),
|
QWidget(parent),
|
||||||
ui(new Ui::AccountSettings),
|
ui(new Ui::AccountSettings),
|
||||||
@@ -48,6 +58,7 @@ AccountSettings::AccountSettings(QWidget *parent) :
|
|||||||
_model = new FolderStatusModel;
|
_model = new FolderStatusModel;
|
||||||
_model->setParent(this);
|
_model->setParent(this);
|
||||||
FolderStatusDelegate *delegate = new FolderStatusDelegate;
|
FolderStatusDelegate *delegate = new FolderStatusDelegate;
|
||||||
|
delegate->setParent(this);
|
||||||
|
|
||||||
ui->_folderList->setItemDelegate( delegate );
|
ui->_folderList->setItemDelegate( delegate );
|
||||||
ui->_folderList->setModel( _model );
|
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(clicked(QModelIndex)), SLOT(slotFolderActivated(QModelIndex)));
|
||||||
connect(ui->_folderList, SIGNAL(doubleClicked(QModelIndex)),SLOT(slotDoubleClicked(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();
|
ownCloudInfo *ocInfo = ownCloudInfo::instance();
|
||||||
slotUpdateQuota(ocInfo->lastQuotaTotalBytes(), ocInfo->lastQuotaUsedBytes());
|
slotUpdateQuota(ocInfo->lastQuotaTotalBytes(), ocInfo->lastQuotaUsedBytes());
|
||||||
connect(ocInfo, SIGNAL(quotaUpdated(qint64,qint64)), SLOT(slotUpdateQuota(qint64,qint64)));
|
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 res = f->syncResult();
|
||||||
SyncResult::Status status = res.status();
|
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();
|
Theme *theme = Theme::instance();
|
||||||
item->setData( theme->statusHeaderText( status ), Qt::ToolTipRole );
|
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( theme->statusHeaderText( status ), FolderStatusDelegate::FolderStatus );
|
||||||
item->setData( errors, FolderStatusDelegate::FolderErrorMsg );
|
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;
|
bool ongoing = false;
|
||||||
item->setData( QVariant(res.warnCount()), FolderStatusDelegate::WarningCount );
|
item->setData( QVariant(res.warnCount()), FolderStatusDelegate::WarningCount );
|
||||||
if( status == SyncResult::SyncRunning ) {
|
if( status == SyncResult::SyncRunning ) {
|
||||||
@@ -425,7 +448,9 @@ void AccountSettings::slotOCInfo( const QString& url, const QString& versionStr,
|
|||||||
qDebug() << "#-------# oC found on " << url;
|
qDebug() << "#-------# oC found on " << url;
|
||||||
/* enable the open button */
|
/* enable the open button */
|
||||||
ui->connectLabel->setOpenExternalLinks(true);
|
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->connectLabel->setToolTip( tr("Version: %1 (%2)").arg(versionStr).arg(version));
|
||||||
ui->_ButtonAdd->setEnabled(true);
|
ui->_ButtonAdd->setEnabled(true);
|
||||||
|
|
||||||
@@ -649,7 +674,9 @@ void AccountSettings::slotUpdateQuota(qint64 total, qint64 used)
|
|||||||
ui->quotaProgressBar->setEnabled(true);
|
ui->quotaProgressBar->setEnabled(true);
|
||||||
// workaround the label only accepting ints (which may be only 32 bit wide)
|
// workaround the label only accepting ints (which may be only 32 bit wide)
|
||||||
ui->quotaProgressBar->setMaximum(100);
|
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 usedStr = Utility::octetsToString(used);
|
||||||
QString totalStr = Utility::octetsToString(total);
|
QString totalStr = Utility::octetsToString(total);
|
||||||
ui->quotaLabel->setText(tr("%1 of %2 in use.").arg(usedStr, totalStr));
|
ui->quotaLabel->setText(tr("%1 of %2 in use.").arg(usedStr, totalStr));
|
||||||
|
|||||||
@@ -37,19 +37,6 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</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>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -16,6 +16,8 @@
|
|||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
#include "config.h"
|
||||||
|
|
||||||
#include "mirall/application.h"
|
#include "mirall/application.h"
|
||||||
#include "mirall/systray.h"
|
#include "mirall/systray.h"
|
||||||
#include "mirall/folder.h"
|
#include "mirall/folder.h"
|
||||||
@@ -81,8 +83,7 @@ static const char optionsC[] =
|
|||||||
QString applicationTrPath()
|
QString applicationTrPath()
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_LINUX
|
#ifdef Q_OS_LINUX
|
||||||
// FIXME - proper path!
|
return QString::fromLatin1(DATADIR"/i18n/");
|
||||||
return QString::fromLatin1("/usr/share/%1/i18n/").arg(Theme::instance()->appName());
|
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
return QApplication::applicationDirPath()+QLatin1String("/../Resources/Translations"); // path defaults to app dir.
|
return QApplication::applicationDirPath()+QLatin1String("/../Resources/Translations"); // path defaults to app dir.
|
||||||
@@ -183,6 +184,11 @@ Application::Application(int &argc, char **argv) :
|
|||||||
|
|
||||||
Application::~Application()
|
Application::~Application()
|
||||||
{
|
{
|
||||||
|
if (_settingsDialog) {
|
||||||
|
delete _settingsDialog.data();
|
||||||
|
}
|
||||||
|
|
||||||
|
delete _logBrowser;
|
||||||
delete _tray; // needed, see ctor
|
delete _tray; // needed, see ctor
|
||||||
|
|
||||||
qDebug() << "* Mirall shutdown";
|
qDebug() << "* Mirall shutdown";
|
||||||
@@ -408,7 +414,9 @@ void Application::setupContextMenu()
|
|||||||
_contextMenu->addMenu(_recentActionsMenu);
|
_contextMenu->addMenu(_recentActionsMenu);
|
||||||
_contextMenu->addSeparator();
|
_contextMenu->addSeparator();
|
||||||
_contextMenu->addAction(_actionSettings);
|
_contextMenu->addAction(_actionSettings);
|
||||||
_contextMenu->addAction(_actionHelp);
|
if (!_theme->helpUrl().isEmpty()) {
|
||||||
|
_contextMenu->addAction(_actionHelp);
|
||||||
|
}
|
||||||
_contextMenu->addSeparator();
|
_contextMenu->addSeparator();
|
||||||
|
|
||||||
_contextMenu->addAction(_actionQuit);
|
_contextMenu->addAction(_actionQuit);
|
||||||
@@ -511,6 +519,9 @@ void Application::slotSetupProxy()
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
FolderMan::instance()->setDirtyProxy(true);
|
||||||
|
FolderMan::instance()->slotScheduleAllFolders();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Application::slotRefreshQuotaDisplay( qint64 total, qint64 used )
|
void Application::slotRefreshQuotaDisplay( qint64 total, qint64 used )
|
||||||
@@ -552,9 +563,9 @@ void Application::rebuildRecentMenus()
|
|||||||
_recentActionsMenu->addAction(tr("No items synced recently"));
|
_recentActionsMenu->addAction(tr("No items synced recently"));
|
||||||
} else {
|
} else {
|
||||||
QListIterator<Progress::Info> i(progressInfoList);
|
QListIterator<Progress::Info> i(progressInfoList);
|
||||||
i.toBack();
|
|
||||||
while(i.hasPrevious()) {
|
while(i.hasNext()) {
|
||||||
Progress::Info info = i.previous();
|
Progress::Info info = i.next();
|
||||||
QString kindStr = Progress::asResultString(info.kind);
|
QString kindStr = Progress::asResultString(info.kind);
|
||||||
QString timeStr = info.timestamp.toString("hh:mm");
|
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.");
|
errStr = tr("A HTTP transmission error happened.");
|
||||||
break;
|
break;
|
||||||
case CSYNC_ERR_PERM:
|
case CSYNC_ERR_PERM:
|
||||||
errStr = tr("CSync failed due to not handled permission deniend.");
|
errStr = tr("CSync: Permission deniend.");
|
||||||
break;
|
break;
|
||||||
case CSYNC_ERR_NOT_FOUND:
|
case CSYNC_ERR_NOT_FOUND:
|
||||||
errStr = tr("CSync failed to find a specific file.");
|
errStr = tr("CSync: File not found.");
|
||||||
break;
|
break;
|
||||||
case CSYNC_ERR_EXISTS:
|
case CSYNC_ERR_EXISTS:
|
||||||
errStr = tr("CSync tried to create a directory that already exists.");
|
errStr = tr("CSync: Directory already exists.");
|
||||||
break;
|
break;
|
||||||
case CSYNC_ERR_NOSPC:
|
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;
|
break;
|
||||||
case CSYNC_ERR_UNSPEC:
|
case CSYNC_ERR_UNSPEC:
|
||||||
errStr = tr("CSync unspecified error.");
|
errStr = tr("CSync: unspecified error.");
|
||||||
|
|
||||||
default:
|
default:
|
||||||
errStr = tr("An internal error number %1 happend.").arg( (int) err );
|
errStr = tr("An internal error number %1 happend.").arg( (int) err );
|
||||||
|
|||||||
@@ -205,7 +205,7 @@ void Folder::setSyncEnabled( bool doit )
|
|||||||
_syncResult.clearErrors();
|
_syncResult.clearErrors();
|
||||||
evaluateSync( QStringList() );
|
evaluateSync( QStringList() );
|
||||||
} else {
|
} else {
|
||||||
// disable folder. Done through the _enabled-flag set above
|
_pollTimer.stop();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -283,9 +283,13 @@ void Folder::bubbleUpSyncResult()
|
|||||||
SyncFileItem firstItemDeleted;
|
SyncFileItem firstItemDeleted;
|
||||||
SyncFileItem firstItemUpdated;
|
SyncFileItem firstItemUpdated;
|
||||||
|
|
||||||
|
Logger *logger = Logger::instance();
|
||||||
|
|
||||||
foreach (const SyncFileItem &item, _syncResult.syncFileItemVector() ) {
|
foreach (const SyncFileItem &item, _syncResult.syncFileItemVector() ) {
|
||||||
if( item._instruction == CSYNC_INSTRUCTION_ERROR ) {
|
if( item._instruction == CSYNC_INSTRUCTION_ERROR ) {
|
||||||
slotCSyncError( tr("File %1: %2").arg(item._file).arg(item._errorString) );
|
slotCSyncError( tr("File %1: %2").arg(item._file).arg(item._errorString) );
|
||||||
|
logger->postGuiLog(tr("File %1").arg(item._file), item._errorString);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (item._dir == SyncFileItem::Down) {
|
if (item._dir == SyncFileItem::Down) {
|
||||||
switch (item._instruction) {
|
switch (item._instruction) {
|
||||||
@@ -293,11 +297,21 @@ void Folder::bubbleUpSyncResult()
|
|||||||
newItems++;
|
newItems++;
|
||||||
if (firstItemNew.isEmpty())
|
if (firstItemNew.isEmpty())
|
||||||
firstItemNew = item;
|
firstItemNew = item;
|
||||||
|
|
||||||
|
if (item._type == SyncFileItem::Directory) {
|
||||||
|
_watcher->addPath(path() + item._file);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case CSYNC_INSTRUCTION_REMOVE:
|
case CSYNC_INSTRUCTION_REMOVE:
|
||||||
removedItems++;
|
removedItems++;
|
||||||
if (firstItemDeleted.isEmpty())
|
if (firstItemDeleted.isEmpty())
|
||||||
firstItemDeleted = item;
|
firstItemDeleted = item;
|
||||||
|
|
||||||
|
if (item._type == SyncFileItem::Directory) {
|
||||||
|
_watcher->removePath(path() + item._file);
|
||||||
|
}
|
||||||
|
|
||||||
break;
|
break;
|
||||||
case CSYNC_INSTRUCTION_UPDATED:
|
case CSYNC_INSTRUCTION_UPDATED:
|
||||||
updatedItems++;
|
updatedItems++;
|
||||||
@@ -321,8 +335,6 @@ void Folder::bubbleUpSyncResult()
|
|||||||
|
|
||||||
_syncResult.setWarnCount(ignoredItems);
|
_syncResult.setWarnCount(ignoredItems);
|
||||||
|
|
||||||
Logger *logger = Logger::instance();
|
|
||||||
|
|
||||||
qDebug() << "OO folder slotSyncFinished: result: " << int(_syncResult.status());
|
qDebug() << "OO folder slotSyncFinished: result: " << int(_syncResult.status());
|
||||||
if (newItems > 0) {
|
if (newItems > 0) {
|
||||||
QString file = QDir::toNativeSeparators(firstItemNew._file);
|
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_port", &proxyPort );
|
||||||
csync_set_module_property(_csync_ctx, "proxy_user", proxy.user().toUtf8().data() );
|
csync_set_module_property(_csync_ctx, "proxy_user", proxy.user().toUtf8().data() );
|
||||||
csync_set_module_property(_csync_ctx, "proxy_pwd" , proxy.password().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);
|
QMetaObject::invokeMethod(this, "slotCSyncFinished", Qt::QueuedConnection);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
} else if (FolderMan::instance()->isDirtyProxy()) {
|
||||||
|
setProxy();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (_thread && _thread->isRunning()) {
|
if (_thread && _thread->isRunning()) {
|
||||||
|
|||||||
@@ -37,7 +37,8 @@ FolderMan* FolderMan::_instance = 0;
|
|||||||
|
|
||||||
FolderMan::FolderMan(QObject *parent) :
|
FolderMan::FolderMan(QObject *parent) :
|
||||||
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
|
// if QDir::mkpath would not be so stupid, I would not need to have this
|
||||||
// duplication of folderConfigPath() here
|
// duplication of folderConfigPath() here
|
||||||
|
|||||||
@@ -109,6 +109,9 @@ public slots:
|
|||||||
|
|
||||||
void slotScheduleAllFolders();
|
void slotScheduleAllFolders();
|
||||||
|
|
||||||
|
bool isDirtyProxy() { return _dirtyProxy; }
|
||||||
|
void setDirtyProxy(bool value = true) { _dirtyProxy = value; }
|
||||||
|
|
||||||
private slots:
|
private slots:
|
||||||
// slot to add a folder to the syncing queue
|
// slot to add a folder to the syncing queue
|
||||||
void slotScheduleSync( const QString & );
|
void slotScheduleSync( const QString & );
|
||||||
@@ -136,6 +139,7 @@ private:
|
|||||||
QString _currentSyncFolder;
|
QString _currentSyncFolder;
|
||||||
bool _syncEnabled;
|
bool _syncEnabled;
|
||||||
QQueue<QString> _scheduleQueue;
|
QQueue<QString> _scheduleQueue;
|
||||||
|
bool _dirtyProxy; // If the proxy need to be re-configured
|
||||||
|
|
||||||
explicit FolderMan(QObject *parent = 0);
|
explicit FolderMan(QObject *parent = 0);
|
||||||
static FolderMan *_instance;
|
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.
|
// Sync File Progress Bar: Show it if syncFile is not empty.
|
||||||
if( !overallString.isEmpty()) {
|
if( !overallString.isEmpty()) {
|
||||||
int fileNameTextHeight = subFm.boundingRect(tr("File")).height();
|
int fileNameTextHeight = subFm.boundingRect(tr("File")).height();
|
||||||
int barHeight = fileNameTextHeight;
|
int barHeight = qMax(fileNameTextHeight, aliasFm.height()+2); ;
|
||||||
int overallWidth = option.rect.width()-2*aliasMargin;
|
int overallWidth = option.rect.width()-2*aliasMargin;
|
||||||
|
|
||||||
painter->save();
|
painter->save();
|
||||||
@@ -260,6 +260,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||||||
pBRect.setWidth( overallWidth - progressTextWidth - margin );
|
pBRect.setWidth( overallWidth - progressTextWidth - margin );
|
||||||
|
|
||||||
QStyleOptionProgressBarV2 pBarOpt;
|
QStyleOptionProgressBarV2 pBarOpt;
|
||||||
|
|
||||||
pBarOpt.state = option.state | QStyle::State_Horizontal;
|
pBarOpt.state = option.state | QStyle::State_Horizontal;
|
||||||
pBarOpt.minimum = 0;
|
pBarOpt.minimum = 0;
|
||||||
pBarOpt.maximum = 100;
|
pBarOpt.maximum = 100;
|
||||||
@@ -280,6 +281,7 @@ void FolderStatusDelegate::paint(QPainter *painter, const QStyleOptionViewItem &
|
|||||||
|
|
||||||
QString elidedText = progressFm.elidedText(overallString, Qt::ElideLeft, overallProgressRect.width());
|
QString elidedText = progressFm.elidedText(overallString, Qt::ElideLeft, overallProgressRect.width());
|
||||||
painter->drawText( overallProgressRect, Qt::AlignRight+Qt::AlignVCenter, elidedText);
|
painter->drawText( overallProgressRect, Qt::AlignRight+Qt::AlignVCenter, elidedText);
|
||||||
|
// painter->drawRect(overallProgressRect);
|
||||||
|
|
||||||
// Individual File Progress
|
// Individual File Progress
|
||||||
QRect fileRect;
|
QRect fileRect;
|
||||||
|
|||||||
@@ -172,5 +172,16 @@ void FolderWatcher::changeDetected(const QString& f)
|
|||||||
setProcessTimer();
|
setProcessTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FolderWatcher::addPath(const QString &path )
|
||||||
|
{
|
||||||
|
_d->addPath(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
void FolderWatcher::removePath(const QString &path )
|
||||||
|
{
|
||||||
|
_d->removePath(path);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace Mirall
|
} // namespace Mirall
|
||||||
|
|
||||||
|
|||||||
@@ -88,6 +88,15 @@ public:
|
|||||||
void setEventInterval(int seconds);
|
void setEventInterval(int seconds);
|
||||||
|
|
||||||
QStringList ignores() const;
|
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:
|
public slots:
|
||||||
/**
|
/**
|
||||||
* Enabled or disables folderChanged() events.
|
* Enabled or disables folderChanged() events.
|
||||||
|
|||||||
@@ -119,9 +119,8 @@ void FolderWatcherPrivate::slotINotifyEvent(int mask, int /*cookie*/, const QStr
|
|||||||
}
|
}
|
||||||
else if (mask & IN_DELETE) {
|
else if (mask & IN_DELETE) {
|
||||||
//qDebug() << cookie << " DELETE: " << path;
|
//qDebug() << cookie << " DELETE: " << path;
|
||||||
if ( QFileInfo(path).isDir() && _inotify->directories().contains(path) ) {
|
if ( QFileInfo(path).isDir() ) {
|
||||||
qDebug() << "(-) Watcher:" << path;
|
removePath(path);
|
||||||
_inotify->removePath(path);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (mask & IN_CLOSE_WRITE) {
|
else if (mask & IN_CLOSE_WRITE) {
|
||||||
@@ -160,4 +159,13 @@ void FolderWatcherPrivate::slotINotifyEvent(int mask, int /*cookie*/, const QStr
|
|||||||
_parent->setProcessTimer();
|
_parent->setProcessTimer();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void FolderWatcherPrivate::removePath(const QString &path )
|
||||||
|
{
|
||||||
|
if (_inotify->directories().contains(path) ) {
|
||||||
|
qDebug() << "(-) Watcher:" << path;
|
||||||
|
_inotify->removePath(path);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
} // namespace Mirall
|
} // namespace Mirall
|
||||||
|
|||||||
@@ -26,6 +26,8 @@ class FolderWatcherPrivate : public QObject {
|
|||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
FolderWatcherPrivate(FolderWatcher *p);
|
FolderWatcherPrivate(FolderWatcher *p);
|
||||||
|
void addPath(const QString &path) { slotAddFolderRecursive(path); }
|
||||||
|
void removePath(const QString &);
|
||||||
signals:
|
signals:
|
||||||
void error(const QString& error);
|
void error(const QString& error);
|
||||||
private slots:
|
private slots:
|
||||||
|
|||||||
@@ -31,6 +31,9 @@ public:
|
|||||||
FolderWatcherPrivate(FolderWatcher *p);
|
FolderWatcherPrivate(FolderWatcher *p);
|
||||||
~FolderWatcherPrivate();
|
~FolderWatcherPrivate();
|
||||||
|
|
||||||
|
void addPath(const QString &) {}
|
||||||
|
void removePath(const QString &) {}
|
||||||
|
|
||||||
void startWatching();
|
void startWatching();
|
||||||
void doNotifyParent();
|
void doNotifyParent();
|
||||||
|
|
||||||
|
|||||||
@@ -48,6 +48,10 @@ class FolderWatcherPrivate : public QObject {
|
|||||||
public:
|
public:
|
||||||
FolderWatcherPrivate(FolderWatcher *p);
|
FolderWatcherPrivate(FolderWatcher *p);
|
||||||
~FolderWatcherPrivate();
|
~FolderWatcherPrivate();
|
||||||
|
|
||||||
|
void addPath(const QString &) {}
|
||||||
|
void removePath(const QString &) {}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
FolderWatcher *_parent;
|
FolderWatcher *_parent;
|
||||||
WatcherThread *_thread;
|
WatcherThread *_thread;
|
||||||
|
|||||||
@@ -103,8 +103,11 @@ void ItemProgressDialog::setSyncResult( const SyncResult& result )
|
|||||||
for (i = items.begin(); i != items.end(); ++i) {
|
for (i = items.begin(); i != items.end(); ++i) {
|
||||||
const SyncFileItem& item = *i;
|
const SyncFileItem& item = *i;
|
||||||
QString errMsg;
|
QString errMsg;
|
||||||
|
QString tooltip;
|
||||||
// handle ignored files here.
|
// handle ignored files here.
|
||||||
if( item._instruction == CSYNC_INSTRUCTION_IGNORE ) {
|
|
||||||
|
if( item._instruction == CSYNC_INSTRUCTION_IGNORE
|
||||||
|
|| item._instruction == CSYNC_INSTRUCTION_CONFLICT ) {
|
||||||
QStringList columns;
|
QStringList columns;
|
||||||
QString timeStr = timeString(dt);
|
QString timeStr = timeString(dt);
|
||||||
QString longTimeStr = timeString(dt, QLocale::LongFormat);
|
QString longTimeStr = timeString(dt, QLocale::LongFormat);
|
||||||
@@ -112,22 +115,41 @@ void ItemProgressDialog::setSyncResult( const SyncResult& result )
|
|||||||
columns << timeStr;
|
columns << timeStr;
|
||||||
columns << item._file;
|
columns << item._file;
|
||||||
columns << folder;
|
columns << folder;
|
||||||
if( item._type == SyncFileItem::File ) {
|
if( item._instruction == CSYNC_INSTRUCTION_IGNORE) {
|
||||||
errMsg = tr("File ignored.");
|
if( item._type == SyncFileItem::File ) {
|
||||||
} else if( item._type == SyncFileItem::Directory ){
|
errMsg = tr("File ignored.");
|
||||||
errMsg = tr("Directory ignored.");
|
tooltip = tr("The file was ignored because it is listed in the clients ignore list\n"
|
||||||
} else if( item._type == SyncFileItem::SoftLink ) {
|
"or the filename contains characters that are not syncable\nin a cross platform "
|
||||||
errMsg = tr("Soft Link ignored.");
|
"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 {
|
} else {
|
||||||
errMsg = tr("Ignored.");
|
Q_ASSERT(!"unhandled instruction.");
|
||||||
}
|
}
|
||||||
columns << errMsg;
|
columns << errMsg;
|
||||||
|
|
||||||
QTreeWidgetItem *twitem = new QTreeWidgetItem(columns);
|
QTreeWidgetItem *twitem = new QTreeWidgetItem(columns);
|
||||||
twitem->setData(0, ErrorIndicatorRole, QVariant(true) );
|
twitem->setData(0, ErrorIndicatorRole, QVariant(true) );
|
||||||
twitem->setToolTip(0, longTimeStr);
|
twitem->setToolTip(0, longTimeStr);
|
||||||
|
twitem->setToolTip(3, tooltip);
|
||||||
twitem->setIcon(0, Theme::instance()->syncStateIcon(SyncResult::Problem, true));
|
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();
|
int topLevelItems = _ui->_treeWidget->topLevelItemCount();
|
||||||
for (int i = 0; i < topLevelItems; i++) {
|
for (int i = 0; i < topLevelItems; i++) {
|
||||||
QTreeWidgetItem *item = _ui->_treeWidget->topLevelItem(i);
|
QTreeWidgetItem *child = _ui->_treeWidget->topLevelItem(i);
|
||||||
ts << left << qSetFieldWidth(0)
|
// time stamp
|
||||||
<< item->data(0, Qt::DisplayRole).toString()
|
ts << left << qSetFieldWidth(10)
|
||||||
<< endl;
|
<< child->data(0,Qt::DisplayRole).toString()
|
||||||
int childItems = item->childCount();
|
// file name
|
||||||
for (int j = 0; j < childItems; j++) {
|
<< qSetFieldWidth(64)
|
||||||
QTreeWidgetItem *child =item->child(j);
|
<< child->data(1,Qt::DisplayRole).toString()
|
||||||
// time stamp
|
<< qSetFieldWidth(0) << ' '
|
||||||
ts << left << qSetFieldWidth(10)
|
// action
|
||||||
<< child->data(0,Qt::DisplayRole).toString()
|
<< qSetFieldWidth(15)
|
||||||
// file name
|
<< child->data(3, Qt::DisplayRole).toString()
|
||||||
<< qSetFieldWidth(50)
|
// size
|
||||||
<< child->data(1,Qt::DisplayRole).toString()
|
<< qSetFieldWidth(10)
|
||||||
// action
|
<< child->data(4, Qt::DisplayRole).toString()
|
||||||
<< qSetFieldWidth(15)
|
<< qSetFieldWidth(0)
|
||||||
<< child->data(2, Qt::DisplayRole).toString()
|
<< endl;
|
||||||
// size
|
|
||||||
<< qSetFieldWidth(10)
|
|
||||||
<< child->data(3, Qt::DisplayRole).toString()
|
|
||||||
<< qSetFieldWidth(0)
|
|
||||||
<< endl;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
QApplication::clipboard()->setText(text);
|
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??
|
// by error_code. A quota problem is considered an error, others might not??
|
||||||
item->setIcon(0, Theme::instance()->syncStateIcon(SyncResult::Error, true));
|
item->setIcon(0, Theme::instance()->syncStateIcon(SyncResult::Error, true));
|
||||||
item->setToolTip(0, longTimeStr);
|
item->setToolTip(0, longTimeStr);
|
||||||
_ui->_treeWidget->addTopLevelItem(item);
|
_ui->_treeWidget->insertTopLevelItem(0, item);
|
||||||
Q_UNUSED(item);
|
Q_UNUSED(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -303,7 +319,7 @@ void ItemProgressDialog::slotProgressInfo( const QString& folder, const Progress
|
|||||||
|
|
||||||
QTreeWidgetItem *item = new QTreeWidgetItem(columns);
|
QTreeWidgetItem *item = new QTreeWidgetItem(columns);
|
||||||
item->setToolTip(0, longTimeStr);
|
item->setToolTip(0, longTimeStr);
|
||||||
_ui->_treeWidget->addTopLevelItem(item);
|
_ui->_treeWidget->insertTopLevelItem(0, item);
|
||||||
Q_UNUSED(item);
|
Q_UNUSED(item);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -39,9 +39,6 @@
|
|||||||
<property name="uniformRowHeights">
|
<property name="uniformRowHeights">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
</property>
|
</property>
|
||||||
<property name="sortingEnabled">
|
|
||||||
<bool>true</bool>
|
|
||||||
</property>
|
|
||||||
<property name="columnCount">
|
<property name="columnCount">
|
||||||
<number>4</number>
|
<number>4</number>
|
||||||
</property>
|
</property>
|
||||||
|
|||||||
@@ -128,11 +128,15 @@ LogBrowser::LogBrowser(QWidget *parent) :
|
|||||||
|
|
||||||
LogBrowser::~LogBrowser()
|
LogBrowser::~LogBrowser()
|
||||||
{
|
{
|
||||||
|
MirallConfigFile cfg;
|
||||||
|
cfg.saveGeometry(this);
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogBrowser::slotNewLog( const QString& msg )
|
void LogBrowser::slotNewLog( const QString& msg )
|
||||||
{
|
{
|
||||||
_logWidget->appendPlainText( msg );
|
if( _logWidget->isVisible() ) {
|
||||||
|
_logWidget->appendPlainText( msg );
|
||||||
|
}
|
||||||
|
|
||||||
if( _logstream ) {
|
if( _logstream ) {
|
||||||
(*_logstream) << msg << endl;
|
(*_logstream) << msg << endl;
|
||||||
@@ -225,11 +229,4 @@ void LogBrowser::slotClearLog()
|
|||||||
_logWidget->clear();
|
_logWidget->clear();
|
||||||
}
|
}
|
||||||
|
|
||||||
void LogBrowser::closeEvent(QCloseEvent *event)
|
|
||||||
{
|
|
||||||
MirallConfigFile cfg;
|
|
||||||
cfg.saveGeometry(this);
|
|
||||||
QWidget::closeEvent(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|||||||
@@ -47,9 +47,6 @@ public:
|
|||||||
|
|
||||||
void setLogFile(const QString& , bool );
|
void setLogFile(const QString& , bool );
|
||||||
|
|
||||||
protected:
|
|
||||||
void closeEvent(QCloseEvent *event);
|
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void slotNewLog( const QString &msg );
|
void slotNewLog( const QString &msg );
|
||||||
void slotFind();
|
void slotFind();
|
||||||
|
|||||||
@@ -193,7 +193,7 @@ QString MirallConfigFile::excludeFile(Scope scope) const
|
|||||||
fi.setFile( QApplication::applicationDirPath(), exclFile );
|
fi.setFile( QApplication::applicationDirPath(), exclFile );
|
||||||
#endif
|
#endif
|
||||||
#ifdef Q_OS_UNIX
|
#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
|
#endif
|
||||||
#ifdef Q_OS_MAC
|
#ifdef Q_OS_MAC
|
||||||
// exec path is inside the bundle
|
// exec path is inside the bundle
|
||||||
@@ -595,7 +595,7 @@ QString MirallConfigFile::proxyPassword() const
|
|||||||
|
|
||||||
int MirallConfigFile::useUploadLimit() const
|
int MirallConfigFile::useUploadLimit() const
|
||||||
{
|
{
|
||||||
return getValue(useUploadLimitC, QString::null, -1).toInt();
|
return getValue(useUploadLimitC, QString::null, 0).toInt();
|
||||||
}
|
}
|
||||||
|
|
||||||
bool MirallConfigFile::useDownloadLimit() const
|
bool MirallConfigFile::useDownloadLimit() const
|
||||||
|
|||||||
@@ -113,7 +113,7 @@ void NetworkSettings::loadBWLimitSettings()
|
|||||||
if ( uploadLimit >= 1 ) {
|
if ( uploadLimit >= 1 ) {
|
||||||
_ui->uploadLimitRadioButton->setChecked(true);
|
_ui->uploadLimitRadioButton->setChecked(true);
|
||||||
} else if (uploadLimit == 0){
|
} else if (uploadLimit == 0){
|
||||||
_ui->noDownloadLimitRadioButton->setChecked(true);
|
_ui->noUploadLimitRadioButton->setChecked(true);
|
||||||
} else {
|
} else {
|
||||||
_ui->autoUploadLimitRadioButton->setChecked(true);
|
_ui->autoUploadLimitRadioButton->setChecked(true);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -229,7 +229,7 @@
|
|||||||
<item row="0" column="0" colspan="2">
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="QRadioButton" name="noDownloadLimitRadioButton">
|
<widget class="QRadioButton" name="noDownloadLimitRadioButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>No Limit</string>
|
<string>No limit</string>
|
||||||
</property>
|
</property>
|
||||||
<property name="checked">
|
<property name="checked">
|
||||||
<bool>true</bool>
|
<bool>true</bool>
|
||||||
@@ -254,6 +254,12 @@
|
|||||||
</item>
|
</item>
|
||||||
<item row="1" column="1">
|
<item row="1" column="1">
|
||||||
<widget class="QGroupBox" name="groupBox_2">
|
<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">
|
<property name="title">
|
||||||
<string>Upload Bandwidth</string>
|
<string>Upload Bandwidth</string>
|
||||||
</property>
|
</property>
|
||||||
@@ -261,7 +267,7 @@
|
|||||||
<item row="0" column="0" colspan="2">
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="QRadioButton" name="noUploadLimitRadioButton">
|
<widget class="QRadioButton" name="noUploadLimitRadioButton">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>No Limit</string>
|
<string>No limit</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
|||||||
@@ -138,7 +138,10 @@ QNetworkReply* ownCloudInfo::mkdirRequest( const QString& dir )
|
|||||||
qDebug() << "OCInfo Making dir " << dir;
|
qDebug() << "OCInfo Making dir " << dir;
|
||||||
_authAttempts = 0;
|
_authAttempts = 0;
|
||||||
QNetworkRequest req;
|
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);
|
QNetworkReply *reply = davRequest("MKCOL", req, 0);
|
||||||
|
|
||||||
// remember the confighandle used for this request
|
// remember the confighandle used for this request
|
||||||
|
|||||||
@@ -47,8 +47,11 @@ OwncloudSetupWizard::OwncloudSetupWizard(QObject* parent) :
|
|||||||
this, SLOT(slotConnectToOCUrl( const QString& )));
|
this, SLOT(slotConnectToOCUrl( const QString& )));
|
||||||
connect( _ocWizard, SIGNAL(createLocalAndRemoteFolders(QString, QString)),
|
connect( _ocWizard, SIGNAL(createLocalAndRemoteFolders(QString, QString)),
|
||||||
this, SLOT(slotCreateLocalAndRemoteFolders(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()),
|
connect( _ocWizard, SIGNAL(clearPendingRequests()),
|
||||||
this, SLOT(slotClearPendingRequests()));
|
this, SLOT(slotClearPendingRequests()));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,15 +33,6 @@ ownCloudTheme::ownCloudTheme()
|
|||||||
// qDebug() << " ** running ownCloud theme!";
|
// 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
|
QString ownCloudTheme::configFileName() const
|
||||||
{
|
{
|
||||||
return QLatin1String("owncloud.cfg");
|
return QLatin1String("owncloud.cfg");
|
||||||
|
|||||||
@@ -25,7 +25,6 @@ class ownCloudTheme : public Theme
|
|||||||
public:
|
public:
|
||||||
ownCloudTheme();
|
ownCloudTheme();
|
||||||
|
|
||||||
virtual QString appName() const;
|
|
||||||
QString configFileName() const;
|
QString configFileName() const;
|
||||||
QString about() const;
|
QString about() const;
|
||||||
QPixmap splashScreen() const;
|
QPixmap splashScreen() const;
|
||||||
|
|||||||
@@ -16,7 +16,7 @@
|
|||||||
#include <QObject>
|
#include <QObject>
|
||||||
#include <QMetaType>
|
#include <QMetaType>
|
||||||
#include <QDebug>
|
#include <QDebug>
|
||||||
|
#include <QCoreApplication>
|
||||||
|
|
||||||
namespace Mirall {
|
namespace Mirall {
|
||||||
|
|
||||||
@@ -28,35 +28,35 @@ QString Progress::asResultString( Kind kind )
|
|||||||
switch(kind) {
|
switch(kind) {
|
||||||
case Download:
|
case Download:
|
||||||
case EndDownload:
|
case EndDownload:
|
||||||
re = QObject::tr("Download");
|
re = QCoreApplication::translate( "progress", "Download");
|
||||||
break;
|
break;
|
||||||
case Upload:
|
case Upload:
|
||||||
re = QObject::tr("Upload");
|
re = QCoreApplication::translate( "progress", "Upload");
|
||||||
break;
|
break;
|
||||||
case Context:
|
case Context:
|
||||||
re = QObject::tr("Context");
|
re = QCoreApplication::translate( "progress", "Context" );
|
||||||
break;
|
break;
|
||||||
case Inactive:
|
case Inactive:
|
||||||
re = QObject::tr("Inactive");
|
re = QCoreApplication::translate( "progress", "Inactive");
|
||||||
break;
|
break;
|
||||||
case StartDownload:
|
case StartDownload:
|
||||||
re = QObject::tr("Download");
|
re = QCoreApplication::translate( "progress", "Download");
|
||||||
break;
|
break;
|
||||||
case StartUpload:
|
case StartUpload:
|
||||||
case EndUpload:
|
case EndUpload:
|
||||||
re = QObject::tr("Upload");
|
re = QCoreApplication::translate( "progress", "Upload");
|
||||||
break;
|
break;
|
||||||
case StartSync:
|
case StartSync:
|
||||||
re = QObject::tr("Start");
|
re = QCoreApplication::translate( "progress", "Start");
|
||||||
break;
|
break;
|
||||||
case EndSync:
|
case EndSync:
|
||||||
re = QObject::tr("Finished");
|
re = QCoreApplication::translate( "progress", "Finished");
|
||||||
break;
|
break;
|
||||||
case StartDelete:
|
case StartDelete:
|
||||||
re = QObject::tr("For deletion");
|
re = QCoreApplication::translate( "progress", "For deletion");
|
||||||
break;
|
break;
|
||||||
case EndDelete:
|
case EndDelete:
|
||||||
re = QObject::tr("deleted");
|
re = QCoreApplication::translate( "progress", "deleted");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Q_ASSERT(false);
|
Q_ASSERT(false);
|
||||||
@@ -71,40 +71,40 @@ QString Progress::asActionString( Kind kind )
|
|||||||
|
|
||||||
switch(kind) {
|
switch(kind) {
|
||||||
case Download:
|
case Download:
|
||||||
re = QObject::tr("downloading");
|
re = QCoreApplication::translate( "progress", "downloading");
|
||||||
break;
|
break;
|
||||||
case Upload:
|
case Upload:
|
||||||
re = QObject::tr("uploading");
|
re = QCoreApplication::translate( "progress", "uploading");
|
||||||
break;
|
break;
|
||||||
case Context:
|
case Context:
|
||||||
re = QObject::tr("Context");
|
re = QCoreApplication::translate( "progress", "Context");
|
||||||
break;
|
break;
|
||||||
case Inactive:
|
case Inactive:
|
||||||
re = QObject::tr("inactive");
|
re = QCoreApplication::translate( "progress", "inactive");
|
||||||
break;
|
break;
|
||||||
case StartDownload:
|
case StartDownload:
|
||||||
re = QObject::tr("downloading");
|
re = QCoreApplication::translate( "progress", "downloading");
|
||||||
break;
|
break;
|
||||||
case StartUpload:
|
case StartUpload:
|
||||||
re = QObject::tr("uploading");
|
re = QCoreApplication::translate( "progress", "uploading");
|
||||||
break;
|
break;
|
||||||
case EndDownload:
|
case EndDownload:
|
||||||
re = QObject::tr("downloading");
|
re = QCoreApplication::translate( "progress", "downloading");
|
||||||
break;
|
break;
|
||||||
case EndUpload:
|
case EndUpload:
|
||||||
re = QObject::tr("uploading");
|
re = QCoreApplication::translate( "progress", "uploading");
|
||||||
break;
|
break;
|
||||||
case StartSync:
|
case StartSync:
|
||||||
re = QObject::tr("starting");
|
re = QCoreApplication::translate( "progress", "starting");
|
||||||
break;
|
break;
|
||||||
case EndSync:
|
case EndSync:
|
||||||
re = QObject::tr("finished");
|
re = QCoreApplication::translate( "progress", "finished");
|
||||||
break;
|
break;
|
||||||
case StartDelete:
|
case StartDelete:
|
||||||
re = QObject::tr("delete");
|
re = QCoreApplication::translate( "progress", "delete");
|
||||||
break;
|
break;
|
||||||
case EndDelete:
|
case EndDelete:
|
||||||
re = QObject::tr("deleted");
|
re = QCoreApplication::translate( "progress", "deleted");
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
Q_ASSERT(false);
|
Q_ASSERT(false);
|
||||||
@@ -121,7 +121,7 @@ ProgressDispatcher* ProgressDispatcher::instance() {
|
|||||||
|
|
||||||
ProgressDispatcher::ProgressDispatcher(QObject *parent) :
|
ProgressDispatcher::ProgressDispatcher(QObject *parent) :
|
||||||
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.error_code = newProgress.current_file_bytes;
|
||||||
err.timestamp = QDateTime::currentDateTime();
|
err.timestamp = QDateTime::currentDateTime();
|
||||||
|
|
||||||
_recentProblems.enqueue( err );
|
_recentProblems.prepend( err );
|
||||||
if( _recentProblems.size() > _problemQueueSize ) {
|
if( _recentProblems.size() > _QueueSize ) {
|
||||||
_recentProblems.dequeue();
|
_recentProblems.removeLast();
|
||||||
}
|
}
|
||||||
emit progressSyncProblem( folder, err );
|
emit progressSyncProblem( folder, err );
|
||||||
} else {
|
} else {
|
||||||
@@ -180,7 +180,10 @@ void ProgressDispatcher::setProgressInfo(const QString& folder, const Progress::
|
|||||||
if( newProgress.kind == Progress::EndDownload ||
|
if( newProgress.kind == Progress::EndDownload ||
|
||||||
newProgress.kind == Progress::EndUpload ||
|
newProgress.kind == Progress::EndUpload ||
|
||||||
newProgress.kind == Progress::EndDelete ) {
|
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
|
// store the last real action to help clients that start during
|
||||||
// the Context-phase of an upload or download.
|
// the Context-phase of an upload or download.
|
||||||
|
|||||||
@@ -25,9 +25,8 @@ namespace Mirall {
|
|||||||
/**
|
/**
|
||||||
* @brief The FolderScheduler class schedules folders for sync
|
* @brief The FolderScheduler class schedules folders for sync
|
||||||
*/
|
*/
|
||||||
class Progress
|
namespace Progress
|
||||||
{
|
{
|
||||||
public:
|
|
||||||
typedef enum {
|
typedef enum {
|
||||||
Invalid,
|
Invalid,
|
||||||
StartSync,
|
StartSync,
|
||||||
@@ -69,9 +68,9 @@ public:
|
|||||||
QDateTime timestamp;
|
QDateTime timestamp;
|
||||||
} SyncProblem;
|
} SyncProblem;
|
||||||
|
|
||||||
static QString asActionString( Kind );
|
QString asActionString( Kind );
|
||||||
static QString asResultString( Kind );
|
QString asResultString( Kind );
|
||||||
};
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @file progressdispatcher.h
|
* @file progressdispatcher.h
|
||||||
@@ -112,9 +111,9 @@ protected:
|
|||||||
|
|
||||||
private:
|
private:
|
||||||
ProgressDispatcher(QObject* parent = 0);
|
ProgressDispatcher(QObject* parent = 0);
|
||||||
const int _problemQueueSize;
|
const int _QueueSize;
|
||||||
QQueue<Progress::Info> _recentChanges;
|
QList<Progress::Info> _recentChanges;
|
||||||
QQueue<Progress::SyncProblem> _recentProblems;
|
QList<Progress::SyncProblem> _recentProblems;
|
||||||
|
|
||||||
QHash<QString, Progress::Kind> _currentAction;
|
QHash<QString, Progress::Kind> _currentAction;
|
||||||
static ProgressDispatcher* _instance;
|
static ProgressDispatcher* _instance;
|
||||||
|
|||||||
@@ -48,6 +48,10 @@ SettingsDialog::SettingsDialog(Application *app, QWidget *parent) :
|
|||||||
|
|
||||||
setWindowTitle(tr("%1").arg(Theme::instance()->appNameGUI()));
|
setWindowTitle(tr("%1").arg(Theme::instance()->appNameGUI()));
|
||||||
|
|
||||||
|
_accountSettings = new AccountSettings(this);
|
||||||
|
addAccount(tr("Account"), _accountSettings);
|
||||||
|
slotUpdateAccountState();
|
||||||
|
|
||||||
QIcon generalIcon(QLatin1String(":/mirall/resources/settings.png"));
|
QIcon generalIcon(QLatin1String(":/mirall/resources/settings.png"));
|
||||||
QListWidgetItem *general = new QListWidgetItem(generalIcon, tr("General"), _ui->labelWidget);
|
QListWidgetItem *general = new QListWidgetItem(generalIcon, tr("General"), _ui->labelWidget);
|
||||||
general->setSizeHint(QSize(0, 32));
|
general->setSizeHint(QSize(0, 32));
|
||||||
@@ -62,14 +66,9 @@ SettingsDialog::SettingsDialog(Application *app, QWidget *parent) :
|
|||||||
NetworkSettings *networkSettings = new NetworkSettings;
|
NetworkSettings *networkSettings = new NetworkSettings;
|
||||||
_ui->stack->addWidget(networkSettings);
|
_ui->stack->addWidget(networkSettings);
|
||||||
connect(networkSettings, SIGNAL(proxySettingsChanged()), app, SLOT(slotSetupProxy()));
|
connect(networkSettings, SIGNAL(proxySettingsChanged()), app, SLOT(slotSetupProxy()));
|
||||||
connect(networkSettings, SIGNAL(proxySettingsChanged()), FolderMan::instance(), SLOT(slotScheduleAllFolders()));
|
|
||||||
|
|
||||||
//connect(generalSettings, SIGNAL(resizeToSizeHint()), SLOT(resizeToSizeHint()));
|
//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*)), _accountSettings, SLOT(slotUpdateFolderState(Folder*)));
|
||||||
connect( app, SIGNAL(folderStateChanged(Folder*)), SLOT(slotUpdateAccountState()));
|
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)),
|
connect( ProgressDispatcher::instance(), SIGNAL(progressSyncProblem(QString,Progress::SyncProblem)),
|
||||||
_accountSettings, SLOT(slotProgressProblem(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)),
|
connect(_ui->labelWidget, SIGNAL(currentRowChanged(int)),
|
||||||
_ui->stack, SLOT(setCurrentIndex(int)));
|
_ui->stack, SLOT(setCurrentIndex(int)));
|
||||||
@@ -102,6 +101,9 @@ SettingsDialog::SettingsDialog(Application *app, QWidget *parent) :
|
|||||||
|
|
||||||
SettingsDialog::~SettingsDialog()
|
SettingsDialog::~SettingsDialog()
|
||||||
{
|
{
|
||||||
|
MirallConfigFile cfg;
|
||||||
|
cfg.saveGeometry(this);
|
||||||
|
|
||||||
delete _ui;
|
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()
|
void SettingsDialog::slotUpdateAccountState()
|
||||||
{
|
{
|
||||||
FolderMan *folderMan = FolderMan::instance();
|
FolderMan *folderMan = FolderMan::instance();
|
||||||
|
|||||||
@@ -41,9 +41,6 @@ public:
|
|||||||
|
|
||||||
void addAccount(const QString &title, QWidget *widget);
|
void addAccount(const QString &title, QWidget *widget);
|
||||||
|
|
||||||
protected:
|
|
||||||
void closeEvent(QCloseEvent *event);
|
|
||||||
|
|
||||||
protected slots:
|
protected slots:
|
||||||
void slotUpdateAccountState();
|
void slotUpdateAccountState();
|
||||||
|
|
||||||
|
|||||||
@@ -6,15 +6,24 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>704</width>
|
<width>693</width>
|
||||||
<height>299</height>
|
<height>457</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Settings</string>
|
<string>Settings</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QGridLayout" name="gridLayout">
|
<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>
|
<number>0</number>
|
||||||
</property>
|
</property>
|
||||||
<property name="spacing">
|
<property name="spacing">
|
||||||
|
|||||||
@@ -45,35 +45,45 @@ QString Theme::statusHeaderText( SyncResult::Status status ) const
|
|||||||
|
|
||||||
switch( status ) {
|
switch( status ) {
|
||||||
case SyncResult::Undefined:
|
case SyncResult::Undefined:
|
||||||
resultStr = QObject::tr("Status undefined");
|
resultStr = QCoreApplication::translate("theme", "Status undefined");
|
||||||
break;
|
break;
|
||||||
case SyncResult::NotYetStarted:
|
case SyncResult::NotYetStarted:
|
||||||
resultStr = QObject::tr("Waiting to start sync");
|
resultStr = QCoreApplication::translate("theme", "Waiting to start sync");
|
||||||
break;
|
break;
|
||||||
case SyncResult::SyncRunning:
|
case SyncResult::SyncRunning:
|
||||||
resultStr = QObject::tr("Sync is running");
|
resultStr = QCoreApplication::translate("theme", "Sync is running");
|
||||||
break;
|
break;
|
||||||
case SyncResult::Success:
|
case SyncResult::Success:
|
||||||
resultStr = QObject::tr("Sync Success");
|
resultStr = QCoreApplication::translate("theme", "Sync Success");
|
||||||
break;
|
break;
|
||||||
case SyncResult::Problem:
|
case SyncResult::Problem:
|
||||||
resultStr = QObject::tr("Sync Success, problems with individual files.");
|
resultStr = QCoreApplication::translate("theme", "Sync Success, problems with individual files.");
|
||||||
break;
|
break;
|
||||||
case SyncResult::Error:
|
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;
|
break;
|
||||||
case SyncResult::SetupError:
|
case SyncResult::SetupError:
|
||||||
resultStr = QObject::tr( "Setup Error" );
|
resultStr = QCoreApplication::translate("theme", "Setup Error" );
|
||||||
break;
|
break;
|
||||||
default:
|
case SyncResult::Unavailable:
|
||||||
resultStr = QObject::tr("Status undefined");
|
resultStr = QCoreApplication::translate("theme", "The server is currently unavailable" );
|
||||||
|
break;
|
||||||
|
case SyncResult::SyncPrepare:
|
||||||
|
resultStr = QCoreApplication::translate("theme", "Preparing to sync" );
|
||||||
|
break;
|
||||||
|
|
||||||
}
|
}
|
||||||
return resultStr;
|
return resultStr;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Theme::appNameGUI() const
|
QString Theme::appNameGUI() const
|
||||||
{
|
{
|
||||||
return appName();
|
return QLatin1String(APPLICATION_NAME);
|
||||||
|
}
|
||||||
|
|
||||||
|
QString Theme::appName() const
|
||||||
|
{
|
||||||
|
return QLatin1String(APPLICATION_SHORTNAME);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString Theme::version() const
|
QString Theme::version() const
|
||||||
|
|||||||
@@ -48,7 +48,8 @@ public:
|
|||||||
* Use and redefine this if the human readable name contains spaces,
|
* Use and redefine this if the human readable name contains spaces,
|
||||||
* special chars and such.
|
* 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.
|
* @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
|
* it is used for config files etc. If you need a more sophisticated
|
||||||
* name in the GUI, redefine appNameGUI.
|
* 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.
|
* @return QString with app name.
|
||||||
*/
|
*/
|
||||||
virtual QString appName() const = 0;
|
virtual QString appName() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief configFileName
|
* @brief configFileName
|
||||||
|
|||||||
@@ -17,6 +17,7 @@
|
|||||||
|
|
||||||
#include <QCoreApplication>
|
#include <QCoreApplication>
|
||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
|
#include <QTextStream>
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QFile>
|
#include <QFile>
|
||||||
#include <QUrl>
|
#include <QUrl>
|
||||||
@@ -286,16 +287,24 @@ void Utility::setLaunchOnStartup(const QString &appName, const QString& guiName,
|
|||||||
qDebug() << "Could not create autostart directory";
|
qDebug() << "Could not create autostart directory";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
QSettings desktopFile(desktopFileLocation, QSettings::IniFormat);
|
QFile iniFile(desktopFileLocation);
|
||||||
desktopFile.beginGroup("Desktop Entry");
|
if (!iniFile.open(QIODevice::WriteOnly)) {
|
||||||
desktopFile.setValue(QLatin1String("Name"), guiName);
|
qDebug() << "Could not write auto start entry" << desktopFileLocation;
|
||||||
desktopFile.setValue(QLatin1String("GenericName"), QLatin1String("File Synchronizer"));
|
return;
|
||||||
desktopFile.setValue(QLatin1String("Exec"), QCoreApplication::applicationFilePath());
|
}
|
||||||
desktopFile.setValue(QLatin1String("Terminal"), false);
|
QTextStream ts(&iniFile);
|
||||||
desktopFile.setValue(QLatin1String("Icon"), appName);
|
ts.setCodec("UTF-8");
|
||||||
desktopFile.setValue(QLatin1String("Categories"), QLatin1String("Network"));
|
ts << QLatin1String("[Desktop Entry]") << endl
|
||||||
desktopFile.setValue(QLatin1String("StartupNotify"), false);
|
<< QLatin1String("Name=") << guiName << endl
|
||||||
desktopFile.endGroup();
|
<< 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 {
|
} else {
|
||||||
if (!QFile::remove(desktopFileLocation)) {
|
if (!QFile::remove(desktopFileLocation)) {
|
||||||
qDebug() << "Could not remove autostart desktop file";
|
qDebug() << "Could not remove autostart desktop file";
|
||||||
|
|||||||
@@ -54,6 +54,7 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage()
|
|||||||
setupCustomization();
|
setupCustomization();
|
||||||
|
|
||||||
connect( _ui.pbSelectLocalFolder, SIGNAL(clicked()), SLOT(slotSelectFolder()));
|
connect( _ui.pbSelectLocalFolder, SIGNAL(clicked()), SLOT(slotSelectFolder()));
|
||||||
|
setButtonText(QWizard::NextButton, tr("Connect..."));
|
||||||
}
|
}
|
||||||
|
|
||||||
void OwncloudAdvancedSetupPage::setupCustomization()
|
void OwncloudAdvancedSetupPage::setupCustomization()
|
||||||
|
|||||||
@@ -46,11 +46,13 @@ OwncloudWizard::OwncloudWizard(QWidget *parent)
|
|||||||
_setupLog(),
|
_setupLog(),
|
||||||
_configExists(false)
|
_configExists(false)
|
||||||
{
|
{
|
||||||
setPage(WizardCommon::Page_ServerSetup, _setupPage );
|
setPage(WizardCommon::Page_ServerSetup, _setupPage);
|
||||||
setPage(WizardCommon::Page_HttpCreds, _httpCredsPage);
|
setPage(WizardCommon::Page_HttpCreds, _httpCredsPage);
|
||||||
setPage(WizardCommon::Page_ShibbolethCreds, _shibbolethCredsPage);
|
setPage(WizardCommon::Page_ShibbolethCreds, _shibbolethCredsPage);
|
||||||
setPage(WizardCommon::Page_AdvancedSetup, _advancedSetupPage);
|
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
|
// note: start Id is set by the calling class depending on if the
|
||||||
// welcome text is to be shown or not.
|
// welcome text is to be shown or not.
|
||||||
@@ -145,12 +147,13 @@ void OwncloudWizard::slotCurrentPageChanged( int id )
|
|||||||
qDebug() << "Current Wizard page changed to " << id;
|
qDebug() << "Current Wizard page changed to " << id;
|
||||||
|
|
||||||
if( id == WizardCommon::Page_ServerSetup ) {
|
if( id == WizardCommon::Page_ServerSetup ) {
|
||||||
setButtonText( QWizard::NextButton, tr("Connect...") );
|
|
||||||
emit clearPendingRequests();
|
emit clearPendingRequests();
|
||||||
_setupPage->initializePage();
|
_setupPage->initializePage();
|
||||||
}
|
}
|
||||||
|
|
||||||
if( id == WizardCommon::Page_Result ) {
|
if( id == WizardCommon::Page_Result ) {
|
||||||
|
disconnect(this, SIGNAL(finished(int)), this, SIGNAL(basicSetupFinished(int)));
|
||||||
|
emit basicSetupFinished(QDialog::Accepted);
|
||||||
appendToConfigurationLog( QString::null );
|
appendToConfigurationLog( QString::null );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,6 +69,8 @@ signals:
|
|||||||
void determineAuthType(const QString&);
|
void determineAuthType(const QString&);
|
||||||
void connectToOCUrl( const QString& );
|
void connectToOCUrl( const QString& );
|
||||||
void createLocalAndRemoteFolders(const QString&, const QString&);
|
void createLocalAndRemoteFolders(const QString&, const QString&);
|
||||||
|
// make sure to connect to this, rather than finished(int)!!
|
||||||
|
void basicSetupFinished( int );
|
||||||
|
|
||||||
private:
|
private:
|
||||||
OwncloudSetupPage* _setupPage;
|
OwncloudSetupPage* _setupPage;
|
||||||
|
|||||||
@@ -1,6 +1,5 @@
|
|||||||
*.filepart
|
*.filepart
|
||||||
*~
|
*~
|
||||||
*.bak
|
|
||||||
*.part
|
*.part
|
||||||
*.crdownload
|
*.crdownload
|
||||||
|
|
||||||
@@ -17,10 +16,6 @@ csync_journal.db.ctmp
|
|||||||
desktop.ini
|
desktop.ini
|
||||||
|
|
||||||
*.kate-swp
|
*.kate-swp
|
||||||
*.aux
|
|
||||||
*.nav
|
|
||||||
*.out
|
|
||||||
*.toc
|
|
||||||
|
|
||||||
*_conflict-*
|
*_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})
|
add_executable(${OWNCLOUD_TEST_CLASS}Test test${OWNCLOUD_TEST_CLASS_LOWERCASE}.cpp ${${OWNCLOUD_TEST_CLASS}_MOCS})
|
||||||
|
|
||||||
target_link_libraries(${OWNCLOUD_TEST_CLASS}Test
|
target_link_libraries(${OWNCLOUD_TEST_CLASS}Test
|
||||||
${APPLICATION_SHORTNAME}sync
|
${APPLICATION_EXECUTABLE}sync
|
||||||
${QT_QTTEST_LIBRARY}
|
${QT_QTTEST_LIBRARY}
|
||||||
${QT_QTCORE_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