summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
authorStefano Karapetsas <[email protected]>2012-12-23 11:14:36 -0800
committerStefano Karapetsas <[email protected]>2012-12-23 11:14:36 -0800
commit3ec2cb1ade8ed91ed472091adcc592485dc49f4d (patch)
tree122f234160898266040a89a6767871856bd607c9 /libcaja-private
parent8379b1dc107c9e0daf31ef1b654c9ab44d9bac23 (diff)
parentc598aa7e65d9e370c63f883acbbb6504044c2531 (diff)
downloadcaja-3ec2cb1ade8ed91ed472091adcc592485dc49f4d.tar.bz2
caja-3ec2cb1ade8ed91ed472091adcc592485dc49f4d.tar.xz
Merge pull request #65 from jasmineaura/develop
Most of remaining deprecations, some cleanups, and a leak fix
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-clipboard.c3
-rw-r--r--libcaja-private/caja-desktop-icon-file.c6
-rw-r--r--libcaja-private/caja-directory-async.c3
-rw-r--r--libcaja-private/caja-directory.c2
-rw-r--r--libcaja-private/caja-dnd.c2
-rw-r--r--libcaja-private/caja-dnd.h2
-rw-r--r--libcaja-private/caja-entry.c5
-rw-r--r--libcaja-private/caja-file-conflict-dialog.c5
-rw-r--r--libcaja-private/caja-file-operations.c9
-rw-r--r--libcaja-private/caja-icon-canvas-item.c15
-rw-r--r--libcaja-private/caja-icon-container.c131
-rw-r--r--libcaja-private/caja-icon-dnd.c13
-rw-r--r--libcaja-private/caja-saved-search-file.c3
-rw-r--r--libcaja-private/caja-search-directory-file.c8
-rw-r--r--libcaja-private/caja-tree-view-drag-dest.c4
-rw-r--r--libcaja-private/caja-vfs-directory.c5
-rw-r--r--libcaja-private/caja-vfs-file.c4
17 files changed, 50 insertions, 170 deletions
diff --git a/libcaja-private/caja-clipboard.c b/libcaja-private/caja-clipboard.c
index 2cc61f7a..ab0b7987 100644
--- a/libcaja-private/caja-clipboard.c
+++ b/libcaja-private/caja-clipboard.c
@@ -436,10 +436,7 @@ static void
target_destroy_callback (GtkWidget *object,
gpointer callback_data)
{
- TargetCallbackData *target_data;
-
g_assert (callback_data != NULL);
- target_data = callback_data;
if (clipboard_items_are_merged_in (object))
{
diff --git a/libcaja-private/caja-desktop-icon-file.c b/libcaja-private/caja-desktop-icon-file.c
index c91d2067..bacbe02f 100644
--- a/libcaja-private/caja-desktop-icon-file.c
+++ b/libcaja-private/caja-desktop-icon-file.c
@@ -365,9 +365,6 @@ caja_desktop_icon_file_set_metadata (CajaFile *file,
const char *key,
const char *value)
{
- CajaDesktopIconFile *desktop_file;
-
- desktop_file = CAJA_DESKTOP_ICON_FILE (file);
caja_desktop_set_metadata_string (file, file->details->name, key, value);
}
@@ -376,9 +373,6 @@ caja_desktop_icon_file_set_metadata_as_list (CajaFile *file,
const char *key,
char **value)
{
- CajaDesktopIconFile *desktop_file;
-
- desktop_file = CAJA_DESKTOP_ICON_FILE (file);
caja_desktop_set_metadata_stringv (file, file->details->name, key, (const gchar **) value);
}
diff --git a/libcaja-private/caja-directory-async.c b/libcaja-private/caja-directory-async.c
index 91a2ffb4..2375b3ee 100644
--- a/libcaja-private/caja-directory-async.c
+++ b/libcaja-private/caja-directory-async.c
@@ -3162,9 +3162,6 @@ deep_count_callback (GObject *source_object,
static void
deep_count_load (DeepCountState *state, GFile *location)
{
- CajaDirectory *directory;
-
- directory = state->directory;
state->deep_count_location = g_object_ref (location);
#ifdef DEBUG_LOAD_DIRECTORY
diff --git a/libcaja-private/caja-directory.c b/libcaja-private/caja-directory.c
index 50462916..fa9d7bd8 100644
--- a/libcaja-private/caja-directory.c
+++ b/libcaja-private/caja-directory.c
@@ -266,9 +266,7 @@ collect_all_directories (gpointer key, gpointer value, gpointer callback_data)
{
CajaDirectory *directory;
GList **dirs;
- GFile *location;
- location = (GFile *) key;
directory = CAJA_DIRECTORY (value);
dirs = callback_data;
diff --git a/libcaja-private/caja-dnd.c b/libcaja-private/caja-dnd.c
index 5943f041..792b3e79 100644
--- a/libcaja-private/caja-dnd.c
+++ b/libcaja-private/caja-dnd.c
@@ -1040,7 +1040,7 @@ caja_drag_autoscroll_calculate_delta (GtkWidget *widget, float *x_scroll_delta,
void
caja_drag_autoscroll_start (CajaDragInfo *drag_info,
GtkWidget *widget,
- GtkFunction callback,
+ GSourceFunc callback,
gpointer user_data)
{
if (caja_drag_autoscroll_in_scroll_region (widget))
diff --git a/libcaja-private/caja-dnd.h b/libcaja-private/caja-dnd.h
index b9a74382..85330a02 100644
--- a/libcaja-private/caja-dnd.h
+++ b/libcaja-private/caja-dnd.h
@@ -188,7 +188,7 @@ void caja_drag_autoscroll_calculate_delta (GtkWidget *widget,
float *y_scroll_delta);
void caja_drag_autoscroll_start (CajaDragInfo *drag_info,
GtkWidget *widget,
- GtkFunction callback,
+ GSourceFunc callback,
gpointer user_data);
void caja_drag_autoscroll_stop (CajaDragInfo *drag_info);
diff --git a/libcaja-private/caja-entry.c b/libcaja-private/caja-entry.c
index fb9ac38c..8f5f9d79 100644
--- a/libcaja-private/caja-entry.c
+++ b/libcaja-private/caja-entry.c
@@ -66,9 +66,6 @@ static GtkEditableInterface *parent_editable_interface = NULL;
static void
caja_entry_init (CajaEntry *entry)
{
- GtkWidget *widget;
-
- widget = GTK_WIDGET (entry);
entry->details = g_new0 (CajaEntryDetails, 1);
entry->details->user_edit = TRUE;
@@ -172,10 +169,8 @@ caja_entry_motion_notify (GtkWidget *widget, GdkEventMotion *event)
int result;
gboolean old_had, new_had;
int old_start, old_end, new_start, new_end;
- CajaEntry *entry;
GtkEditable *editable;
- entry = CAJA_ENTRY (widget);
editable = GTK_EDITABLE (widget);
old_had = gtk_editable_get_selection_bounds (editable, &old_start, &old_end);
diff --git a/libcaja-private/caja-file-conflict-dialog.c b/libcaja-private/caja-file-conflict-dialog.c
index e3419c7c..798b39c0 100644
--- a/libcaja-private/caja-file-conflict-dialog.c
+++ b/libcaja-private/caja-file-conflict-dialog.c
@@ -100,12 +100,11 @@ file_list_ready_cb (GList *files,
CajaFileConflictDialog *fcd = user_data;
CajaFile *src, *dest, *dest_dir;
time_t src_mtime, dest_mtime;
- GtkDialog *dialog;
gboolean source_is_dir, dest_is_dir, should_show_type;
CajaFileConflictDialogDetails *details;
char *primary_text, *message, *secondary_text;
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 *size, *date, *type = NULL;
GdkPixbuf *pixbuf;
@@ -113,7 +112,6 @@ file_list_ready_cb (GList *files,
GString *str;
PangoFontDescription *desc;
- dialog = GTK_DIALOG (fcd);
details = fcd->details;
details->handle = NULL;
@@ -125,7 +123,6 @@ file_list_ready_cb (GList *files,
src_mtime = caja_file_get_mtime (src);
dest_mtime = caja_file_get_mtime (dest);
- src_name = caja_file_get_display_name (src);
dest_name = caja_file_get_display_name (dest);
dest_dir_name = caja_file_get_display_name (dest_dir);
diff --git a/libcaja-private/caja-file-operations.c b/libcaja-private/caja-file-operations.c
index baaa8843..f9f8739a 100644
--- a/libcaja-private/caja-file-operations.c
+++ b/libcaja-private/caja-file-operations.c
@@ -4661,7 +4661,7 @@ move_file_prepare (CopyMoveJob *move_job,
GFile *dest, *new_dest;
GError *error;
CommonJob *job;
- gboolean overwrite, renamed;
+ gboolean overwrite;
char *primary, *secondary, *details;
int response;
GFileCopyFlags flags;
@@ -4669,7 +4669,6 @@ move_file_prepare (CopyMoveJob *move_job,
gboolean handled_invalid_filename;
overwrite = FALSE;
- renamed = FALSE;
handled_invalid_filename = *dest_fs_type != NULL;
job = (CommonJob *)move_job;
@@ -4817,7 +4816,6 @@ move_file_prepare (CopyMoveJob *move_job,
g_object_unref (dest);
dest = get_target_file_for_display_name (dest_dir,
response->new_name);
- renamed = TRUE;
conflict_response_data_free (response);
goto retry;
} else {
@@ -5341,8 +5339,6 @@ link_job (GIOSchedulerJob *io_job,
{
CopyMoveJob *job;
CommonJob *common;
- GList *copy_files;
- GArray *copy_positions;
GFile *src;
GdkPoint *point;
char *dest_fs_type;
@@ -5354,9 +5350,6 @@ link_job (GIOSchedulerJob *io_job,
common = &job->common;
common->io_job = io_job;
- copy_files = NULL;
- copy_positions = NULL;
-
dest_fs_type = NULL;
caja_progress_info_start (job->common.progress);
diff --git a/libcaja-private/caja-icon-canvas-item.c b/libcaja-private/caja-icon-canvas-item.c
index b8e3fa28..67755ac2 100644
--- a/libcaja-private/caja-icon-canvas-item.c
+++ b/libcaja-private/caja-icon-canvas-item.c
@@ -1089,10 +1089,6 @@ draw_frame (CajaIconCanvasItem *item,
int width,
int height)
{
- CajaIconContainer *container;
-
- container = CAJA_ICON_CONTAINER (EEL_CANVAS_ITEM (item)->canvas);
-
#if GTK_CHECK_VERSION(3,0,0)
cairo_save (cr);
#else
@@ -1293,11 +1289,9 @@ measure_label_text (CajaIconCanvasItem *item)
CajaIconContainer *container;
gint editable_height, editable_height_for_layout, editable_height_for_entire_text, editable_width, editable_dx;
gint additional_height, additional_width, additional_dx;
- EelCanvasItem *canvas_item;
PangoLayout *editable_layout;
PangoLayout *additional_layout;
- gboolean have_editable, have_additional, needs_highlight;
- int max_text_width;
+ gboolean have_editable, have_additional;
/* check to see if the cached values are still valid; if so, there's
* no work necessary
@@ -1309,7 +1303,6 @@ measure_label_text (CajaIconCanvasItem *item)
}
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_additional = details->additional_text != NULL && details->additional_text[0] != '\0';
@@ -1333,8 +1326,6 @@ measure_label_text (CajaIconCanvasItem *item)
return;
#endif
- canvas_item = EEL_CANVAS_ITEM (item);
-
editable_width = 0;
editable_height = 0;
editable_height_for_layout = 0;
@@ -1344,8 +1335,6 @@ measure_label_text (CajaIconCanvasItem *item)
additional_height = 0;
additional_dx = 0;
- max_text_width = floor (caja_icon_canvas_item_get_max_text_width (item));
-
container = CAJA_ICON_CONTAINER (EEL_CANVAS_ITEM (item)->canvas);
editable_layout = NULL;
additional_layout = NULL;
@@ -3153,7 +3142,6 @@ caja_icon_canvas_item_accessible_do_action (AtkAction *accessible, int i)
{
CajaIconCanvasItem *item;
CajaIconCanvasItemAccessibleActionContext *ctx;
- CajaIcon *icon;
CajaIconContainer *container;
g_assert (i < LAST_ACTION);
@@ -3163,7 +3151,6 @@ caja_icon_canvas_item_accessible_do_action (AtkAction *accessible, int i)
{
return FALSE;
}
- icon = item->user_data;
container = CAJA_ICON_CONTAINER (EEL_CANVAS_ITEM (item)->canvas);
switch (i)
{
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index 10f5fc8f..da4cd197 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -331,7 +331,7 @@ icon_set_position (CajaIcon *icon,
int container_x, container_y, container_width, container_height;
EelDRect icon_bounds;
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;
if (icon->x == x && icon->y == y)
@@ -385,9 +385,7 @@ icon_set_position (CajaIcon *icon,
/* determine icon rectangle relative to item rectangle */
height_above = icon_bounds.y0 - y1;
- height_below = y2 - icon_bounds.y1;
width_left = icon_bounds.x0 - x1;
- width_right = x2 - icon_bounds.x1;
min_x = container_left + DESKTOP_PAD_HORIZONTAL + width_left;
max_x = container_right - DESKTOP_PAD_HORIZONTAL - item_width + width_left;
@@ -610,8 +608,8 @@ caja_icon_container_scroll (CajaIconContainer *container,
old_h_value = gtk_adjustment_get_value (hadj);
old_v_value = gtk_adjustment_get_value (vadj);
- eel_gtk_adjustment_set_value (hadj, gtk_adjustment_get_value (hadj) + delta_x);
- eel_gtk_adjustment_set_value (vadj, gtk_adjustment_get_value (vadj) + delta_y);
+ gtk_adjustment_set_value (hadj, gtk_adjustment_get_value (hadj) + delta_x);
+ gtk_adjustment_set_value (vadj, gtk_adjustment_get_value (vadj) + delta_y);
/* return TRUE if we did scroll */
return gtk_adjustment_get_value (hadj) != old_h_value || gtk_adjustment_get_value (vadj) != old_v_value;
@@ -715,24 +713,20 @@ icon_get_row_and_column_bounds (CajaIconContainer *container,
item_get_canvas_bounds (EEL_CANVAS_ITEM (icon->item), bounds, safety_pad);
- for (p = container->details->icons; p != NULL; p = p->next)
- {
+ for (p = container->details->icons; p != NULL; p = p->next) {
one_icon = p->data;
- if (icon == one_icon)
- {
+ if (icon == one_icon) {
continue;
}
- if (compare_icons_horizontal (container, icon, one_icon) == 0)
- {
+ if (compare_icons_horizontal (container, icon, one_icon) == 0) {
item_get_canvas_bounds (EEL_CANVAS_ITEM (one_icon->item), &one_bounds, safety_pad);
bounds->x0 = MIN (bounds->x0, one_bounds.x0);
bounds->x1 = MAX (bounds->x1, one_bounds.x1);
}
- if (compare_icons_vertical (container, icon, one_icon) == 0)
- {
+ if (compare_icons_vertical (container, icon, one_icon) == 0) {
item_get_canvas_bounds (EEL_CANVAS_ITEM (one_icon->item), &one_bounds, safety_pad);
bounds->y0 = MIN (bounds->y0, one_bounds.y0);
bounds->y1 = MAX (bounds->y1, one_bounds.y1);
@@ -746,52 +740,40 @@ static void
reveal_icon (CajaIconContainer *container,
CajaIcon *icon)
{
- CajaIconContainerDetails *details;
GtkAllocation allocation;
GtkAdjustment *hadj, *vadj;
EelIRect bounds;
- if (!icon_is_positioned (icon))
- {
+ if (!icon_is_positioned (icon)) {
set_pending_icon_to_reveal (container, icon);
return;
}
set_pending_icon_to_reveal (container, NULL);
- details = container->details;
gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
hadj = gtk_scrollable_get_hadjustment (GTK_SCROLLABLE (container));
vadj = gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (container));
- if (caja_icon_container_is_auto_layout (container))
- {
+ if (caja_icon_container_is_auto_layout (container)) {
/* ensure that we reveal the entire row/column */
icon_get_row_and_column_bounds (container, icon, &bounds, TRUE);
- }
- else
- {
+ } else {
item_get_canvas_bounds (EEL_CANVAS_ITEM (icon->item), &bounds, TRUE);
}
- if (bounds.y0 < gtk_adjustment_get_value (vadj))
- {
- eel_gtk_adjustment_set_value (vadj, bounds.y0);
- }
- else if (bounds.y1 > gtk_adjustment_get_value (vadj) + allocation.height)
- {
- eel_gtk_adjustment_set_value
- (vadj, bounds.y1 - allocation.height);
+ if (bounds.y0 < gtk_adjustment_get_value (vadj)) {
+ gtk_adjustment_set_value (vadj, bounds.y0);
+ } else if (bounds.y1 > gtk_adjustment_get_value (vadj) + allocation.height) {
+ gtk_adjustment_set_value
+ (vadj, bounds.y1 - allocation.height);
}
- if (bounds.x0 < gtk_adjustment_get_value (hadj))
- {
- eel_gtk_adjustment_set_value (hadj, bounds.x0);
- }
- else if (bounds.x1 > gtk_adjustment_get_value (hadj) + allocation.width)
- {
- eel_gtk_adjustment_set_value
- (hadj, bounds.x1 - allocation.width);
+ if (bounds.x0 < gtk_adjustment_get_value (hadj)) {
+ gtk_adjustment_set_value (hadj, bounds.x0);
+ } else if (bounds.x1 > gtk_adjustment_get_value (hadj) + allocation.width) {
+ gtk_adjustment_set_value
+ (hadj, bounds.x1 - allocation.width);
}
}
@@ -802,8 +784,7 @@ process_pending_icon_to_reveal (CajaIconContainer *container)
pending_icon_to_reveal = get_pending_icon_to_reveal (container);
- if (pending_icon_to_reveal != NULL)
- {
+ if (pending_icon_to_reveal != NULL) {
reveal_icon (container, pending_icon_to_reveal);
}
}
@@ -827,8 +808,7 @@ keyboard_icon_reveal_timeout_callback (gpointer data)
* (see bugzilla.gnome.org 40612).
*/
if (icon == container->details->keyboard_focus
- || icon->is_selected)
- {
+ || icon->is_selected) {
reveal_icon (container, icon);
}
container->details->keyboard_icon_reveal_timer_id = 0;
@@ -843,8 +823,7 @@ unschedule_keyboard_icon_reveal (CajaIconContainer *container)
details = container->details;
- if (details->keyboard_icon_reveal_timer_id != 0)
- {
+ if (details->keyboard_icon_reveal_timer_id != 0) {
g_source_remove (details->keyboard_icon_reveal_timer_id);
}
}
@@ -1236,12 +1215,6 @@ caja_icon_container_update_scroll_region (CajaIconContainer *container)
gtk_adjustment_set_step_increment (vadj, step_increment);
gtk_adjustment_changed (vadj);
}
-
- /* Now that we have a new scroll region, clamp the
- * adjustments so we are within the valid scroll area.
- */
- eel_gtk_adjustment_clamp_value (hadj);
- eel_gtk_adjustment_clamp_value (vadj);
}
static int
@@ -1390,7 +1363,7 @@ lay_down_icons_horizontal (CajaIconContainer *container,
{
GList *p, *line_start;
CajaIcon *icon;
- double canvas_width, y, canvas_height;
+ double canvas_width, y;
GArray *positions;
IconPositions *position;
EelDRect bounds;
@@ -1418,8 +1391,6 @@ lay_down_icons_horizontal (CajaIconContainer *container,
/* Lay out icons a line at a time. */
canvas_width = CANVAS_WIDTH(container, allocation);
- canvas_height = CANVAS_HEIGHT(container, allocation);
-
max_icon_width = max_text_width = 0.0;
if (container->details->label_position == CAJA_ICON_LABEL_POSITION_BESIDE)
@@ -1619,12 +1590,11 @@ lay_down_icons_vertical (CajaIconContainer *container,
{
GList *p, *line_start;
CajaIcon *icon;
- double canvas_width, x, canvas_height;
+ double x, canvas_height;
GArray *positions;
IconPositions *position;
EelDRect icon_bounds;
EelDRect text_bounds;
- EelCanvasItem *item;
GtkAllocation allocation;
double line_height;
@@ -1654,7 +1624,6 @@ lay_down_icons_vertical (CajaIconContainer *container,
gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
/* Lay out icons a column at a time. */
- canvas_width = CANVAS_WIDTH(container, allocation);
canvas_height = CANVAS_HEIGHT(container, allocation);
max_icon_width = max_text_width = 0.0;
@@ -1682,7 +1651,6 @@ lay_down_icons_vertical (CajaIconContainer *container,
for (p = icons; p != NULL; p = p->next)
{
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. */
@@ -2154,14 +2122,13 @@ lay_down_icons_vertical_desktop (CajaIconContainer *container, GList *icons)
GList *p, *placed_icons, *unplaced_icons;
int total, new_length, placed;
CajaIcon *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;
EelDRect icon_rect;
GtkAllocation allocation;
/* Get container dimensions */
gtk_widget_get_allocation (GTK_WIDGET (container), &allocation);
- width = CANVAS_WIDTH(container, allocation);
height = CANVAS_HEIGHT(container, allocation);
/* Determine which icons have and have not been placed */
@@ -4987,7 +4954,7 @@ continue_stretching (CajaIconContainer *container,
if (container->details->stretch_idle_id == 0)
{
- container->details->stretch_idle_id = g_idle_add ((GtkFunction) update_stretch_at_idle, container);
+ container->details->stretch_idle_id = g_idle_add ((GSourceFunc) update_stretch_at_idle, container);
}
}
@@ -5550,7 +5517,6 @@ caja_icon_container_search_move (GtkWidget *window,
{
gboolean ret;
gint len;
- gint count = 0;
const gchar *text;
text = gtk_entry_get_text (GTK_ENTRY (container->details->search_entry));
@@ -5588,7 +5554,6 @@ caja_icon_container_search_move (GtkWidget *window,
else
{
/* return to old iter */
- count = 0;
caja_icon_container_search_iter (container, text,
container->details->selected_iter);
}
@@ -5734,9 +5699,7 @@ caja_icon_container_search_init (GtkWidget *entry,
static void
caja_icon_container_ensure_interactive_directory (CajaIconContainer *container)
{
- GtkWidget *frame, *vbox, *toplevel;
-
- toplevel = gtk_widget_get_toplevel (GTK_WIDGET (container));
+ GtkWidget *frame, *vbox;
if (container->details->search_window != NULL)
{
@@ -7089,11 +7052,9 @@ item_event_callback (EelCanvasItem *item,
gpointer data)
{
CajaIconContainer *container;
- CajaIconContainerDetails *details;
CajaIcon *icon;
container = CAJA_ICON_CONTAINER (data);
- details = container->details;
icon = CAJA_ICON_CANVAS_ITEM (item)->user_data;
g_assert (icon != NULL);
@@ -7275,7 +7236,6 @@ caja_icon_container_scroll_to_icon (CajaIconContainer *container,
GList *l;
CajaIcon *icon;
GtkAdjustment *hadj, *vadj;
- EelCanvasItem *item;
EelIRect bounds;
GtkAllocation allocation;
@@ -7288,40 +7248,27 @@ caja_icon_container_scroll_to_icon (CajaIconContainer *container,
caja_icon_container_layout_now (container);
l = container->details->icons;
- while (l != NULL)
- {
+ while (l != NULL) {
icon = l->data;
if (icon->data == data &&
- icon_is_positioned (icon))
- {
+ icon_is_positioned (icon)) {
- item = EEL_CANVAS_ITEM (icon->item);
-
- if (caja_icon_container_is_auto_layout (container))
- {
+ if (caja_icon_container_is_auto_layout (container)) {
/* ensure that we reveal the entire row/column */
icon_get_row_and_column_bounds (container, icon, &bounds, TRUE);
- }
- else
- {
+ } else {
item_get_canvas_bounds (EEL_CANVAS_ITEM (icon->item), &bounds, TRUE);
}
- if (caja_icon_container_is_layout_vertical (container))
- {
- if (caja_icon_container_is_layout_rtl (container))
- {
- eel_gtk_adjustment_set_value (hadj, bounds.x1 - allocation.width);
+ if (caja_icon_container_is_layout_vertical (container)) {
+ if (caja_icon_container_is_layout_rtl (container)) {
+ gtk_adjustment_set_value (hadj, bounds.x1 - allocation.width);
+ } else {
+ gtk_adjustment_set_value (hadj, bounds.x0);
}
- else
- {
- eel_gtk_adjustment_set_value (hadj, bounds.x0);
- }
- }
- else
- {
- eel_gtk_adjustment_set_value (vadj, bounds.y0);
+ } else {
+ gtk_adjustment_set_value (vadj, bounds.y0);
}
}
diff --git a/libcaja-private/caja-icon-dnd.c b/libcaja-private/caja-icon-dnd.c
index f114b46a..376490dc 100644
--- a/libcaja-private/caja-icon-dnd.c
+++ b/libcaja-private/caja-icon-dnd.c
@@ -456,7 +456,7 @@ set_direct_save_uri (GtkWidget *widget, GdkDragContext *context, CajaDragInfo *d
g_object_unref (child);
/* Change the uri property */
- gdk_property_change (GDK_DRAWABLE (gdk_drag_context_get_source_window (context)),
+ gdk_property_change (gdk_drag_context_get_source_window (context),
gdk_atom_intern (CAJA_ICON_DND_XDNDDIRECTSAVE_TYPE, FALSE),
gdk_atom_intern ("text/plain", FALSE), 8,
GDK_PROP_MODE_REPLACE, (const guchar *) uri,
@@ -1577,7 +1577,6 @@ caja_icon_dnd_begin_drag (CajaIconContainer *container,
int start_y)
{
CajaIconDndInfo *dnd_info;
- GdkDragContext *context;
g_return_if_fail (CAJA_IS_ICON_CONTAINER (container));
g_return_if_fail (event != NULL);
@@ -1594,11 +1593,11 @@ caja_icon_dnd_begin_drag (CajaIconContainer *container,
gtk_adjustment_get_value (gtk_scrollable_get_vadjustment (GTK_SCROLLABLE (container)));
/* start the drag */
- context = gtk_drag_begin (GTK_WIDGET (container),
- dnd_info->drag_info.target_list,
- actions,
- button,
- (GdkEvent *) event);
+ gtk_drag_begin (GTK_WIDGET (container),
+ dnd_info->drag_info.target_list,
+ actions,
+ button,
+ (GdkEvent *) event);
}
static gboolean
diff --git a/libcaja-private/caja-saved-search-file.c b/libcaja-private/caja-saved-search-file.c
index dd0a7263..c55b29be 100644
--- a/libcaja-private/caja-saved-search-file.c
+++ b/libcaja-private/caja-saved-search-file.c
@@ -32,9 +32,6 @@ G_DEFINE_TYPE(CajaSavedSearchFile, caja_saved_search_file, CAJA_TYPE_VFS_FILE)
static void
caja_saved_search_file_init (CajaSavedSearchFile *search_file)
{
- CajaFile *file;
-
- file = CAJA_FILE (search_file);
}
static void
diff --git a/libcaja-private/caja-search-directory-file.c b/libcaja-private/caja-search-directory-file.c
index 8fc99093..1beeb265 100644
--- a/libcaja-private/caja-search-directory-file.c
+++ b/libcaja-private/caja-search-directory-file.c
@@ -98,13 +98,10 @@ search_directory_file_get_item_count (CajaFile *file,
guint *count,
gboolean *count_unreadable)
{
- CajaSearchDirectory *search_dir;
GList *file_list;
if (count)
{
- search_dir = CAJA_SEARCH_DIRECTORY (file->details->directory);
-
file_list = caja_directory_get_file_list (file->details->directory);
*count = g_list_length (file_list);
@@ -122,14 +119,11 @@ search_directory_file_get_deep_counts (CajaFile *file,
guint *unreadable_directory_count,
goffset *total_size)
{
- CajaSearchDirectory *search_dir;
CajaFile *dir_file;
GList *file_list, *l;
guint dirs, files;
GFileType type;
- search_dir = CAJA_SEARCH_DIRECTORY (file->details->directory);
-
file_list = caja_directory_get_file_list (file->details->directory);
dirs = files = 0;
@@ -241,10 +235,8 @@ caja_search_directory_file_init (CajaSearchDirectoryFile *search_file)
static void
caja_search_directory_file_class_init (CajaSearchDirectoryFileClass *klass)
{
- GObjectClass *object_class;
CajaFileClass *file_class;
- object_class = G_OBJECT_CLASS (klass);
file_class = CAJA_FILE_CLASS (klass);
file_class->default_file_type = G_FILE_TYPE_DIRECTORY;
diff --git a/libcaja-private/caja-tree-view-drag-dest.c b/libcaja-private/caja-tree-view-drag-dest.c
index 56e9a1cd..e1cb7bad 100644
--- a/libcaja-private/caja-tree-view-drag-dest.c
+++ b/libcaja-private/caja-tree-view-drag-dest.c
@@ -203,12 +203,8 @@ highlight_expose (GtkWidget *widget,
/* FIXMEchpe: is bin window right here??? */
bin_window = gtk_tree_view_get_bin_window (GTK_TREE_VIEW (widget));
-#if GTK_CHECK_VERSION(3, 0, 0)
width = gdk_window_get_width(bin_window);
height = gdk_window_get_height(bin_window);
-#else
- gdk_drawable_get_size(bin_window, &width, &height);
-#endif
gtk_paint_focus (gtk_widget_get_style (widget),
#if GTK_CHECK_VERSION(3,0,0)
diff --git a/libcaja-private/caja-vfs-directory.c b/libcaja-private/caja-vfs-directory.c
index 2475909e..278992af 100644
--- a/libcaja-private/caja-vfs-directory.c
+++ b/libcaja-private/caja-vfs-directory.c
@@ -41,9 +41,6 @@ EEL_CLASS_BOILERPLATE (CajaVFSDirectory,
static void
caja_vfs_directory_init (gpointer object, gpointer klass)
{
- CajaVFSDirectory *directory;
-
- directory = CAJA_VFS_DIRECTORY (object);
}
static gboolean
@@ -151,10 +148,8 @@ vfs_is_not_empty (CajaDirectory *directory)
static void
caja_vfs_directory_class_init (gpointer klass)
{
- GObjectClass *object_class;
CajaDirectoryClass *directory_class;
- object_class = G_OBJECT_CLASS (klass);
directory_class = CAJA_DIRECTORY_CLASS (klass);
directory_class->contains_file = vfs_contains_file;
diff --git a/libcaja-private/caja-vfs-file.c b/libcaja-private/caja-vfs-file.c
index 0dec6da0..84952d93 100644
--- a/libcaja-private/caja-vfs-file.c
+++ b/libcaja-private/caja-vfs-file.c
@@ -748,10 +748,6 @@ vfs_file_poll_for_media (CajaFile *file)
static void
caja_vfs_file_init (gpointer object, gpointer klass)
{
- CajaVFSFile *file;
-
- file = CAJA_VFS_FILE (object);
-
}
static void