cvs diff: warning: failed to open /root/.cvspass for reading: No such file or directory
Index: NSPopUpButton.m
===================================================================
RCS file: /cvsroot/gnustep/gnustep/core/gui/Source/NSPopUpButton.m,v
retrieving revision 1.50
diff -u -r1.50 NSPopUpButton.m
--- NSPopUpButton.m	11 Apr 2003 10:35:36 -0000	1.50
+++ NSPopUpButton.m	12 Apr 2003 20:40:58 -0000
@@ -1,3 +1,4 @@
+
 /** <title>NSPopUpButton</title>
 
    <abstract>Popup list class</abstract>
@@ -338,6 +339,13 @@
   if ([self isEnabled] == NO)
     return;
 
+  // Beep, as on OS, and then return.
+  if ([[_cell menu] numberOfItems] == 0)
+    {
+      NSBeep();
+      return;
+    }
+
   // Attach the popUp
   [_cell attachPopUpWithFrame: _bounds
 	               inView: self];
@@ -422,6 +430,13 @@
 	    NSMenuView *menuView;
 	    NSNotificationCenter *nc = [NSNotificationCenter defaultCenter];
 
+            // Beep, as on OS, and then return.
+            if ([[_cell menu] numberOfItems] == 0)
+              {
+                NSBeep();
+                return;
+              }
+
 	    menuView = [[_cell menu] menuRepresentation];
 	    if ([[menuView window] isVisible] == NO)
 	      {
@@ -429,7 +444,6 @@
 		// Attach the popUp
 		[_cell attachPopUpWithFrame: _bounds
 		       inView: self];
-
 
 		selectedIndex = [self indexOfSelectedItem];
 		if (selectedIndex > -1)
