eog r4571 - in trunk: . src



Author: csaavedra
Date: Wed May 14 20:24:07 2008
New Revision: 4571
URL: http://svn.gnome.org/viewvc/eog?rev=4571&view=rev

Log:
2008-05-14  Claudio Saavedra  <csaavedra gnome org>

	* src/eog-thumb-view.c: Rename all EogThumbView objects
	from 'tb' to 'thumbview' and clean indentation.



Modified:
   trunk/ChangeLog
   trunk/src/eog-thumb-view.c

Modified: trunk/src/eog-thumb-view.c
==============================================================================
--- trunk/src/eog-thumb-view.c	(original)
+++ trunk/src/eog-thumb-view.c	Wed May 14 20:24:07 2008
@@ -39,12 +39,12 @@
 
 #define EOG_THUMB_VIEW_SPACING 0
 
-#define EOG_THUMB_VIEW_GET_PRIVATE(object) \
+#define EOG_THUMB_VIEW_GET_PRIVATE(object)				\
 	(G_TYPE_INSTANCE_GET_PRIVATE ((object), EOG_TYPE_THUMB_VIEW, EogThumbViewPrivate))
 
 G_DEFINE_TYPE (EogThumbView, eog_thumb_view, GTK_TYPE_ICON_VIEW);
 
