Exemple #1
0
	def _confirm_new_resolution(self, old_resolution, new_resolution):
		title = _('Compatibility check')
		msg = _('If you can read this page, your display resolution was successfully changed. Hit Play/Pause to confirm.')
		next = Button(_('OK'))
		next.connect((lambda : config.user_config.save()))
		win = BigMessageWindow(msg, title, next)
		win.show(timeout=20, timeout_callback=(lambda : self._discard_new_resolution(old_resolution)))
Exemple #2
0
	def _do_copy(kbd):
		new_name = kbd._text
		if new_name:
			if os.path.exists(('/wymedia/My Videos/TS/%s.ts' % new_name)):
				BigMessageWindow(text=(_('File %s already exist.\nAborting...') % new_name), title=_('Error')).show(timeout=5)
				kbd.hide()
				return None
			try:
				GraphicalProgress(job=Rec2VidThread(new_name, context, delete), title=(_('Copying \"%s\" to \"%s\"...') % (ellipsize(context['selected'].name, 10), _('My Videos'))) , context=context['parent'], win=NoHomeProgressWindow()).start(delay=1)
			except:
				BigMessageWindow(text=_('Error while copying files'), title=_('Error')).show(timeout=5)
		kbd.hide()
Exemple #3
0
 def execute_action(self, val):
     if val:
         msg = _(
             "Warning, when you activate this option, some short black screens may be displayed at the beginning and the end of playback. Don't worry about it; your box is just switching its frame rate to guarantee you the best image!"
         )
         BigMessageWindow(msg).show(10)
     return None
Exemple #4
0
		def _do_edit_name(kbd):
			new_name = kbd._text
			if new_name:
				if os.path.exists(('/wymedia/My Videos/RECS/%s.ts' % new_name)):
					BigMessageWindow(text=(_('File %s already exist.') % new_name), title=_('Error')).show(timeout=3)
				else:
					context['menu'].video_name = new_name
			kbd.hide()
Exemple #5
0
	def __do_delete():
		fl = markerlists().get(context['menu'].universe)
		try:
			fl.vfs_delete()
		except RemoveError:
			PRINT_EXCEPTION()
			MessageWindow(text=_('Error removing %s') % 'markerlist', title=_('Error')).show(timeout=5)
		except:
			except NotPermittedError, e:
				PRINT_EXCEPTION()
				if e.message == 'NOT_SUPPORTED_BY_FS':
					BigMessageWindow(text=_('The way this disk was formatted does not allow this operation'), title=_('Error')).show(timeout=5)
				else:
					MessageWindow(text=_('Operation not permitted'), title=_('Error')).show(timeout=5)
Exemple #6
0
	def _discard_new_resolution(self, old_resolution):
		if not old_resolution:
			old_resolution = self.fallback
		super(ResolutionSetupItem, self)._select_option(old_resolution)
		self._set_resolution(old_resolution)
		config.user_config.save()
		if self.associated_device == 'hdmi':
			resolution_caption = hdmiresolution_dict[old_resolution]
		else:
			resolution_caption = COMPOSITE_OUT[old_resolution]
		self.menu.related_menu.refresh_connection(resolution_caption)
		title = _('Compatibility check')
		msg = _('Your display resolution has been restored to its previous setting')
		BigMessageWindow(msg, title).show()
Exemple #7
0
 def _check_exception(self, force=False):
     uri = self['main_list'].selected['uri']
     if uri.startswith('http://') or uri.startswith('dlna+http://'):
         ignore = True
     else:
         ignore = False
     message = None
     ex = self.wpl.exception
     if force:
         message = force
     else:
         if ex == "media: couldn't open input file":
             message = _('The content you requested was not found.')
         elif ex == 'media: timeout':
             message = _(
                 'The server is not responding. Please try to access the content later.'
             )
         elif ex == 'media: unsupported container':
             message = _('Cannot play this media (bad container).')
         elif ex == 'decode: no recognized stream':
             message = _(
                 'Cannot Play this media (no audio codec supported).')
         elif ex:
             message = _('Cannot play this media (bad container).')
         else:
             if not self.wpl.alist():
                 if not ignore:
                     message = _(
                         'Cannot Play this media (no audio codec supported).'
                     )
                 else:
                     message = ''
             elif self._video_stream and not self.wpl.vlist():
                 message = _(
                     'Cannot Play this media (no video codec supported).')
     if message:
         Task(BigMessageWindow(message).show,
              timeout=5).start(0.10000000000000001)
         return True
     return False
Exemple #8
0
	i: 28(), 52(), 152(JA), 199(), 246(AE)
	o: 

nname: 246
n 246(None)[]:
	i: 113(f)
	o: 248(AE)

nname: 199
n 199(None)[MessageWindow(text=_('Operation not permitted'), title=_('Error')).show(timeout=5)
]:
	i: 124(f)
	o: 248()

nname: 152
n 152(None)[BigMessageWindow(text=_('The way this disk was formatted does not allow this operation'), title=_('Error')).show(timeout=5)
]:
	i: 124(t)
	o: 248(JA)

nname: 124
n 124(e.message == 'NOT_SUPPORTED_BY_FS')[#, e
PRINT_EXCEPTION()
]:
	i: 113(t)
	o: 152(t), 199(f)

nname: 113
n 113(<dummy_ex3> EXC_MATCH NotPermittedError)[]:
	i: 42(f)
	o: 124(t), 246(f)
Exemple #9
0
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb755f90c>}
nname: 0
n 0(None)[return self._discard_new_resolution(old_resolution)
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb755f0ac>}
nname: 0
n 0(None)[title = _('Compatibility check')
msg = _('If you can read this page, your display resolution was successfully changed. Hit Play/Pause to confirm.')
next = Button(_('OK'))
next.connect((lambda : config.user_config.save()))
win = BigMessageWindow(msg, title, next)
win.show(timeout=20, timeout_callback=(lambda : self._discard_new_resolution(old_resolution)))
]:
	i: 
	o: 

self.nodes: {0: <unpyclib.structure.node instance at 0xb75d3a2c>}
nname: 108
n 108(None)[self.menu.related_menu.refresh_connection(resolution_caption)
title = _('Compatibility check')
msg = _('Your display resolution has been restored to its previous setting')
BigMessageWindow(msg, title).show()
]:
	i: 83(), 97()
	o: