}
}
}
public static void registerType(int type, String newImage, String readImage){
ApplicationMessageFolderRegistry reg = ApplicationMessageFolderRegistry.getInstance();
ApplicationDescriptor appDescr = new ApplicationDescriptor(ApplicationDescriptor.currentApplicationDescriptor(),new String[]{});
// 2. Register message icons -------------------------------------------
newImage = newImage.length()==0?MessageListNamespace.getInstance().getDefaultNewImage():newImage;
readImage = readImage.length()==0?MessageListNamespace.getInstance().getDefaultReadImage():readImage;
ApplicationIcon newIcon = new ApplicationIcon(EncodedImage.getEncodedImageResource(newImage), true);
ApplicationIcon readIcon = new ApplicationIcon(EncodedImage.getEncodedImageResource(readImage), true);
reg.registerMessageIcon(type, CustomMessage.STATUS_NEW, newIcon);
reg.registerMessageIcon(type, CustomMessage.STATUS_OPENED, readIcon);
//3. Register message menu items --------------------------------------
reg.registerMessageMenuItems(type, CustomMessage.STATUS_NEW, _newGuiMenuItems, appDescr);
reg.registerMessageMenuItems(type, CustomMessage.STATUS_NEW, _newDaemonMenuItems, appDescr);
reg.registerMessageMenuItems(type, CustomMessage.STATUS_OPENED, _openedGuiMenuItems, appDescr);
reg.registerMessageMenuItems(type, CustomMessage.STATUS_OPENED, _markedUnreadMenuItems, appDescr);
reg.setBulkMarkOperationsSupport(type, CustomMessage.STATUS_NEW, true, false);
reg.setBulkMarkOperationsSupport(type, CustomMessage.STATUS_OPENED, false, true);
}