[gthumb] removed unused variables



commit eb414cd08b1bc5fde49872466da18479e41d2ab8
Author: Paolo Bacchilega <paobac src gnome org>
Date:   Mon Aug 22 14:29:41 2011 +0200

    removed unused variables

 .../contact_sheet/gth-contact-sheet-creator.c      |   16 ++--------------
 extensions/file_viewer/gth-file-viewer-page.c      |    3 ---
 extensions/gstreamer_tools/gth-media-viewer-page.c |    3 ---
 extensions/image_viewer/gth-image-viewer-page.c    |    3 ---
 extensions/jpeg_utils/jpeg-info.c                  |    4 ++--
 extensions/photobucket/photobucket-service.c       |    2 --
 extensions/red_eye_removal/gth-file-tool-red-eye.c |    7 +++----
 gthumb/cairo-utils.c                               |    2 --
 gthumb/gth-file-list.c                             |    3 ---
 gthumb/gth-file-store.c                            |    4 ----
 gthumb/gth-file-tool.c                             |    4 ----
 gthumb/gth-histogram.c                             |    3 +--
 gthumb/gth-image-navigator.c                       |    4 ----
 gthumb/main-migrate-catalogs.c                     |    6 +++---
 14 files changed, 11 insertions(+), 53 deletions(-)
---
diff --git a/extensions/contact_sheet/gth-contact-sheet-creator.c b/extensions/contact_sheet/gth-contact-sheet-creator.c
index 888dca4..ab97d4d 100644
--- a/extensions/contact_sheet/gth-contact-sheet-creator.c
+++ b/extensions/contact_sheet/gth-contact-sheet-creator.c
@@ -606,12 +606,10 @@ export (GthContactSheetCreator *self)
 	int        columns;
 	gboolean   first_row;
 	int        page_n = 0;
-	int        page_height;
 	int        header_height;
 	int        footer_height;
 	int        x, y;
 	GList     *scan;
-	ItemData  *item_data;
 	GError    *error = NULL;
 
 	if (self->priv->pixbuf_saver == NULL)
@@ -620,12 +618,10 @@ export (GthContactSheetCreator *self)
 	columns = ((self->priv->page_width - self->priv->theme->col_spacing) / (self->priv->thumb_width + (self->priv->theme->frame_hpadding * 2) + self->priv->theme->col_spacing));
 	first_row = TRUE;
 	begin_page (self, ++page_n);
-	page_height = get_page_height (self, page_n);
 	header_height = get_header_height (self, TRUE);
 	footer_height = get_footer_height (self, TRUE);
 	y = self->priv->theme->col_spacing;
 	scan = self->priv->files;
-	item_data = (ItemData*) scan->data;
 	do {
 		GList *first_item, *last_item;
 		int    i;
@@ -641,10 +637,7 @@ export (GthContactSheetCreator *self)
 				columns = i;
 				break;
 			}
-
 			last_item = scan = scan->next;
-			if (scan != NULL)
-				item_data = (ItemData *) scan->data;
 		}
 
 		if (columns == 0) {
@@ -681,7 +674,6 @@ export (GthContactSheetCreator *self)
 
 			first_row = TRUE;
 			begin_page (self, ++page_n);
-			page_height = get_page_height (self, page_n);
 			header_height = get_header_height (self, TRUE);
 			footer_height = get_footer_height (self, TRUE);
 			y = self->priv->theme->row_spacing;
@@ -809,9 +801,8 @@ compute_pages_size (GthContactSheetCreator *self)
 	self->priv->n_pages = 0;
 	columns = self->priv->columns_per_page;
 	for (scan = self->priv->files; scan != NULL; /* void */) {
-		ItemData *idata = (ItemData *) scan->data;
-		int       page_height;
-		int       r;
+		int page_height;
+		int r;
 
 		page_height = self->priv->theme->row_spacing;
 
@@ -836,10 +827,7 @@ compute_pages_size (GthContactSheetCreator *self)
 					columns = c;
 					break;
 				}
-
 				last_item = scan = scan->next;
-				if (scan != NULL)
-					idata = (ItemData*) scan->data;
 			}
 
 			if (columns == 0)
