Bug fixes. A lot of things added <3
master
Dmitry Isaenko 2018-11-28 07:10:35 +03:00
parent 7c6103bd00
commit fb51e2c469
24 changed files with 580 additions and 481 deletions

View File

@ -40,7 +40,7 @@ public class AboutController implements Initializable {
@FXML @FXML
private void bloggerUrl(){ private void bloggerUrl(){
try { try {
hostServices.showDocument("https://developersu.blogspot.com/"); hostServices.showDocument("https://developersu.blogspot.com/search/label/mplayer4anime");
} catch (Exception e){ } catch (Exception e){
e.printStackTrace(); e.printStackTrace();
} }
@ -53,6 +53,16 @@ public class AboutController implements Initializable {
e.printStackTrace(); e.printStackTrace();
} }
} }
@FXML
private void iconsMaterial(){
try {
hostServices.showDocument("https://materialdesignicons.com/");
} catch (Exception e){
e.printStackTrace();
}
}
//TODO note icons meaterial design
@Override @Override
public void initialize(URL url, ResourceBundle resourceBundle) { public void initialize(URL url, ResourceBundle resourceBundle) {

View File

@ -52,6 +52,7 @@
</HBox> </HBox>
<Hyperlink onAction="#libGSON" text="GSON" /> <Hyperlink onAction="#libGSON" text="GSON" />
<TextArea fx:id="GSONLicense" editable="false" prefHeight="200.0" /> <TextArea fx:id="GSONLicense" editable="false" prefHeight="200.0" />
<Hyperlink onAction="#iconsMaterial" text="Material Design Icons" />
<HBox alignment="BOTTOM_LEFT" VBox.vgrow="ALWAYS"> <HBox alignment="BOTTOM_LEFT" VBox.vgrow="ALWAYS">
<children> <children>
<Pane HBox.hgrow="ALWAYS" /> <Pane HBox.hgrow="ALWAYS" />

View File

@ -18,7 +18,7 @@ public class AboutWindow {
Stage stageAbout = new Stage(); Stage stageAbout = new Stage();
stageAbout.setMinWidth(500); stageAbout.setMinWidth(500);
stageAbout.setMinHeight(450); stageAbout.setMinHeight(500);
FXMLLoader loaderAbout = new FXMLLoader(getClass().getResource("AboutLayout.fxml")); FXMLLoader loaderAbout = new FXMLLoader(getClass().getResource("AboutLayout.fxml"));
ResourceBundle resourceBundle; ResourceBundle resourceBundle;
@ -42,7 +42,7 @@ public class AboutWindow {
new Image(Main.class.getResourceAsStream("/mplayer4anime/res/app_icon64x64.png")), new Image(Main.class.getResourceAsStream("/mplayer4anime/res/app_icon64x64.png")),
new Image(Main.class.getResourceAsStream("/mplayer4anime/res/app_icon128x128.png")) new Image(Main.class.getResourceAsStream("/mplayer4anime/res/app_icon128x128.png"))
); // TODO: change to something reliable ); // TODO: change to something reliable
stageAbout.setScene(new Scene(parentAbout, 500, 450)); stageAbout.setScene(new Scene(parentAbout, 500, 500));
stageAbout.show(); stageAbout.show();

View File

@ -32,15 +32,6 @@ public class AppPreferences {
preferences.putBoolean("SUBS_TAB_FIRST", set); preferences.putBoolean("SUBS_TAB_FIRST", set);
} }
// Set option, that tells that we have to save/restore lists on startup
public void setLoadListsOnStart(boolean set){
preferences.putBoolean("LOAD_LISTS_ON_START", set);
}
// Returns settings for the save/restore lists option
public boolean getLoadListsOnStart(){
return preferences.getBoolean("LOAD_LISTS_ON_START", false); // Don't populate lists by-default
}
/** Convert strings array to singls string. /** Convert strings array to singls string.
* Used in: * Used in:
* setSubsExtensionsList * setSubsExtensionsList
@ -50,23 +41,25 @@ public class AppPreferences {
StringBuilder collect = new StringBuilder(); StringBuilder collect = new StringBuilder();
for (String e : strArr) { for (String e : strArr) {
collect.append(e); collect.append(e);
collect.append("@@@"); // If there is some idiot who will use @@@ in file extension I'll find him. collect.append(" ");
} }
String strToStore = collect.toString(); String strToStore = collect.toString();
preferences.put(whichList, strToStore); preferences.put(whichList, strToStore);
} }
/** Handle lists of the video files extensions */
public void setVideoExtensionsList(String[] videoExtensionsList){ storeSingleStringList("VIDEO_EXTENSIONS_LIST", videoExtensionsList); }
public String[] getVideoExtensionsList(){ return preferences.get("VIDEO_EXTENSIONS_LIST", "*.mkv *.avi *.mp4").split(" "); }
/** Handle lists of the audio files extensions */
public void setAudioExtensionsList(String[] audioExtensionsList){ storeSingleStringList("AUDIO_EXTENSIONS_LIST", audioExtensionsList); }
public String[] getAudioExtensionsList(){ return preferences.get("AUDIO_EXTENSIONS_LIST", "*.mka *.ac3").split(" "); }
/** Handle lists of the subtitles extensions selector */ /** Handle lists of the subtitles extensions selector */
public void setSubsExtensionsList(String[] subsList){ storeSingleStringList("SUBS_EXTENSIONS_LIST", subsList); } public void setSubsExtensionsList(String[] subsList){ storeSingleStringList("SUBS_EXTENSIONS_LIST", subsList); }
public String[] getSubsExtensionsList(){ return preferences.get("SUBS_EXTENSIONS_LIST", ".ass@@@.crt@@@").split("@@@"); } public String[] getSubsExtensionsList(){ return preferences.get("SUBS_EXTENSIONS_LIST", "*.ass *.crt ").split(" "); }
/** Handle lists of the subtitles encodings selector */ /** Handle lists of the subtitles encodings selector */
public void setSubsEncodingList(String[] subsEncodingList){ storeSingleStringList("SUBS_ENCODINGS_LIST", subsEncodingList); } public void setSubsEncodingList(String[] subsEncodingList){ storeSingleStringList("SUBS_ENCODINGS_LIST", subsEncodingList); }
public String[] getSubsEncodingList(){ return preferences.get("SUBS_ENCODINGS_LIST", "default@@@utf8@@@cp1251@@@koi8-r").split("@@@"); } public String[] getSubsEncodingList(){ return preferences.get("SUBS_ENCODINGS_LIST", "default utf8 cp1251 koi8-r").split(" "); }
/** Save & recover selected by user Subtitles format */
public void setLastTimeUsedSusExt(String selected){ preferences.put("SUBS_EXT_LAST_TIME_SELECTED", selected); }
public String getLastTimeUsedSubsExt(){ return preferences.get("SUBS_EXT_LAST_TIME_SELECTED", ""); }
/** Save & recover selected by user Subtitles encoding */ /** Save & recover selected by user Subtitles encoding */
public void setLastTimeUsedSubsEncoding(String selected){ preferences.put("SUBS_ENCODING_LAST_TIME_SELECTED", selected); } public void setLastTimeUsedSubsEncoding(String selected){ preferences.put("SUBS_ENCODING_LAST_TIME_SELECTED", selected); }
@ -100,7 +93,7 @@ public class AppPreferences {
preferences.put("RECENT_PLS_" + i, recentPlaylists[i]); preferences.put("RECENT_PLS_" + i, recentPlaylists[i]);
else else
preferences.put("RECENT_PLS_" + i, ""); preferences.put("RECENT_PLS_" + i, "");
for (;i<10;i++) // Not needed. Logic may handle recieved String to be less or greater then String[10], but it never happened. for (;i<10;i++) // Not needed. Logic may handle received String to be less or greater then String[10], but it never happened.
preferences.put("RECENT_PLS_" + i, ""); preferences.put("RECENT_PLS_" + i, "");
} }
} }

View File

