Пример #1
0
void HttpInput::icy_parse(const FXString & str) {
  FXString title = str.after('=').before(';');
  if (title.length()) {
    MetaInfo* meta = new MetaInfo();
    meta->title = title;
    input->post(meta);
    }
  }
Пример #2
0
FXbool AliasDialog::commandExist(const FXString &command)
{
    StringIt it;
    for(it=m_aliases.begin(); it!=m_aliases.end(); it++)
    {
        if(!comparecase((*it).first, command)) return TRUE;
    }
    if(utils::instance().isCommand(command[0]=='/' ? command.after('/') : command)) return TRUE;
    return FALSE;
}
Пример #3
0
FXString
MFXUtils::getFilename2Write(FXWindow *parent,
                            const FXString &header, const FXString &extension,
                            FXIcon *icon, FXString &currentFolder) throw() {
    // get the new file name
    FXFileDialog opendialog(parent, header);
    opendialog.setIcon(icon);
    opendialog.setSelectMode(SELECTFILE_ANY);
    opendialog.setPatternList("*" + extension);
    if (currentFolder.length()!=0) {
        opendialog.setDirectory(currentFolder);
    }
    if (!opendialog.execute()) {
        return "";
    }
    FXString file = assureExtension(opendialog.getFilename(), extension.after('.')).text();
    if (!userPermitsOverwritingWhenFileExists(parent, file)) {
        return "";
    }
    currentFolder = opendialog.getDirectory();
    return file;
}