marlin r1287 - trunk/marlin



Author: iain
Date: Thu Oct  2 00:05:46 2008
New Revision: 1287
URL: http://svn.gnome.org/viewvc/marlin?rev=1287&view=rev

Log:
Unselect a marker when the cursor leaves the MarkerView


Modified:
   trunk/marlin/ChangeLog
   trunk/marlin/marlin-marker-view.c

Modified: trunk/marlin/marlin-marker-view.c
==============================================================================
--- trunk/marlin/marlin-marker-view.c	(original)
+++ trunk/marlin/marlin-marker-view.c	Thu Oct  2 00:05:46 2008
@@ -2,7 +2,7 @@
 /*
  *  Authors: Iain Holmes <iain gnome org>
  *
- *  Copyright 2003 - 2007 Iain Holmes
+ *  Copyright 2003 - 2008 Iain Holmes
  *
  *  This file is free software; you can redistribute it and/or
  *  modify it under the terms of version 2 of the GNU Library General Public
@@ -106,19 +106,19 @@
 	guint32 notify_id;
 	guint rate, bpm;
 	MarlinUndoManager *undo;
-	
+
 	/* Pixmap to save redrawing */
 	GdkPixmap *backing_store;
 	GdkGC *non_gr_exp_gc;
 	PangoLayout *layout;
-	
+
 	GList *markers; /* List of struct _ViewMarker */
 	GHashTable *marker_to_view;
 	GHashTable *position_to_markers; /* Get the struct _ViewMarker at
 					    a position */
 
 	MarlinList *regions; /* List of struct _Region */
-	
+
 	/* To update correctly. */
 	guint fpp;
 
@@ -156,7 +156,7 @@
 #define HANDLE_WIDTH 12
 #define HANDLE_HEIGHT 4
 
-#define BETWEEN(x, a, b) ((x) >= (a) && (x) <= (b))		
+#define BETWEEN(x, a, b) ((x) >= (a) && (x) <= (b))
 
 static void
 clear_markers (MarlinMarkerView *view)
@@ -205,7 +205,7 @@
 	if (priv->kb_ctxt) {
 		marlin_undo_manager_context_cancel (priv->undo, priv->kb_ctxt);
 	}
-			
+
 	g_object_unref (G_OBJECT (priv->model));
 	g_object_unref (G_OBJECT (priv->undo));
 
@@ -215,7 +215,7 @@
 	}
 
 	g_object_unref (G_OBJECT (priv->layout));
