summaryrefslogtreecommitdiff
path: root/libcaja-private
diff options
context:
space:
mode:
Diffstat (limited to 'libcaja-private')
-rw-r--r--libcaja-private/caja-icon-container.c17
-rw-r--r--libcaja-private/caja-icon-container.h3
-rw-r--r--libcaja-private/caja-icon-private.h3
-rw-r--r--libcaja-private/caja-metadata.c1
-rw-r--r--libcaja-private/caja-metadata.h1
5 files changed, 24 insertions, 1 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index a95edfa3..d4fe27b4 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -2610,7 +2610,7 @@ caja_icon_container_move_icon (CajaIconContainer *container,
}
}
- if (!details->auto_layout)
+ if (!details->auto_layout && !details->lock_icons_position)
{
if (details->keep_aligned && snap)
{
@@ -8688,6 +8688,12 @@ caja_icon_container_is_keep_aligned (CajaIconContainer *container)
return container->details->keep_aligned;
}
+gboolean
+caja_icon_container_is_lock_icons_position (CajaIconContainer *container)
+{
+ return container->details->lock_icons_position;
+}
+
static gboolean
align_icons_callback (gpointer callback_data)
{
@@ -8741,6 +8747,15 @@ caja_icon_container_set_keep_aligned (CajaIconContainer *container,
}
void
+caja_icon_container_set_lock_icons_position (CajaIconContainer *container,
+ gboolean lock_icons_position)
+{
+ g_return_if_fail (CAJA_IS_ICON_CONTAINER (container));
+
+ container->details->lock_icons_position = lock_icons_position;
+}
+
+void
caja_icon_container_set_layout_mode (CajaIconContainer *container,
CajaIconLayoutMode mode)
{
diff --git a/libcaja-private/caja-icon-container.h b/libcaja-private/caja-icon-container.h
index 74914b56..1e7bbbe7 100644
--- a/libcaja-private/caja-icon-container.h
+++ b/libcaja-private/caja-icon-container.h
@@ -281,6 +281,9 @@ void caja_icon_container_set_tighter_layout (CajaIconCon
gboolean caja_icon_container_is_keep_aligned (CajaIconContainer *container);
void caja_icon_container_set_keep_aligned (CajaIconContainer *container,
gboolean keep_aligned);
+gboolean caja_icon_container_is_lock_icons_position (CajaIconContainer *container);
+void caja_icon_container_set_lock_icons_position (CajaIconContainer *container,
+ gboolean lock_icons_position);
void caja_icon_container_set_layout_mode (CajaIconContainer *container,
CajaIconLayoutMode mode);
void caja_icon_container_set_label_position (CajaIconContainer *container,
diff --git a/libcaja-private/caja-icon-private.h b/libcaja-private/caja-icon-private.h
index 596148b1..7efdb9ce 100644
--- a/libcaja-private/caja-icon-private.h
+++ b/libcaja-private/caja-icon-private.h
@@ -238,6 +238,9 @@ struct CajaIconContainerDetails
/* Should the container keep icons aligned to a grid */
gboolean keep_aligned;
+ /* Should the container not allow manual icon position */
+ gboolean lock_icons_position;
+
/* Set to TRUE after first allocation has been done */
gboolean has_been_allocated;
diff --git a/libcaja-private/caja-metadata.c b/libcaja-private/caja-metadata.c
index da831f8b..c7c62e86 100644
--- a/libcaja-private/caja-metadata.c
+++ b/libcaja-private/caja-metadata.c
@@ -35,6 +35,7 @@ static char *used_metadata_names[] =
CAJA_METADATA_KEY_ICON_VIEW_SORT_BY,
CAJA_METADATA_KEY_ICON_VIEW_SORT_REVERSED,
CAJA_METADATA_KEY_ICON_VIEW_KEEP_ALIGNED,
+ CAJA_METADATA_KEY_ICON_VIEW_LOCK_ICONS_POSITION,
CAJA_METADATA_KEY_ICON_VIEW_LAYOUT_TIMESTAMP,
CAJA_METADATA_KEY_LIST_VIEW_ZOOM_LEVEL,
CAJA_METADATA_KEY_LIST_VIEW_SORT_COLUMN,
diff --git a/libcaja-private/caja-metadata.h b/libcaja-private/caja-metadata.h
index 34ac7ac7..e953b78e 100644
--- a/libcaja-private/caja-metadata.h
+++ b/libcaja-private/caja-metadata.h
@@ -45,6 +45,7 @@
#define CAJA_METADATA_KEY_ICON_VIEW_SORT_BY "caja-icon-view-sort-by"
#define CAJA_METADATA_KEY_ICON_VIEW_SORT_REVERSED "caja-icon-view-sort-reversed"
#define CAJA_METADATA_KEY_ICON_VIEW_KEEP_ALIGNED "caja-icon-view-keep-aligned"
+#define CAJA_METADATA_KEY_ICON_VIEW_LOCK_ICONS_POSITION "caja-icon-view-lock-icons-position"
#define CAJA_METADATA_KEY_ICON_VIEW_LAYOUT_TIMESTAMP "caja-icon-view-layout-timestamp"
#define CAJA_METADATA_KEY_LIST_VIEW_ZOOM_LEVEL "caja-list-view-zoom-level"