Commit d802c355 authored by Daniel Dreibrodt's avatar Daniel Dreibrodt

Added Czech translation by LoveCZabijak

Make VLC run on OS X (although there are no skins on VLC for Mac)
Improve language selection menu
parent 4889fe66
This diff is collapsed.
#Available languages
#language code|Human-readable name|language file
ca|Catalan (Incomplete)|ca.txt
nl|Dutch|nl.txt
ca|Catalan (Incomplete) - Català|ca.txt
zh-tw|Chinese (Taiwanese Mandarin) - 國語|zh-tw.txt
cz|Czech - Čeština|cz.txt
nl|Dutch - Nederlands|nl.txt
en|English|en.txt
fr|French|fr.txt
de|German|de.txt
ko|Korean|ko.txt
pl|Polish|pl.txt
pt-br|Portuguese (Brasil)|pt-br.txt
ru|Russian (Incomplete)|ru.txt
sr|Serbian (Latin)|sr.lat.txt
sr-cyr|Serbian (Cyrillic)|sr.cyr.txt
sk|Slovak|sk.txt
tr|Turkish|tr.txt
es|Spanish|es.txt
sv|Swedish (Incomplete)|sv.txt
zh-tw|Traditional Chinese|zh-tw.txt
\ No newline at end of file
fr|French - Français|fr.txt
de|German - Deutsch|de.txt
ko|Korean - 한국어/조선말|ko.txt
pl|Polish - Polski|pl.txt
pt-br|Portuguese (Brasil) - Português (Brasil)|pt-br.txt
ru|Russian (Incomplete) - Русский|ru.txt
sr|Serbian (Latin) - Srpski|sr.lat.txt
sr-cyr|Serbian (Cyrillic) - Српски|sr.cyr.txt
sk|Slovak - Slovenský|sk.txt
tr|Turkish - Türkçe|tr.txt
es|Spanish - Español|es.txt
sv|Swedish (Incomplete) - Svenska|sv.txt
\ No newline at end of file
......@@ -75,10 +75,15 @@ public class Config {
File parent = new File(System.getenv("APPDATA"),"vlc");
if(!parent.exists()) parent.mkdirs();
configFile = new File(parent,"VLCSkinEditor.cfg");
} else if(System.getProperty("os.name").indexOf("Mac")==-1) {
File parent = new File("/home/"+System.getProperty("user.name")+"/.vlc");
if(!parent.exists()) parent.mkdirs();
configFile = new File(parent,"VLCSkinEditor.cfg");
} else {
File parent = new File("/home/"+System.getProperty("user.name")+"/.vlc");
File parent = new File("/Users/"+System.getProperty("user.name")+"/Library/Application Support/VLC Skin Editor");
if(!parent.exists()) parent.mkdirs();
configFile = new File(parent,"VLCSkinEditor.cfg");
}
}
......@@ -148,6 +153,8 @@ public class Config {
*/
public static void save() {
try {
if(!configFile.exists())
configFile.createNewFile();
FileWriter fw = new FileWriter(configFile);
BufferedWriter bw = new BufferedWriter(fw);
Enumeration<String> keys = strings.keys();
......@@ -160,6 +167,8 @@ public class Config {
bw.close();
fw.close();
} catch(IOException ex) {
System.out.println(configFile);
System.out.println(System.getProperty("os.name"));
ex.printStackTrace();
}
......@@ -210,6 +219,7 @@ public class Config {
if(toolbar && !Boolean.parseBoolean(get("toolbar"))) {
mainInstance.hideToolbar();
}
save();
frame.setVisible(false);
frame.dispose();
}
......
......@@ -102,7 +102,7 @@ public class Language {
@Override
public String toString() {
return name + " (" + code + ")";
return name;// + " (" + code + ")";
}
/**
......
......@@ -173,6 +173,13 @@ public class Main extends JFrame implements ActionListener, TreeSelectionListene
addWindowListener(this);
setIconImage(Toolkit.getDefaultToolkit().createImage(this.getClass().getResource("icons/icon16.png")));
if(System.getProperty("os.name").indexOf("Mac")!=-1) {
System.setProperty("apple.laf.useScreenMenuBar", "true");
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "TeacherTool Desktop");
com.apple.eawt.Application.getApplication().setDockIconImage(createIcon("icons/icon.png").getImage());
}
//Menubar creation
mbar = new JMenuBar();
......@@ -227,8 +234,10 @@ public class Main extends JFrame implements ActionListener, TreeSelectionListene
m_file.add(m_file_test);
m_file.add(m_file_vlt);
m_file.add(m_file_png);
m_file.addSeparator();
if(System.getProperty("os.name").indexOf("Mac")==-1) m_file.add(m_file_quit);
if(System.getProperty("os.name").indexOf("Mac")==-1) {
m_file.addSeparator();
m_file.add(m_file_quit);
}
//Initializing of the edit menu
m_edit = new JMenu(Language.get("MENU_EDIT"));
......@@ -269,7 +278,10 @@ public class Main extends JFrame implements ActionListener, TreeSelectionListene
m_edit_right.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_RIGHT,mask));
m_edit_right.addActionListener(this);
m_edit_del = new JMenuItem(Language.get("WIN_ITEMS_DELETE"));
m_edit_del.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE,0));
if(System.getProperty("os.name").indexOf("Mac")!=-1)
m_edit_del.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_BACK_SPACE,mask));
else
m_edit_del.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_DELETE,0));
m_edit_del.addActionListener(this);
m_edit.add(m_edit_undo);
......@@ -2104,8 +2116,7 @@ public class Main extends JFrame implements ActionListener, TreeSelectionListene
}
JFrame.setDefaultLookAndFeelDecorated(true);
System.setProperty("apple.laf.useScreenMenuBar", "true");
System.setProperty("com.apple.mrj.application.apple.menu.about.name", "VLC Skin Editor");
new Main(args);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment