r23871 by jghali - Add possibility to insert Narrow No-Break Space from Insert > Spaces menu
scribus-commit
scribus-commit at lists.scribus.net
Tue Jun 2 18:30:05 UTC 2020
Author: jghali
Date: Tue Jun 2 18:30:05 2020
New Revision: 23871
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23871
Log:
Add possibility to insert Narrow No-Break Space from Insert > Spaces menu
Modified:
trunk/Scribus/scribus/actionmanager.cpp
trunk/Scribus/scribus/fonts/scface.cpp
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/text/specialchars.cpp
trunk/Scribus/scribus/text/specialchars.h
trunk/Scribus/scribus/ui/storyeditor.cpp
Modified: trunk/Scribus/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23871&path=/trunk/Scribus/scribus/actionmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/actionmanager.cpp (original)
+++ trunk/Scribus/scribus/actionmanager.cpp Tue Jun 2 18:30:05 2020
@@ -1052,6 +1052,8 @@
actionMap->insert(name, new ScrAction(defaultKey(name), actionParent, SpecialChars::NBHYPHEN.unicode()));
name = "unicodeNonBreakingSpace";
actionMap->insert(name, new ScrAction(defaultKey(name), actionParent, SpecialChars::NBSPACE.unicode()));
+ name = "unicodeNarrowNoBreakSpace";
+ actionMap->insert(name, new ScrAction(defaultKey(name), actionParent, 0x202F));
name = "unicodePageNumber";
actionMap->insert(name, new ScrAction(defaultKey(name), actionParent, SpecialChars::PAGENUMBER.unicode()));
name = "unicodePageCount";
@@ -1158,7 +1160,7 @@
//Spaces and special characters
*actionNamesList << "unicodeZWNJ" << "unicodeZWJ";
- *actionNamesList << "unicodeSoftHyphen" << "unicodeNonBreakingHyphen" << "unicodeNonBreakingSpace" << "unicodePageNumber" << "unicodePageCount";
+ *actionNamesList << "unicodeSoftHyphen" << "unicodeNonBreakingHyphen" << "unicodeNonBreakingSpace" << "unicodeNarrowNoBreakSpace" << "unicodePageNumber" << "unicodePageCount";
*actionNamesList << "unicodeSpaceEN" << "unicodeSpaceEM" << "unicodeSpaceThin" << "unicodeSpaceThick" << "unicodeSpaceMid" << "unicodeSpaceHair";
//Breaks
*actionNamesList << "unicodeNewLine" << "unicodeFrameBreak" << "unicodeColumnBreak" << "unicodeZerowidthSpace";
@@ -1846,6 +1848,7 @@
(*actionMap)["unicodeSoftHyphen"]->setText( tr("Soft &Hyphen"));
(*actionMap)["unicodeNonBreakingHyphen"]->setText( tr("Non Breaking Hyphen"));
(*actionMap)["unicodeNonBreakingSpace"]->setText( tr("Non Breaking &Space"));
+ (*actionMap)["unicodeNarrowNoBreakSpace"]->setTexts( tr("Narrow No-Break Space"));
(*actionMap)["unicodePageNumber"]->setText( tr("Page &Number"));
(*actionMap)["unicodePageCount"]->setText( tr("Number of Pages"));
(*actionMap)["unicodeNewLine"]->setText( tr("New Line"));
@@ -1999,6 +2002,7 @@
defKeys.insert("unicodeSoftHyphen", Qt::CTRL+Qt::SHIFT+Qt::Key_Minus);
defKeys.insert("unicodeNonBreakingHyphen", Qt::CTRL+Qt::ALT+Qt::Key_Minus);
defKeys.insert("unicodeNonBreakingSpace", Qt::CTRL+Qt::Key_Space);
+ defKeys.insert("unicodeNarrowNoBreakSpace", Qt::CTRL+Qt::ALT+Qt::Key_Space);
defKeys.insert("unicodePageNumber", Qt::CTRL+Qt::SHIFT+Qt::ALT+Qt::Key_P);
defKeys.insert("unicodeNewLine", Qt::SHIFT+Qt::Key_Return);
@@ -2229,6 +2233,7 @@
<< "unicodeSoftHyphen"
<< "unicodeNonBreakingHyphen"
<< "unicodeNonBreakingSpace"
+ << "unicodeNarrowNoBreakSpace"
<< "unicodePageNumber"
<< "unicodePageCount"
<< "unicodeNewLine"
@@ -2278,6 +2283,7 @@
<< "unicodeSoftHyphen"
<< "unicodeNonBreakingHyphen"
<< "unicodeNonBreakingSpace"
+ << "unicodeNarrowNoBreakSpace"
<< "unicodePageNumber"
<< "unicodePageCount"
<< "unicodeNewLine"
@@ -2476,6 +2482,7 @@
itnmenua->second << "unicodeSoftHyphen";
itnmenua->second << "unicodeNonBreakingHyphen";
itnmenua->second << "unicodeNonBreakingSpace";
+ itnmenua->second << "unicodeNarrowNoBreakSpace";
itnmenua->second << "unicodePageNumber";
itnmenua->second << "unicodePageCount";
itnmenua->second << "unicodeNewLine";
Modified: trunk/Scribus/scribus/fonts/scface.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23871&path=/trunk/Scribus/scribus/fonts/scface.cpp
==============================================================================
--- trunk/Scribus/scribus/fonts/scface.cpp (original)
+++ trunk/Scribus/scribus/fonts/scface.cpp Tue Jun 2 18:30:05 2020
@@ -412,6 +412,8 @@
return CONTROL_GLYPHS + ch;
if (ch == SpecialChars::NBSPACE)
return m_m->char2CMap(' ');
+ if (ch == SpecialChars::NNBSPACE)
+ return m_m->char2CMap(0x2009); // Use thin space
if (ch == SpecialChars::NBHYPHEN)
return hyphenGlyph();
return 0;
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23871&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Tue Jun 2 18:30:05 2020
@@ -1113,6 +1113,7 @@
scrMenuMgr->createMenu("InsertSpace", tr("S&paces && Breaks"), "Insert");
scrMenuMgr->addMenuItemString("InsertSpace", "Insert");
scrMenuMgr->addMenuItemString("unicodeNonBreakingSpace", "InsertSpace");
+ scrMenuMgr->addMenuItemString("unicodeNarrowNoBreakSpace", "InsertSpace");
scrMenuMgr->addMenuItemString("unicodeSpaceEN", "InsertSpace");
scrMenuMgr->addMenuItemString("unicodeSpaceEM", "InsertSpace");
scrMenuMgr->addMenuItemString("unicodeSpaceThin", "InsertSpace");
Modified: trunk/Scribus/scribus/text/specialchars.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23871&path=/trunk/Scribus/scribus/text/specialchars.cpp
==============================================================================
--- trunk/Scribus/scribus/text/specialchars.cpp (original)
+++ trunk/Scribus/scribus/text/specialchars.cpp Tue Jun 2 18:30:05 2020
@@ -33,6 +33,7 @@
QChar SpecialChars::SHYPHEN = QChar(0xAD);
QChar SpecialChars::NBHYPHEN = QChar(0x2011);
QChar SpecialChars::NBSPACE = QChar(0xA0);
+QChar SpecialChars::NNBSPACE = QChar(0x202F);
QChar SpecialChars::OLD_NBHYPHEN = QChar(24);
QChar SpecialChars::OLD_NBSPACE = QChar(29);
QChar SpecialChars::ZWNBSPACE = QChar(0x2060);
Modified: trunk/Scribus/scribus/text/specialchars.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23871&path=/trunk/Scribus/scribus/text/specialchars.h
==============================================================================
--- trunk/Scribus/scribus/text/specialchars.h (original)
+++ trunk/Scribus/scribus/text/specialchars.h Tue Jun 2 18:30:05 2020
@@ -43,6 +43,7 @@
static QChar OLD_NBSPACE;
static QChar NBHYPHEN;
static QChar NBSPACE;
+ static QChar NNBSPACE;
static QChar ZWNBSPACE;
static QChar ZWSPACE;
static QChar ZWNJ; // break ligatures
Modified: trunk/Scribus/scribus/ui/storyeditor.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23871&path=/trunk/Scribus/scribus/ui/storyeditor.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/storyeditor.cpp (original)
+++ trunk/Scribus/scribus/ui/storyeditor.cpp Tue Jun 2 18:30:05 2020
@@ -1879,6 +1879,7 @@
seMenuMgr->createMenu("InsertSpace", tr("Spaces && Breaks"), "Insert");
seMenuMgr->addMenuItemString("InsertSpace", "Insert");
seMenuMgr->addMenuItemString("unicodeNonBreakingSpace", "InsertSpace");
+ seMenuMgr->addMenuItemString("unicodeNarrowNoBreakSpace", "InsertSpace");
seMenuMgr->addMenuItemString("unicodeSpaceEN", "InsertSpace");
seMenuMgr->addMenuItemString("unicodeSpaceEM", "InsertSpace");
seMenuMgr->addMenuItemString("unicodeSpaceThin", "InsertSpace");
More information about the scribus-commit
mailing list