コード例 #1
0
	def burn (self, *args):
		if not self.preferences.temporary_dir_is_ok():
			gtk_util.dialog_warn ("Temporary directory location unavailable", "Please check if the temporary exists and has writable permissions.")
			self.__on_preferences ()
			return
		if gtk_util.dialog_ok_cancel ("Do you want to continue?", "You are about to record a media disk. Canceling a writing operation will make your disk unusable.", self) != gtk.RESPONSE_OK:
			return
		r = RecordingMedia (self.masterer.source, self.preferences, self)
		r.start()
コード例 #2
0
	def __insert_cd (self, rec, reload_media, can_rewrite, busy_cd):
		# messages from nautilus-burner-cd.c
		if busy_cd:
			msg = "Please make sure another application is not using the drive."
			title = "Drive is busy"
		elif not reload_media and can_rewrite:
			msg = "Please put a rewritable or blank disc into the drive."
			title = "Insert rewritable or blank disc"
		elif can_rewrite:
			msg = "Please replace the disc in the drive with a rewritable or blank disc."
			title = "Reload rewritable or blank disc"
		else:
			msg = "Please replace the disc in the drive a blank disc."
			title = "Reload blank disc"
		return gtk_util.dialog_ok_cancel (title, msg) == gtk.RESPONSE_OK
コード例 #3
0
	def burn (self, *args):
		# Check if we have space available in our cache dir
		secs = 0
		for music in self.masterer.source:
			if not self.preferences.pool.is_available (music['uri']):
				secs += music['duration']
		# 44100hz * 16bit * 2channels / 8bits = 176400 bytes per sec
		size_needed = secs * 176400L
		s = os.statvfs (self.preferences.temporary_dir)
		size_avail = s[statvfs.F_BAVAIL] * long(s[statvfs.F_BSIZE])
		if (size_avail - size_needed) < 0:
			
			gtk_util.dialog_error ("Not enough space on cache directory",
				"Remove some music tracks or make sure your cache location location has enough free space (about %s)." % (self.__hig_bytes(size_needed - size_avail)), self)
			return
	
		if not self.preferences.temporary_dir_is_ok():
			gtk_util.dialog_warn ("Cache directory location unavailable", "Please check if the cache location exists and has writable permissions.", self)
			self.__on_preferences ()
			return
		if gtk_util.dialog_ok_cancel ("Do you want to continue?", "You are about to record a media disk. Canceling a writing operation will make your disk unusable.", self) != gtk.RESPONSE_OK:
			return
		r = RecordingMedia (self.masterer.source, self.preferences, self)
		r.start()
コード例 #4
0
	def burn (self, *args):
		if gtk_util.dialog_ok_cancel ("Do you want to continue?", 
		                         "You are about to record a media disk. Canceling a writing operation will make your disk unusable.", self) != gtk.RESPONSE_OK:
			return
		r = RecordingMedia (self.masterer.source, self.preferences, self)
		r.start()