psppire-cell-renderer: Fix behavior of repeated clicks on a button. 20120911031925/pspp 20120912031918/pspp 20120913031857/pspp 20120914031922/pspp 20120915031925/pspp 20120921032038/pspp 20120922031949/pspp 20120923031953/pspp 20120924032009/pspp 20120927032112/pspp 20120928032019/pspp 20120929032021/pspp 20120930032025/pspp
authorBen Pfaff <blp@cs.stanford.edu>
Mon, 3 Sep 2012 05:21:09 +0000 (22:21 -0700)
committerBen Pfaff <blp@cs.stanford.edu>
Mon, 3 Sep 2012 05:21:09 +0000 (22:21 -0700)
I'm not sure why I thought this code was necessary.  Removing it
fixes the problem, which John Darrington reported as:

1. Create or load a dataset with one or more variables.
2. Switch to the variable sheet.
3. Click on one of the in-cell buttons (for example) Value Labels.
4. After the dialog box appears, cancel it with the cancel button.
5. The dialog closes, and the button which invoked it, now has the
focus.  However clicking on that button again refuses to bring the
dialog back.  One has to move off the button and onto the cell
background.

src/ui/gui/psppire-cell-renderer-button.c

index 978908e01f6fd8ced6da4095710399bbed448556..8b9e9076dcd3f61abe9806e3263f309fe5af78cd 100644 (file)
@@ -292,25 +292,6 @@ psppire_cell_renderer_button_clicked (GtkButton *button,
   g_free (path);
 }
 
-static gboolean
-psppire_cell_renderer_button_focus_out_event (GtkWidget *widget,
-                                              GdkEvent  *event,
-                                              gpointer   data)
-{
-  PsppireCellRendererButton *cell_button = data;
-
-  g_signal_handlers_disconnect_by_func (widget,
-                                        psppire_cell_renderer_button_focus_out_event,
-                                        data);
-  g_signal_handlers_disconnect_by_func (widget,
-                                        psppire_cell_renderer_button_clicked,
-                                        data);
-
-  gtk_cell_renderer_stop_editing (GTK_CELL_RENDERER (cell_button), FALSE);
-
-  return FALSE;
-}
-
 #define IDLE_ID_STRING "psppire-cell-renderer-button-idle-id"
 
 static gboolean
@@ -419,9 +400,6 @@ psppire_cell_renderer_button_start_editing (GtkCellRenderer      *cell,
                                       "slash", cell_button->slash,
                                       NULL);
 
-  g_signal_connect (G_OBJECT (cell_button->button), "focus-out-event",
-                    G_CALLBACK (psppire_cell_renderer_button_focus_out_event),
-                    cell);
   g_signal_connect (G_OBJECT (cell_button->button), "clicked",
                     G_CALLBACK (psppire_cell_renderer_button_clicked),
                     cell);