-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add missing file in git, and prepare 0.3.1 release
- Loading branch information
Benoît HERVIER
committed
Mar 22, 2012
1 parent
7d35374
commit aca4f1a
Showing
8 changed files
with
246 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
import QtQuick 1.1 | ||
import com.nokia.meego 1.0 | ||
import "components" | ||
import 'common.js' as Common | ||
|
||
Page { | ||
id: root | ||
|
||
property string filePath; | ||
|
||
tools: commonTools | ||
|
||
PageHeader { | ||
id: header | ||
title: 'KhtSimpleText : New File' | ||
subtitle: Common.beautifulPath(filePath); | ||
} | ||
|
||
Column { | ||
anchors.top: header.bottom | ||
anchors.left: parent.left | ||
anchors.right: parent.right | ||
anchors.bottom: parent.bottom | ||
anchors.margins: 12 | ||
spacing: 12 | ||
|
||
Label { | ||
text: "New file" | ||
} | ||
|
||
TextField { | ||
id: inputField | ||
anchors.left: parent.left | ||
anchors.right: parent.right | ||
placeholderText: "File name" | ||
} | ||
|
||
Button { | ||
anchors.left: parent.left | ||
anchors.right: parent.right | ||
enabled: inputField.text != "" | ||
text: "Create file" | ||
onClicked: { | ||
pageStack.replace(fileEditPage, { filePath: filePath + '/' +inputField.text }); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import QtQuick 1.1 | ||
import com.nokia.meego 1.0 | ||
import "components" | ||
import 'common.js' as Common | ||
|
||
Page { | ||
id: root | ||
|
||
property string filePath; | ||
|
||
tools: commonTools | ||
|
||
PageHeader { | ||
id: header | ||
title: 'KhtSimpleText : New Folder' | ||
subtitle: Common.beautifulPath(filePath); | ||
} | ||
|
||
Column { | ||
anchors.top: header.bottom | ||
anchors.left: parent.left | ||
anchors.right: parent.right | ||
anchors.bottom: parent.bottom | ||
anchors.margins: 12 | ||
spacing: 12 | ||
|
||
Label { | ||
text: "New folder" | ||
} | ||
|
||
TextField { | ||
id: inputField | ||
anchors.left: parent.left | ||
anchors.right: parent.right | ||
placeholderText: "Folder name" | ||
} | ||
|
||
Button { | ||
anchors.left: parent.left | ||
anchors.right: parent.right | ||
enabled: inputField.text != "" | ||
text: "Create folder" | ||
onClicked: { | ||
pageStack.pop(); | ||
if (!QmlFileReaderWriter.newFolder(filePath + inputField.text)) { | ||
errorBanner.text = 'An error occur while creating new folder'; | ||
errorBanner.show();} | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
import QtQuick 1.1 | ||
import com.nokia.meego 1.0 | ||
import "components" | ||
import 'common.js' as Common | ||
|
||
Page { | ||
id: root | ||
|
||
property string filePath; | ||
property string fileName; | ||
|
||
tools: commonTools | ||
|
||
PageHeader { | ||
id: header | ||
title: 'KhtSimpleText : Rename' | ||
subtitle: Common.beautifulPath(filePath); | ||
} | ||
|
||
Column { | ||
anchors.top: header.bottom | ||
anchors.left: parent.left | ||
anchors.right: parent.right | ||
anchors.bottom: parent.bottom | ||
anchors.margins: 12 | ||
spacing: 12 | ||
|
||
Label { | ||
text: 'Rename ' + fileName + ' to :' | ||
} | ||
|
||
TextField { | ||
id: inputField | ||
anchors.left: parent.left | ||
anchors.right: parent.right | ||
placeholderText: fileName | ||
} | ||
|
||
Button { | ||
anchors.left: parent.left | ||
anchors.right: parent.right | ||
enabled: inputField.text != "" | ||
text: "Rename" | ||
onClicked: { | ||
pageStack.pop(); | ||
if (!QmlFileReaderWriter.rename(filePath + fileName, filePath + inputField.text)) | ||
errorRenameBanner.show(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
function beautifulPath(path) { | ||
var filepath = new String(path); | ||
filepath = filepath.replace('file://', ''); | ||
filepath = filepath.replace('/home/user', '~'); | ||
|
||
return filepath; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
import QtQuick 1.1 | ||
import com.nokia.meego 1.0 | ||
//import '../common.js' as Common | ||
|
||
Menu { | ||
id: itemMenu | ||
visualParent: pageStack | ||
|
||
//property PageStack pageStack | ||
property string filePath | ||
property string fileName | ||
|
||
MenuLayout { | ||
MenuItem { | ||
text: qsTr("Copy") | ||
enabled: false | ||
onClicked: ; | ||
} | ||
MenuItem { | ||
text: qsTr("Move") | ||
enabled: false | ||
onClicked: ; | ||
} | ||
MenuItem { | ||
text: qsTr("Rename") | ||
onClicked: pageStack.replace(renameFilePage, { filePath: filePath, fileName: fileName }); | ||
} | ||
MenuItem { | ||
text: qsTr("Delete") | ||
onClicked: { | ||
deleteQueryDialog.filepath = filePath; | ||
deleteQueryDialog.open(); | ||
} | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
import QtQuick 1.1 | ||
import com.nokia.meego 1.0 | ||
|
||
Rectangle { | ||
id:header | ||
|
||
property alias title: headerlabel.text | ||
property alias subtitle: headerpathlabel.text | ||
|
||
anchors.top: parent.top | ||
width:parent.width | ||
height:70 | ||
color:'darkgrey' | ||
z:2 | ||
|
||
Text{ | ||
id:headerlabel | ||
anchors.top: parent.top | ||
anchors.right: parent.right | ||
anchors.left: parent.left | ||
anchors.topMargin: 5 | ||
anchors.leftMargin: 10 | ||
anchors.rightMargin: 50 | ||
font { bold: false; family: "Nokia Pure Text"; pixelSize: 30; } | ||
color:"white" | ||
text:'KhtSimpleText' | ||
} | ||
|
||
Text{ | ||
id:headerpathlabel | ||
anchors.bottom: parent.bottom | ||
anchors.right: parent.right | ||
anchors.left: parent.left | ||
anchors.bottomMargin: 5 | ||
anchors.leftMargin: 10 | ||
anchors.rightMargin: 50 | ||
font { bold: false; family: "Nokia Pure Text"; pixelSize: 16; } | ||
color:"#cc6633" | ||
text:'' | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/python | ||
# -*- coding: utf-8 -*- | ||
|
||
"""KhtSimpleText a plain text editor by Khertan""" | ||
|
||
import khtsimpletext | ||
import sys | ||
|
||
if __name__ == '__main__': | ||
sys.exit(khtsimpletext.KhtSimpleText().exec_()) | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters