From: WiESi <wi...@us...> - 2006-03-22 18:27:19
|
Update of /cvsroot/javaamp/javaamp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2835/src Modified Files: PlayQueue.java PreferencesDialog.java SpectrumLabel.java Log Message: Index: PreferencesDialog.java =================================================================== RCS file: /cvsroot/javaamp/javaamp/src/PreferencesDialog.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -d -r1.1 -r1.2 --- PreferencesDialog.java 19 Mar 2006 10:17:40 -0000 1.1 +++ PreferencesDialog.java 22 Mar 2006 18:26:59 -0000 1.2 @@ -57,6 +57,7 @@ setLocation((getToolkit().getScreenSize().width - getWidth()) / 2, (getToolkit().getScreenSize().height - getHeight()) / 2); setLayout(null); + setDefaultCloseOperation(HIDE_ON_CLOSE); DefaultMutableTreeNode root = new DefaultMutableTreeNode(); mtnJavaAmp = new DefaultMutableTreeNode("JavaAmp"); @@ -114,6 +115,11 @@ btnClose = new JButton(Language.get("CLOSE")); btnClose.setDefaultCapable(true); btnClose.setBounds(10, 385, 150, 25); + btnClose.addActionListener(new ActionListener() { + public void actionPerformed(ActionEvent e) { + setVisible(false); + } + }); panJavaAmp = new JPanel(null); panJavaAmp.setBorder(BorderFactory.createTitledBorder( @@ -154,7 +160,7 @@ Language.get("INTERNET_SETTINGS"))); panInternet.setBounds(10, 40, 375, 75); chbProxy = new JCheckBox(Language.get("ENABLE_PROXY")); - chbProxy.setBounds(15, 15, 90, 20); + chbProxy.setBounds(15, 15, 345, 20); panInternet.add(chbProxy); lblProxyHost = new JLabel(Language.get("PROXY_HOST")); lblProxyHost.setBounds(15, 40, 70, 20); @@ -170,27 +176,25 @@ panInternet.add(tfdPort); panGenPref.add(panInternet); chbSplash = new JCheckBox(Language.get("SHOW_SPLASH")); - chbSplash.setBounds(10, 120, 120, 20); + chbSplash.setBounds(10, 120, 370, 20); panGenPref.add(chbSplash); chbMultiple = new JCheckBox(Language.get("ALLOW_MULTIPLE")); - chbMultiple.setBounds(10, 140, chbMultiple.getFontMetrics( - chbMultiple.getFont()).stringWidth(chbMultiple.getText()) + 25, 20); - + chbMultiple.setBounds(10, 140, 370, 20); panGenPref.add(chbMultiple); chbUpdate = new JCheckBox(Language.get("CHECK_NEW")); - chbUpdate.setBounds(10, 160, 190, 20); + chbUpdate.setBounds(10, 160, 370, 20); panGenPref.add(chbUpdate); lblShowIn = new JLabel(Language.get("SHOW_JAVAAMP_IN")); - lblShowIn.setBounds(10, 180, 90, 20); + lblShowIn.setBounds(10, 180, 370, 20); panGenPref.add(lblShowIn); chbTaskbar = new JCheckBox(Language.get("TASKBAR")); - chbTaskbar.setBounds(30, 200, 60, 20); + chbTaskbar.setBounds(30, 200, 350, 20); panGenPref.add(chbTaskbar); chbSysTray = new JCheckBox(Language.get("SYSTRAY")); - chbSysTray.setBounds(30, 220, 80, 20); + chbSysTray.setBounds(30, 220, 350, 20); panGenPref.add(chbSysTray); chbScroll = new JCheckBox(Language.get("SCROLL_TITLE")); - chbScroll.setBounds(10, 240, 140, 20); + chbScroll.setBounds(10, 240, 370, 20); panGenPref.add(chbScroll); panPlaylist = new JPanel(null); Index: SpectrumLabel.java =================================================================== RCS file: /cvsroot/javaamp/javaamp/src/SpectrumLabel.java,v retrieving revision 1.5 retrieving revision 1.6 diff -u -d -r1.5 -r1.6 --- SpectrumLabel.java 10 Mar 2006 14:29:09 -0000 1.5 +++ SpectrumLabel.java 22 Mar 2006 18:26:59 -0000 1.6 @@ -121,8 +121,7 @@ duration = "##:##"; else duration = JavaAmpToolkit.getDuration00( - FSound.FSOUND_Stream_GetTime(owner.playDialog.pq.stream) / - 1000); + owner.playDialog.pq.position / 1000); int xt = 46; for(int i = 0; i < duration.length(); i++) xt = drawNum(duration.charAt(i), xt, 5); Index: PlayQueue.java =================================================================== RCS file: /cvsroot/javaamp/javaamp/src/PlayQueue.java,v retrieving revision 1.16 retrieving revision 1.17 diff -u -d -r1.16 -r1.17 --- PlayQueue.java 19 Mar 2006 10:17:39 -0000 1.16 +++ PlayQueue.java 22 Mar 2006 18:26:59 -0000 1.17 @@ -10,21 +10,19 @@ JavaAmp owner; int current; boolean running; + int streamlen; int position; int pause; // 0=aus, 1=pause, 2=->aus, 3=->pause boolean change; // false=nichts, true=wechseln boolean hidden; int c; - FSoundStream stream; - int streamlen; public PlayQueue(JavaAmp o) { owner = o; current = o.playlistDialog.lstPlaylist.getSelectedIndex(); running = true; pause = 0; - position = 0; change = false; hidden = false; } @@ -176,10 +174,10 @@ FSound.FSOUND_SetPaused(c, true); pause = 1; } + position = FSound.FSOUND_Stream_GetTime(stream); if(owner.playDialog.prbTrack.getString().equals("0")) owner.playDialog.prbTrack.setValue((int)((double) - FSound.FSOUND_Stream_GetTime(stream) / - (double)streamlen * 255d)); + position / (double)streamlen * 255d)); try { Thread.sleep(50); } |