Commit f2499df5 authored by Andreas J. Guelzow's avatar Andreas J. Guelzow Committed by Andreas J. Guelzow

rename gee_notify_cursor_position and change to signal handler

2002-02-23  Andreas J. Guelzow <aguelzow@taliesin.ca>

	* gnumeric-expr-entry.c (gnumeric_expr_entry_button_press_event) :
	  rename gee_notify_cursor_position and change to signal handler
	(gee_class_init) : remove ref to gnumeric_expr_entry_button_press_event
	(gnumeric_expr_entry_new) : connect to notify::cursor-position
	  signal
parent 8d50adf1
2002-02-23 Andreas J. Guelzow <aguelzow@taliesin.ca>
* gnumeric-expr-entry.c (gnumeric_expr_entry_button_press_event) :
rename gee_notify_cursor_position and change to signal handler
(gee_class_init) : remove ref to gnumeric_expr_entry_button_press_event
(gnumeric_expr_entry_new) : connect to notify::cursor-position
signal
2002-02-23 Andreas J. Guelzow <aguelzow@taliesin.ca>
* gnumeric-expr-entry.c (gee_focus_in_event, gee_focus_out_event) :
......
......@@ -472,17 +472,13 @@ gee_key_press_event (GtkWidget *widget, GdkEventKey *event)
return result;
}
static int
gnumeric_expr_entry_button_press_event (GtkWidget *widget, GdkEventButton *event)
static void
gee_notify_cursor_position (GObject *object, GParamSpec *pspec, GnumericExprEntry *gee)
{
int result;
result = GTK_WIDGET_CLASS (gnumeric_expr_entry_parent_class)->
button_press_event (widget, event);
if (!gnm_expr_entry_can_rangesel (GNUMERIC_EXPR_ENTRY (widget)))
scg_rangesel_stop (GNUMERIC_EXPR_ENTRY (widget)->scg, FALSE);
g_return_if_fail (IS_GNUMERIC_EXPR_ENTRY (gee));
return result;
if (!gnm_expr_entry_can_rangesel (gee))
scg_rangesel_stop (gee->scg, FALSE);
}
/**
......@@ -546,7 +542,6 @@ static void
gee_class_init (GtkObjectClass *klass)
{
GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
gnumeric_expr_entry_parent_class
= gtk_type_class (gtk_entry_get_type());
......@@ -555,17 +550,6 @@ gee_class_init (GtkObjectClass *klass)
gobject_class->get_property = gee_get_property;
klass->destroy = gee_destroy;
/*
* FIXME:
* You would think that rather than button_press_event we would use a signal
* specific to the movement of the cursor (that signal would probably be at the
* GTKENTRY level). Unfortunately there is no such signal, yet. In Gnome2
* GTKENTRY will have a move_cursor signal which we should use then!
*
*/
widget_class->button_press_event= gnumeric_expr_entry_button_press_event;
signals [UPDATE] = g_signal_new ("update",
GNUMERIC_TYPE_EXPR_ENTRY,
G_SIGNAL_RUN_LAST,
......@@ -648,6 +632,9 @@ gnumeric_expr_entry_new (WorkbookControlGUI *wbcg, gboolean with_icon)
g_signal_connect (G_OBJECT (gee->entry),
"focus_out_event",
G_CALLBACK (gee_focus_out_event), gee);
g_signal_connect (G_OBJECT (gee->entry),
"notify::cursor-position",
G_CALLBACK (gee_notify_cursor_position), gee);
gtk_box_pack_start (GTK_BOX (gee), GTK_WIDGET (gee->entry),
TRUE, TRUE, 0);
......
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