[gnumeric] GUI: Fix grab issue.
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gnumeric] GUI: Fix grab issue.
- Date: Fri, 4 Sep 2009 13:28:00 +0000 (UTC)
commit 897f7be3220347e0adb78108ca21accf2dbb88ea
Author: Morten Welinder <terra gnome org>
Date: Fri Sep 4 09:23:58 2009 -0400
GUI: Fix grab issue.
ChangeLog | 5 +++
NEWS | 1 +
src/item-bar.c | 95 ++++++++++++++++++++++++++++---------------------------
3 files changed, 54 insertions(+), 47 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 719b3cd..00c51d5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -4,6 +4,11 @@
* configure.in (libgoffice): Require 0.7.12 for GPS_* change.
+2009-09-04 Morten Welinder <terra gnome org>
+
+ * src/item-bar.c (item_bar_button_pressed): Don't grab after
+ context menu. Fixes Debian 544975.
+
2009-09-03 Jean Brefort <jean brefort normalesup org>
* src/item-edit.c (item_edit_draw): make item edit use the same font size
diff --git a/NEWS b/NEWS
index 67266c1..4e703bc 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ Jean:
Morten:
* Fix menu sensitivity problem. [#593624]
* Simplify GnmColor.
+ * Fix grab problem. [Debian #544975]
--------------------------------------------------------------------------
Gnumeric 1.9.11
diff --git a/src/item-bar.c b/src/item-bar.c
index c54d767..00b5e9d 100644
--- a/src/item-bar.c
+++ b/src/item-bar.c
@@ -857,55 +857,56 @@ item_bar_button_pressed (GocItem *item, int button, double x_, double y_)
if (button == 3) {
if (wbc_gtk_get_guru (wbcg) != NULL)
return TRUE;
- /* If the selection does not contain the current row/col
- * then clear the selection and add it.
- */
- if (!sv_is_colrow_selected (sc_view (sc), element, is_cols))
- scg_colrow_select (scg, is_cols,
- element, event->state);
-
- scg_context_menu (scg, event, is_cols, !is_cols);
- } else if (cri != NULL) {
- /*
- * Record the important bits.
- *
- * By setting colrow_being_resized to a non -1 value,
- * we know that we are being resized (used in the
- * other event handlers).
- */
- ib->colrow_being_resized = element;
- ib->resize_start_pos = (is_cols && sheet->text_is_rtl)
- ? start : (start - cri->size_pixels);
- ib->colrow_resize_size = cri->size_pixels;
-
- if (ib->tip == NULL) {
- GtkWidget *cw = GTK_WIDGET (canvas);
- int wx, wy;
- ib->tip = gnumeric_create_tooltip (cw);
- colrow_tip_setlabel (ib, is_cols, ib->colrow_resize_size);
- /* Position above the current point for both
- * col and row headers. trying to put it
- * beside for row headers often ends up pushing
- * the tip under the cursor which can have odd
- * effects on the event stream. win32 was
- * different from X. */
-
- gnm_canvas_get_position (canvas, &wx, &wy,x, y);
- gnumeric_position_tooltip (ib->tip,
- wx, wy, TRUE);
- gtk_widget_show_all (gtk_widget_get_toplevel (ib->tip));
- }
- } else {
- if (wbc_gtk_get_guru (wbcg) != NULL &&
- !wbcg_entry_has_logical (wbcg))
- return TRUE;
+ /* If the selection does not contain the current row/col
+ * then clear the selection and add it.
+ */
+ if (!sv_is_colrow_selected (sc_view (sc), element, is_cols))
+ scg_colrow_select (scg, is_cols,
+ element, event->state);
+
+ scg_context_menu (scg, event, is_cols, !is_cols);
+ return TRUE;
+ } else if (cri != NULL) {
+ /*
+ * Record the important bits.
+ *
+ * By setting colrow_being_resized to a non -1 value,
+ * we know that we are being resized (used in the
+ * other event handlers).
+ */
+ ib->colrow_being_resized = element;
+ ib->resize_start_pos = (is_cols && sheet->text_is_rtl)
+ ? start : (start - cri->size_pixels);
+ ib->colrow_resize_size = cri->size_pixels;
+
+ if (ib->tip == NULL) {
+ GtkWidget *cw = GTK_WIDGET (canvas);
+ int wx, wy;
+ ib->tip = gnumeric_create_tooltip (cw);
+ colrow_tip_setlabel (ib, is_cols, ib->colrow_resize_size);
+ /* Position above the current point for both
+ * col and row headers. trying to put it
+ * beside for row headers often ends up pushing
+ * the tip under the cursor which can have odd
+ * effects on the event stream. win32 was
+ * different from X. */
+
+ gnm_canvas_get_position (canvas, &wx, &wy,x, y);
+ gnumeric_position_tooltip (ib->tip,
+ wx, wy, TRUE);
+ gtk_widget_show_all (gtk_widget_get_toplevel (ib->tip));
+ }
+ } else {
+ if (wbc_gtk_get_guru (wbcg) != NULL &&
+ !wbcg_entry_has_logical (wbcg))
+ return TRUE;
- /* If we're editing it is possible for this to fail */
- if (!scg_colrow_select (scg, is_cols, element, event->state))
- return TRUE;
+ /* If we're editing it is possible for this to fail */
+ if (!scg_colrow_select (scg, is_cols, element, event->state))
+ return TRUE;
- ib->start_selection = element;
- gnm_pane_slide_init (pane);
+ ib->start_selection = element;
+ gnm_pane_slide_init (pane);
}
gnm_simple_canvas_grab (item,
GDK_POINTER_MOTION_MASK | GDK_BUTTON_RELEASE_MASK,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]