-static EogImage* eog_thumb_view_get_image_from_path (EogThumbView      *tb,
+static EogImage* eog_thumb_view_get_image_from_path (EogThumbView      *thumbview,
 						     GtkTreePath       *path);
 
 static void      eog_thumb_view_popup_menu          (EogThumbView      *widget, 
@@ -72,9 +72,9 @@
 static void
 eog_thumb_view_finalize (GObject *object)
 {
-	EogThumbView *tb;
+	EogThumbView *thumbview;
 	g_return_if_fail (EOG_IS_THUMB_VIEW (object));
-	tb = EOG_THUMB_VIEW (object);
+	thumbview = EOG_THUMB_VIEW (object);
 	
 	G_OBJECT_CLASS (eog_thumb_view_parent_class)->finalize (object);
 }
@@ -82,9 +82,9 @@
 static void
 eog_thumb_view_destroy (GtkObject *object)
 {
-	EogThumbView *tb;
+	EogThumbView *thumbview;
 	g_return_if_fail (EOG_IS_THUMB_VIEW (object));
-	tb = EOG_THUMB_VIEW (object);
+	thumbview = EOG_THUMB_VIEW (object);
 
 	GTK_OBJECT_CLASS (eog_thumb_view_parent_class)->destroy (object);
 }
@@ -102,13 +102,13 @@
 }
 
 static void
-eog_thumb_view_clear_range (EogThumbView *tb, 
+eog_thumb_view_clear_range (EogThumbView *thumbview, 
 			    const gint start_thumb, 
 			    const gint end_thumb)
 {
 	GtkTreePath *path;
 	GtkTreeIter iter;
-	EogListStore *store = EOG_LIST_STORE (gtk_icon_view_get_model (GTK_ICON_VIEW (tb)));
+	EogListStore *store = EOG_LIST_STORE (gtk_icon_view_get_model (GTK_ICON_VIEW (thumbview)));
 	gint thumb = start_thumb;
 	gboolean result;
 	
@@ -124,13 +124,13 @@
 }
 
 static void
-eog_thumb_view_add_range (EogThumbView *tb, 
+eog_thumb_view_add_range (EogThumbView *thumbview, 
 			  const gint start_thumb, 
 			  const gint end_thumb)
 {
 	GtkTreePath *path;
 	GtkTreeIter iter;
-	EogListStore *store = EOG_LIST_STORE (gtk_icon_view_get_model (GTK_ICON_VIEW (tb)));
+	EogListStore *store = EOG_LIST_STORE (gtk_icon_view_get_model (GTK_ICON_VIEW (thumbview)));
 	gint thumb = start_thumb;
 	gboolean result;
 	
@@ -146,11 +146,11 @@
 }
 
 static void
-eog_thumb_view_update_visible_range (EogThumbView *tb, 
+eog_thumb_view_update_visible_range (EogThumbView *thumbview, 
 				     const gint start_thumb, 
 				     const gint end_thumb)
 {
-	EogThumbViewPrivate *priv = tb->priv;
+	EogThumbViewPrivate *priv = thumbview->priv;
 	int old_start_thumb, old_end_thumb;
 
 	old_start_thumb= priv->start_thumb;
@@ -162,24 +162,24 @@
 	}
 	
 	if (old_start_thumb < start_thumb)
-		eog_thumb_view_clear_range (tb, old_start_thumb, MIN (start_thumb - 1, old_end_thumb));
+		eog_thumb_view_clear_range (thumbview, old_start_thumb, MIN (start_thumb - 1, old_end_thumb));
 
 	if (old_end_thumb > end_thumb)
-		eog_thumb_view_clear_range (tb, MAX (end_thumb + 1, old_start_thumb), old_end_thumb);
+		eog_thumb_view_clear_range (thumbview, MAX (end_thumb + 1, old_start_thumb), old_end_thumb);
 
-	eog_thumb_view_add_range (tb, start_thumb, end_thumb);
+	eog_thumb_view_add_range (thumbview, start_thumb, end_thumb);
 	
 	priv->start_thumb = start_thumb;
 	priv->end_thumb = end_thumb;
 }
 
 static void
-tb_on_visible_range_changed_cb (EogThumbView *tb,
-                                gpointer user_data)
+thumbview_on_visible_range_changed_cb (EogThumbView *thumbview,
+				       gpointer user_data)
 {
 	GtkTreePath *path1, *path2;
 
-	if (!gtk_icon_view_get_visible_range (GTK_ICON_VIEW (tb), &path1, &path2)) {
+	if (!gtk_icon_view_get_visible_range (GTK_ICON_VIEW (thumbview), &path1, &path2)) {
 		return;
 	}
 	
@@ -187,11 +187,11 @@
 		path1 = gtk_tree_path_new_first ();
 	}
 	if (path2 == NULL) {
-		gint n_items = gtk_tree_model_iter_n_children (gtk_icon_view_get_model (GTK_ICON_VIEW (tb)), NULL);
+		gint n_items = gtk_tree_model_iter_n_children (gtk_icon_view_get_model (GTK_ICON_VIEW (thumbview)), NULL);
 		path2 = gtk_tree_path_new_from_indices (n_items - 1 , -1);
 	}
 	
-	eog_thumb_view_update_visible_range (tb, gtk_tree_path_get_indices (path1) [0],
+	eog_thumb_view_update_visible_range (thumbview, gtk_tree_path_get_indices (path1) [0],
 					     gtk_tree_path_get_indices (path2) [0]);
 
 	gtk_tree_path_free (path1);
@@ -199,13 +199,13 @@
 }
 
 static void
-tb_on_adjustment_changed_cb (EogThumbView *tb,
-			     gpointer user_data)
+thumbview_on_adjustment_changed_cb (EogThumbView *thumbview,
+				    gpointer user_data)
 {
 	GtkTreePath *path1, *path2;
 	gint start_thumb, end_thumb;
 	
-	if (!gtk_icon_view_get_visible_range (GTK_ICON_VIEW (tb), &path1, &path2)) {
+	if (!gtk_icon_view_get_visible_range (GTK_ICON_VIEW (thumbview), &path1, &path2)) {
 		return;
 	}
 	
@@ -213,106 +213,106 @@
 		path1 = gtk_tree_path_new_first ();
 	}
 	if (path2 == NULL) {
-		gint n_items = gtk_tree_model_iter_n_children (gtk_icon_view_get_model (GTK_ICON_VIEW (tb)), NULL);
+		gint n_items = gtk_tree_model_iter_n_children (gtk_icon_view_get_model (GTK_ICON_VIEW (thumbview)), NULL);
 		path2 = gtk_tree_path_new_from_indices (n_items - 1 , -1);
 	}
 
 	start_thumb = gtk_tree_path_get_indices (path1) [0];
 	end_thumb = gtk_tree_path_get_indices (path2) [0];
 
-	eog_thumb_view_add_range (tb, start_thumb, end_thumb);	
+	eog_thumb_view_add_range (thumbview, start_thumb, end_thumb);	
 
 	/* case we added an image, we need to make sure that the shifted thumbnail is cleared */
-	eog_thumb_view_clear_range (tb, end_thumb + 1, end_thumb + 1);
+	eog_thumb_view_clear_range (thumbview, end_thumb + 1, end_thumb + 1);
 
-	tb->priv->start_thumb = start_thumb;
-	tb->priv->end_thumb = end_thumb;
+	thumbview->priv->start_thumb = start_thumb;
+	thumbview->priv->end_thumb = end_thumb;
 
 	gtk_tree_path_free (path1);
 	gtk_tree_path_free (path2);
 }
 
 static void
-tb_on_parent_set_cb (GtkWidget *widget,
-		     GtkObject *old_parent,
-		     gpointer   user_data)
+thumbview_on_parent_set_cb (GtkWidget *widget,
+			    GtkObject *old_parent,
+			    gpointer   user_data)
 {
-	EogThumbView *tb = EOG_THUMB_VIEW (widget);
+	EogThumbView *thumbview = EOG_THUMB_VIEW (widget);
 	GtkScrolledWindow *sw;
 	GtkAdjustment *hadjustment;
 	GtkAdjustment *vadjustment;
 
-	GtkWidget *parent = gtk_widget_get_parent (GTK_WIDGET (tb));
+	GtkWidget *parent = gtk_widget_get_parent (GTK_WIDGET (thumbview));
 	if (!GTK_IS_SCROLLED_WINDOW (parent)) {
 		return;
 	}
 	
 	/* if we have been set to a ScrolledWindow, we connect to the callback
-	to set and unset thumbnails. */
+	   to set and unset thumbnails. */
 	sw = GTK_SCROLLED_WINDOW (parent);
 	hadjustment = gtk_scrolled_window_get_hadjustment (GTK_SCROLLED_WINDOW (sw));
 	vadjustment = gtk_scrolled_window_get_vadjustment (GTK_SCROLLED_WINDOW (sw));
 	
 	/* when scrolling */
 	g_signal_connect_data (G_OBJECT (hadjustment), "value-changed",
-			       G_CALLBACK (tb_on_visible_range_changed_cb),
-			       tb, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER);
+			       G_CALLBACK (thumbview_on_visible_range_changed_cb),
+			       thumbview, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER);
 	g_signal_connect_data (G_OBJECT (vadjustment), "value-changed",
-			       G_CALLBACK (tb_on_visible_range_changed_cb),
-			       tb, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER);
+			       G_CALLBACK (thumbview_on_visible_range_changed_cb),
+			       thumbview, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER);
 	
 	/* when the adjustment is changed, ie. probably we have new images added. */
 	g_signal_connect_data (G_OBJECT (hadjustment), "changed",
-			       G_CALLBACK (tb_on_adjustment_changed_cb),
-			       tb, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER);
+			       G_CALLBACK (thumbview_on_adjustment_changed_cb),
+			       thumbview, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER);
 	g_signal_connect_data (G_OBJECT (vadjustment), "changed",
-			       G_CALLBACK (tb_on_adjustment_changed_cb),
-			       tb, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER);
+			       G_CALLBACK (thumbview_on_adjustment_changed_cb),
+			       thumbview, NULL, G_CONNECT_SWAPPED | G_CONNECT_AFTER);
 
 	/* when resizing the scrolled window */
 	g_signal_connect_swapped (G_OBJECT (sw), "size-allocate",
-				  G_CALLBACK (tb_on_visible_range_changed_cb),
-				  tb);
+				  G_CALLBACK (thumbview_on_visible_range_changed_cb),
+				  thumbview);
 }
 
 static gboolean
