Commit d4230de8 authored by Cosimo Cecchi's avatar Cosimo Cecchi

all: silence new warnings from GCC 4.6

GCC 4.6 introduced a new warning about variables declared and
initialized, but not really used in the function body. Remove all of
these occurrences to build cleanly.
parent 155cc032
...@@ -408,46 +408,26 @@ eel_canvas_re_get_property (GObject *object, ...@@ -408,46 +408,26 @@ eel_canvas_re_get_property (GObject *object,
static void static void
eel_canvas_re_update_shared (EelCanvasItem *item, double i2w_dx, double i2w_dy, int flags) eel_canvas_re_update_shared (EelCanvasItem *item, double i2w_dx, double i2w_dy, int flags)
{ {
EelCanvasRE *re;
#ifdef VERBOSE #ifdef VERBOSE
g_print ("eel_canvas_re_update_shared\n"); g_print ("eel_canvas_re_update_shared\n");
#endif #endif
re = EEL_CANVAS_RE (item);
if (re_parent_class->update) if (re_parent_class->update)
(* re_parent_class->update) (item, i2w_dx, i2w_dy, flags); (* re_parent_class->update) (item, i2w_dx, i2w_dy, flags);
#ifdef OLD_XFORM
recalc_bounds (re);
#endif
} }
static void static void
eel_canvas_re_realize (EelCanvasItem *item) eel_canvas_re_realize (EelCanvasItem *item)
{ {
EelCanvasRE *re;
#ifdef VERBOSE #ifdef VERBOSE
g_print ("eel_canvas_re_realize\n"); g_print ("eel_canvas_re_realize\n");
#endif #endif
re = EEL_CANVAS_RE (item);
if (re_parent_class->realize) if (re_parent_class->realize)
(* re_parent_class->realize) (item); (* re_parent_class->realize) (item);
#ifdef OLD_XFORM
(* EEL_CANVAS_ITEM_CLASS (item->object.klass)->update) (item, NULL, NULL, 0);
#endif
} }
static void static void
eel_canvas_re_unrealize (EelCanvasItem *item) eel_canvas_re_unrealize (EelCanvasItem *item)
{ {
EelCanvasRE *re;
re = EEL_CANVAS_RE (item);
if (re_parent_class->unrealize) if (re_parent_class->unrealize)
(* re_parent_class->unrealize) (item); (* re_parent_class->unrealize) (item);
} }
......
...@@ -1325,12 +1325,10 @@ static void ...@@ -1325,12 +1325,10 @@ static void
eel_canvas_group_get_property (GObject *gobject, guint param_id, eel_canvas_group_get_property (GObject *gobject, guint param_id,
GValue *value, GParamSpec *pspec) GValue *value, GParamSpec *pspec)
{ {
EelCanvasItem *item;
EelCanvasGroup *group; EelCanvasGroup *group;
g_return_if_fail (EEL_IS_CANVAS_GROUP (gobject)); g_return_if_fail (EEL_IS_CANVAS_GROUP (gobject));
item = EEL_CANVAS_ITEM (gobject);
group = EEL_CANVAS_GROUP (gobject); group = EEL_CANVAS_GROUP (gobject);
switch (param_id) { switch (param_id) {
...@@ -2662,9 +2660,6 @@ pick_current_item (EelCanvas *canvas, GdkEvent *event) ...@@ -2662,9 +2660,6 @@ pick_current_item (EelCanvas *canvas, GdkEvent *event)
&& (canvas->current_item != NULL) && (canvas->current_item != NULL)
&& !canvas->left_grabbed_item) { && !canvas->left_grabbed_item) {
GdkEvent new_event; GdkEvent new_event;
EelCanvasItem *item;
item = canvas->current_item;
new_event = canvas->pick_event; new_event = canvas->pick_event;
new_event.type = GDK_LEAVE_NOTIFY; new_event.type = GDK_LEAVE_NOTIFY;
......
...@@ -413,10 +413,7 @@ static void ...@@ -413,10 +413,7 @@ static void
target_destroy_callback (GtkWidget *object, target_destroy_callback (GtkWidget *object,
gpointer callback_data) gpointer callback_data)
{ {
TargetCallbackData *target_data;
g_assert (callback_data != NULL); g_assert (callback_data != NULL);
target_data = callback_data;
if (clipboard_items_are_merged_in (object)) { if (clipboard_items_are_merged_in (object)) {
merge_out_clipboard_menu_items (G_OBJECT (object), callback_data); merge_out_clipboard_menu_items (G_OBJECT (object), callback_data);
......
...@@ -349,9 +349,6 @@ nautilus_desktop_icon_file_set_metadata (NautilusFile *file, ...@@ -349,9 +349,6 @@ nautilus_desktop_icon_file_set_metadata (NautilusFile *file,
const char *key, const char *key,
const char *value) const char *value)
{ {
NautilusDesktopIconFile *desktop_file;
desktop_file = NAUTILUS_DESKTOP_ICON_FILE (file);
nautilus_desktop_set_metadata_string (file, file->details->name, key, value); nautilus_desktop_set_metadata_string (file, file->details->name, key, value);
} }
...@@ -360,9 +357,6 @@ nautilus_desktop_icon_file_set_metadata_as_list (NautilusFile *file, ...@@ -360,9 +357,6 @@ nautilus_desktop_icon_file_set_metadata_as_list (NautilusFile *file,
const char *key, const char *key,
char **value) char **value)
{ {
NautilusDesktopIconFile *desktop_file;
desktop_file = NAUTILUS_DESKTOP_ICON_FILE (file);
nautilus_desktop_set_metadata_stringv (file, file->details->name, key, value); nautilus_desktop_set_metadata_stringv (file, file->details->name, key, value);
} }
......
...@@ -2854,9 +2854,6 @@ deep_count_callback (GObject *source_object, ...@@ -2854,9 +2854,6 @@ deep_count_callback (GObject *source_object,
static void static void
deep_count_load (DeepCountState *state, GFile *location) deep_count_load (DeepCountState *state, GFile *location)
{ {
NautilusDirectory *directory;
directory = state->directory;
state->deep_count_location = g_object_ref (location); state->deep_count_location = g_object_ref (location);
#ifdef DEBUG_LOAD_DIRECTORY #ifdef DEBUG_LOAD_DIRECTORY
......
...@@ -254,9 +254,7 @@ collect_all_directories (gpointer key, gpointer value, gpointer callback_data) ...@@ -254,9 +254,7 @@ collect_all_directories (gpointer key, gpointer value, gpointer callback_data)
{ {
NautilusDirectory *directory; NautilusDirectory *directory;
GList **dirs; GList **dirs;
GFile *location;
location = (GFile *) key;
directory = NAUTILUS_DIRECTORY (value); directory = NAUTILUS_DIRECTORY (value);
dirs = callback_data; dirs = callback_data;
......
...@@ -61,9 +61,6 @@ static GtkEditableInterface *parent_editable_interface = NULL; ...@@ -61,9 +61,6 @@ static GtkEditableInterface *parent_editable_interface = NULL;
static void static void
nautilus_entry_init (NautilusEntry *entry) nautilus_entry_init (NautilusEntry *entry)
{ {
GtkWidget *widget;
widget = GTK_WIDGET (entry);
entry->details = g_new0 (NautilusEntryDetails, 1); entry->details = g_new0 (NautilusEntryDetails, 1);
entry->details->user_edit = TRUE; entry->details->user_edit = TRUE;
...@@ -163,10 +160,8 @@ nautilus_entry_motion_notify (GtkWidget *widget, GdkEventMotion *event) ...@@ -163,10 +160,8 @@ nautilus_entry_motion_notify (GtkWidget *widget, GdkEventMotion *event)
int result; int result;
gboolean old_had, new_had; gboolean old_had, new_had;
int old_start, old_end, new_start, new_end; int old_start, old_end, new_start, new_end;
NautilusEntry *entry;
GtkEditable *editable; GtkEditable *editable;
entry = NAUTILUS_ENTRY (widget);
editable = GTK_EDITABLE (widget); editable = GTK_EDITABLE (widget);
old_had = gtk_editable_get_selection_bounds (editable, &old_start, &old_end); old_had = gtk_editable_get_selection_bounds (editable, &old_start, &old_end);
......
...@@ -99,12 +99,11 @@ file_list_ready_cb (GList *files, ...@@ -99,12 +99,11 @@ file_list_ready_cb (GList *files,
NautilusFileConflictDialog *fcd = user_data; NautilusFileConflictDialog *fcd = user_data;
NautilusFile *src, *dest, *dest_dir; NautilusFile *src, *dest, *dest_dir;
time_t src_mtime, dest_mtime; time_t src_mtime, dest_mtime;
GtkDialog *dialog;
gboolean source_is_dir, dest_is_dir, should_show_type; gboolean source_is_dir, dest_is_dir, should_show_type;
NautilusFileConflictDialogDetails *details; NautilusFileConflictDialogDetails *details;
char *primary_text, *message, *secondary_text; char *primary_text, *message, *secondary_text;
const gchar *message_extra; const gchar *message_extra;
char *src_name, *dest_name, *dest_dir_name, *edit_name; char *dest_name, *dest_dir_name, *edit_name;
char *label_text; char *label_text;
char *size, *date, *type = NULL; char *size, *date, *type = NULL;
GdkPixbuf *pixbuf; GdkPixbuf *pixbuf;
...@@ -112,7 +111,6 @@ file_list_ready_cb (GList *files, ...@@ -112,7 +111,6 @@ file_list_ready_cb (GList *files,
GString *str; GString *str;
PangoAttrList *attr_list; PangoAttrList *attr_list;
dialog = GTK_DIALOG (fcd);
details = fcd->details; details = fcd->details;
details->handle = NULL; details->handle = NULL;
...@@ -124,7 +122,6 @@ file_list_ready_cb (GList *files, ...@@ -124,7 +122,6 @@ file_list_ready_cb (GList *files,
src_mtime = nautilus_file_get_mtime (src); src_mtime = nautilus_file_get_mtime (src);
dest_mtime = nautilus_file_get_mtime (dest); dest_mtime = nautilus_file_get_mtime (dest);
src_name = nautilus_file_get_display_name (src);
dest_name = nautilus_file_get_display_name (dest); dest_name = nautilus_file_get_display_name (dest);
dest_dir_name = nautilus_file_get_display_name (dest_dir); dest_dir_name = nautilus_file_get_display_name (dest_dir);
......
...@@ -4668,7 +4668,7 @@ move_file_prepare (CopyMoveJob *move_job, ...@@ -4668,7 +4668,7 @@ move_file_prepare (CopyMoveJob *move_job,
GFile *dest, *new_dest; GFile *dest, *new_dest;
GError *error; GError *error;
CommonJob *job; CommonJob *job;
gboolean overwrite, renamed; gboolean overwrite;
char *primary, *secondary, *details; char *primary, *secondary, *details;
int response; int response;
GFileCopyFlags flags; GFileCopyFlags flags;
...@@ -4676,7 +4676,6 @@ move_file_prepare (CopyMoveJob *move_job, ...@@ -4676,7 +4676,6 @@ move_file_prepare (CopyMoveJob *move_job,
gboolean handled_invalid_filename; gboolean handled_invalid_filename;
overwrite = FALSE; overwrite = FALSE;
renamed = FALSE;
handled_invalid_filename = *dest_fs_type != NULL; handled_invalid_filename = *dest_fs_type != NULL;
job = (CommonJob *)move_job; job = (CommonJob *)move_job;
...@@ -4814,7 +4813,6 @@ move_file_prepare (CopyMoveJob *move_job, ...@@ -4814,7 +4813,6 @@ move_file_prepare (CopyMoveJob *move_job,
g_object_unref (dest); g_object_unref (dest);
dest = get_target_file_for_display_name (dest_dir, dest = get_target_file_for_display_name (dest_dir,
response->new_name); response->new_name);
renamed = TRUE;
conflict_response_data_free (response); conflict_response_data_free (response);
goto retry; goto retry;
} else { } else {
...@@ -5321,8 +5319,6 @@ link_job (GIOSchedulerJob *io_job, ...@@ -5321,8 +5319,6 @@ link_job (GIOSchedulerJob *io_job,
{ {
CopyMoveJob *job; CopyMoveJob *job;
CommonJob *common; CommonJob *common;
GList *copy_files;
GArray *copy_positions;
GFile *src; GFile *src;
GdkPoint *point; GdkPoint *point;
char *dest_fs_type; char *dest_fs_type;
...@@ -5334,9 +5330,6 @@ link_job (GIOSchedulerJob *io_job, ...@@ -5334,9 +5330,6 @@ link_job (GIOSchedulerJob *io_job,
common = &job->common; common = &job->common;
common->io_job = io_job; common->io_job = io_job;
copy_files = NULL;
copy_positions = NULL;
dest_fs_type = NULL; dest_fs_type = NULL;
nautilus_progress_info_start (job->common.progress); nautilus_progress_info_start (job->common.progress);
......
...@@ -808,12 +808,8 @@ draw_frame (NautilusIconCanvasItem *item, ...@@ -808,12 +808,8 @@ draw_frame (NautilusIconCanvasItem *item,
int width, int width,
int height) int height)
{ {
NautilusIconContainer *container; cairo_save (cr);
container = NAUTILUS_ICON_CONTAINER (EEL_CANVAS_ITEM (item)->canvas);
cairo_save (cr);
/* Set the rounded rect clip region. Magic rounding value taken /* Set the rounded rect clip region. Magic rounding value taken
* from old code. * from old code.
*/ */
...@@ -821,7 +817,7 @@ draw_frame (NautilusIconCanvasItem *item, ...@@ -821,7 +817,7 @@ draw_frame (NautilusIconCanvasItem *item,
gdk_cairo_set_source_rgba (cr, color); gdk_cairo_set_source_rgba (cr, color);
cairo_fill (cr); cairo_fill (cr);
cairo_restore (cr); cairo_restore (cr);
} }
/* Keep these for a bit while we work on performance of draw_or_measure_label_text. */ /* Keep these for a bit while we work on performance of draw_or_measure_label_text. */
...@@ -970,11 +966,9 @@ measure_label_text (NautilusIconCanvasItem *item) ...@@ -970,11 +966,9 @@ measure_label_text (NautilusIconCanvasItem *item)
NautilusIconContainer *container; NautilusIconContainer *container;
gint editable_height, editable_height_for_layout, editable_height_for_entire_text, editable_width, editable_dx; gint editable_height, editable_height_for_layout, editable_height_for_entire_text, editable_width, editable_dx;
gint additional_height, additional_width, additional_dx; gint additional_height, additional_width, additional_dx;
EelCanvasItem *canvas_item;
PangoLayout *editable_layout; PangoLayout *editable_layout;
PangoLayout *additional_layout; PangoLayout *additional_layout;
gboolean have_editable, have_additional, needs_highlight; gboolean have_editable, have_additional;
int max_text_width;
/* check to see if the cached values are still valid; if so, there's /* check to see if the cached values are still valid; if so, there's
* no work necessary * no work necessary
...@@ -985,7 +979,6 @@ measure_label_text (NautilusIconCanvasItem *item) ...@@ -985,7 +979,6 @@ measure_label_text (NautilusIconCanvasItem *item)
} }
details = item->details; details = item->details;
needs_highlight = details->is_highlighted_for_selection || details->is_highlighted_for_drop;
have_editable = details->editable_text != NULL && details->editable_text[0] != '\0'; have_editable = details->editable_text != NULL && details->editable_text[0] != '\0';
have_additional = details->additional_text != NULL && details->additional_text[0] != '\0'; have_additional = details->additional_text != NULL && details->additional_text[0] != '\0';
...@@ -1008,8 +1001,6 @@ measure_label_text (NautilusIconCanvasItem *item) ...@@ -1008,8 +1001,6 @@ measure_label_text (NautilusIconCanvasItem *item)
return; return;
#endif #endif
canvas_item = EEL_CANVAS_ITEM (item);
editable_width = 0; editable_width = 0;
editable_height = 0; editable_height = 0;
editable_height_for_layout = 0; editable_height_for_layout = 0;
...@@ -1019,8 +1010,6 @@ measure_label_text (NautilusIconCanvasItem *item) ...@@ -1019,8 +1010,6 @@ measure_label_text (NautilusIconCanvasItem *item)
additional_height = 0; additional_height = 0;
additional_dx = 0; additional_dx = 0;
max_text_width = floor (nautilus_icon_canvas_item_get_max_text_width (item));
container = NAUTILUS_ICON_CONTAINER (EEL_CANVAS_ITEM (item)->canvas); container = NAUTILUS_ICON_CONTAINER (EEL_CANVAS_ITEM (item)->canvas);
editable_layout = NULL; editable_layout = NULL;
additional_layout = NULL; additional_layout = NULL;
...@@ -1363,13 +1352,11 @@ real_map_pixbuf (NautilusIconCanvasItem *icon_item) ...@@ -1363,13 +1352,11 @@ real_map_pixbuf (NautilusIconCanvasItem *icon_item)
{ {
EelCanvas *canvas; EelCanvas *canvas;
char *audio_filename; char *audio_filename;
NautilusIconContainer *container;
GdkPixbuf *temp_pixbuf, *old_pixbuf, *audio_pixbuf; GdkPixbuf *temp_pixbuf, *old_pixbuf, *audio_pixbuf;
int emblem_size; int emblem_size;
temp_pixbuf = icon_item->details->pixbuf; temp_pixbuf = icon_item->details->pixbuf;
canvas = EEL_CANVAS_ITEM(icon_item)->canvas; canvas = EEL_CANVAS_ITEM(icon_item)->canvas;
container = NAUTILUS_ICON_CONTAINER (canvas);
g_object_ref (temp_pixbuf); g_object_ref (temp_pixbuf);
...@@ -1933,7 +1920,6 @@ nautilus_icon_canvas_item_ensure_bounds_up_to_date (NautilusIconCanvasItem *icon ...@@ -1933,7 +1920,6 @@ nautilus_icon_canvas_item_ensure_bounds_up_to_date (NautilusIconCanvasItem *icon
EelIRect total_rect, total_rect_for_layout, total_rect_for_entire_text; EelIRect total_rect, total_rect_for_layout, total_rect_for_entire_text;
EelCanvasItem *item; EelCanvasItem *item;
double pixels_per_unit; double pixels_per_unit;
gboolean is_rtl;
details = icon_item->details; details = icon_item->details;
item = EEL_CANVAS_ITEM (icon_item); item = EEL_CANVAS_ITEM (icon_item);
...@@ -1964,8 +1950,6 @@ nautilus_icon_canvas_item_ensure_bounds_up_to_date (NautilusIconCanvasItem *icon ...@@ -1964,8 +1950,6 @@ nautilus_icon_canvas_item_ensure_bounds_up_to_date (NautilusIconCanvasItem *icon
text_rect = compute_text_rectangle (icon_item, icon_rect, FALSE, BOUNDS_USAGE_FOR_DISPLAY); text_rect = compute_text_rectangle (icon_item, icon_rect, FALSE, BOUNDS_USAGE_FOR_DISPLAY);
text_rect_for_layout = compute_text_rectangle (icon_item, icon_rect, FALSE, BOUNDS_USAGE_FOR_LAYOUT); text_rect_for_layout = compute_text_rectangle (icon_item, icon_rect, FALSE, BOUNDS_USAGE_FOR_LAYOUT);
text_rect_for_entire_text = compute_text_rectangle (icon_item, icon_rect, FALSE, BOUNDS_USAGE_FOR_ENTIRE_ITEM); text_rect_for_entire_text = compute_text_rectangle (icon_item, icon_rect, FALSE, BOUNDS_USAGE_FOR_ENTIRE_ITEM);
is_rtl = nautilus_icon_container_is_layout_rtl (NAUTILUS_ICON_CONTAINER (item->canvas));
/* Compute total rectangle */ /* Compute total rectangle */
eel_irect_union (&total_rect, &icon_rect, &text_rect); eel_irect_union (&total_rect, &icon_rect, &text_rect);
...@@ -2417,7 +2401,6 @@ nautilus_icon_canvas_item_accessible_do_action (AtkAction *accessible, ...@@ -2417,7 +2401,6 @@ nautilus_icon_canvas_item_accessible_do_action (AtkAction *accessible,
{ {
NautilusIconCanvasItem *item; NautilusIconCanvasItem *item;
NautilusIconCanvasItemAccessibleActionContext *ctx; NautilusIconCanvasItemAccessibleActionContext *ctx;
NautilusIcon *icon;
NautilusIconContainer *container; NautilusIconContainer *container;
g_assert (i < LAST_ACTION); g_assert (i < LAST_ACTION);
...@@ -2426,7 +2409,7 @@ nautilus_icon_canvas_item_accessible_do_action (AtkAction *accessible, ...@@ -2426,7 +2409,7 @@ nautilus_icon_canvas_item_accessible_do_action (AtkAction *accessible,
if (!item) { if (!item) {
return FALSE; return FALSE;
} }
icon = item->user_data;
container = NAUTILUS_ICON_CONTAINER (EEL_CANVAS_ITEM (item)->canvas); container = NAUTILUS_ICON_CONTAINER (EEL_CANVAS_ITEM (item)->canvas);
switch (i) { switch (i) {
case ACTION_OPEN: case ACTION_OPEN:
......
...@@ -304,7 +304,7 @@ icon_set_position (NautilusIcon *icon, ...@@ -304,7 +304,7 @@ icon_set_position (NautilusIcon *icon,
int container_x, container_y, container_width, container_height; int container_x, container_y, container_width, container_height;
EelDRect icon_bounds; EelDRect icon_bounds;
int item_width, item_height; int item_width, item_height;
int height_above, height_below, width_left, width_right; int height_above, width_left;
int min_x, max_x, min_y, max_y; int min_x, max_x, min_y, max_y;
if (icon->x == x && icon->y == y) { if (icon->x == x && icon->y == y) {
...@@ -355,9 +355,7 @@ icon_set_position (NautilusIcon *icon, ...@@ -355,9 +355,7 @@ icon_set_position (NautilusIcon *icon,
/* determine icon rectangle relative to item rectangle */ /* determine icon rectangle relative to item rectangle */
height_above = icon_bounds.y0 - y1; height_above = icon_bounds.y0 - y1;
height_below = y2 - icon_bounds.y1;
width_left = icon_bounds.x0 - x1; width_left = icon_bounds.x0 - x1;
width_right = x2 - icon_bounds.x1;
min_x = container_left + DESKTOP_PAD_HORIZONTAL + width_left; min_x = container_left + DESKTOP_PAD_HORIZONTAL + width_left;
max_x = container_right - DESKTOP_PAD_HORIZONTAL - item_width + width_left; max_x = container_right - DESKTOP_PAD_HORIZONTAL - item_width + width_left;
...@@ -689,7 +687,6 @@ static void ...@@ -689,7 +687,6 @@ static void
reveal_icon (NautilusIconContainer *container, reveal_icon (NautilusIconContainer *container,
NautilusIcon *icon) NautilusIcon *icon)
{ {
NautilusIconContainerDetails *details;
GtkAllocation allocation; GtkAllocation allocation;
GtkAdjustment *hadj, *vadj; GtkAdjustment *hadj, *vadj;
EelIRect bounds; EelIRect bounds;
...@@ -701,7 +698,6 @@ reveal_icon (NautilusIconContainer *container, ...@@ -701,7 +698,6 @@ reveal_icon (NautilusIconContainer *container,
set_pending_icon_to_reveal (container, NULL); set_pending_icon_to_reveal (container, NULL);
details = container->details;
gtk_widget_get_allocation (GTK_WIDGET (container), &allocation); gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
hadj = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (container)); hadj = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (container));
...@@ -1259,7 +1255,7 @@ lay_down_icons_horizontal (NautilusIconContainer *container, ...@@ -1259,7 +1255,7 @@ lay_down_icons_horizontal (NautilusIconContainer *container,
{ {
GList *p, *line_start; GList *p, *line_start;
NautilusIcon *icon; NautilusIcon *icon;
double canvas_width, y, canvas_height; double canvas_width, y;
GArray *positions; GArray *positions;
IconPositions *position; IconPositions *position;
EelDRect bounds; EelDRect bounds;
...@@ -1286,8 +1282,6 @@ lay_down_icons_horizontal (NautilusIconContainer *container, ...@@ -1286,8 +1282,6 @@ lay_down_icons_horizontal (NautilusIconContainer *container,
/* Lay out icons a line at a time. */ /* Lay out icons a line at a time. */
canvas_width = CANVAS_WIDTH(container, allocation); canvas_width = CANVAS_WIDTH(container, allocation);
canvas_height = CANVAS_HEIGHT(container, allocation);
max_icon_width = max_text_width = 0.0; max_icon_width = max_text_width = 0.0;
if (container->details->label_position == NAUTILUS_ICON_LABEL_POSITION_BESIDE) { if (container->details->label_position == NAUTILUS_ICON_LABEL_POSITION_BESIDE) {
...@@ -1457,12 +1451,11 @@ lay_down_icons_vertical (NautilusIconContainer *container, ...@@ -1457,12 +1451,11 @@ lay_down_icons_vertical (NautilusIconContainer *container,
{ {
GList *p, *line_start; GList *p, *line_start;
NautilusIcon *icon; NautilusIcon *icon;
double canvas_width, x, canvas_height; double x, canvas_height;
GArray *positions; GArray *positions;
IconPositions *position; IconPositions *position;
EelDRect icon_bounds; EelDRect icon_bounds;
EelDRect text_bounds; EelDRect text_bounds;
EelCanvasItem *item;
GtkAllocation allocation; GtkAllocation allocation;
double line_height; double line_height;
...@@ -1491,7 +1484,6 @@ lay_down_icons_vertical (NautilusIconContainer *container, ...@@ -1491,7 +1484,6 @@ lay_down_icons_vertical (NautilusIconContainer *container,
gtk_widget_get_allocation (GTK_WIDGET (container), &allocation); gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
/* Lay out icons a column at a time. */ /* Lay out icons a column at a time. */
canvas_width = CANVAS_WIDTH(container, allocation);
canvas_height = CANVAS_HEIGHT(container, allocation); canvas_height = CANVAS_HEIGHT(container, allocation);
max_icon_width = max_text_width = 0.0; max_icon_width = max_text_width = 0.0;
...@@ -1518,7 +1510,6 @@ lay_down_icons_vertical (NautilusIconContainer *container, ...@@ -1518,7 +1510,6 @@ lay_down_icons_vertical (NautilusIconContainer *container,
for (p = icons; p != NULL; p = p->next) { for (p = icons; p != NULL; p = p->next) {
icon = p->data; icon = p->data;
item = EEL_CANVAS_ITEM (icon->item);
/* If this icon doesn't fit, it's time to lay out the column that's queued up. */ /* If this icon doesn't fit, it's time to lay out the column that's queued up. */
...@@ -1956,14 +1947,13 @@ lay_down_icons_vertical_desktop (NautilusIconContainer *container, GList *icons) ...@@ -1956,14 +1947,13 @@ lay_down_icons_vertical_desktop (NautilusIconContainer *container, GList *icons)
GList *p, *placed_icons, *unplaced_icons; GList *p, *placed_icons, *unplaced_icons;
int total, new_length, placed; int total, new_length, placed;
NautilusIcon *icon; NautilusIcon *icon;
int width, height, max_width, column_width, icon_width, icon_height; int height, max_width, column_width, icon_width, icon_height;
int x, y, x1, x2, y1, y2; int x, y, x1, x2, y1, y2;
EelDRect icon_rect; EelDRect icon_rect;
GtkAllocation allocation; GtkAllocation allocation;
/* Get container dimensions */ /* Get container dimensions */
gtk_widget_get_allocation (GTK_WIDGET (container), &allocation); gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
width = CANVAS_WIDTH(container, allocation);
height = CANVAS_HEIGHT(container, allocation); height = CANVAS_HEIGHT(container, allocation);
/* Determine which icons have and have not been placed */ /* Determine which icons have and have not been placed */
...@@ -5048,7 +5038,6 @@ nautilus_icon_container_search_move (GtkWidget *window, ...@@ -5048,7 +5038,6 @@ nautilus_icon_container_search_move (GtkWidget *window,
{ {
gboolean ret; gboolean ret;
gint len; gint len;
gint count = 0;
const gchar *text; const gchar *text;
text = gtk_entry_get_text (GTK_ENTRY (container->details->search_entry)); text = gtk_entry_get_text (GTK_ENTRY (container->details->search_entry));
...@@ -5080,7 +5069,6 @@ nautilus_icon_container_search_move (GtkWidget *window, ...@@ -5080,7 +5069,6 @@ nautilus_icon_container_search_move (GtkWidget *window,
container->details->selected_iter += up?(-1):(1); container->details->selected_iter += up?(-1):(1);
} else { } else {
/* return to old iter */ /* return to old iter */
count = 0;
nautilus_icon_container_search_iter (container, text, nautilus_icon_container_search_iter (container, text,
container->details->selected_iter); container->details->selected_iter);
} }
...@@ -5213,9 +5201,7 @@ nautilus_icon_container_search_init (GtkWidget *entry, ...@@ -5213,9 +5201,7 @@ nautilus_icon_container_search_init (GtkWidget *entry,
static void static void
nautilus_icon_container_ensure_interactive_directory (NautilusIconContainer *container) nautilus_icon_container_ensure_interactive_directory (NautilusIconContainer *container)
{ {
GtkWidget *frame, *vbox, *toplevel; GtkWidget *frame, *vbox;
toplevel = gtk_widget_get_toplevel (GTK_WIDGET (container));
if (container->details->search_window != NULL) { if (container->details->search_window != NULL) {
return; return;
...@@ -6363,11 +6349,9 @@ item_event_callback (EelCanvasItem *item, ...@@ -6363,11 +6349,9 @@ item_event_callback (EelCanvasItem *item,
gpointer data) gpointer data)
{ {
NautilusIconContainer *container; NautilusIconContainer *container;
NautilusIconContainerDetails *details;
NautilusIcon *icon; NautilusIcon *icon;
container = NAUTILUS_ICON_CONTAINER (data); container = NAUTILUS_ICON_CONTAINER (data);
details = container->details;
icon = NAUTILUS_ICON_CANVAS_ITEM (item)->user_data; icon = NAUTILUS_ICON_CANVAS_ITEM (item)->user_data;
g_assert (icon != NULL); g_assert (icon != NULL);
...@@ -6526,7 +6510,6 @@ nautilus_icon_container_scroll_to_icon (NautilusIconContainer *container, ...@@ -6526,7 +6510,6 @@ nautilus_icon_container_scroll_to_icon (NautilusIconContainer *container,
GList *l; GList *l;
NautilusIcon *icon; NautilusIcon *icon;
GtkAdjustment *hadj, *vadj;