view oldXMenu/SetSel.c @ 107378:904ccd8f2acb

Reorganize Custom groups. * cus-edit.el (processes): Remove from development group. (oop, hypermedia): Delete group. (net): New group. * url/url-vars.el (url): * net/browse-url.el (browse-url): * net/xesam.el (xesam): * net/tramp.el (tramp): * net/goto-addr.el (goto-address): * net/ange-ftp.el (ange-ftp): Put in net group. * view.el (view): Remove from editing group. * uniquify.el (uniquify): Put in files group. * net/browse-url.el (browse-url): * ps-print.el (postscript): Put in external group. * cus-edit.el (outlines): * textmodes/text-mode.el (text-mode-hook): * textmodes/table.el (table): * textmodes/picture.el (picture): * outline.el (outlines): Put in wp group. * nxml/nxml-mode.el (nxml): Remove from wp group. * net/tramp-imap.el (tramp-imap): Put in tramp group. * mail/metamail.el (metamail): Remove from hypermedia group. * cus-edit.el (abbrev): * whitespace.el (whitespace): * vcursor.el (vcursor): * reveal.el (reveal): * hl-line.el (hl-line): Put in convenience group. * epg-config.el (epg): Put in data group. * emulation/pc-select.el (pc-select): Put in emulations group. * calculator.el (calculator): Put in applications group. * org/org.el (org): Remove from hypermedia group.
author Chong Yidong <cyd@stupidchicken.com>
date Fri, 12 Mar 2010 12:47:22 -0500
parents fec5e03aaf59
children edf631bdbb7a ec58e5c426ef 5cc91198ffb2
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(menu, p_num, s_num, active)
    register XMenu *menu;	/* Menu object to be modified. */
    register int p_num;		/* Pane number to be modified. */
    register int s_num;		/* Selection number to modified. */
    int active;			/* 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) */