Sailfish: Remove obsolete, Qt4-based Sailfish QML UI

The current Sailfish UI is maintained as part of gPodder 4 in
gpodder-core, gpodder-ui-qml and gpodder-sailfish. The code
removed here was part of the old, Qt4-based Sailfish Alpha
SDK-based port that was still using PySide and Python 2.
This commit is contained in:
Thomas Perl 2014-06-28 13:48:13 +02:00
parent 54e876cfb8
commit 91a042b1f6
22 changed files with 9 additions and 243 deletions

6
README
View file

@ -59,7 +59,6 @@
- PySide 1.0.8 or newer http://www.pyside.org/
- Qt Mobility 1.2 or newer http://qt.gitorious.org/qt-mobility
- Qt Quick Components http://qt.gitorious.org/qt-components
- Sailfish Silica Components https://sailfishos.org/sailfish-silica/
The QML UI depends on the QtMultimediaKit QML bindings for playing
back audio (libdeclarative-multimedia in Debian) and on the WebKit QML
@ -75,11 +74,6 @@
elements to be displayed correctly. Alternatively, you can use the free
"darko" theme from: https://github.com/jpavelek/meego-handset-theme-darko
For running gPodder on Sailfish OS using Sailfish Silica Components, you
need to have Sailfish Silica installed. Right now, gPodder still depends on
qt-components even on Sailfish, but this is going to change soon once a
more mature version of Sailfish Silica is out.
[ OPTIONAL DEPENDENCIES ]

View file

@ -121,7 +121,7 @@ def main():
options, args = parser.parse_args(sys.argv)
if options.qml or (gpodder.ui.harmattan or gpodder.ui.sailfish):
if options.qml or gpodder.ui.harmattan:
gpodder.ui.qml = True
else:
gpodder.ui.gtk = True

View file

