[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[GNUnet-SVN] r34169 - in gnunet-qt/SecureShare: preferences qml
From: |
gnunet |
Subject: |
[GNUnet-SVN] r34169 - in gnunet-qt/SecureShare: preferences qml |
Date: |
Mon, 18 Aug 2014 19:50:12 +0200 |
Author: bratao
Date: 2014-08-18 19:50:12 +0200 (Mon, 18 Aug 2014)
New Revision: 34169
Added:
gnunet-qt/SecureShare/qml/CreateRoom.qml
gnunet-qt/SecureShare/qml/JoinRoom.qml
Removed:
gnunet-qt/SecureShare/qml/createRoom.qml
gnunet-qt/SecureShare/qml/joinRoom.qml
Modified:
gnunet-qt/SecureShare/preferences/preferences.cpp
Log:
Fix Linux naming and Preferences on multiple egos
Modified: gnunet-qt/SecureShare/preferences/preferences.cpp
===================================================================
--- gnunet-qt/SecureShare/preferences/preferences.cpp 2014-08-18 15:24:58 UTC
(rev 34168)
+++ gnunet-qt/SecureShare/preferences/preferences.cpp 2014-08-18 17:50:12 UTC
(rev 34169)
@@ -23,6 +23,11 @@
#include <QFile>
#include <QFileInfo>
#include <QDir>
+
+#include "core/psyccore.h"
+#include "psyc.h"
+#include "core/identity/identity.h"
+
Preferences::Preferences(QObject *parent) :
QSettings(QSettings::IniFormat, QSettings::UserScope,"PYSC","PYSC", parent)
{
@@ -45,7 +50,11 @@
QDir fileDir = fi.dir();
QString fileDirStr = fileDir.absolutePath();
- return fileDirStr;
+
+ Identity* iden = theApp->identity();
+
+
+ return fileDirStr + iden->name();
}
Copied: gnunet-qt/SecureShare/qml/CreateRoom.qml (from rev 34164,
gnunet-qt/SecureShare/qml/createRoom.qml)
===================================================================
--- gnunet-qt/SecureShare/qml/CreateRoom.qml (rev 0)
+++ gnunet-qt/SecureShare/qml/CreateRoom.qml 2014-08-18 17:50:12 UTC (rev
34169)
@@ -0,0 +1,189 @@
+import QtQuick.Window 2.1;
+import QtQuick 2.2
+import QtQuick.Controls 1.1
+import QtQuick.Layouts 1.1
+import Psyc 1.0
+
+Rectangle {
+ anchors.fill: parent
+ id: createRoomWnd
+
+ property var selected: 0
+
+
+ FontLoader { id: ubuntuFont; source: "fonts/Ubuntu-R.ttf" }
+
+ Rectangle{
+ id:headerBanner
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: 60
+ color: "white"
+
+
+ Image {
+ id: imageBanner
+ source: "images/new.png"
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.margins: 5
+ height: 42
+ width: 42
+ fillMode: Image.PreserveAspectFit
+
+ }
+
+ Label{
+ text: "Create Chat"
+ anchors.left: imageBanner.right
+ anchors.leftMargin: 5
+ anchors.top: parent.top
+ anchors.topMargin: 10
+ font.family: ubuntuFont.name
+ font.pointSize: 22
+ wrapMode : Text.Wrap
+ elide : Text.ElideRight
+ }
+
+ }
+ Rectangle{
+ anchors.top: headerBanner.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: 1
+ color: "#D1D1D1"
+
+ }
+
+
+ Item {
+ id: container
+ anchors.top: headerBanner.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+
+ Item{
+ id:infoRow
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.margins: 10
+ height: infoLabel.height
+
+
+
+ Label {
+ id: infoLabel
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ wrapMode : Text.Wrap
+ text: "Please enter the appropriate information about the room
you would like to create."
+ }
+
+
+ }
+
+
+
+ ColumnLayout{
+ id:dataRow
+ anchors.top: infoRow.bottom
+ anchors.left: infoRow.left
+ anchors.right: infoRow.right
+ anchors.topMargin: 10
+
+ Row{
+ spacing: 2
+ Label {
+ id: nameLabel
+ text: "Name:"
+ width: 80
+ }
+
+ TextField{
+ id: nameField
+ height: 20
+ width: 150
+
+ }
+ }
+
+ Row{
+ spacing: 2
+ Label {
+ id: expirationLabel
+ text: "Expiration:"
+ width: 80
+ }
+
+ TextField{
+ id: expirationField
+ height: 20
+ width: 150
+ inputMethodHints: Qt.ImhDigitsOnly
+
+ }
+ }
+ Row{
+ spacing: 2
+ Label {
+ id: policyLabel
+ text: "Policy:"
+ width: 100
+ }
+
+ ComboBox {
+ id: policyCombo
+ currentIndex: 2
+ model: ListModel {
+ id: cbItems
+ ListElement { text: "Anonymous channel";}
+ ListElement { text: "Private channel"; }
+ ListElement { text: "Closed channel";}
+ ListElement { text: "Public channel";}
+ }
+ width: 200
+ }
+ }
+ Row{
+ spacing: 2
+ Label {
+ id: passwordLabel
+ text: "Password:"
+ width: 100
+ }
+
+ TextField{
+ id: passwordField
+ echoMode :TextInput.Password
+ height: 20
+ width: 200
+
+ }
+ }
+
+
+ }
+
+
+
+ Row{
+ anchors.top: dataRow.bottom
+ anchors.left: parent.left
+ spacing: 2
+
+ Button{
+ text: "Create"
+ width: 200
+
+ onClicked: {
+ Psyc.gnunet.social.createPlace(nameField.text)
+ }
+ }
+ }
+ }
+
+}
Copied: gnunet-qt/SecureShare/qml/JoinRoom.qml (from rev 34159,
gnunet-qt/SecureShare/qml/joinRoom.qml)
===================================================================
--- gnunet-qt/SecureShare/qml/JoinRoom.qml (rev 0)
+++ gnunet-qt/SecureShare/qml/JoinRoom.qml 2014-08-18 17:50:12 UTC (rev
34169)
@@ -0,0 +1,228 @@
+import QtQuick.Window 2.1;
+import QtQuick 2.2
+import QtQuick.Controls 1.1
+import QtQuick.Layouts 1.1
+import Psyc 1.0
+
+
+
+Rectangle {
+
+ anchors.fill: parent
+ id: joinRoomWnd
+
+ property var selected: 0
+
+
+
+ FontLoader { id: ubuntuFont; source: "fonts/Ubuntu-R.ttf" }
+
+ Rectangle{
+ id:headerBanner
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: 60
+ color: "white"
+
+
+ Image {
+ id: imageBanner
+ source: "images/enter.png"
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.margins: 5
+ height: 42
+ width: 42
+ fillMode: Image.PreserveAspectFit
+
+ }
+
+ Label{
+ text: "Join Chat"
+ anchors.left: imageBanner.right
+ anchors.leftMargin: 5
+ anchors.top: parent.top
+ anchors.topMargin: 10
+ font.family: ubuntuFont.name
+ font.pointSize: 22
+ wrapMode : Text.Wrap
+ elide : Text.ElideRight
+ }
+
+ }
+ Rectangle{
+ anchors.top: headerBanner.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ height: 1
+ color: "#D1D1D1"
+
+ }
+
+ Item {
+ id: container
+ anchors.top: headerBanner.bottom
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.bottom: parent.bottom
+
+ Item{
+ id:infoRow
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.margins: 10
+ height: infoLabel.height
+
+
+ Label {
+ id: infoLabel
+ anchors.top: parent.top
+ anchors.left: parent.left
+ anchors.right: parent.right
+ wrapMode : Text.Wrap
+ text: "Please enter the appropriate information about the chat
you would like to join."
+ }
+
+
+ }
+
+
+ Row{
+ id:typeRow
+ anchors.top: infoRow.bottom
+ anchors.left: infoRow.left
+ anchors.right: infoRow.right
+ anchors.topMargin: 10
+ spacing: 5
+
+
+ ExclusiveGroup { id: group
+
+ }
+
+
+ Label {
+ id: typeLabel
+ text: "Type: "
+ }
+
+ RadioButton {
+ text: qsTr("GNS")
+ exclusiveGroup: group
+ checked: true
+
+
+ onCheckedChanged: {
+ if(checked)
+ selected = 0
+ else
+ selected = 1
+ }
+ }
+ RadioButton {
+ text: qsTr("List of peers")
+ exclusiveGroup: group
+ }
+ }
+
+
+
+ ColumnLayout{
+ id:dataRow
+ anchors.top: typeRow.bottom
+ anchors.left: typeRow.left
+ anchors.right: typeRow.right
+ anchors.topMargin: 10
+
+ Row{
+ visible: (selected == 0) ? true : false
+ spacing: 2
+ Label {
+ id: gnsLabel
+ text: "GNS address:"
+ width: 80
+ }
+
+ TextField{
+ id: gnsField
+ height: 20
+ width: 150
+
+ }
+ }
+ Row{
+ visible: (selected == 1) ? true : false
+ spacing: 2
+ Label {
+ id: publicKeyLabel
+ text: "Public Key:"
+ width: 100
+ }
+
+ TextField{
+ id: publicKeyField
+ height: 20
+ width: 200
+
+ }
+ }
+ Row{
+ visible: (selected == 1) ? true : false
+ spacing: 2
+ Label {
+ id: originLabel
+ text: "Origin (Empty will join local peer):"
+ width: 100
+ }
+
+ TextField{
+ id: originField
+ height: 20
+ width: 200
+
+ }
+ }
+
+ Row{
+ visible: (selected == 1) ? true : false
+ spacing: 2
+ Label {
+ id: relaysLabel
+ text: "Relays:"
+ width: 100
+ }
+
+ TextArea{
+ id: relaysField
+ height: 100
+ width: 200
+
+ }
+ }
+
+
+ }
+
+
+
+ Row{
+ anchors.top: dataRow.bottom
+ anchors.topMargin: 10
+ anchors.right: parent.right
+ anchors.left: parent.left
+ spacing: 2
+
+ Button{
+ text: "Join"
+ width: 200
+
+ onClicked: {
+ Psyc.gnunet.social.enterRoom(publicKeyField.text, "bla")
+ }
+ }
+ }
+ }
+
+}
Deleted: gnunet-qt/SecureShare/qml/createRoom.qml
===================================================================
--- gnunet-qt/SecureShare/qml/createRoom.qml 2014-08-18 15:24:58 UTC (rev
34168)
+++ gnunet-qt/SecureShare/qml/createRoom.qml 2014-08-18 17:50:12 UTC (rev
34169)
@@ -1,189 +0,0 @@
-import QtQuick.Window 2.1;
-import QtQuick 2.2
-import QtQuick.Controls 1.1
-import QtQuick.Layouts 1.1
-import Psyc 1.0
-
-Rectangle {
- anchors.fill: parent
- id: createRoomWnd
-
- property var selected: 0
-
-
- FontLoader { id: ubuntuFont; source: "fonts/Ubuntu-R.ttf" }
-
- Rectangle{
- id:headerBanner
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- height: 60
- color: "white"
-
-
- Image {
- id: imageBanner
- source: "images/new.png"
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.margins: 5
- height: 42
- width: 42
- fillMode: Image.PreserveAspectFit
-
- }
-
- Label{
- text: "Create Chat"
- anchors.left: imageBanner.right
- anchors.leftMargin: 5
- anchors.top: parent.top
- anchors.topMargin: 10
- font.family: ubuntuFont.name
- font.pointSize: 22
- wrapMode : Text.Wrap
- elide : Text.ElideRight
- }
-
- }
- Rectangle{
- anchors.top: headerBanner.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- height: 1
- color: "#D1D1D1"
-
- }
-
-
- Item {
- id: container
- anchors.top: headerBanner.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
-
- Item{
- id:infoRow
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: 10
- height: infoLabel.height
-
-
-
- Label {
- id: infoLabel
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- wrapMode : Text.Wrap
- text: "Please enter the appropriate information about the room
you would like to create."
- }
-
-
- }
-
-
-
- ColumnLayout{
- id:dataRow
- anchors.top: infoRow.bottom
- anchors.left: infoRow.left
- anchors.right: infoRow.right
- anchors.topMargin: 10
-
- Row{
- spacing: 2
- Label {
- id: nameLabel
- text: "Name:"
- width: 80
- }
-
- TextField{
- id: nameField
- height: 20
- width: 150
-
- }
- }
-
- Row{
- spacing: 2
- Label {
- id: expirationLabel
- text: "Expiration:"
- width: 80
- }
-
- TextField{
- id: expirationField
- height: 20
- width: 150
- inputMethodHints: Qt.ImhDigitsOnly
-
- }
- }
- Row{
- spacing: 2
- Label {
- id: policyLabel
- text: "Policy:"
- width: 100
- }
-
- ComboBox {
- id: policyCombo
- currentIndex: 2
- model: ListModel {
- id: cbItems
- ListElement { text: "Anonymous channel";}
- ListElement { text: "Private channel"; }
- ListElement { text: "Closed channel";}
- ListElement { text: "Public channel";}
- }
- width: 200
- }
- }
- Row{
- spacing: 2
- Label {
- id: passwordLabel
- text: "Password:"
- width: 100
- }
-
- TextField{
- id: passwordField
- echoMode :TextInput.Password
- height: 20
- width: 200
-
- }
- }
-
-
- }
-
-
-
- Row{
- anchors.top: dataRow.bottom
- anchors.left: parent.left
- spacing: 2
-
- Button{
- text: "Create"
- width: 200
-
- onClicked: {
- Psyc.gnunet.social.createPlace(nameField.text)
- }
- }
- }
- }
-
-}
Deleted: gnunet-qt/SecureShare/qml/joinRoom.qml
===================================================================
--- gnunet-qt/SecureShare/qml/joinRoom.qml 2014-08-18 15:24:58 UTC (rev
34168)
+++ gnunet-qt/SecureShare/qml/joinRoom.qml 2014-08-18 17:50:12 UTC (rev
34169)
@@ -1,228 +0,0 @@
-import QtQuick.Window 2.1;
-import QtQuick 2.2
-import QtQuick.Controls 1.1
-import QtQuick.Layouts 1.1
-import Psyc 1.0
-
-
-
-Rectangle {
-
- anchors.fill: parent
- id: joinRoomWnd
-
- property var selected: 0
-
-
-
- FontLoader { id: ubuntuFont; source: "fonts/Ubuntu-R.ttf" }
-
- Rectangle{
- id:headerBanner
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- height: 60
- color: "white"
-
-
- Image {
- id: imageBanner
- source: "images/enter.png"
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.margins: 5
- height: 42
- width: 42
- fillMode: Image.PreserveAspectFit
-
- }
-
- Label{
- text: "Join Chat"
- anchors.left: imageBanner.right
- anchors.leftMargin: 5
- anchors.top: parent.top
- anchors.topMargin: 10
- font.family: ubuntuFont.name
- font.pointSize: 22
- wrapMode : Text.Wrap
- elide : Text.ElideRight
- }
-
- }
- Rectangle{
- anchors.top: headerBanner.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- height: 1
- color: "#D1D1D1"
-
- }
-
- Item {
- id: container
- anchors.top: headerBanner.bottom
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.bottom: parent.bottom
-
- Item{
- id:infoRow
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- anchors.margins: 10
- height: infoLabel.height
-
-
- Label {
- id: infoLabel
- anchors.top: parent.top
- anchors.left: parent.left
- anchors.right: parent.right
- wrapMode : Text.Wrap
- text: "Please enter the appropriate information about the chat
you would like to join."
- }
-
-
- }
-
-
- Row{
- id:typeRow
- anchors.top: infoRow.bottom
- anchors.left: infoRow.left
- anchors.right: infoRow.right
- anchors.topMargin: 10
- spacing: 5
-
-
- ExclusiveGroup { id: group
-
- }
-
-
- Label {
- id: typeLabel
- text: "Type: "
- }
-
- RadioButton {
- text: qsTr("GNS")
- exclusiveGroup: group
- checked: true
-
-
- onCheckedChanged: {
- if(checked)
- selected = 0
- else
- selected = 1
- }
- }
- RadioButton {
- text: qsTr("List of peers")
- exclusiveGroup: group
- }
- }
-
-
-
- ColumnLayout{
- id:dataRow
- anchors.top: typeRow.bottom
- anchors.left: typeRow.left
- anchors.right: typeRow.right
- anchors.topMargin: 10
-
- Row{
- visible: (selected == 0) ? true : false
- spacing: 2
- Label {
- id: gnsLabel
- text: "GNS address:"
- width: 80
- }
-
- TextField{
- id: gnsField
- height: 20
- width: 150
-
- }
- }
- Row{
- visible: (selected == 1) ? true : false
- spacing: 2
- Label {
- id: publicKeyLabel
- text: "Public Key:"
- width: 100
- }
-
- TextField{
- id: publicKeyField
- height: 20
- width: 200
-
- }
- }
- Row{
- visible: (selected == 1) ? true : false
- spacing: 2
- Label {
- id: originLabel
- text: "Origin (Empty will join local peer):"
- width: 100
- }
-
- TextField{
- id: originField
- height: 20
- width: 200
-
- }
- }
-
- Row{
- visible: (selected == 1) ? true : false
- spacing: 2
- Label {
- id: relaysLabel
- text: "Relays:"
- width: 100
- }
-
- TextArea{
- id: relaysField
- height: 100
- width: 200
-
- }
- }
-
-
- }
-
-
-
- Row{
- anchors.top: dataRow.bottom
- anchors.topMargin: 10
- anchors.right: parent.right
- anchors.left: parent.left
- spacing: 2
-
- Button{
- text: "Join"
- width: 200
-
- onClicked: {
- Psyc.gnunet.social.enterRoom(publicKeyField.text, "bla")
- }
- }
- }
- }
-
-}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [GNUnet-SVN] r34169 - in gnunet-qt/SecureShare: preferences qml,
gnunet <=