Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
[packaging] move to libglacierapp
  • Loading branch information
neochapay committed Mar 12, 2018
1 parent 472d3bf commit 3cab337
Show file tree
Hide file tree
Showing 16 changed files with 146 additions and 151 deletions.
2 changes: 1 addition & 1 deletion glacier-dialer.desktop
Expand Up @@ -6,7 +6,7 @@ Terminal=false
Name=Glacier Dialer
X-MeeGo-Logical-Id=voicecall-ap-name
X-MeeGo-Translation-Catalog=voicecall
Exec=env QT_QUICK_CONTROLS_STYLE=Nemo /usr/bin/glacier-dialer
Exec=/usr/bin/glacier-dialer
Icon=icon-app-dialer
X-Window-Icon=
X-HildonDesk-ShowInToolbar=true
Expand Down
28 changes: 12 additions & 16 deletions glacier-dialer.pro
Expand Up @@ -4,21 +4,23 @@ QT += qml quick dbus
SOURCES += src/glacier-dialer.cpp \
src/dbusadaptor.cpp

LIBS += -lglacierapp

HEADERS += src/dbusadaptor.h

OTHER_FILES += qml/glacier-dialer.qml \
qml/pages/FirstPage.qml \
rpm/glacier-dialer.spec \
glacier-dialer.desktop \
qml/pages/DialerButton.qml \
org.glacier.voicecall.ui.service \
qml/pages/CallLogPage.qml \
qml/pages/LogDelegate.qml \
qml/pages/CallView.qml \
qml/pages/DialerPage.qml \
qml/pages/ContactsPage.qml \
qml/pages/ContactDelegate.qml \
qml/pages/ContactDetails.qml
qml/pages/ContactDetails.qml \
qml/components/DialerButton.qml \
rpm/glacier-dialer.spec \
glacier-dialer.desktop \
org.glacier.voicecall.ui.service

target.path = /usr/bin

Expand All @@ -28,17 +30,8 @@ desktop.path = /usr/share/applications
qml.files = qml/glacier-dialer.qml
qml.path = /usr/share/glacier-dialer/qml

pages.files = qml/pages/FirstPage.qml \
qml/pages/SecondPage.qml \
qml/pages/DialerButton.qml \
qml/pages/CallLogPage.qml \
qml/pages/LogDelegate.qml \
qml/pages/CallView.qml \
qml/pages/DialerPage.qml \
qml/pages/ContactsPage.qml \
qml/pages/ContactDelegate.qml \
qml/pages/ContactDetails.qml
pages.path = /usr/share/glacier-dialer/qml/pages
pages.files = qml
pages.path = /usr/share/glacier-dialer/

systemd_dbus_service.path = $${INSTALL_ROOT}/usr/share/dbus-1/services
systemd_dbus_service.files = org.glacier.voicecall.ui.service
Expand All @@ -47,3 +40,6 @@ systemd_ui_prestart_service.path = $${INSTALL_ROOT}/usr/lib/systemd/user
systemd_ui_prestart_service.files = voicecall-ui-prestart.service

INSTALLS += target desktop qml pages systemd_dbus_service systemd_ui_prestart_service

CONFIG += link_pkgconfig
PKGCONFIG += glacierapp
2 changes: 1 addition & 1 deletion org.glacier.voicecall.ui.service
@@ -1,3 +1,3 @@
[D-BUS Service]
Name=org.glacier.voicecall.ui
Exec=/usr/bin/glacier-dialer -prestart
Exec=/usr/bin/glacier-dialer --prestart
43 changes: 15 additions & 28 deletions qml/pages/DialerButton.qml → qml/components/DialerButton.qml
Expand Up @@ -17,20 +17,20 @@
* Boston, MA 02110-1301, USA.
*/

import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
import QtQuick.Layouts 1.0

import org.nemomobile.contacts 1.0

