~teemu-heinamaki/ubuntu/maverick/tuxguitar/merge-from-debian

« back to all changes in this revision

Viewing changes to TuxGuitar/src/org/herac/tuxguitar/gui/table/TGTableViewer.java

  • Committer: teemu.heinamaki at gmail
  • Date: 2010-05-21 18:04:21 UTC
  • mfrom: (5.1.4 sid)
  • Revision ID: teemu.heinamaki@gmail.com-20100521180421-8b3pn1cknq1kn08h
* Merge from Debian, remaining changes (LP: 523196):
  - debian/control
     + Use xulrunner 1.9.2
     + Use jsa-plugin by default
     + Change maintainer to Ubuntu MOTU
  - misc/tuxguitar.sh
     + Search for xulrunner 1.9.2 instead of 1.9.1   
* Address bashism in /usr/bin/tuxguitar (Closes: #581142) 
  (Thank you to Raphael Geissert)
* Switch to dpkg-source 3.0 (quilt) format
  - remove debian/README.source
  - remove patch-related targets in debian/rules
  - remove build-dep on quilt
* debian/compat - upgrade to debhelper 7
* Remove extraneous LICENSE file.
* Modify tuxguitar.sh to find swt-gtk-3.5.1.jar (Closes: #575898)
* Unbuild tuxguitar-gervill (Closes: #570556) :
  - since it depends on unpackaged component
* Added jack plugin (Closes: #569999)
* Merged upstream files in patch (Closes: #569910)
* Non-maintainer upload.
* debian/control:
  - Update swt-gtk dependency to 3.5 to fix FTBFS. (Closes: #564347)
  - Change XS-Vcs-* fields to Vcs-*.
  - Add ${misc:Depends}.
  - Bump Standards-Version to 3.8.4.
* debian/rules: Don't install redundant LICENSE doc.
* New upstream release (Closes: #510742)
* Merged patch : tuxguitar_1.1-1ubuntu1.patch
* Added Makefile : from upstream repo
* debian/* :
  - Migrated to quilt
  - Updated standards
* Non-maintainer upload for transition to xulrunner 1.9.1.
  (Closes: #548683)
* debian/control: Depend on a xulrunner-1.9.1.
* misc/tuxguitar.sh: Detect xulrunner 1.9.1.
* New upstream release (closes: #405295 , #398972)

Show diffs side-by-side

added added

removed removed

Lines of Context:
5
5
import org.eclipse.swt.events.MouseEvent;
6
6
import org.eclipse.swt.events.MouseListener;
7
7
import org.eclipse.swt.graphics.Color;
 
8
import org.eclipse.swt.graphics.Rectangle;
8
9
import org.eclipse.swt.layout.GridLayout;
9
10
import org.eclipse.swt.widgets.Composite;
10
11
import org.eclipse.swt.widgets.Event;
63
64
                GridLayout layout = new GridLayout();
64
65
                layout.marginWidth = 0;
65
66
                layout.marginHeight = 0;
 
67
                layout.marginTop = 0;
 
68
                layout.marginBottom = 0;
66
69
                layout.horizontalSpacing = 0;
67
70
                layout.verticalSpacing = 0;
68
71
                getComposite().setLayout(layout);
72
75
                this.hSroll = getComposite().getHorizontalBar();
73
76
                this.hSroll.addListener(SWT.Selection, new Listener() {
74
77
                        public void handleEvent(Event e) {
75
 
                                redraw();
 
78
                                redrawLocked();
76
79
                        }
77
80
                });
78
81
        }
221
224
        }
222
225
        
223
226
        private int getHeight(){
224
 
                return ( this.table.getMinHeight() + getComposite().getHorizontalBar().getSize().y);
 
227
                Rectangle r1 = this.composite.getBounds();
 
228
                Rectangle r2 = this.composite.getClientArea();
 
229
                return ( this.table.getMinHeight() + (r1.height - r2.height) );
 
230
                //return ( this.table.getMinHeight() + getComposite().getHorizontalBar().getSize().y );
225
231
        }
226
232
        
227
233
        private void redrawRows(int selectedTrack){
235
241
                }
236
242
        }
237
243
        
 
244
        public void redrawLocked(){
 
245
                if( !TuxGuitar.instance().isLocked() ){
 
246
                        TuxGuitar.instance().lock();
 
247
                        redraw();
 
248
                        TuxGuitar.instance().unlock();
 
249
                }
 
250
        }
 
251
        
238
252
        public void redraw(){
239
253
                if(!isDisposed() && !TuxGuitar.instance().isLocked()){
240
 
                        TuxGuitar.instance().lock();
241
254
                        this.updateTable();
242
255
                        this.table.getColumnCanvas().setTitle(TuxGuitar.instance().getSongManager().getSong().getName());
243
256
                        int selectedTrack = getEditor().getTablature().getCaret().getTrack().getNumber();
251
264
                                this.followScroll = false;
252
265
                        }
253
266
                        getComposite().redraw();
254
 
                        TuxGuitar.instance().unlock();
255
267
                }
256
268
        }
257
269
        
258
270
        public void redrawPlayingMode(){
259
271
                if(!isDisposed() && !TuxGuitar.instance().isLocked()){
260
 
                        TuxGuitar.instance().lock();
261
272
                        TGMeasure measure =  TuxGuitar.instance().getEditorCache().getPlayMeasure();
262
273
                        if(measure != null && measure.getTrack() != null){
263
274
                                this.updateTable();
270
281
                                this.selectedTrack = selectedTrack;
271
282
                                this.selectedMeasure = selectedMeasure;
272
283
                        }
273
 
                        TuxGuitar.instance().unlock();
274
284
                }
275
285
        }
276
286