diff --git a/extensions/file_viewer/gth-file-viewer-page.c b/extensions/file_viewer/gth-file-viewer-page.c
index 7d1d031..9e93653 100644
--- a/extensions/file_viewer/gth-file-viewer-page.c
+++ b/extensions/file_viewer/gth-file-viewer-page.c
@@ -182,9 +182,6 @@ static gboolean
 gth_file_viewer_page_real_can_view (GthViewerPage *base,
 				    GthFileData   *file_data)
 {
-	GthFileViewerPage *self;
-
-	self = (GthFileViewerPage*) base;
 	g_return_val_if_fail (file_data != NULL, FALSE);
 
 	return TRUE;
diff --git a/extensions/gstreamer_tools/gth-media-viewer-page.c b/extensions/gstreamer_tools/gth-media-viewer-page.c
index 356e0f9..8563ef7 100644
--- a/extensions/gstreamer_tools/gth-media-viewer-page.c
+++ b/extensions/gstreamer_tools/gth-media-viewer-page.c
@@ -1044,9 +1044,6 @@ static gboolean
 gth_media_viewer_page_real_can_view (GthViewerPage *base,
 				     GthFileData   *file_data)
 {
-	GthMediaViewerPage *self;
-
-	self = (GthMediaViewerPage*) base;
 	g_return_val_if_fail (file_data != NULL, FALSE);
 
 	return _g_mime_type_is_video (gth_file_data_get_mime_type (file_data)) || _g_mime_type_is_audio (gth_file_data_get_mime_type (file_data));
diff --git a/extensions/image_viewer/gth-image-viewer-page.c b/extensions/image_viewer/gth-image-viewer-page.c
index d8e78c4..2c75eeb 100644
--- a/extensions/image_viewer/gth-image-viewer-page.c
+++ b/extensions/image_viewer/gth-image-viewer-page.c
@@ -925,9 +925,6 @@ static gboolean
 gth_image_viewer_page_real_can_view (GthViewerPage *base,
 				     GthFileData   *file_data)
 {
-	GthImageViewerPage *self;
-
-	self = (GthImageViewerPage*) base;
 	g_return_val_if_fail (file_data != NULL, FALSE);
 
 	return _g_mime_type_is_image (gth_file_data_get_mime_type (file_data));
diff --git a/extensions/jpeg_utils/jpeg-info.c b/extensions/jpeg_utils/jpeg-info.c
index a389bbf..915320e 100644
--- a/extensions/jpeg_utils/jpeg-info.c
+++ b/extensions/jpeg_utils/jpeg-info.c
@@ -281,13 +281,13 @@ _jpeg_get_image_info (GInputStream  *stream,
 
 		if ((marker_id == 0xc0) || (marker_id == 0xc2)) { /* SOF0 or SOF1 */
 			guint h, l;
-			guint size;
+			/*guint size;*/
 
 			/* size */
 
 			h = _g_input_stream_read_byte (stream, cancellable, error);
 			l = _g_input_stream_read_byte (stream, cancellable, error);
-			size = (h << 8) + l;
+			/*size = (h << 8) + l;*/
 
 			/* data precision */
 
diff --git a/extensions/photobucket/photobucket-service.c b/extensions/photobucket/photobucket-service.c
index 773db1d..9f0ec44 100644
--- a/extensions/photobucket/photobucket-service.c
+++ b/extensions/photobucket/photobucket-service.c
@@ -418,12 +418,10 @@ upload_photo_ready_cb (SoupSession *session,
 		       gpointer     user_data)
 {
 	PhotobucketService *self = user_data;
-	GSimpleAsyncResult *result;
 	DomDocument        *doc = NULL;
 	GError             *error = NULL;
 	GthFileData        *file_data;
 
-	result = oauth_connection_get_result (self->priv->conn);
 	if (! photobucket_utils_parse_response (msg, &doc, &error)) {
 		upload_photos_done (self, error);
 		return;
diff --git a/extensions/red_eye_removal/gth-file-tool-red-eye.c b/extensions/red_eye_removal/gth-file-tool-red-eye.c
index 9b1c9ee..8e083fc 100644
--- a/extensions/red_eye_removal/gth-file-tool-red-eye.c
+++ b/extensions/red_eye_removal/gth-file-tool-red-eye.c
@@ -305,9 +305,8 @@ fix_redeye (GdkPixbuf *pixbuf,
 	int       channels;
 	guchar   *pixels;
 	int       search, i, j, ii, jj;
-	int       ad_red, ad_blue, ad_green;
+	int       ad_blue, ad_green;
 	int       rtop, rbot, rleft, rright; /* edges of region */
-	int       num_pix;
 
 	width = gdk_pixbuf_get_width (pixbuf);
 	height = gdk_pixbuf_get_height (pixbuf);
@@ -328,7 +327,7 @@ fix_redeye (GdkPixbuf *pixbuf,
 
 				isred[j + i * width] = 2;
 
-				num_pix = find_region (i, j, &rtop, &rbot, &rleft, &rright, isred, width, height);
+				find_region (i, j, &rtop, &rbot, &rleft, &rright, isred, width, height);
 
 				/* Fix the region. */
 				for (ii = rtop; ii <= rbot; ii++)
@@ -337,7 +336,7 @@ fix_redeye (GdkPixbuf *pixbuf,
 							int ofs;
 
 							ofs = channels*jj + ii*rowstride;
-							ad_red = pixels[ofs] * RED_FACTOR;
+							/*ad_red = pixels[ofs] * RED_FACTOR;*/
 							ad_green = pixels[ofs + 1] * GREEN_FACTOR;
 							ad_blue = pixels[ofs + 2] * BLUE_FACTOR;
 
diff --git a/gthumb/cairo-utils.c b/gthumb/cairo-utils.c
index bcbfce8..8ea89f9 100644
--- a/gthumb/cairo-utils.c
+++ b/gthumb/cairo-utils.c
@@ -471,7 +471,6 @@ _cairo_image_surface_transform (cairo_surface_t *source,
 	int              line_start;
 	int              line_step;
 	int              pixel_step;
-	int              destination_stride;
 	unsigned char   *p_source_line;
 	unsigned char   *p_destination_line;
 	unsigned char   *p_source;
@@ -498,7 +497,6 @@ _cairo_image_surface_transform (cairo_surface_t *source,
 
 	destination = cairo_image_surface_create (format, destination_width, destination_height);
 	cairo_surface_flush (destination);
-	destination_stride = cairo_image_surface_get_stride (destination);
 	p_source_line = cairo_image_surface_get_data (source);
 	p_destination_line = cairo_image_surface_get_data (destination) + line_start;
 	while (height-- > 0) {
diff --git a/gthumb/gth-file-list.c b/gthumb/gth-file-list.c
index e0bf82c..0d1a34f 100644
--- a/gthumb/gth-file-list.c
+++ b/gthumb/gth-file-list.c
@@ -1785,7 +1785,6 @@ _gth_file_list_get_visibles (GthFileList *file_list)
 static void
 _gth_file_list_update_next_thumb (GthFileList *file_list)
 {
-	GthFileStore  *file_store;
 	int            pos;
 	int            first_pos;
 	int            last_pos;
@@ -1812,8 +1811,6 @@ _gth_file_list_update_next_thumb (GthFileList *file_list)
 		return;
 	}
 
-	file_store = (GthFileStore *) gth_file_view_get_model (GTH_FILE_VIEW (file_list->priv->view));
-
 	/* Find first visible undone. */
 
 	list = _gth_file_list_get_visibles (file_list);
diff --git a/gthumb/gth-file-store.c b/gthumb/gth-file-store.c
index 15c11b7..b94e464 100644
--- a/gthumb/gth-file-store.c
+++ b/gthumb/gth-file-store.c
@@ -815,7 +815,6 @@ _gth_file_store_update_visibility (GthFileStore *file_store,
 	GthFileData *file;
 	int          j, k;
 	gboolean     row_deleted;
-	gboolean     row_inserted;
 
 
 #ifdef DEBUG_FILE_STORE
@@ -1028,7 +1027,6 @@ g_print ("\n");
 
 	/* add the new files */
 
-	row_inserted = FALSE;
 	for (i = 0; i < new_rows_n; i++) {
 		GtkTreePath *path;
 		GtkTreeIter  iter;
@@ -1055,8 +1053,6 @@ g_print ("  INSERT: %d\n", i);
 		gth_file_store_get_iter (GTK_TREE_MODEL (file_store), &iter, path);
 		gtk_tree_model_row_inserted (GTK_TREE_MODEL (file_store), path, &iter);
 		gtk_tree_path_free (path);
-
-		row_inserted = TRUE;
 	}
 
 	g_signal_emit (file_store, gth_file_store_signals[VISIBILITY_CHANGED], 0);
diff --git a/gthumb/gth-file-tool.c b/gthumb/gth-file-tool.c
index 738e7c4..3fb50e5 100644
--- a/gthumb/gth-file-tool.c
+++ b/gthumb/gth-file-tool.c
@@ -74,13 +74,9 @@ gth_file_tool_base_destroy_options (GthFileTool *self)
 static void
 gth_file_tool_finalize (GObject *object)
 {
-	GthFileTool *self;
-
 	g_return_if_fail (object != NULL);
 	g_return_if_fail (GTH_IS_FILE_TOOL (object));
 
-	self = (GthFileTool *) object;
-
 	/* Chain up */
 	G_OBJECT_CLASS (parent_class)->finalize (object);
 }
diff --git a/gthumb/gth-histogram.c b/gthumb/gth-histogram.c
index 488c0bd..94bd61c 100644
--- a/gthumb/gth-histogram.c
+++ b/gthumb/gth-histogram.c
@@ -157,7 +157,7 @@ gth_histogram_calculate_for_pixbuf (GthHistogram    *self,
 {
 	int    **values;
 	int     *values_max;
-	int      width, height, has_alpha, n_channels;
+	int      width, height, n_channels;
 	int      rowstride;
 	guchar  *line, *pixel;
 	int      i, j, max;
@@ -174,7 +174,6 @@ gth_histogram_calculate_for_pixbuf (GthHistogram    *self,
 		return;
 	}
 
-	has_alpha  = gdk_pixbuf_get_has_alpha (pixbuf);
 	n_channels = gdk_pixbuf_get_n_channels (pixbuf);
 	rowstride  = gdk_pixbuf_get_rowstride (pixbuf);
 	line       = gdk_pixbuf_get_pixels (pixbuf);
diff --git a/gthumb/gth-image-navigator.c b/gthumb/gth-image-navigator.c
index 98b03db..f2bc584 100644
--- a/gthumb/gth-image-navigator.c
+++ b/gthumb/gth-image-navigator.c
@@ -51,12 +51,8 @@ static GtkHBoxClass *parent_class = NULL;
 static void
 gth_image_navigator_class_init (GthImageNavigatorClass *class)
 {
-	GObjectClass *object_class;
-
 	parent_class = g_type_class_peek_parent (class);
 	g_type_class_add_private (class, sizeof (GthImageNavigatorPrivate));
-
-	object_class = G_OBJECT_CLASS (class);
 }
 
 
diff --git a/gthumb/main-migrate-catalogs.c b/gthumb/main-migrate-catalogs.c
index 1f3d89d..27aaeae 100644
--- a/gthumb/main-migrate-catalogs.c
+++ b/gthumb/main-migrate-catalogs.c
@@ -154,7 +154,7 @@ migration_for_each_file (GFile     *file,
 				char       *s;
 				gboolean    b;
 				int         line_ofs;
-				gboolean    all_keywords;
+				/*gboolean    all_keywords;*/
 				time_t      date;
 				int         date_scope;
 
@@ -255,10 +255,10 @@ migration_for_each_file (GFile     *file,
 
 				n_line++;
 				line_ofs = 0;
-				all_keywords = FALSE;
+				/*all_keywords = FALSE;*/
 				if (lines[n_line][0] != '"') {
 					line_ofs = 1;
-					all_keywords = (*line == '1');
+					/*all_keywords = (*line == '1');*/
 				}
 				copy_unquoted (unquoted, lines[n_line] + line_ofs);
 				s = g_strdup (unquoted);



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