After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 65894 - expr-entry-widget
expr-entry-widget
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: GUI
git master
Other All
: Normal minor
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2001-12-01 06:51 UTC by Andreas J. Guelzow
Modified: 2004-12-22 21:47 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Andreas J. Guelzow 2001-12-01 06:51:07 UTC
open gnumeric
select correlation tool (or any other dialog with a multiple range expr
entry widget)
click in Input Range
select a range
type ,
select a range
click in the first range
select another range: the second range changes but the first one should.
(if we click on `label' checkbox and then on the first range, the first
range changes when the next range is being selected
Comment 1 Andreas J. Guelzow 2001-12-03 00:26:18 UTC
This has an easy fix (we just can't ignore the meaning of a mouse
click for the selection tochange:

Index: src/widgets/gnumeric-expr-entry.c
===================================================================
RCS file: /cvs/gnome/gnumeric/src/widgets/gnumeric-expr-entry.c,v
retrieving revision 1.23
diff -u -r1.23 gnumeric-expr-entry.c
--- src/widgets/gnumeric-expr-entry.c	2001/11/26 04:56:50	1.23
+++ src/widgets/gnumeric-expr-entry.c	2001/12/03 00:25:55
@@ -414,6 +414,19 @@
 	return result;
 }
 
+static int
+gnumeric_expr_entry_button_press_event (GtkWidget *widget,
GdkEventButton *event)
+{
+
int result;
+
result = GTK_WIDGET_CLASS (gnumeric_expr_entry_parent_class)->
+
	button_press_event (widget, event);
+
+
if (!gnumeric_expr_entry_rangesel_meaningful (GNUMERIC_EXPR_ENTRY
(widget)))
+
	scg_rangesel_stop (GNUMERIC_EXPR_ENTRY (widget)->scg, FALSE);
+
+
return result;
+}
+
 static void
 gnumeric_expr_entry_class_init (GtkObjectClass *object_class)
 {
@@ -424,6 +437,7 @@
 
 	object_class->destroy
	= gnumeric_expr_entry_destroy;
 	widget_class->key_press_event   = gnumeric_expr_entry_key_press_event;
+
widget_class->button_press_event= gnumeric_expr_entry_button_press_event;
 }
 
 E_MAKE_TYPE (gnumeric_expr_entry, "GnumericExprEntry", GnumericExprEntry,
Comment 2 Jody Goldberg 2001-12-03 18:01:52 UTC
hmm, that is the problem, but the fix feeling like it is at the wrong level.
It is the movement of the entry cursor, not the button press, that is
interesting.
Comment 3 Andreas J. Guelzow 2001-12-03 20:29:09 UTC
Looking at the available signals I had originally thought that using
the move-cursor signal of GtkEditables would be the right thing to do.
Strangely that signal is never being raised... That's why I went one
level up (or down?) to the mouse click.
Comment 4 Jody Goldberg 2001-12-22 15:18:07 UTC
Thanks for the reminder.  I'm not going to have time to research this.  Too
many other things pendings.  Commit the fix, and leave a nice verbose comment
about why you're doing it at that level rather than higher up.
Comment 5 Andreas J. Guelzow 2001-12-22 17:17:40 UTC
In fact I have figured out by now that for GTK2 & GNOME2 Gtk_Entry is
going to have a move_cursor signal that doesn't exist yet. THat signal
would be the perfect place to hook up to!
Comment 6 Andreas J. Guelzow 2001-12-22 17:21:10 UTC
I'll commit the patch when I can connect to cvs again.
Comment 7 Andreas J. Guelzow 2001-12-23 01:26:11 UTC
fixed in cvs