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