-tb_on_button_press_event_cb (GtkWidget *tb, GdkEventButton *event, 
-                             gpointer user_data)
+thumbview_on_button_press_event_cb (GtkWidget *thumbview, GdkEventButton *event, 
+				    gpointer user_data)
 {
-    GtkTreePath *path;
+	GtkTreePath *path;
     
-    /* Ignore double-clicks and triple-clicks */
-    if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
-    {
-	    path = gtk_icon_view_get_path_at_pos (GTK_ICON_VIEW (tb), 
-						  (gint) event->x, (gint) event->y);
-	    if (path == NULL) {
-		    return FALSE;
-	    }
-
-	    if (!gtk_icon_view_path_is_selected (GTK_ICON_VIEW (tb), path) ||
-		eog_thumb_view_get_n_selected (EOG_THUMB_VIEW (tb)) != 1) {
-		gtk_icon_view_unselect_all (GTK_ICON_VIEW (tb));
-		gtk_icon_view_select_path (GTK_ICON_VIEW (tb), path);
-		gtk_icon_view_set_cursor (GTK_ICON_VIEW (tb), path, NULL, FALSE);
-	    }
-	    eog_thumb_view_popup_menu (EOG_THUMB_VIEW (tb), event);
+	/* Ignore double-clicks and triple-clicks */
+	if (event->button == 3 && event->type == GDK_BUTTON_PRESS)
+	{
+		path = gtk_icon_view_get_path_at_pos (GTK_ICON_VIEW (thumbview), 
+						      (gint) event->x, (gint) event->y);
+		if (path == NULL) {
+			return FALSE;
+		}
+
+		if (!gtk_icon_view_path_is_selected (GTK_ICON_VIEW (thumbview), path) ||
+		    eog_thumb_view_get_n_selected (EOG_THUMB_VIEW (thumbview)) != 1) {
+			gtk_icon_view_unselect_all (GTK_ICON_VIEW (thumbview));
+			gtk_icon_view_select_path (GTK_ICON_VIEW (thumbview), path);
+			gtk_icon_view_set_cursor (GTK_ICON_VIEW (thumbview), path, NULL, FALSE);
+		}
+		eog_thumb_view_popup_menu (EOG_THUMB_VIEW (thumbview), event);
 	    
-	    gtk_tree_path_free (path);
+		gtk_tree_path_free (path);
 
-	    return TRUE;
-    }
+		return TRUE;
+	}
     
-    return FALSE;
+	return FALSE;
 }
 
 static void