-	
+
 	clear_markers (view);
 
 	if (priv->regions) {
@@ -247,13 +247,13 @@
 {
 	GtkWidget *widget = (GtkWidget *) view;
 	struct _ViewMarker *vm = view->priv->focus_marker;
-	
+
 	if (vm != NULL) {
 		int x;
 
 		x = ((vm->real_position / view->priv->fpp) - view->priv->xofs - EXPANDER_SIZE_HALF) - 2;
 
-#if 0		
+#if 0
 		area.x = MAX (x, 0);
 		area.y = widget->allocation.height - widget->style->ythickness - EXPANDER_SIZE - 2;
 		area.width = EXPANDER_SIZE + 4;
@@ -264,7 +264,7 @@
 	vm = view->priv->focus_marker = new_focus;
 	if (vm != NULL) {
 		int x;
-		
+
 		x = ((vm->real_position / view->priv->fpp) - view->priv->xofs - EXPANDER_SIZE_HALF) - 2;
 #if 0
 		area.x = MAX (x, 0);
@@ -299,7 +299,7 @@
 reset_regions (MarlinMarkerView *view)
 {
 	MarlinMarkerViewPrivate *priv = view->priv;
-	
+
 	marlin_list_clear (priv->regions);
 
 	/* Create a new region that goes from start -> finish */
@@ -318,7 +318,7 @@
 	for (l = priv->regions->first; l; l = l->next) {
 		struct _Region *r = (struct _Region *) l;
 		guint64 region_start, region_end;
-		
+
 		if (r->start) {
 			region_start = r->start->position;
 		} else {
@@ -338,7 +338,7 @@
 		if (BETWEEN (position, region_start, region_end)) {
 			*region = r;
 			return TRUE;
-		} 
+		}
 	}
 
 	/* This cannot happen, the position should always be between
@@ -357,7 +357,7 @@
 
 	for (l = priv->regions->first; l; l = l->next) {
 		struct _Region *region = (struct _Region *) l;
-		
+
 		if (region->start == marker) {
 			*region2 = region;
 		}
@@ -440,7 +440,7 @@
 {
 	struct _ViewMarker *vm;
 	struct _Region *region = NULL;
-	
+
 	vm = g_new (struct _ViewMarker, 1);
 	vm->marker = marker;
 	vm->real_position = marker->position;
@@ -456,7 +456,7 @@
 	/* Split the region this marker was in */
 	find_region (view, marker->position, &region);
 	if (region == NULL) {
-		g_warning ("Region not found for position %llu", 
+		g_warning ("Region not found for position %llu",
 			   marker->position);
 		return;
 	}
@@ -486,7 +486,7 @@
 	} else {
 		was_focus = FALSE;
 	}
-	
+
 	find_regions_for_marker (view, marker, &region1, &region2);
 	join_regions (view, region1, region2);
 
@@ -520,7 +520,7 @@
 	struct _Region *region1, *region2, *new_region;
 
 	vm = g_hash_table_lookup (priv->marker_to_view, marker);
-	g_assert (vm != NULL);	
+	g_assert (vm != NULL);
 
 	/* Join the old regions together */
 	find_regions_for_marker (view, marker, &region1, &region2);
@@ -577,7 +577,7 @@
 	if (view->priv->position_to_markers == NULL) {
 		view->priv->position_to_markers = g_hash_table_new (NULL, NULL);
 	}
-	
+
 	for (p = marks; p; p = p->next) {
 		struct _ViewMarker *vm = g_new (struct _ViewMarker, 1);
 
@@ -618,7 +618,7 @@
 					    &rect, FALSE);
 	}
 }
-	       
+
 static void
 set_property (GObject *object,
 	      guint prop_id,
@@ -629,11 +629,11 @@
 	GtkWidget *widget;
 	MarlinMarkerView *view;
 	GList *marks;
-	
+
 	view = MARLIN_MARKER_VIEW (object);
 	widget = GTK_WIDGET (object);
 	priv = view->priv;
-	
+
 	switch (prop_id) {
 	case PROP_MODEL:
 		/* Disconnect the signal handlers and unref the model */
@@ -663,7 +663,7 @@
 		reset_regions (view);
 
 		add_markers (view, marks);
-		
+
 		priv->add_id = g_signal_connect (G_OBJECT (priv->model),
 						 "marker-added",
 						 G_CALLBACK (marker_added),
@@ -681,7 +681,7 @@
 
 	case PROP_FRAMES_PER_PIXEL:
 		priv->fpp = g_value_get_uint (value);
-		
+
 		if (GTK_WIDGET_DRAWABLE (widget)) {
 			GdkRectangle rect;
 
@@ -734,7 +734,7 @@
 		}
 
 		break;
-		
+
 	case PROP_UNDO_MANAGER:
 		priv->undo = (MarlinUndoManager *) g_value_dup_object (value);
 		break;
@@ -810,7 +810,7 @@
 
 	if (GTK_WIDGET_REALIZED (widget)) {
 		GdkRectangle rect;
-		
+
 		gdk_window_move_resize (widget->window,
 					allocation->x, allocation->y,
 					allocation->width, allocation->height);
@@ -836,7 +836,7 @@
 	PangoFontDescription *fd;
 
 	fd = widget->style->font_desc;
-	
+
 	font_size = pango_font_description_get_size (fd);
 
 	req->height = PANGO_PIXELS (font_size) + widget->style->ythickness * 2 + 22;
@@ -886,7 +886,7 @@
 unrealize (GtkWidget *widget)
 {
 	MarlinMarkerView *view = MARLIN_MARKER_VIEW (widget);
-	
+
 	if (view->priv->backing_store) {
 		g_object_unref (view->priv->backing_store);
 	}
@@ -946,7 +946,7 @@
 		}
 	}
 
-	return (int) ((float)(increments[i] * view->priv->rate));	
+	return (int) ((float)(increments[i] * view->priv->rate));
 }
 
 static int
@@ -966,7 +966,7 @@
 		}
 	}
 
-	return (int) ((float)(increments[i] * view->priv->rate));	
+	return (int) ((float)(increments[i] * view->priv->rate));
 }
 
 static int
@@ -975,7 +975,7 @@
 	switch (view->priv->display) {
 	case MARLIN_DISPLAY_FRAMES:
 		return get_frames_increment (view);
-		
+
 	case MARLIN_DISPLAY_TIME_LONG:
 	case MARLIN_DISPLAY_SECONDS:
 		return get_time_increment (view);
@@ -1043,7 +1043,7 @@
 	case MARLIN_DISPLAY_BEATS: {
 		guint64 fpm = view->priv->rate * 60;
 		guint64 fpb = fpm / view->priv->bpm;
-		
+
 		return g_strdup_printf ("%llu", position / fpb);
 	}
 
@@ -1077,7 +1077,7 @@
 	height = widget->allocation.height - ythickness * 2;
 
 	gc = widget->style->fg_gc[GTK_STATE_NORMAL];
-	
+
 	gtk_paint_box (widget->style, view->priv->backing_store,
 		       GTK_STATE_NORMAL, GTK_SHADOW_OUT,
 		       NULL, widget, "hruler",
@@ -1094,7 +1094,7 @@
 	ruler_upper = (priv->xofs + width) * priv->fpp;
 
 /* 	desired = CLAMP (priv->fpp, 1, 16384); */
-	
+
 	increment = get_view_increment (view);
 	gap = increment / 10;
 
@@ -1105,7 +1105,7 @@
 	} else {
 		first_mark = start - s;
 	}
-	
+
 	width_in_frames = (width + priv->xofs) * priv->fpp;
 	for (point = first_mark; point <= width_in_frames; point += increment) {
 		int mark;
@@ -1119,7 +1119,7 @@
 
 		for (j = 1; j < 10; j++) {
 			int pos = (point + (j * gap)) / priv->fpp;
-			
+
 			gdk_draw_line (view->priv->backing_store, gc,
 				       pos - priv->xofs,
 				       (height - 14) + ythickness,
@@ -1132,7 +1132,7 @@
 		if (count % increment != 0) {
 			count = ((count / increment) + 1) * increment;
 		}
-			
+
 		unit_str = get_view_text (view, count);
 		pango_layout_set_markup (view->priv->layout, unit_str, -1);
 		g_free (unit_str);
@@ -1141,7 +1141,7 @@
 		gtk_paint_layout (widget->style, view->priv->backing_store,
 				  GTK_WIDGET_STATE (widget), FALSE,
 				  NULL, widget, "hruler",
-				  mark - priv->xofs - (PANGO_PIXELS (tw) / 2), 
+				  mark - priv->xofs - (PANGO_PIXELS (tw) / 2),
 				  (widget->allocation.height - 24 - (widget->style->ythickness * 2)) - (PANGO_PIXELS (th)) / 2 + widget->style->ythickness,
 				  view->priv->layout);
 	}
@@ -1192,16 +1192,16 @@
 
 	first = priv->xofs * priv->fpp;
 	last = first + (widget->allocation.width * priv->fpp);
-	
+
 	cr = gdk_cairo_create (widget->window);
 	for (m = priv->markers; m; m = m->next) {
 		struct _ViewMarker *marker = m->data;
 		int x;
-		
+
 		if (marker->hidden) {
 			continue;
 		}
-		
+
 		if (marker->real_position < first ||
 		    marker->real_position > last) {
 			continue;
@@ -1227,7 +1227,7 @@
 	if (view->priv->in_drag_marker) {
 		/* FIXME: Should we only draw this if the floating marker
 		   is inside area? */
-		draw_arrow (widget, cr, 
+		draw_arrow (widget, cr,
 			    (priv->floating_marker_pos / priv->fpp) - priv->xofs,
 			    widget->allocation.height, EXPANDER_SIZE, TRUE);
 	}
@@ -1274,19 +1274,19 @@
 		  int        handle_width)
 {
 	cairo_save (cr);
-	
+
 	cairo_set_antialias (cr, CAIRO_ANTIALIAS_NONE);
 	cairo_set_line_width (cr, 1);
 
 	cairo_rectangle (cr, x - (handle_width / 2),
 			 y - (HANDLE_HEIGHT / 2), handle_width, HANDLE_HEIGHT);
-	
+
 	gdk_cairo_set_source_color (cr, &widget->style->base[GTK_STATE_NORMAL]);
 	cairo_fill_preserve (cr);
-	
+
 	gdk_cairo_set_source_color (cr, &widget->style->fg[GTK_STATE_NORMAL]);
 	cairo_stroke (cr);
-	
+
 	cairo_restore (cr);
 }
 
@@ -1308,7 +1308,7 @@
 	}
 
 	first_frame = priv->xofs * priv->fpp;
-	g_object_get (priv->sample, 
+	g_object_get (priv->sample,
 		      "total-frames", &last_frame,
 		      NULL);
 
@@ -1345,7 +1345,7 @@
 		midpoint = region_start + ((region_end - region_start) / 2);
 		handle_width = MIN (region_end - region_start - 4,
 				    HANDLE_WIDTH);
-		
+
 		draw_grab_handle (widget, cr,
 				  (midpoint / priv->fpp) - priv->xofs,
 				  y, handle_width);
@@ -1370,7 +1370,6 @@
 				   widget->allocation.height);
 		draw_regions (view, &event->area, GTK_STATE_NORMAL);
 		draw_markers (view, &event->area, GTK_STATE_NORMAL);
-		
 	}
 
 	return FALSE;
@@ -1384,16 +1383,16 @@
 	GdkRectangle area;
 	GtkWidget *widget = GTK_WIDGET (view);
 	int x;
-	
+
 	marker->hidden = hidden;
-	
+
 	x = ((marker->real_position / view->priv->fpp) - EXPANDER_SIZE_HALF) - 2;
 
 	area.x = MAX (x, 0);
 	area.y = widget->allocation.height - widget->style->ythickness - EXPANDER_SIZE - 2;
 	area.width = EXPANDER_SIZE + 4;
 	area.height = EXPANDER_SIZE + 4;
-	
+
 	gdk_window_invalidate_rect (widget->window, &area, FALSE);
 }
 
@@ -1410,7 +1409,7 @@
 	GdkRectangle area;
 	guint64 total_frames;
 	int x;
-	
+
 	x = ((view->priv->floating_marker_pos / view->priv->fpp) - view->priv->xofs - EXPANDER_SIZE_HALF) - 2;
 
 	area.x = MAX (x, 0);
@@ -1426,7 +1425,7 @@
 
 	view->priv->floating_marker_pos = new_position < total_frames ?
 		new_position : total_frames - view->priv->fpp;
-	
+
 	x = ((view->priv->floating_marker_pos / view->priv->fpp) - view->priv->xofs - EXPANDER_SIZE_HALF) - 2;
 
 	area.x = MAX (x, 0);
@@ -1434,9 +1433,9 @@
 	area.width = EXPANDER_SIZE + 4;
 	area.height = EXPANDER_SIZE + 4;
 
-	gdk_window_invalidate_rect (widget->window, &area, FALSE);	
+	gdk_window_invalidate_rect (widget->window, &area, FALSE);
 }
-	
+
 static gboolean
 button_press_event (GtkWidget *widget,
 		    GdkEventButton *event)
@@ -1444,7 +1443,7 @@
 	MarlinMarkerView *view;
 	struct _ViewMarker *vm;
 	guint64 real;
-	
+
 	view = MARLIN_MARKER_VIEW (widget);
 
 	real = (event->x + view->priv->xofs) * view->priv->fpp;
@@ -1460,21 +1459,21 @@
 							 view->priv->kb_ctxt);
 			view->priv->kb_ctxt = NULL;
 		}
-		
+
 		if (find_marker (view, real, &vm)) {
 			GdkCursor *grab_hand;
-			
+
 			change_focus_marker (view, vm);
-			
+
 			/* In drag */
 			view->priv->in_drag_marker = TRUE;
 			view->priv->drag_marker = vm;
-			
+
 			marker_set_hidden (view, vm, TRUE);
 			redraw_floating_marker (view, real);
-			
+
 			grab_hand = marlin_cursor_get (widget, HAND_CLOSED);
-			
+
 			gdk_pointer_grab (widget->window, FALSE,
 					  GDK_BUTTON_RELEASE_MASK |
 					  GDK_BUTTON1_MOTION_MASK, NULL,
@@ -1502,7 +1501,7 @@
 	      guint64 position)
 {
 	int increment, gap;
-	
+
 	increment = get_view_increment (view);
 	gap = increment / 10;
 
@@ -1529,43 +1528,41 @@
 		      "total-frames", &total,
 		      NULL);
 	position = position < total ? position : total - view->priv->fpp;
-	
+
 	if (view->priv->snap) {
 		position = snap_to_tick (view, position);
 	}
-	
+
 	switch (event->button) {
 	case 1:
-		
 		g_object_get (G_OBJECT (view->priv->sample),
 			      "total_frames", &total,
 			      NULL);
-		
+
 		if (view->priv->in_drag_marker) {
 			MarlinUndoContext *ctxt;
 
-			
 			gdk_pointer_ungrab (event->time);
-			if (event->x < -MARKER_REMOVE_THRESHOLD || 
+			if (event->x < -MARKER_REMOVE_THRESHOLD ||
 			    event->x > (widget->allocation.width + MARKER_REMOVE_THRESHOLD) ||
-			    event->y < -MARKER_REMOVE_THRESHOLD || 
+			    event->y < -MARKER_REMOVE_THRESHOLD ||
 			    event->y > (widget->allocation.height + MARKER_REMOVE_THRESHOLD)) {
 				ctxt = marlin_undo_manager_context_begin (priv->undo,
 									  _("Remove Marker"));
 				marlin_marker_model_remove_marker (priv->model,
-								   priv->drag_marker->marker, 
+								   priv->drag_marker->marker,
 								   ctxt);
 			} else {
 				ctxt = marlin_undo_manager_context_begin (priv->undo,
 									  _("Move Marker"));
-				marlin_marker_model_move_marker (priv->model, 
-								 priv->drag_marker->marker, 
-								 position, 
+				marlin_marker_model_move_marker (priv->model,
+								 priv->drag_marker->marker,
+								 position,
 								 ctxt);
 			}
 
 			marlin_undo_manager_context_end (priv->undo, ctxt);
-			
+
 			marker_set_hidden (view, view->priv->drag_marker, FALSE);
 			view->priv->in_drag_marker = FALSE;
 			view->priv->drag_marker = NULL;
@@ -1573,21 +1570,21 @@
 			redraw_floating_marker (view, position);
 			return FALSE;
 		}
-		
+
 		if (position > total) {
 			return FALSE;
 		}
-		
+
 		if (find_marker (view, position, &vm) == FALSE) {
 			MarlinUndoContext *ctxt;
 
 			ctxt = marlin_undo_manager_context_begin (priv->undo,
 								  _("Add Marker"));
-			
+
 			marlin_marker_model_add_marker (view->priv->model, position, NULL, ctxt);
 			marlin_undo_manager_context_end (priv->undo, ctxt);
 		}
-		
+
 		return FALSE;
 
 	case 2:
@@ -1634,17 +1631,17 @@
 		dragging_marker (view, event);
 		return FALSE;
 	}
-	
+
 	if (event->y < (widget->allocation.height - (14 + widget->style->ythickness))) {
 		if (priv->current_marker != NULL) {
 			if (GTK_WIDGET_DRAWABLE (widget)) {
 				GdkRectangle area;
-				
+
 				area.x = (priv->current_marker->real_position / view->priv->fpp) - 5;
 				area.y = widget->allocation.height - widget->style->ythickness - EXPANDER_SIZE;
 				area.width = EXPANDER_SIZE;
 				area.height = EXPANDER_SIZE;
-				
+
 				gdk_window_invalidate_rect (widget->window, &area, FALSE);
 			}
 		}
@@ -1667,14 +1664,14 @@
 		if (GTK_WIDGET_DRAWABLE (widget)) {
 			GdkRectangle area;
 			int x;
-			
+
 			x = (vm->real_position / view->priv->fpp) - EXPANDER_SIZE_HALF;
-			
+
 			area.x = MAX (x, 0);
 			area.y = widget->allocation.height - EXPANDER_SIZE;
 			area.width = EXPANDER_SIZE;
 			area.height = EXPANDER_SIZE;
-			
+
 			gdk_window_invalidate_rect (widget->window, &area, FALSE);
 		}
 
@@ -1683,14 +1680,14 @@
 		if (GTK_WIDGET_DRAWABLE (widget)) {
 			GdkRectangle area;
 			int x;
-			
+
 			x = (priv->current_marker->real_position / view->priv->fpp) - 5;
 
 			area.x = MAX (x, 0);
 			area.y = widget->allocation.height - widget->style->ythickness - EXPANDER_SIZE;
 			area.width = EXPANDER_SIZE;
 			area.height = EXPANDER_SIZE;
-			
+
 			gdk_window_invalidate_rect (widget->window, &area, FALSE);
 		}
 		gdk_window_set_cursor (widget->window, NULL);
@@ -1699,7 +1696,7 @@
 		/* Out of a marker so turn the menus off again */
 		g_signal_emit (G_OBJECT (view), signals[LEAVE_MARKER], 0);
 	} if (find_region (view, px, &region)) {
-		
+
 	}else {
 		gdk_window_set_cursor (widget->window, NULL);
 		priv->current_marker = NULL;
@@ -1720,6 +1717,8 @@
 			GdkRectangle area;
 			int x;
 
+			/* Redraw the area around the current marker so that
+			   it will be unfocused */
 			x = ((priv->current_marker->real_position / view->priv->fpp) - priv->xofs - EXPANDER_SIZE_HALF) - 2;
 
 			area.x = MAX (x, 0);
@@ -1733,11 +1732,12 @@
 				area.width += 4;
 				area.height += 4;
 			}
-			
+
 			gdk_window_invalidate_rect (widget->window, &area, FALSE);
 		}
 
-/* 		priv->current_marker = NULL; */
+		/* Set the current marker to NULL so that it loses focus */
+		priv->current_marker = NULL;
 	}
 
 	return FALSE;
@@ -1753,7 +1753,7 @@
 
 	return FALSE;
 }
-	
+
 static gboolean
 focus_out_event (GtkWidget *widget,
 		 GdkEventFocus *event)
@@ -1788,9 +1788,9 @@
 	switch (event->keyval) {
 	case GDK_Left:
 		if (view->priv->kb_grab) {
-			pos = view->priv->focus_marker->real_position - 
+			pos = view->priv->focus_marker->real_position -
 				view->priv->fpp;
-	
+
 			if (event->state & GDK_SHIFT_MASK) {
 				guint64 new_pos;
 
@@ -1799,17 +1799,17 @@
 				   then we need to move to the previous tick */
 				if (new_pos >= pos) {
 					int increment, gap;
-					
+
 					increment = get_view_increment (view);
 					gap = increment / 10;
 
 					pos = new_pos - gap;
 				}
 			}
-					
+
 			marlin_marker_model_move_marker (view->priv->model,
 							 view->priv->focus_marker->marker,
-							 pos, 
+							 pos,
 							 view->priv->kb_ctxt);
 			return TRUE;
 		}
@@ -1838,23 +1838,23 @@
 
 			if (event->state & GDK_SHIFT_MASK) {
 				guint64 new_pos;
-				
+
 				new_pos = snap_to_tick (view, pos);
 				/* If the position was snapped to the left
 				   then we need to move to the next tick */
 				if (new_pos <= pos) {
 					int increment, gap;
-					
+
 					increment = get_view_increment (view);
 					gap = increment / 10;
-					
+
 					pos = new_pos + gap;
 				}
 			}
-			
+
 			marlin_marker_model_move_marker (view->priv->model,
 							 view->priv->focus_marker->marker,
-							 pos, 
+							 pos,
 							 view->priv->kb_ctxt);
 			return TRUE;
 		}
@@ -1911,7 +1911,7 @@
 							  _("Remove Marker"));
 		marlin_marker_model_remove_marker (priv->model, fm, ctxt);
 		marlin_undo_manager_context_end (priv->undo, ctxt);
