View Issue Details

IDProjectCategoryView StatusLast Update
0017424ScribusIntegrationpublic2025-02-18 20:15
Reporterhugowett Assigned Tojghali  
PrioritynormalSeveritytweakReproducibilitysometimes
Status resolvedResolutionfixed 
Product Version1.7.1.svn 
Fixed in Version1.6.4.svn 
Summary0017424: Prevent hyphenation dialog from opening when running with --no-gui
DescriptionThe hyphenation dialog can open when scribus.hyphenateText() is called, even when running without GUI, this blocks any headless automation.
Tagsautomation
PatchYes

Activities

hugowett

2025-02-18 12:57

reporter  

0001-prevent-hyphenation-confirmation-dialog-when-not-usi.patch (1,179 bytes)   
From 861a39f4b989f3b7a526d014e4f0bf44c30f25f2 Mon Sep 17 00:00:00 2001
From: Hugo Wetterberg <hugo@wetterberg.nu>
Date: Tue, 18 Feb 2025 13:39:02 +0100
Subject: [PATCH] prevent hyphenation confirmation dialog when not using GUI

---
 scribus/hyphenator.cpp | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git scribus/hyphenator.cpp scribus/hyphenator.cpp
index c7b7e3856..30657ba5d 100644
--- scribus/hyphenator.cpp
+++ scribus/hyphenator.cpp
@@ -188,7 +188,7 @@ void Hyphenator::slotHyphenate(PageItem* it)
 			// TODO: support non-standard hyphenation, see hnj_hyphen_hyphenate2 docs
 			if (!hnj_hyphen_hyphenate2(m_hdict, te.data(), te.length(), buffer, nullptr, &rep, &pos, &cut))
 			{
-	  			int i = 0;
+				int i = 0;
 				buffer[te.length()] = '\0';
 				bool hasHyphen = false;
 				for (i = 1; i < wordLower.length() - 1; ++i)
@@ -214,7 +214,7 @@ void Hyphenator::slotHyphenate(PageItem* it)
 				{
 					if (!hasHyphen)
 						it->itemText.hyphenateWord(startC + firstC, wordLower.length(), nullptr);
-					else if (m_automatic)
+					else if (m_automatic || !ScCore->usingGUI())
 					{
 						if (specialWords.contains(word))
 						{
-- 
2.48.1

jghali

2025-02-18 20:15

administrator   ~0052068

I have applied your patch, thanks!

Issue History

Date Modified Username Field Change
2025-02-18 12:57 hugowett New Issue
2025-02-18 12:57 hugowett Tag Attached: automation
2025-02-18 12:57 hugowett File Added: 0001-prevent-hyphenation-confirmation-dialog-when-not-usi.patch
2025-02-18 20:15 jghali Assigned To => jghali
2025-02-18 20:15 jghali Status new => resolved
2025-02-18 20:15 jghali Resolution open => fixed
2025-02-18 20:15 jghali Fixed in Version => 1.6.4.svn
2025-02-18 20:15 jghali Note Added: 0052068