Rectangle {
id: btn
Layout.fillWidth: true
Layout.fillHeight: true
Layout.preferredHeight: 140
Layout.preferredWidth: 140

color: "transparent"

radius: height/2

property int index
property string text: {
if (index <= 8) {
Expand All @@ -39,34 +39,18 @@ Rectangle {

if (index > 8) {
switch(index) {
case 9: return "+";
case 9: return "*";
case 10: return "0";
case 11: return "*";
case 11: return "#";
}
}
}
property Person person
onPersonChanged: {
person.avatarPathChanged.connect(avatarPotentiallyChanged)
avatarPotentiallyChanged()
}
function avatarPotentiallyChanged() {
if (person == null || person.avatarPath == "image://theme/icon-m-telephony-contact-avatar")
contactImage.source = "image://theme/icon-m-telephony-contact-avatar"
else
contactImage.source = person.avatarPath
}
Image {
id: contactImage
anchors.fill: parent
}

Text {
id: numberText
color: "steelblue"
color: Theme.textColor
font.pointSize: 72
anchors.right: parent.right
anchors.bottom: parent.bottom
anchors.centerIn: parent
font.bold: true
text: btn.text
style: Text.Outline
Expand All @@ -77,10 +61,13 @@ Rectangle {
anchors.fill: parent
onClicked: {
dialedNumber.insert(dialedNumber.cursorPosition,btn.text)
btn.color = Theme.accentColor
}
onPressAndHold: {
var normalizedNumber = person.phoneDetails[0].normalizedNumber
telephone.dial(telephone.defaultProviderId, normalizedNumber)

}
onReleased: {
btn.color = Theme.backgroundColor
}
}
}
3 changes: 2 additions & 1 deletion qml/glacier-dialer.qml
Expand Up @@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/

import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Window 2.1
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
Expand Down Expand Up @@ -56,6 +56,7 @@ ApplicationWindow
__window.setTitle("Dialer")
if(!__window.visible)
{
console.log("SHOW ME!!!")
main.activationReason = "activeVoiceCallChanged"
__window.showFullScreen()
} else {
Expand Down
4 changes: 2 additions & 2 deletions qml/pages/CallLogPage.qml
Expand Up @@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/

import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
Expand All @@ -29,7 +29,7 @@ Page {
id: callLogPage
headerTools: HeaderToolsLayout {
id: tools
title: "Call log"
title: qsTr("Call log")
showBackButton: true;
}

Expand Down
8 changes: 4 additions & 4 deletions qml/pages/CallView.qml
Expand Up @@ -16,7 +16,7 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
Expand All @@ -28,7 +28,7 @@ Page {
id: call
headerTools: HeaderToolsLayout {
id: tools
title: "Call"
title: qsTr("Call")
}
state: telephone.activeVoiceCall ? telephone.activeVoiceCall.statusText : 'disconnected'
states: [
Expand Down Expand Up @@ -91,14 +91,14 @@ Page {
spacing: 40
anchors.horizontalCenter: parent.horizontalCenter
Button {
text: "Answer"
text: qsTr("Answer")
Layout.fillWidth: true
Layout.fillHeight: false
onClicked: if (telephone.activeVoiceCall) telephone.activeVoiceCall.answer()
visible: call.state == "incoming"
}
Button {
text: "Hang up"
text: qsTr("Hang up")
Layout.fillWidth: true
Layout.fillHeight: false
onClicked: {
Expand Down
2 changes: 1 addition & 1 deletion qml/pages/ContactDelegate.qml
Expand Up @@ -16,7 +16,7 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
Expand Down
8 changes: 4 additions & 4 deletions qml/pages/ContactDetails.qml
Expand Up @@ -16,7 +16,7 @@
* the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
* Boston, MA 02110-1301, USA.
*/
import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
Expand Down Expand Up @@ -51,19 +51,19 @@ Page {
anchors.horizontalCenter: parent.horizontalCenter
}
Label {
text: "First name"
text: qsTr("First name")
}
TextField {
text: person.firstName
}
Label {
text: "Last name"
text: qsTr("Last name")
}
TextField {
text: person.lastName
}
Label {
text: "Phone number"
text: qsTr("Phone number")
}
TextField {
text: person.phoneDetails[0].normalizedNumber
Expand Down
2 changes: 1 addition & 1 deletion qml/pages/ContactsPage.qml
Expand Up @@ -17,7 +17,7 @@
* Boston, MA 02110-1301, USA.
*/

import QtQuick 2.1
import QtQuick 2.6
import QtQuick.Controls 1.0
import QtQuick.Controls.Nemo 1.0
import QtQuick.Controls.Styles.Nemo 1.0
Expand Down

0 comments on commit 3cab337

Please sign in to comment.