[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    [ring-kde] src: doc: Add a better welcome page
From:       Emmanuel Lepage Vallee <null () kde ! org>
Date:       2017-08-01 3:31:05
Message-ID: E1dcNth-00018Q-0A () code ! kde ! org
[Download RAW message or body]

Git commit 2cbfab6030e0b415e4fa691789527db3b61ea2c1 by Emmanuel Lepage Vallee.
Committed on 01/08/2017 at 03:30.
Pushed by lepagevalleeemmanuel into branch 'master'.

doc: Add a better welcome page

A  +0    -0    src/timeline/assets/newcontact.png
A  +0    -0    src/timeline/assets/search.png
A  +46   -0    src/timeline/assets/welcome.html
A  +27   -0    src/timeline/qml/firstrun.qml     [License: GPL (v3+)]
M  +7    -0    src/timeline/qml/viewcontact.qml
M  +2    -0    src/timeline/recentdock.qrc
M  +10   -2    src/timelinewindow.cpp

https://commits.kde.org/ring-kde/2cbfab6030e0b415e4fa691789527db3b61ea2c1

diff --git a/src/timeline/assets/newcontact.png b/src/timeline/assets/newcontact.png
new file mode 100644
index 00000000..e69de29b
diff --git a/src/timeline/assets/search.png b/src/timeline/assets/search.png
new file mode 100644
index 00000000..e69de29b
diff --git a/src/timeline/assets/welcome.html b/src/timeline/assets/welcome.html
new file mode 100644
index 00000000..d270057b
--- /dev/null
+++ b/src/timeline/assets/welcome.html
@@ -0,0 +1,46 @@
+<center><img src="ring-kde.svg" /></center>
+<h2> Welcome to Ring-KDE </h2>
+<p>Before you begin, here's a quick summary of how to use this application.</p>
+<p>
+    On your left, you can find the "find someone" field. In this field, you can
+    find your friends using:
+    <ul>
+         <li> Their registered Ring username </li>
+         <li> Their unique Ring number identifier </li>
+         <li> Their phone number </li>
+         <li> Their name </li>
+     </ul>
+    <br />
+    <br />
+    <center><img src="assets/search.png" /></center>
+    <br />
+    <br />
+    You can also import exiting contacts from most application using the
+    standard "vCard" format. Alternatively, you can use the "Add contact" button
+    located in the toolbar located above this message
+
+    <br />
+    <br />
+    <center><img src="assets/newcontact.png" /></center>
+    <br />
+    <br />.</p>
+<p>
+    Many privacy concerned users don't like answer calls from strangers. If it
+    the first time you contact them using Ring, you should send them a
+    "contact request" using the button located in the search result interface
+    This will send them your user profile so they know who's calling
+</p>
+<p>
+    If you wish to contact your friends using their real phone numbers, you
+    can register an account to one of the thousands provider of "SIP" account
+    located across the world. If you work in an office, you can also contact
+    your system administrator to configure Ring-KDE to be able to receive your
+    office phone calls on your computer
+</p>
+<p>
+    Ring-KDE is build entirely using standard compliant technologies. All of
+    your data never leave your computer and is readable using various third
+    party application. If you wish to keep your account, don't forget to
+    export it somewhere safe. If you format your computer without having the
+    account on another device, it will be lost forever
+</p>
diff --git a/src/timeline/qml/firstrun.qml b/src/timeline/qml/firstrun.qml
new file mode 100644
index 00000000..21d0f002
--- /dev/null
+++ b/src/timeline/qml/firstrun.qml
@@ -0,0 +1,27 @@
+/***************************************************************************
+ *   Copyright (C) 2017 by Bluesystems                                     *
+ *   Author : Emmanuel Lepage Vallee <elv1313@gmail.com>                   *
+ *                                                                         *
+ *   This program is free software; you can redistribute it and/or modify  *
+ *   it under the terms of the GNU General Public License as published by  *
+ *   the Free Software Foundation; either version 3 of the License, or     *
+ *   (at your option) any later version.                                   *
+ *                                                                         *
+ *   This program is distributed in the hope that it will be useful,       *
+ *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
+ *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
+ *   GNU General Public License for more details.                          *
+ *                                                                         *
+ *   You should have received a copy of the GNU General Public License     *
+ *   along with this program.  If not, see <http://www.gnu.org/licenses/>. *
+ **************************************************************************/
+import QtQuick 2.7
+
+Rectangle {
+   Text {
+       anchors.fill: parent
+       color: activePalette.text
+       wrapMode: Text.WordWrap
+       text: welcomeMessage
+   }
+}
diff --git a/src/timeline/qml/viewcontact.qml b/src/timeline/qml/viewcontact.qml
index 0132d36a..ae55431b 100644
--- a/src/timeline/qml/viewcontact.qml
+++ b/src/timeline/qml/viewcontact.qml
@@ -120,6 +120,13 @@ Rectangle {
 //         }
 //     }
 
+    FirstRun {
+        anchors.fill: parent
+        z: 99999
+        color: activePalette.base
+        visible: currentContactMethod == null || currentContactMethod.isSelf
+    }
+
     ColumnLayout {
         anchors.fill: parent
 
diff --git a/src/timeline/recentdock.qrc b/src/timeline/recentdock.qrc
index fb24df84..52cdd314 100644
--- a/src/timeline/recentdock.qrc
+++ b/src/timeline/recentdock.qrc
@@ -26,9 +26,11 @@
         <file alias="Slideshow.qml">qml/slideshow.qml</file>
         <file alias="Thumbnail.qml">qml/thumbnail.qml</file>
         <file alias="HistoryCallIcon.qml">qml/historycallicon.qml</file>
+        <file alias="FirstRun.qml">qml/firstrun.qml</file>
         <file alias="Style/Style.qml">qml/Style/Style.qml</file>
         <file alias="Style/qmldir">qml/Style/qmldir</file>
         <file>icons/bookmarked.svg</file>
         <file>icons/not_bookmarked.svg</file>
+        <file>assets/welcome.html</file>
     </qresource>
 </RCC>
diff --git a/src/timelinewindow.cpp b/src/timelinewindow.cpp
index 595195a6..42563106 100644
--- a/src/timelinewindow.cpp
+++ b/src/timelinewindow.cpp
@@ -21,6 +21,8 @@
 #include <QtCore/QTimer>
 #include <QtCore/QDir>
 #include <QtCore/QSortFilterProxyModel>
+#include <QQmlApplicationEngine>
+#include <QQmlContext>
 
 // KDE
 #include <klocalizedstring.h>
@@ -31,6 +33,7 @@
 #include "actioncollection.h"
 #include "widgets/dockbase.h"
 #include "klib/kcfg_settings.h"
+#include "ringapplication.h"
 
 // Models
 #include <categorizedcontactmodel.h>
@@ -58,6 +61,12 @@ TimelineWindow::TimelineWindow()
 
     setAutoSaveSettings();
 
+    // Load the welcome message
+
+    QFile file(":/assets/welcome.html");
+    if (file.open(QIODevice::ReadOnly))
+        RingApplication::engine()->rootContext()->setContextProperty("welcomeMessage", \
file.readAll()); +
     ActionCollection::instance()->setupAction(this);
     // MainWindow
     m_pViewContact = new ViewContactDock(this);
@@ -136,8 +145,7 @@ TimelineWindow::TimelineWindow()
     // There is an HiDPI issue where the size of the dock remains the same
     // (in pixels) even when the ratio is different than 1. Detect and fix
     if (dockWidgetArea(m_pPeersTimeline) == Qt::LeftDockWidgetArea && \
                m_pPeersTimeline->width() < 4.5*logicalDpiX()) {
-        resizeDocks({m_pPeersTimeline}, {4.5*logicalDpiX()}, Qt::Horizontal);
-        qDebug() << "\n\n\nDSFDSFDSF" << logicalDpiX();
+        resizeDocks({m_pPeersTimeline}, {(int)4.5*logicalDpiX()}, Qt::Horizontal);
     }
 }
 


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic