diff options
Diffstat (limited to 'libcaja-private')
-rw-r--r-- | libcaja-private/caja-icon-container.c | 10 | ||||
-rw-r--r-- | libcaja-private/caja-undostack-manager.c | 4 |
2 files changed, 8 insertions, 6 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c index 3146c17d..12382f5a 100644 --- a/libcaja-private/caja-icon-container.c +++ b/libcaja-private/caja-icon-container.c @@ -763,15 +763,17 @@ reveal_icon (CajaIconContainer *container, 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); + eel_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.x1 - allocation.width > bounds.x0) { + eel_gtk_adjustment_set_value (hadj, bounds.x0); + } else { + eel_gtk_adjustment_set_value (hadj, bounds.x1 - allocation.width); + } } } diff --git a/libcaja-private/caja-undostack-manager.c b/libcaja-private/caja-undostack-manager.c index 1d988cda..79778460 100644 --- a/libcaja-private/caja-undostack-manager.c +++ b/libcaja-private/caja-undostack-manager.c @@ -903,7 +903,7 @@ caja_undostack_manager_data_add_trashed_file (CajaUndoStackActionData return; guint64 *modificationTime; - modificationTime = (guint64 *) malloc (sizeof (guint64)); + modificationTime = (guint64 *) g_malloc (sizeof (guint64)); *modificationTime = mtime; char *originalURI = g_file_get_uri (file); @@ -924,7 +924,7 @@ void caja_undostack_manager_data_add_file_permissions return; guint32 *currentPermission; - currentPermission = (guint32 *) malloc (sizeof (guint32)); + currentPermission = (guint32 *) g_malloc (sizeof (guint32)); *currentPermission = permission; char *originalURI = g_file_get_uri (file); |