From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26791 invoked by alias); 13 Jun 2002 00:06:30 -0000 Mailing-List: contact insight-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: insight-owner@sources.redhat.com Received: (qmail 26784 invoked from network); 13 Jun 2002 00:06:30 -0000 Received: from unknown (HELO cygnus.com) (205.180.83.203) by sources.redhat.com with SMTP; 13 Jun 2002 00:06:30 -0000 Received: from makita.cygnus.com (makita.sfbay.redhat.com [192.168.30.83]) by runyon.cygnus.com (8.8.7-cygnus/8.8.7) with ESMTP id RAA11090 for ; Wed, 12 Jun 2002 17:06:29 -0700 (PDT) Received: from localhost (keiths@localhost) by makita.cygnus.com (8.8.8+Sun/8.6.4) with ESMTP id RAA10432 for ; Wed, 12 Jun 2002 17:06:29 -0700 (PDT) X-Authentication-Warning: makita.cygnus.com: keiths owned process doing -bs Date: Wed, 12 Jun 2002 17:06:00 -0000 From: Keith Seitz X-X-Sender: To: Insight Maling List Subject: [PATCH] Add cascade menu to gdbmenubar Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-SW-Source: 2002-q2/txt/msg00127.txt.bz2 This has gone missing for too long. Despite the comments in menubar_new_menu, the "menubutton" option to GDBMenuBar::add does NOT add a cascading menu. It simply adds a new pull-down menu to the main menu bar. This patch adds a "real" cascading menu item to the current menu. Keith ChangeLog 2002-06-12 Keith Seitz * library/gdbmenubar.itcl (add): Add new "cascade" type. (menubar_add_cascade): New method to build cascading menus. Patch Index: library/gdbmenubar.itcl =================================================================== RCS file: /cvs/src/src/gdb/gdbtk/library/gdbmenubar.itcl,v retrieving revision 1.8 diff -p -r1.8 gdbmenubar.itcl *** library/gdbmenubar.itcl 3 Aug 2001 18:46:41 -0000 1.8 --- library/gdbmenubar.itcl 13 Jun 2002 00:04:25 -0000 *************** class GDBMenuBar { *** 118,123 **** --- 118,126 ---- separator { menubar_add_menu_separator } + cascade { + eval menubar_add_cascade $args + } default { error "Invalid item type: $type" } *************** class GDBMenuBar { *** 127,134 **** } # ------------------------------------------------------------------ ! # PRIVATE METHOD: menubar_new_menu - Add a new cascade menu to the ! # main menu. # Also target this menu for subsequent # menubar_add_menu_command calls. # --- 130,153 ---- } # ------------------------------------------------------------------ ! # NAME: private method GDBMenuBar::menubar_add_cascade ! # DESCRIPTION: Create a new cascading menu in the current menu ! # ! # ARGUMENTS: menu_name - the name of the menu to be created ! # label - label to be displayed for the menu ! # underline - which element to underline for shortcuts ! # RETURNS: Nothing ! # ------------------------------------------------------------------ ! private method menubar_add_cascade {menu_name label underline} { ! set m [menu $current_menu.$menu_name -tearoff false] ! $current_menu add cascade -menu $m -label $label \ ! -underline $underline ! set current_menu $m ! } ! ! # ------------------------------------------------------------------ ! # PRIVATE METHOD: menubar_new_menu - Add a new menu to the main ! # menu. # Also target this menu for subsequent # menubar_add_menu_command calls. #