r19821 by craig - #8823: Add a Resource Manager that allows users to download dictionaries, fonts, templates, palettes, profiles (fonts, dicts working now). Sits under Windows menu.
scribus-commit
scribus-commit at lists.scribus.net
Mon Feb 16 22:33:34 UTC 2015
Author: craig
Date: Mon Feb 16 22:33:34 2015
New Revision: 19821
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=19821
Log:
#8823: Add a Resource Manager that allows users to download dictionaries, fonts, templates, palettes, profiles (fonts, dicts working now). Sits under Windows menu.
Added:
trunk/Scribus/scribus/ui/resourcemanagerbase.ui (with props)
Modified:
trunk/Scribus/scribus/CMakeLists.txt
trunk/Scribus/scribus/actionmanager.cpp
trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp
trunk/Scribus/scribus/downloadmanager/scdlthread.cpp
trunk/Scribus/scribus/downloadmanager/scdlthread.h
trunk/Scribus/scribus/scfonts.cpp
trunk/Scribus/scribus/scpaths.cpp
trunk/Scribus/scribus/scpaths.h
trunk/Scribus/scribus/scribus.cpp
trunk/Scribus/scribus/scribus.h
trunk/Scribus/scribus/scribusstructs.h
trunk/Scribus/scribus/ui/preferencesdialog.cpp
trunk/Scribus/scribus/ui/prefs_hyphenator.cpp
trunk/Scribus/scribus/ui/prefs_hyphenator.h
trunk/Scribus/scribus/ui/prefs_hyphenatorbase.ui
trunk/Scribus/scribus/ui/prefs_spelling.cpp
trunk/Scribus/scribus/ui/prefs_spelling.h
Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt (original)
+++ trunk/Scribus/scribus/CMakeLists.txt Mon Feb 16 22:33:34 2015
@@ -1,15 +1,13 @@
-
+#For those that want it, show the SVN version in the About dialog
IF (WANT_SVNVERSION)
ADD_DEFINITIONS(-DHAVE_SVNVERSION)
MESSAGE(STATUS "SVN Version requested in About dialog")
# a custom target that is always built
- add_custom_target(svnheader ALL
- DEPENDS svn_header ) # svn_header is nothing more than a unique string
+ add_custom_target(svnheader ALL DEPENDS svn_header ) # svn_header is nothing more than a unique string
# creates svnheader.h using cmake script
add_custom_command(OUTPUT svn_header ${CMAKE_CURRENT_BINARY_DIR}/svnheader.h
- COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR}
- -P ${CMAKE_MODULE_PATH}/getsvn.cmake)
+ COMMAND ${CMAKE_COMMAND} -DSOURCE_DIR=${CMAKE_CURRENT_SOURCE_DIR} -P ${CMAKE_MODULE_PATH}/getsvn.cmake)
set_source_files_properties(${CMAKE_CURRENT_BINARY_DIR}/svnversion.h
PROPERTIES GENERATED TRUE
@@ -39,17 +37,17 @@
IF(HAVE_OSG)
SET(SCRIBUS_OSG_UI_SRC
- ui/osgeditor.ui
+ ui/osgeditor.ui
)
SET(SCRIBUS_OSG_CLASS
- ui/AdapterWidget.h
- ui/osgeditor.h
- pageitem_osgframe.h
+ ui/AdapterWidget.h
+ ui/osgeditor.h
+ pageitem_osgframe.h
)
SET(SCRIBUS_OSG_SRC
- ui/AdapterWidget.cpp
- ui/osgeditor.cpp
- pageitem_osgframe.cpp
+ ui/AdapterWidget.cpp
+ ui/osgeditor.cpp
+ pageitem_osgframe.cpp
)
ENDIF (HAVE_OSG)
@@ -60,11 +58,12 @@
ENDIF(GMAGICK_FOUND)
# We setup something like a group to gather setter related stuff
-# because it could expand into a huge amount of file at some point.
+# because it could expand into a huge amount of files at some point.
SET(SCRIBUS_ITEMSETTERS_UI_SRC
-ui/positionsetter.ui
-ui/rotationsetter.ui
+ ui/positionsetter.ui
+ ui/rotationsetter.ui
)
+
SET(SCRIBUS_ITEMSETTERS_CLASS
openpalettemanager.h
openpalettemodel.h
@@ -74,6 +73,7 @@
ui/pageitempositionsetter.h
ui/pageitemrotationsetter.h
)
+
SET(SCRIBUS_ITEMSETTERS_SRC
openpalettemanager.cpp
openpalettemodel.cpp
@@ -157,7 +157,6 @@
ui/propertiespalette_groupbase.ui
ui/propertiespalette_imagebase.ui
ui/propertiespalette_linebase.ui
-# ui/propertiespalette_shadowbase.ui
ui/propertiespalette_shapebase.ui
ui/propertiespalette_tablebase.ui
ui/propertiespalette_textbase.ui
@@ -172,6 +171,7 @@
ui/propertywidget_textcolorbase.ui
ui/replacecolors.ui
ui/replaceonecolor.ui
+ ui/resourcemanagerbase.ui
ui/selectobjects.ui
ui/shortcutwidget.ui
ui/smcellstylewidget.ui
@@ -195,7 +195,7 @@
ui/unicodesearch.ui
ui/useprintermarginsdialog.ui
ui/weldeditbase.ui
-# ${SCRIBUS_ITEMSETTERS_UI_SRC}
+# #{SCRIBUS_ITEMSETTERS_UI_SRC}
${SCRIBUS_OSG_UI_SRC}
)
@@ -449,6 +449,7 @@
ui/query.h
ui/replacecolors.h
ui/replaceonecolor.h
+ ui/resourcemanager.h
ui/rulermover.h
ui/scdockpalette.h
ui/scescapecatcher.h
@@ -520,7 +521,7 @@
ui/useprintermarginsdialog.h
ui/vruler.h
ui/weldedit.h
-# ${SCRIBUS_ITEMSETTERS_CLASS}
+# #{SCRIBUS_ITEMSETTERS_CLASS}
${SCRIBUS_OSG_CLASS}
)
@@ -575,7 +576,6 @@
commonstrings.cpp
deferredtask.cpp
docinfo.cpp
- #documentbuilder.cpp
documentchecker.cpp
documentinformation.cpp
downloadmanager/scdlmgr.cpp
@@ -906,6 +906,7 @@
ui/query.cpp
ui/replacecolors.cpp
ui/replaceonecolor.cpp
+ ui/resourcemanager.cpp
ui/rulermover.cpp
ui/sccombobox.cpp
ui/scdockpalette.cpp
@@ -983,7 +984,7 @@
ui/vruler.cpp
ui/useprintermarginsdialog.cpp
ui/weldedit.cpp
-# ${SCRIBUS_ITEMSETTERS_SRC}
+# #{SCRIBUS_ITEMSETTERS_SRC}
${SCRIBUS_OSG_SRC}
${SCRIBUS_GMAGICK_SRC}
)
@@ -1059,7 +1060,6 @@
SET(SCRIBUS_2GEOM_LIB "scribus_2geom_lib")
ENDIF (HAVE_BOOST)
SET(SCRIBUS_WPG_LIB "scribus_wpg_lib")
-
SET(SCRIBUS_PGF_LIB "scribus_pgf_lib")
SET(SCRIBUS_ZIP_LIB "scribus_zip_lib")
@@ -1110,41 +1110,41 @@
ENDIF(COMMAND cmake_policy)
IF(HAVE_OSG)
-ADD_EXECUTABLE(${EXE_NAME}
- ${SCRIBUS_MOC_SOURCES}
- ${SCRIBUS_SOURCES}
- ${SCRIBUS_MAIN_CPP}
- ${SCRIBUS_UI_SOURCES}
- ${SCRIBUS_TEXT_SOURCES}
- ${SCRIBUS_STYLES_SOURCES}
- ${SCRIBUS_COLORMGMT_SOURCES}
- ${SCRIBUS_FONTS_SOURCES}
- ${SCRIBUS_DESAXE_SOURCES}
- ${SCRIBUS_WIN32_ONLY_SOURCES}
- ${GESTURE_FRAME_PREVIEW_SOURCES}
- ${SCRIBUS_PRC_SOURCES}
-)
+ ADD_EXECUTABLE(${EXE_NAME}
+ ${SCRIBUS_MOC_SOURCES}
+ ${SCRIBUS_SOURCES}
+ ${SCRIBUS_MAIN_CPP}
+ ${SCRIBUS_UI_SOURCES}
+ ${SCRIBUS_TEXT_SOURCES}
+ ${SCRIBUS_STYLES_SOURCES}
+ ${SCRIBUS_COLORMGMT_SOURCES}
+ ${SCRIBUS_FONTS_SOURCES}
+ ${SCRIBUS_DESAXE_SOURCES}
+ ${SCRIBUS_WIN32_ONLY_SOURCES}
+ ${GESTURE_FRAME_PREVIEW_SOURCES}
+ ${SCRIBUS_PRC_SOURCES}
+ )
ELSE(HAVE_OSG)
-ADD_EXECUTABLE(${EXE_NAME}
- ${SCRIBUS_MOC_SOURCES}
- ${SCRIBUS_SOURCES}
- ${SCRIBUS_MAIN_CPP}
- ${SCRIBUS_UI_SOURCES}
- ${SCRIBUS_TEXT_SOURCES}
- ${SCRIBUS_STYLES_SOURCES}
- ${SCRIBUS_COLORMGMT_SOURCES}
- ${SCRIBUS_FONTS_SOURCES}
- ${SCRIBUS_DESAXE_SOURCES}
- ${SCRIBUS_WIN32_ONLY_SOURCES}
- ${GESTURE_FRAME_PREVIEW_SOURCES}
-)
+ ADD_EXECUTABLE(${EXE_NAME}
+ ${SCRIBUS_MOC_SOURCES}
+ ${SCRIBUS_SOURCES}
+ ${SCRIBUS_MAIN_CPP}
+ ${SCRIBUS_UI_SOURCES}
+ ${SCRIBUS_TEXT_SOURCES}
+ ${SCRIBUS_STYLES_SOURCES}
+ ${SCRIBUS_COLORMGMT_SOURCES}
+ ${SCRIBUS_FONTS_SOURCES}
+ ${SCRIBUS_DESAXE_SOURCES}
+ ${SCRIBUS_WIN32_ONLY_SOURCES}
+ ${GESTURE_FRAME_PREVIEW_SOURCES}
+ )
ENDIF (HAVE_OSG)
IF(WIN32)
SET_TARGET_PROPERTIES(${EXE_NAME}
- PROPERTIES
- COMPILE_FLAGS -DCOMPILE_SCRIBUS_MAIN_APP
- ENABLE_EXPORTS TRUE
+ PROPERTIES
+ COMPILE_FLAGS -DCOMPILE_SCRIBUS_MAIN_APP
+ ENABLE_EXPORTS TRUE
)
SET(WIN32_ONLY_LIBS mscms.lib)
ELSE(WIN32)
@@ -1202,7 +1202,7 @@
IF (NOT WIN32 AND NOT HAIKU)
TARGET_LINK_LIBRARIES(${EXE_NAME}
- ${CUPS_LIBRARIES}
+ ${CUPS_LIBRARIES}
)
ENDIF (NOT WIN32 AND NOT HAIKU)
@@ -1246,63 +1246,63 @@
IF(WITH_TESTS)
TARGET_LINK_LIBRARIES(${EXE_NAME}
${QT_QTTEST_LIBRARY}
- ${SCRIBUS_TESTS_LIB}
+ ${SCRIBUS_TESTS_LIB}
)
ENDIF(WITH_TESTS)
IF(HAVE_PODOFO)
TARGET_LINK_LIBRARIES(${EXE_NAME}
- ${LIBPODOFO_LIBRARY}
+ ${LIBPODOFO_LIBRARY}
)
ENDIF(HAVE_PODOFO)
IF(HAVE_OSG)
TARGET_LINK_LIBRARIES(${EXE_NAME}
- ${OPENTHREADS_LIBRARY}
- ${OSG_LIBRARY}
- ${OSGGA_LIBRARY}
- ${OSGUTIL_LIBRARY}
- ${OSGDB_LIBRARY}
- ${OSGVIEWER_LIBRARY}
- ${OSGTEXT_LIBRARY}
- ${SCRIBUS_PRC_LIB}
+ ${OPENTHREADS_LIBRARY}
+ ${OSG_LIBRARY}
+ ${OSGGA_LIBRARY}
+ ${OSGUTIL_LIBRARY}
+ ${OSGDB_LIBRARY}
+ ${OSGVIEWER_LIBRARY}
+ ${OSGTEXT_LIBRARY}
+ ${SCRIBUS_PRC_LIB}
)
ENDIF(HAVE_OSG)
IF (HAVE_BOOST)
TARGET_LINK_LIBRARIES(${EXE_NAME}
- ${SCRIBUS_2GEOM_LIB}
+ ${SCRIBUS_2GEOM_LIB}
)
ENDIF(HAVE_BOOST)
# Now build plugins
- SET(PLUGIN_LIBRARIES
- ${Qt5Core_LIBRARIES}
- ${Qt5Widgets_LIBRARIES}
- ${Qt5Gui_LIBRARIES}
- ${Qt5Xml_LIBRARIES}
- ${Qt5WebKit_LIBRARIES}
- ${Qt5WebKitWidgets_LIBRARIES}
- ${Qt5Network_LIBRARIES}
- ${Qt5OpenGL_LIBRARIES}
- ${LIBXML2_LIBRARIES}
- ${ZLIB_LIBRARIES}
- )
+SET(PLUGIN_LIBRARIES
+ ${Qt5Core_LIBRARIES}
+ ${Qt5Widgets_LIBRARIES}
+ ${Qt5Gui_LIBRARIES}
+ ${Qt5Xml_LIBRARIES}
+ ${Qt5WebKit_LIBRARIES}
+ ${Qt5WebKitWidgets_LIBRARIES}
+ ${Qt5Network_LIBRARIES}
+ ${Qt5OpenGL_LIBRARIES}
+ ${LIBXML2_LIBRARIES}
+ ${ZLIB_LIBRARIES}
+)
IF(WIN32)
# IF your plugin needs more than this, please link them privately
# in the CMakeLists.txt for your plugin.
SET(PLUGIN_LIBRARIES
-# ${QT_LIBRARIES} part of #7210
- ${PLUGIN_LIBRARIES}
- ${EXE_NAME}
+# ${QT_LIBRARIES} part of #7210
+ ${PLUGIN_LIBRARIES}
+ ${EXE_NAME}
)
ENDIF(WIN32)
IF(APPLE)
SET(PLUGIN_LIBRARIES
- ${PLUGIN_LIBRARIES}
- "-undefined dynamic_lookup"
+ ${PLUGIN_LIBRARIES}
+ "-undefined dynamic_lookup"
)
ENDIF(APPLE)
MESSAGE(STATUS ${PLUGIN_LIBRARIES})
@@ -1333,14 +1333,14 @@
ELSE(APPLEBUNDLE)
IF(WIN32)
- INSTALL(TARGETS ${EXE_NAME}
- RUNTIME DESTINATION .
- LIBRARY DESTINATION ${LIB_DIR_NAME}
+ INSTALL(TARGETS ${EXE_NAME}
+ RUNTIME DESTINATION .
+ LIBRARY DESTINATION ${LIB_DIR_NAME}
)
ELSE(WIN32)
- INSTALL(TARGETS ${EXE_NAME}
- RUNTIME DESTINATION bin
- LIBRARY DESTINATION ${LIB_DIR_NAME}
+ INSTALL(TARGETS ${EXE_NAME}
+ RUNTIME DESTINATION bin
+ LIBRARY DESTINATION ${LIB_DIR_NAME}
)
ENDIF(WIN32)
ENDIF(APPLEBUNDLE)
@@ -1349,16 +1349,16 @@
IF(WANT_HEADERINSTALL)
MESSAGE(STATUS "Source header files will be installed")
INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/ DESTINATION ${INCLUDEDIR}
- FILES_MATCHING
- PATTERN "*.h"
- PATTERN "dicts" EXCLUDE
- PATTERN "doc" EXCLUDE
- PATTERN "dtd" EXCLUDE
- PATTERN "editorconfig" EXCLUDE
- PATTERN "icon*" EXCLUDE
- PATTERN "manpages" EXCLUDE
- PATTERN "old" EXCLUDE
- PATTERN ".svn" EXCLUDE
+ FILES_MATCHING
+ PATTERN "*.h"
+ PATTERN "dicts" EXCLUDE
+ PATTERN "doc" EXCLUDE
+ PATTERN "dtd" EXCLUDE
+ PATTERN "editorconfig" EXCLUDE
+ PATTERN "icon*" EXCLUDE
+ PATTERN "manpages" EXCLUDE
+ PATTERN "old" EXCLUDE
+ PATTERN ".svn" EXCLUDE
)
ELSE(WANT_HEADERINSTALL)
MESSAGE(STATUS "No source header files will be installed")
Modified: trunk/Scribus/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/actionmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/actionmanager.cpp (original)
+++ trunk/Scribus/scribus/actionmanager.cpp Mon Feb 16 22:33:34 2015
@@ -792,6 +792,8 @@
name="toolsBookmarks";
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
name="toolsDownloads";
+ scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
+ name="toolsResources";
scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
name="toolsMeasurements";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, loadIcon("16/measure.png"), loadIcon("22/measure.png"), "", defaultKey(name), mainWindow, modeMeasurementTool));
@@ -935,7 +937,7 @@
*nonEditActionNames << "itemLowerToBottom" << "itemRaiseToTop" << "itemRaise" << "itemLower";
connect( (*scrActions)["toolsActionHistory"], SIGNAL(toggled(bool)), mainWindow, SLOT(setUndoPalette(bool)) );
-
+ connect( (*scrActions)["toolsResources"], SIGNAL(triggered()), mainWindow, SLOT(slotResourceManager()) );
connectModeActions();
}
@@ -1667,6 +1669,7 @@
(*scrActions)["toolsPages"]->setTexts( tr("&Arrange Pages"));
(*scrActions)["toolsBookmarks"]->setTexts( tr("&Bookmarks"));
(*scrActions)["toolsDownloads"]->setTexts( tr("&Downloads"));
+ (*scrActions)["toolsResources"]->setTexts( tr("&Resources"));
(*scrActions)["toolsMeasurements"]->setTexts( tr("&Measurements"));
(*scrActions)["toolsActionHistory"]->setTexts( tr("Action &History"));
(*scrActions)["toolsPreflightVerifier"]->setTexts( tr("Preflight &Verifier"));
@@ -2327,6 +2330,7 @@
<< "toolsPages"
<< "toolsBookmarks"
<< "toolsDownloads"
+ << "toolsResources"
<< "toolsMeasurements"
<< "toolsActionHistory"
<< "toolsPreflightVerifier"
Modified: trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp
==============================================================================
--- trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp (original)
+++ trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp Mon Feb 16 22:33:34 2015
@@ -19,7 +19,7 @@
connect(thread, SIGNAL(fileReceived(const QString &)), this, SLOT(dlReceived(const QString&)));
connect(thread, SIGNAL(fileFailed(const QString &)), this, SLOT(dlFailed(const QString&)));
connect(thread, SIGNAL(fileStarted(const QString &)), this, SLOT(dlStarted(const QString &)));
- connect(thread, SIGNAL(finished()), this, SIGNAL(finished()));
+ //connect(thread, SIGNAL(finished()), this, SIGNAL(finished()));
connect(thread, SIGNAL(finished()), this, SLOT(moveFinishedDownloads()));
}
@@ -208,4 +208,5 @@
}
}
*/
-}
+ emit finished();
+}
Modified: trunk/Scribus/scribus/downloadmanager/scdlthread.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/downloadmanager/scdlthread.cpp
==============================================================================
--- trunk/Scribus/scribus/downloadmanager/scdlthread.cpp (original)
+++ trunk/Scribus/scribus/downloadmanager/scdlthread.cpp Mon Feb 16 22:33:34 2015
@@ -97,7 +97,7 @@
{
if (downloadQueue.isEmpty())
{
- //qDebug()<<downloadedCount<<"/"<<totalCount<<"files downloaded successfully";
+ qDebug()<<downloadedCount<<"/"<<totalCount<<"files downloaded successfully";
downloadedCount=totalCount=0;
emit finished();
return;
@@ -107,7 +107,7 @@
QString filename = saveFileName(urlPair.first, urlPair.second, true);
if (filename.isEmpty())
{
- //qDebug()<<"File name empty for url:"<<urlPair.first.toEncoded().constData();
+ qDebug()<<"File name empty for url:"<<urlPair.first.toEncoded().constData();
return;
}
output.setFileName(filename);
@@ -121,27 +121,40 @@
}
emit fileStarted(output.fileName());
QNetworkRequest request(urlPair.first);
+ //QNetworkReply *nwr=manager.head(request);
+ //qDebug()<<nwr->url()<<nwr->rawHeaderList();
+ //connect(&manager, SIGNAL(finished(QNetworkReply*)), this, SLOT(replyFinished(QNetworkReply*)));
currentDownload = manager.get(request);
- connect(currentDownload, SIGNAL(finished()), SLOT(downloadFinished()));
- connect(currentDownload, SIGNAL(readyRead()), SLOT(downloadReadyRead()));
-
- //qDebug()<<"Downloading:"<<urlPair.first.toEncoded().constData();
+ connect(currentDownload, SIGNAL(finished()), this, SLOT(downloadFinished()));
+ connect(currentDownload, SIGNAL(readyRead()), this, SLOT(downloadReadyRead()));
+
+ qDebug()<<"Downloading:"<<urlPair.first.toEncoded().constData();
}
void ScDLThread::downloadFinished()
{
output.close();
-
if (currentDownload->error())
{
- //qDebug()<<"Failed: "<<qPrintable(currentDownload->errorString());
+/*
+ if(currentDownload->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() == 301 || currentDownload->rawHeaderList().contains("Location"))
+ qDebug()<<currentDownload->header(QNetworkRequest::LocationHeader).toString();
+ if(currentDownload->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() == 302 || currentDownload->rawHeaderList().contains("Location"))
+ qDebug()<<currentDownload->header(QNetworkRequest::LocationHeader).toString();
+ if(currentDownload->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt() == 307 || currentDownload->rawHeaderList().contains("Location"))
+ qDebug()<<currentDownload->header(QNetworkRequest::LocationHeader).toString();
+
+ QUrl redirectUrl = currentDownload->attribute(QNetworkRequest::RedirectionTargetAttribute).toUrl();
+ qDebug()<<redirectUrl;
+*/
+ qDebug()<<"Failed: "<<qPrintable(currentDownload->errorString());
emit fileFailed(output.fileName());
if (output.exists())
output.remove();
}
else
{
- //qDebug()<<"Saving file:"<<qPrintable(output.fileName());
+ qDebug()<<"Saving file:"<<qPrintable(output.fileName());
++downloadedCount;
emit fileReceived(output.fileName());
}
@@ -149,6 +162,35 @@
startNextDownload();
}
+void ScDLThread::replyFinished(QNetworkReply* reply)
+{
+ qDebug()<<"replyFinished";
+ QVariant possibleRedirectUrl =reply->attribute(QNetworkRequest::RedirectionTargetAttribute);
+ QUrl urlRedirectedTo = possibleRedirectUrl.toUrl();
+ QString text;
+ /* If the URL is not empty, we're being redirected. */
+ if(!urlRedirectedTo.isEmpty())
+ {
+ qDebug()<<reply->header(QNetworkRequest::LocationHeader);
+ text = QString("QNAMRedirect::replyFinished: Redirected to ").append(urlRedirectedTo.toString());
+ addURL(text, true, ScPaths::downloadDir(), ScPaths::downloadDir());
+ /* We'll do another request to the redirection url. */
+ // this->_qnam->get(QNetworkRequest(_urlRedirectedTo));
+ }
+ else
+ {
+ /*
+ * We weren't redirected anymore
+ * so we arrived to the final destination...
+ */
+ text = QString("QNAMRedirect::replyFinished: Arrived to ").append(reply->url().toString());
+ urlRedirectedTo.clear();
+ }
+ qDebug()<<text;
+ /* Clean up. */
+ reply->deleteLater();
+}
+
void ScDLThread::downloadReadyRead()
{
Modified: trunk/Scribus/scribus/downloadmanager/scdlthread.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/downloadmanager/scdlthread.h
==============================================================================
--- trunk/Scribus/scribus/downloadmanager/scdlthread.h (original)
+++ trunk/Scribus/scribus/downloadmanager/scdlthread.h Mon Feb 16 22:33:34 2015
@@ -33,6 +33,7 @@
private slots:
void startNextDownload();
void downloadFinished();
+ void replyFinished(QNetworkReply* reply);
void downloadReadyRead();
void runSlot();
Modified: trunk/Scribus/scribus/scfonts.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/scfonts.cpp
==============================================================================
--- trunk/Scribus/scribus/scfonts.cpp (original)
+++ trunk/Scribus/scribus/scfonts.cpp Mon Feb 16 22:33:34 2015
@@ -974,6 +974,10 @@
// Search Scribus font path
if (!ScPaths::instance().fontDir().isEmpty() && QDir(ScPaths::instance().fontDir()).exists())
AddScalableFonts( ScPaths::instance().fontDir() );
+ //Add downloaded user fonts
+ QString userFontDir(ScPaths::instance().getUserFontDir(false));
+ if (QDir(userFontDir).exists())
+ AddScalableFonts( userFontDir );
// if fontconfig is there, it does all the work
#if HAVE_FONTCONFIG
// Search fontconfig paths
Modified: trunk/Scribus/scribus/scpaths.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/scpaths.cpp
==============================================================================
--- trunk/Scribus/scribus/scpaths.cpp (original)
+++ trunk/Scribus/scribus/scpaths.cpp Mon Feb 16 22:33:34 2015
@@ -518,6 +518,17 @@
return userDictDirectory.absolutePath()+"/";
}
+QString ScPaths::getUserFontDir(bool createIfNotExists)
+{
+ QDir userDictDirectory(getApplicationDataDir() + "fonts/");
+ if(createIfNotExists)
+ {
+ if (!userDictDirectory.exists())
+ userDictDirectory.mkpath(userDictDirectory.absolutePath());
+ }
+ return userDictDirectory.absolutePath()+"/";
+}
+
QString ScPaths::getUserDocumentDir(void)
{
#if defined(_WIN32)
Modified: trunk/Scribus/scribus/scpaths.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/scpaths.h
==============================================================================
--- trunk/Scribus/scribus/scpaths.h (original)
+++ trunk/Scribus/scribus/scpaths.h Mon Feb 16 22:33:34 2015
@@ -70,8 +70,10 @@
static QStringList getDirsFromEnvVar(const QString envVar, const QString dirToFind);
/** @brief Return path to application data dir*/
static QString getApplicationDataDir(void);
- /** @brief Return path to application data dir for downloaded dictsionaries*/
+ /** @brief Return path to application data dir for downloaded dictionaries*/
static QString getUserDictDir(bool createIfNotExists);
+ /** @brief Return path to application data dir for downloaded fonts*/
+ static QString getUserFontDir(bool createIfNotExists);
/** @brief Return path to image cache dir*/
static QString getImageCacheDir(void);
/** @brief Return path to plugin data dir*/
Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp (original)
+++ trunk/Scribus/scribus/scribus.cpp Mon Feb 16 22:33:34 2015
@@ -229,6 +229,7 @@
#include "ui/propertiespalette_xyz.h"
#include "ui/query.h"
#include "ui/replacecolors.h"
+#include "ui/resourcemanager.h"
#include "ui/sccombobox.h"
#include "ui/scfilewidget.h"
#include "ui/scmessagebox.h"
@@ -296,6 +297,7 @@
scrMenuMgr=0;
prefsManager=0;
formatsManager=0;
+ resourceManager=0;
UrlLauncher::instance();
mainWindowStatusLabel=0;
ExternalApp=0;
@@ -1178,6 +1180,7 @@
scrMenuMgr->addMenuItemString("toolsLayers", "Windows");
scrMenuMgr->addMenuItemString("toolsBookmarks", "Windows");
scrMenuMgr->addMenuItemString("toolsDownloads", "Windows");
+ scrMenuMgr->addMenuItemString("toolsResources", "Windows");
scrMenuMgr->addMenuItemString("SEPARATOR", "Windows");
scrMenuMgr->addMenuItemString("toolsScrapbook", "Windows");
scrMenuMgr->addMenuItemString("toolsSymbols", "Windows");
@@ -5046,6 +5049,17 @@
{
if (helpBrowser)
helpBrowser->deleteLater();
+}
+
+void ScribusMainWindow::slotResourceManager()
+{
+ if (!resourceManager)
+ {
+ resourceManager=new ResourceManager(this);
+ resourceManager->exec();
+ resourceManager->deleteLater();
+ resourceManager=0;
+ }
}
void ScribusMainWindow::ToggleTips()
Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h (original)
+++ trunk/Scribus/scribus/scribus.h Mon Feb 16 22:33:34 2015
@@ -81,7 +81,6 @@
class LayerPalette;
class MarksManager;
class Measurements;
-class ScMWMenuManager;
class ModeToolBar;
class NodePalette;
class NotesStylesEditor;
@@ -94,14 +93,16 @@
class PrefsContext;
class PrefsManager;
class PropertiesPalette;
+class ResourceManager;
+class ScMWMenuManager;
class ScToolBar;
class ScrAction;
+class ScrSpinBox;
+class ScribusCore;
class ScribusDoc;
-class ScribusCore;
class ScribusMainWindow;
class ScribusQApp;
class ScribusWin;
-class ScrSpinBox;
class SimpleState;
class StoryEditor;
class StyleManager;
@@ -111,7 +112,6 @@
class UndoPalette;
class UndoState;
class ViewToolBar;
-
extern SCRIBUS_API ScribusQApp* ScQApp;
@@ -252,6 +252,7 @@
CheckDocument * docCheckerPalette;
UndoPalette* undoPalette;
AlignDistributePalette *alignDistributePalette;
+ ResourceManager *resourceManager;
StoryEditor* storyEditor;
StoryEditor* CurrStED;
QMdiArea *mdiArea;
@@ -401,6 +402,7 @@
void slotRaiseOnlineHelp();
void slotOnlineHelp(const QString & jumpToSection=QString::null, const QString & jumpToFile=QString::null);
void slotOnlineHelpClosed();
+ void slotResourceManager();
void ToggleTips();
void ToggleMouseTips();
/** \brief Erzeugt eine neue Seite */
Modified: trunk/Scribus/scribus/scribusstructs.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/scribusstructs.h
==============================================================================
--- trunk/Scribus/scribus/scribusstructs.h (original)
+++ trunk/Scribus/scribus/scribusstructs.h Mon Feb 16 22:33:34 2015
@@ -371,7 +371,7 @@
};
//TODO: Dict license showing, URL background unzipping, checksumming, pkg mgr platforms warning
-struct DictData
+struct DownloadItem
{
QString lang;
QString version;
@@ -380,6 +380,7 @@
QString desc;
QString license;
QString filetype;
+ QString type;
bool download;
};
Modified: trunk/Scribus/scribus/ui/preferencesdialog.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/ui/preferencesdialog.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/preferencesdialog.cpp (original)
+++ trunk/Scribus/scribus/ui/preferencesdialog.cpp Mon Feb 16 22:33:34 2015
@@ -46,7 +46,7 @@
prefs_Plugins(0),prefs_PreflightVerifier(0),
prefs_Printer(0),
prefs_Scrapbook(0),
- prefs_Spelling(0),
+// prefs_Spelling(0),
prefs_TableOfContents(0),
prefs_Typography(0),
prefs_UserInterface(0),
@@ -99,7 +99,7 @@
prefs_Paths = new Prefs_Paths(prefsStackWidget, m_Doc);
prefs_Plugins = new Prefs_Plugins(prefsStackWidget, m_Doc);
prefs_Scrapbook = new Prefs_Scrapbook(prefsStackWidget, m_Doc);
- prefs_Spelling = new Prefs_Spelling(prefsStackWidget, m_Doc);
+// prefs_Spelling = new Prefs_Spelling(prefsStackWidget, m_Doc);
prefs_UserInterface = new Prefs_UserInterface(prefsStackWidget, m_Doc);
}
// Add Stack Widgets if required
@@ -137,7 +137,7 @@
{
addItem( tr("Keyboard Shortcuts"), loadIcon("16/preferences-desktop-keyboard-shortcuts.png"), prefs_KeyboardShortcuts);
addItem( tr("Scrapbook"), loadIcon("scrap_16.png"), prefs_Scrapbook);
- addItem( tr("Spelling"), loadIcon("signature_16.png"), prefs_Spelling);
+// addItem( tr("Spelling"), loadIcon("signature_16.png"), prefs_Spelling);
}
addItem( tr("Display"), loadIcon("16/video-display.png"), prefs_Display);
if (!doc)
@@ -216,7 +216,7 @@
prefs_ColorManagement->restoreDefaults(&localPrefs);
}
if (prefs_Scrapbook) prefs_Scrapbook->restoreDefaults(&localPrefs);
- if (prefs_Spelling) prefs_Spelling->restoreDefaults(&localPrefs);
+// if (prefs_Spelling) prefs_Spelling->restoreDefaults(&localPrefs);
if (prefs_Display) prefs_Display->restoreDefaults(&localPrefs);
if (prefs_ExternalTools) prefs_ExternalTools->restoreDefaults(&localPrefs);
if (prefs_Plugins) prefs_Plugins->restoreDefaults(&localPrefs);
@@ -247,7 +247,7 @@
if (prefs_KeyboardShortcuts) prefs_KeyboardShortcuts->saveGuiToPrefs(&localPrefs);
if (prefs_ColorManagement) prefs_ColorManagement->saveGuiToPrefs(&localPrefs);
if (prefs_Scrapbook) prefs_Scrapbook->saveGuiToPrefs(&localPrefs);
- if (prefs_Spelling) prefs_Spelling->saveGuiToPrefs(&localPrefs);
+// if (prefs_Spelling) prefs_Spelling->saveGuiToPrefs(&localPrefs);
if (prefs_Display) prefs_Display->saveGuiToPrefs(&localPrefs);
if (prefs_ExternalTools) prefs_ExternalTools->saveGuiToPrefs(&localPrefs);
if (prefs_Plugins) prefs_Plugins->saveGuiToPrefs(&localPrefs);
Modified: trunk/Scribus/scribus/ui/prefs_hyphenator.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/ui/prefs_hyphenator.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_hyphenator.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_hyphenator.cpp Mon Feb 16 22:33:34 2015
@@ -36,15 +36,6 @@
LanguageManager::instance()->fillInstalledHyphStringList(&languageList);
languageList.sort();
hyphLanguageComboBox->addItems( languageList );
-
- updateDictList();
- downloadLocation=ScPaths::downloadDir();
- hyphDownloadButton->setEnabled(false);
- setAvailDictsXMLFile(downloadLocation + "scribus_hyph_dicts.xml");
- downloadProgressBar->setVisible(false);
- dlLabel->setVisible(false);
- connect(hyphDownloadButton, SIGNAL(clicked()), this, SLOT(downloadHyphDicts()));
- connect(availHyphListDownloadButton, SIGNAL(clicked()), this, SLOT(updateAvailDictList()));
exceptionAddButton->setIcon(QIcon(loadIcon("16/list-add.png")));
exceptionEditButton->setEnabled(false);
@@ -187,209 +178,3 @@
exceptionEditButton->setEnabled(true);
exceptionRemoveButton->setEnabled(true);
}
-
-void Prefs_Hyphenator::downloadHyphDicts()
-{
- int rows=availHyphDictTableWidget->rowCount();
- QStringList dlLangs;
- for (int i=0; i<rows; ++i)
- {
- QTableWidgetItem *dlItem=availHyphDictTableWidget->item(i,3);
- if (dlItem->checkState()==Qt::Checked)
- dlLangs<<availHyphDictTableWidget->item(i,1)->text();
- }
- if (dlLangs.isEmpty())
- return;
- hyphDownloadButton->setEnabled(false);
- downloadList.clear();
- downloadProgressBar->setValue(0);
- downloadProgressBar->setVisible(true);
- dlLabel->setVisible(true);
- int i=0;
- QString userDictDir(ScPaths::getUserDictDir(true));
- foreach(DictData d, dictList)
- {
- if (dlLangs.contains(d.lang))
- {
- if (d.filetype=="zip")
- {
- ScQApp->dlManager()->addURL(d.url, true, downloadLocation, userDictDir);
- ++i;
- }
- if (d.filetype=="plain")
- {
- //qDebug()<<d.url<<d.files;
- QStringList plainURLs(d.files.split(";", QString::SkipEmptyParts));
- foreach (QString s, plainURLs)
- {
- ScQApp->dlManager()->addURL(d.url+"/"+s, true, downloadLocation, userDictDir);
- ++i;
- }
- downloadList.append(d);
- }
- }
- }
- if (i>0)
- {
- downloadProgressBar->setRange(0, i);
- connect(ScQApp->dlManager(), SIGNAL(finished()), this, SLOT(downloadHyphDictsFinished()));
- connect(ScQApp->dlManager(), SIGNAL(fileReceived(const QString&)), this, SLOT(updateProgressBar()));
- connect(ScQApp->dlManager(), SIGNAL(fileFailed(const QString&)), this, SLOT(updateProgressBar()));
- ScQApp->dlManager()->startDownloads();
- }
-}
-
-void Prefs_Hyphenator::updateDictList()
-{
- bool dictsFound=LanguageManager::instance()->findHyphDictionaries(dictionaryPaths);
- if (!dictsFound)
- return;
- dictionaryMap.clear();
- LanguageManager::instance()->findHyphDictionarySets(dictionaryPaths, dictionaryMap);
-
- hyphDictTableWidget->clear();
- hyphDictTableWidget->setRowCount(dictionaryMap.count());
- hyphDictTableWidget->setColumnCount(3);
- QMapIterator<QString, QString> i(dictionaryMap);
- int row=0;
- while (i.hasNext())
- {
- i.next();
- int column=0;
- //qDebug()<<i.key()<<i.value()<<LanguageManager::instance()->getLangFromAbbrev(i.key(), false);
- QTableWidgetItem *newItem1 = new QTableWidgetItem(LanguageManager::instance()->getLangFromAbbrev(i.key()));
- newItem1->setFlags(newItem1->flags() & ~Qt::ItemIsEditable);
- hyphDictTableWidget->setItem(row, column++, newItem1);
- QTableWidgetItem *newItem2 = new QTableWidgetItem(i.key());
- newItem2->setFlags(newItem1->flags());
- hyphDictTableWidget->setItem(row, column++, newItem2);
- QTableWidgetItem *newItem3 = new QTableWidgetItem(i.value());
- newItem3->setFlags(newItem1->flags());
- newItem3->setToolTip(i.value());
- hyphDictTableWidget->setItem(row, column++, newItem3);
- ++row;
- }
- QStringList headers;
- headers << tr("Language") << tr("Code") << tr("Location");
- hyphDictTableWidget->setHorizontalHeaderLabels(headers);
- hyphDictTableWidget->resizeColumnsToContents();
-}
-
-void Prefs_Hyphenator::updateAvailDictList()
-{
- availHyphListDownloadButton->setEnabled(false);
- ScQApp->dlManager()->addURL("http://services.scribus.net/scribus_hyph_dicts.xml", true, downloadLocation, downloadLocation);
- connect(ScQApp->dlManager(), SIGNAL(finished()), this, SLOT(downloadDictListFinished()));
- ScQApp->dlManager()->startDownloads();
-}
-
-void Prefs_Hyphenator::downloadDictListFinished()
-{
- disconnect(ScQApp->dlManager(), SIGNAL(finished()), this, SLOT(downloadDictListFinished()));
- setAvailDictsXMLFile(downloadLocation + "scribus_hyph_dicts.xml");
- availHyphListDownloadButton->setEnabled(true);
-}
-
-void Prefs_Hyphenator::downloadHyphDictsFinished()
-{
- disconnect(ScQApp->dlManager(), SIGNAL(finished()), this, SLOT(downloadDictListFinished()));
- updateDictList();
- downloadProgressBar->setValue(0);
- downloadProgressBar->setVisible(false);
- dlLabel->setVisible(false);
- hyphDownloadButton->setEnabled(true);
-}
-
-void Prefs_Hyphenator::updateProgressBar()
-{
- downloadProgressBar->setValue(downloadProgressBar->value()+1);
-}
-
-void Prefs_Hyphenator::setAvailDictsXMLFile(QString availDictsXMLDataFile)
-{
- QFile dataFile(availDictsXMLDataFile);
- if (!dataFile.exists())
- return;
- dataFile.open(QIODevice::ReadOnly);
- QTextStream ts(&dataFile);
- ts.setCodec(QTextCodec::codecForName("UTF-8"));
- QString errorMsg;
- int eline;
- int ecol;
- QDomDocument doc( "scribus_hyph_dicts" );
- QString data(ts.readAll());
- dataFile.close();
- if ( !doc.setContent( data, &errorMsg, &eline, &ecol ))
- {
- if (data.toLower().contains("404 not found"))
- qDebug()<<"File not found on server";
- else
- qDebug()<<"Could not open file"<<availDictsXMLDataFile;
- return;
- }
- dictList.clear();
- QDomElement docElem = doc.documentElement();
- QDomNode n = docElem.firstChild();
- while( !n.isNull() ) {
- QDomElement e = n.toElement();
- if( !e.isNull() ) {
- if (e.tagName()=="dictionary")
- {
- if (e.hasAttribute("type") && e.hasAttribute("filetype"))
- {
- if (e.attribute("type")=="hyph")
- {
- struct DictData d;
- d.desc=e.attribute("description");
- d.download=false;
- d.files=e.attribute("files");
- d.url=e.attribute("URL");
- d.version=e.attribute("version");
- d.lang=e.attribute("language");
- d.license=e.attribute("license");
- d.filetype=e.attribute("filetype");
- QUrl url(d.url);
- if (url.isValid() && !url.isEmpty() && !url.host().isEmpty())
- dictList.append(d);
- //else
- // qDebug()<<"hysettings : availDicts : invalid URL"<<d.url;
- }
- }
- }
- }
- n = n.nextSibling();
- }
- availHyphDictTableWidget->clear();
- if(dictList.isEmpty())
- {
- hyphDownloadButton->setEnabled(false);
- return;
- }
- availHyphDictTableWidget->setRowCount(dictList.count());
- availHyphDictTableWidget->setColumnCount(4);
- int row=0;
- foreach(DictData d, dictList)
- {
- int column=0;
- //qDebug()<<d.version<<d.files<<d.url<<d.desc<<d.license;
- QTableWidgetItem *newItem1 = new QTableWidgetItem(d.desc);
- newItem1->setFlags(newItem1->flags() & ~Qt::ItemIsEditable);
- availHyphDictTableWidget->setItem(row, column++, newItem1);
- QTableWidgetItem *newItem2 = new QTableWidgetItem(d.lang);
- newItem2->setFlags(newItem1->flags());
- availHyphDictTableWidget->setItem(row, column++, newItem2);
- QTableWidgetItem *newItem3 = new QTableWidgetItem();
- newItem3->setCheckState(dictionaryMap.contains(d.lang) ? Qt::Checked : Qt::Unchecked);
- newItem3->setFlags(newItem1->flags() & ~Qt::ItemIsUserCheckable);
- availHyphDictTableWidget->setItem(row, column++, newItem3);
- QTableWidgetItem *newItem4 = new QTableWidgetItem();
- newItem4->setCheckState(d.download ? Qt::Checked : Qt::Unchecked);
- availHyphDictTableWidget->setItem(row, column++, newItem4);
- ++row;
- }
- QStringList headers;
- headers << tr("Language") << tr("Code") << tr("Installed") << tr("Download");
- availHyphDictTableWidget->setHorizontalHeaderLabels(headers);
- availHyphDictTableWidget->resizeColumnsToContents();
- hyphDownloadButton->setEnabled(true);
-}
Modified: trunk/Scribus/scribus/ui/prefs_hyphenator.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/ui/prefs_hyphenator.h
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_hyphenator.h (original)
+++ trunk/Scribus/scribus/ui/prefs_hyphenator.h Mon Feb 16 22:33:34 2015
@@ -38,23 +38,13 @@
void removeExceptListEntry();
void enableExceptButtons();
- protected slots:
- void downloadHyphDicts();
- void updateDictList();
- void updateAvailDictList();
- void downloadDictListFinished();
- void downloadHyphDictsFinished();
- void updateProgressBar();
-
protected:
QString affixFileName(QStringList files);
QString dictFileName(QStringList files);
void setAvailDictsXMLFile(QString availDictsXMLDataFile);
QMap<QString, QString> dictionaryMap;
QStringList dictionaryPaths;
- QString downloadLocation;
- QList <DictData> dictList;
- QList <DictData> downloadList;
+
};
#endif // PREFS_HYPHENATOR_H
Modified: trunk/Scribus/scribus/ui/prefs_hyphenatorbase.ui
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/ui/prefs_hyphenatorbase.ui
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_hyphenatorbase.ui (original)
+++ trunk/Scribus/scribus/ui/prefs_hyphenatorbase.ui Mon Feb 16 22:33:34 2015
@@ -38,7 +38,7 @@
<item>
<widget class="QTabWidget" name="tabWidget">
<property name="currentIndex">
- <number>0</number>
+ <number>1</number>
</property>
<widget class="QWidget" name="tab">
<attribute name="title">
@@ -344,140 +344,6 @@
</layout>
</item>
</layout>
- </widget>
- <widget class="QWidget" name="tab_3">
- <attribute name="title">
- <string>Download</string>
- </attribute>
- <layout class="QVBoxLayout" name="verticalLayout_7">
- <property name="leftMargin">
- <number>0</number>
- </property>
- <property name="topMargin">
- <number>0</number>
- </property>
- <property name="rightMargin">
- <number>0</number>
- </property>
- <property name="bottomMargin">
- <number>0</number>
- </property>
- <item>
- <widget class="QScrollArea" name="scrollArea">
- <property name="widgetResizable">
- <bool>true</bool>
- </property>
- <widget class="QWidget" name="scrollAreaWidgetContents">
- <property name="geometry">
- <rect>
- <x>0</x>
- <y>0</y>
- <width>679</width>
- <height>455</height>
- </rect>
- </property>
- <layout class="QVBoxLayout" name="verticalLayout_4">
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_5">
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_5">
- <item>
- <widget class="QLabel" name="label_5">
- <property name="text">
- <string>Installed Hyphenation Dictionaries</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QTableWidget" name="hyphDictTableWidget">
- <attribute name="verticalHeaderVisible">
- <bool>false</bool>
- </attribute>
- </widget>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QVBoxLayout" name="verticalLayout_6">
- <item>
- <widget class="QLabel" name="label_6">
- <property name="text">
- <string>Downloadable Hyphenation Dictionaries</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QTableWidget" name="availHyphDictTableWidget">
- <attribute name="verticalHeaderVisible">
- <bool>false</bool>
- </attribute>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </item>
- <item>
- <layout class="QHBoxLayout" name="horizontalLayout_6">
- <item>
- <widget class="QLabel" name="dlLabel">
- <property name="text">
- <string>Downloading</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QProgressBar" name="downloadProgressBar">
- <property name="value">
- <number>0</number>
- </property>
- <property name="textVisible">
- <bool>true</bool>
- </property>
- <property name="invertedAppearance">
- <bool>false</bool>
- </property>
- </widget>
- </item>
- <item>
- <spacer name="horizontalSpacer_2">
- <property name="orientation">
- <enum>Qt::Horizontal</enum>
- </property>
- <property name="sizeHint" stdset="0">
- <size>
- <width>40</width>
- <height>20</height>
- </size>
- </property>
- </spacer>
- </item>
- <item>
- <widget class="QPushButton" name="availHyphListDownloadButton">
- <property name="text">
- <string>Refresh Downloadable List</string>
- </property>
- </widget>
- </item>
- <item>
- <widget class="QPushButton" name="hyphDownloadButton">
- <property name="text">
- <string>Download Selected Dictionaries</string>
- </property>
- </widget>
- </item>
- </layout>
- </item>
- </layout>
- </widget>
- </widget>
- </item>
- </layout>
- <zorder>scrollArea</zorder>
- <zorder></zorder>
- <zorder>dlLabel</zorder>
- <zorder>downloadProgressBar</zorder>
- <zorder></zorder>
</widget>
</widget>
</item>
Modified: trunk/Scribus/scribus/ui/prefs_spelling.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/ui/prefs_spelling.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_spelling.cpp (original)
+++ trunk/Scribus/scribus/ui/prefs_spelling.cpp Mon Feb 16 22:33:34 2015
@@ -82,7 +82,7 @@
dlLabel->setVisible(true);
int i=0;
QString userDictDir(ScPaths::getUserDictDir(true));
- foreach(DictData d, dictList)
+ foreach(DownloadItem d, dictList)
{
if (dlLangs.contains(d.lang))
{
@@ -268,7 +268,7 @@
{
if (e.attribute("type")=="spell")
{
- struct DictData d;
+ struct DownloadItem d;
d.desc=e.attribute("description");
d.download=false;
d.files=e.attribute("files");
@@ -297,7 +297,7 @@
availDictTableWidget->setRowCount(dictList.count());
availDictTableWidget->setColumnCount(4);
int row=0;
- foreach(DictData d, dictList)
+ foreach(DownloadItem d, dictList)
{
int column=0;
//qDebug()<<d.version<<d.files<<d.url<<d.desc<<d.license;
Modified: trunk/Scribus/scribus/ui/prefs_spelling.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=19821&path=/trunk/Scribus/scribus/ui/prefs_spelling.h
==============================================================================
--- trunk/Scribus/scribus/ui/prefs_spelling.h (original)
+++ trunk/Scribus/scribus/ui/prefs_spelling.h Mon Feb 16 22:33:34 2015
@@ -45,8 +45,8 @@
QMap<QString, QString> dictionaryMap;
QStringList dictionaryPaths;
QString downloadLocation;
- QList <DictData> dictList;
- QList <DictData> downloadList;
+ QList <DownloadItem> dictList;
+ QList <DownloadItem> downloadList;
};
#endif // PREFS_SPELLING_H
More information about the scribus-commit
mailing list