diff options
-rw-r--r-- | Edit/EditToolbars.py | 48 | ||||
-rw-r--r-- | Edit/MainWindow.py | 17 | ||||
-rw-r--r-- | icons/grid.svg | 25 |
3 files changed, 60 insertions, 30 deletions
diff --git a/Edit/EditToolbars.py b/Edit/EditToolbars.py index b06c583..e0976ac 100644 --- a/Edit/EditToolbars.py +++ b/Edit/EditToolbars.py @@ -186,10 +186,10 @@ class pencilPalette(Palette): self.snapGridHBox = gtk.HBox() self.snapGridImage = gtk.Image() - self.snapGridImage.set_from_file(Config.TAM_TAM_ROOT + '/icons/notedur.svg') + self.snapGridImage.set_from_file(Config.TAM_TAM_ROOT + '/icons/grid.svg') self.snapGridBox = BigComboBox() self.snapGridBox.connect('changed', self.handleSnapGrid) - durs = [_('1/2'), _('1/4'), _('1/8'), _('1/16'), _('1/32')] + durs = [_('3'), _('6'), _('12'), _('24'), _('48')] for dur in durs: self.snapGridBox.append_item(durs.index(dur),dur) self.snapGridBox.set_active(0) @@ -214,10 +214,12 @@ class pencilPalette(Palette): self.edit.handleToolClick2(widget, 'default') def handleNoteDur(self, widget): - self.noteDur = widget.props.value + pass + #self.noteDur = widget.props.value def handleSnapGrid(self, widget): - self.snapGrid = widget.props.value + pass + #self.edit.trackInterface.setGrid(int(widget.props.value)) class volumeTempoPalette(Palette): @@ -493,6 +495,9 @@ class propertiesPalette(Palette): self.pageColorComboBox.connect('changed', self.handleColor) self.pageColorBox.pack_start(self.pageColorLabel, False, False, padding = 5) self.pageColorBox.pack_end(self.pageColorComboBox, False, False, padding = 55) + + self.pageSeparator = gtk.HSeparator() + self.pageSeparator.set_size_request(80, -1) self.transposeBox = gtk.HBox() self.transposeLabel = gtk.Label(_('Transposition: ')) @@ -647,23 +652,24 @@ class propertiesPalette(Palette): self.decisionBox.pack_start(self.cancelButton, False, False, padding = 5) self.decisionBox.pack_start(self.acceptButton, False, False, padding = 5) - self.mainBox.pack_start(self.gridDivisionBox, padding = 5) - self.mainBox.pack_start(self.pageColorBox, padding = 5) - self.mainBox.pack_start(self.transposeBox, padding = 5) - self.mainBox.pack_start(self.volumeBox, padding = 5) - self.mainBox.pack_start(self.panBox, padding = 5) - self.mainBox.pack_start(self.reverbBox, padding = 5) - self.mainBox.pack_start(self.attackDurBox, padding = 5) - self.mainBox.pack_start(self.decayDurBox, padding = 5) - self.mainBox.pack_start(self.filterTypeBox, padding = 5) - self.mainBox.pack_start(self.filterCutoffBox, padding = 5) - self.generationMainBox.pack_start(self.generationLabel, padding = 15) - self.generationMainBox.pack_start(self.generationTypeBox, padding = 5) - self.generationMainBox.pack_start(self.minimumBox, padding = 5) - self.generationMainBox.pack_start(self.maximumBox, padding = 5) - self.generationMainBox.pack_start(self.randomBox, padding = 5) - self.generationMainBox.pack_start(self.decisionBox, padding = 5) - self.mainBox.pack_start(self.generationMainBox, padding = 5) + self.mainBox.pack_start(self.gridDivisionBox, padding = 3) + self.mainBox.pack_start(self.pageColorBox, padding = 3) + self.mainBox.pack_start(self.pageSeparator, padding = 3) + self.mainBox.pack_start(self.transposeBox, padding = 3) + self.mainBox.pack_start(self.volumeBox, padding = 3) + self.mainBox.pack_start(self.panBox, padding = 3) + self.mainBox.pack_start(self.reverbBox, padding = 3) + self.mainBox.pack_start(self.attackDurBox, padding = 3) + self.mainBox.pack_start(self.decayDurBox, padding = 3) + self.mainBox.pack_start(self.filterTypeBox, padding = 3) + self.mainBox.pack_start(self.filterCutoffBox, padding = 3) + self.generationMainBox.pack_start(self.generationLabel, padding = 10) + self.generationMainBox.pack_start(self.generationTypeBox, padding = 3) + self.generationMainBox.pack_start(self.minimumBox, padding = 3) + self.generationMainBox.pack_start(self.maximumBox, padding = 3) + self.generationMainBox.pack_start(self.randomBox, padding = 3) + self.generationMainBox.pack_start(self.decisionBox, padding = 3) + self.mainBox.pack_start(self.generationMainBox, padding = 3) self.mainBox.show_all() self.generationMainBox.hide() diff --git a/Edit/MainWindow.py b/Edit/MainWindow.py index b25cf62..9bbebd2 100644 --- a/Edit/MainWindow.py +++ b/Edit/MainWindow.py @@ -52,14 +52,7 @@ class MainWindow( SubActivity ): for i in [6,7,8,9,10]: self.csnd.setTrackVolume(100, i) self.trackCount = 6 - - # Toolbar - self.activity.activity_toolbar.keep.show() - self._mainToolbar = mainToolbar(self.activity.toolbox, self) - self.activity.toolbox.add_toolbar(_('Compose'), self._mainToolbar) - self.activity.toolbox.set_current_toolbar(1) - self._mainToolbar.show() - + def init_data( ): TP.ProfileBegin("init_data") self._data = {} @@ -547,6 +540,13 @@ class MainWindow( SubActivity ): self.displayPage( first ) self.createNewTune( self.GUI["2generateBtn"], data = None ) + + # Toolbar + self.activity.activity_toolbar.keep.show() + self._mainToolbar = mainToolbar(self.activity.toolbox, self) + self.activity.toolbox.add_toolbar(_('Compose'), self._mainToolbar) + self.activity.toolbox.set_current_toolbar(1) + self._mainToolbar.show() self.show_all() #gtk command @@ -557,7 +557,6 @@ class MainWindow( SubActivity ): self.audioRecordState = False - def createNewTune( self, widget, data=None ): if random.choice([0,1]): self.createNewTune1() diff --git a/icons/grid.svg b/icons/grid.svg new file mode 100644 index 0000000..8876477 --- /dev/null +++ b/icons/grid.svg @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8"?>
+<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14576) -->
+<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
+<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
+ width="75px" height="30px" viewBox="0 0 75 30" enable-background="new 0 0 75 30" xml:space="preserve">
+<line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" x1="60" y1="0.97" x2="60" y2="25.97"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" x1="15.51" y1="25.97" x2="15.51" y2="-0.03"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" x1="42.204" y1="1.303" x2="42.204" y2="26.304"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" x1="24.408" y1="26.637" x2="24.408" y2="0.636"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" x1="51.102" y1="1.303" x2="51.102" y2="26.304"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" x1="33.306" y1="26.637" x2="33.306" y2="0.636"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" x1="59.66" y1="26.63" x2="15" y2="26.63"/>
+<line fill="none" stroke="#FFFFFF" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" x1="60.493" y1="0.463" x2="15.833" y2="0.463"/>
+<g>
+ <g>
+ <line fill="#808292" x1="45.25" y1="14.833" x2="54.667" y2="24.333"/>
+ <polygon fill="#808292" points="42.765,12.325 47.711,14.428 45.436,15.02 44.824,17.289 "/>
+ </g>
+ <g>
+
+ <line fill="none" stroke="#969696" stroke-width="3" stroke-linecap="round" stroke-linejoin="round" x1="45.25" y1="14.833" x2="54.667" y2="24.333"/>
+ <polygon fill="#969696" points="37.794,7.311 52.632,13.619 45.808,15.396 43.972,22.203 "/>
+ </g>
+</g>
+</svg>
|