Commit f0294adb authored by Andreas J. Guelzow's avatar Andreas J. Guelzow

2002-10-10 Andreas J. Guelzow

	http://bugzilla.gnome.org/show_bug.cgi?id=95333
	* src/item-grid.c (item_grid_button_press): do not start editing if
	  the second half of a double click is in a different cell.
parent 23fe8bc1
2002-10-10 Andreas J. Guelzow
http://bugzilla.gnome.org/show_bug.cgi?id=95333
* src/item-grid.c (item_grid_button_press): do not start editing if
the second half of a double click is in a different cell.
2002-10-09 Morten Welinder <terra@diku.dk>
* src/gnumeric-graph.c (struct _GnmGraphVector): Avoid "gboolean
......
......@@ -4,6 +4,7 @@ Andreas:
* Add XHTML exporter
* Fix minor bug in the sort dialog
* Fix leak
* Fix 95333
Chris Benedict:
* Do not allow all sheets in a workbook to be deleted.
......
2002-10-10 Andreas J. Guelzow
http://bugzilla.gnome.org/show_bug.cgi?id=95333
* src/item-grid.c (item_grid_button_press): do not start editing if
the second half of a double click is in a different cell.
2002-10-09 Morten Welinder <terra@diku.dk>
* src/gnumeric-graph.c (struct _GnmGraphVector): Avoid "gboolean
......
2002-10-10 Andreas J. Guelzow
http://bugzilla.gnome.org/show_bug.cgi?id=95333
* src/item-grid.c (item_grid_button_press): do not start editing if
the second half of a double click is in a different cell.
2002-10-09 Morten Welinder <terra@diku.dk>
* src/gnumeric-graph.c (struct _GnmGraphVector): Avoid "gboolean
......
......@@ -866,6 +866,7 @@ item_grid_button_press (ItemGrid *ig, GdkEventButton *event)
Sheet *sheet = sc->sheet;
CellPos pos;
int x, y;
gboolean already_selected;
gnm_canvas_slide_stop (gcanvas);
......@@ -934,7 +935,8 @@ item_grid_button_press (ItemGrid *ig, GdkEventButton *event)
/* button 1 will always change the selection, the other buttons will
* only effect things if the target is not already selected.
*/
if (event->button == 1 || !sv_is_pos_selected (sc->view, pos.col, pos.row)) {
already_selected = sv_is_pos_selected (sc->view, pos.col, pos.row);
if (event->button == 1 || !already_selected) {
if (!(event->state & (GDK_CONTROL_MASK|GDK_SHIFT_MASK)))
sv_selection_reset (sc->view);
......@@ -950,13 +952,23 @@ item_grid_button_press (ItemGrid *ig, GdkEventButton *event)
switch (event->button) {
case 1: {
guint32 double_click_time;
g_object_get (gtk_widget_get_settings (GTK_WIDGET (canvas)),
"gtk-double-click-time", &double_click_time,
NULL);
if ((ig->last_click_time + double_click_time) > event->time &&
wbcg_edit_start (scg->wbcg, FALSE, FALSE))
break;
/*
* If the second click is on a different cell than the
* first one this can not be a double-click
*/
if (already_selected) {
g_object_get (gtk_widget_get_settings
(GTK_WIDGET (canvas)),
"gtk-double-click-time",
&double_click_time,
NULL);
if ((ig->last_click_time + double_click_time)
> event->time &&
wbcg_edit_start (scg->wbcg, FALSE, FALSE))
break;
}
ig->last_click_time = event->time;
ig->selecting = ITEM_GRID_SELECTING_CELL_RANGE;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment