Merge lp:~michael-sheldon/jokosher/windows_port into lp:jokosher

Proposed by Michael Sheldon
Status: Merged
Merged at revision: not available
Proposed branch: lp:~michael-sheldon/jokosher/windows_port
Merge into: lp:jokosher
Diff against target: None lines
To merge this branch: bzr merge lp:~michael-sheldon/jokosher/windows_port
Reviewer Review Type Date Requested Status
Jokosher Code Pending
Review via email: mp+4935@code.launchpad.net
To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'Jokosher/ControlsBox.py'
--- Jokosher/ControlsBox.py 2007-07-10 22:25:55 +0000
+++ Jokosher/ControlsBox.py 2009-02-25 12:39:22 +0000
@@ -54,16 +54,16 @@
54 self.muteImgEnabled = Utils.GetIconThatMayBeMissing("stock_volume-mute", gtk.ICON_SIZE_BUTTON, False)54 self.muteImgEnabled = Utils.GetIconThatMayBeMissing("stock_volume-mute", gtk.ICON_SIZE_BUTTON, False)
55 55
56 self.recTip = gtk.Tooltips()56 self.recTip = gtk.Tooltips()
57 self.recButton = gtk.ToggleButton("")57 self.recButton = gtk.ToggleButton()
58 self.recTip.set_tip(self.recButton, self.recTipEnabled, None)58 self.recTip.set_tip(self.recButton, self.recTipEnabled, None)
59 self.recButton.connect("toggled", self.OnArm)59 self.recButton.connect("toggled", self.OnArm)
60 60
61 self.muteButton = gtk.ToggleButton("")61 self.muteButton = gtk.ToggleButton()
62 self.muteButton.connect("toggled", self.OnMute)62 self.muteButton.connect("toggled", self.OnMute)
63 self.muteTip = gtk.Tooltips()63 self.muteTip = gtk.Tooltips()
64 self.muteTip.set_tip(self.muteButton, self.muteTipDisabled, None)64 self.muteTip.set_tip(self.muteButton, self.muteTipDisabled, None)
65 65
66 self.soloButton = gtk.ToggleButton("")66 self.soloButton = gtk.ToggleButton()
67 self.soloTip = gtk.Tooltips()67 self.soloTip = gtk.Tooltips()
68 self.soloTip.set_tip(self.soloButton, self.soloTipDisabled, None)68 self.soloTip.set_tip(self.soloButton, self.soloTipDisabled, None)
69 self.soloButton.connect("toggled", self.OnSolo)69 self.soloButton.connect("toggled", self.OnSolo)
7070
=== modified file 'Jokosher/Event.py'
--- Jokosher/Event.py 2009-02-18 03:05:16 +0000
+++ Jokosher/Event.py 2009-03-19 23:28:10 +0000
@@ -22,6 +22,7 @@
22import Globals22import Globals
23import gettext23import gettext
24import urllib24import urllib
25import PlatformUtils
2526
26from elements.singledecodebin import SingleDecodeBin27from elements.singledecodebin import SingleDecodeBin
27_ = gettext.gettext28_ = gettext.gettext
@@ -51,7 +52,7 @@
51 }52 }
5253
53 """ The level sample interval in seconds """54 """ The level sample interval in seconds """
54 LEVEL_INTERVAL = 0.0155 LEVEL_INTERVAL = 0.1
55 LEVELS_FILE_EXTENSION = ".leveldata"56 LEVELS_FILE_EXTENSION = ".leveldata"
56 NANO_TO_MILLI_DIVISOR = gst.SECOND / 100057 NANO_TO_MILLI_DIVISOR = gst.SECOND / 1000
57 58
@@ -161,9 +162,9 @@
161162
162 Globals.debug("creating SingleDecodeBin")163 Globals.debug("creating SingleDecodeBin")
163 caps = gst.caps_from_string("audio/x-raw-int;audio/x-raw-float")164 caps = gst.caps_from_string("audio/x-raw-int;audio/x-raw-float")
164 f = "file://" + self.file165 f = PlatformUtils.pathname2url(self.file)
166 Globals.debug("file uri is:", f)
165 self.single_decode_bin = SingleDecodeBin(caps=caps, uri=f)167 self.single_decode_bin = SingleDecodeBin(caps=caps, uri=f)
166 Globals.debug("file uri is:", f)
167 self.gnlsrc.add(self.single_decode_bin)168 self.gnlsrc.add(self.single_decode_bin)
168 Globals.debug("setting event properties:")169 Globals.debug("setting event properties:")
169 propsDict = {170 propsDict = {
@@ -212,7 +213,7 @@
212 self.instrument.project.deleteOnCloseAudioFiles.remove(self.file)213 self.instrument.project.deleteOnCloseAudioFiles.remove(self.file)
213 214
214 self.temp = self.file215 self.temp = self.file
215 if os.path.samefile(self.instrument.project.audio_path, os.path.dirname(self.file)):216 if PlatformUtils.samefile(self.instrument.project.audio_path, os.path.dirname(self.file)):
216 # If the file is in the audio dir, just include the filename, not the absolute path217 # If the file is in the audio dir, just include the filename, not the absolute path
217 self.file = os.path.basename(self.file)218 self.file = os.path.basename(self.file)
218 219
@@ -772,10 +773,14 @@
772 """773 """
773 Renders the level information for the GUI.774 Renders the level information for the GUI.
774 """775 """
775 pipe = """filesrc name=src location=%s ! decodebin ! audioconvert ! level interval=%d message=true ! fakesink"""776 pipe = """filesrc name=src ! decodebin ! audioconvert ! level message=true name=level_element ! fakesink"""
776
777 pipe = pipe % (self.file.replace(" ", "\ "), self.LEVEL_INTERVAL * gst.SECOND)
778 self.loadingPipeline = gst.parse_launch(pipe)777 self.loadingPipeline = gst.parse_launch(pipe)
778
779 filesrc = self.loadingPipeline.get_by_name("src")
780 level = self.loadingPipeline.get_by_name("level_element")
781
782 filesrc.set_property("location", self.file)
783 level.set_property("interval", int(self.LEVEL_INTERVAL * gst.SECOND))
779784
780 self.bus = self.loadingPipeline.get_bus()785 self.bus = self.loadingPipeline.get_bus()
781 self.bus.add_signal_watch()786 self.bus.add_signal_watch()
@@ -798,14 +803,25 @@
798 Copies the audio file to the new file location and reads the levels803 Copies the audio file to the new file location and reads the levels
799 at the same time.804 at the same time.
800 """805 """
801 if not gst.element_make_from_uri(gst.URI_SRC, uri):806
807 urisrc = gst.element_make_from_uri(gst.URI_SRC, uri)
808 if not urisrc:
802 #This means that here is no gstreamer src element on the system that can handle this URI type.809 #This means that here is no gstreamer src element on the system that can handle this URI type.
803 return False810 return False
804 811
805 pipe = """%s ! tee name=mytee mytee. ! queue ! filesink location=%s """ +\812 pipe = """tee name=mytee mytee. ! queue ! filesink name=sink """ +\
806 """mytee. ! queue ! decodebin ! audioconvert ! level interval=%d message=true ! fakesink""" 813 """mytee. ! queue ! decodebin ! audioconvert ! level name=level_element message=true ! fakesink"""
807 pipe = pipe % (urllib.quote(uri,":/"), self.file.replace(" ", "\ "), self.LEVEL_INTERVAL * gst.SECOND)
808 self.loadingPipeline = gst.parse_launch(pipe)814 self.loadingPipeline = gst.parse_launch(pipe)
815
816 tee = self.loadingPipeline.get_by_name("mytee")
817 filesink = self.loadingPipeline.get_by_name("sink")
818 level = self.loadingPipeline.get_by_name("level_element")
819
820 self.loadingPipeline.add(urisrc)
821 urisrc.link(tee)
822
823 filesink.set_property("location", self.file)
824 level.set_property("interval", int(self.LEVEL_INTERVAL * gst.SECOND))
809825
810 self.bus = self.loadingPipeline.get_bus()826 self.bus = self.loadingPipeline.get_bus()
811 self.bus.add_signal_watch()827 self.bus.add_signal_watch()
812828
=== modified file 'Jokosher/EventLaneViewer.py'
--- Jokosher/EventLaneViewer.py 2009-02-15 23:11:00 +0000
+++ Jokosher/EventLaneViewer.py 2009-03-19 23:28:10 +0000
@@ -15,6 +15,7 @@
15from EventViewer import *15from EventViewer import *
16import os.path16import os.path
17import gettext17import gettext
18import PlatformUtils
18import urllib # To decode URI's19import urllib # To decode URI's
19import Globals # To get projectfolder20import Globals # To get projectfolder
20import ui.EventLaneHSeparator as EventLaneHSeparator21import ui.EventLaneHSeparator as EventLaneHSeparator
@@ -300,8 +301,9 @@
300 if event:301 if event:
301 #if we we're called from a mouse click, use the mouse position as the start302 #if we we're called from a mouse click, use the mouse position as the start
302 start = (self.mouseDownPos[0]/self.project.viewScale) + self.project.viewStart303 start = (self.mouseDownPos[0]/self.project.viewScale) + self.project.viewStart
303 304
304 self.instrument.AddEventsFromList(start, filenames)305 uris = [PlatformUtils.pathname2url(filename) for filename in filenames]
306 self.instrument.AddEventsFromList(start, uris)
305307
306 #_____________________________________________________________________308 #_____________________________________________________________________
307 309
308310
=== modified file 'Jokosher/Globals.py'
--- Jokosher/Globals.py 2009-02-23 00:47:21 +0000
+++ Jokosher/Globals.py 2009-03-19 23:39:14 +0000
@@ -18,6 +18,7 @@
18import gobject, gtk18import gobject, gtk
19import xdg.BaseDirectory19import xdg.BaseDirectory
20import shutil20import shutil
21import PlatformUtils
2122
22import gettext23import gettext
23_ = gettext.gettext24_ = gettext.gettext
@@ -37,7 +38,7 @@
37 "windowheight" : 550,38 "windowheight" : 550,
38 "windowwidth" : 900,39 "windowwidth" : 900,
39 }40 }
40 41
41 recording = {42 recording = {
42 "fileformat": "flacenc",43 "fileformat": "flacenc",
43 "file_extension": "flac",44 "file_extension": "flac",
@@ -45,13 +46,17 @@
45 "audiosrc" : "gconfaudiosrc",46 "audiosrc" : "gconfaudiosrc",
46 "device" : "default"47 "device" : "default"
47 }48 }
49 # Overwrite with platform specific settings
50 recording.update( PlatformUtils.GetRecordingDefaults() )
48 51
49 playback = {52 playback = {
50 "devicename": "default",53 "devicename": "default",
51 "device": "default",54 "device": "default",
52 "audiosink":"autoaudiosink"55 "audiosink":"autoaudiosink"
53 }56 }
54 57 # Overwrite with platform specific settings
58 playback.update( PlatformUtils.GetPlaybackDefaults() )
59
55 extensions = {60 extensions = {
56 "extensions_blacklist": ""61 "extensions_blacklist": ""
57 }62 }
@@ -699,6 +704,7 @@
699704
700SAMPLE_RATES = [8000, 11025, 22050, 32000, 44100, 48000, 96000, 192000]705SAMPLE_RATES = [8000, 11025, 22050, 32000, 44100, 48000, 96000, 192000]
701706
707
702PLAYBACK_BACKENDS = [708PLAYBACK_BACKENDS = [
703 (_("Autodetect"), "autoaudiosink"),709 (_("Autodetect"), "autoaudiosink"),
704 (_("Use GNOME Settings"), "gconfaudiosink"),710 (_("Use GNOME Settings"), "gconfaudiosink"),
@@ -706,6 +712,8 @@
706 ("OSS", "osssink"),712 ("OSS", "osssink"),
707 ("JACK", "jackaudiosink"),713 ("JACK", "jackaudiosink"),
708 ("PulseAudio", "pulsesink"),714 ("PulseAudio", "pulsesink"),
715 ("Direct Sound", "directsoundsink"),
716 ("Core Audio", "osxaudiosink")
709]717]
710718
711CAPTURE_BACKENDS = [719CAPTURE_BACKENDS = [
@@ -714,6 +722,8 @@
714 ("OSS", "osssrc"),722 ("OSS", "osssrc"),
715 ("JACK", "jackaudiosrc"),723 ("JACK", "jackaudiosrc"),
716 ("PulseAudio", "pulsesrc"),724 ("PulseAudio", "pulsesrc"),
725 ("Direct Sound", "dshowaudiosrc"),
726 ("Core Audio", "osxaudiosrc")
717]727]
718728
719""" Default Instruments """729""" Default Instruments """
720730
=== modified file 'Jokosher/Instrument.py'
--- Jokosher/Instrument.py 2009-02-18 03:05:16 +0000
+++ Jokosher/Instrument.py 2009-03-19 23:28:10 +0000
@@ -15,6 +15,7 @@
15import pygst15import pygst
16pygst.require("0.10")16pygst.require("0.10")
17import gst17import gst
18import PlatformUtils
18import os, time, shutil19import os, time, shutil
19import urlparse # To split up URI's20import urlparse # To split up URI's
20import gobject21import gobject
@@ -199,7 +200,7 @@
199 self.volumeElement.link(self.levelElement)200 self.volumeElement.link(self.levelElement)
200 self.levelElement.link(self.panElement) 201 self.levelElement.link(self.panElement)
201 self.panElement.link(self.resample)202 self.panElement.link(self.resample)
202 203
203 self.playghostpad = gst.GhostPad("src", self.resample.get_pad("src"))204 self.playghostpad = gst.GhostPad("src", self.resample.get_pad("src"))
204 self.playbackbin.add_pad(self.playghostpad)205 self.playbackbin.add_pad(self.playghostpad)
205 206
@@ -541,7 +542,7 @@
541 542
542 Parameters:543 Parameters:
543 start -- the offset time in seconds for the first event.544 start -- the offset time in seconds for the first event.
544 fileList -- paths or URIs to the Event files.545 fileList -- URIs to the Event files.
545 copyfile -- True = copy the files to Project's audio directory.546 copyfile -- True = copy the files to Project's audio directory.
546 False = don't copy the files to the Project's audio directory.547 False = don't copy the files to the Project's audio directory.
547 """548 """
@@ -555,6 +556,7 @@
555 # Parse the uri, and continue only if it is pointing to a local file556 # Parse the uri, and continue only if it is pointing to a local file
556 (scheme, domain, file, params, query, fragment) = urlparse.urlparse(uri, "file", False)557 (scheme, domain, file, params, query, fragment) = urlparse.urlparse(uri, "file", False)
557 if scheme == "file":558 if scheme == "file":
559 file = PlatformUtils.url2pathname(file)
558 event = self.addEventFromFile(start, file, copyFile, _undoAction_=undoAction)560 event = self.addEventFromFile(start, file, copyFile, _undoAction_=undoAction)
559 else:561 else:
560 event = self.addEventFromURL(start, uri, _undoAction_=undoAction)562 event = self.addEventFromURL(start, uri, _undoAction_=undoAction)
561563
=== modified file 'Jokosher/JokosherApp.py'
--- Jokosher/JokosherApp.py 2009-02-19 01:48:34 +0000
+++ Jokosher/JokosherApp.py 2009-03-19 23:28:10 +0000
@@ -27,6 +27,7 @@
27import InstrumentConnectionsDialog, StatusBar27import InstrumentConnectionsDialog, StatusBar
28import EffectPresets, Extension, ExtensionManager28import EffectPresets, Extension, ExtensionManager
29import Utils, AudioPreview, MixdownProfileDialog, MixdownActions29import Utils, AudioPreview, MixdownProfileDialog, MixdownActions
30import PlatformUtils
3031
31#=========================================================================32#=========================================================================
3233
@@ -1462,7 +1463,8 @@
1462 displayed to user detailing the error.1463 displayed to user detailing the error.
1463 """1464 """
1464 try:1465 try:
1465 self.SetProject(ProjectManager.LoadProjectFile(path))1466 uri = PlatformUtils.pathname2url(path)
1467 self.SetProject(ProjectManager.LoadProjectFile(uri))
1466 return True1468 return True
1467 except ProjectManager.OpenProjectError, e:1469 except ProjectManager.OpenProjectError, e:
1468 self.ShowOpenProjectErrorDialog(e,parent)1470 self.ShowOpenProjectErrorDialog(e,parent)
14691471
=== modified file 'Jokosher/NewProjectDialog.py'
--- Jokosher/NewProjectDialog.py 2008-12-18 19:07:15 +0000
+++ Jokosher/NewProjectDialog.py 2009-03-19 23:28:10 +0000
@@ -12,7 +12,7 @@
12import gtk.glade12import gtk.glade
13import os13import os
14import ProjectManager14import ProjectManager
15import pwd15import PlatformUtils
16import Globals16import Globals
17import gettext17import gettext
18_ = gettext.gettext18_ = gettext.gettext
@@ -75,17 +75,9 @@
75 self.templatecombo.add_attribute(text, "text", 0)75 self.templatecombo.add_attribute(text, "text", 0)
76 76
77 self.templatecombo.set_active(0)77 self.templatecombo.set_active(0)
78 78
79 # Default author to name of currently logged in user79 # Default author to name of currently logged in user
80 try:80 self.author.set_text(PlatformUtils.getFullName())
81 # Try to get the full name if it exists
82 fullname = pwd.getpwuid(os.getuid())[4].split(",")[0]
83 if fullname == "":
84 fullname = pwd.getpwuid(os.getuid())[0]
85 self.author.set_text(fullname)
86 except:
87 # If we can't get the fullname, then just use the login
88 self.author.set_text(pwd.getpwuid(os.getuid())[0])
89 81
90 self.okbutton = self.res.get_widget("okButton")82 self.okbutton = self.res.get_widget("okButton")
91 self.okbutton.set_flags(gtk.CAN_DEFAULT)83 self.okbutton.set_flags(gtk.CAN_DEFAULT)
@@ -132,13 +124,15 @@
132 if not author:124 if not author:
133 author = _("Unknown Author")125 author = _("Unknown Author")
134 126
135 folder = self.folder.get_current_folder()127 # CreateNewProject expects a URI
128 folder = PlatformUtils.pathname2url(self.folder.get_current_folder())
129
136 # Save the selected folder as the default folder130 # Save the selected folder as the default folder
137 Globals.settings.general["projectfolder"] = folder131 Globals.settings.general["projectfolder"] = folder
138 Globals.settings.write()132 Globals.settings.write()
139 if not folder:133 if not folder:
140 folder = "~"134 folder = "~"
141 135
142 try:136 try:
143 project = ProjectManager.CreateNewProject(folder, name, author)137 project = ProjectManager.CreateNewProject(folder, name, author)
144 except ProjectManager.CreateProjectError, e:138 except ProjectManager.CreateProjectError, e:
145139
=== added directory 'Jokosher/PlatformUtils'
=== added file 'Jokosher/PlatformUtils/Unix.py'
--- Jokosher/PlatformUtils/Unix.py 1970-01-01 00:00:00 +0000
+++ Jokosher/PlatformUtils/Unix.py 2009-03-19 23:39:14 +0000
@@ -0,0 +1,33 @@
1
2
3import os, os.path, urllib
4import pwd
5
6
7def getFullName():
8 try:
9 # Try to get the full name if it exists
10 fullname = pwd.getpwuid(os.getuid())[4].split(",")[0]
11 if fullname == "":
12 fullname = pwd.getpwuid(os.getuid())[0]
13 return fullname
14 except:
15 # If we can't get the fullname, then just use the login
16 return pwd.getpwuid(os.getuid())[0]
17
18def samefile(path1, path2):
19 return os.path.samefile(path1, path2)
20
21
22def url2pathname(url):
23 return urllib.url2pathname(url)
24
25def pathname2url(path):
26 return "file://%s" % urllib.pathname2url(path)
27
28def GetRecordingDefaults():
29 return dict()
30
31def GetPlaybackDefaults():
32 return dict()
33
034
=== added file 'Jokosher/PlatformUtils/Windows.py'
--- Jokosher/PlatformUtils/Windows.py 1970-01-01 00:00:00 +0000
+++ Jokosher/PlatformUtils/Windows.py 2009-03-19 23:39:14 +0000
@@ -0,0 +1,33 @@
1
2
3import urllib
4
5
6def getFullName():
7 #TODO: Work out how to get the fullname in windows
8 return ""
9
10def samefile(path1, path2):
11 return path1 == path2
12
13def url2pathname(url):
14 return urllib.url2pathname(url)
15
16def pathname2url(path):
17 #Windows pathname2url appends // to the front of the path
18 return "file:%s" % urllib.pathname2url(path)
19
20def GetRecordingDefaults():
21 defaults = {
22 "fileformat": "vorbisenc ! oggmux",
23 "file_extension": "ogg",
24 "audiosrc" : "dshowaudiosrc"
25 }
26 return defaults
27
28
29def GetPlaybackDefaults():
30 defaults = {
31 "audiosink": "directsoundsink"
32 }
33 return defaults
034
=== added file 'Jokosher/PlatformUtils/__init__.py'
--- Jokosher/PlatformUtils/__init__.py 1970-01-01 00:00:00 +0000
+++ Jokosher/PlatformUtils/__init__.py 2009-03-19 23:44:15 +0000
@@ -0,0 +1,10 @@
1
2import platform
3
4system = platform.system()
5
6if system == "Windows":
7 from Windows import *
8else:
9 from Unix import *
10
011
=== modified file 'Jokosher/Project.py'
--- Jokosher/Project.py 2009-03-17 02:09:31 +0000
+++ Jokosher/Project.py 2009-03-26 15:07:44 +0000
@@ -15,7 +15,7 @@
15pygst.require("0.10")15pygst.require("0.10")
16import gst16import gst
17import gobject17import gobject
18import os18import os, os.path
19import gzip19import gzip
20import re20import re
2121
@@ -27,6 +27,7 @@
27import Utils27import Utils
28import AudioBackend28import AudioBackend
29import ProjectManager29import ProjectManager
30import PlatformUtils
3031
31#=========================================================================32#=========================================================================
3233
@@ -392,13 +393,20 @@
392 else:393 else:
393 capsString = "audioconvert"394 capsString = "audioconvert"
394 395
395 pipe = "%s ! %s ! level name=recordlevel interval=%d" +\396 # TODO: get rid of this entire string; do it manually
396 " ! audioconvert ! %s ! filesink location=%s"397 pipe = "%s ! %s ! level name=recordlevel ! audioconvert ! %s ! filesink name=sink"
397 pipe %= (recordString, capsString, event.LEVEL_INTERVAL * gst.SECOND, encodeString, event.file.replace(" ", "\ "))398 pipe %= (recordString, capsString, encodeString)
398 399
399 Globals.debug("Using pipeline: %s" % pipe)400 Globals.debug("Using pipeline: %s" % pipe)
400 401
401 recordingbin = gst.parse_bin_from_description(pipe, False)402 recordingbin = gst.parse_bin_from_description(pipe, False)
403
404 filesink = recordingbin.get_by_name("sink")
405 level = recordingbin.get_by_name("recordlevel")
406
407 filesink.set_property("location", event.file)
408 level.set_property("interval", int(event.LEVEL_INTERVAL * gst.SECOND))
409
402 #update the levels in real time410 #update the levels in real time
403 handle = self.bus.connect("message::element", event.recording_bus_level)411 handle = self.bus.connect("message::element", event.recording_bus_level)
404 412
@@ -605,15 +613,21 @@
605 if instr.inTrack == index:613 if instr.inTrack == index:
606 event = instr.GetRecordingEvent()614 event = instr.GetRecordingEvent()
607 615
616 # TODO: get rid of string concatentation
608 encodeString = Globals.settings.recording["fileformat"]617 encodeString = Globals.settings.recording["fileformat"]
609 pipe = "queue ! audioconvert ! level name=recordlevel interval=%d !" +\618 pipe = "queue ! audioconvert ! level name=recordlevel ! audioconvert ! %s ! filesink name=sink"
610 "audioconvert ! %s ! filesink location=%s"619 pipe %= encodeString
611 pipe %= (event.LEVEL_INTERVAL * gst.SECOND, encodeString, event.file.replace(" ", "\ "))
612 620
613 encodeBin = gst.parse_bin_from_description(pipe, True)621 encodeBin = gst.parse_bin_from_description(pipe, True)
614 bin.add(encodeBin)622 bin.add(encodeBin)
615 pad.link(encodeBin.get_pad("sink"))623 pad.link(encodeBin.get_pad("sink"))
616 624
625 filesink = bin.get_by_name("sink")
626 level = bin.get_by_name("recordlevel")
627
628 filesink.set_property("location", event.file)
629 level.set_property("interval", int(event.LEVEL_INTERVAL * gst.SECOND))
630
617 handle = self.bus.connect("message::element", event.recording_bus_level)631 handle = self.bus.connect("message::element", event.recording_bus_level)
618 632
619 # since we are adding the encodebin to an already playing pipeline, sync up there states633 # since we are adding the encodebin to an already playing pipeline, sync up there states
@@ -812,6 +826,8 @@
812 os.remove(path + "~")826 os.remove(path + "~")
813 else:827 else:
814 #if the saving doesn't fail, move it to the proper location828 #if the saving doesn't fail, move it to the proper location
829 if os.path.exists(path):
830 os.remove(path)
815 os.rename(path + "~", path) 831 os.rename(path + "~", path)
816 832
817 self.emit("undo")833 self.emit("undo")
@@ -1306,10 +1322,12 @@
1306 """1322 """
1307 if not undoAction:1323 if not undoAction:
1308 undoAction = self.NewAtomicUndoAction()1324 undoAction = self.NewAtomicUndoAction()
1309 1325
1326 uris = [PlatformUtils.pathname2url(filename) for filename in fileList]
1327
1310 name, type, pixbuf, path = [x for x in Globals.getCachedInstruments() if x[1] == "audiofile"][0]1328 name, type, pixbuf, path = [x for x in Globals.getCachedInstruments() if x[1] == "audiofile"][0]
1311 instr = self.AddInstrument(name, type, _undoAction_=undoAction)1329 instr = self.AddInstrument(name, type, _undoAction_=undoAction)
1312 instr.AddEventsFromList(0, fileList, copyFile, undoAction)1330 instr.AddEventsFromList(0, uris, copyFile, undoAction)
1313 1331
1314 #_____________________________________________________________________1332 #_____________________________________________________________________
1315 1333
13161334
=== modified file 'Jokosher/ProjectManager.py'
--- Jokosher/ProjectManager.py 2009-03-17 02:09:31 +0000
+++ Jokosher/ProjectManager.py 2009-03-26 15:07:44 +0000
@@ -14,6 +14,7 @@
14import Project, Instrument, Event14import Project, Instrument, Event
15import xml.dom.minidom as xml15import xml.dom.minidom as xml
16import traceback16import traceback
17import PlatformUtils
1718
18def CreateNewProject(projecturi, name, author):19def CreateNewProject(projecturi, name, author):
19 """20 """
@@ -33,6 +34,8 @@
3334
34 (scheme, domain,folder, params, query, fragment) = urlparse.urlparse(projecturi, "file", False)35 (scheme, domain,folder, params, query, fragment) = urlparse.urlparse(projecturi, "file", False)
3536
37 folder = PlatformUtils.url2pathname(folder)
38
36 if scheme != "file":39 if scheme != "file":
37 # raise "The URI scheme used is invalid." message40 # raise "The URI scheme used is invalid." message
38 raise CreateProjectError(5)41 raise CreateProjectError(5)
@@ -114,6 +117,8 @@
114 # raise "The URI scheme used is invalid." message117 # raise "The URI scheme used is invalid." message
115 raise OpenProjectError(1, scheme)118 raise OpenProjectError(1, scheme)
116119
120 projectfile = PlatformUtils.url2pathname(projectfile)
121
117 Globals.debug("Attempting to open:", projectfile)122 Globals.debug("Attempting to open:", projectfile)
118123
119 if not os.path.exists(projectfile):124 if not os.path.exists(projectfile):
120125
=== modified file 'Jokosher/Utils.py'
--- Jokosher/Utils.py 2009-03-12 15:26:43 +0000
+++ Jokosher/Utils.py 2009-03-16 10:02:30 +0000
@@ -16,8 +16,11 @@
16import Globals16import Globals
1717
18import gst18import gst
19if gst.pygst_version >= (0, 10, 10):19try:
20 import gst.pbutils20 import gst.pbutils
21 have_pbutils = True
22except:
23 have_pbutils = False
2124
22# the highest range in decibels there can be between any two levels25# the highest range in decibels there can be between any two levels
23DECIBEL_RANGE = 8026DECIBEL_RANGE = 80
@@ -125,7 +128,7 @@
125 if not channelLevels:128 if not channelLevels:
126 return 0129 return 0
127130
128 negInf = float("-inf")131 negInf = -1E+5000
129 peaktotal = 0132 peaktotal = 0
130 for peak in channelLevels:133 for peak in channelLevels:
131 #if peak > 0.001:134 #if peak > 0.001:
@@ -380,8 +383,8 @@
380#_____________________________________________________________________383#_____________________________________________________________________
381384
382def HandleGstPbutilsMissingMessage(message, callback, x_window_id=0):385def HandleGstPbutilsMissingMessage(message, callback, x_window_id=0):
383 # pbutils was wrapped in 0.10.10386 # Not all platforms have pbutils
384 if gst.pygst_version < (0, 10, 10):387 if not have_pbutils:
385 return False388 return False
386389
387 #self._installing_plugins = True390 #self._installing_plugins = True
388391
=== modified file 'bin/jokosher'
--- bin/jokosher 2009-03-17 02:09:31 +0000
+++ bin/jokosher 2009-03-26 14:19:15 +0000
@@ -11,9 +11,17 @@
11# This script is also responsible for parsing comment line arguments.11# This script is also responsible for parsing comment line arguments.
12#12#
13#-------------------------------------------------------------------------------13#-------------------------------------------------------------------------------
14import os, sys14import os, sys, platform
1515
16ENV_PATHS = {"JOKOSHER_DATA_PATH" : "/usr/share/jokosher/",16if platform.system() == "Windows":
17 ENV_PATHS = {"JOKOSHER_DATA_PATH" : ".\\",
18 "JOKOSHER_IMAGE_PATH" : ".\\pixmaps\\",
19 "JOKOSHER_LOCALE_PATH" : ".\\locale\\",
20 "JOKOSHER_HELP_PATH" : ".\\help\\",
21 "GST_PLUGIN_PATH" : ".\\"
22 }
23else:
24 ENV_PATHS = {"JOKOSHER_DATA_PATH" : "/usr/share/jokosher/",
17 "JOKOSHER_IMAGE_PATH" : "/usr/share/jokosher/pixmaps/",25 "JOKOSHER_IMAGE_PATH" : "/usr/share/jokosher/pixmaps/",
18 "JOKOSHER_LOCALE_PATH" : "/usr/share/locale/",26 "JOKOSHER_LOCALE_PATH" : "/usr/share/locale/",
19 "JOKOSHER_HELP_PATH" : "/usr/share/gnome/jokosher/"27 "JOKOSHER_HELP_PATH" : "/usr/share/gnome/jokosher/"
2028
=== removed file 'dist/jokosher-0.9.tar.gz'
21Binary files dist/jokosher-0.9.tar.gz 2007-04-25 03:17:21 +0000 and dist/jokosher-0.9.tar.gz 1970-01-01 00:00:00 +0000 differ29Binary files dist/jokosher-0.9.tar.gz 2007-04-25 03:17:21 +0000 and dist/jokosher-0.9.tar.gz 1970-01-01 00:00:00 +0000 differ
=== added file 'images/jokosher.ico'
22Binary files images/jokosher.ico 1970-01-01 00:00:00 +0000 and images/jokosher.ico 2008-12-18 13:48:58 +0000 differ30Binary files images/jokosher.ico 1970-01-01 00:00:00 +0000 and images/jokosher.ico 2008-12-18 13:48:58 +0000 differ
=== modified file 'setup.py'
--- setup.py 2009-03-17 02:09:31 +0000
+++ setup.py 2009-03-26 15:07:44 +0000
@@ -50,7 +50,7 @@
50 license='GNU GPL',50 license='GNU GPL',
51 platforms='linux',51 platforms='linux',
52 scripts=['bin/jokosher'],52 scripts=['bin/jokosher'],
53 packages=['Jokosher', 'Jokosher/elements', 'Jokosher/ui'],53 packages=['Jokosher', 'Jokosher/elements', 'Jokosher/ui', 'Jokosher/PlatformUtils'],
54 data_files=[54 data_files=[
55 ('share/jokosher/', glob.glob("Jokosher/*.glade")),55 ('share/jokosher/', glob.glob("Jokosher/*.glade")),
56 ('share/jokosher/', ["Jokosher/jokosher-logo.png"]),56 ('share/jokosher/', ["Jokosher/jokosher-logo.png"]),
5757
=== added file 'setup_win32.py'
--- setup_win32.py 1970-01-01 00:00:00 +0000
+++ setup_win32.py 2009-03-26 15:07:44 +0000
@@ -0,0 +1,41 @@
1#!/usr/bin/env python
2
3from distutils.core import setup
4from subprocess import *
5import os
6import glob
7import py2exe
8
9dist = setup(name='jokosher',
10 version='0.11.1',
11 author='Jokosher Project',
12 author_email='jokosher-devel@gnome.org',
13 maintainer='Michael Sheldon',
14 maintainer_email='mike@mikeasoft.com',
15 description='Multi-track non-linear audio editing.',
16 long_description='Jokosher is a simple yet powerful multi-track studio. With it you can create and record music, podcasts and more, all from an integrated simple environment.',
17 url='http://www.jokosher.org/',
18 download_url='http://www.jokosher.org/download',
19 license='GNU GPL',
20 packages=['Jokosher', 'Jokosher/elements', 'Jokosher/ui', 'Jokosher/PlatformUtils'],
21 windows = [
22 {
23 'script' : 'bin/jokosher',
24 'icon_resources' : [(1, 'images/jokosher.ico')]
25 }
26 ],
27 options = {
28 'py2exe': {
29 'packages' : 'encodings, Jokosher, Jokosher.elements, Jokosher.ui',
30 'includes' : 'cairo, gtk, gtk.glade, gobject, pango, pangocairo, atk, gst, pygst, xdg, Queue, xml.etree.ElementTree, gtk.keysyms, code, keyword, re'
31 }
32 },
33 data_files=[
34 "Jokosher\Jokosher.glade",
35 "Jokosher\jokosher-logo.png",
36 #glob.glob("Instruments\*.instr"),
37 #glob.glob('Instruments\images\*.png'),
38 #glob.glob("extensions\*.py") + glob.glob("extensions\*.egg"),
39 ]
40)
41
042
=== added file 'windows_installer.iss'
--- windows_installer.iss 1970-01-01 00:00:00 +0000
+++ windows_installer.iss 2009-03-26 14:19:15 +0000
@@ -0,0 +1,13 @@
1[Setup]
2AppName =Jokosher
3AppVerName=Jokosher version 0.11.1
4DefaultDirName={pf}\Jokosher
5DefaultGroupName=Jokosher
6Compression=bzip/9
7
8[Files]
9Source: dist/*; DestDir: {app}; Flags: recursesubdirs createallsubdirs
10
11[Icons]
12Name: {group}\Jokosher; Filename: {app}\jokosher.exe; WorkingDir: {app}
13Name: {group}\Uninstall Jokosher; Filename: {uninstallexe}

Subscribers

People subscribed via source and target branches