-tb_on_drag_data_get_cb (GtkWidget        *widget,
-			GdkDragContext   *drag_context,
-			GtkSelectionData *data,
-			guint             info,
-			guint             time,
-			gpointer          user_data) 
+thumbview_on_drag_data_get_cb (GtkWidget        *widget,
+			       GdkDragContext   *drag_context,
+			       GtkSelectionData *data,
+			       guint             info,
+			       guint             time,
+			       gpointer          user_data) 
 {
 	GList *list;
 	GList *node;
@@ -350,12 +350,12 @@
 }
 
 static gboolean 
-tb_on_query_tooltip_cb (GtkWidget  *widget,
-			gint        x,
-			gint        y,
-			gboolean    keyboard_mode,
-			GtkTooltip *tooltip,
-			gpointer    user_data)
+thumbview_on_query_tooltip_cb (GtkWidget  *widget,
+			       gint        x,
+			       gint        y,
+			       gboolean    keyboard_mode,
+			       GtkTooltip *tooltip,
+			       gpointer    user_data)
 {
 	GtkTreePath *path;
 	EogImage *image;
@@ -463,7 +463,7 @@
 		gchar time_buffer[32];
 		
 		date = eog_exif_util_format_date (
-				eog_exif_util_get_value (exif_data, EXIF_TAG_DATE_TIME_ORIGINAL, time_buffer, 32));
+			eog_exif_util_get_value (exif_data, EXIF_TAG_DATE_TIME_ORIGINAL, time_buffer, 32));
 
 		if (date) {
 			extra_info = g_strdup_printf ("\n%s %s", _("Taken on"), date);
@@ -491,17 +491,17 @@
 }
 
 static void
