view oldXMenu/SetSel.c @ 110428:6060b86fc551

Merge changes made in Gnus trunk. nnimap.el (nnimap-finish-retrieve-group-infos): Return data in the nntp buffer so the agent can save it. nnimap.el (nnimap-open-shell-stream): Bind `process-connection-type' to nil, so that CRLF doesn't get translated to \n; (nnimap-open-connection): Don't make 'shell commands only send \n. nnimap.el (nnimap-request-group): Don't make `M-g' bug out on group with no marks. gnus-agent.el (gnus-agent-load-alist): Nix out the alist if the file doesn't exist. nnimap.el (nnimap-finish-retrieve-group-infos): Protect against groups that have no articles. nnimap.el (nnimap-request-article): Check that we really got an article when we requested one. gnus-html.el (gnus-html-schedule-image-fetching): Ignore all errors from url-retrieve, for instance about invalid URLs. gnus-agent.el: Change default of gnus-agent-auto-agentize-methods to nil.
author Katsumi Yamaoka <yamaoka@jpl.org>
date Sun, 19 Sep 2010 10:45:51 +0000
parents 5cc91198ffb2
children ef719132ddfa
line wrap: on
line source

/* Copyright    Massachusetts Institute of Technology    1985	*/

#include "copyright.h"


/*
 * XMenu:	MIT Project Athena, X Window system menu package
 *
 *	XMenuSetSelection - Set a menu selection to be active or inactive.
 *
 *	Author:		Tony Della Fera, DEC
 *			August, 1985
 *
 */

#include "XMenuInt.h"

int
XMenuSetSelection(register XMenu *menu, register int p_num, register int s_num, int active)
                         	/* Menu object to be modified. */
                       		/* Pane number to be modified. */
                       		/* Selection number to modified. */
               			/* Make selection active? */
{
    register XMPane *p_ptr;	/* XMPane pointer. */
    register XMSelect *s_ptr;	/* XMSelect pointer. */

    /*
     * Find the right pane.
     */
    p_ptr = _XMGetPanePtr(menu, p_num);
    if (p_ptr == NULL) return(XM_FAILURE);

    /*
     * Find the right selection.
     */
    s_ptr = _XMGetSelectionPtr(p_ptr, s_num);
    if (s_ptr == NULL) return(XM_FAILURE);

    /*
     * Set its active switch.
     */
    s_ptr->active = active;

    /*
     * Return the selection number just set.
     */
    _XMErrorCode = XME_NO_ERROR;
    return(s_num);
}

/* arch-tag: 79198ae0-c5a4-4d31-adb0-5747f833f56a
   (do not change this comment) */