@Override
  public void onClick(ClickEvent event) {
    event.preventDefault();
    event.stopPropagation();

    select();

    if (Gerrit.isSignedIn()) {
      // If the user is signed-in, remember this choice for future panels.
      //
      AccountGeneralPreferences pref = Gerrit.getUserAccount().getGeneralPreferences();
      pref.setDownloadCommand(cmdType);
      com.google.gerrit.client.account.Util.ACCOUNT_SVC.changePreferences(
          pref,
          new AsyncCallback<VoidResult>() {
            @Override
            public void onFailure(Throwable caught) {}

            @Override
            public void onSuccess(VoidResult result) {}
          });
    }
  }
 public static AccountGeneralPreferences createDefault() {
   AccountGeneralPreferences p = new AccountGeneralPreferences();
   p.resetToDefaults();
   return p;
 }