@ -13,8 +13,7 @@ import mplayer4anime.About.AboutWindow;
import mplayer4anime.Playlists.JsonStorage; import mplayer4anime.Playlists.JsonStorage;
import mplayer4anime.Playlists.Playlists; import mplayer4anime.Playlists.Playlists;
import mplayer4anime.Settings.SettingsWindow; import mplayer4anime.Settings.SettingsWindow;
import mplayer4anime.appPanes.ControllerMKA; import mplayer4anime.appPanes.ControllerPane;
import mplayer4anime.appPanes.ControllerMKV;
import mplayer4anime.appPanes.ControllerSUB; import mplayer4anime.appPanes.ControllerSUB;
import java.io.*; import java.io.*;
@ -24,12 +23,12 @@ import java.util.ResourceBundle;
public class Controller implements Initializable { public class Controller implements Initializable {
@FXML @FXML
private ControllerMKV mkvPaneController; private ControllerPane mkvPaneController;
@FXML
private ControllerPane mkaPaneController;
@FXML @FXML
private ControllerSUB subPaneController; private ControllerSUB subPaneController;
@FXML @FXML
private ControllerMKA mkaPaneController;
@FXML
private Label statusLbl; private Label statusLbl;
@FXML @FXML
private Menu recentlyOpenedMenu; private Menu recentlyOpenedMenu;
@ -53,14 +52,14 @@ public class Controller implements Initializable {
private String currentPlaylistLocation = null; //TODO: move to the constructor? private String currentPlaylistLocation = null; //TODO: move to the constructor?
@Override @Override
public void initialize(URL url, ResourceBundle rb) { public void initialize(URL url, ResourceBundle rb) {
mkvPaneController.setPaneType("Video");
mkaPaneController.setPaneType("Audio");
subPaneController.setPaneType("Subtitles");
// Register this controller in mediator // Register this controller in mediator
MediatorControl.getInstance().registerMainController(this); MediatorControl.getInstance().registerMainController(this);
resourceBundle = rb; resourceBundle = rb;
// Set default extension of the subtitles files:
subPaneController.setSubtExt(appPreferences.getSubsExtensionsList(), appPreferences.getLastTimeUsedSubsExt());// Receive list from storage & set selected value
// Set default list of encodings of the subtitles files: // Set default list of encodings of the subtitles files:
subPaneController.setEncoding(appPreferences.getSubsEncodingList(), appPreferences.getLastTimeUsedSubsEncoding()); subPaneController.setEncoding(appPreferences.getSubsEncodingList(), appPreferences.getLastTimeUsedSubsEncoding());
@ -217,7 +216,6 @@ public class Controller implements Initializable {
// Will be used to store lists previously opened. // Will be used to store lists previously opened.
// Linkage established by ohHidden in Main.java class // Linkage established by ohHidden in Main.java class
void shutdown(){ void shutdown(){
appPreferences.setLastTimeUsedSusExt(subPaneController.getSelectedExt());
appPreferences.setLastTimeUsedSubsEncoding(subPaneController.getSelectedEncoding()); appPreferences.setLastTimeUsedSubsEncoding(subPaneController.getSelectedEncoding());
appPreferences.setFullScreenSelected(fullScreen.isSelected()); appPreferences.setFullScreenSelected(fullScreen.isSelected());
appPreferences.setSubtitlesHideSelected(subsHide.isSelected()); appPreferences.setSubtitlesHideSelected(subsHide.isSelected());
@ -240,12 +238,6 @@ public class Controller implements Initializable {
// Get event that notify application in case some settings has been changed // Get event that notify application in case some settings has been changed
// This function called from MediatorControl after mediator receives request form SettingsController indicating that user updated some required fields. // This function called from MediatorControl after mediator receives request form SettingsController indicating that user updated some required fields.
void updateAfterSettingsChanged(){ void updateAfterSettingsChanged(){
/* update list of extensions */
// Clear and update list
subPaneController.setSubtExt(appPreferences.getSubsExtensionsList(), null);
// In case of application failure should be better to save this immediately
appPreferences.setLastTimeUsedSusExt(subPaneController.getSelectedEncoding());
/* update list of encoding */ /* update list of encoding */
subPaneController.setEncoding(appPreferences.getSubsEncodingList(), null); subPaneController.setEncoding(appPreferences.getSubsEncodingList(), null);
// In case of application failure should be better to save this immediately // In case of application failure should be better to save this immediately
@ -255,14 +247,20 @@ public class Controller implements Initializable {
@FXML @FXML
private void openBtn() { private void openBtn() {
JsonStorage jsonStorage = Playlists.Read(resourceBundle); JsonStorage jsonStorage = Playlists.Read(resourceBundle);
setAllLists(jsonStorage);
}
private void setAllLists(JsonStorage jsonStorage){
if (jsonStorage != null) { if (jsonStorage != null) {
mkvPaneController.cleanList();
mkaPaneController.cleanList();
subPaneController.cleanList();
mkvPaneController.setFilesFromList(jsonStorage.getVideo()); mkvPaneController.setFilesFromList(jsonStorage.getVideo());
mkaPaneController.setFilesFromList(jsonStorage.getAudio()); mkaPaneController.setFilesFromList(jsonStorage.getAudio());
subPaneController.setFilesFromList(jsonStorage.getSubs()); subPaneController.setFilesFromList(jsonStorage.getSubs());
subPaneController.selectEncodingValue(jsonStorage.getSubEncoding(), appPreferences); subPaneController.selectEncodingValue(jsonStorage.getSubEncoding(), appPreferences);
this.currentPlaylistLocation = Playlists.getPlaylistLocation(); // TODO: Implement listener? mmm... currentPlaylistLocation = Playlists.getPlaylistLocation(); // TODO: Implement listener? mmm...
this.statusLbl.setText(currentPlaylistLocation); statusLbl.setText(currentPlaylistLocation);
addRecentlyOpened(currentPlaylistLocation); addRecentlyOpened(currentPlaylistLocation);
} }
} }
@ -326,16 +324,7 @@ public class Controller implements Initializable {
@Override @Override
public void handle(ActionEvent actionEvent) { public void handle(ActionEvent actionEvent) {
JsonStorage jsonStorage = Playlists.ReadByPath(resourceBundle, new File(playlistPath)); JsonStorage jsonStorage = Playlists.ReadByPath(resourceBundle, new File(playlistPath));
if (jsonStorage != null) { setAllLists(jsonStorage);
mkvPaneController.setFilesFromList(jsonStorage.getVideo());
mkaPaneController.setFilesFromList(jsonStorage.getAudio());
subPaneController.setFilesFromList(jsonStorage.getSubs());
subPaneController.selectEncodingValue(jsonStorage.getSubEncoding(), appPreferences);
currentPlaylistLocation = Playlists.getPlaylistLocation(); // TODO: Implement listener? mmm...
statusLbl.setText(currentPlaylistLocation);
addRecentlyOpened(currentPlaylistLocation);
}
} }
}); });
// 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)

View File

@ -3,8 +3,9 @@ package mplayer4anime;
Name: mplayer4anime Name: mplayer4anime
@author Dmitry Isaenko @author Dmitry Isaenko
License: GNU GPL v.3 License: GNU GPL v.3
@version 0.10 @version 0.11
@see https://developersu.blogspot.com/ @see https://developersu.blogspot.com/search/label/mplayer4anime
@see https://github.com/developersu/mplayer4anime
2018, Russia 2018, Russia
*/ */

View File

@ -6,6 +6,14 @@ mplayer4anime is mplayer launcher to play mkv file with mka audio and subtitles
Source code spreads under the GNU General Public License v.3. You can find it in LICENSE file or just visit www.gnu.org (it should be there for sure). Source code spreads under the GNU General Public License v.3. You can find it in LICENSE file or just visit www.gnu.org (it should be there for sure).
Note: Since 0.10 application supports playlists management and implements own json-based format that (somehow) could be used in third-party application,
it would be nice to leave it as is. At least, I would prefer to have .alpr file extension used for this. As for the format of playlist format, please
refer to WFTPL license.
## Used libraries
GSON: https://github.com/google/gson
Pay attention, that this lib uses Apache-2.0 license
## Requirements ## Requirements
JRE and JavaFX should be installed on your PC. JRE and JavaFX should be installed on your PC.
@ -18,9 +26,6 @@ Just start it as usual Java application:
$ java -jar mplayer4anime.jar $ java -jar mplayer4anime.jar
``` ```
## Used libraries
GSON: https://github.com/google/gson
## Run on windows ## Run on windows
Step 1. Step 1.
Download and install JRE (8 or later): Download and install JRE (8 or later):

View File

@ -1,6 +1,7 @@
package mplayer4anime; package mplayer4anime;
import javafx.scene.control.Alert; import javafx.scene.control.Alert;
import javafx.scene.layout.Region;
public class ServiceWindow { public class ServiceWindow {
/** /**
@ -11,6 +12,7 @@ public class ServiceWindow {
alertBox.setTitle(title); alertBox.setTitle(title);
alertBox.setHeaderText(null); alertBox.setHeaderText(null);
alertBox.setContentText(body); alertBox.setContentText(body);
alertBox.getDialogPane().setMinHeight(Region.USE_PREF_SIZE); // Java bug workaround for linux
alertBox.show(); alertBox.show();
} }
} }

View File

@ -0,0 +1,101 @@
package mplayer4anime.Settings;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.ListView;
import javafx.scene.control.TextField;
import javafx.scene.input.KeyEvent;
import mplayer4anime.ServiceWindow;
import java.net.URL;
import java.util.Arrays;
import java.util.ResourceBundle;
public class ControllerListsSelector implements Initializable {
@FXML
private ListView<String> listView;
@FXML
private TextField newRecordText;
private ObservableList<String> observableList;
private ResourceBundle resourceBundle;
private boolean listOfExtensions; // Handle validation of the format importing items
@Override
public void initialize(URL url, ResourceBundle rb) {
resourceBundle = rb;
}
/**
* Must be run on start
* Set list content
*/
void setList(String[] listFromStorage, boolean isListOfExtensions){
observableList = FXCollections.observableArrayList(listFromStorage);
listView.setItems(observableList);
this.listOfExtensions = isListOfExtensions;
}
/**
* Return list content
* */
String[] getList(){
return Arrays.copyOf(observableList.toArray(), observableList.toArray().length, String[].class);
}
@FXML
private void listKeyPressed(KeyEvent event){
if (event.getCode().toString().equals("DELETE"))
removeRecord();
}
@FXML
private void upRecord(){
int index;
index = listView.getSelectionModel().getSelectedIndex();
if (index >0){
observableList.add(index-1, listView.getSelectionModel().getSelectedItem());
observableList.remove(index+1);
listView.getSelectionModel().select(index-1);
}
}
@FXML
private void downRecord(){
int index;
index = listView.getSelectionModel().getSelectedIndex();
if (index+1 < observableList.size() ){
observableList.add(index+2, listView.getSelectionModel().getSelectedItem());
observableList.remove(index);
listView.getSelectionModel().select(index+1);
}
}
@FXML
private void removeRecord(){ observableList.remove(listView.getSelectionModel().getSelectedItem()); }
@FXML
private void addNewRecord(){
String addingItem = newRecordText.getText().trim();
if (!addingItem.isEmpty()) // If this field is non-empty
if (!addingItem.contains(" ") && !addingItem.contains("\t")) {
if (this.listOfExtensions) {
if (addingItem.startsWith("*."))
if (addingItem.substring(2).contains("*")) {
ServiceWindow.getErrorNotification(resourceBundle.getString("Error"), resourceBundle.getString("settings_fieldContainUnacceptedChars"));
} else {
observableList.add(addingItem);
}
else if (addingItem.contains("*")) {
ServiceWindow.getErrorNotification(resourceBundle.getString("Error"), resourceBundle.getString("settings_fieldContainUnacceptedChars"));
} else if (addingItem.startsWith(".")) {
observableList.add("*" + addingItem);
} else {
observableList.add("*." + addingItem);
}
}
else {
observableList.add(addingItem);
}
}
else{
ServiceWindow.getErrorNotification(resourceBundle.getString("Error"), resourceBundle.getString("settings_fieldContainUnacceptedChars"));
}
newRecordText.clear();
}
}

View File

@ -0,0 +1,47 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.SVGPath?>
<VBox prefHeight="200.0" prefWidth="100.0" spacing="5.0" VBox.vgrow="ALWAYS" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="mplayer4anime.Settings.ControllerListsSelector">
<children>
<HBox alignment="CENTER_LEFT" spacing="5.0" VBox.vgrow="ALWAYS">
<children>
<ListView fx:id="listView" onKeyPressed="#listKeyPressed" prefWidth="200.0" HBox.hgrow="ALWAYS" />
<VBox spacing="5.0">
<children>
<Button mnemonicParsing="false" onAction="#upRecord">
<graphic>
<SVGPath content="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z" />
</graphic>
</Button>
<Button mnemonicParsing="false" onAction="#downRecord">
<graphic>
<SVGPath content="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" />
</graphic>
</Button>
<Button mnemonicParsing="false" onAction="#removeRecord">
<graphic>
<SVGPath content="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" fill="#cc0101" />
</graphic>
</Button>
</children>
</VBox>
</children>
</HBox>
<HBox spacing="5.0" VBox.vgrow="NEVER">
<children>
<TextField fx:id="newRecordText" HBox.hgrow="ALWAYS" />
<Button mnemonicParsing="false" onAction="#addNewRecord">
<graphic>
<SVGPath content="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" fill="#007f08" />
</graphic>
</Button>
</children>
</HBox>
</children>
</VBox>

View File

@ -1,154 +1,46 @@
package mplayer4anime.Settings; package mplayer4anime.Settings;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.scene.control.*; import javafx.scene.control.*;
import javafx.scene.input.KeyEvent;
import javafx.stage.FileChooser; import javafx.stage.FileChooser;
import javafx.stage.Stage; import javafx.stage.Stage;
import mplayer4anime.AppPreferences; import mplayer4anime.AppPreferences;
import java.io.File; import java.io.File;
import java.net.URL; import java.net.URL;
import java.util.Arrays;
import java.util.ResourceBundle; import java.util.ResourceBundle;
import mplayer4anime.MediatorControl; import mplayer4anime.MediatorControl;
public class SettingsController implements Initializable { public class SettingsController implements Initializable {
private ResourceBundle resourceBundle;
// Class of settings used
private AppPreferences appPreferences; private AppPreferences appPreferences;
@FXML @FXML
private Label pathToMplayerLbl, private ControllerListsSelector subExtensionListController;
unixOsInfoLbl;
@FXML @FXML
private CheckBox subtitlesFirstCheckBox, private ControllerListsSelector subEncodingListController;
listsLoadOnStartCheckBox;
// subs extensions and codepages error handle
private void showFormattingError(){
Alert alertBox = new Alert(Alert.AlertType.ERROR);
alertBox.setTitle(resourceBundle.getString("Error"));
alertBox.setHeaderText(null);
alertBox.setContentText(resourceBundle.getString("settings_fieldContainSpacesTabs"));
alertBox.show();
}
// subs extensions
@FXML @FXML
private ListView<String> subsExtListView; private ControllerListsSelector videoExtensionListController;
private ObservableList<String> subsExtObservableList;
@FXML @FXML
private TextField subsExtNewRecordText; private ControllerListsSelector audioExtensionListController;
@FXML @FXML
private void subsExtAddNewRecord(){ private Label pathToMplayerLbl;
String add = subsExtNewRecordText.getText().trim();
if (!add.isEmpty()) // If this field is non-empty
if (!add.contains(" ") && !add.contains("\t"))
subsExtObservableList.add(subsExtNewRecordText.getText().trim());
else{
showFormattingError();
}
subsExtNewRecordText.clear();
}
@FXML @FXML
private void subsExtListKeyPressed(KeyEvent event){ private CheckBox subtitlesFirstCheckBox;
if (event.getCode().toString().equals("DELETE"))
subsExtRemoveRecord();
}
@FXML
private void subsExtRemoveRecord(){ subsExtObservableList.remove(subsExtListView.getSelectionModel().getSelectedItem()); }
@FXML
private void subsExtUpRecord(){
int index;
index = subsExtListView.getSelectionModel().getSelectedIndex();
if (index >0){
subsExtObservableList.add(index-1, subsExtListView.getSelectionModel().getSelectedItem());
subsExtObservableList.remove(index+1);
subsExtListView.getSelectionModel().select(index-1);
}
}
@FXML
private void subsExtDownRecord(){
int index;
index = subsExtListView.getSelectionModel().getSelectedIndex();
if (index+1 < subsExtObservableList.size() ){
subsExtObservableList.add(index+2, subsExtListView.getSelectionModel().getSelectedItem());
subsExtObservableList.remove(index);
subsExtListView.getSelectionModel().select(index+1);
}
}
// subs codepage
@FXML
private ListView<String> subsCodepageListView;
private ObservableList<String> subsCodepageObservableList;
@FXML
private TextField subsCodepageNewRecordText;
@FXML
private void subsCodepageAddNewRecord(){
String add = subsCodepageNewRecordText.getText().trim();
if (!add.isEmpty()) // If this field is non-empty
if (!add.contains(" ") && !add.contains("\t"))
subsCodepageObservableList.add(subsCodepageNewRecordText.getText().trim());
else{
showFormattingError();
}
subsCodepageNewRecordText.clear();
}
@FXML
private void subsCodepageListKeyPressed(KeyEvent event){
if (event.getCode().toString().equals("DELETE"))
subsCodepageRemoveRecord();
}
@FXML
private void subsCodepageRemoveRecord(){ subsCodepageObservableList.remove(subsCodepageListView.getSelectionModel().getSelectedItem()); }
@FXML
private void subsCodepageUpRecord(){
int index;
index = subsCodepageListView.getSelectionModel().getSelectedIndex();
if (index >0){
subsCodepageObservableList.add(index-1, subsCodepageListView.getSelectionModel().getSelectedItem());
subsCodepageObservableList.remove(index+1);
subsCodepageListView.getSelectionModel().select(index-1);
}
}
@FXML
private void subsCodepageDownRecord(){
int index;
index = subsCodepageListView.getSelectionModel().getSelectedIndex();
if (index+1 < subsCodepageObservableList.size() ){
subsCodepageObservableList.add(index+2, subsCodepageListView.getSelectionModel().getSelectedItem());
subsCodepageObservableList.remove(index);
subsCodepageListView.getSelectionModel().select(index+1);
}
}
@Override @Override
public void initialize(URL url, ResourceBundle resBundle) { public void initialize(URL url, ResourceBundle resBundle) {
resourceBundle = resBundle;
appPreferences = new AppPreferences(); appPreferences = new AppPreferences();
pathToMplayerLbl.setText(appPreferences.getPath()); pathToMplayerLbl.setText(appPreferences.getPath());
// unixOsInfoLbl.setVisible(false);
// Subtitles should be shown first? If TRUE, then set checkbox. // Subtitles should be shown first? If TRUE, then set checkbox.
subtitlesFirstCheckBox.setSelected(appPreferences.getSubtilesFirst()); subtitlesFirstCheckBox.setSelected(appPreferences.getSubtilesFirst());
// Should application restore lists after startup? // Fill lists of extensions and encodings
listsLoadOnStartCheckBox.setSelected(appPreferences.getLoadListsOnStart()); subExtensionListController.setList(appPreferences.getSubsExtensionsList(), true);
//--------------------------------------------------------- subEncodingListController.setList(appPreferences.getSubsEncodingList(), false);
// Populate list of avaliable subtitles extensions videoExtensionListController.setList(appPreferences.getVideoExtensionsList(), true);
subsExtObservableList = FXCollections.observableArrayList(appPreferences.getSubsExtensionsList()); audioExtensionListController.setList(appPreferences.getAudioExtensionsList(), true);
subsExtListView.setItems(subsExtObservableList);
//---------------------------------------------------------
// Populate list of avaliable codepages
subsCodepageObservableList = FXCollections.observableArrayList(appPreferences.getSubsEncodingList());
subsCodepageListView.setItems(subsCodepageObservableList);
} }
@FXML @FXML
@ -189,9 +81,10 @@ public class SettingsController implements Initializable {
Stage thisStage = (Stage) pathToMplayerLbl.getScene().getWindow(); // TODO: consider refactoring. Non-urgent. Stage thisStage = (Stage) pathToMplayerLbl.getScene().getWindow(); // TODO: consider refactoring. Non-urgent.
appPreferences.setPath(pathToMplayerLbl.getText()); appPreferences.setPath(pathToMplayerLbl.getText());
appPreferences.setSubtilesFirst(subtitlesFirstCheckBox.isSelected()); appPreferences.setSubtilesFirst(subtitlesFirstCheckBox.isSelected());
appPreferences.setLoadListsOnStart(listsLoadOnStartCheckBox.isSelected()); appPreferences.setSubsExtensionsList(subExtensionListController.getList());
appPreferences.setSubsExtensionsList(Arrays.copyOf(subsExtObservableList.toArray(), subsExtObservableList.toArray().length, String[].class)); appPreferences.setSubsEncodingList(subEncodingListController.getList());
appPreferences.setSubsEncodingList(Arrays.copyOf(subsCodepageObservableList.toArray(), subsCodepageObservableList.toArray().length, String[].class)); appPreferences.setVideoExtensionsList(videoExtensionListController.getList());
appPreferences.setAudioExtensionsList(audioExtensionListController.getList());
MediatorControl.getInstance().sentUpdates(); // TODO: implement list to track what should be updated MediatorControl.getInstance().sentUpdates(); // TODO: implement list to track what should be updated

View File

@ -4,142 +4,140 @@
<?import javafx.scene.control.Button?> <?import javafx.scene.control.Button?>
<?import javafx.scene.control.CheckBox?> <?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.Label?> <?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?> <?import javafx.scene.control.Tab?>
<?import javafx.scene.control.TextField?> <?import javafx.scene.control.TabPane?>
<?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?> <?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.SVGPath?> <?import javafx.scene.shape.SVGPath?>
<?import javafx.scene.text.Font?> <?import javafx.scene.text.Font?>
<VBox spacing="5.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="mplayer4anime.Settings.SettingsController"> <VBox xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="mplayer4anime.Settings.SettingsController">
<children> <children>
<HBox alignment="CENTER_LEFT" spacing="5.0" VBox.vgrow="NEVER"> <TabPane side="LEFT" tabClosingPolicy="UNAVAILABLE" tabMaxHeight="100.0" tabMaxWidth="500.0" tabMinHeight="100.0" tabMinWidth="80.0" VBox.vgrow="ALWAYS">
<children> <tabs>
<Label text="%settings_PathToMplayerLbl" /> <Tab closable="false">
<Label fx:id="pathToMplayerLbl" text="-------" /> <content>
<Pane HBox.hgrow="ALWAYS" />
<Button mnemonicParsing="false" onAction="#findPathToMplayer">
<graphic>
<SVGPath content="M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z" />
</graphic>
</Button>
<Button mnemonicParsing="false" onAction="#clearPath">
<graphic>
<SVGPath content="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" fill="#cc0101" />
</graphic>
</Button>
</children>
</HBox>
<Label fx:id="unixOsInfoLbl" disable="true" minHeight="35.0" text="%settings_unixOsInformation" wrapText="true">
<font>
<Font name="System Italic" size="12.0" />
</font>
</Label>
<HBox alignment="CENTER_LEFT" VBox.vgrow="NEVER">
<children>
<Label text="%settings_SubtitlesTabFirst" />
<Pane HBox.hgrow="ALWAYS" />
<CheckBox fx:id="subtitlesFirstCheckBox" mnemonicParsing="false" />
</children>
</HBox>
<HBox alignment="CENTER_LEFT" VBox.vgrow="NEVER">
<children>
<Label text="%settings_LoadListsOnStart" />
<Pane HBox.hgrow="ALWAYS" />
<CheckBox fx:id="listsLoadOnStartCheckBox" mnemonicParsing="false" />
</children>
</HBox>
<Label text="%settings_subsExtensionList" />
<VBox prefHeight="200.0" prefWidth="100.0" spacing="5.0" VBox.vgrow="ALWAYS">
<children>
<HBox alignment="CENTER_LEFT" spacing="5.0" VBox.vgrow="ALWAYS">
<children>
<ListView fx:id="subsExtListView" onKeyPressed="#subsExtListKeyPressed" prefWidth="200.0" HBox.hgrow="ALWAYS" />
<VBox spacing="5.0"> <VBox spacing="5.0">
<children> <children>
<Button mnemonicParsing="false" onAction="#subsExtUpRecord"> <HBox alignment="CENTER_LEFT" spacing="5.0" VBox.vgrow="NEVER">
<graphic> <children>
<SVGPath content="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z" /> <Label text="%settings_PathToMplayerLbl" />
</graphic> <Label fx:id="pathToMplayerLbl" text="-------" />
</Button> <Pane HBox.hgrow="ALWAYS" />
<Button mnemonicParsing="false" onAction="#subsExtDownRecord"> <Button mnemonicParsing="false" onAction="#findPathToMplayer">
<graphic> <graphic>
<SVGPath content="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" /> <SVGPath content="M16,12A2,2 0 0,1 18,10A2,2 0 0,1 20,12A2,2 0 0,1 18,14A2,2 0 0,1 16,12M10,12A2,2 0 0,1 12,10A2,2 0 0,1 14,12A2,2 0 0,1 12,14A2,2 0 0,1 10,12M4,12A2,2 0 0,1 6,10A2,2 0 0,1 8,12A2,2 0 0,1 6,14A2,2 0 0,1 4,12Z" />
</graphic> </graphic>
</Button> </Button>
<Button mnemonicParsing="false" onAction="#subsExtRemoveRecord"> <Button mnemonicParsing="false" onAction="#clearPath">
<graphic> <graphic>
<SVGPath content="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" fill="#cc0101" /> <SVGPath content="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" fill="#cc0101" />
</graphic> </graphic>
</Button> </Button>
</children>
</HBox>
<Label disable="true" minHeight="35.0" text="%settings_unixOsInformation" wrapText="true">
<font>
<Font name="System Italic" size="12.0" />
</font>
</Label>
<HBox alignment="CENTER_LEFT" VBox.vgrow="NEVER">
<children>
<Label text="%settings_SubtitlesTabFirst" />
<Pane HBox.hgrow="ALWAYS" />
<CheckBox fx:id="subtitlesFirstCheckBox" mnemonicParsing="false" />
</children>
</HBox>
</children> </children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</VBox> </VBox>
</children> </content>
</HBox> <graphic>
<HBox spacing="5.0" VBox.vgrow="NEVER"> <VBox alignment="CENTER">
<children>
<TextField fx:id="subsExtNewRecordText" HBox.hgrow="ALWAYS" />
<Button mnemonicParsing="false" onAction="#subsExtAddNewRecord">
<graphic>
<SVGPath content="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" fill="#007f08" />
</graphic>
</Button>
</children>
</HBox>
</children>
</VBox>
<Label text="%settings_subsCodepageList" />
<VBox prefHeight="200.0" prefWidth="100.0" spacing="5.0" VBox.vgrow="ALWAYS">
<children>
<HBox prefHeight="100.0" prefWidth="200.0" spacing="5.0" VBox.vgrow="ALWAYS">
<children>
<ListView fx:id="subsCodepageListView" onKeyPressed="#subsCodepageListKeyPressed" prefWidth="200.0" HBox.hgrow="ALWAYS" />
<VBox spacing="5.0">
<children> <children>
<Button mnemonicParsing="false" onAction="#subsCodepageUpRecord"> <SVGPath content="M19,4C20.11,4 21,4.9 21,6V18A2,2 0 0,1 19,20H5C3.89,20 3,19.1 3,18V6A2,2 0 0,1 5,4H19M19,18V8H5V18H19Z" />
<graphic> <Label text="%settings_Tab_General" />
<SVGPath content="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z" />
</graphic>
</Button>
<Button mnemonicParsing="false" onAction="#subsCodepageDownRecord">
<graphic>
<SVGPath content="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" />
</graphic>
</Button>
<Button mnemonicParsing="false" onAction="#subsCodepageRemoveRecord">
<graphic>
<SVGPath content="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" fill="#cc0101" />
</graphic>
</Button>
</children> </children>
</VBox> </VBox>
</children> </graphic>
</HBox> </Tab>
<HBox spacing="5.0" VBox.vgrow="NEVER"> <Tab closable="false">
<children> <graphic>
<TextField fx:id="subsCodepageNewRecordText" HBox.hgrow="ALWAYS" /> <VBox alignment="CENTER">
<Button mnemonicParsing="false" onAction="#subsCodepageAddNewRecord"> <children>
<graphic> <SVGPath content="M17,10.5V7A1,1 0 0,0 16,6H4A1,1 0 0,0 3,7V17A1,1 0 0,0 4,18H16A1,1 0 0,0 17,17V13.5L21,17.5V6.5L17,10.5Z" />
<SVGPath content="M19,13H13V19H11V13H5V11H11V5H13V11H19V13Z" fill="#007f08" /> <Label text="%settings_Tab_Video" />
</graphic> </children>
</Button> </VBox>
</children> </graphic>
</HBox> <content>
</children> <VBox spacing="5.0">
<padding> <padding>
<Insets bottom="5.0" /> <Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding> </padding>
</VBox> <children>
<Label text="%settings_videoExtensionList" />
<fx:include fx:id="videoExtensionList" source="ListSelector.fxml" />
</children>
</VBox>
</content>
</Tab>
<Tab closable="false">
<graphic>
<VBox alignment="CENTER">
<children>
<SVGPath content="M14,3.23V5.29C16.89,6.15 19,8.83 19,12C19,15.17 16.89,17.84 14,18.7V20.77C18,19.86 21,16.28 21,12C21,7.72 18,4.14 14,3.23M16.5,12C16.5,10.23 15.5,8.71 14,7.97V16C15.5,15.29 16.5,13.76 16.5,12M3,9V15H7L12,20V4L7,9H3Z" />
<Label text="%settings_Tab_Audio" />
</children>
</VBox>
</graphic>
<content>
<VBox spacing="5.0">
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
<children>
<Label text="%settings_audioExtensionList" />
<fx:include fx:id="audioExtensionList" source="ListSelector.fxml" />
</children>
</VBox>
</content>
</Tab>
<Tab closable="false">
<graphic>
<VBox alignment="CENTER">
<children>
<SVGPath content="M20,4H4A2,2 0 0,0 2,6V18A2,2 0 0,0 4,20H20A2,2 0 0,0 22,18V6A2,2 0 0,0 20,4M4,12H8V14H4V12M14,18H4V16H14V18M20,18H16V16H20V18M20,14H10V12H20V14Z" />
<Label text="%settings_Tab_Subtitles" />
</children>
</VBox>
</graphic>
<content>
<VBox spacing="5.0">
<Label text="%settings_subsExtensionList" />
<fx:include fx:id="subExtensionList" source="ListSelector.fxml" />
<Label text="%settings_subsCodepageList" />
<fx:include fx:id="subEncodingList" source="ListSelector.fxml" />
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</VBox>
</content>
</Tab>
</tabs>
</TabPane>
<HBox prefWidth="200.0" spacing="5.0" VBox.vgrow="NEVER"> <HBox prefWidth="200.0" spacing="5.0" VBox.vgrow="NEVER">
<children> <children>
<Pane HBox.hgrow="ALWAYS" /> <Pane HBox.hgrow="ALWAYS" />
<Button cancelButton="true" mnemonicParsing="false" onAction="#Cancel" text="%CancelBtn" /> <Button cancelButton="true" mnemonicParsing="false" onAction="#Cancel" text="%CancelBtn" />
<Button mnemonicParsing="false" onAction="#Save" text="%SaveBtn" /> <Button mnemonicParsing="false" onAction="#Save" text="%SaveBtn" />
</children> </children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</HBox> </HBox>
</children> </children>
<padding>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</padding>
</VBox> </VBox>

View File

@ -1,7 +0,0 @@
package mplayer4anime.appPanes;
public class ControllerMKA extends ControllerPane {
@Override
protected void openAction() { openFileChooser(".mka"); }
}

View File

@ -1,7 +0,0 @@
package mplayer4anime.appPanes;
public class ControllerMKV extends ControllerPane {
@Override
protected void openAction() { openFileChooser(".mkv"); }
}

View File

@ -4,32 +4,62 @@ import javafx.collections.FXCollections;
import javafx.collections.ObservableList; import javafx.collections.ObservableList;
import javafx.fxml.FXML; import javafx.fxml.FXML;
import javafx.fxml.Initializable; import javafx.fxml.Initializable;
import javafx.scene.control.Label;
import javafx.scene.control.ListCell; import javafx.scene.control.ListCell;
import javafx.scene.control.ListView; import javafx.scene.control.ListView;
import javafx.scene.input.KeyEvent; import javafx.scene.input.KeyEvent;
import javafx.stage.DirectoryChooser; import javafx.stage.DirectoryChooser;
import javafx.stage.FileChooser;
import javafx.util.Callback; import javafx.util.Callback;
import mplayer4anime.AppPreferences;
import java.io.File; import java.io.File;
import java.io.FilenameFilter; import java.io.FilenameFilter;
import java.net.URL; import java.net.URL;
import java.util.Arrays; import java.util.Arrays;
import java.util.List;
import java.util.ResourceBundle; import java.util.ResourceBundle;
public abstract class ControllerPane implements Initializable { public class ControllerPane implements Initializable {
private ResourceBundle resourceBundle; private ResourceBundle resourceBundle;
// use folderToOpen same variable in all panes // use folderToOpen same variable in all panes
private static String folderToOpen; private static String folderToOpen;
private AppPreferences appPreferences;
@FXML @FXML
private ListView<File> paneListView; private ListView<File> paneListView;
private ObservableList<File> paneFileList = FXCollections.observableArrayList(); private ObservableList<File> paneFileList = FXCollections.observableArrayList();
@FXML
private Label paneLbl;
private String paneType;
@Override @Override
public void initialize(URL url, ResourceBundle resBundle) { public void initialize(URL url, ResourceBundle resBundle) {
SetCellFactory(paneListView); SetCellFactory(paneListView);
resourceBundle = resBundle; resourceBundle = resBundle;
appPreferences = new AppPreferences();
}
public void setPaneType(String paneType){
this.paneType = paneType;
switch (paneType) {
case "Video":
paneLbl.setText(resourceBundle.getString("lbl_VideoPane"));
break;
case "Audio":
paneLbl.setText(resourceBundle.getString("lbl_AudioPane"));
break;
case "Subtitles":
paneLbl.setText(resourceBundle.getString("lbl_SubsPane"));
break;
default:
paneLbl.setText(resourceBundle.getString("?"));
break;
}
} }
/** Get index of the selected in pane element */ /** Get index of the selected in pane element */
@ -94,7 +124,24 @@ public abstract class ControllerPane implements Initializable {
/** /**
* Open file selector (Open folder button in UI). * Open file selector (Open folder button in UI).
* */ * */
void openFileChooser (String key){ @FXML
void openDirChooser(){
String[] filesExtension;
switch (paneType) {
case "Video":
filesExtension = appPreferences.getVideoExtensionsList();
break;
case "Audio":
filesExtension = appPreferences.getAudioExtensionsList();
break;
case "Subtitles":
filesExtension = appPreferences.getSubsExtensionsList();
break;
default:
filesExtension = new String[]{"*"};
break;
}
File directoryReceived; // Store files (folder) received from selector File directoryReceived; // Store files (folder) received from selector
DirectoryChooser dirSelect; DirectoryChooser dirSelect;
@ -109,30 +156,68 @@ public abstract class ControllerPane implements Initializable {
// GET LIST OF FILES from directory // GET LIST OF FILES from directory
if (directoryReceived != null) { if (directoryReceived != null) {
setFilesFromFolder(directoryReceived, key); File[] files; // Store files mkv/mka
files = directoryReceived.listFiles(new FilenameFilter() {
@Override
public boolean accept(File file, String Name) {
if (Name.lastIndexOf('.') > 0) {
int lastindex = Name.lastIndexOf('.');
String ext = Name.substring(lastindex);
for (String key : filesExtension){
if (ext.equals(key.substring(1)))
return true;
}
} else
return false;
return false;
}
});
displayFiles(files);
} else { } else {
System.out.println("\tNo folder selected"); System.out.println("No folder selected");
} }
} }
/**
* Open file selector (Open files button in UI).
* */
@FXML
void openFilesChooser(){
String[] filesExtension;
switch (paneType) {
case "Video":
filesExtension = appPreferences.getVideoExtensionsList();
break;
case "Audio":
filesExtension = appPreferences.getAudioExtensionsList();
break;
case "Subtitles":
filesExtension = appPreferences.getSubsExtensionsList();
break;
default:
filesExtension = new String[]{"*"};
break;
}
private void setFilesFromFolder(File directoryReceived, String key) { List<File> filesRecievedList;
File[] files; // Store files mkv/mka
files = directoryReceived.listFiles(new FilenameFilter() { FileChooser fc = new FileChooser();
@Override fc.setTitle(resourceBundle.getString("SelectFile"));
public boolean accept(File file, String Name) { if (folderToOpen == null)
if (Name.lastIndexOf('.') > 0) { fc.setInitialDirectory(new File(System.getProperty("user.home")));
int lastindex = Name.lastIndexOf('.'); else
String ext = Name.substring(lastindex); fc.setInitialDirectory(new File(folderToOpen));
if (ext.equals(key)) fc.getExtensionFilters().addAll(new FileChooser.ExtensionFilter(paneType, filesExtension));
return true;
} else
return false;
return false;
}
});
displayFiles(files); filesRecievedList = fc.showOpenMultipleDialog(paneListView.getScene().getWindow());
if (filesRecievedList != null){
File[] filesRecieved = new File[filesRecievedList.size()];
filesRecievedList.toArray(filesRecieved);
displayFiles(filesRecieved);
} else {
System.out.println("No files selected");
}
} }
/** /**
* Set files using lists. Used if playlist loaded * Set files using lists. Used if playlist loaded
@ -151,16 +236,10 @@ public abstract class ControllerPane implements Initializable {
// spiced java magic // spiced java magic
Arrays.sort(files); Arrays.sort(files);
/* DEBUG START
for (File eachFile : files)
System.out.println(eachFile.getAbsoluteFile());
DEBUG END */
// Remember the folder used for MKV and reuse it when user opens MKA/subs folder (as new default path instead of user.home) // Remember the folder used for MKV and reuse it when user opens MKA/subs folder (as new default path instead of user.home)
folderToOpen = files[0].getParent(); folderToOpen = files[0].getParent();
//System.out.println(folderToOpen); //System.out.println(folderToOpen);
paneListView.getItems().clear(); // wipe elements from ListView
paneFileList.addAll(files); paneFileList.addAll(files);
paneListView.setItems(paneFileList); paneListView.setItems(paneFileList);
paneListView.getSelectionModel().select(0); paneListView.getSelectionModel().select(0);
@ -169,6 +248,11 @@ public abstract class ControllerPane implements Initializable {
System.out.println("\tNo files in this folder"); System.out.println("\tNo files in this folder");
} }
} }
@FXML
public void cleanList(){
paneListView.getItems().clear(); // wipe elements from ListView
}
@FXML @FXML
private void Up(){ private void Up(){
int index; int index;
@ -197,7 +281,4 @@ public abstract class ControllerPane implements Initializable {
if (event.getCode().toString().equals("DELETE")) if (event.getCode().toString().equals("DELETE"))
Del(); Del();
} }
// TO IMPLEMENT IN REAL CLASS
@FXML
protected abstract void openAction();
} }

View File

@ -11,64 +11,39 @@ import java.util.Arrays;
import java.util.ResourceBundle; import java.util.ResourceBundle;
public class ControllerSUB extends ControllerPane { public class ControllerSUB extends ControllerPane {
// TODO: Move file extension filtering options to the OS-selector and remove drop-down with file ext. filtering options
@FXML
private ChoiceBox<String> subtExt;
// Observable list of the content subtExt
private ObservableList<String> subtExtList;
@FXML @FXML
private ChoiceBox<String> subtEncoding; private ChoiceBox<String> subtEncoding;
// Observable list of the content subtEncoding
private ObservableList<String> subEncodingList; private ObservableList<String> subEncodingList;
public void initialize(URL url, ResourceBundle rb) { public void initialize(URL url, ResourceBundle rb) {
super.initialize(url, rb); super.initialize(url, rb);
this.subtExtList = FXCollections.observableArrayList();
this.subEncodingList = FXCollections.observableArrayList(); this.subEncodingList = FXCollections.observableArrayList();
} }
@Override
protected void openAction() { openFileChooser(subtExt.getValue());} // TODO: check if non-empty and show error if needed
/** Return selected file extension */
// Walking on the thin ice..
public String getSelectedExt(){
return subtExt.getSelectionModel().getSelectedItem();
}
/** Return selected file encoding */ /** Return selected file encoding */
public String getSelectedEncoding(){ public String getSelectedEncoding(){
return subtEncoding.getSelectionModel().getSelectedItem(); return subtEncoding.getSelectionModel().getSelectedItem();
} }
/**
* Set Files extensions list and select element
* */
public void setSubtExt(String[] list, String selection){
setMenuElements(subtExt, subtExtList, list, selection);
}
/** /**
* Set encoding list and select element * Set encoding list and select element
* */ * */
public void setEncoding(String[] list, String selection){ public void setEncoding(String[] list, String selection){
setMenuElements(subtEncoding, subEncodingList, list, selection); String currentlySelectedValue = subtEncoding.getValue();
}
/* Encoding and Extension common setter */
private void setMenuElements(ChoiceBox<String> menu, ObservableList<String> obsList, String[] list, String selection){
String currentlySelectedValue = menu.getValue();
obsList.clear(); subEncodingList.clear();
obsList.setAll(list); subEncodingList.setAll(list);
menu.setItems(obsList); subtEncoding.setItems(subEncodingList);
if (selection == null || selection.isEmpty()) if (selection == null || selection.isEmpty())
// Try to restore previously selected value if it existed before and exists in the new list // Try to restore previously selected value if it existed before and exists in the new list
if (currentlySelectedValue !=null && !currentlySelectedValue.isEmpty() && obsList.contains(currentlySelectedValue)) if (currentlySelectedValue !=null && !currentlySelectedValue.isEmpty() && subEncodingList.contains(currentlySelectedValue))
menu.getSelectionModel().select(currentlySelectedValue); subtEncoding.getSelectionModel().select(currentlySelectedValue);
else else
menu.setValue(obsList.get(0)); subtEncoding.setValue(subEncodingList.get(0));
else { else {
if (obsList.contains(selection)) if (subEncodingList.contains(selection))
menu.getSelectionModel().select(selection); subtEncoding.getSelectionModel().select(selection);
else else
menu.setValue(obsList.get(0)); subtEncoding.setValue(subEncodingList.get(0));
} }
} }
/** /**
@ -76,14 +51,16 @@ public class ControllerSUB extends ControllerPane {
* Updates stored lists/selection of encoding * Updates stored lists/selection of encoding
* */ * */
public void selectEncodingValue(String encodingValue, AppPreferences preferences){ public void selectEncodingValue(String encodingValue, AppPreferences preferences){
if (encodingValue != null && !encodingValue.isEmpty()) { if (encodingValue != null && !(encodingValue = encodingValue.trim()).isEmpty()) {
if (!subEncodingList.contains(encodingValue)) { if (!encodingValue.contains("\t") && !encodingValue.contains(" ")){ // If contains spaces or tabs, ignore.
subEncodingList.add(encodingValue); if (!subEncodingList.contains(encodingValue)) {
preferences.setSubsEncodingList(Arrays.copyOf(subEncodingList.toArray(), subEncodingList.toArray().length, String[].class)); subEncodingList.add(encodingValue);
} preferences.setSubsEncodingList(Arrays.copyOf(subEncodingList.toArray(), subEncodingList.toArray().length, String[].class));
if (!subtEncoding.getValue().equals(encodingValue)) { }
subtEncoding.getSelectionModel().select(encodingValue); if (!subtEncoding.getValue().equals(encodingValue)) {
preferences.setLastTimeUsedSubsEncoding(encodingValue); subtEncoding.getSelectionModel().select(encodingValue);
preferences.setLastTimeUsedSubsEncoding(encodingValue);
}
} }
} }
} }

View File

@ -2,6 +2,7 @@
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?> <?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?> <?import javafx.scene.control.ListView?>
<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.HBox?>
@ -9,29 +10,41 @@
<?import javafx.scene.layout.VBox?> <?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.SVGPath?> <?import javafx.scene.shape.SVGPath?>
<AnchorPane minWidth="200.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="mplayer4anime.appPanes.ControllerMKV"> <AnchorPane minWidth="200.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="mplayer4anime.appPanes.ControllerPane">
<children> <children>
<VBox layoutX="87.0" layoutY="-11.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <VBox layoutX="87.0" layoutY="-11.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children> <children>
<HBox spacing="3.0" VBox.vgrow="NEVER"> <HBox alignment="CENTER" spacing="3.0" VBox.vgrow="NEVER">
<children> <children>
<Button mnemonicParsing="false" onAction="#openAction" text="%key_mkv_open"> <Button minHeight="28.0" mnemonicParsing="false" onAction="#openDirChooser">
<graphic> <graphic>
<SVGPath content="M19,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10L12,6H19A2,2 0 0,1 21,8H21L4,8V18L6.14,10H23.21L20.93,18.5C20.7,19.37 19.92,20 19,20Z" /> <SVGPath content="M10,4L12,6H20A2,2 0 0,1 22,8V18A2,2 0 0,1 20,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10M15,9V12H12V14H15V17H17V14H20V12H17V9H15Z" />
</graphic>
</Button>
<Button minHeight="28.0" mnemonicParsing="false" onAction="#openFilesChooser">
<graphic>
<SVGPath content="M14,10H19.5L14,4.5V10M5,3H15L21,9V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3M9,18H11V15H14V13H11V10H9V13H6V15H9V18Z" />
</graphic></Button>
<Pane minWidth="5.0" HBox.hgrow="NEVER" />
<Button minHeight="28.0" mnemonicParsing="false" onAction="#cleanList">
<graphic>
<SVGPath content="m 4,2 h 7 c 1.104569,0 2,0.8954305 2,2 v 11 c 0,1.104569 -0.895431,2 -2,2 H 4 C 2.8954305,17 2,16.104569 2,15 V 4 C 2,2.8954305 2.8954305,2 4,2 m 0,6 v 3 h 7 V 8 H 4 m 0,4 v 3 h 7 V 12 H 4 M 4,4 v 3 h 7 V 4 H 4 M 17.59,9.5 15,6.91 16.41,5.5 19,8.09 21.59,5.5 23,6.91 20.41,9.5 23,12.09 21.59,13.5 19,10.91 16.41,13.5 15,12.09 Z" fill="#cc0101" />
</graphic> </graphic>
</Button> </Button>
<Pane HBox.hgrow="ALWAYS" /> <Pane HBox.hgrow="ALWAYS" />
<Button mnemonicParsing="false" onAction="#Up"> <Label fx:id="paneLbl" text="%lbl_VideoPane" />
<Pane HBox.hgrow="ALWAYS" />
<Button minHeight="28.0" mnemonicParsing="false" onAction="#Up">
<graphic> <graphic>
<SVGPath content="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z" /> <SVGPath content="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z" />
</graphic> </graphic>
</Button> </Button>
<Button mnemonicParsing="false" onAction="#Down"> <Button minHeight="28.0" mnemonicParsing="false" onAction="#Down">
<graphic> <graphic>
<SVGPath content="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" /> <SVGPath content="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" />
</graphic> </graphic>
</Button> </Button>
<Button mnemonicParsing="false" onAction="#Del"> <Button minHeight="28.0" mnemonicParsing="false" onAction="#Del">
<graphic> <graphic>
<SVGPath content="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" fill="#cc0101" /> <SVGPath content="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" fill="#cc0101" />
</graphic> </graphic>

View File

@ -1,48 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.ListView?>
<?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Pane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.SVGPath?>
<AnchorPane xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1" fx:controller="mplayer4anime.appPanes.ControllerMKA">
<children>
<VBox layoutX="39.0" layoutY="42.0" prefHeight="398.0" prefWidth="316.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<HBox spacing="3.0" VBox.vgrow="NEVER">
<children>
<Button mnemonicParsing="false" onAction="#openAction" text="%key_mka_open">
<graphic>
<SVGPath content="M19,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10L12,6H19A2,2 0 0,1 21,8H21L4,8V18L6.14,10H23.21L20.93,18.5C20.7,19.37 19.92,20 19,20Z" />
</graphic>
</Button>
<Pane HBox.hgrow="ALWAYS" />
<Button mnemonicParsing="false" onAction="#Up">
<graphic>
<SVGPath content="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z" />
</graphic>
</Button>
<Button mnemonicParsing="false" onAction="#Down">
<graphic>
<SVGPath content="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" />
</graphic>
</Button>
<Button mnemonicParsing="false" onAction="#Del">
<graphic>
<SVGPath content="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" fill="#b90505" />
</graphic>
</Button>
</children>
<VBox.margin>
<Insets bottom="5.0" left="5.0" right="5.0" top="5.0" />
</VBox.margin>
</HBox>
<ListView fx:id="paneListView" onKeyPressed="#KeyPressed" styleClass="landing" stylesheets="@../res/landing.css" VBox.vgrow="ALWAYS" />
</children>
</VBox>
</children>
</AnchorPane>

View File

@ -3,6 +3,7 @@
<?import javafx.geometry.Insets?> <?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?> <?import javafx.scene.control.Button?>
<?import javafx.scene.control.ChoiceBox?> <?import javafx.scene.control.ChoiceBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ListView?> <?import javafx.scene.control.ListView?>
<?import javafx.scene.layout.AnchorPane?> <?import javafx.scene.layout.AnchorPane?>
<?import javafx.scene.layout.HBox?> <?import javafx.scene.layout.HBox?>
@ -14,27 +15,39 @@
<children> <children>
<VBox layoutX="39.0" layoutY="42.0" prefHeight="398.0" prefWidth="316.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0"> <VBox layoutX="39.0" layoutY="42.0" prefHeight="398.0" prefWidth="316.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children> <children>
<HBox spacing="3.0" VBox.vgrow="NEVER"> <HBox alignment="CENTER" spacing="3.0" VBox.vgrow="NEVER">
<children> <children>
<Button mnemonicParsing="false" onAction="#openAction" text="%key_subt_open"> <Button minHeight="28.0" mnemonicParsing="false" onAction="#openDirChooser">
<graphic> <graphic>
<SVGPath content="M19,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10L12,6H19A2,2 0 0,1 21,8H21L4,8V18L6.14,10H23.21L20.93,18.5C20.7,19.37 19.92,20 19,20Z" /> <SVGPath content="M10,4L12,6H20A2,2 0 0,1 22,8V18A2,2 0 0,1 20,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10M15,9V12H12V14H15V17H17V14H20V12H17V9H15Z" />
</graphic>
</Button>
<Button minHeight="28.0" mnemonicParsing="false" onAction="#openFilesChooser">
<graphic>
<SVGPath content="M14,10H19.5L14,4.5V10M5,3H15L21,9V19A2,2 0 0,1 19,21H5C3.89,21 3,20.1 3,19V5C3,3.89 3.89,3 5,3M9,18H11V15H14V13H11V10H9V13H6V15H9V18Z" />
</graphic>
</Button>
<Pane minWidth="5.0" />
<Button mnemonicParsing="false" onAction="#cleanList">
<graphic>
<SVGPath content="m 4,2 h 7 c 1.104569,0 2,0.8954305 2,2 v 11 c 0,1.104569 -0.895431,2 -2,2 H 4 C 2.8954305,17 2,16.104569 2,15 V 4 C 2,2.8954305 2.8954305,2 4,2 m 0,6 v 3 h 7 V 8 H 4 m 0,4 v 3 h 7 V 12 H 4 M 4,4 v 3 h 7 V 4 H 4 M 17.59,9.5 15,6.91 16.41,5.5 19,8.09 21.59,5.5 23,6.91 20.41,9.5 23,12.09 21.59,13.5 19,10.91 16.41,13.5 15,12.09 Z" fill="#cc0101" />
</graphic> </graphic>
</Button> </Button>
<ChoiceBox fx:id="subtExt" prefWidth="60.0" />
<ChoiceBox fx:id="subtEncoding" prefWidth="100.0" /> <ChoiceBox fx:id="subtEncoding" prefWidth="100.0" />
<Pane HBox.hgrow="ALWAYS" /> <Pane HBox.hgrow="ALWAYS" />
<Button mnemonicParsing="false" onAction="#Up"> <Label fx:id="paneLbl" text="%lbl_SubsPane" />
<Pane HBox.hgrow="ALWAYS" />
<Button minHeight="28.0" mnemonicParsing="false" onAction="#Up">
<graphic> <graphic>
<SVGPath content="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z" /> <SVGPath content="M7.41,15.41L12,10.83L16.59,15.41L18,14L12,8L6,14L7.41,15.41Z" />
</graphic> </graphic>
</Button> </Button>
<Button mnemonicParsing="false" onAction="#Down"> <Button minHeight="28.0" mnemonicParsing="false" onAction="#Down">
<graphic> <graphic>
<SVGPath content="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" /> <SVGPath content="M7.41,8.58L12,13.17L16.59,8.58L18,10L12,16L6,10L7.41,8.58Z" />
</graphic> </graphic>
</Button> </Button>
<Button mnemonicParsing="false" onAction="#Del"> <Button minHeight="28.0" mnemonicParsing="false" onAction="#Del">
<graphic> <graphic>
<SVGPath content="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" fill="#b90505" /> <SVGPath content="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" fill="#b90505" />
</graphic> </graphic>

View File

@ -27,25 +27,40 @@
<menus> <menus>
<Menu mnemonicParsing="false" text="%menu_File"> <Menu mnemonicParsing="false" text="%menu_File">
<items> <items>
<MenuItem mnemonicParsing="false" onAction="#openBtn" text="%menu_File_Open" /> <MenuItem mnemonicParsing="false" onAction="#openBtn" text="%menu_File_Open">
<graphic>
<SVGPath content="M19,20H4C2.89,20 2,19.1 2,18V6C2,4.89 2.89,4 4,4H10L12,6H19A2,2 0 0,1 21,8H21L4,8V18L6.14,10H23.21L20.93,18.5C20.7,19.37 19.92,20 19,20Z" />
</graphic></MenuItem>
<Menu fx:id="recentlyOpenedMenu" mnemonicParsing="false" text="%menu_File_Recent"> <Menu fx:id="recentlyOpenedMenu" mnemonicParsing="false" text="%menu_File_Recent">
<items> <items>
<SeparatorMenuItem mnemonicParsing="false" /> <SeparatorMenuItem mnemonicParsing="false" />
<MenuItem mnemonicParsing="false" onAction="#cleanAllRecentlyOpened" text="%menu_File_Recent_CleanAll" /> <MenuItem mnemonicParsing="false" onAction="#cleanAllRecentlyOpened" text="%menu_File_Recent_CleanAll" />
</items> </items>
<graphic>
<SVGPath content="M13.5,8H12V13L16.28,15.54L17,14.33L13.5,12.25V8M13,3A9,9 0 0,0 4,12H1L4.96,16.03L9,12H6A7,7 0 0,1 13,5A7,7 0 0,1 20,12A7,7 0 0,1 13,19C11.07,19 9.32,18.21 8.06,16.94L6.64,18.36C8.27,20 10.5,21 13,21A9,9 0 0,0 22,12A9,9 0 0,0 13,3" />
</graphic>
</Menu> </Menu>
<SeparatorMenuItem mnemonicParsing="false" /> <SeparatorMenuItem mnemonicParsing="false" />
<MenuItem mnemonicParsing="false" onAction="#saveBtn" text="%menu_File_Save" /> <MenuItem mnemonicParsing="false" onAction="#saveBtn" text="%menu_File_Save">
<MenuItem mnemonicParsing="false" onAction="#saveAsBtn" text="%menu_File_SaveAs" /> <graphic>
<SVGPath content="M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z" />
</graphic></MenuItem>
<MenuItem mnemonicParsing="false" onAction="#saveAsBtn" text="%menu_File_SaveAs">
<graphic>
<SVGPath content="M15,9H5V5H15M12,19A3,3 0 0,1 9,16A3,3 0 0,1 12,13A3,3 0 0,1 15,16A3,3 0 0,1 12,19M17,3H5C3.89,3 3,3.9 3,5V19A2,2 0 0,0 5,21H19A2,2 0 0,0 21,19V7L17,3Z" />
</graphic></MenuItem>
<SeparatorMenuItem mnemonicParsing="false" /> <SeparatorMenuItem mnemonicParsing="false" />
<MenuItem mnemonicParsing="false" onAction="#closeBtn" text="%menu_File_Close" /> <MenuItem mnemonicParsing="false" onAction="#closeBtn" text="%menu_File_Close">
<graphic>
<SVGPath content="M19,6.41L17.59,5L12,10.59L6.41,5L5,6.41L10.59,12L5,17.59L6.41,19L12,13.41L17.59,19L19,17.59L13.41,12L19,6.41Z" />
</graphic></MenuItem>
</items> </items>
</Menu> </Menu>
<Menu mnemonicParsing="false" text="%menu_Tools"> <Menu mnemonicParsing="false" text="%menu_Tools">
<items> <items>
<MenuItem mnemonicParsing="false" onAction="#settingsBtn" text="%menu_Tools_Settings"> <MenuItem mnemonicParsing="false" onAction="#settingsBtn" text="%menu_Tools_Settings">
<graphic> <graphic>
<SVGPath content="M12,15.5A3.5,3.5 0 0,1 8.5,12A3.5,3.5 0 0,1 12,8.5A3.5,3.5 0 0,1 15.5,12A3.5,3.5 0 0,1 12,15.5M19.43,12.97C19.47,12.65 19.5,12.33 19.5,12C19.5,11.67 19.47,11.34 19.43,11L21.54,9.37C21.73,9.22 21.78,8.95 21.66,8.73L19.66,5.27C19.54,5.05 19.27,4.96 19.05,5.05L16.56,6.05C16.04,5.66 15.5,5.32 14.87,5.07L14.5,2.42C14.46,2.18 14.25,2 14,2H10C9.75,2 9.54,2.18 9.5,2.42L9.13,5.07C8.5,5.32 7.96,5.66 7.44,6.05L4.95,5.05C4.73,4.96 4.46,5.05 4.34,5.27L2.34,8.73C2.21,8.95 2.27,9.22 2.46,9.37L4.57,11C4.53,11.34 4.5,11.67 4.5,12C4.5,12.33 4.53,12.65 4.57,12.97L2.46,14.63C2.27,14.78 2.21,15.05 2.34,15.27L4.34,18.73C4.46,18.95 4.73,19.03 4.95,18.95L7.44,17.94C7.96,18.34 8.5,18.68 9.13,18.93L9.5,21.58C9.54,21.82 9.75,22 10,22H14C14.25,22 14.46,21.82 14.5,21.58L14.87,18.93C15.5,18.67 16.04,18.34 16.56,17.94L19.05,18.95C19.27,19.03 19.54,18.95 19.66,18.73L21.66,15.27C21.78,15.05 21.73,14.78 21.54,14.63L19.43,12.97Z" fill="#686868" /> <SVGPath content="M3,17V19H9V17H3M3,5V7H13V5H3M13,21V19H21V17H13V15H11V21H13M7,9V11H3V13H7V15H9V9H7M21,13V11H11V13H21M15,9H17V7H21V5H17V3H15V9Z" fill="#686868" />
</graphic></MenuItem> </graphic></MenuItem>
</items> </items>
</Menu> </Menu>
@ -53,12 +68,28 @@
<items> <items>
<MenuItem mnemonicParsing="false" onAction="#infoBtn" text="%menu_Help_AboutApp"> <MenuItem mnemonicParsing="false" onAction="#infoBtn" text="%menu_Help_AboutApp">
<graphic> <graphic>
<SVGPath content="M13.5,4A1.5,1.5 0 0,0 12,5.5A1.5,1.5 0 0,0 13.5,7A1.5,1.5 0 0,0 15,5.5A1.5,1.5 0 0,0 13.5,4M13.14,8.77C11.95,8.87 8.7,11.46 8.7,11.46C8.5,11.61 8.56,11.6 8.72,11.88C8.88,12.15 8.86,12.17 9.05,12.04C9.25,11.91 9.58,11.7 10.13,11.36C12.25,10 10.47,13.14 9.56,18.43C9.2,21.05 11.56,19.7 12.17,19.3C12.77,18.91 14.38,17.8 14.54,17.69C14.76,17.54 14.6,17.42 14.43,17.17C14.31,17 14.19,17.12 14.19,17.12C13.54,17.55 12.35,18.45 12.19,17.88C12,17.31 13.22,13.4 13.89,10.71C14,10.07 14.3,8.67 13.14,8.77Z" fill="#686868f7" /> <SVGPath content="M11,9H13V7H11M12,20C7.59,20 4,16.41 4,12C4,7.59 7.59,4 12,4C16.41,4 20,7.59 20,12C20,16.41 16.41,20 12,20M12,2A10,10 0 0,0 2,12A10,10 0 0,0 12,22A10,10 0 0,0 22,12A10,10 0 0,0 12,2M11,17H13V11H11V17Z" fill="#686868f7" />
</graphic></MenuItem> </graphic></MenuItem>
</items> </items>
</Menu> </Menu>
</menus> </menus>
</MenuBar> </MenuBar>
<SplitPane dividerPositions="0.5" prefHeight="257.0" prefWidth="313.0" VBox.vgrow="ALWAYS">
<items>
<!-- PAY ATTENTION! IN MAIN CONTROLLER THIS CONTROLLER CALLED AS @"fx:id"+"Controller" -->
<fx:include fx:id="mkvPane" source="appPanes/genericPane.fxml" />
<TabPane fx:id="tabPane" minWidth="200.0" prefHeight="200.0" prefWidth="200.0" side="RIGHT" tabClosingPolicy="UNAVAILABLE">
<tabs>
<Tab text="%main_tab_audio">
<fx:include fx:id="mkaPane" source="appPanes/genericPane.fxml" />
</Tab>
<Tab text="%main_tab_subtitles">
<fx:include fx:id="subPane" source="appPanes/subPane.fxml" />
</Tab>
</tabs>
</TabPane>
</items>
</SplitPane>
<ToolBar prefHeight="40.0" prefWidth="200.0" styleClass="topToolBar" stylesheets="@res/landing.css"> <ToolBar prefHeight="40.0" prefWidth="200.0" styleClass="topToolBar" stylesheets="@res/landing.css">
<items> <items>
<HBox> <HBox>
@ -128,25 +159,12 @@
</SplitMenuButton> </SplitMenuButton>
</items> </items>
</ToolBar> </ToolBar>
<SplitPane dividerPositions="0.5" prefHeight="257.0" prefWidth="313.0" VBox.vgrow="ALWAYS">
<items>
<!-- PAY ATTENTION! IN MAIN CONTROLLER THIS CONTROLLER CALLED AS @"fx:id"+"Controller" -->
<fx:include fx:id="mkvPane" source="appPanes/mkvPane.fxml" />
<TabPane fx:id="tabPane" minWidth="200.0" prefHeight="200.0" prefWidth="200.0" side="RIGHT" tabClosingPolicy="UNAVAILABLE">
<tabs>
<Tab text="%main_tab_audio">
<fx:include fx:id="mkaPane" source="appPanes/mkaPane.fxml" />
</Tab>
<Tab text="%main_tab_subtitles">
<fx:include fx:id="subPane" source="appPanes/subPane.fxml" />
</Tab>
</tabs>
</TabPane>
</items>
</SplitPane>
<Pane VBox.vgrow="NEVER"> <Pane VBox.vgrow="NEVER">
<children> <children>
<Label fx:id="statusLbl" /> <Label fx:id="statusLbl">
<padding>
<Insets bottom="3.0" left="3.0" right="3.0" top="3.0" />
</padding></Label>
</children> </children>
</Pane> </Pane>
</children> </children>

View File

@ -1,14 +1,14 @@
about_line1=mplayer4amine distributes under GNU GPLv3 license. about_line1=mplayer4amine distributes under GNU GPLv3 license.
about_line2=Release: v0.10 about_line2=Release: v0.11
about_line3=Development & maintenance by Dmitry Isaenko. about_line3=Development & maintenance by Dmitry Isaenko.
about_AboutName=About about_AboutName=About
main_tab_audio=Audio main_tab_audio=Audio
CancelBtn=Cancel CancelBtn=Cancel
Error=Error Error=Error
fullscreen_option=Always start in fullscreen fullscreen_option=Always start in fullscreen
key_mka_open=Audio *.mka lbl_AudioPane=Audio
key_mkv_open=Video *.mkv lbl_VideoPane=Video
key_subt_open=Subtitles lbl_SubsPane=Subtitles
settings_PathToMplayerLbl=Path to mplayer executable: settings_PathToMplayerLbl=Path to mplayer executable:
SaveBtn=Save SaveBtn=Save
settings_SettingsName=Settings settings_SettingsName=Settings
@ -20,10 +20,11 @@ ErrorUnableToStartMplayer=Unable to execute 'mplayer'.\n\
settings_unixOsInformation=Unix-like OS uses system $PATH to find mplayer location.\n\ settings_unixOsInformation=Unix-like OS uses system $PATH to find mplayer location.\n\
Please don't change it if not sure. Please don't change it if not sure.
SelectDirectoryTitle=Select directory SelectDirectoryTitle=Select directory
settings_LoadListsOnStart=Save & restore previously opened lists after application starts:
settings_subsExtensionList=Avaliable subtitles extensions: settings_subsExtensionList=Avaliable subtitles extensions:
settings_subsCodepageList=Avaliable codepages for subtitles: settings_subsCodepageList=Avaliable codepages for subtitles:
settings_fieldContainSpacesTabs=Spaces and tab symbols are not allowed. settings_fieldContainUnacceptedChars=Spaces and tab symbols are not allowed.\n\
'*' symbol could be only in the starting position.\n\
Example: *.mp3
subsShow_option=Don't show subtitles. subsShow_option=Don't show subtitles.
menu_File=File menu_File=File
menu_Tools=Tools menu_Tools=Tools
@ -48,5 +49,12 @@ ErrorOnSaveIncorrectEncoding=Unable to save file:\n\
Internal problem: unsupported encoding. Internal problem: unsupported encoding.
ErrorUnableToSaveEmptyPlaylist=Unable to save playlist with no videos files. ErrorUnableToSaveEmptyPlaylist=Unable to save playlist with no videos files.
AboutUsedLibraries=Used libraries: AboutUsedLibraries=Used libraries:
settings_Tab_General=General
settings_Tab_Video=Video
settings_Tab_Audio=Audio
settings_Tab_Subtitles=Subtitles
settings_videoExtensionList=Avaliable video files extensions:
settings_audioExtensionList=Avaliable audio layer extensions:

View File

@ -1,15 +1,15 @@
menu_File_Recent=\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 \u0444\u0430\u0439\u043B\u044B... menu_File_Recent=\u041F\u043E\u0441\u043B\u0435\u0434\u043D\u0438\u0435 \u0444\u0430\u0439\u043B\u044B...
about_line1=mplayer4amine \u0440\u0430\u0441\u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u044F\u0435\u0442\u0441\u044F \u043F\u043E \u043B\u0438\u0446\u0435\u043D\u0437\u0438\u0438 GNU GPLv3. about_line1=mplayer4amine \u0440\u0430\u0441\u043F\u0440\u043E\u0441\u0442\u0440\u0430\u043D\u044F\u0435\u0442\u0441\u044F \u043F\u043E \u043B\u0438\u0446\u0435\u043D\u0437\u0438\u0438 GNU GPLv3.
about_line2=\u0420\u0435\u043B\u0438\u0437: v0.10 about_line2=\u0420\u0435\u043B\u0438\u0437: v0.11
about_line3=\u0420\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u0430\u043D\u043E \u0438 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0414\u043C\u0438\u0442\u0440\u0438\u0435\u043C \u0418\u0441\u0430\u0435\u043D\u043A\u043E. about_line3=\u0420\u0430\u0437\u0440\u0430\u0431\u043E\u0442\u0430\u043D\u043E \u0438 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F \u0414\u043C\u0438\u0442\u0440\u0438\u0435\u043C \u0418\u0441\u0430\u0435\u043D\u043A\u043E.
about_AboutName=\u041E \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438 about_AboutName=\u041E \u043F\u0440\u0438\u043B\u043E\u0436\u0435\u043D\u0438\u0438
main_tab_audio=\u0410\u0443\u0434\u0438\u043E main_tab_audio=\u0410\u0443\u0434\u0438\u043E
CancelBtn=\u041E\u0442\u043C\u0435\u043D\u0430 CancelBtn=\u041E\u0442\u043C\u0435\u043D\u0430
Error=\u041E\u0448\u0438\u0431\u043A\u0430 Error=\u041E\u0448\u0438\u0431\u043A\u0430
fullscreen_option=\u0412\u0441\u0435\u0433\u0434\u0430 \u043F\u043E\u043B\u043D\u043E\u044D\u043A\u0440\u0430\u043D\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C fullscreen_option=\u0412\u0441\u0435\u0433\u0434\u0430 \u043F\u043E\u043B\u043D\u043E\u044D\u043A\u0440\u0430\u043D\u043D\u044B\u0439 \u0440\u0435\u0436\u0438\u043C
key_mka_open=\u0410\u0443\u0434\u0438\u043E *.mka lbl_AudioPane=\u0410\u0443\u0434\u0438\u043E
key_mkv_open=\u0412\u0438\u0434\u0435\u043E *.mkv lbl_VideoPane=\u0412\u0438\u0434\u0435\u043E
key_subt_open=\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044B lbl_SubsPane=\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044B
settings_PathToMplayerLbl=\u0420\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435 mplayer: settings_PathToMplayerLbl=\u0420\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435 mplayer:
SaveBtn=\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C SaveBtn=\u0421\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C
settings_SettingsName=\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438 settings_SettingsName=\u041D\u0430\u0441\u0442\u0440\u043E\u0439\u043A\u0438
@ -21,10 +21,11 @@ ErrorUnableToStartMplayer=\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u043D
settings_unixOsInformation=Unix-\u043F\u043E\u0434\u043E\u0431\u043D\u044B\u0435 \u041E\u0421 \u0441\u0438\u043F\u043E\u043B\u044C\u0437\u0443\u044E\u0442 \u0441\u0438\u0441\u0442\u0435\u043C\u043D\u044B\u0435 \u043F\u0443\u0442\u0438, \u0447\u0442\u043E\u0431\u044B \u043D\u0430\u0439\u0442\u0438 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435 mplayer.\n\ settings_unixOsInformation=Unix-\u043F\u043E\u0434\u043E\u0431\u043D\u044B\u0435 \u041E\u0421 \u0441\u0438\u043F\u043E\u043B\u044C\u0437\u0443\u044E\u0442 \u0441\u0438\u0441\u0442\u0435\u043C\u043D\u044B\u0435 \u043F\u0443\u0442\u0438, \u0447\u0442\u043E\u0431\u044B \u043D\u0430\u0439\u0442\u0438 \u0440\u0430\u0441\u043F\u043E\u043B\u043E\u0436\u0435\u043D\u0438\u0435 mplayer.\n\
\u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043D\u0435 \u0442\u0440\u043E\u0433\u0430\u0439\u0442\u0435 \u044D\u0442\u043E \u0435\u0441\u043B\u0438 \u043D\u0435 \u0443\u0432\u0435\u0440\u0435\u043D\u044B. \u041F\u043E\u0436\u0430\u043B\u0443\u0439\u0441\u0442\u0430, \u043D\u0435 \u0442\u0440\u043E\u0433\u0430\u0439\u0442\u0435 \u044D\u0442\u043E \u0435\u0441\u043B\u0438 \u043D\u0435 \u0443\u0432\u0435\u0440\u0435\u043D\u044B.
SelectDirectoryTitle=\u0412\u044B\u0431\u043E\u0440 \u0434\u0438\u0440\u0435\u043A\u0442\u043E\u0440\u0438\u0438 SelectDirectoryTitle=\u0412\u044B\u0431\u043E\u0440 \u0434\u0438\u0440\u0435\u043A\u0442\u043E\u0440\u0438\u0438
settings_LoadListsOnStart=\u0417\u0430\u043F\u043E\u043C\u0438\u043D\u0430\u0442\u044C \u0438 \u0432\u043E\u0441\u0441\u0442\u0430\u043D\u0430\u0432\u043B\u0438\u0432\u0430\u0442\u044C \u043E\u0442\u043A\u0440\u044B\u0442\u044B\u0435 \u0432 \u043F\u0440\u0435\u0434\u044B\u0434\u0443\u0449\u0438\u0439 \u0440\u0430\u0437 \u0441\u043F\u0438\u0441\u043A\u0438:
settings_subsExtensionList=\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u043E\u0432: settings_subsExtensionList=\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u043E\u0432:
settings_subsCodepageList=\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u043A\u043E\u0434\u0438\u0440\u043E\u0432\u043A\u0438 \u0434\u043B\u044F \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u043E\u0432: settings_subsCodepageList=\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u043A\u043E\u0434\u0438\u0440\u043E\u0432\u043A\u0438 \u0434\u043B\u044F \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u043E\u0432:
settings_fieldContainSpacesTabs=\u041F\u0440\u043E\u0431\u0435\u043B\u044B \u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438 \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B. settings_fieldContainUnacceptedChars=\u041F\u0440\u043E\u0431\u0435\u043B\u044B \u0438 \u0441\u0438\u043C\u0432\u043E\u043B\u044B \u0442\u0430\u0431\u0443\u043B\u044F\u0446\u0438\u0438 \u043D\u0435\u0434\u043E\u043F\u0443\u0441\u0442\u0438\u043C\u044B.\n\
\u0421\u0438\u043C\u0432\u043E\u043B "*" \u043C\u043E\u0436\u0435\u0442 \u0438\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u0442\u044C\u0441\u044F \u0442\u043E\u043B\u044C\u043A\u043E \u0432 \u043D\u0430\u0447\u0430\u043B\u0435.\n\
\u041F\u0440\u0438\u043C\u0435\u0440: *.mp3
subsShow_option=\u041D\u0435 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u044B. subsShow_option=\u041D\u0435 \u043E\u0442\u043E\u0431\u0440\u0430\u0436\u0430\u0442\u044C \u0441\u0443\u0431\u0442\u0438\u0442\u0440\u044B.
menu_File=\u0424\u0430\u0439\u043B menu_File=\u0424\u0430\u0439\u043B
menu_Tools=\u0418\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u044B menu_Tools=\u0418\u043D\u0441\u0442\u0440\u0443\u043C\u0435\u043D\u0442\u044B
@ -48,3 +49,10 @@ ErrorOnSaveIncorrectEncoding=\u041D\u0435\u0432\u043E\u0437\u043C\u043E\u0436\u0
\u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u043E\u0448\u0438\u0431\u043A\u0430: \u043A\u043E\u0434\u0438\u0440\u043E\u0432\u043A\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F. \u0412\u043D\u0443\u0442\u0440\u0435\u043D\u043D\u044F\u044F \u043E\u0448\u0438\u0431\u043A\u0430: \u043A\u043E\u0434\u0438\u0440\u043E\u0432\u043A\u0430 \u043D\u0435 \u043F\u043E\u0434\u0434\u0435\u0440\u0436\u0438\u0432\u0430\u0435\u0442\u0441\u044F.
ErrorUnableToSaveEmptyPlaylist=\u041D\u0435\u043B\u044C\u0437\u044F \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043F\u043B\u0435\u0439\u043B\u0438\u0441\u0442 \u0431\u0435\u0437 \u0432\u0438\u0434\u0435\u043E \u0444\u0430\u0439\u043B\u043E\u0432. ErrorUnableToSaveEmptyPlaylist=\u041D\u0435\u043B\u044C\u0437\u044F \u0441\u043E\u0445\u0440\u0430\u043D\u0438\u0442\u044C \u043F\u043B\u0435\u0439\u043B\u0438\u0441\u0442 \u0431\u0435\u0437 \u0432\u0438\u0434\u0435\u043E \u0444\u0430\u0439\u043B\u043E\u0432.
AboutUsedLibraries=\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0431\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0438: AboutUsedLibraries=\u0418\u0441\u043F\u043E\u043B\u044C\u0437\u043E\u0432\u0430\u043D\u043D\u044B\u0435 \u0431\u0438\u0431\u043B\u0438\u043E\u0442\u0435\u043A\u0438:
settings_Tab_General=\u041E\u0441\u043D\u043E\u0432\u043D\u044B\u0435
settings_Tab_Audio=\u0410\u0443\u0434\u0438\u043E
settings_Tab_Subtitles=\u0421\u0443\u0431\u0442\u0438\u0442\u0440\u044B
settings_Tab_Video=\u0412\u0438\u0434\u0435\u043E
settings_videoExtensionList=\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u0444\u0430\u0439\u043B\u043E\u0432 \u0432\u0438\u0434\u0435\u043E:
settings_audioExtensionList=\u0414\u043E\u0441\u0442\u0443\u043F\u043D\u044B\u0435 \u0440\u0430\u0441\u0448\u0438\u0440\u0435\u043D\u0438\u044F \u0434\u043B\u044F \u0430\u0443\u0434\u0438\u043E\u0434\u043E\u0440\u043E\u0436\u0435\u043A:

BIN
res/gjel.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 28 KiB

View File

@ -6,7 +6,7 @@
.btnLeft { .btnLeft {
-fx-background-radius: 0.3em 0em 0em 0.3em; -fx-background-radius: 0.3em 0em 0em 0.3em;
-fx-background-color: #263e48; -fx-background-color: #267a9e;
} }
.btnLeft:hover { .btnLeft:hover {
-fx-background-radius: 0.3em 0em 0em 0.3em; -fx-background-radius: 0.3em 0em 0em 0.3em;
@ -18,7 +18,7 @@
} }
.btnCenter { .btnCenter {
-fx-background-radius: 0em 0em 0em 0em ; -fx-background-radius: 0em 0em 0em 0em ;
-fx-background-color: #263e48; -fx-background-color: #267a9e;
} }
.btnCenter:hover { .btnCenter:hover {
-fx-background-radius: 0em 0em 0em 0em ; -fx-background-radius: 0em 0em 0em 0em ;
@ -30,7 +30,7 @@
} }
.btnRight { .btnRight {
-fx-background-radius: 0em 0.3em 0.3em 0em ; -fx-background-radius: 0em 0.3em 0.3em 0em ;
-fx-background-color: #263e48; -fx-background-color: #267a9e;
} }
.btnRight:hover { .btnRight:hover {
-fx-background-radius: 0em 0.3em 0.3em 0em ; -fx-background-radius: 0em 0.3em 0.3em 0em ;
@ -41,7 +41,7 @@
-fx-background-color: #1c2e35; -fx-background-color: #1c2e35;
} }
.btnSimple { .btnSimple {
-fx-background-color: #263e48; -fx-background-color: #267a9e;
} }
.btnSimple:hover { .btnSimple:hover {
-fx-background-color: #2c4954; -fx-background-color: #2c4954;
@ -51,7 +51,7 @@
} }
/* SplitMenuButton */ /* SplitMenuButton */
.splitMenuButton .arrow-button{ .splitMenuButton .arrow-button{
-fx-background-color: #263e48; -fx-background-color: #267a9e;
} }
.splitMenuButton .arrow-button:hover{ .splitMenuButton .arrow-button:hover{
-fx-background-color: #2c4954; -fx-background-color: #2c4954;
@ -63,7 +63,7 @@
-fx-background-color: #e1e1e1; -fx-background-color: #e1e1e1;
} }
.splitMenuButton .label{ .splitMenuButton .label{
-fx-background-color: #263e48; -fx-background-color: #267a9e;
} }
.splitMenuButton .label:hover{ .splitMenuButton .label:hover{
-fx-background-color: #2c4954; -fx-background-color: #2c4954;
@ -72,7 +72,7 @@
-fx-background-color: #1c2e35; -fx-background-color: #1c2e35;
} }
.splitMenuButton { .splitMenuButton {
-fx-background-color: #263e48; -fx-background-color: #267a9e;
} }
.splitMenuButton .menu-item .label{ .splitMenuButton .menu-item .label{
@ -86,5 +86,8 @@
/* END */ /* END */
.topToolBar{ .topToolBar{
-fx-background-color: #4f6f8f; /*-fx-background-color: #4f6f8f;*/
-fx-background-image: url(gjel.png);
-fx-background-position: center;
-fx-background-repeat: repeat;
} }