Script extensions.scm
Jump to navigation
Jump to search
;; Copyright 1997, 1998, 1999, 2002 Free Software Foundation, Inc. ;; Copyright 2006 Paul Emsley, The University of York ;; ;; This program is free software; you can redistribute it and/or ;; modify it under the terms of the GNU General Public License as ;; published by the Free Software Foundation; either version 2 of ;; the License, or (at your option) any later version. ;; ;; This program is distributed in the hope that it will be useful, but ;; WITHOUT ANY WARRANTY; without even the implied warranty of ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ;; General Public License for more details. ;; ;; You should have received a copy of the GNU General Public ;; License along with this program; if not, write to the Free Software ;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA (let ((menubar (coot-main-menubar)) (menu (gtk-menu-new)) (menuitem (gtk-menu-item-new-with-label "Extensions"))) (gtk-menu-item-set-submenu menuitem menu) (gtk-menu-bar-append menubar menuitem) ; sub menu (let ((submenu (gtk-menu-new)) (menuitem2 (gtk-menu-item-new-with-label "Read latest files"))) ; this makes an "arrowed" sub-menu, which is not what we want here ; (gtk-menu-item-set-submenu menuitem2 submenu) (gtk-menu-append menu menuitem2) (gtk-widget-show menuitem2) (gtk-signal-connect menuitem2 "activate" (lambda () (load-latest-files)))) ; finally, show it (gtk-widget-show menuitem))