Renato Araujo Oliveira Filho has proposed merging lp:~renatofilho/ubuntu-filemanager-app/new-debian into lp:ubuntu-filemanager-app.
Commit message: ***************** WORK STILL IN PROGRESS ********************************* - Rename app with the new style without dots. Requested reviews: Jenkins Bot (ubuntu-core-apps-jenkins-bot): continuous-integration Ubuntu File Manager Developers (ubuntu-filemanager-dev) Related bugs: Bug #1675055 in Ubuntu File Manager App: "land ubuntu-filemanager-app as deb in the archive" https://bugs.launchpad.net/ubuntu-filemanager-app/+bug/1675055 For more details, see: https://code.launchpad.net/~renatofilho/ubuntu-filemanager-app/new-debian/+merge/319364 *********************** DO NOT MERGE IT YET ****************************** -- Your team Ubuntu File Manager Developers is requested to review the proposed merge of lp:~renatofilho/ubuntu-filemanager-app/new-debian into lp:ubuntu-filemanager-app.
=== modified file 'CMakeLists.txt' --- CMakeLists.txt 2016-07-14 15:04:49 +0000 +++ CMakeLists.txt 2017-03-15 15:11:59 +0000 @@ -117,6 +117,7 @@ set(DATA_DIR ${CMAKE_INSTALL_DATADIR}/${APP_NAME}) set(ICON ${CMAKE_INSTALL_PREFIX}/${DATA_DIR}/${ICON_FILE}) set(DESKTOP_DIR ${CMAKE_INSTALL_DATADIR}/applications) + install(FILES ${CONTENT_HUB_JSON} DESTINATION ${CMAKE_INSTALL_FULL_DATADIR}/content-hub/peers/ RENAME com.ubuntu.filemanager) endif(CLICK_MODE) file(GLOB_RECURSE I18N_SRC_FILES === modified file 'com.ubuntu.filemanager.desktop.in.in' --- com.ubuntu.filemanager.desktop.in.in 2016-01-28 20:45:17 +0000 +++ com.ubuntu.filemanager.desktop.in.in 2017-03-15 15:11:59 +0000 @@ -9,3 +9,4 @@ X-Ubuntu-Default-Department-ID=accessories X-Ubuntu-Splash-Show-Header=true X-Ubuntu-Splash-Color=#F5F5F5 +X-Ubuntu-Single-Instance=true === added directory 'debian/apparmor' === added file 'debian/apparmor/ubuntu-filemanager-app' --- debian/apparmor/ubuntu-filemanager-app 1970-01-01 00:00:00 +0000 +++ debian/apparmor/ubuntu-filemanager-app 2017-03-15 15:11:59 +0000 @@ -0,0 +1,15 @@ +# vim:syntax=apparmor +#include <tunables/global> + +# Mostly unconfined. Don't allow capability or any mount rules. Also ensure that +# exec inherits from this profile +profile ubuntu-filemanager-app (attach_disconnected) { + network, + / rwkl, + /** rwlkm, + /** pix, + dbus, + signal, + ptrace, + unix, +} === modified file 'debian/changelog' --- debian/changelog 2015-12-19 07:34:45 +0000 +++ debian/changelog 2017-03-15 15:11:59 +0000 @@ -1,8 +1,12 @@ -ubuntu-filemanager-app (0.4ubuntu1) UNRELEASED; urgency=medium +ubuntu-filemanager-app (0.4ubuntu2) UNRELEASED; urgency=medium + [ Girish Rawat ] * Improved READMEs - -- Girish Rawat <emailgirishra...@gmail.com> Sat, 19 Dec 2015 13:03:56 +0530 + [ renato ] + * + + -- Renato Araujo Oliveira Filho <renato.fi...@canonical.com> Wed, 08 Mar 2017 16:28:53 -0300 ubuntu-filemanager-app (0.4) wily; urgency=medium === modified file 'debian/control' --- debian/control 2015-06-26 19:36:32 +0000 +++ debian/control 2017-03-15 15:11:59 +0000 @@ -3,6 +3,8 @@ Maintainer: Ubuntu App Cats <ubuntu-touch-corea...@lists.launchpad.net> Build-Depends: cmake, debhelper (>= 9), + dh-apparmor, + dh-translations, intltool, qtbase5-dev, qtdeclarative5-dev, @@ -22,9 +24,9 @@ Architecture: any Depends: ${misc:Depends}, ${shlibs:Depends}, + qml-module-pamauthentication0.1 | qtdeclarative5-fm-pamauthentication0.1, qtdeclarative5-nemo-qml-plugin-folderlistmodel, qtdeclarative5-placesmodel0.1, - qtdeclarative5-fm-pamauthentication0.1, qtdeclarative5-archives0.1, qtdeclarative5-qtquick2-plugin, qtdeclarative5-u1db1.0, === modified file 'debian/rules' --- debian/rules 2014-09-08 10:45:41 +0000 +++ debian/rules 2017-03-15 15:11:59 +0000 @@ -9,3 +9,7 @@ override_dh_auto_configure: dh_auto_configure -- -DCLICK_MODE=OFF + +override_dh_install: + dh_install --fail-missing + dh_apparmor -pubuntu-filemanager-app --profile-name=ubuntu-filemanager-app === modified file 'debian/ubuntu-filemanager-app.install' --- debian/ubuntu-filemanager-app.install 2014-02-04 14:25:27 +0000 +++ debian/ubuntu-filemanager-app.install 2017-03-15 15:11:59 +0000 @@ -1,2 +1,3 @@ usr/bin/* usr/share/* +debian/apparmor/ubuntu-filemanager-app etc/apparmor.d === modified file 'src/app/main.cpp' --- src/app/main.cpp 2014-09-09 20:49:04 +0000 +++ src/app/main.cpp 2017-03-15 15:11:59 +0000 @@ -29,6 +29,25 @@ #include <QDebug> +#include <signal.h> +#include <unistd.h> + +void catchUnixSignals(const std::vector<int>& quitSignals, + const std::vector<int>& ignoreSignals = std::vector<int>()) +{ + auto handler = [](int sig) ->void { + Q_UNUSED(sig) + QGuiApplication::quit(); + }; + + for ( int sig : ignoreSignals ) + signal(sig, SIG_IGN); + + for ( int sig : quitSignals ) + signal(sig, handler); +} + + int main(int argc, char *argv[]) { QGuiApplication a(argc, argv); @@ -55,15 +74,8 @@ } QString qmlfile; - // Desktop doesn't have yet Unity8 and so no unity greeter either. Consequently it doesn't - // also have any "PIN code" or "Password" extra authentication. Don't require any extra - // authentication there by default - if (qgetenv("QT_QPA_PLATFORM") != "ubuntumirclient") { - qDebug() << Q_FUNC_INFO << "Running on non-MIR desktop, not requiring authentication by default"; - view.engine()->rootContext()->setContextProperty("noAuthentication", QVariant(true)); - } else { - view.engine()->rootContext()->setContextProperty("noAuthentication", QVariant(false)); - } + // by default no authentication is necessary, if you want to enable authentication use the app arg "--forceAuth true" + view.engine()->rootContext()->setContextProperty("noAuthentication", QVariant(true)); for (int i = 0; i < args.count(); i++) { if (args.at(i) == "-I" && args.count() > i + 1) { QString addedPath = args.at(i+1); @@ -138,5 +150,6 @@ view.setSource(QUrl::fromLocalFile(qmlfile)); view.show(); + catchUnixSignals({SIGQUIT, SIGINT, SIGTERM}); return a.exec(); } === modified file 'src/app/qml/filemanager.qml' --- src/app/qml/filemanager.qml 2016-07-25 12:19:21 +0000 +++ src/app/qml/filemanager.qml 2017-03-15 15:11:59 +0000 @@ -104,10 +104,11 @@ tabs.selectedTabIndex = 0 } - function openFileSelector(selectFolderMode) { + function openFileSelector(selectFolderMode, saveMode) { fileSelector.fileSelectorComponent = pageStack.push(Qt.resolvedUrl("./ui/FolderListPage.qml"), { fileSelectorMode: !selectFolderMode, folderSelectorMode: selectFolderMode, - folder: userplaces.locationHome}) + folder: userplaces.locationHome, + saveMode: saveMode}) } function cancelFileSelector() { @@ -124,7 +125,14 @@ } else { - exportFiles(fileSelector.activeTransfer, fileUrls) + if (exportFiles(fileSelector.activeTransfer, fileUrls)) { + pageStack.pop() + fileSelector.activeTransfer = null + fileSelector.fileSelectorComponent = null + pageStack.currentPage.currentPage.refresh() + fileSelector.importMode = false + } + } } @@ -133,10 +141,11 @@ } function startImport(activeTransfer) { + console.debug("Import requested") if (activeTransfer.state === ContentTransfer.Charged) { fileSelector.activeTransfer = activeTransfer fileSelector.importMode = true - openFileSelector(true) + openFileSelector(true, true) } } @@ -161,9 +170,11 @@ if (activeTransfer !== null) { activeTransfer.items = results activeTransfer.state = ContentTransfer.Charged - console.log("set activeTransfer") + console.debug("Import done") + return true } else { console.log("activeTransfer null, not setting, testing code") + return false } } @@ -172,7 +183,7 @@ target: ContentHub onExportRequested: { fileSelector.activeTransfer = transfer - openFileSelector(false) + openFileSelector(false, false) } onImportRequested: startImport(transfer) onShareRequested: startImport(transfer) @@ -317,6 +328,7 @@ title: (count === 1 ? i18n.tr("File %1").arg(urls[0]) : i18n.tr("%1 Files").arg(count)), text: i18n.tr("Saved to: %1").arg(folder) }) + fileSelector.importMode = false } Keys.onPressed: { === modified file 'src/app/qml/ui/FolderListPage.qml' --- src/app/qml/ui/FolderListPage.qml 2016-10-06 15:06:27 +0000 +++ src/app/qml/ui/FolderListPage.qml 2017-03-15 15:11:59 +0000 @@ -92,7 +92,7 @@ objectName: "createFolder" iconName: "add" text: i18n.tr("New Folder") - visible: folderListPage.__pathIsWritable + visible: folderListPage.__pathIsWritable && !folderListPage.selectionMode onTriggered: { print(text) PopupUtils.open(createFolderDialog, folderListPage) @@ -165,6 +165,7 @@ // Set to true if called as file selector for ContentHub property bool fileSelectorMode: false property bool folderSelectorMode: false + property bool saveMode: false readonly property bool selectionMode: fileSelectorMode || folderSelectorMode property FolderListSelection selectionManager: pageModel.selectionObject() @@ -350,24 +351,32 @@ left: sidebar.right right: parent.right } - height: bottomBarButtons.visible ? bottomBarButtons.height : 0 + height: bottomBarButtons.visible ? bottomBarButtons.height + units.gu(1) : 0 visible: bottomBarButtons.visible + + Divider { + anchors.top: parent.top + height: visible ? units.gu(0.5) : 0 + visible: bottomBarButtons.visible + } } Flow { id: bottomBarButtons - anchors.bottom: bottomBar.bottom - anchors.leftMargin: (parent.width - sidebar.width - childrenRect.width) / 2 - anchors.left: sidebar.right + anchors { + bottom: bottomBar.bottom + leftMargin: (parent.width - sidebar.width - childrenRect.width) / 2 + left: sidebar.right + } width: parent.width - sidebar.width - spacing: units.gu(2) visible: selectionMode || pageModel.onlyAllowedPaths Button { - text: i18n.tr("Select") + text: folderListPage.saveMode ? i18n.tr("Save") : i18n.tr("Select") enabled: (selectionManager.counter > 0) || (folderSelectorMode && folderListPage.__pathIsWritable) visible: selectionMode + color: UbuntuColors.orange onClicked: { var selectedAbsUrls = [] if (folderSelectorMode) {
-- Mailing list: https://launchpad.net/~ubuntu-touch-coreapps-reviewers Post to : ubuntu-touch-coreapps-reviewers@lists.launchpad.net Unsubscribe : https://launchpad.net/~ubuntu-touch-coreapps-reviewers More help : https://help.launchpad.net/ListHelp