-eog_thumb_view_init (EogThumbView *tb)
+eog_thumb_view_init (EogThumbView *thumbview)
 {
-	tb->priv = EOG_THUMB_VIEW_GET_PRIVATE (tb);
+	thumbview->priv = EOG_THUMB_VIEW_GET_PRIVATE (thumbview);
 	
-	tb->priv->pixbuf_cell = eog_pixbuf_cell_renderer_new ();
+	thumbview->priv->pixbuf_cell = eog_pixbuf_cell_renderer_new ();
 
-	gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (tb), 
-	      	  		    tb->priv->pixbuf_cell, 
+	gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (thumbview), 
+	      	  		    thumbview->priv->pixbuf_cell, 
 	      			    FALSE);
 	
-	g_object_set (tb->priv->pixbuf_cell, 
+	g_object_set (thumbview->priv->pixbuf_cell, 
 	              "follow-state", FALSE, 
 	              "height", 100, 
 	              "width", 115, 
@@ -509,85 +509,85 @@
 	              "xalign", 0.5, 
 	              NULL);
 	
-	gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (tb),
-	                                tb->priv->pixbuf_cell, 
+	gtk_cell_layout_set_attributes (GTK_CELL_LAYOUT (thumbview),
+	                                thumbview->priv->pixbuf_cell, 
 	      		                "pixbuf", EOG_LIST_STORE_THUMBNAIL,
 	                                NULL);
 
-	gtk_icon_view_set_selection_mode (GTK_ICON_VIEW (tb),
+	gtk_icon_view_set_selection_mode (GTK_ICON_VIEW (thumbview),
  					  GTK_SELECTION_MULTIPLE);
 	
-	gtk_icon_view_set_column_spacing (GTK_ICON_VIEW (tb),
+	gtk_icon_view_set_column_spacing (GTK_ICON_VIEW (thumbview),
 					  EOG_THUMB_VIEW_SPACING);
 
-	gtk_icon_view_set_row_spacing (GTK_ICON_VIEW (tb),
+	gtk_icon_view_set_row_spacing (GTK_ICON_VIEW (thumbview),
 				       EOG_THUMB_VIEW_SPACING);
 
-	g_object_set (tb, "has-tooltip", TRUE, NULL);
+	g_object_set (thumbview, "has-tooltip", TRUE, NULL);
 
-	g_signal_connect (tb, 
+	g_signal_connect (thumbview, 
 			  "query-tooltip",
-			  G_CALLBACK (tb_on_query_tooltip_cb), 
+			  G_CALLBACK (thumbview_on_query_tooltip_cb), 
 			  NULL);
 
-	tb->priv->start_thumb = 0;
-	tb->priv->end_thumb = 0;
-	tb->priv->menu = NULL;
+	thumbview->priv->start_thumb = 0;
+	thumbview->priv->end_thumb = 0;
+	thumbview->priv->menu = NULL;
 	
-	g_signal_connect (G_OBJECT (tb), "parent-set", 
-			  G_CALLBACK (tb_on_parent_set_cb), NULL);
+	g_signal_connect (G_OBJECT (thumbview), "parent-set", 
+			  G_CALLBACK (thumbview_on_parent_set_cb), NULL);
 
-	gtk_icon_view_enable_model_drag_source (GTK_ICON_VIEW (tb), 0,
+	gtk_icon_view_enable_model_drag_source (GTK_ICON_VIEW (thumbview), 0,
 						target_table, G_N_ELEMENTS (target_table), 
 						GDK_ACTION_COPY);
 
-	g_signal_connect (G_OBJECT (tb), "drag-data-get", 
-			  G_CALLBACK (tb_on_drag_data_get_cb), NULL);
+	g_signal_connect (G_OBJECT (thumbview), "drag-data-get", 
+			  G_CALLBACK (thumbview_on_drag_data_get_cb), NULL);
 }
 
 GtkWidget *
 eog_thumb_view_new (void)
 {
-	EogThumbView *tb;
+	EogThumbView *thumbview;
 	
-	tb = g_object_new (EOG_TYPE_THUMB_VIEW, NULL);
+	thumbview = g_object_new (EOG_TYPE_THUMB_VIEW, NULL);
 
-	return GTK_WIDGET (tb);
+	return GTK_WIDGET (thumbview);
 }
 
 void
-eog_thumb_view_set_model (EogThumbView *tb, EogListStore *store)
+eog_thumb_view_set_model (EogThumbView *thumbview, EogListStore *store)
 {
 	gint index;
 	
-	g_return_if_fail (EOG_IS_THUMB_VIEW (tb));
+	g_return_if_fail (EOG_IS_THUMB_VIEW (thumbview));
 	g_return_if_fail (EOG_IS_LIST_STORE (store));
 	
 	index = eog_list_store_get_initial_pos (store);
 
-	gtk_icon_view_set_model (GTK_ICON_VIEW (tb), GTK_TREE_MODEL (store));
+	gtk_icon_view_set_model (GTK_ICON_VIEW (thumbview), GTK_TREE_MODEL (store));
 
 	if (index >= 0) {
 		GtkTreePath *path = gtk_tree_path_new_from_indices (index, -1);
-		gtk_icon_view_select_path (GTK_ICON_VIEW (tb), path);
-		gtk_icon_view_set_cursor (GTK_ICON_VIEW (tb), path, NULL, FALSE);
-		gtk_icon_view_scroll_to_path (GTK_ICON_VIEW (tb), path, FALSE, 0, 0);
+		gtk_icon_view_select_path (GTK_ICON_VIEW (thumbview), path);
+		gtk_icon_view_set_cursor (GTK_ICON_VIEW (thumbview), path, NULL, FALSE);
+		gtk_icon_view_scroll_to_path (GTK_ICON_VIEW (thumbview), path, FALSE, 0, 0);
 		gtk_tree_path_free (path);
 	}
 }
 
 void
-eog_thumb_view_set_item_height (EogThumbView *tb, gint height)
+eog_thumb_view_set_item_height (EogThumbView *thumbview, gint height)
 {
-	g_return_if_fail (EOG_IS_THUMB_VIEW (tb));
+	g_return_if_fail (EOG_IS_THUMB_VIEW (thumbview));
 
-	g_object_set (tb->priv->pixbuf_cell, 
+	g_object_set (thumbview->priv->pixbuf_cell, 
 	              "height", height, 
 	              NULL);
 }
 
 static void
-eog_thumb_view_get_n_selected_helper (GtkIconView *tb,
+eog_thumb_view_get_n_selected_helper (GtkIconView *thumbview,
 				      GtkTreePath *path,
 				      gpointer data)
 {
@@ -596,23 +596,23 @@
 }
 
 guint
-eog_thumb_view_get_n_selected (EogThumbView *tb)
+eog_thumb_view_get_n_selected (EogThumbView *thumbview)
 {
 	guint count = 0;
-	gtk_icon_view_selected_foreach (GTK_ICON_VIEW (tb),
+	gtk_icon_view_selected_foreach (GTK_ICON_VIEW (thumbview),
 					eog_thumb_view_get_n_selected_helper,
 					(&count));
 	return count;
 }
 
 static EogImage *
-eog_thumb_view_get_image_from_path (EogThumbView *tb, GtkTreePath *path)
+eog_thumb_view_get_image_from_path (EogThumbView *thumbview, GtkTreePath *path)
 {
 	GtkTreeModel *model;
 	GtkTreeIter iter;
 	EogImage *image;
 
-	model = gtk_icon_view_get_model (GTK_ICON_VIEW (tb));
+	model = gtk_icon_view_get_model (GTK_ICON_VIEW (thumbview));
 	gtk_tree_model_get_iter (model, &iter, path);
 
 	gtk_tree_model_get (model, &iter,
@@ -623,14 +623,14 @@
 }
 
 EogImage *
-eog_thumb_view_get_first_selected_image (EogThumbView *tb)
+eog_thumb_view_get_first_selected_image (EogThumbView *thumbview)
 {
 	/* The returned list is not sorted! We need to find the 
 	   smaller tree path value => tricky and expensive. Do we really need this?
 	*/
 	EogImage *image;
 	GtkTreePath *path;
-	GList *list = gtk_icon_view_get_selected_items (GTK_ICON_VIEW (tb));
+	GList *list = gtk_icon_view_get_selected_items (GTK_ICON_VIEW (thumbview));
 
 	if (list == NULL) {
 		return NULL;
@@ -638,7 +638,7 @@
 
 	path = (GtkTreePath *) (list->data);
 
-	image = eog_thumb_view_get_image_from_path (tb, path);
+	image = eog_thumb_view_get_image_from_path (thumbview, path);
 
 	g_list_foreach (list, (GFunc) gtk_tree_path_free , NULL);
 	g_list_free (list);
@@ -647,18 +647,18 @@
 }
 
 GList *
-eog_thumb_view_get_selected_images (EogThumbView *tb)
+eog_thumb_view_get_selected_images (EogThumbView *thumbview)
 {
 	GList *l, *item;
 	GList *list = NULL;
 
 	GtkTreePath *path;
 
-	l = gtk_icon_view_get_selected_items (GTK_ICON_VIEW (tb));
+	l = gtk_icon_view_get_selected_items (GTK_ICON_VIEW (thumbview));
 
 	for (item = l; item != NULL; item = item->next) {
 		path = (GtkTreePath *) item->data;
-		list = g_list_prepend (list, eog_thumb_view_get_image_from_path (tb, path));
+		list = g_list_prepend (list, eog_thumb_view_get_image_from_path (thumbview, path));
 		gtk_tree_path_free (path);
 	}
 
@@ -669,14 +669,14 @@
 }
 
 void
-eog_thumb_view_set_current_image (EogThumbView *tb, EogImage *image,
+eog_thumb_view_set_current_image (EogThumbView *thumbview, EogImage *image,
 				  gboolean deselect_other)
 {
 	GtkTreePath *path;
 	EogListStore *store;
 	gint pos;
 
-	store = EOG_LIST_STORE (gtk_icon_view_get_model (GTK_ICON_VIEW (tb)));
+	store = EOG_LIST_STORE (gtk_icon_view_get_model (GTK_ICON_VIEW (thumbview)));
 	pos = eog_list_store_get_pos_by_image (store, image);
 	path = gtk_tree_path_new_from_indices (pos, -1);
 
@@ -685,18 +685,18 @@
 	}
 
 	if (deselect_other) {
-		gtk_icon_view_unselect_all (GTK_ICON_VIEW (tb));
+		gtk_icon_view_unselect_all (GTK_ICON_VIEW (thumbview));
 	}
 	
-	gtk_icon_view_select_path (GTK_ICON_VIEW (tb), path);
-	gtk_icon_view_set_cursor (GTK_ICON_VIEW (tb), path, NULL, FALSE);
-	gtk_icon_view_scroll_to_path (GTK_ICON_VIEW (tb), path, FALSE, 0, 0);
+	gtk_icon_view_select_path (GTK_ICON_VIEW (thumbview), path);
+	gtk_icon_view_set_cursor (GTK_ICON_VIEW (thumbview), path, NULL, FALSE);
+	gtk_icon_view_scroll_to_path (GTK_ICON_VIEW (thumbview), path, FALSE, 0, 0);
 
 	gtk_tree_path_free (path);
 }
 
 void
-eog_thumb_view_select_single (EogThumbView *tb, 
+eog_thumb_view_select_single (EogThumbView *thumbview, 
 			      EogThumbViewSelectionChange change)
 {
   	GtkTreePath *path = NULL;
@@ -704,9 +704,9 @@
 	GList *list;
 	gint n_items;
 
-	g_return_if_fail (EOG_IS_THUMB_VIEW (tb));
+	g_return_if_fail (EOG_IS_THUMB_VIEW (thumbview));
 
-	model = gtk_icon_view_get_model (GTK_ICON_VIEW (tb));
+	model = gtk_icon_view_get_model (GTK_ICON_VIEW (thumbview));
 
 	n_items = eog_list_store_length (EOG_LIST_STORE (model));
 
@@ -714,7 +714,7 @@
 		return;
 	}
 	
-	if (eog_thumb_view_get_n_selected (tb) == 0) {
+	if (eog_thumb_view_get_n_selected (thumbview) == 0) {
 		switch (change) {
 		case EOG_THUMB_VIEW_SELECT_CURRENT:
 			break;
@@ -727,12 +727,12 @@
 			path = gtk_tree_path_new_from_indices (n_items - 1, -1);
 		}
 	} else {
-		list = gtk_icon_view_get_selected_items (GTK_ICON_VIEW (tb));
+		list = gtk_icon_view_get_selected_items (GTK_ICON_VIEW (thumbview));
 		path = gtk_tree_path_copy ((GtkTreePath *) list->data);
 		g_list_foreach (list, (GFunc) gtk_tree_path_free , NULL);
 		g_list_free (list);
 		
-		gtk_icon_view_unselect_all (GTK_ICON_VIEW (tb));
+		gtk_icon_view_unselect_all (GTK_ICON_VIEW (thumbview));
 		
 		switch (change) {
 		case EOG_THUMB_VIEW_SELECT_CURRENT:
@@ -761,39 +761,39 @@
 		}
 	}
 
-	gtk_icon_view_select_path (GTK_ICON_VIEW (tb), path);
-	gtk_icon_view_set_cursor (GTK_ICON_VIEW (tb), path, NULL, FALSE);
-	gtk_icon_view_scroll_to_path (GTK_ICON_VIEW (tb), path, FALSE, 0, 0);
+	gtk_icon_view_select_path (GTK_ICON_VIEW (thumbview), path);
+	gtk_icon_view_set_cursor (GTK_ICON_VIEW (thumbview), path, NULL, FALSE);
+	gtk_icon_view_scroll_to_path (GTK_ICON_VIEW (thumbview), path, FALSE, 0, 0);
 	gtk_tree_path_free (path);
 }
 
 
 void
-eog_thumb_view_set_thumbnail_popup (EogThumbView *tb,
+eog_thumb_view_set_thumbnail_popup (EogThumbView *thumbview,
 				    GtkMenu      *menu)
 {
-	g_return_if_fail (EOG_IS_THUMB_VIEW (tb));
-	g_return_if_fail (tb->priv->menu == NULL);
+	g_return_if_fail (EOG_IS_THUMB_VIEW (thumbview));
+	g_return_if_fail (thumbview->priv->menu == NULL);
 
-	tb->priv->menu = g_object_ref (menu);
+	thumbview->priv->menu = g_object_ref (menu);
 
-	gtk_menu_attach_to_widget (GTK_MENU (tb->priv->menu), 
-				   GTK_WIDGET (tb), 
+	gtk_menu_attach_to_widget (GTK_MENU (thumbview->priv->menu), 
+				   GTK_WIDGET (thumbview), 
 				   NULL);
 
-	g_signal_connect (G_OBJECT (tb), "button_press_event",
-			  G_CALLBACK (tb_on_button_press_event_cb), NULL);
+	g_signal_connect (G_OBJECT (thumbview), "button_press_event",
+			  G_CALLBACK (thumbview_on_button_press_event_cb), NULL);
 	
 }
 
 
 static void 
-eog_thumb_view_popup_menu (EogThumbView *tb, GdkEventButton *event)
+eog_thumb_view_popup_menu (EogThumbView *thumbview, GdkEventButton *event)
 {
 	GtkWidget *popup;
 	int button, event_time;
 
-	popup = tb->priv->menu;
+	popup = thumbview->priv->menu;
 	
 	if (event) {
 		button = event->button;



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