r24454 by jghali - Do not show PDF import dialog when creating barcode

scribus-commit scribus-commit at lists.scribus.net
Sun Feb 7 23:08:29 UTC 2021


Author: jghali
Date: Sun Feb  7 23:08:29 2021
New Revision: 24454

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=24454
Log:
Do not show PDF import dialog when creating barcode

Modified:
    trunk/Scribus/scribus/loadsaveplugin.h
    trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp
    trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp

Modified: trunk/Scribus/scribus/loadsaveplugin.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24454&path=/trunk/Scribus/scribus/loadsaveplugin.h
==============================================================================
--- trunk/Scribus/scribus/loadsaveplugin.h	(original)
+++ trunk/Scribus/scribus/loadsaveplugin.h	Sun Feb  7 23:08:29 2021
@@ -50,7 +50,8 @@
 			lfKeepGradients   =  64,
 			lfKeepPatterns    = 128,
 			lfCreateThumbnail = 256,
-			lfLoadAsPattern   = 512
+			lfLoadAsPattern   = 512,
+			lfNoDialogs       = 1024
 		};
 
 		// Static functions:

Modified: trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24454&path=/trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp	(original)
+++ trunk/Scribus/scribus/plugins/barcodegenerator/barcodegenerator.cpp	Sun Feb  7 23:08:29 2021
@@ -762,7 +762,7 @@
 
 	if (fmt)
 	{
-		fmt->loadFile(psFile, LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive);
+		fmt->loadFile(psFile, LoadSavePlugin::lfUseCurrentPage|LoadSavePlugin::lfInteractive|LoadSavePlugin::lfNoDialogs);
 		if (tran)
 			tran.commit();
 	}

Modified: trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=24454&path=/trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp
==============================================================================
--- trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp	(original)
+++ trunk/Scribus/scribus/plugins/import/pdf/importpdf.cpp	Sun Feb  7 23:08:29 2021
@@ -69,7 +69,6 @@
 	m_Doc = doc;
 	importerFlags = flags;
 	interactive = (flags & LoadSavePlugin::lfInteractive);
-
 }
 
 QImage PdfPlug::readThumbnail(const QString& fName)
@@ -433,7 +432,7 @@
 				bool cropped = false;
 				bool importTextAsVectors = true;
 				int contentRect = Media_Box;
-				if ((interactive) || (importerFlags & LoadSavePlugin::lfCreateDoc))
+				if ((interactive && !(importerFlags & LoadSavePlugin::lfNoDialogs)) || (importerFlags & LoadSavePlugin::lfCreateDoc))
 				{
 					if (progressDialog)
 						progressDialog->hide();




More information about the scribus-commit mailing list