--- gcalctool-4.3.51-orig/gcalctool/gtk.c	2004-02-27 14:15:01.000000000 -0800
+++ gcalctool-4.3.51/gcalctool/gtk.c	2005-03-22 13:26:57.648053000 -0800
@@ -1593,20 +1593,22 @@
 
 /*ARGSUSED*/
 static void 
-menu_button_button_press_cb(GtkWidget *widget, 
-                            GdkEventButton *event, gpointer data)
+menu_button_button_press_cb(GtkButton *widget, gpointer data)
 {
     struct button *n;
     GtkWidget *menu;
-
-    if (event->button != 1) {
-        return;
-    }
+    GdkEventButton *event = (GdkEventButton *) gtk_get_current_event();
 
     n = (struct button *) g_object_get_data(G_OBJECT(widget), "button");
     menu = create_menu(n->mtype, n);
-    gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
-                   event->button, event->time);
+
+    if (event == NULL) {
+        gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
+                       1, gtk_get_current_event_time());
+    } else if (event->button == 1) {
+        gtk_menu_popup(GTK_MENU(menu), NULL, NULL, NULL, NULL,
+                       event->button, event->time);
+    }
 }
 
 
@@ -1659,7 +1661,7 @@
     gtk_container_add(GTK_CONTAINER(button), hbox);
  
     gtk_widget_set_events(button, GDK_BUTTON_PRESS_MASK);
-    g_signal_connect(G_OBJECT(button), "button-press-event",
+    g_signal_connect(G_OBJECT(button), "clicked",
                      G_CALLBACK(menu_button_button_press_cb), (gpointer) n);
     g_signal_connect(G_OBJECT(button), "key-press-event",
                      G_CALLBACK(menu_button_key_press_cb), (gpointer) n);