App/UI/Menus

From XOWA: the free, open-source, offline wiki application

XOWA provides a menu for the main window as well as a popup menu for the HTML browser.

  • The main menu can be activated by pressing and releasing Alt and then using the arrow keys (or the shortcuts)
  • The popup menu can be activated by right-clicking anywhere in the HTML area.

These menus can also be customized using the source at Options/Menus

Note that internationalization (translation by language) is only supported for German. Other languages can be supported, but translations are needed! See Help/Feedback.

Reordering items

To reorder buttons / groups, simply move the corresponding line / lines

For example, to move the about item

  • Cut line 7
  • Paste at line 3

Before:

1 add_grp_default('xowa.help') {
2  add_btn_default('xowa.help.help');
3  add_btn_default('xowa.help.change_log');
4  add_btn_default('xowa.help.diagnostics');
5  add_btn_default('xowa.help.context_menu');
6  add_spr();
7  add_btn_default('xowa.help.about');
8 }

After:

1 add_grp_default('xowa.help') {
2  add_btn_default('xowa.help.help');
3  add_btn_default('xowa.help.about');
4  add_btn_default('xowa.help.change_log');
5  add_btn_default('xowa.help.diagnostics');
6  add_btn_default('xowa.help.context_menu');
7  add_spr();
8 }

Removing buttons

To remove a button, remove the entire line.

For example, to remove the diagnostics item, remove the line add_btn_default('xowa.help.diagnostics');

Before:

1 add_grp_default('xowa.help') {
2  add_btn_default('xowa.help.help');
3  add_btn_default('xowa.help.change_log');
4  add_btn_default('xowa.help.diagnostics');
5  add_btn_default('xowa.help.context_menu');
6  add_spr();
7  add_btn_default('xowa.help.about');
8 }

After:

1 add_grp_default('xowa.help') {
2  add_btn_default('xowa.help.help');
3  add_btn_default('xowa.help.change_log');
4  add_btn_default('xowa.help.context_menu');
5  add_spr();
6  add_btn_default('xowa.help.about');
7 }

Removing groups

To remove a group, remove the entire group starting at the line with the { and ending at the line with the }.

For example, to remove the wikis group, remove lines 4 - 7.

Before:

1 add_grp_default('xowa.tools') {
2  add_btn_default('xowa.tools.options');
3  add_spr;
4  add_grp_default('xowa.tools.wikis') {
5    add_btn_default('xowa.tools.wikis.import_from_list');
6    add_btn_default('xowa.tools.wikis.import_from_script');
7  }
8 }

After:

1 add_grp_default('xowa.tools') {
2  add_btn_default('xowa.tools.options');
3  add_spr;
4 }

Modifying buttons

To modify a button, change the properties for the button.

For example, to change the properties of the diagnostics item, do the following:

Before:

1 add_grp_default('xowa.help') {
2  add_btn_default('xowa.help.help');
3  add_btn_default('xowa.help.change_log');
4  add_btn_default('xowa.help.diagnostics');
5  add_btn_default('xowa.help.context_menu');
6  add_spr();
7  add_btn_default('xowa.help.about');
8 }

After:

1 add_grp_default('xowa.help') {
 2  add_btn_default('xowa.help.help');
 3  add_btn_default('xowa.help.change_log');
 4  add_btn_default('xowa.help.diagnostics') {
 5    text      = 'Diagnostics for Scribunto';
 6    shortcut  = 's';
 7    img       = 'help/about.png';
 8    cmd       = 'app.api.nav.goto("home/wiki/Help:Diagnostics/Scribunto/All");';
 9  }
10  add_btn_default('xowa.help.context_menu');
11  add_spr();
12  add_btn_default('xowa.help.about');
13 }
  • To leave text, shortcut, img, or cmd unchanged, omit the line.
  • To leave an image or a shortcut blank, use ''


Modifying groups

To modify a group, change the properties for the group.

For example, to change the properties of the help item, do the following:

Before:

1 add_grp_default('xowa.help') {
2  add_btn_default('xowa.help.help');
3  add_btn_default('xowa.help.change_log');
4  add_btn_default('xowa.help.diagnostics');
5  add_btn_default('xowa.help.context_menu');
6  add_spr();
7  add_btn_default('xowa.help.about');
8 }

After:

1 add_grp_default('xowa.help') {
 2  text      = 'my help';
 3  shortcut  = 'y';
 4  img       = 'help/about.png';
 5  add_btn_default('xowa.help.help');
 6  add_btn_default('xowa.help.change_log');
 7  add_btn_default('xowa.help.diagnostics');
 8  add_btn_default('xowa.help.context_menu');
 9  add_spr();
10  add_btn_default('xowa.help.about');
11 }

Adding buttons

To add a button, add a new line for add_btn

For example, to add a new button to go to simplewiki/Earth, do the following:

add_btn('my_custom_namespace.my_custom_button_key', 'Goto Earth', 'e', 'help/about.png', 'app.api.nav.goto("simple.wikipedia.org/wiki/Earth");');
  • To leave an image or a shortcut blank, use ''

Adding groups

To add a group, add a new section for add_grp

For example, to add a new group called pages, do the following:

add_grp('my_custom_namespace.my_custom_group_key', 'Pages', 'p', 'help/about.png') {
}

Namespaces

XOWA

Getting started

Android

Help

Blog

Donate