gui: Redo var sheet, data sheet, text import with PsppSheetView.
[pspp] / src / ui / gui / psppire-cell-renderer-button.c
index 88de4bc655459b02286c93336bf80c10c232edd0..8bf90a24c68d19997bc8d29bc9900f5420fb8db3 100644 (file)
@@ -370,6 +370,16 @@ psppire_cell_renderer_button_press_event (GtkButton      *button,
 {
   PsppireCellRendererButton *cell_button = data;
 
+  if (event->button == 3)
+    {
+      /* Allow right-click events to propagate upward in the widget hierarchy.
+         Otherwise right-click menus, that trigger on a button-press-event on
+         the containing PsppSheetView, will pop up if the button is rendered as
+         a facade but not if the button widget exists.  */
+      g_signal_stop_emission_by_name (button, "button-press-event");
+      return FALSE;
+    }
+
   if (cell_button->click_time != 0)
     {
       GdkScreen *screen = gtk_widget_get_screen (GTK_WIDGET (button));