Permalink
Browse files

QML UI: Remove remaining Maemo 5 (Fremantle) support

After a year of basically no work towards Maemo 5 support,
I consider gPodder 3-on-Maemo 5 something that we won't ever
do, so the remaining codes goes. This also cleans up some
dead code in the Gtk UI that's been sitting there.

If anybody wants to step up and do something about that, be
my guest. If anything, I'd assume that if anything on the N900,
gPodder 3-on-Nemo Mobilemight be feasible, and in that case, it
should be "just like Harmattan" in most ways.
  • Loading branch information...
1 parent abe01de commit 61f2cfa379037b7f0fd90ca9b2d28915241de2dd @thp thp committed Sep 15, 2012
View
@@ -116,7 +116,7 @@ gpodder.prefix = prefix
# This is the command-line UI variant
gpodder.ui.cli = True
-# Platform detection (i.e. Maemo 5, etc..)
+# Platform detection (i.e. MeeGo 1.2 Harmattan, etc..)
gpodder.detect_platform()
have_ansi = sys.stdout.isatty() and not gpodder.win32
View
@@ -90,7 +90,7 @@ def main():
gpodder.prefix = prefix
- # Platform detection (i.e. Maemo 5, etc..)
+ # Platform detection (i.e. MeeGo 1.2 Harmattan, etc..)
gpodder.detect_platform()
# Enable i18n for gPodder translations
@@ -125,7 +125,7 @@ def main():
options, args = parser.parse_args(sys.argv)
- if options.qml or gpodder.ui.fremantle or gpodder.ui.harmattan:
+ if options.qml or gpodder.ui.harmattan:
gpodder.ui.qml = True
else:
gpodder.ui.gtk = True
@@ -46,7 +46,7 @@ import gpodder
gpodder.prefix = prefix
-# Platform detection (i.e. Maemo 5, etc..)
+# Platform detection (i.e. MeeGo 1.2 Harmattan, etc..)
gpodder.detect_platform()
@@ -1,74 +0,0 @@
-
-import Qt 4.7
-
-import 'config.js' as Config
-
-Item {
- id: cornerButton
-
- property bool opened
- property string icon: 'artwork/play.png'
- property string tab: 'artwork/nowplaying-tab.png'
- property string caption: ''
- property bool isLeftCorner: false
- signal clicked
-
- height: Config.headerHeight
- width: icon.width + (opened?0:text.width)
-
- Behavior on width { NumberAnimation { duration: Config.slowTransition } }
-
- Behavior on opacity { NumberAnimation { duration: Config.quickTransition } }
-
- anchors.bottomMargin: opened?-height:0
- Behavior on anchors.bottomMargin { NumberAnimation { duration: Config.slowTransition } }
-
- MouseArea {
- anchors.fill: parent
- onClicked: cornerButton.clicked()
- }
-
- Image {
- id: icon
-
- source: cornerButton.tab
-
- height: parent.height
- width: Config.switcherWidth
-
- ScaledIcon {
- anchors {
- verticalCenter: parent.verticalCenter
- right: parent.right
- rightMargin: cornerButton.isLeftCorner?(parent.width * .4):((parent.width * .8 - width) / 2)
- }
- source: cornerButton.icon
-
- Behavior on rotation { NumberAnimation { duration: Config.quickTransition } }
- }
- }
-
- Rectangle {
- id: text
- height: parent.height
- color: 'black'
- width: ((message.text!='')?(Config.smallSpacing * 2):0) + Math.min(main.width - icon.width - Config.smallSpacing*2, message.paintedWidth)
- anchors.left: icon.right
-
- //width: cornerButton.opened?0:(Config.smallSpacing * 2 + message.width)
- //clip: true
- //Behavior on width { PropertyAnimation { duration: Config.quickTransition } }
-
- Text {
- id: message
- anchors.leftMargin: text!=''?Config.smallSpacing:0
- anchors.rightMargin: text!=''?Config.smallSpacing:0
- anchors.verticalCenter: parent.verticalCenter
- color: 'white'
- font.pixelSize: 20 * Config.scale
- //text: cornerButton.opened?'':cornerButton.caption
- text: ''
- }
- }
-}
-
@@ -25,16 +25,26 @@ Image {
property alias currentFilterText: episodeList.currentFilterText
property bool playing: mediaPlayer.playing
- property bool canGoBack: (closeButton.isRequired || mediaPlayer.visible) && !progressIndicator.opacity
+ property bool canGoBack: (main.state != 'podcasts' || contextMenu.state != 'closed' || mediaPlayer.visible) && !progressIndicator.opacity
property bool hasPlayButton: nowPlayingThrobber.shouldAppear && !progressIndicator.opacity
- property bool hasSearchButton: searchButton.visible && !mediaPlayer.visible && !progressIndicator.opacity
+ property bool hasSearchButton: (contextMenu.state == 'closed' && main.state == 'podcasts') && !mediaPlayer.visible && !progressIndicator.opacity
property bool hasFilterButton: state == 'episodes' && !mediaPlayer.visible
+ function clickSearchButton() {
+ contextMenu.showSubscribe()
+ }
+
function goBack() {
- if (nowPlayingThrobber.opened) {
- nowPlayingThrobber.opened = false
- } else {
- closeButton.clicked()
+ if (contextMenu.state == 'opened') {
+ contextMenu.state = 'closed'
+ } else if (main.state == 'podcasts') {
+ mediaPlayer.stop()
+ controller.quit()
+ } else if (main.state == 'episodes') {
+ main.state = 'podcasts'
+ main.currentPodcast = undefined
+ } else if (main.state == 'shownotes') {
+ main.state = 'episodes'
}
}
@@ -43,7 +53,7 @@ Image {
}
function clickPlayButton() {
- nowPlayingThrobber.clicked()
+ nowPlayingThrobber.opened = !nowPlayingThrobber.opened
}
function showMultiEpisodesSheet(title, label, action) {
@@ -55,20 +65,6 @@ Image {
multiEpisodesSheet.opened = true;
}
- function clickSearchButton() {
- searchButton.clicked()
- }
-
- Keys.onPressed: {
- console.log(event.key)
- if (event.key == Qt.Key_Escape) {
- goBack()
- }
- if (event.key == Qt.Key_F && event.modifiers & Qt.ControlModifier) {
- searchButton.clicked()
- }
- }
-
width: 800
height: 480
@@ -275,34 +271,11 @@ Image {
}
}
- CornerButton {
- id: extraCloseButton
- visible: false
- z: (contextMenu.state == 'opened')?2:0
- tab: 'artwork/back-tab.png'
- icon: 'artwork/back.png'
- isLeftCorner: true
- anchors.bottom: parent.bottom
- anchors.left: parent.left
- onClicked: closeButton.clicked()
- opened: !(!Config.hasCloseButton && closeButton.isRequired)
- }
-
- CornerButton {
- z: 3
-
- property bool shouldAppear: ((contextMenu.state != 'opened') && (mediaPlayer.episode !== undefined))
-
+ Item {
+ // XXX: Remove me
id: nowPlayingThrobber
- visible: false
- anchors.bottom: parent.bottom
- anchors.right: parent.right
- opacity: shouldAppear
-
- caption: (mediaPlayer.episode!=undefined)?mediaPlayer.episode.qtitle:''
-
- opened: false
- onClicked: { opened = !opened }
+ property bool shouldAppear: ((contextMenu.state != 'opened') && (mediaPlayer.episode !== undefined))
+ property bool opened: false
}
MediaPlayer {
@@ -392,7 +365,7 @@ Image {
Item {
id: titleBar
visible: podcastList.hasItems
- height: visible?taskSwitcher.height*.8:0
+ height: visible?Config.headerHeight*.8:0
anchors.left: parent.left
anchors.right: parent.right
anchors.top: parent.top
@@ -414,35 +387,12 @@ Image {
}
}
- Item {
- id: taskSwitcher
- visible: contextMenu.state != 'opened' && Config.hasTaskSwitcher
- anchors.left: parent.left
- anchors.top: parent.top
- width: Config.switcherWidth
- height: Config.headerHeight
-
- MouseArea {
- anchors.fill: parent
- onClicked: controller.switcher()
- }
-
- ScaledIcon {
- anchors {
- verticalCenter: parent.verticalCenter
- left: parent.left
- leftMargin: (parent.width * .8 - width) / 2
- }
- source: 'artwork/switch.png'
- }
- }
-
Label {
id: titleBarText
anchors.verticalCenter: parent.verticalCenter
- anchors.left: taskSwitcher.visible?taskSwitcher.right:taskSwitcher.left
- anchors.leftMargin: (contextMenu.state == 'opened')?(Config.largeSpacing):(Config.hasTaskSwitcher?0:Config.largeSpacing)
- anchors.right: searchButton.visible?searchButton.left:searchButton.right
+ anchors.left: parent.left
+ anchors.right: parent.right
+ anchors.leftMargin: Config.largeSpacing
wrapMode: Text.NoWrap
clip: true
text: multiEpisodesSheet.opened?multiEpisodesSheet.title:((contextMenu.state == 'opened')?(contextMenu.subscribeMode?_('Add a new podcast'):_('Context menu')):((main.state == 'episodes' || main.state == 'shownotes')?(controller.episodeListTitle + ' (' + episodeList.count + ')'):"gPodder"))
@@ -456,42 +406,6 @@ Image {
property: 'windowTitle'
value: titleBarText.text
}
-
- TitlebarButton {
- id: searchButton
- anchors.right: closeButton.visible?closeButton.left:closeButton.right
-
- source: 'artwork/subscriptions.png'
-
- onClicked: contextMenu.showSubscribe()
-
- visible: (contextMenu.state == 'closed' && main.state == 'podcasts')
- opacity: 0
- }
-
- TitlebarButton {
- id: closeButton
- anchors.right: parent.right
- property bool isRequired: main.state != 'podcasts' || contextMenu.state != 'closed'
- visible: extraCloseButton.opened && (Config.hasCloseButton || isRequired)
-
- source: (main.state == 'podcasts' && contextMenu.state == 'closed')?'artwork/close.png':'artwork/back.png'
- rotation: 0
-
- onClicked: {
- if (contextMenu.state == 'opened') {
- contextMenu.state = 'closed'
- } else if (main.state == 'podcasts') {
- mediaPlayer.stop()
- controller.quit()
- } else if (main.state == 'episodes') {
- main.state = 'podcasts'
- main.currentPodcast = undefined
- } else if (main.state == 'shownotes') {
- main.state = 'episodes'
- }
- }
- }
}
function showMessage(message) {
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
Deleted file not rendered
@@ -1,90 +0,0 @@
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!-- Created with Inkscape (http://www.inkscape.org/) -->
-
-<svg
- xmlns:dc="http://purl.org/dc/elements/1.1/"
- xmlns:cc="http://creativecommons.org/ns#"
- xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
- xmlns:svg="http://www.w3.org/2000/svg"
- xmlns="http://www.w3.org/2000/svg"
- xmlns:xlink="http://www.w3.org/1999/xlink"
- xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
- xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
- width="72"
- height="72"
- id="svg2"
- version="1.1"
- inkscape:version="0.48.1 r9760"
- sodipodi:docname="spinner.svg"
- inkscape:export-filename="/Users/thp/spinner.png"
- inkscape:export-xdpi="90"
- inkscape:export-ydpi="90">
- <defs
- id="defs4">
- <linearGradient
- id="linearGradient3005">
- <stop
- style="stop-color:#ffffff;stop-opacity:1;"
- offset="0"
- id="stop3007" />
- <stop
- style="stop-color:#ffffff;stop-opacity:0;"
- offset="1"
- id="stop3009" />
- </linearGradient>
- <radialGradient
- inkscape:collect="always"
- xlink:href="#linearGradient3005"
- id="radialGradient3011"
- cx="36.685669"
- cy="989.02734"
- fx="36.685669"
- fy="989.02734"
- r="31.09375"
- gradientTransform="matrix(0.86834167,0.54673384,-0.53254572,0.84580749,501.84658,146.77815)"
- gradientUnits="userSpaceOnUse" />
- </defs>
- <sodipodi:namedview
- id="base"
- pagecolor="#ffffff"
- bordercolor="#666666"
- borderopacity="1.0"
- inkscape:pageopacity="0.0"
- inkscape:pageshadow="2"
- inkscape:zoom="1"
- inkscape:cx="-14"
- inkscape:cy="35.999997"
- inkscape:document-units="px"
- inkscape:current-layer="layer1"
- showgrid="false"
- inkscape:window-width="1097"
- inkscape:window-height="764"
- inkscape:window-x="168"
- inkscape:window-y="120"
- inkscape:window-maximized="0" />
- <metadata
- id="metadata7">
- <rdf:RDF>
- <cc:Work
- rdf:about="">
- <dc:format>image/svg+xml</dc:format>
- <dc:type
- rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
- <dc:title></dc:title>
- </cc:Work>
- </rdf:RDF>
- </metadata>
- <g
- inkscape:label="Layer 1"
- inkscape:groupmode="layer"
- id="layer1"
- transform="translate(0,-980.36218)">
- <path
- sodipodi:type="inkscape:offset"
- inkscape:radius="4.0816665"
- inkscape:original="M 36 989.375 C 21.105543 989.375 9 1001.4493 9 1016.3438 C 9 1031.2381 21.105543 1043.3438 36 1043.3438 C 50.894457 1043.3438 63 1031.2382 63 1016.3438 C 63 1001.4493 50.894457 989.375 36 989.375 z M 36 992.28125 C 49.322041 992.28125 60.09375 1003.0216 60.09375 1016.3438 C 60.09375 1029.6657 49.322041 1040.4375 36 1040.4375 C 22.677959 1040.4375 11.90625 1029.6658 11.90625 1016.3438 C 11.90625 1003.0217 22.677959 992.28125 36 992.28125 z "
- style="font-size:medium;font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;text-indent:0;text-align:start;text-decoration:none;line-height:normal;letter-spacing:normal;word-spacing:normal;text-transform:none;direction:ltr;block-progression:tb;writing-mode:lr-tb;text-anchor:start;baseline-shift:baseline;color:#000000;fill:url(#radialGradient3011);fill-opacity:1;stroke:none;stroke-width:3;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate;font-family:Sans;-inkscape-font-specification:Sans"
- id="path3003"
- d="m 36,985.28125 c -17.100345,0 -31.09375,13.95641 -31.09375,31.06255 0,17.1059 13.987668,31.0937 31.09375,31.0937 17.106064,0 31.09375,-13.9877 31.09375,-31.0937 0,-17.10614 -13.993405,-31.06255 -31.09375,-31.06255 z m 0,11.09375 c 11.128257,0 20,8.8467 20,19.9688 0,11.1216 -8.878167,20 -20,20 -11.121853,0 -20,-8.8782 -20,-20 0,-11.122 8.871764,-19.9688 20,-19.9688 z" />
- </g>
-</svg>
Deleted file not rendered
Oops, something went wrong.

0 comments on commit 61f2cfa

Please sign in to comment.