From f093cfa7e4cbb27280576d39d63e5000df9f0d7c Mon Sep 17 00:00:00 2001 From: Ansuz Inspirati Date: Mon, 25 Aug 2025 08:35:41 +1000 Subject: 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. --- libcaja-private/caja-icon-container.c | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'libcaja-private/caja-icon-container.c') diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c index d30add27..dd8e7547 100644 --- a/libcaja-private/caja-icon-container.c +++ b/libcaja-private/caja-icon-container.c @@ -8823,6 +8823,23 @@ caja_icon_container_set_label_position (CajaIconContainer *container, } } +void +caja_display_git_branch_enable (CajaIconContainer *container, + CajaDisplayGitBranch enable) +{ + g_return_if_fail (CAJA_IS_ICON_CONTAINER (container)); + + if (container->details->display_git_branch != enable) + { + container->details->display_git_branch = enable; + + invalidate_labels (container); + caja_icon_container_request_update_all (container); + + schedule_redo_layout (container); + } +} + /* Switch from automatic to manual layout, freezing all the icons in their * current positions instead of restoring icon positions from the last manual * layout as set_auto_layout does. -- cgit v1.2.1