Ejemplo n.º 1
0
/**
 * Set the entire set of method attributes with one call.  Used
 * during source compilation.
 *
 * @param _access   The access setting.
 * @param _protected The protected setting.
 * @param _guarded   The guarded setting.
 */
void MethodClass::setAttributes(AccessFlag _access, ProtectedFlag _protected, GuardFlag _guarded)
{
    switch (_access)
    {
        case PRIVATE_SCOPE:
            setPrivate();
            break;

        case PACKAGE_SCOPE:
            setPackageScope();
            break;

        // covers PUBLIC and DEFAULT
        default:
            break;
    }

    if (_protected == PROTECTED_METHOD)
    {
        setProtected();
    }

    // both GUARDED and DEFAULT are guarded, so check for the reverse.
    if (_guarded == UNGUARDED_METHOD)
    {
        setUnguarded();
    }
}
Ejemplo n.º 2
0
/* vzmdest.cpp and vzmlocal.cpp */
int VEObj::init_empty()
{
	if (!priv)
		setPrivate(vzcnf->priv_orig);
	if (!root)
		setRoot(vzcnf->root_orig);

	if (priv == NULL && root == NULL)
		return putErr(MIG_ERR_SYSTEM, MIG_MSG_SYSTEM);

	return 0;
}
Ejemplo n.º 3
0
int irc_recv_mode(void *data)
{
    struct irc_msgdata *msgdata = (struct irc_msgdata *) data;
    char *params[3];
    int pnum;
    char *target, *mode_str, *param;
    int mode = msgdata->clientdata->chanmode;

    params[2] = NULL;

    struct ircflag chan_flags[] =
    {
        {'p', chan_priv},
        {'s', chan_secret},
        {'i', chan_invite},
        {'t', chan_topiclock},
        {'n', chan_nooutside},
        {'m', chan_moderated},
        IRCFLAGS_END
    };

    pnum = irc_parse_paramlist(msgdata->msg, params, 3);

    target = params[0];
    mode_str = params[1];
    param = params[2] ? params[2] : "";

    if (pnum >= 2 && (target[0] == '#' || target[0] == '&') &&
            strncmp(target, msgdata->clientdata->chan, MAX_CHAN_LEN) == 0)
    {
        irc_flagparse(mode_str, &mode, chan_flags);

        setTopicProtect(mode & chan_topiclock, TRUE);
        setExternMsg(mode & chan_nooutside, TRUE);
        setSecret(mode & chan_secret, TRUE);
        setGuests(mode & chan_invite, TRUE);
        setPrivate(mode & chan_priv, TRUE);
        setModerated(mode & chan_moderated, TRUE);

        messageText("Channel mode modified: %s %s", mode_str, param);

        msgdata->clientdata->chanmode = mode;
    }
    else
    {
        messageText("User %s modified its mode: %s %s", target, mode_str, param);
    }

    return OK;
}
Ejemplo n.º 4
0
/**
 * Set the entire set of method attributes with one call.  Used
 * during source compilation.
 *
 * @param _private   The private setting.
 * @param _protected The protected setting.
 * @param _guarded   The guarded setting.
 */
void MethodClass::setAttributes(bool _private, bool _protected, bool _guarded)
{
    if (_private)
    {
        setPrivate();
    }
    if (_protected)
    {
        setProtected();
    }
    // guarded is the default, so we need to reverse this
    if (!_guarded)
    {
        setUnguarded();
    }
}
Ejemplo n.º 5
0
LocationBar::LocationBar(QWidget *parent)
    : LineEdit(parent)
    , m_webView(0)
    , m_siteIcon(0)
    , m_privacyIndicator(0)
{
    // Urls are always LeftToRight
    setLayoutDirection(Qt::LeftToRight);

    setUpdatesEnabled(false);
    // site icon on the left
    m_siteIcon = new LocationBarSiteIcon(this);
    addWidget(m_siteIcon, LeftSide);

    // privacy indicator at rightmost position
    m_privacyIndicator = new QLabel(this);
    m_privacyIndicator->setPixmap(QPixmap(QLatin1String(":private.png")));
    addWidget(m_privacyIndicator, RightSide);
    connect(BrowserApplication::instance(), SIGNAL(privacyChanged(bool)),
            this, SLOT(setPrivate(bool)));
    setPrivate(BrowserApplication::isPrivate());

    // clear button on the right
    ClearButton *m_clearButton = new ClearButton(this);
    connect(m_clearButton, SIGNAL(clicked()),
            this, SLOT(clear()));
    connect(this, SIGNAL(textChanged(const QString&)),
            m_clearButton, SLOT(textChanged(const QString&)));
    addWidget(m_clearButton, RightSide);
    m_clearButton->hide();
    updateTextMargins();
    setUpdatesEnabled(true);

    m_defaultBaseColor = palette().color(QPalette::Base);

    QPalette p = palette();
    p.setColor(QPalette::Base, QColor(255, 255, 255, 100));
    setPalette(p);
}
Ejemplo n.º 6
0
/**
 * Flag the method as being private from Rexx code.
 *
 * @return No return value.
 */
RexxObject *MethodClass::setPrivateRexx()
{
    setPrivate();
    return OREF_NULL;
}