on xenial help sign in
Initial work to split Dash to be a separate app
commit15e1c0fe65f32263e072aec359823db98c545a28 authorMichael Zanetti <michael.zanetti@canonical.com> dateWed 23 Jul 2014, 08:54 (12 years ago) parent6015c9c
9 files changed+108−7
CMakeLists.txt+1 data/CMakeLists.txt+5−2 data/unity8-dash.desktop.in+9 debian/unity8.install+1 qml/Dash/DashApplication.qml+13 qml/Dash/ScopeListView.qml−5 src/CMakeLists.txt+1 src/Dash/CMakeLists.txt+12 src/Dash/main.cpp+66
CMakeLists.txt+1
@@ -96,6 +96,7 @@ include(autopilot)
9696declare_autopilot_test(shell unity8.shell ${CMAKE_SOURCE_DIR}/tests/autopilot/)
9797
9898set(SHELL_APP unity8)
99+set(DASH_APP unity8-dash)
99100set(SCOPE_TOOL unity-scope-tool)
100101
101102include_directories(
data/CMakeLists.txt+5−2
@@ -1,7 +1,10 @@
1−# generate desktop file
1+# generate desktop files
22configure_file(${SHELL_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop @ONLY)
3+configure_file(${DASH_APP}.desktop.in ${CMAKE_CURRENT_BINARY_DIR}/${DASH_APP}.desktop @ONLY)
34
45# install desktop files
5−install(FILES ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop
6+install(FILES
7+ ${CMAKE_CURRENT_BINARY_DIR}/${SHELL_APP}.desktop
8+ ${CMAKE_CURRENT_BINARY_DIR}/${DASH_APP}.desktop
69 DESTINATION ${CMAKE_INSTALL_DATADIR}/applications
710 )
data/unity8-dash.desktop.innew file+9
@@ -0,0 +1,9 @@
1+[Desktop Entry]
2+Type=Application
3+Name=Unity 8 Dash
4+Comment=The converged Unity shell dash
5+Exec=@CMAKE_INSTALL_PREFIX@/@CMAKE_INSTALL_BINDIR@/unity8-dash
6+Terminal=false
7+Icon=unity8
8+NoDisplay=true
9+X-Ubuntu-Touch=true
debian/unity8.install+1
@@ -1,5 +1,6 @@
11data/unity8.conf usr/share/upstart/sessions/
22usr/bin/unity8
3+usr/bin/unity8-dash
34usr/share/applications/unity8.desktop
45usr/share/unity8/Greeter
56usr/share/unity8/Hud
qml/Dash/DashApplication.qmlnew file+13
@@ -0,0 +1,13 @@
1+import QtQuick 2.2
2+import Ubuntu.Components 1.0
3+
4+MainView {
5+ width: units.gu(40)
6+ height: units.gu(71)
7+
8+ useDeprecatedToolbar: false
9+
10+ Dash {
11+ anchors.fill: parent
12+ }
13+}
qml/Dash/ScopeListView.qml−5
@@ -20,9 +20,4 @@ import Dash 0.1
2020ListViewWithPageHeader {
2121 maximumFlickVelocity: height * 10
2222 flickDeceleration: height * 2
23−
24− Connections {
25− target: greeter
26− onShownChanged: if (greeter.shown) showHeader()
27− }
2823}
src/CMakeLists.txt+1
@@ -35,3 +35,4 @@ install(TARGETS ${SHELL_APP}
3535 )
3636
3737add_subdirectory(Panel)
38+add_subdirectory(Dash)
src/Dash/CMakeLists.txtnew file+12
@@ -0,0 +1,12 @@
1+set(DASH_SRCS
2+ main.cpp
3+)
4+
5+add_executable(unity8-dash ${DASH_SRCS})
6+
7+qt5_use_modules(unity8-dash Gui Qml Quick Test)
8+
9+# install binaries
10+install(TARGETS ${DASH_APP}
11+ RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
12+)
src/Dash/main.cppnew file+66
@@ -0,0 +1,66 @@
1+/*
2+ * Copyright (C) 2014 Canonical, Ltd.
3+ *
4+ * Authors:
5+ * Michael Zanetti <michael.zanetti@canonical.com>
6+ *
7+ * This program is free software; you can redistribute it and/or modify
8+ * it under the terms of the GNU General Public License as published by
9+ * the Free Software Foundation; version 3.
10+ *
11+ * This program is distributed in the hope that it will be useful,
12+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
13+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14+ * GNU General Public License for more details.
15+ *
16+ * You should have received a copy of the GNU General Public License
17+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
18+ */
19+
20+// Qt
21+//#include <QCommandLineParser>
22+#include <QtQuick/QQuickView>
23+#include <QtGui/QGuiApplication>
24+#include <QtQml/QQmlEngine>
25+#include <QtQml/QQmlContext>
26+//#include <qpa/qplatformnativeinterface.h>
27+//#include <QLibrary>
28+#include <QDebug>
29+//#include <libintl.h>
30+//#include <dlfcn.h>
31+//#include <csignal>
32+
33+//// local
34+#include <paths.h>
35+//#include "MouseTouchAdaptor.h"
36+//#include "ApplicationArguments.h"
37+
38+//#include <unity-mir/qmirserver.h>
39+
40+
41+int main(int argc, const char *argv[])
42+{
43+ QGuiApplication *application = new QGuiApplication(argc, (char**)argv);
44+
45+ QQuickView* view = new QQuickView();
46+ view->setResizeMode(QQuickView::SizeRootObjectToView);
47+ view->setTitle("Unity Dash");
48+// view->engine()->setBaseUrl(QUrl::fromLocalFile(::qmlDirectory()));
49+// view->rootContext()->setContextProperty("applicationArguments", &qmlArgs);
50+
51+ QUrl source(::qmlDirectory()+"Dash/DashApplication.qml");
52+ prependImportPaths(view->engine(), ::overrideImportPaths());
53+ appendImportPaths(view->engine(), ::fallbackImportPaths());
54+
55+ view->setSource(source);
56+ view->show();
57+
58+ int result = application->exec();
59+
60+ qDebug() << "fooooooooooo" << result;
61+
62+ delete view;
63+ delete application;
64+
65+ return result;
66+}