Code refactoring
This commit is contained in:
parent
2735c8bfa7
commit
2fbdbc805f
2 changed files with 7 additions and 18 deletions
|
@ -33,33 +33,25 @@ public class AboutController implements Initializable {
|
||||||
private void gitHubUrl(){
|
private void gitHubUrl(){
|
||||||
try {
|
try {
|
||||||
hostServices.showDocument("https://github.com/developersu/mplayer4anime");
|
hostServices.showDocument("https://github.com/developersu/mplayer4anime");
|
||||||
} catch (Exception e){
|
} catch (Exception ignored){ }
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@FXML
|
@FXML
|
||||||
private void bloggerUrl(){
|
private void bloggerUrl(){
|
||||||
try {
|
try {
|
||||||
hostServices.showDocument("https://developersu.blogspot.com/search/label/mplayer4anime");
|
hostServices.showDocument("https://developersu.blogspot.com/search/label/mplayer4anime");
|
||||||
} catch (Exception e){
|
} catch (Exception ignored){ }
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@FXML
|
@FXML
|
||||||
private void libGSON(){
|
private void libGSON(){
|
||||||
try {
|
try {
|
||||||
hostServices.showDocument("https://github.com/google/gson");
|
hostServices.showDocument("https://github.com/google/gson");
|
||||||
} catch (Exception e){
|
} catch (Exception ignored){ }
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@FXML
|
@FXML
|
||||||
private void iconsMaterial(){
|
private void iconsMaterial(){
|
||||||
try {
|
try {
|
||||||
hostServices.showDocument("https://materialdesignicons.com/");
|
hostServices.showDocument("https://materialdesignicons.com/");
|
||||||
} catch (Exception e){
|
} catch (Exception ignored){ }
|
||||||
e.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//TODO note icons meaterial design
|
//TODO note icons meaterial design
|
||||||
|
|
|
@ -329,12 +329,9 @@ public class Controller implements Initializable {
|
||||||
menuItem.setText(fileNameOnly);
|
menuItem.setText(fileNameOnly);
|
||||||
|
|
||||||
menuItem.setUserData(playlistPath);
|
menuItem.setUserData(playlistPath);
|
||||||
menuItem.setOnAction(new EventHandler<ActionEvent>() {
|
menuItem.setOnAction(actionEvent -> {
|
||||||
@Override
|
JsonStorage jsonStorage = Playlists.ReadByPath(resourceBundle, new File(playlistPath));
|
||||||
public void handle(ActionEvent actionEvent) {
|
setAllLists(jsonStorage);
|
||||||
JsonStorage jsonStorage = Playlists.ReadByPath(resourceBundle, new File(playlistPath));
|
|
||||||
setAllLists(jsonStorage);
|
|
||||||
}
|
|
||||||
});
|
});
|
||||||
// Limit list to 13 elements (2 in the end are separator and clear button)
|
// Limit list to 13 elements (2 in the end are separator and clear button)
|
||||||
if (recentlyOpenedMenu.getItems().size() >= 11)
|
if (recentlyOpenedMenu.getItems().size() >= 11)
|
||||||
|
|
Loading…
Reference in a new issue