diff options
| author | Přemysl Janouch <p.janouch@gmail.com> | 2011-06-09 21:56:38 +0200 | 
|---|---|---|
| committer | Přemysl Janouch <p.janouch@gmail.com> | 2011-06-09 21:56:38 +0200 | 
| commit | a2b898b610c7150a8e1c904afbe0f936b7069e4f (patch) | |
| tree | 73c4a8d715e7c846f5cc48b82a7d4c399bfa3fae | |
| parent | c36ca83406b40e201f7b146712fe9261f34e4a94 (diff) | |
| download | logdiag-a2b898b610c7150a8e1c904afbe0f936b7069e4f.tar.gz logdiag-a2b898b610c7150a8e1c904afbe0f936b7069e4f.tar.xz logdiag-a2b898b610c7150a8e1c904afbe0f936b7069e4f.zip  | |
Change the cursor when scrolling the view.
For consistency with other GTK+ applications.
| -rw-r--r-- | liblogdiag/ld-diagram-view.c | 14 | 
1 files changed, 13 insertions, 1 deletions
diff --git a/liblogdiag/ld-diagram-view.c b/liblogdiag/ld-diagram-view.c index 17a9909..1898177 100644 --- a/liblogdiag/ld-diagram-view.c +++ b/liblogdiag/ld-diagram-view.c @@ -302,6 +302,7 @@ static void ld_diagram_view_real_cancel_operation (LdDiagramView *self);  static void oper_move_view_begin (LdDiagramView *self, const LdPoint *point);  static void oper_move_view_motion (LdDiagramView *self, const LdPoint *point); +static void oper_move_view_end (LdDiagramView *self);  static void oper_add_object_end (LdDiagramView *self); @@ -1757,15 +1758,20 @@ static void  oper_move_view_begin (LdDiagramView *self, const LdPoint *point)  {  	MoveViewData *data; +	GdkCursor *move_cursor;  	g_signal_emit (self,  		LD_DIAGRAM_VIEW_GET_CLASS (self)->cancel_operation_signal, 0);  	self->priv->operation = OPER_MOVE_VIEW; -	self->priv->operation_end = NULL; +	self->priv->operation_end = oper_move_view_end;  	data = &OPER_DATA (self, move_view);  	data->last_pos = *point; + +	move_cursor = gdk_cursor_new (GDK_FLEUR); +	gdk_window_set_cursor (GTK_WIDGET (self)->window, move_cursor); +	gdk_cursor_unref (move_cursor);  }  static void @@ -1785,6 +1791,12 @@ oper_move_view_motion (LdDiagramView *self, const LdPoint *point)  	data->last_pos = *point;  } +static void +oper_move_view_end (LdDiagramView *self) +{ +	gdk_window_set_cursor (GTK_WIDGET (self)->window, NULL); +} +  /**   * ld_diagram_view_add_object_begin:   * @self: an #LdDiagramView object.  | 
