r21721 by jghali - remove "embed in PS" option from font prefs as it doesn't have an effect anymore

scribus-commit scribus-commit at lists.scribus.net
Sun Jan 8 18:20:46 UTC 2017


Author: jghali
Date: Sun Jan  8 18:20:46 2017
New Revision: 21721

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=21721
Log:
remove "embed in PS" option from font prefs as it doesn't have an effect anymore

Modified:
    trunk/Scribus/scribus/fontlistmodel.cpp
    trunk/Scribus/scribus/fontlistmodel.h
    trunk/Scribus/scribus/ui/fontlistview.cpp
    trunk/Scribus/scribus/ui/fontlistview.h
    trunk/Scribus/scribus/ui/prefs_fonts.cpp

Modified: trunk/Scribus/scribus/fontlistmodel.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21721&path=/trunk/Scribus/scribus/fontlistmodel.cpp
==============================================================================
--- trunk/Scribus/scribus/fontlistmodel.cpp	(original)
+++ trunk/Scribus/scribus/fontlistmodel.cpp	Sun Jan  8 18:20:46 2017
@@ -89,8 +89,6 @@
 				return tr("Type");
 			case FontListModel::FontFormat:
 				return tr("Format");
-			case FontListModel::FontEmbed:
-				return tr("Embed in PostScript");
 			case FontListModel::FontSubset:
 				return tr("Subset");
 			case FontListModel::FontAccess:
@@ -199,7 +197,6 @@
 				if (role == Qt::ToolTipRole
 					&&
 					(index.column() == FontListModel::FontUsable
-					 || index.column() == FontListModel::FontEmbed
 					 || index.column() == FontListModel::FontSubset
 					 )
 					)
@@ -217,13 +214,6 @@
 		else
 			return (m_enabledFonts[index.row()] ? Qt::Checked : Qt::Unchecked);
 	}
-	if (role == Qt::CheckStateRole && index.column() == FontListModel::FontEmbed)
-	{
-		if (isLive())
-			return (font.embedPs() ? Qt::Checked : Qt::Unchecked);
-		else
-			return ((m_embedFlags[index.row()] & EmbedPS) ? Qt::Checked : Qt::Unchecked);
-	}
 	if (role == Qt::CheckStateRole && index.column() == FontListModel::FontSubset)
 	{
 		if (isLive())
@@ -242,7 +232,6 @@
 	if (!index.isValid())
 		return QAbstractTableModel::flags(index);
 	if (index.column() == FontListModel::FontUsable
-		   || index.column() == FontListModel::FontEmbed
 		   || index.column() == FontListModel::FontSubset)
 		return Qt::ItemIsUserCheckable | /*Qt::ItemIsEditable |*/ defaultFlags;
 	else
@@ -276,8 +265,6 @@
 	{
 		if (idx.column() == FontListModel::FontUsable)
 			f.usable(!f.usable());
-		else if (idx.column() == FontListModel::FontEmbed)
-			f.embedPs(!f.embedPs());
 		else if (idx.column() == FontListModel::FontSubset)
 			f.subset(!f.subset());
 		else
@@ -289,12 +276,6 @@
 		{
 			Qt::CheckState checkState = static_cast<Qt::CheckState>(value.toInt());
 			m_enabledFonts[idx.row()] = (checkState == Qt::Checked);
-		}
-		if (idx.column() == FontListModel::FontEmbed)
-		{
-			Qt::CheckState checkState = static_cast<Qt::CheckState>(value.toInt());
-			m_embedFlags[idx.row()] &= ~EmbedPS;
-			m_embedFlags[idx.row()] |= (checkState == Qt::Checked) ? EmbedPS : 0;
 		}
 		else if (idx.column() == FontListModel::FontSubset)
 		{
@@ -309,7 +290,7 @@
 	if (idx.column() == FontListModel::FontUsable)
 		emit dataChanged(index(idx.row(), FontListModel::FontUsable), index(idx.row(), FontListModel::FontUsable));
 	else
-		emit dataChanged(index(idx.row(), FontListModel::FontEmbed), index(idx.row(), FontListModel::FontSubset));
+		emit dataChanged(index(idx.row(), FontListModel::FontSubset), index(idx.row(), FontListModel::FontSubset));
 
 	return true;
 }

Modified: trunk/Scribus/scribus/fontlistmodel.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21721&path=/trunk/Scribus/scribus/fontlistmodel.h
==============================================================================
--- trunk/Scribus/scribus/fontlistmodel.h	(original)
+++ trunk/Scribus/scribus/fontlistmodel.h	Sun Jan  8 18:20:46 2017
@@ -35,11 +35,10 @@
 		FontListModel(QObject * parent = 0, ScribusDoc * doc = 0, bool includeDisabled = false);
 
 		enum ColumnTypes {
-            FontUsable = 0,
+			FontUsable = 0,
 			FontName,
 			FontType,
 			FontFormat,
-			FontEmbed,
 			FontSubset,
 			FontAccess,
 			FontInDoc,

Modified: trunk/Scribus/scribus/ui/fontlistview.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21721&path=/trunk/Scribus/scribus/ui/fontlistview.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/fontlistview.cpp	(original)
+++ trunk/Scribus/scribus/ui/fontlistview.cpp	Sun Jan  8 18:20:46 2017
@@ -58,11 +58,3 @@
 	return (checkState == Qt::Checked);
 }
 
-bool FontListView::isFontEmbeddedInPS(int i)
-{
-	FontListModel* fontModel = qobject_cast<FontListModel*>(model());
-	QModelIndex cellIndex = fontModel->index(i, FontListModel::FontEmbed);
-	QVariant    checkData = fontModel->data(cellIndex, Qt::CheckStateRole);
-	Qt::CheckState checkState = static_cast<Qt::CheckState>(checkData.toInt());
-	return (checkState == Qt::Checked);
-}

Modified: trunk/Scribus/scribus/ui/fontlistview.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21721&path=/trunk/Scribus/scribus/ui/fontlistview.h
==============================================================================
--- trunk/Scribus/scribus/ui/fontlistview.h	(original)
+++ trunk/Scribus/scribus/ui/fontlistview.h	Sun Jan  8 18:20:46 2017
@@ -30,7 +30,6 @@
 		QString fontName(int i);
 		bool    isFontUsable(int i);
 		bool    isFontSubsetted(int i);
-		bool    isFontEmbeddedInPS(int i);
 };
 
 #endif

Modified: trunk/Scribus/scribus/ui/prefs_fonts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=21721&path=/trunk/Scribus/scribus/ui/prefs_fonts.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_fonts.cpp	(original)
+++ trunk/Scribus/scribus/ui/prefs_fonts.cpp	Sun Jan  8 18:20:46 2017
@@ -219,7 +219,6 @@
 
 		face.usable(fontListTableView->isFontUsable(i));
 		face.subset(fontListTableView->isFontSubsetted(i));
-		face.embedPs(fontListTableView->isFontEmbeddedInPS(i));
 	}
 
 	if (m_doc==0)




More information about the scribus-commit mailing list