Is it possible to change the help URL?

Clicking help on the top menu line (or keying Alt-H) brings up a window which only allows you to go the the OPV site.

Is it possible to tailor a) the pop-up window that currently contains the version number or and the one "Help Topics" link; b) the URL that "Help Topics" invokes?

Ahah - after a quick search through the source: b) the URL is set in the messages file as the message helpdialog.topics.link; a) the popup window is hard coded but it would be relatively easy to provide for extra buttons (say helpdialog.topic1.link thru helpdialog.topic9.link) with the code generating the buttons only if the message is present in the message file.

The code is something like the following replacement for lines 81-91 of HelpDialog.java: [warning my java is 10 years rusty]

  int n;
  for (n=0;n<10;n++) { // look for topic0 through topic9
      String t = "helpdialog.topic"+n;
      String l = t + ".link";
      if (!isNull(Messages.get(t))) { // if have this topic
          Button helpLink = ButtonFactory.create(t,"hyperlink");
          helpLink.setBackground(null); // want to inherit style of parent
          helpLink.addActionListener(new ActionListener() {
              public void onAction(ActionEvent e) {
                  String link = Messages.get(l);
                  ApplicationInstance.getActive().enqueueCommand(
                          new BrowserOpenWindowCommand(link, null, null));
                  close();
              }
          });
      } else { // topic n not there - skip check for higher numbers
          break;
      }
  }
 

The above also requires renaming the current help.topics and help.topics.link messages to help.topic0 and help.topic0.link

 

Regards, Tim

Comment viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.

Re: Is it possible to change the help URL?

Raised as OVPMS-1263

Syndicate content