View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0015987 | Scribus | General | public | 2019-12-05 09:32 | 2025-07-01 17:37 |
| Reporter | ale | Assigned To | |||
| Priority | normal | Severity | feature | Reproducibility | N/A |
| Status | closed | Resolution | no change required | ||
| Product Version | 1.5.6.svn | ||||
| Summary | 0015987: [PATCH] settings: enable / disable optional features | ||||
| Description | currently we have a few experimental features that should not be exposed by default in the UI. i suggest that we should create a "optional features" section in the preferences to activate features that are not activated by default. soon, i plan to propose a patch that shows how it would work with the tables. i propose three sections: - Optional features - For features that work correctly but are misleading for many users (file > print preview? hiding single items, editing in preview mode) - Experimental features - Tables - Marks (footnoes, ...) - Deprecated features - i don't know of any right now... but we might be able to use it to remove things after a few years as deprecated... | ||||
| Tags | No tags attached. | ||||
| Attached Files | optional-tables.diff (44,583 bytes)
diff --git a/Scribus.pro b/Scribus.pro
index 6918634c5..f637ac230 100644
--- a/Scribus.pro
+++ b/Scribus.pro
@@ -537,6 +537,7 @@ HEADERS += scribus/actionmanager.h \
scribus/ui/prefs_keyboardshortcuts.h \
scribus/ui/prefs_miscellaneous.h \
scribus/ui/prefs_operatortools.h \
+ scribus/ui/prefs_optionalfeatures.h \
scribus/ui/prefs_pagesizes.h \
scribus/ui/prefs_pane.h \
scribus/ui/prefs_paths.h \
@@ -1087,6 +1088,7 @@ FORMS += scribus/ui/aboutplugins.ui \
scribus/ui/prefs_keyboardshortcutsbase.ui \
scribus/ui/prefs_miscellaneousbase.ui \
scribus/ui/prefs_operatortoolsbase.ui \
+ scribus/ui/prefs_optionalfeaturesbase.ui \
scribus/ui/prefs_pagesizesbase.ui \
scribus/ui/prefs_pathsbase.ui \
scribus/ui/prefs_pdfexportbase.ui \
@@ -1663,6 +1665,7 @@ SOURCES += scribus/actionmanager.cpp \
scribus/ui/prefs_keyboardshortcuts.cpp \
scribus/ui/prefs_miscellaneous.cpp \
scribus/ui/prefs_operatortools.cpp \
+ scribus/ui/prefs_optionalfeatures.cpp \
scribus/ui/prefs_pagesizes.cpp \
scribus/ui/prefs_paths.cpp \
scribus/ui/prefs_pdfexport.cpp \
diff --git a/scribus/CMakeLists.txt b/scribus/CMakeLists.txt
index b19d33112..877ecdfe9 100644
--- a/scribus/CMakeLists.txt
+++ b/scribus/CMakeLists.txt
@@ -156,6 +156,7 @@ set(SCRIBUS_UI_SRC
ui/prefs_userinterfacebase.ui
ui/prefs_itemtoolsbase.ui
ui/prefs_operatortoolsbase.ui
+ ui/prefs_optionalfeaturesbase.ui
ui/prefs_pdfexportbase.ui
ui/prefs_tableofcontentsbase.ui
ui/prefs_documentitemattributesbase.ui
@@ -452,6 +453,7 @@ set(SCRIBUS_MOC_CLASSES
ui/prefs_userinterface.h
ui/prefs_itemtools.h
ui/prefs_operatortools.h
+ ui/prefs_optionalfeatures.h
ui/prefs_pdfexport.h
ui/prefs_tableofcontents.h
ui/prefs_documentitemattributes.h
@@ -952,6 +954,7 @@ set(SCRIBUS_SOURCES
ui/prefs_userinterface.cpp
ui/prefs_itemtools.cpp
ui/prefs_operatortools.cpp
+ ui/prefs_optionalfeatures.cpp
ui/prefs_pdfexport.cpp
ui/prefs_tableofcontents.cpp
ui/prefs_documentitemattributes.cpp
diff --git a/scribus/actionmanager.cpp b/scribus/actionmanager.cpp
index 7c9cda5a2..69e95b494 100644
--- a/scribus/actionmanager.cpp
+++ b/scribus/actionmanager.cpp
@@ -21,7 +21,9 @@ for which a new license (GPL+exception) is in place.
#include "actionmanager.h"
#include "appmodes.h"
-
+#include "iconmanager.h"
+#include "prefsmanager.h"
+#include "prefsstructs.h"
#include "scribuscore.h"
#include "scribusdoc.h"
#include "scribusview.h"
@@ -29,7 +31,6 @@ for which a new license (GPL+exception) is in place.
#include "text/storytext.h"
#include "undomanager.h"
#include "urllauncher.h"
-#include "iconmanager.h"
QMap<QString, QKeySequence> ActionManager::defKeys;
QVector< QPair<QString, QStringList> > ActionManager::defMenuNames;
@@ -622,6 +623,9 @@ void ActionManager::initPageMenuActions()
void ActionManager::initTableMenuActions()
{
+ if (!PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ return;
+
QString name;
name = "tableInsertRows";
@@ -833,8 +837,11 @@ void ActionManager::initToolsMenuActions()
scrActions->insert(name, new ScrAction(ScrAction::DataInt, im.loadPixmap("16/insert-image.png"), im.loadPixmap("22/insert-image.png"), "", defaultKey(name), mainWindow, modeDrawImage));
name = "toolsInsertRenderFrame";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, im.loadPixmap("16/insert-renderframe.png"), im.loadPixmap("22/insert-renderframe.png"), "", defaultKey(name), mainWindow, modeDrawLatex));
- name = "toolsInsertTable";
- scrActions->insert(name, new ScrAction(ScrAction::DataInt, im.loadPixmap("16/insert-table.png"), im.loadPixmap("22/insert-table.png"), "", defaultKey(name), mainWindow, modeDrawTable2));
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ {
+ name = "toolsInsertTable";
+ scrActions->insert(name, new ScrAction(ScrAction::DataInt, im.loadPixmap("16/insert-table.png"), im.loadPixmap("22/insert-table.png"), "", defaultKey(name), mainWindow, modeDrawTable2));
+ }
name = "toolsInsertShape";
scrActions->insert(name, new ScrAction(ScrAction::DataInt, QPixmap(), QPixmap(), "", defaultKey(name), mainWindow, modeDrawShapes));
name = "toolsInsertPolygon";
@@ -928,7 +935,9 @@ void ActionManager::initToolsMenuActions()
(*scrActions)["toolsToolbarPDF"]->setToggleAction(true);
(*scrActions)["toolsToolbarView"]->setToggleAction(true);
- *modeActionNames << "toolsSelect" << "toolsInsertTextFrame" << "toolsInsertImageFrame" << "toolsInsertTable";
+ *modeActionNames << "toolsSelect" << "toolsInsertTextFrame" << "toolsInsertImageFrame";
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ *modeActionNames << "toolsInsertTable";
*modeActionNames << "toolsInsertShape" << "toolsInsertPolygon" << "toolsInsertArc" << "toolsInsertSpiral" << "toolsInsertLine" << "toolsInsertBezier";
*modeActionNames << "toolsInsertFreehandLine" << "toolsInsertCalligraphicLine" << "toolsInsertRenderFrame" << "toolsRotate" << "toolsZoom" << "toolsEditContents";
*modeActionNames << "toolsEditWithStoryEditor" << "toolsLinkTextFrame" << "toolsUnlinkTextFrame"; //<< "toolsUnlinkTextFrameAndCutText";
@@ -1216,18 +1225,21 @@ void ActionManager::connectModeActions()
void ActionManager::disconnectNewDocActions()
{
- (*scrActions)["tableInsertRows"]->disconnect();
- (*scrActions)["tableInsertColumns"]->disconnect();
- (*scrActions)["tableDeleteRows"]->disconnect();
- (*scrActions)["tableDeleteColumns"]->disconnect();
- (*scrActions)["tableMergeCells"]->disconnect();
- (*scrActions)["tableSplitCells"]->disconnect();
- (*scrActions)["tableSetRowHeights"]->disconnect();
- (*scrActions)["tableSetColumnWidths"]->disconnect();
- (*scrActions)["tableDistributeRowsEvenly"]->disconnect();
- (*scrActions)["tableDistributeColumnsEvenly"]->disconnect();
- (*scrActions)["tableAdjustFrameToTable"]->disconnect();
- (*scrActions)["tableAdjustTableToFrame"]->disconnect();
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ {
+ (*scrActions)["tableInsertRows"]->disconnect();
+ (*scrActions)["tableInsertColumns"]->disconnect();
+ (*scrActions)["tableDeleteRows"]->disconnect();
+ (*scrActions)["tableDeleteColumns"]->disconnect();
+ (*scrActions)["tableMergeCells"]->disconnect();
+ (*scrActions)["tableSplitCells"]->disconnect();
+ (*scrActions)["tableSetRowHeights"]->disconnect();
+ (*scrActions)["tableSetColumnWidths"]->disconnect();
+ (*scrActions)["tableDistributeRowsEvenly"]->disconnect();
+ (*scrActions)["tableDistributeColumnsEvenly"]->disconnect();
+ (*scrActions)["tableAdjustFrameToTable"]->disconnect();
+ (*scrActions)["tableAdjustTableToFrame"]->disconnect();
+ }
(*scrActions)["itemAdjustFrameHeightToText"]->disconnect();
(*scrActions)["itemAdjustFrameToImage"]->disconnect();
(*scrActions)["itemAdjustImageToFrame"]->disconnect();
@@ -1267,18 +1279,21 @@ void ActionManager::connectNewDocActions(ScribusDoc *currDoc)
connect( (*scrActions)["extrasHyphenateText"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_DoHyphenate()) );
connect( (*scrActions)["extrasDeHyphenateText"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_DoDeHyphenate()) );
connect( (*scrActions)["itemDelete"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_DeleteItem()) );
- connect( (*scrActions)["tableInsertRows"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_InsertTableRows()));
- connect( (*scrActions)["tableInsertColumns"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_InsertTableColumns()));
- connect( (*scrActions)["tableDeleteRows"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_DeleteTableRows()));
- connect( (*scrActions)["tableDeleteColumns"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_DeleteTableColumns()));
- connect( (*scrActions)["tableMergeCells"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_MergeTableCells()));
- connect( (*scrActions)["tableSplitCells"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_SplitTableCells()));
- connect( (*scrActions)["tableSetRowHeights"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_SetTableRowHeights()));
- connect( (*scrActions)["tableSetColumnWidths"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_SetTableColumnWidths()));
- connect( (*scrActions)["tableDistributeRowsEvenly"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_DistributeTableRowsEvenly()));
- connect( (*scrActions)["tableDistributeColumnsEvenly"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_DistributeTableColumnsEvenly()));
- connect( (*scrActions)["tableAdjustFrameToTable"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_AdjustFrameToTable()));
- connect( (*scrActions)["tableAdjustTableToFrame"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_AdjustTableToFrame()));
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ {
+ connect( (*scrActions)["tableInsertRows"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_InsertTableRows()));
+ connect( (*scrActions)["tableInsertColumns"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_InsertTableColumns()));
+ connect( (*scrActions)["tableDeleteRows"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_DeleteTableRows()));
+ connect( (*scrActions)["tableDeleteColumns"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_DeleteTableColumns()));
+ connect( (*scrActions)["tableMergeCells"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_MergeTableCells()));
+ connect( (*scrActions)["tableSplitCells"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_SplitTableCells()));
+ connect( (*scrActions)["tableSetRowHeights"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_SetTableRowHeights()));
+ connect( (*scrActions)["tableSetColumnWidths"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_SetTableColumnWidths()));
+ connect( (*scrActions)["tableDistributeRowsEvenly"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_DistributeTableRowsEvenly()));
+ connect( (*scrActions)["tableDistributeColumnsEvenly"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_DistributeTableColumnsEvenly()));
+ connect( (*scrActions)["tableAdjustFrameToTable"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_AdjustFrameToTable()));
+ connect( (*scrActions)["tableAdjustTableToFrame"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_AdjustTableToFrame()));
+ }
connect( (*scrActions)["itemAdjustFrameHeightToText"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_AdjustFrameHeightToText()) );
connect( (*scrActions)["itemAdjustFrameToImage"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_AdjustFrametoImageSize()) );
connect( (*scrActions)["itemAdjustImageToFrame"], SIGNAL(triggered()), currDoc, SLOT(itemSelection_AdjustImagetoFrameSize()) );
@@ -1583,18 +1598,21 @@ void ActionManager::languageChange()
(*scrActions)["itemImageInfo"]->setTexts( tr("More Info..."));
(*scrActions)["itemImageIsVisible"]->setTexts( tr("I&mage Visible"));
(*scrActions)["itemUpdateImage"]->setTexts( tr("&Update Image"));
- (*scrActions)["tableInsertRows"]->setTexts(tr("Insert Rows..."));
- (*scrActions)["tableInsertColumns"]->setTexts(tr("Insert Columns..."));
- (*scrActions)["tableDeleteRows"]->setTexts(tr("Delete Rows"));
- (*scrActions)["tableDeleteColumns"]->setTexts(tr("Delete Columns"));
- (*scrActions)["tableMergeCells"]->setTexts(tr("Merge Cells"));
- (*scrActions)["tableSplitCells"]->setTexts(tr("Split Cells..."));
- (*scrActions)["tableSetRowHeights"]->setTexts(tr("Set Row Heights..."));
- (*scrActions)["tableSetColumnWidths"]->setTexts(tr("Set Column Widths..."));
- (*scrActions)["tableDistributeRowsEvenly"]->setTexts(tr("Distribute Rows Evenly"));
- (*scrActions)["tableDistributeColumnsEvenly"]->setTexts(tr("Distribute Columns Evenly"));
- (*scrActions)["tableAdjustFrameToTable"]->setTexts(tr("Adjust Frame to Table"));
- (*scrActions)["tableAdjustTableToFrame"]->setTexts(tr("Adjust Table to Frame"));
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ {
+ (*scrActions)["tableInsertRows"]->setTexts(tr("Insert Rows..."));
+ (*scrActions)["tableInsertColumns"]->setTexts(tr("Insert Columns..."));
+ (*scrActions)["tableDeleteRows"]->setTexts(tr("Delete Rows"));
+ (*scrActions)["tableDeleteColumns"]->setTexts(tr("Delete Columns"));
+ (*scrActions)["tableMergeCells"]->setTexts(tr("Merge Cells"));
+ (*scrActions)["tableSplitCells"]->setTexts(tr("Split Cells..."));
+ (*scrActions)["tableSetRowHeights"]->setTexts(tr("Set Row Heights..."));
+ (*scrActions)["tableSetColumnWidths"]->setTexts(tr("Set Column Widths..."));
+ (*scrActions)["tableDistributeRowsEvenly"]->setTexts(tr("Distribute Rows Evenly"));
+ (*scrActions)["tableDistributeColumnsEvenly"]->setTexts(tr("Distribute Columns Evenly"));
+ (*scrActions)["tableAdjustFrameToTable"]->setTexts(tr("Adjust Frame to Table"));
+ (*scrActions)["tableAdjustTableToFrame"]->setTexts(tr("Adjust Table to Frame"));
+ }
(*scrActions)["itemAdjustFrameHeightToText"]->setTexts( tr("Adjust Frame Height to Text"));
(*scrActions)["itemAdjustFrameToImage"]->setTexts( tr("Adjust Frame to Image"));
(*scrActions)["itemAdjustImageToFrame"]->setTexts( tr("Adjust Image to Frame"));
@@ -1714,7 +1732,8 @@ void ActionManager::languageChange()
(*scrActions)["toolsInsertTextFrame"]->setText( tr("&Text Frame"));
(*scrActions)["toolsInsertImageFrame"]->setText( tr("&Image Frame"));
(*scrActions)["toolsInsertRenderFrame"]->setText( tr("&Render Frame"));
- (*scrActions)["toolsInsertTable"]->setText( tr("T&able"));
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ (*scrActions)["toolsInsertTable"]->setText( tr("T&able"));
(*scrActions)["toolsInsertShape"]->setText( tr("&Shape"));
(*scrActions)["toolsInsertPolygon"]->setText( tr("&Polygon"));
(*scrActions)["toolsInsertArc"]->setText( tr("Arc"));
@@ -1794,7 +1813,8 @@ void ActionManager::languageChange()
(*scrActions)["toolsInsertRenderFrame"]->setStatusTextAndShortcut( tr("Insert a render frame"));
(*scrActions)["toolsInsertShape"]->setStatusTextAndShortcut( tr("Insert a shape"));
(*scrActions)["toolsInsertSpiral"]->setStatusTextAndShortcut( tr("Insert a spiral"));
- (*scrActions)["toolsInsertTable"]->setStatusTextAndShortcut( tr("Insert a table"));
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ (*scrActions)["toolsInsertTable"]->setStatusTextAndShortcut( tr("Insert a table"));
(*scrActions)["toolsInsertTextFrame"]->setStatusTextAndShortcut( tr("Insert a text frame"));
(*scrActions)["toolsLinkTextFrame"]->setStatusTextAndShortcut( tr("Link text frames"));
(*scrActions)["toolsMeasurements"]->setStatusTextAndShortcut( tr("Measurements"));
@@ -1954,7 +1974,8 @@ void ActionManager::createDefaultShortcuts()
defKeys.insert("toolsSelect", Qt::Key_C);
defKeys.insert("toolsInsertTextFrame", QKeySequence(Qt::Key_T));
defKeys.insert("toolsInsertImageFrame", Qt::Key_I);
- defKeys.insert("toolsInsertTable", Qt::Key_A);
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ defKeys.insert("toolsInsertTable", Qt::Key_A);
defKeys.insert("toolsInsertShape", Qt::Key_S);
defKeys.insert("toolsInsertPolygon", Qt::Key_P);
defKeys.insert("toolsInsertLine", Qt::Key_L);
@@ -2011,7 +2032,8 @@ void ActionManager::createDefaultMenuNames()
defMenuNames.append(QPair<QString, QStringList>("Insert", QStringList()));
defMenuNames.append(QPair<QString, QStringList>("Page", QStringList()));
defMenuNames.append(QPair<QString, QStringList>("View", QStringList()));
- defMenuNames.append(QPair<QString, QStringList>("Table", QStringList()));
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ defMenuNames.append(QPair<QString, QStringList>("Table", QStringList()));
defMenuNames.append(QPair<QString, QStringList>("Extras", QStringList()));
defMenuNames.append(QPair<QString, QStringList>("Windows", QStringList()));
defMenuNames.append(QPair<QString, QStringList>("Help", QStringList()));
@@ -2030,8 +2052,12 @@ void ActionManager::createDefaultMenuNames()
itMenuNames->second << tr("Page") << "&Page" << tr("&Page");
++itMenuNames;
itMenuNames->second << tr("View") << "&View" << tr("&View");
- ++itMenuNames;
- itMenuNames->second << tr("Table") << "&Table" << tr("&Table");
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ {
+ ++itMenuNames;
+ itMenuNames->second << tr("Table") << "&Table" << tr("&Table");
+ }
+
++itMenuNames;
itMenuNames->second << tr("Extras") << "E&xtras" << tr("E&xtras");
++itMenuNames;
@@ -2190,8 +2216,14 @@ void ActionManager::createDefaultMenus()
itmenu->second
<< "insertFrame"
<< "toolsInsertTextFrame"
- << "toolsInsertImageFrame"
- << "toolsInsertTable"
+ << "toolsInsertImageFrame";
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ {
+
+ itmenu->second
+ << "toolsInsertTable";
+ }
+ itmenu->second
<< "toolsInsertShape"
<< "toolsInsertPolygon"
<< "toolsInsertArc"
@@ -2326,20 +2358,23 @@ void ActionManager::createDefaultMenus()
<< "viewShowRulers"
<< "viewRulerMode"
<< "showMouseCoordinates";
- ++itmenu;
- itmenu->second
- << "tableInsertRows"
- << "tableInsertColumns"
- << "tableDeleteRows"
- << "tableDeleteColumns"
- << "tableMergeCells"
- << "tableSplitCells"
- << "tableSetRowHeights"
- << "tableSetColumnWidths"
- << "tableDistributeRowsEvenly"
- << "tableDistributeColumnsEvenly"
- << "tableAdjustFrameToTable"
- << "tableAdjustTableToFrame";
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ {
+ ++itmenu;
+ itmenu->second
+ << "tableInsertRows"
+ << "tableInsertColumns"
+ << "tableDeleteRows"
+ << "tableDeleteColumns"
+ << "tableMergeCells"
+ << "tableSplitCells"
+ << "tableSetRowHeights"
+ << "tableSetColumnWidths"
+ << "tableDistributeRowsEvenly"
+ << "tableDistributeColumnsEvenly"
+ << "tableAdjustFrameToTable"
+ << "tableAdjustTableToFrame";
+ }
//Extras
++itmenu;
itmenu->second
diff --git a/scribus/appmodehelper.cpp b/scribus/appmodehelper.cpp
index 64fd09f8e..de7662fd2 100644
--- a/scribus/appmodehelper.cpp
+++ b/scribus/appmodehelper.cpp
@@ -22,6 +22,7 @@ for which a new license (GPL+exception) is in place.
#include "pageitem.h"
#include "pageitem_table.h"
#include "pluginmanager.h"
+#include "prefsstructs.h"
#include "prefsmanager.h"
#include "scmimedata.h"
#include "scribus.h"
@@ -962,7 +963,8 @@ void AppModeHelper::setModeActionsPerMode(int newMode)
(*a_scrActions)["toolsSelect"]->setChecked(newMode==modeNormal);
(*a_scrActions)["toolsInsertTextFrame"]->setChecked(newMode==modeDrawText);
(*a_scrActions)["toolsInsertImageFrame"]->setChecked(newMode==modeDrawImage);
- (*a_scrActions)["toolsInsertTable"]->setChecked(newMode==modeDrawTable2);
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ (*a_scrActions)["toolsInsertTable"]->setChecked(newMode==modeDrawTable2);
(*a_scrActions)["toolsInsertShape"]->setChecked(newMode==modeDrawShapes);
(*a_scrActions)["toolsInsertPolygon"]->setChecked(newMode==modeDrawRegularPolygon);
(*a_scrActions)["toolsInsertArc"]->setChecked(newMode==modeDrawArc);
@@ -1089,7 +1091,8 @@ void AppModeHelper::setFrameEditMode(bool b)
(*a_scrActions)["toolsZoom"]->setEnabled(b2);
(*a_scrActions)["toolsInsertTextFrame"]->setEnabled(b2);
(*a_scrActions)["toolsInsertImageFrame"]->setEnabled(b2);
- (*a_scrActions)["toolsInsertTable"]->setEnabled(b2);
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ (*a_scrActions)["toolsInsertTable"]->setEnabled(b2);
(*a_scrActions)["toolsInsertShape"]->setEnabled(b2);
(*a_scrActions)["toolsInsertLine"]->setEnabled(b2);
(*a_scrActions)["toolsInsertBezier"]->setEnabled(b2);
@@ -1277,6 +1280,8 @@ void AppModeHelper::setMasterPageEditMode(bool b, ScribusDoc* doc)
void AppModeHelper::updateTableMenuActions(ScribusDoc* doc)
{
+ if (!PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ return;
// Determine state.
PageItem* item = doc ? doc->m_Selection->itemAt(0) : nullptr;
PageItem_Table* table = (item && item->isTable()) ? item->asTable() : nullptr;
@@ -1343,7 +1348,8 @@ void AppModeHelper::changeLayer(ScribusDoc *doc, bool clipScrapHaveData)
(*a_scrActions)["toolsSelect"]->setEnabled(setter);
(*a_scrActions)["toolsInsertTextFrame"]->setEnabled(setter);
(*a_scrActions)["toolsInsertImageFrame"]->setEnabled(setter);
- (*a_scrActions)["toolsInsertTable"]->setEnabled(setter);
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ (*a_scrActions)["toolsInsertTable"]->setEnabled(setter);
(*a_scrActions)["toolsInsertShape"]->setEnabled(setter);
(*a_scrActions)["toolsInsertLine"]->setEnabled(setter);
(*a_scrActions)["toolsInsertBezier"]->setEnabled(setter);
@@ -1419,7 +1425,8 @@ void AppModeHelper::mainWindowHasNewDoc(ScribusDoc *doc, bool clipScrapHaveData)
(*a_scrActions)["toolsZoom"]->setEnabled(true);
(*a_scrActions)["toolsInsertTextFrame"]->setEnabled(true);
(*a_scrActions)["toolsInsertImageFrame"]->setEnabled(true);
- (*a_scrActions)["toolsInsertTable"]->setEnabled(true);
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ (*a_scrActions)["toolsInsertTable"]->setEnabled(true);
(*a_scrActions)["toolsInsertShape"]->setEnabled(true);
(*a_scrActions)["toolsInsertLine"]->setEnabled(true);
(*a_scrActions)["toolsInsertBezier"]->setEnabled(true);
@@ -1623,7 +1630,8 @@ void AppModeHelper::mainWindowCloseLastDoc()
(*a_scrActions)["toolsInsertRenderFrame"]->setEnabled(false);
(*a_scrActions)["toolsInsertShape"]->setEnabled(false);
(*a_scrActions)["toolsInsertSpiral"]->setEnabled(false);
- (*a_scrActions)["toolsInsertTable"]->setEnabled(false);
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ (*a_scrActions)["toolsInsertTable"]->setEnabled(false);
(*a_scrActions)["toolsInsertTextFrame"]->setEnabled(false);
(*a_scrActions)["toolsLinkTextFrame"]->setEnabled(false);
(*a_scrActions)["toolsMeasurements"]->setEnabled(false);
@@ -1665,20 +1673,23 @@ void AppModeHelper::mainWindowCloseLastDoc()
(*a_scrActions)["itemLock"]->setEnabled(false);
(*a_scrActions)["itemLockSize"]->setEnabled(false);
- (*a_scrActions)["tableInsertRows"]->setEnabled(false);
- (*a_scrActions)["tableInsertColumns"]->setEnabled(false);
- (*a_scrActions)["tableDeleteRows"]->setEnabled(false);
- (*a_scrActions)["tableDeleteColumns"]->setEnabled(false);
- (*a_scrActions)["tableMergeCells"]->setEnabled(false);
- (*a_scrActions)["tableSplitCells"]->setEnabled(false); // Not implemented.
- (*a_scrActions)["tableSetRowHeights"]->setEnabled(false);
- (*a_scrActions)["tableSetColumnWidths"]->setEnabled(false);
- (*a_scrActions)["tableDistributeRowsEvenly"]->setEnabled(false);
- (*a_scrActions)["tableDistributeColumnsEvenly"]->setEnabled(false);
- (*a_scrActions)["tableDistributeRowsEvenly"]->setEnabled(false);
- (*a_scrActions)["tableDistributeColumnsEvenly"]->setEnabled(false);
- (*a_scrActions)["tableAdjustFrameToTable"]->setEnabled(false);
- (*a_scrActions)["tableAdjustTableToFrame"]->setEnabled(false);
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ {
+ (*a_scrActions)["tableInsertRows"]->setEnabled(false);
+ (*a_scrActions)["tableInsertColumns"]->setEnabled(false);
+ (*a_scrActions)["tableDeleteRows"]->setEnabled(false);
+ (*a_scrActions)["tableDeleteColumns"]->setEnabled(false);
+ (*a_scrActions)["tableMergeCells"]->setEnabled(false);
+ (*a_scrActions)["tableSplitCells"]->setEnabled(false); // Not implemented.
+ (*a_scrActions)["tableSetRowHeights"]->setEnabled(false);
+ (*a_scrActions)["tableSetColumnWidths"]->setEnabled(false);
+ (*a_scrActions)["tableDistributeRowsEvenly"]->setEnabled(false);
+ (*a_scrActions)["tableDistributeColumnsEvenly"]->setEnabled(false);
+ (*a_scrActions)["tableDistributeRowsEvenly"]->setEnabled(false);
+ (*a_scrActions)["tableDistributeColumnsEvenly"]->setEnabled(false);
+ (*a_scrActions)["tableAdjustFrameToTable"]->setEnabled(false);
+ (*a_scrActions)["tableAdjustTableToFrame"]->setEnabled(false);
+ }
}
void AppModeHelper::setPreviewMode(bool b)
@@ -1821,7 +1832,8 @@ void AppModeHelper::setStartupActionsEnabled(bool enabled)
(*a_scrActions)["toolsInsertArc"]->setEnabled(false);
(*a_scrActions)["toolsInsertSpiral"]->setEnabled(false);
(*a_scrActions)["toolsInsertRenderFrame"]->setEnabled(false);
- (*a_scrActions)["toolsInsertTable"]->setEnabled(false);
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ (*a_scrActions)["toolsInsertTable"]->setEnabled(false);
(*a_scrActions)["toolsLinkTextFrame"]->setEnabled(false);
(*a_scrActions)["toolsUnlinkTextFrame"]->setEnabled(false);
(*a_scrActions)["toolsUnlinkTextFrameAndCutText"]->setEnabled(false);
@@ -1840,19 +1852,22 @@ void AppModeHelper::setStartupActionsEnabled(bool enabled)
(*a_scrActions)["toolsPDFAnnot3D"]->setEnabled(false);
#endif
- (*a_scrActions)["tableInsertRows"]->setEnabled(false);
- (*a_scrActions)["tableInsertColumns"]->setEnabled(false);
- (*a_scrActions)["tableDeleteRows"]->setEnabled(false);
- (*a_scrActions)["tableDeleteColumns"]->setEnabled(false);
- (*a_scrActions)["tableMergeCells"]->setEnabled(false);
- (*a_scrActions)["tableSplitCells"]->setEnabled(false); // Not implemented.
- (*a_scrActions)["tableSetRowHeights"]->setEnabled(false);
- (*a_scrActions)["tableSetColumnWidths"]->setEnabled(false);
- (*a_scrActions)["tableDistributeRowsEvenly"]->setEnabled(false);
- (*a_scrActions)["tableDistributeColumnsEvenly"]->setEnabled(false);
- (*a_scrActions)["tableDistributeRowsEvenly"]->setEnabled(false);
- (*a_scrActions)["tableDistributeColumnsEvenly"]->setEnabled(false);
- (*a_scrActions)["tableAdjustFrameToTable"]->setEnabled(false);
- (*a_scrActions)["tableAdjustTableToFrame"]->setEnabled(false);
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ {
+ (*a_scrActions)["tableInsertRows"]->setEnabled(false);
+ (*a_scrActions)["tableInsertColumns"]->setEnabled(false);
+ (*a_scrActions)["tableDeleteRows"]->setEnabled(false);
+ (*a_scrActions)["tableDeleteColumns"]->setEnabled(false);
+ (*a_scrActions)["tableMergeCells"]->setEnabled(false);
+ (*a_scrActions)["tableSplitCells"]->setEnabled(false); // Not implemented.
+ (*a_scrActions)["tableSetRowHeights"]->setEnabled(false);
+ (*a_scrActions)["tableSetColumnWidths"]->setEnabled(false);
+ (*a_scrActions)["tableDistributeRowsEvenly"]->setEnabled(false);
+ (*a_scrActions)["tableDistributeColumnsEvenly"]->setEnabled(false);
+ (*a_scrActions)["tableDistributeRowsEvenly"]->setEnabled(false);
+ (*a_scrActions)["tableDistributeColumnsEvenly"]->setEnabled(false);
+ (*a_scrActions)["tableAdjustFrameToTable"]->setEnabled(false);
+ (*a_scrActions)["tableAdjustTableToFrame"]->setEnabled(false);
+ }
}
diff --git a/scribus/prefsmanager.cpp b/scribus/prefsmanager.cpp
index 0acdf5a7a..0a35d67c4 100644
--- a/scribus/prefsmanager.cpp
+++ b/scribus/prefsmanager.cpp
@@ -1617,6 +1617,10 @@ bool PrefsManager::WritePref(const QString& ho)
dcOperatorTools.setAttribute("RotationConstrainAngle", ScCLocale::toQStringC(appPrefs.opToolPrefs.constrain));
elem.appendChild(dcOperatorTools);
+ QDomElement dcOptionalFeatures=docu.createElement("OptionalFeatures");
+ dcOptionalFeatures.setAttribute("Tables", static_cast<int>(appPrefs.optionalFeaturesPrefs.tables));
+ elem.appendChild(dcOptionalFeatures);
+
QDomElement dcMainWindow=docu.createElement("MainWindow");
dcMainWindow.setAttribute("XPosition",appPrefs.uiPrefs.mainWinSettings.xPosition);
dcMainWindow.setAttribute("YPosition",appPrefs.uiPrefs.mainWinSettings.yPosition);
@@ -2246,6 +2250,11 @@ bool PrefsManager::ReadPref(const QString& ho)
appPrefs.opToolPrefs.constrain = ScCLocale::toDoubleC(dc.attribute("RotationConstrainAngle"), 15.0);
}
+ if (dc.tagName()=="OptionalFeatures")
+ {
+ appPrefs.optionalFeaturesPrefs.tables = static_cast<bool>(dc.attribute("Tables", "0").toInt());
+ }
+
if (dc.tagName()=="MainWindow")
{
appPrefs.uiPrefs.mainWinSettings.xPosition = dc.attribute("XPosition", "0").toInt();
diff --git a/scribus/prefsstructs.h b/scribus/prefsstructs.h
index 92cdb366c..fc3d51dea 100644
--- a/scribus/prefsstructs.h
+++ b/scribus/prefsstructs.h
@@ -311,6 +311,10 @@ struct OperatorToolPrefs
/* Rotation Tool constrain value */
double constrain; //! Angle to constrain rotation to when constraining is active
};
+struct OptionalFeaturesPrefs
+{
+ bool tables;
+};
struct HyphenatorPrefs
{
@@ -475,6 +479,7 @@ struct ApplicationPrefs
KeyboardShortcutsPrefs keyShortcutPrefs;
MiscellaneousPrefs miscPrefs;
OperatorToolPrefs opToolPrefs;
+ OptionalFeaturesPrefs optionalFeaturesPrefs;
PDFOptions pdfPrefs;
PathPrefs pathPrefs;
PluginPrefs pluginPrefs;
diff --git a/scribus/scribus.cpp b/scribus/scribus.cpp
index a273c356d..bb7fa5a42 100644
--- a/scribus/scribus.cpp
+++ b/scribus/scribus.cpp
@@ -1112,22 +1112,25 @@ void ScribusMainWindow::initMenuBar()
// scrMenuMgr->addMenuItem(scrActions["viewNewView"], "View");
// Table menu.
- scrMenuMgr->createMenu("ItemTable", ActionManager::defaultMenuNameEntryTranslated("Table"));
- scrMenuMgr->addMenuItemString("tableInsertRows", "ItemTable");
- scrMenuMgr->addMenuItemString("tableInsertColumns", "ItemTable");
- scrMenuMgr->addMenuItemString("tableDeleteRows", "ItemTable");
- scrMenuMgr->addMenuItemString("tableDeleteColumns", "ItemTable");
- scrMenuMgr->addMenuItemString("SEPARATOR", "ItemTable");
- scrMenuMgr->addMenuItemString("tableMergeCells", "ItemTable");
- scrMenuMgr->addMenuItemString("tableSplitCells", "ItemTable");
- scrMenuMgr->addMenuItemString("SEPARATOR", "ItemTable");
- scrMenuMgr->addMenuItemString("tableSetRowHeights", "ItemTable");
- scrMenuMgr->addMenuItemString("tableSetColumnWidths", "ItemTable");
- scrMenuMgr->addMenuItemString("tableDistributeRowsEvenly", "ItemTable");
- scrMenuMgr->addMenuItemString("tableDistributeColumnsEvenly", "ItemTable");
- scrMenuMgr->addMenuItemString("SEPARATOR", "ItemTable");
- scrMenuMgr->addMenuItemString("tableAdjustFrameToTable", "ItemTable");
- scrMenuMgr->addMenuItemString("tableAdjustTableToFrame", "ItemTable");
+ if (PrefsManager::instance().appPrefs.optionalFeaturesPrefs.tables)
+ {
+ scrMenuMgr->createMenu("ItemTable", ActionManager::defaultMenuNameEntryTranslated("Table"));
+ scrMenuMgr->addMenuItemString("tableInsertRows", "ItemTable");
+ scrMenuMgr->addMenuItemString("tableInsertColumns", "ItemTable");
+ scrMenuMgr->addMenuItemString("tableDeleteRows", "ItemTable");
+ scrMenuMgr->addMenuItemString("tableDeleteColumns", "ItemTable");
+ scrMenuMgr->addMenuItemString("SEPARATOR", "ItemTable");
+ scrMenuMgr->addMenuItemString("tableMergeCells", "ItemTable");
+ scrMenuMgr->addMenuItemString("tableSplitCells", "ItemTable");
+ scrMenuMgr->addMenuItemString("SEPARATOR", "ItemTable");
+ scrMenuMgr->addMenuItemString("tableSetRowHeights", "ItemTable");
+ scrMenuMgr->addMenuItemString("tableSetColumnWidths", "ItemTable");
+ scrMenuMgr->addMenuItemString("tableDistributeRowsEvenly", "ItemTable");
+ scrMenuMgr->addMenuItemString("tableDistributeColumnsEvenly", "ItemTable");
+ scrMenuMgr->addMenuItemString("SEPARATOR", "ItemTable");
+ scrMenuMgr->addMenuItemString("tableAdjustFrameToTable", "ItemTable");
+ scrMenuMgr->addMenuItemString("tableAdjustTableToFrame", "ItemTable");
+ }
//Extra menu
scrMenuMgr->createMenu("Extras", ActionManager::defaultMenuNameEntryTranslated("Extras"));
diff --git a/scribus/ui/preferencesdialog.cpp b/scribus/ui/preferencesdialog.cpp
index 21ae22dc7..2feb62f4a 100644
--- a/scribus/ui/preferencesdialog.cpp
+++ b/scribus/ui/preferencesdialog.cpp
@@ -52,6 +52,7 @@ PreferencesDialog::PreferencesDialog(QWidget* parent, ApplicationPrefs& prefsDat
prefs_Hyphenator = new Prefs_Hyphenator(prefsStackWidget, m_Doc);
prefs_ItemTools = new Prefs_ItemTools(prefsStackWidget, m_Doc);
prefs_OperatorTools = new Prefs_OperatorTools(prefsStackWidget, m_Doc);
+ prefs_OptionalFeatures = new Prefs_OptionalFeatures(prefsStackWidget, m_Doc);
prefs_PDFExport = new Prefs_PDFExport(prefsStackWidget, m_Doc);
prefs_PreflightVerifier = new Prefs_PreflightVerifier(prefsStackWidget, m_Doc);
prefs_Printer = new Prefs_Printer(prefsStackWidget, m_Doc);
@@ -105,6 +106,8 @@ PreferencesDialog::PreferencesDialog(QWidget* parent, ApplicationPrefs& prefsDat
addWidget(prefs_ImageCache);
addWidget(prefs_Display);
addWidget(prefs_OperatorTools);
+ if (!doc)
+ addWidget(prefs_OptionalFeatures);
if (!doc)
addWidget(prefs_ExternalTools);
if (!doc)
@@ -170,6 +173,7 @@ void PreferencesDialog::setupGui()
if (prefs_Typography) prefs_Typography->restoreDefaults(&localPrefs);
if (prefs_ItemTools) prefs_ItemTools->restoreDefaults(&localPrefs);
if (prefs_OperatorTools) prefs_OperatorTools->restoreDefaults(&localPrefs);
+ if (prefs_OptionalFeatures) prefs_OptionalFeatures->restoreDefaults(&localPrefs);
if (prefs_Hyphenator) prefs_Hyphenator->restoreDefaults(&localPrefs);
if (prefs_Fonts) prefs_Fonts->restoreDefaults(&localPrefs);
if (prefs_Printer) prefs_Printer->restoreDefaults(&localPrefs);
@@ -205,6 +209,7 @@ void PreferencesDialog::saveGuiToPrefs()
if (prefs_Typography) prefs_Typography->saveGuiToPrefs(&localPrefs);
if (prefs_ItemTools) prefs_ItemTools->saveGuiToPrefs(&localPrefs);
if (prefs_OperatorTools) prefs_OperatorTools->saveGuiToPrefs(&localPrefs);
+ if (prefs_OptionalFeatures) prefs_OptionalFeatures->saveGuiToPrefs(&localPrefs);
if (prefs_Hyphenator) prefs_Hyphenator->saveGuiToPrefs(&localPrefs);
if (prefs_Fonts) prefs_Fonts->saveGuiToPrefs(&localPrefs);
if (prefs_Printer) prefs_Printer->saveGuiToPrefs(&localPrefs);
diff --git a/scribus/ui/preferencesdialog.h b/scribus/ui/preferencesdialog.h
index e860c793e..90708b380 100644
--- a/scribus/ui/preferencesdialog.h
+++ b/scribus/ui/preferencesdialog.h
@@ -31,6 +31,7 @@ for which a new license (GPL+exception) is in place.
#include "ui/prefs_keyboardshortcuts.h"
#include "ui/prefs_miscellaneous.h"
#include "ui/prefs_operatortools.h"
+#include "ui/prefs_optionalfeatures.h"
#include "ui/prefs_pagesizes.h"
#include "ui/prefs_paths.h"
#include "ui/prefs_pdfexport.h"
@@ -102,6 +103,7 @@ class SCRIBUS_API PreferencesDialog : public QDialog, Ui::PreferencesDialog
Prefs_KeyboardShortcuts *prefs_KeyboardShortcuts {nullptr};
Prefs_Miscellaneous *prefs_Miscellaneous {nullptr};
Prefs_OperatorTools *prefs_OperatorTools {nullptr};
+ Prefs_OptionalFeatures *prefs_OptionalFeatures {nullptr};
Prefs_PDFExport *prefs_PDFExport {nullptr};
Prefs_PageSizes *prefs_PageSizes {nullptr};
Prefs_Paths *prefs_Paths {nullptr};
diff --git a/scribus/ui/prefs_optionalfeatures.cpp b/scribus/ui/prefs_optionalfeatures.cpp
new file mode 100644
index 000000000..0e05dfa42
--- /dev/null
+++ b/scribus/ui/prefs_optionalfeatures.cpp
@@ -0,0 +1,72 @@
+/*
+For general Scribus (>=1.3.2) copyright and licensing information please refer
+to the COPYING file provided with the program. Following this notice may exist
+a copyright and/or license notice that predates the release of Scribus 1.3.2
+for which a new license (GPL+exception) is in place.
+*/
+
+#include <QCheckBox>
+#include <QStyle>
+#include <QStyleOptionButton>
+
+#include "ui/prefs_optionalfeatures.h"
+#include "prefsstructs.h"
+
+Prefs_OptionalFeatures::Prefs_OptionalFeatures(QWidget* parent, ScribusDoc* doc)
+ : Prefs_Pane(parent)
+{
+ setupUi(this);
+
+ warningLabel->setVisible(false);
+ optionalFeaturesLabel->setVisible(false);
+ optionalFeaturesLine->setVisible(false);
+ deprecatedFeaturesLabel->setVisible(false);
+ deprecatedFeaturesLine->setVisible(false);
+
+ // TODO: it would be nicer to have a label below the checkbox
+ // but we need to have the same indent as the checkbox
+ // https://stackoverflow.com/a/53378653/5239250
+ // auto widthOfCheckBox = [](QCheckBox* cb) {
+ // QStyleOptionButton opt;
+ // // FIXME: initStyleOption() is private
+ // cb->initStyleOption(&opt);
+ // return cb->style()->subElementRect(QStyle::SE_CheckBoxIndicator, &opt, cb).width();
+ // };
+ // tablesEnabledLabel->setStyleSheet(QString("padding-left: %1px").arg(widthOfCheckBox(tablesEnabledCheckBox) + 2));
+ tablesEnabledCheckBox->setToolTip( "<qt>" + tr("Tables are stable but lacks several features that the average user will expect.") + "</qt>");
+
+ languageChange();
+
+ m_caption = tr("Optional Features");
+ // TODO: find an icon
+ m_icon = "tools_16.png";
+
+ connect(tablesEnabledCheckBox, &QCheckBox::stateChanged, this, &Prefs_OptionalFeatures::enableTables);
+}
+
+void Prefs_OptionalFeatures::enableTables(int state)
+{
+ if (state == Qt::Checked)
+ {
+ warningLabel->setText("<span style=\"color:red;\">" + tr("You need to restart Scribus to enable the tables") + "</span>");
+ warningLabel->setVisible(true);
+ }
+ else
+ warningLabel->setVisible(false);
+
+}
+
+void Prefs_OptionalFeatures::languageChange()
+{
+ // TODO: translate the labels and checkboxes
+}
+
+void Prefs_OptionalFeatures::restoreDefaults(struct ApplicationPrefs *prefsData)
+{
+ tablesEnabledCheckBox->setChecked(prefsData->optionalFeaturesPrefs.tables);
+}
+
+void Prefs_OptionalFeatures::saveGuiToPrefs(struct ApplicationPrefs *prefsData) const
+{
+ prefsData->optionalFeaturesPrefs.tables = tablesEnabledCheckBox->isChecked();
+}
diff --git a/scribus/ui/prefs_optionalfeatures.h b/scribus/ui/prefs_optionalfeatures.h
new file mode 100644
index 000000000..e279552c0
--- /dev/null
+++ b/scribus/ui/prefs_optionalfeatures.h
@@ -0,0 +1,36 @@
+/*
+For general Scribus (>=1.3.2) copyright and licensing information please refer
+to the COPYING file provided with the program. Following this notice may exist
+a copyright and/or license notice that predates the release of Scribus 1.3.2
+for which a new license (GPL+exception) is in place.
+*/
+
+#ifndef PREFS_OPTIONALFEATURES_H
+#define PREFS_OPTIONALFEATURES_H
+
+#include "ui_prefs_optionalfeaturesbase.h"
+#include "prefs_pane.h"
+#include "scribusapi.h"
+#include "scribusstructs.h"
+
+class SCRIBUS_API Prefs_OptionalFeatures : public Prefs_Pane, Ui::Prefs_OptionalFeaturesBase
+{
+ Q_OBJECT
+
+ public:
+ Prefs_OptionalFeatures(QWidget* parent, ScribusDoc* doc=nullptr);
+ ~Prefs_OptionalFeatures() = default;
+
+ void restoreDefaults(struct ApplicationPrefs *prefsData) override;
+ void saveGuiToPrefs(struct ApplicationPrefs *prefsData) const override;
+
+ public slots:
+ void languageChange();
+
+ private:
+ void enableTables(int state);
+
+ ObjAttrVector localAttributes;
+};
+
+#endif // PREFS_OPTIONALFEATURES_H
diff --git a/scribus/ui/prefs_optionalfeaturesbase.ui b/scribus/ui/prefs_optionalfeaturesbase.ui
new file mode 100644
index 000000000..5531695bb
--- /dev/null
+++ b/scribus/ui/prefs_optionalfeaturesbase.ui
@@ -0,0 +1,195 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <author>Petr Vanek <petr@scribus.info></author>
+ <comment>General prefs panel</comment>
+ <class>Prefs_OptionalFeaturesBase</class>
+ <widget class="QWidget" name="Prefs_OptionalFeaturesBase">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>630</width>
+ <height>574</height>
+ </rect>
+ </property>
+ <property name="windowTitle">
+ <string notr="true">Form</string>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout">
+ <item>
+ <widget class="QLabel" name="titleLabel">
+ <property name="font">
+ <font>
+ <pointsize>14</pointsize>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Optional Features</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="warningLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <weight>50</weight>
+ <bold>false</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string/>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="Line" name="line">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QScrollArea" name="scrollArea">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Expanding" vsizetype="Expanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="widgetResizable">
+ <bool>true</bool>
+ </property>
+ <widget class="QWidget" name="scrollAreaWidgetContents_2">
+ <property name="geometry">
+ <rect>
+ <x>0</x>
+ <y>0</y>
+ <width>610</width>
+ <height>496</height>
+ </rect>
+ </property>
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="MinimumExpanding">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <layout class="QVBoxLayout" name="verticalLayout_2">
+ <item>
+ <widget class="QLabel" name="optionalFeaturesLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Optional Features</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="Line" name="optionalFeaturesLine">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="experimentalFeaturesLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Experimental Features</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="Line" name="experimentalFeaturesLine">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QCheckBox" name="tablesEnabledCheckBox">
+ <property name="toolTip">
+ <string/>
+ </property>
+ <property name="text">
+ <string>Enable Tables</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="QLabel" name="deprecatedFeaturesLabel">
+ <property name="sizePolicy">
+ <sizepolicy hsizetype="Preferred" vsizetype="Minimum">
+ <horstretch>0</horstretch>
+ <verstretch>0</verstretch>
+ </sizepolicy>
+ </property>
+ <property name="font">
+ <font>
+ <weight>75</weight>
+ <bold>true</bold>
+ </font>
+ </property>
+ <property name="text">
+ <string>Deprecated Features</string>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <widget class="Line" name="deprecatedFeaturesLine">
+ <property name="orientation">
+ <enum>Qt::Horizontal</enum>
+ </property>
+ </widget>
+ </item>
+ <item>
+ <spacer name="verticalSpacer_2">
+ <property name="orientation">
+ <enum>Qt::Vertical</enum>
+ </property>
+ <property name="sizeHint" stdset="0">
+ <size>
+ <width>20</width>
+ <height>40</height>
+ </size>
+ </property>
+ </spacer>
+ </item>
+ </layout>
+ </widget>
+ </widget>
+ </item>
+ </layout>
+ </widget>
+ <resources/>
+ <connections/>
+</ui>
| ||||
| Patch | Yes | ||||
|
|
here is a merge request with appimage: https://gitlab.com/scribus/scribus/merge_requests/19 the patch is attached. - there is a new panel in the settings - for now, the only option is "tables" - by default, the table menu is disabled and the user can enable the feature in the settings - when enabling the tables, a warning is shown, that scribus must be restarted before the "new" menu will be active - there is a tooltip with some more details (i've tried to add a label below, but i failed to add the correct indend; i've left the code if somebody wants to give it a try again... or for a future me...) - tables are not disabled and the content panel still works. - if you think it's useful, we can add an alert if the user opens a document with tables and tables are disabled. (probably, it's useful... i can add this alert when i implement the alert for the missing images...) |
|
|
there is now a section a in the preferences with the experimental features. it does not list the tables among them, but well... |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2019-12-05 09:32 | ale | New Issue | |
| 2019-12-05 16:14 | ale | Note Added: 0047202 | |
| 2019-12-05 16:14 | ale | File Added: optional-tables.diff | |
| 2019-12-05 16:15 | ale | Summary | settings: enable / disable optional features => [PATCH] settings: enable / disable optional features |
| 2019-12-05 16:15 | ale | Patch | No => Yes |
| 2019-12-05 16:28 | ale | Assigned To | => ale |
| 2019-12-05 16:28 | ale | Status | new => assigned |
| 2019-12-09 07:43 | ale | Relationship added | related to 0015996 |
| 2025-07-01 17:37 | ale | Assigned To | ale => |
| 2025-07-01 17:37 | ale | Status | assigned => closed |
| 2025-07-01 17:37 | ale | Resolution | open => no change required |
| 2025-07-01 17:37 | ale | Note Added: 0052869 |