Beispiel #1
0
 public void addChatMenuItems(MenuModel model) {
   if (isOnline() && !(this instanceof XmppServiceContact)) {
     if (Options.getBoolean(Options.OPTION_ALARM)) {
       model.addItem("wake", USER_MENU_WAKE);
     }
   }
 }
Beispiel #2
0
  @Override
  public void initManageContactMenu(Protocol protocol, MenuModel menu) {
    if (protocol.isConnected()) {
      if (isOnline()) {
        menu.addItem("adhoc", USER_MENU_ADHOC);
      }
      if (isTemp()) {
        menu.addItem("add_user", USER_MENU_ADD_USER);

      } else {
        if (protocol.getGroupItems().size() > 1) {
          menu.addItem("move_to_group", USER_MENU_MOVE);
        }
        if (!isAuth()) {
          menu.addItem("requauth", USER_MENU_REQU_AUTH);
        }
      }
      if (!isTemp()) {
        menu.addItem("rename", USER_MENU_RENAME);
      }
    }
    if (protocol.isConnected() || (isTemp() && protocol.hasContact(this))) {
      menu.addSeparator();
      if (protocol.isConnected()) {
        menu.addItem("remove_me", USER_MENU_REMOVE_ME);
      }
      if (protocol.hasContact(this)) {
        menu.addItem("remove", USER_MENU_USER_REMOVE);
      }
    }
  }
Beispiel #3
0
  @Override
  public void initContextMenu(Protocol protocol, MenuModel contactMenu) {
    addChatItems(contactMenu);

    if (0 < subContacts.size()) {
      contactMenu.addItem("list_of_connections", USER_MENU_CONNECTIONS);
    }
    addGeneralItems(protocol, contactMenu);
  }