Changeset 67

Show
Ignore:
Timestamp:
31/10/07 12:19:16 (1 year ago)
Author:
altglass
Message:

Alphacolor fix, .vlt is always assigned to new VLT files, progress window is shown when creating a VLT

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/src/vlcskineditor/Main.java

    r59 r67  
    683683      else { 
    684684        File f = base_fc.getSelectedFile(); 
    685         if(!f.getPath().endsWith(".xml")) f = new File(f.getPath()+".xml"); 
     685        if(!f.getPath().toLowerCase().endsWith(".xml")) f = new File(f.getPath()+".xml"); 
    686686        setTitle(f.getPath()+" - VLC Skin Editor "+VERSION); 
    687687        s.createNew(f);                   
     
    736736      if(returnVal == JFileChooser.APPROVE_OPTION) { 
    737737        f = vlt_saver.getSelectedFile(); 
     738        if(!f.getPath().toLowerCase().endsWith(".vlt")) f = new File(f.getPath()+".vlt"); 
    738739      }       
    739740      else return; 
     741      ProgressWindow pwin = new ProgressWindow(this,"");   
     742      pwin.setText("Creating VLT archive..."); 
     743      pwin.setVisible(true); 
    740744      try {         
    741745        TarGzOutputStream tgz = new TarGzOutputStream(new FileOutputStream(f)); 
     
    772776            catch (IOException ex) { 
    773777              ex.printStackTrace(); 
     778              pwin.setVisible(false); 
    774779              JOptionPane.showMessageDialog(this,"VLT file could not be created!","Could not create VLT file",JOptionPane.ERROR_MESSAGE); 
    775780            }        
     
    793798              } 
    794799            } 
    795             catch (IOException ex) { 
     800            catch (IOException ex) {               
    796801              ex.printStackTrace(); 
     802              pwin.setVisible(false); 
    797803              JOptionPane.showMessageDialog(this,"VLT file could not be created!","Could not create VLT file",JOptionPane.ERROR_MESSAGE); 
    798804            } 
     
    801807         
    802808        tgz.close(); 
     809        pwin.setVisible(false); 
    803810        JOptionPane.showMessageDialog(this,"VLT file created successfully!","VLT file created",JOptionPane.INFORMATION_MESSAGE);         
    804811      } 
    805       catch (Exception ex) { 
     812      catch (Exception ex) {         
    806813        ex.printStackTrace(); 
     814        pwin.setVisible(false); 
    807815        JOptionPane.showMessageDialog(this,"VLT file could not be created!","Could not create VLT file",JOptionPane.ERROR_MESSAGE);         
    808816        return; 
  • trunk/src/vlcskineditor/Resources/Bitmap.java

    r66 r67  
    123123              g2d.drawRect(x,y,0,0); 
    124124            }  
    125             else if(alpha>0) { 
     125            else if(image.getRGB(x,y)!=alphargb && alpha>0) { 
    126126              g2d.setColor(new Color(red,green,blue)); 
    127127              g2d.drawRect(x,y,0,0);