-						   
+
 		break;
 
 	default:
@@ -1963,7 +1963,7 @@
 	area.y = 0;
 	area.width = width;
 	area.height = height;
-	
+
 	gdk_window_invalidate_rect (widget->window, &area, FALSE);
 }
 
@@ -1981,7 +1981,7 @@
 {
 	MarlinMarkerViewPrivate *priv;
 	gboolean need_adjust;
-	
+
 	priv = view->priv;
 
 	if (hadj == NULL ||
@@ -2021,13 +2021,13 @@
 		adjustment_changed_cb (NULL, view);
 	}
 }
-		
+
 static void
 class_init (MarlinMarkerViewClass *klass)
 {
 	GObjectClass *object_class = G_OBJECT_CLASS (klass);
 	GtkWidgetClass *widget_class = GTK_WIDGET_CLASS (klass);
-	
+
 	object_class->finalize = finalize;
 	object_class->set_property = set_property;
 	object_class->get_property = get_property;
@@ -2044,9 +2044,9 @@
 	widget_class->focus_in_event = focus_in_event;
 	widget_class->focus_out_event = focus_out_event;
 	widget_class->key_press_event = key_press_event;
-	
+
 	klass->set_scroll_adjustments = set_scroll_adjustments;
-	
+
 	parent_class = g_type_class_peek_parent (klass);
 
 	g_object_class_install_property (object_class,
@@ -2147,16 +2147,16 @@
 	guint64 pos;
 	GtkAdjustment *adj;
 	MarlinUndoContext *ctxt;
-	
+
 	switch (response_id) {
 	case GTK_RESPONSE_OK:
 		name = gtk_entry_get_text (GTK_ENTRY (view->priv->add_data->entry));
 		g_object_get (G_OBJECT (view->priv->add_data->position),
 			      "adjustment", &adj,
 			      NULL);
-		
+
 		pos = (guint64) adj->value;
-		
+
 		if (name == NULL) {
 			real_name = g_strdup_printf (_("Marker %llu"), pos);
 		} else {
@@ -2194,7 +2194,7 @@
 	struct _dialog_data *ad;
 	guint rate;
 	guint64 max_frames;
-	
+
 	if (view->priv->add_data != NULL) {
 		gtk_window_present (GTK_WINDOW (view->priv->add_data->dialog));
 		return;
@@ -2211,12 +2211,12 @@
 	ad->dialog = gtk_dialog_new ();
 	gtk_window_set_title (GTK_WINDOW (ad->dialog), title);
 	g_free (title);
-	
+
 	gtk_dialog_set_has_separator (GTK_DIALOG (ad->dialog), FALSE);
 	toplevel = gtk_widget_get_toplevel (GTK_WIDGET (view));
 	gtk_window_set_transient_for (GTK_WINDOW (ad->dialog), GTK_WINDOW (toplevel));
 	gtk_window_set_resizable (GTK_WINDOW (ad->dialog), FALSE);
-	
+
 	vbox = gtk_vbox_new (FALSE, 12);
 	gtk_container_set_border_width (GTK_CONTAINER (vbox), 12);
 	gtk_widget_show (vbox);
@@ -2241,7 +2241,7 @@
 	gtk_label_set_mnemonic_widget (GTK_LABEL (label), ad->entry);
 	marlin_add_paired_relations (ad->entry, ATK_RELATION_LABELLED_BY,
 				     label, ATK_RELATION_LABEL_FOR);
-	
+
 	label = marlin_make_title_label (_("_Position:"));
 	gtk_widget_show (label);
 	PACK (table, label, 0, 1, GTK_FILL);
@@ -2256,7 +2256,7 @@
 		      "rate", rate,
 		      "max_frames", max_frames,
 		      NULL);
-	
+
 	gtk_widget_show (ad->position);
 	PACK (table, ad->position, 1, 1, GTK_FILL | GTK_EXPAND);
 
@@ -2282,7 +2282,7 @@
 
 	g_signal_connect (ad->dialog, "response",
 			  G_CALLBACK (add_marker_response), view);
-	
+
 	gtk_widget_show (ad->dialog);
 }
 #endif
@@ -2293,7 +2293,7 @@
 	MarlinMarkerViewPrivate *priv;
 
 	GTK_WIDGET_SET_FLAGS (view, GTK_CAN_FOCUS);
-	
+
 	priv = g_new0 (MarlinMarkerViewPrivate, 1);
 	view->priv = priv;
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]