@ -38,8 +38,7 @@ MOFILES = $(patsubst po/%.po,$(LOCALEDIR)/%/LC_MESSAGES/gpodder.mo, $(POFILES))
UIFILES=$(wildcard share/gpodder/ui/gtk/*.ui)
UIFILES_H=$(subst .ui,.ui.h,$(UIFILES))
QMLFILES=$(wildcard share/gpodder/ui/qml/*.qml \
share/gpodder/ui/qml/harmattan/org/gpodder/qmlui/*.qml \
share/gpodder/ui/qml/sailfish/org/gpodder/qmlui/*.qml)
share/gpodder/ui/qml/harmattan/org/gpodder/qmlui/*.qml)
GETTEXT_SOURCE=$(wildcard src/gpodder/*.py \
src/gpodder/gtkui/*.py \
src/gpodder/gtkui/interface/*.py \

View file

@ -114,15 +114,6 @@ Item {
MouseArea {
id: mouseArea
/**
* Fix to prevent page switch gesture on Sailfish Silica, see
* https://lists.sailfishos.org/pipermail/devel/2013-March/000022.html
**/
drag {
axis: Drag.XAxis
target: Item {}
}
anchors.fill: parent
onClicked: {
root.setProgress(mouse.x / root.width)

View file

@ -97,7 +97,7 @@ SelectableItem {
id: titleBox
text: modelData.qtitle
color: (!isSailfish && counters.newEpisodes)?Config.newColor:'white'
color: counters.newEpisodes?Config.newColor:'white'
anchors {
verticalCenter: parent.verticalCenter

View file

@ -8,7 +8,7 @@ Page {
property bool hasMenu: actions.length > 0
property bool lockToPortrait: false
property alias actions: actionMenu.content
property variant listview // Unused here, see Sailfish UI
property variant listview // Unused here
orientationLock: lockToPortrait?PageOrientation.LockPortrait:PageOrientation.Automatic

View file

@ -1,39 +0,0 @@
import QtQuick 1.1
import Sailfish.Silica 1.0
Item {
id: actionmenu
/* ListView for which this menu is valid */
property variant listview
/* Collect actions from the menu here */
default property alias content: actions.children
Item { id: actions }
/* Show action menu when this function is called */
function open() {
pullDownMenu.open();
}
anchors.fill: parent
PullDownMenu {
id: pullDownMenu
Repeater {
model: actions.children
MenuItem {
text: modelData.text
onClicked: modelData.clicked()
}
}
}
Component.onCompleted: {
pullDownMenu.parent = actionmenu.listview;
}
}

View file

@ -1,7 +0,0 @@
import Sailfish.Silica 1.0
ProgressCircle {
property bool running: false
}

View file

@ -1,6 +0,0 @@
import Sailfish.Silica 1.0
Button {
}

View file

@ -1,9 +0,0 @@
import com.nokia.extras 1.1
/* Right now, Sailfish Silica doesn't have an InfoBanner component */
InfoBanner {
topMargin: 8 + rootWindow.__statusBarHeight
}

View file

@ -1,19 +0,0 @@
import QtQuick 1.1
import Sailfish.Silica 1.0
TextField {
id: textField
property string actionName: ''
inputMethodHints: Qt.ImhNoAutoUppercase
signal accepted()
Keys.onReturnPressed: accepted()
Keys.onEnterPressed: accepted()
function closeVirtualKeyboard() {
textField.platformCloseSoftwareInputPanel()
}
}

View file

@ -1,7 +0,0 @@
import Sailfish.Silica 1.0
Label {
truncationMode: TruncationMode.Fade
}

View file

@ -1,31 +0,0 @@
import Sailfish.Silica 1.0
import QtQuick 1.1
SilicaListView {
id: listView
property string headerText: ''
property int headerHeight: 90
property bool hasRefresh: false // Unused here, see Harmattan UI
signal refresh
header: Item {
id: listViewHeader
height: listView.headerHeight
width: parent.width
Text {
anchors {
verticalCenter: parent.verticalCenter
right: parent.right
margins: 20
}
text: listView.headerText
font.pixelSize: 30
color: "white"
}
}
}

View file

@ -1,24 +0,0 @@
import QtQuick 1.1
import Sailfish.Silica 1.0
Page {
id: pagePage
signal closed
property bool hasMenu: actions.length > 0
property bool lockToPortrait: false
property alias actions: actionMenu.content
property alias listview: actionMenu.listview
allowedOrientations: lockToPortrait?Orientation.Portrait:Orientation.All
function close() {
pageStack.pop();
closed();
}
ActionMenu {
id: actionMenu
}
}

View file

@ -1,6 +0,0 @@
import Sailfish.Silica 1.0
ScrollDecorator {
}

View file

@ -1,25 +0,0 @@
import QtQuick 1.1
import Sailfish.Silica 1.0
Item {
id: settingsSwitch
property alias text: theLabel.text
property alias checked: theSwitch.checked
width: parent.width
height: theSwitch.height
Label {
id: theLabel
anchors.left: parent.left
anchors.right: theSwitch.left
anchors.verticalCenter: parent.verticalCenter
}
Switch {
id: theSwitch
anchors.right: parent.right
}
}

View file

@ -1,28 +0,0 @@
import Sailfish.Silica 1.0
import QtQuick 1.1
ApplicationWindow {
/*cover: Column {
anchors.fill: parent
anchors.topMargin: 40
spacing: 5
Image { source: '../../../../artwork/gpodder200.png'; anchors.horizontalCenter: parent.horizontalCenter }
Text { font.bold: true; font.pixelSize: 15; anchors.horizontalCenter: parent.horizontalCenter; color: 'white'; text: "5 new episodes"; horizontalAlignment: Text.AlignHCenter }
Text { font.bold: true; font.pixelSize: 15; anchors.horizontalCenter: parent.horizontalCenter; color: 'white'; text: "Currently playing: foo"; horizontalAlignment: Text.AlignHCenter }
}
CoverActionList {
enabled: true
CoverAction {
iconSource: "artwork/btn_ffwd.png"
onTriggered: player.togglePlaying()
}
CoverAction {
iconSource: "artwork/btn_fffwd.png"
onTriggered: player.nextSong()
}
}*/
}

View file

@ -1,11 +0,0 @@
ActionMenu 1.0 ActionMenu.qml
InputField 1.0 InputField.qml
PagePage 1.0 PagePage.qml
SettingsSwitch 1.0 SettingsSwitch.qml
WindowWindow 1.0 WindowWindow.qml
ScrollScroll 1.0 ScrollScroll.qml
ListList 1.0 ListList.qml
Label 1.0 Label.qml
Button 1.0 Button.qml
BusyIndicator 1.0 BusyIndicator.qml
InfoBanner 1.0 InfoBanner.qml

View file

@ -87,7 +87,6 @@ user_agent = 'gPodder/%s (+%s)' % (__version__, __url__)
class UI(object):
def __init__(self):
self.harmattan = False
self.sailfish = False
self.gtk = False
self.qml = False
self.cli = False
@ -236,7 +235,6 @@ def detect_platform():
etc_issue = ''
ui.harmattan = ('MeeGo 1.2 Harmattan' in etc_issue)
ui.sailfish = ('Mer release' in etc_issue)
if ui.harmattan and ENV_HOME not in os.environ:
new_home = os.path.expanduser(os.path.join('~', 'MyDocs', 'gPodder'))

View file

@ -1066,13 +1066,9 @@ class qtPodder(QObject):
self.tracker_miner_config)
root_context.setContextProperty('podcastModel', self.podcast_model)
root_context.setContextProperty('episodeModel', self.episode_model)
root_context.setContextProperty('isSailfish', gpodder.ui.sailfish)
for folder in gpodder.ui_folders:
if gpodder.ui.sailfish:
path = os.path.join(folder, 'sailfish')
else:
path = os.path.join(folder, 'harmattan')
path = os.path.join(folder, 'harmattan')
if os.path.exists(path):
logger.info('Adding QML Import Path: %s', path)
@ -1083,7 +1079,7 @@ class qtPodder(QObject):
self.view.setWindowTitle('gPodder')
if gpodder.ui.harmattan or gpodder.ui.sailfish:
if gpodder.ui.harmattan:
self.view.showFullScreen()
else:
# On the Desktop, scale to fit my small laptop screen..

View file

@ -92,7 +92,7 @@ if encoding is None:
lang = os.environ['LANG']
(language, encoding) = lang.rsplit('.', 1)
logger.info('Detected encoding: %s', encoding)
elif gpodder.ui.harmattan or gpodder.ui.sailfish:
elif gpodder.ui.harmattan:
encoding = 'utf-8'
elif gpodder.ui.win32:
# To quote http://docs.python.org/howto/unicode.html:
@ -1511,7 +1511,7 @@ def detect_device_type():
Possible return values:
desktop, laptop, mobile, server, other
"""
if gpodder.ui.harmattan or gpodder.ui.sailfish:
if gpodder.ui.harmattan:
return 'mobile'
elif glob.glob('/proc/acpi/battery/*'):
# Linux: If we have a battery, assume Laptop

View file

@ -135,7 +135,7 @@ def get_real_download_url(url, preferred_fmt_ids=None):
# This provides good quality video, seems to be always available
# and is playable fluently in Media Player
if gpodder.ui.harmattan or gpodder.ui.sailfish:
if gpodder.ui.harmattan:
preferred_fmt_ids = [18]
for id in preferred_fmt_ids: