Changeset 84
- Timestamp:
- 24/12/07 19:23:44 (1 year ago)
- Files:
-
- trunk/src/vlcskineditor/Main.java (modified) (9 diffs)
- trunk/src/vlcskineditor/history/ItemDeletionEvent.java (added)
- trunk/src/vlcskineditor/history/LayoutDeletionEvent.java (added)
- trunk/src/vlcskineditor/history/ResourceDeletionEvent.java (added)
- trunk/src/vlcskineditor/history/WindowDeletionEvent.java (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/src/vlcskineditor/Main.java
r74 r84 28 28 import java.io.*; 29 29 import javax.swing.*; 30 import javax.swing.border.Border;31 30 import javax.swing.filechooser.*; 32 31 import javax.swing.tree.*; … … 47 46 */ 48 47 public class Main extends javax.swing.JFrame implements ActionListener, TreeSelectionListener, WindowListener, MouseListener{ 49 /**50 * The version identification of the current build.51 */52 public final String VERSION = "0.6.0a";48 49 //The version identification of the current build. 50 public final String VERSION = "0.6.0b"; 51 //The directory in which the VLC executable is found 53 52 String vlc_dir = ""; 53 //The directory from which VLC loads its skins 54 54 String vlc_skins_dir = ""; 55 55 JMenuBar mbar; … … 109 109 //Specifies if a file was opened 110 110 boolean opened = false; 111 111 //Handles undoing and redoing of actions 112 112 public History hist; 113 113 … … 538 538 539 539 if(System.getProperty("os.name").indexOf("Windows")!=-1) { 540 try { 541 Registry r = new Registry(); 542 RegistryKey vlc_key = r.openSubkey(Registry.HKEY_LOCAL_MACHINE,"Software\\VideoLAN\\VLC",RegistryKey.ACCESS_READ); 540 try { 541 RegistryKey vlc_key = Registry.openSubkey(Registry.HKEY_LOCAL_MACHINE,"Software\\VideoLAN\\VLC",RegistryKey.ACCESS_READ); 543 542 String installDir = vlc_key.getStringValue("InstallDir"); 544 543 vlc_dir = installDir+File.separator; … … 1008 1007 JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE,null,options,options[1]); 1009 1008 if(n==0) { 1010 s.resources.remove(s.getResource(selected_resource)); 1009 Resource r = s.getResource(selected_resource); 1010 ResourceDeletionEvent rde = new ResourceDeletionEvent(s,r,s.resources.indexOf(r)); 1011 hist.addEvent(rde); 1012 s.resources.remove(r); 1011 1013 s.updateResources(); 1012 1014 } … … 1074 1076 JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE,null,options,options[1]); 1075 1077 if(n==0) { 1078 LayoutDeletionEvent lde = new LayoutDeletionEvent(w, l, w.layouts.indexOf(l), s); 1076 1079 pvwin.clearLayout(); 1077 1080 w.layouts.remove(l); 1078 1081 s.updateWindows(); 1079 1082 s.updateItems(); 1083 hist.addEvent(lde); 1080 1084 } 1081 1085 } … … 1088 1092 JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE,null,options,options[1]); 1089 1093 if(n==0) { 1094 WindowDeletionEvent wde = new WindowDeletionEvent(w, s, s.windows.indexOf(w)); 1090 1095 s.windows.remove(w); 1091 1096 s.updateWindows(); 1097 hist.addEvent(wde); 1092 1098 } 1093 1099 } … … 1242 1248 JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE,null,options,options[1]); 1243 1249 if(n==0) { 1250 Item i = s.getItem(selected_item); 1251 ItemDeletionEvent ide = new ItemDeletionEvent(p,i,p.indexOf(i),s); 1244 1252 p.remove(s.getItem(selected_item)); 1245 s.updateItems(); 1253 s.updateItems(); 1254 hist.addEvent(ide); 1246 1255 } 1247 1256 } … … 1288 1297 s.updateItems(); 1289 1298 } 1290 } 1291 1299 else { 1300 selected_window = null; 1301 selected_layout = null; 1302 pvwin.clearLayout(); 1303 pvwin.setVisible(false); 1304 s.updateItems(); 1305 } 1306 } 1292 1307 } 1293 1308 else if(e.getSource().equals(items_tree)) {
