summaryrefslogtreecommitdiff
path: root/src/file-manager/fm-desktop-icon-view.c
diff options
context:
space:
mode:
authorAnsuz Inspirati <[email protected]>2025-08-25 08:35:41 +1000
committerGitHub <[email protected]>2025-08-24 22:35:41 +0000
commitf093cfa7e4cbb27280576d39d63e5000df9f0d7c (patch)
tree9f5d8e14234c9b596327b60e136099421a2c5f0a /src/file-manager/fm-desktop-icon-view.c
parent1cd4e8eeccc7d2424c674a0ebcf646e71b2d2a7b (diff)
downloadcaja-f093cfa7e4cbb27280576d39d63e5000df9f0d7c.tar.bz2
caja-f093cfa7e4cbb27280576d39d63e5000df9f0d7c.tar.xz
New feature - show git branch with icon view text (#1838)
Display the git branch along with directory name in icon view; when the directory is a git repository. Obviously further work will be required to enable/disable as a displayed option, and potentially some level of customisation. This would require open discussion of possibilities. Solutions for co-existence with other displayable parameters also to be community determined. Consideration and feedback appreciated. * Add UI support to enable/disable option Added user interface support for option to enable and disable the display of the git branch name in icon view. * Add internationsation support for the new feature With translations for most of the currently supported languages. * Update caja.pot Build system regenerated .pot file with additional strings from new feature (already in previous commit), new strings already introduced to code-base, along with updated source file line numbers of existing strings. Required for the automated pull mechanism in Transifex - which should complete once merged with master branch.
Diffstat (limited to 'src/file-manager/fm-desktop-icon-view.c')
-rw-r--r--src/file-manager/fm-desktop-icon-view.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/file-manager/fm-desktop-icon-view.c b/src/file-manager/fm-desktop-icon-view.c
index 954c26de..1e08b7cf 100644
--- a/src/file-manager/fm-desktop-icon-view.c
+++ b/src/file-manager/fm-desktop-icon-view.c
@@ -89,6 +89,7 @@ static gboolean real_supports_auto_layout (FMIconView
static gboolean real_supports_scaling (FMIconView *view);
static gboolean real_supports_keep_aligned (FMIconView *view);
static gboolean real_supports_labels_beside_icons (FMIconView *view);
+static gboolean real_supports_display_git_branch (FMIconView *view);
static void real_merge_menus (FMDirectoryView *view);
static void real_update_menus (FMDirectoryView *view);
static gboolean real_supports_zooming (FMDirectoryView *view);
@@ -336,6 +337,7 @@ fm_desktop_icon_view_class_init (FMDesktopIconViewClass *class)
FM_ICON_VIEW_CLASS (class)->supports_scaling = real_supports_scaling;
FM_ICON_VIEW_CLASS (class)->supports_keep_aligned = real_supports_keep_aligned;
FM_ICON_VIEW_CLASS (class)->supports_labels_beside_icons = real_supports_labels_beside_icons;
+ FM_ICON_VIEW_CLASS (class)->supports_display_git_branch = real_supports_display_git_branch;
}
/*This code is only reached when running on x11*/
@@ -920,6 +922,12 @@ real_supports_labels_beside_icons (FMIconView *view)
}
static gboolean
+real_supports_display_git_branch (FMIconView *view)
+{
+ return FALSE;
+}
+
+static gboolean
real_supports_zooming (FMDirectoryView *view)
{
/* Can't zoom on the desktop, because doing so would cause all