Commit 3b08552c authored by Daniel Dreibrodt's avatar Daniel Dreibrodt

Integration of Window.java and Layout.java into the translation system

parent 765e40d3
......@@ -5,6 +5,7 @@
@include english/main_windows.txt
@include english/action_editor.txt
@include english/sliderbg_gen.txt
@include english/edit_windows.txt
#General strings
CHOICE_YES|Yes
......@@ -93,6 +94,13 @@ ERROR_MALPHA_MSG|Please enter a valid opacity when moving! (0-255)
ERROR_SBGGEN_MIDDLE_MSG|Could not load middle image!\nAt least the middle part of the slider is needed to generate a slider background.
ERROR_VLT_TITLE|Could not create VLT file
ERROR_VLT_MSG|VLT file could not be created!
ERROR_ID_INVALID_TITLE|ID not valid
ERROR_ID_INVALID_MSG|Please enter a valid ID!
ERROR_ID_EXISTS_MSG|The ID "%i" already exists.\nPlease choose another one.
ERROR_WIDTH_INVALID_TITLE|Width not valid
ERROR_WIDTH_INVALID_MSG|Please enter a valid width!
ERROR_HEIGHT_INVALID_TITLE|Height not valid
ERROR_HEIGHT_INVALID_MSG|Please enter a valid height!
#Other strings
THEMEINFO_NAME_DEFAULT|Unnamed Theme
......
#Author/s: Daniel Dreibrodt
#General strings
NOTE_STARRED|* Attributes marked with a star must be specified.
#Common strings
WIN_ITEM_GENERAL|General attributes
WIN_ITEM_ID|ID*:
WIN_ITEM_ID_TIP|Name of the %t (it may be used for actions). Must be unique.
WIN_ITEM_X|X:
WIN_ITEM_Y|Y:
WIN_ITEM_VISIBLE|Visibility:
#Layout
WIN_LAYOUT_TITLE|Layout settings
WIN_LAYOUT_GENERAL|General attributes
WIN_LAYOUT_DIMENSIONS|Dimensions
WIN_LAYOUT_WIDTH|Initial width*:
WIN_LAYOUT_WIDTH_TIP|Initial width of the layout.
WIN_LAYOUT_HEIGHT|Initial height*:
WIN_LAYOUT_HEIGHT_TIP|Initial height of the layout.
WIN_LAYOUT_MINWIDTH|Minimum width:
WIN_LAYOUT_MINWIDTH_TIP|Minimum width of the layout. Only used when resizing the layout. If this value is set to "-1", the initial width will be used as minimum width.
WIN_LAYOUT_MINHEIGHT|Minimum height:
WIN_LAYOUT_MINHEIGHT_TIP|Minimum height of the layout. Only used when resizing the layout. If this value is set to "-1", the initial height will be used as minimum height.
WIN_LAYOUT_MAXWIDTH|Maximum width:
WIN_LAYOUT_MAXWIDTH_TIP|Maximum width of the layout. Only used when resizing the layout. If this value is set to "-1", the initial width will be used as maximum width.
WIN_LAYOUT_MAXHEIGHT|Maximum height:
WIN_LAYOUT_MAXHEIGHT_TIP|Maximum height of the layout. Only used when resizing the layout. If this value is set to "-1", the initial height will be used as maximum height.
#Window
WIN_WINDOW_TITLE|Window settings
WIN_WINDOW_X_TIP|Initial distance of the window to the left edge of the screen.
WIN_WINDOW_Y_TIP|Initial distance of the window to the top edge of the screen.
WIN_WINDOW_VISIBLE_TIP|Indicates whether the window should appear when VLC is started. Since VLC remembers the skin windows position and visibility, this attribute will only be used the first time the skin is started.
WIN_WINDOW_DD|Drag an drop:
WIN_WINDOW_DD_TIP|Indicates whether drag and drop of media files is allowed on this window.
WIN_WINDOW_PD|Play on drop:
WIN_WINDOW_PD_TIP|Indicates whether a dropped file is played directly (true) or only enqueued (false). This attribute has no effect if dragdrop is set to "false".
WIN_WINDOW_DD_PANEL|Drag and drop options
\ No newline at end of file
......@@ -22,10 +22,8 @@
package vlcskineditor;
import java.util.*;
import java.awt.*;
import javax.swing.*;
import javax.swing.tree.*;
import java.awt.Graphics2D;
import javax.swing.tree.DefaultMutableTreeNode;
/**
* Abstract superclass representing layout elements
......
......@@ -57,7 +57,7 @@ public class Layout implements ActionListener{
java.util.List<Item> items = new LinkedList<Item>();
String type = "List";
public String type = Language.get("LAYOUT");
boolean created = false;
......@@ -73,7 +73,7 @@ public class Layout implements ActionListener{
width = XML.getIntValue(code[0],"width");
height = XML.getIntValue(code[0],"height");
if(code[0].indexOf("id=\"")!=-1) id = XML.getValue(code[0],"id");
else id = "Unnamed layout #"+s.getNewId();
else id = Language.get("UNNAMED").replaceAll("%t",type).replaceAll("%i",String.valueOf(s.getNewId()));
if(code[0].indexOf("minwidth=\"")!=-1) minwidth = XML.getIntValue(code[0],"minwidth");
if(code[0].indexOf("maxwidth=\"")!=-1) maxwidth = XML.getIntValue(code[0],"maxwidth");
if(code[0].indexOf("minheight=\"")!=-1) minheight = XML.getIntValue(code[0],"minheight");
......@@ -158,7 +158,7 @@ public class Layout implements ActionListener{
public Layout(Window w_, Skin s_) {
s=s_;
parent=w_;
id = "Unnamed layout #"+s.getNewId();
id = Language.get("UNNAMED").replaceAll("%t",type).replaceAll("%i",String.valueOf(s.getNewId()));
width=0;
height=0;
showOptions();
......@@ -202,44 +202,44 @@ public class Layout implements ActionListener{
*/
public void showOptions() {
if(frame==null) {
frame = new JFrame("Layout settings");
frame = new JFrame(Language.get("WIN_LAYOUT_TITLE"));
frame.setResizable(false);
frame.setLayout(new FlowLayout());
if(!created) frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
JLabel id_l = new JLabel("ID*:");
JLabel id_l = new JLabel(Language.get("WIN_ITEM_ID"));
id_tf = new JTextField();
id_tf.setToolTipText("Name of the layout (it may be used for actions). Two layouts cannot have the same id.");
JLabel width_l = new JLabel("Initial width*:");
id_tf.setToolTipText(Language.get("WIN_ITEM_ID_TIP").replaceAll("%t",type));
JLabel width_l = new JLabel(Language.get("WIN_LAYOUT_WIDTH"));
width_tf = new JTextField();
width_tf.setDocument(new NumbersOnlyDocument());
width_tf.setToolTipText("Initial width of the layout. This value is required since VLC is not (yet?) able to calculate it using the sizes and positions of the controls.");
JLabel height_l = new JLabel("Initial height*:");
width_tf.setToolTipText(Language.get("WIN_LAYOUT_WIDTH_TIP"));
JLabel height_l = new JLabel(Language.get("WIN_LAYOUT_HEIGHT"));
height_tf = new JTextField();
height_tf.setDocument(new NumbersOnlyDocument());
height_tf.setToolTipText("Initial height of the layout. This value is required since VLC is not (yet?) able to calculate it using the sizes and positions of the controls.");
JLabel minwidth_l = new JLabel("Min. width:");
height_tf.setToolTipText(Language.get("WIN_LAYOUT_HEIGHT_TIP"));
JLabel minwidth_l = new JLabel(Language.get("WIN_LAYOUT_MINWIDTH"));
minwidth_tf = new JTextField();
minwidth_tf.setDocument(new NumbersOnlyDocument());
minwidth_tf.setToolTipText("Minimum width of the layout. This value is only used when resizing the layout. If this value is set to \"-1\", the initial width (as specified by the width attribute) will be used as minimum width.");
JLabel minheight_l = new JLabel("Min. height:");
minwidth_tf.setToolTipText(Language.get("WIN_LAYOUT_MINWIDTH_TIP"));
JLabel minheight_l = new JLabel(Language.get("WIN_LAYOUT_MINHEIGHT"));
minheight_tf = new JTextField();
minheight_tf.setDocument(new NumbersOnlyDocument());
minheight_tf.setToolTipText("Minimum height of the layout. This value is only used when resizing the layout. If this value is set to \"-1\", the initial width (as specified by the width attribute) will be used as minimum width.");
JLabel maxwidth_l = new JLabel("Max. width:");
minheight_tf.setToolTipText(Language.get("WIN_LAYOUT_MINHEIGHT_TIP"));
JLabel maxwidth_l = new JLabel(Language.get("WIN_LAYOUT_MAXWIDTH"));
maxwidth_tf = new JTextField();
maxwidth_tf.setDocument(new NumbersOnlyDocument());
maxwidth_tf.setToolTipText("Maximum width of the layout. This value is only used when resizing the layout. If this value is set to \"-1\", the initial width (as specified by the width attribute) will be used as maximum width.");
JLabel maxheight_l = new JLabel("Max. height:");
maxwidth_tf.setToolTipText(Language.get("WIN_LAYOUT_MAXWIDTH_TIP"));
JLabel maxheight_l = new JLabel(Language.get("WIN_LAYOUT_MAXHEIGHT"));
maxheight_tf = new JTextField();
maxheight_tf.setDocument(new NumbersOnlyDocument());
maxheight_tf.setToolTipText("Maximum height of the layout. This value is only used when resizing the layout. If this value is set to \"-1\", the initial width (as specified by the width attribute) will be used as maximum width.");
ok_btn = new JButton("OK");
maxheight_tf.setToolTipText(Language.get("WIN_LAYOUT_MAXHEIGHT_TIP"));
ok_btn = new JButton(Language.get("BUTTON_OK"));
ok_btn.addActionListener(this);
cancel_btn = new JButton("Cancel");
cancel_btn = new JButton(Language.get("BUTTON_CANCEL"));
cancel_btn.addActionListener(this);
help_btn = new JButton("Help");
help_btn = new JButton(Language.get("BUTTON_HELP"));
help_btn.addActionListener(this);
JLabel attr_l = new JLabel("* Attributes marked with a star must be specified.");
JLabel attr_l = new JLabel(Language.get("NOTE_STARRED"));
//Distance of textfields to WEST edge of container
Component[] labels = { id_l, width_l, height_l, minwidth_l, minheight_l, maxwidth_l, maxheight_l};
......@@ -251,7 +251,7 @@ public class Layout implements ActionListener{
general.add(id_l);
general.add(id_tf);
id_tf.setPreferredSize(new Dimension(tf_wd,id_tf.getPreferredSize().height));
general.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "General Attributes"));
general.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), Language.get("WIN_ITEM_GENERAL")));
SpringLayout general_layout = new SpringLayout();
general.setLayout(general_layout);
general_layout.putConstraint(SpringLayout.NORTH, id_l, 5, SpringLayout.NORTH, general);
......@@ -281,7 +281,7 @@ public class Layout implements ActionListener{
dim.add(maxheight_l);
dim.add(maxheight_tf);
maxheight_tf.setPreferredSize(new Dimension(tf_wd,maxheight_tf.getPreferredSize().height));
dim.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "Dimensions"));
dim.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), Language.get("WIN_LAYOUT_DIMENSIONS")));
SpringLayout dim_layout = new SpringLayout();
dim.setLayout(dim_layout);
dim_layout.putConstraint(SpringLayout.NORTH, width_l, 5, SpringLayout.NORTH, dim);
......@@ -379,21 +379,21 @@ public class Layout implements ActionListener{
public void actionPerformed(ActionEvent e) {
if(e.getSource().equals(ok_btn)) {
if(id_tf.getText().equals("")) {
JOptionPane.showMessageDialog(frame,"Please enter a valid ID!","ID not valid",JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(frame,Language.get("ERROR_ID_INVALID_MSG"),Language.get("ERROR_ID_INVALID_TITLE"),JOptionPane.INFORMATION_MESSAGE);
return;
}
else if(!id_tf.getText().equals(id)) {
if(s.idExists(id_tf.getText())) {
JOptionPane.showMessageDialog(frame,"The ID \""+id_tf.getText()+"\" already exists, please choose another one.","ID not valid",JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(frame,Language.get("ERROR_ID_EXISTS_MSG").replaceAll("%i",id_tf.getText()),Language.get("ERROR_ID_INVALID_TITLE"),JOptionPane.INFORMATION_MESSAGE);
return;
}
}
if(Integer.parseInt(width_tf.getText())<=0) {
JOptionPane.showMessageDialog(frame,"Please enter a valid width!","Width not valid",JOptionPane.INFORMATION_MESSAGE);
if(width_tf.getText().length()>0 && Integer.parseInt(width_tf.getText())<=0) {
JOptionPane.showMessageDialog(frame,Language.get("ERROR_WIDTH_INVALID_MSG"),Language.get("ERROR_WIDTH_INVALID_TITLE"),JOptionPane.INFORMATION_MESSAGE);
return;
}
if(Integer.parseInt(height_tf.getText())<=0) {
JOptionPane.showMessageDialog(frame,"Please enter a valid height!","Height not valid",JOptionPane.INFORMATION_MESSAGE);
if(height_tf.getText().length()>0 && Integer.parseInt(height_tf.getText())<=0) {
JOptionPane.showMessageDialog(frame,Language.get("ERROR_HEIGHT_INVALID_MSG"),Language.get("ERROR_HEIGHT_INVALID_TITLE"),JOptionPane.INFORMATION_MESSAGE);
return;
}
frame.setVisible(false);
......@@ -473,7 +473,7 @@ public class Layout implements ActionListener{
if(i.id.equals(id_)) {
return items;
}
if (i.type.equals("Group")||i.type.equals("Panel")) {
if (i.getClass().equals(Group.class)||i.getClass().equals(vlcskineditor.items.Panel.class)) {
java.util.List<Item> p = i.getParentListOf(id_);
if (p!=null) return p;
}
......
......@@ -1316,8 +1316,8 @@ public class Main extends javax.swing.JFrame implements ActionListener, TreeSele
if(selected_item!=null) {
Item i = s.getItem(selected_item);
if(i!=null) {
if(i.type.equals("Group")) items_add_pu_tp.setEnabled(true);
if(i.type.equals("Panel")) items_add_pu_tp.setEnabled(true);
if(i.getClass().equals(Group.class)) items_add_pu_tp.setEnabled(true);
if(i.getClass().equals(vlcskineditor.items.Panel.class)) items_add_pu_tp.setEnabled(true);
}
}
items_add_pu.setSelected(null);
......
......@@ -36,12 +36,12 @@ import javax.swing.border.*;
*/
public class Window implements ActionListener{
final String ID_DEFAULT="none";
final String ID_DEFAULT = "none";
final String VISIBLE_DEFAULT = "true";
final int X_DEFAULT = 0;
final int Y_DEFAULT = 0;
final boolean DRAGDROP_DEFAULT=true;
final boolean PLAYONDROP_DEFAULT=true;
final boolean DRAGDROP_DEFAULT = true;
final boolean PLAYONDROP_DEFAULT = true;
public String id=ID_DEFAULT;
public String visible = VISIBLE_DEFAULT;
......@@ -59,12 +59,14 @@ public class Window implements ActionListener{
JButton ok_btn, cancel_btn, help_btn;
boolean created = false;
public String type = Language.get("WINDOW");
/** Creates a new instance of Window */
public Window(String xmlcode, Skin s_) {
s = s_;
String[] code = xmlcode.split("\n");
if(code[0].indexOf("id=\"")!=-1) id = XML.getValue(code[0],"id");
else id = "Unnamed window #"+s.getNewId();
else id = Language.get("UNNAMED").replaceAll("%t",type).replaceAll("%i",String.valueOf(s.getNewId()));
if(code[0].indexOf("visible=\"")!=-1) visible = XML.getValue(code[0],"visible");
if(code[0].indexOf("x=\"")!=-1) x = XML.getIntValue(code[0],"x");
if(code[0].indexOf("y=\"")!=-1) y = XML.getIntValue(code[0],"y");
......@@ -94,7 +96,7 @@ public class Window implements ActionListener{
}
public Window(Skin s_) {
s=s_;
id = "Unnamed window #"+s.getNewId();
id = Language.get("UNNAMED").replaceAll("%t",type).replaceAll("%i",String.valueOf(s.getNewId()));
s.updateWindows();
showOptions();
}
......@@ -109,7 +111,7 @@ public class Window implements ActionListener{
playondrop=Boolean.parseBoolean(playondrop_tf.getText());
s.updateWindows();
created = true;
frame.setDefaultCloseOperation(frame.HIDE_ON_CLOSE);
frame.setDefaultCloseOperation(JFrame.HIDE_ON_CLOSE);
s.m.hist.addEvent(wae);
}
else {
......@@ -127,37 +129,37 @@ public class Window implements ActionListener{
}
public void showOptions() {
if(frame==null) {
frame = new JFrame("Window settings");
frame = new JFrame(Language.get("WIN_WINDOW_TITLE"));
frame.setResizable(false);
frame.setLayout(new FlowLayout());
if(!created) frame.setDefaultCloseOperation(frame.DO_NOTHING_ON_CLOSE);
JLabel id_l = new JLabel("ID*:");
if(!created) frame.setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
JLabel id_l = new JLabel(Language.get("WIN_ITEM_ID"));
id_tf = new JTextField();
id_tf.setToolTipText("Name of the window (it may be used for actions). Two windows cannot have the same id.");
JLabel x_l = new JLabel("X:");
id_tf.setToolTipText(Language.get("WIN_ITEM_ID_TIP").replaceAll("%t",type));
JLabel x_l = new JLabel(Language.get("WIN_ITEM_X"));
x_tf = new JTextField();
x_tf.setToolTipText("Initial left position of the window.");
x_tf.setToolTipText(Language.get("WIN_WINDOW_X_TIP"));
x_tf.setDocument(new NumbersOnlyDocument());
JLabel y_l = new JLabel("Y:");
JLabel y_l = new JLabel(Language.get("WIN_ITEM_Y"));
y_tf = new JTextField();
y_tf.setToolTipText("Initial top position of the window.");
y_tf.setToolTipText(Language.get("WIN_WINDOW_Y_TIP"));
y_tf.setDocument(new NumbersOnlyDocument());
JLabel visible_l = new JLabel("Visible:");
JLabel visible_l = new JLabel(Language.get("WIN_ITEM_VISIBLE"));
visible_tf = new JTextField();
visible_tf.setToolTipText("Indicates whether the window should appear when VLC is started. Since VLC remembers the skin windows position and visibility, this attribute will only be used the first time the skin is started.");
JLabel dragdrop_l = new JLabel("Drag and drop:");
visible_tf.setToolTipText(Language.get("WIN_WINDOW_VISIBLE_TIP"));
JLabel dragdrop_l = new JLabel(Language.get("WIN_WINDOW_DD"));
dragdrop_tf = new JTextField();
dragdrop_tf.setToolTipText("Indicates whether drag and drop of media files is allowed on this window.");
JLabel playondrop_l = new JLabel("Play on drop:");
dragdrop_tf.setToolTipText(Language.get("WIN_WINDOW_DD_TIP"));
JLabel playondrop_l = new JLabel(Language.get("WIN_WINDOW_PD"));
playondrop_tf = new JTextField();
playondrop_tf.setToolTipText("Indicates whether a dropped file is played directly (true) or only enqueued (false). This attribute has no effect if dragdrop is set to \"false\".");
ok_btn = new JButton("OK");
playondrop_tf.setToolTipText(Language.get("WIN_WINDOW_PD_TIP"));
ok_btn = new JButton(Language.get("BUTTON_OK"));
ok_btn.addActionListener(this);
cancel_btn = new JButton("Cancel");
cancel_btn = new JButton(Language.get("BUTTON_CANCEL"));
cancel_btn.addActionListener(this);
help_btn = new JButton("Help");
help_btn = new JButton(Language.get("BUTTON_HELP"));
help_btn.addActionListener(this);
JLabel attr_l = new JLabel("* Attributes marked with a star must be specified.");
JLabel attr_l = new JLabel(Language.get("NOTE_STARRED"));
//Distance of textfields to WEST edge of container
Component[] labels = { id_l, x_l, y_l, visible_l, dragdrop_l, playondrop_l};
......@@ -178,7 +180,7 @@ public class Window implements ActionListener{
general.add(visible_l);
general.add(visible_tf);
visible_tf.setPreferredSize(new Dimension(tf_wd,visible_tf.getPreferredSize().height));
general.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "General Attributes"));
general.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), Language.get("WIN_ITEM_GENERAL")));
SpringLayout general_layout = new SpringLayout();
general.setLayout(general_layout);
general_layout.putConstraint(SpringLayout.NORTH, id_l, 5, SpringLayout.NORTH, general);
......@@ -219,7 +221,7 @@ public class Window implements ActionListener{
options.add(playondrop_l);
options.add(playondrop_tf);
playondrop_tf.setPreferredSize(new Dimension(tf_wd,playondrop_tf.getPreferredSize().height));
options.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), "Drag and drop options"));
options.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(EtchedBorder.LOWERED), Language.get("WIN_WINDOW_DD_PANEL")));
SpringLayout options_layout = new SpringLayout();
options.setLayout(options_layout);
options_layout.putConstraint(SpringLayout.NORTH, dragdrop_l, 5, SpringLayout.NORTH, options);
......@@ -285,12 +287,12 @@ public class Window implements ActionListener{
public void actionPerformed(ActionEvent e) {
if(e.getSource().equals(ok_btn)) {
if(id_tf.getText().equals("")) {
JOptionPane.showMessageDialog(frame,"Please enter a valid ID!","ID not valid",JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(frame,Language.get("ERROR_ID_INVALID_MSG"),Language.get("ERROR_ID_INVALID_TITLE"),JOptionPane.INFORMATION_MESSAGE);
return;
}
else if(!id_tf.getText().equals(id)) {
if(s.idExists(id_tf.getText())) {
JOptionPane.showMessageDialog(frame,"The ID \""+id_tf.getText()+"\" already exists, please choose another one.","ID not valid",JOptionPane.INFORMATION_MESSAGE);
JOptionPane.showMessageDialog(frame,Language.get("ERROR_ID_EXISTS_MSG").replaceAll("%i",id_tf.getText()),Language.get("ERROR_ID_INVALID_TITLE"),JOptionPane.INFORMATION_MESSAGE);
return;
}
}
......
......@@ -50,6 +50,6 @@ public class LayoutAddEvent extends HistoryEvent{
w.s.expandLayout(l.id);
}
public String getDescription() {
return Language.get("HIST_ITEM_ADD").replaceAll("%t",Language.get("LAYOUT"));
return Language.get("HIST_ITEM_ADD").replaceAll("%t",l.type);
}
}
......@@ -57,6 +57,6 @@ public class LayoutDeletionEvent extends HistoryEvent{
}
@Override
public String getDescription() {
return Language.get("HIST_ITEM_DEL").replaceAll("%t",Language.get("LAYOUT"));
return Language.get("HIST_ITEM_DEL").replaceAll("%t",l.type);
}
}
......@@ -79,6 +79,6 @@ public class LayoutEditEvent extends HistoryEvent {
l.maxheight = maxheight_new;
}
public String getDescription() {
return Language.get("HIST_ITEM_EDIT").replaceAll("%t",Language.get("LAYOUT"));
return Language.get("HIST_ITEM_EDIT").replaceAll("%t",l.type);
}
}
......@@ -49,6 +49,6 @@ public class WindowAddEvent extends HistoryEvent{
s.updateWindows();
}
public String getDescription() {
return Language.get("HIST_ITEM_ADD").replaceAll("%t",Language.get("WINDOW"));
return Language.get("HIST_ITEM_ADD").replaceAll("%t",w.type);
}
}
......@@ -52,6 +52,6 @@ public class WindowDeletionEvent extends HistoryEvent {
}
@Override
public String getDescription() {
return Language.get("HIST_ITEM_DEL").replaceAll("%t",Language.get("WINDOW"));
return Language.get("HIST_ITEM_DEL").replaceAll("%t",w.type);
}
}
......@@ -69,6 +69,6 @@ public class WindowEditEvent extends HistoryEvent{
w.playondrop = playondrop_new;
}
public String getDescription() {
return Language.get("HIST_ITEM_EDIT").replaceAll("%t",Language.get("WINDOW"));
return Language.get("HIST_ITEM_EDIT").replaceAll("%t",w.type);
}
}
......@@ -284,7 +284,7 @@ public class Group extends Item implements ActionListener{
if(i.id.equals(id_)) {
return items;
}
if (i.type.equals("Group")||i.type.equals("Panel")) {
if (i.getClass().equals(Group.class)||i.getClass().equals(vlcskineditor.items.Panel.class)) {
java.util.List<Item> p = i.getParentListOf(id_);
if (p!=null) return p;
}
......
......@@ -402,7 +402,7 @@ public class Panel extends Item implements ActionListener{
if(i.id.equals(id_)) {
return items;
}
if (i.type.equals("Group")||i.type.equals("Panel")) {
if (i.getClass().equals(Group.class)||i.getClass().equals(vlcskineditor.items.Panel.class)) {
java.util.List<Item> p = i.getParentListOf(id_);
if (p!=null) return p;
}
......
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