git://git.nikiroo.be
/
fanfix.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
changelog
[fanfix.git]
/
src
/
be
/
nikiroo
/
fanfix
/
reader
/
tui
/
TuiReaderApplication.java
diff --git
a/src/be/nikiroo/fanfix/reader/tui/TuiReaderApplication.java
b/src/be/nikiroo/fanfix/reader/tui/TuiReaderApplication.java
index d8c93976754c0fea984e242dc76da0955dcbb299..f85f12fdb865ec1aaa25540a5cf131d6c6b0e910 100644
(file)
--- a/
src/be/nikiroo/fanfix/reader/tui/TuiReaderApplication.java
+++ b/
src/be/nikiroo/fanfix/reader/tui/TuiReaderApplication.java
@@
-44,6
+44,10
@@
class TuiReaderApplication extends TApplication implements Reader {
public static final int MENU_FILE_DELETE = 1029;
public static final int MENU_FILE_LIBRARY = 1030;
public static final int MENU_FILE_EXIT = 1031;
public static final int MENU_FILE_DELETE = 1029;
public static final int MENU_FILE_LIBRARY = 1030;
public static final int MENU_FILE_EXIT = 1031;
+ //
+ public static final int MENU_OPT_FANFIX = 1032;
+ public static final int MENU_OPT_TUI = 1033;
+
public static final TCommand CMD_EXIT = new TCommand(MENU_FILE_EXIT) {
};
public static final TCommand CMD_EXIT = new TCommand(MENU_FILE_EXIT) {
};
@@
-116,7
+120,7
@@
class TuiReaderApplication extends TApplication implements Reader {
try {
reader.browse(source);
} catch (IOException e) {
try {
reader.browse(source);
} catch (IOException e) {
- Instance.getTraceHandler().error(e);
+ Instance.get
Instance().get
TraceHandler().error(e);
}
}
}
}
@@
-215,7
+219,7
@@
class TuiReaderApplication extends TApplication implements Reader {
this.reader = reader;
// TODO: traces/errors?
this.reader = reader;
// TODO: traces/errors?
- Instance.setTraceHandler(null);
+ Instance.
getInstance().
setTraceHandler(null);
// Add the menus TODO: i18n
TMenu fileMenu = addMenu("&File");
// Add the menus TODO: i18n
TMenu fileMenu = addMenu("&File");
@@
-230,9
+234,14
@@
class TuiReaderApplication extends TApplication implements Reader {
fileMenu.addItem(MENU_FILE_LIBRARY, "Lib&rary");
fileMenu.addSeparator();
fileMenu.addItem(MENU_FILE_EXIT, "E&xit");
fileMenu.addItem(MENU_FILE_LIBRARY, "Lib&rary");
fileMenu.addSeparator();
fileMenu.addItem(MENU_FILE_EXIT, "E&xit");
+
+ TMenu OptionsMenu = addMenu("&Options");
+ OptionsMenu.addItem(MENU_OPT_FANFIX, "&Fanfix Configuration");
+ OptionsMenu.addItem(MENU_OPT_TUI, "&UI Configuration");
setStatusBar(fileMenu, "File-management "
+ "commands (Open, Save, Print, etc.)");
setStatusBar(fileMenu, "File-management "
+ "commands (Open, Save, Print, etc.)");
+
// TODO: Edit: re-download, delete
// TODO: Edit: re-download, delete
@@
-348,6
+357,15
@@
class TuiReaderApplication extends TApplication implements Reader {
case MENU_FILE_LIBRARY:
showMain();
return true;
case MENU_FILE_LIBRARY:
showMain();
return true;
+
+ case MENU_OPT_FANFIX:
+ new TuiReaderOptionWindow(this, false).maximize();
+ return true;
+
+ case MENU_OPT_TUI:
+ new TuiReaderOptionWindow(this, true).maximize();
+ return true;
+
}
return super.onMenu(menu);
}
return super.onMenu(menu);
@@
-405,9
+423,9
@@
class TuiReaderApplication extends TApplication implements Reader {
* the exception to log if any (can be NULL)
*/
private void error(String message, String title, Exception e) {
* the exception to log if any (can be NULL)
*/
private void error(String message, String title, Exception e) {
- Instance.getTraceHandler().error(title + ": " + message);
+ Instance.get
Instance().get
TraceHandler().error(title + ": " + message);
if (e != null) {
if (e != null) {
- Instance.getTraceHandler().error(e);
+ Instance.get
Instance().get
TraceHandler().error(e);
}
if (e != null) {
}
if (e != null) {