Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
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...
commit 61f2cfa379037b7f0fd90ca9b2d28915241de2dd 1 parent abe01de
@thp thp authored
View
2  bin/gpo
@@ -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
4 bin/gpodder
@@ -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
View
2  bin/gpodder-migrate2tres
@@ -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()
View
74 share/gpodder/ui/qml/CornerButton.qml
@@ -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: ''
- }
- }
-}
-
View
136 share/gpodder/ui/qml/Main.qml
@@ -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) {
View
BIN  share/gpodder/ui/qml/artwork/back-tab.png
Deleted file not rendered
View
BIN  share/gpodder/ui/qml/artwork/back.png
Deleted file not rendered
View
BIN  share/gpodder/ui/qml/artwork/back_inv.png
Deleted file not rendered
View
BIN  share/gpodder/ui/qml/artwork/btn_pause.png
Deleted file not rendered
View
BIN  share/gpodder/ui/qml/artwork/btn_play.png
Deleted file not rendered
View
BIN  share/gpodder/ui/qml/artwork/close.png
Deleted file not rendered
View
BIN  share/gpodder/ui/qml/artwork/noise.png
Deleted file not rendered
View
BIN  share/gpodder/ui/qml/artwork/nowplaying-tab.png
Deleted file not rendered
View
BIN  share/gpodder/ui/qml/artwork/play_inv.png
Deleted file not rendered
View
BIN  share/gpodder/ui/qml/artwork/spinner.png
Deleted file not rendered
View
90 share/gpodder/ui/qml/artwork/spinner.svg
@@ -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>
View
BIN  share/gpodder/ui/qml/artwork/switch.png
Deleted file not rendered
View
3  share/gpodder/ui/qml/config.js
@@ -24,9 +24,6 @@ var playbackColor = '#a0729fcf' /* playback blue */
var baseColor = '#2b2b2b'
var offlineColor = '#4b4b4b'
-var hasCloseButton = false
-var hasTaskSwitcher = false
-
var listItemBigText = listItemHeight * .35
var listItemSmallText = listItemHeight * .25
View
6 src/gpodder/__init__.py
@@ -73,10 +73,9 @@
# The User-Agent string for downloads
user_agent = 'gPodder/%s (+%s)' % (__version__, __url__)
-# Are we running in GUI, Maemo or console mode?
+# Are we running in GUI, MeeGo 1.2 Harmattan or console mode?
class UI(object):
def __init__(self):
- self.fremantle = False
self.harmattan = False
self.gtk = False
self.qml = False
@@ -211,10 +210,9 @@ def detect_platform():
except Exception, e:
etc_issue = ''
- ui.fremantle = ('Maemo 5' in etc_issue)
ui.harmattan = ('MeeGo 1.2 Harmattan' in etc_issue)
- if (ui.fremantle or ui.harmattan) and ENV_HOME not in os.environ:
+ if ui.harmattan and ENV_HOME not in os.environ:
new_home = os.path.expanduser(os.path.join('~', 'MyDocs', 'gPodder'))
set_home(os.path.expanduser(new_home))
View
28 src/gpodder/gtkui/interface/common.py
@@ -57,34 +57,6 @@ def __init__(self, parent, **kwargs):
(pw, ph) = self.main_window.get_size()
self.main_window.move(x + w/2 - pw/2, y + h/2 - ph/2)
- def _on_key_press_event_maemo(self, widget, event):
- window_type = widget.get_type_hint()
- if window_type != gtk.gdk.WINDOW_TYPE_HINT_NORMAL:
- return False
-
- if event.keyval == gtk.keysyms.F6:
- if self._maemo_fullscreen:
- if self._maemo_fullscreen_chain is not None:
- self._maemo_fullscreen_chain.unfullscreen()
- self.main_window.unfullscreen()
- self.main_window.set_border_width(0)
- else:
- if self._maemo_fullscreen_chain is not None:
- self._maemo_fullscreen_chain.fullscreen()
- self.main_window.fullscreen()
- self.main_window.set_border_width(12)
- return True
- else:
- return False
-
- def _on_window_state_event_maemo(self, widget, event):
- if event.new_window_state & gtk.gdk.WINDOW_STATE_FULLSCREEN:
- self._maemo_fullscreen = True
- else:
- self._maemo_fullscreen = False
-
- return False
-
def _on_window_state_event_visibility(self, widget, event):
if event.state & gtk.gdk.VISIBILITY_FULLY_OBSCURED:
self._window_visible = False
View
18 src/gpodder/gtkui/main.py
@@ -1845,7 +1845,7 @@ def playback_episodes_for_real(self, episodes):
if resume_position == episode.total_time:
resume_position = 0
- # If Panucci is configured, use D-Bus on Maemo to call it
+ # If Panucci is configured, use D-Bus to call it
if player == 'panucci':
try:
PANUCCI_NAME = 'org.panucci.panucciInterface'
@@ -1887,22 +1887,6 @@ def error_handler(filename, err):
# Open episodes with system default player
if 'default' in groups:
- # Special-casing for a single episode when the object is a PDF
- # file - this is needed on Maemo 5, so we only use gui_open()
- # for single PDF files, but still use the built-in media player
- # with an M3U file for single audio/video files. (The Maemo 5
- # media player behaves differently when opening a single-file
- # M3U playlist compared to opening the single file directly.)
- if len(groups['default']) == 1:
- fn = groups['default'][0]
- # The list of extensions is taken from gui_open in util.py
- # where all special-cases of Maemo apps are listed
- for extension in ('.pdf', '.jpg', '.jpeg', '.png'):
- if fn.lower().endswith(extension):
- util.gui_open(fn)
- groups['default'] = []
- break
-
for filename in groups['default']:
logger.debug('Opening with system default: %s', filename)
util.gui_open(filename)
View
30 src/gpodder/qmlui/__init__.py
@@ -359,8 +359,7 @@ def getWindowTitle(self):
return self.root.view.windowTitle()
def setWindowTitle(self, windowTitle):
- if gpodder.ui.fremantle:
- self.root.view.setWindowTitle(windowTitle)
+ self.root.view.setWindowTitle(windowTitle)
windowTitle = Property(unicode, getWindowTitle,
setWindowTitle, notify=windowTitleChanged)
@@ -710,13 +709,7 @@ def quit(self):
@Slot()
def switcher(self):
- if gpodder.ui.harmattan:
- self.root.view.showMinimized()
- elif gpodder.ui.fremantle:
- os.system('dbus-send /com/nokia/hildon_desktop '+
- 'com.nokia.hildon_desktop.exit_app_view')
- else:
- self.root.view.showMinimized()
+ self.root.view.showMinimized()
class gPodderListModel(QAbstractListModel):
@@ -862,14 +855,6 @@ def __init__(self, args, gpodder_core, dbus_bus_name):
# TODO: Expose the same D-Bus API as the Gtk UI D-Bus object (/gui)
# TODO: Create a gpodder.dbusproxy.DBusPodcastsProxy object (/podcasts)
- # Enable OpenGL rendering without requiring QtOpenGL
- # On Harmattan we let the system choose the best graphicssystem
- if '-graphicssystem' not in args and not gpodder.ui.harmattan:
- if gpodder.ui.fremantle:
- args += ['-graphicssystem', 'opengl']
- elif not gpodder.win32:
- args += ['-graphicssystem', 'raster']
-
self.app = QApplication(args)
signal.signal(signal.SIGINT, signal.SIG_DFL)
self.quit.connect(self.on_quit)
@@ -905,14 +890,6 @@ def __init__(self, args, gpodder_core, dbus_bus_name):
engine = self.view.engine()
- # Maemo 5: Experimental Qt Mobility packages are installed in /opt
- if gpodder.ui.fremantle:
- for path in ('/opt/qtm11/imports', '/opt/qtm12/imports'):
- engine.addImportPath(path)
- elif gpodder.win32:
- for path in (r'C:\QtSDK\Desktop\Qt\4.7.4\msvc2008\imports',):
- engine.addImportPath(path)
-
# Add the cover art image provider
self.cover_provider = images.LocalCachedImageProvider()
engine.addImageProvider('cover', self.cover_provider)
@@ -938,9 +915,6 @@ def __init__(self, args, gpodder_core, dbus_bus_name):
if gpodder.ui.harmattan:
self.view.showFullScreen()
- elif gpodder.ui.fremantle:
- self.view.setAttribute(Qt.WA_Maemo5AutoOrientation, True)
- self.view.showFullScreen()
else:
# On the Desktop, scale to fit my small laptop screen..
desktop = self.app.desktop()
View
2  src/gpodder/qmlui/helper.py
@@ -83,8 +83,6 @@ def __init__(self):
if gpodder.ui.harmattan:
headset_path = '/org/freedesktop/Hal/devices/computer_logicaldev_input_0'
headset_path2 = '/org/freedesktop/Hal/devices/computer_logicaldev_input'
- elif gpodder.ui.fremantle:
- headset_path = '/org/freedesktop/Hal/devices/computer_logicaldev_input_1'
else:
return
View
15 src/gpodder/util.py
@@ -85,7 +85,7 @@
lang = os.environ['LANG']
(language, encoding) = lang.rsplit('.', 1)
logger.info('Detected encoding: %s', encoding)
- elif gpodder.ui.fremantle or gpodder.ui.harmattan:
+ elif gpodder.ui.harmattan:
encoding = 'utf-8'
elif gpodder.win32:
# To quote http://docs.python.org/howto/unicode.html:
@@ -1228,7 +1228,6 @@ def gui_open(filename):
systems with a few exceptions:
on Win32, os.startfile() is used
- on Maemo, osso is used to communicate with Nokia Media Player
"""
try:
if gpodder.win32:
@@ -1249,15 +1248,7 @@ def open_website(url):
browser. This uses Python's "webbrowser" module, so
make sure your system is set up correctly.
"""
- if gpodder.ui.fremantle:
- import osso
- context = osso.Context('gPodder', gpodder.__version__, False)
- rpc = osso.Rpc(context)
- rpc.rpc_run_with_defaults('osso_browser', \
- 'open_new_window', \
- (url,))
- else:
- run_in_background(lambda: webbrowser.open(url))
+ run_in_background(lambda: webbrowser.open(url))
def convert_bytes(d):
"""
@@ -1488,7 +1479,7 @@ def detect_device_type():
Possible return values:
desktop, laptop, mobile, server, other
"""
- if gpodder.ui.fremantle or gpodder.ui.harmattan:
+ if gpodder.ui.harmattan:
return 'mobile'
elif glob.glob('/proc/acpi/battery/*'):
# Linux: If we have a battery, assume Laptop
View
6 src/gpodder/youtube.py
@@ -63,10 +63,6 @@ def get_real_download_url(url, preferred_fmt_id=None):
if preferred_fmt_id is None:
preferred_fmt_id = 18
- # For Maemo 5, we force fmt_id 5 for performance reasons
- if gpodder.ui.fremantle:
- preferred_fmt_id = 5
-
vid = get_youtube_id(url)
if vid is not None:
page = None
@@ -99,7 +95,7 @@ def find_urls(page):
formats_available = set(fmt_id for fmt_id, url in fmt_id_url_map)
fmt_id_url_map = dict(fmt_id_url_map)
- if gpodder.ui.fremantle or gpodder.ui.harmattan:
+ if gpodder.ui.harmattan:
# This provides good quality video, seems to be always available
# and is playable fluently in Media Player
if preferred_fmt_id == 5:
Please sign in to comment.
Something went wrong with that request. Please try again.