View Issue Details

IDProjectCategoryView StatusLast Update
0015910ScribusProperties Palettepublic2019-11-08 12:44
Reporterale Assigned Toale  
PrioritynormalSeverityfeatureReproducibilityN/A
Status resolvedResolutionfixed 
Product Version1.5.6.svn 
Target VersionFixed in Version1.5.6.svn 
Summary0015910: Indigo UI: move the group and table panes to the content palette and create a page pane
Description- there is now a page, panel showing a string for now ("select an item to see its properties")
- the single option for the group panel is now in the content pane.
- the table panel is now also in the content panel:
  - since the table editing does not work correctly it's hard to say if the table panel belongs rather in the properties or content panel.
  - while editing text you cannot anymore edit the cell properties (you could do that in the PP, but i'm not sure if that had any effect)
  - when you exit the text editing of a cell the content palette, the table panel is not shown.
- i've started using the name contentpalette_ instead of propertiespalette_ and i plan to rename all the files and classes (in a specific commit) as soon as i'm sure that the content palette is definitive in scribus (soon, i guess...)
- in the code, i've reordered the content palettes to be sorted alphabetically

for the issues with the tables, i don't think that they make any difference for the user.
the day somebody fixes the tables he or she will also need to think about the behavior of the properties and content palette.

here is the merge request:

https://gitlab.com/scribus/scribus/merge_requests/10

and the appimage

https://gitlab.com/a.l.e/scribus/-/jobs/341141151/artifacts/file/Scribus-nightly-x86_64.AppImage
TagsNo tags attached.
PatchYes

Activities

ale

2019-11-04 16:09

manager  

pp-content-g-t-o.diff (24,458 bytes)
diff --git a/scribus/CMakeLists.txt b/scribus/CMakeLists.txt
index a92433cb1..8cd9a00c5 100644
--- a/scribus/CMakeLists.txt
+++ b/scribus/CMakeLists.txt
@@ -99,6 +99,7 @@ set(SCRIBUS_UI_SRC
 	ui/cmykfwbase.ui
 	ui/colorpalette.ui
 	ui/colorsandfillsbase.ui
+	ui/contentpalette_pagebase.ui
 	ui/cxfimportdialogbase.ui
 	ui/downloadspalettebase.ui
 	ui/gradientaddedit.ui
@@ -339,6 +340,7 @@ set(SCRIBUS_MOC_CLASSES
 	ui/colorlistmodel.h
 	ui/colorsandfills.h
 	ui/contentpalette.h
+	ui/contentpalette_page.h
 	ui/contextmenu.h
 	ui/cpalette.h
 	ui/cupsoptions.h
@@ -841,6 +843,7 @@ set(SCRIBUS_SOURCES
 	ui/colorlistmodel.cpp
 	ui/colorsandfills.cpp
 	ui/contentpalette.cpp
+	ui/contentpalette_page.cpp
 	ui/contextmenu.cpp
 	ui/cpalette.cpp
 	ui/cupsoptions.cpp
diff --git a/scribus/ui/contentpalette.cpp b/scribus/ui/contentpalette.cpp
index 2238a269f..b899eaf16 100644
--- a/scribus/ui/contentpalette.cpp
+++ b/scribus/ui/contentpalette.cpp
@@ -11,7 +11,10 @@ for which a new license (GPL+exception) is in place.
 
 #include "appmodehelper.h" // for AppModeChanged (if needed)
 
+#include "propertiespalette_group.h"
 #include "propertiespalette_image.h"
+#include "contentpalette_page.h"
+#include "propertiespalette_table.h"
 #include "propertiespalette_text.h"
 #include "pageitem_imageframe.h"
 #include "pageitem_table.h"
@@ -35,12 +38,21 @@ ContentPalette::ContentPalette(QWidget* parent) :
 	auto emptyPal = new QWidget();
 	stackedWidget->addWidget(emptyPal);
 
-	textPal = new PropertiesPalette_Text(this);
-	stackedWidget->addWidget(textPal);
+	groupPal = new PropertiesPalette_Group(this);
+	stackedWidget->addWidget(groupPal);
 
 	imagePal = new PropertiesPalette_Image(this);
 	stackedWidget->addWidget(imagePal);
 
+	pagePal = new ContentPalette_Page(this);
+	stackedWidget->addWidget(pagePal);
+
+	tablePal = new PropertiesPalette_Table(this);
+	stackedWidget->addWidget(tablePal);
+
+	textPal = new PropertiesPalette_Text(this);
+	stackedWidget->addWidget(textPal);
+
 	setWidget(stackedWidget);
 
 	stackedWidget->setCurrentIndex((int) Panel::empty);
@@ -52,8 +64,10 @@ void ContentPalette::setMainWindow(ScribusMainWindow *mw)
 {
 	m_ScMW = mw;
 
-	textPal->setMainWindow(mw);
+	groupPal->setMainWindow(mw);
 	imagePal->setMainWindow(mw);
+	tablePal->setMainWindow(mw);
+	textPal->setMainWindow(mw);
 
 	connect(m_ScMW->appModeHelper, &AppModeHelper::AppModeChanged, this, &ContentPalette::AppModeChanged);
 }
@@ -78,8 +92,10 @@ void ContentPalette::setDoc(ScribusDoc *doc)
 	m_haveDoc = true;
 	m_haveItem = false;
 
-	textPal->setDoc(m_doc);
+	groupPal->setDoc(m_doc);
 	imagePal->setDoc(m_doc);
+	tablePal->setDocument(m_doc);
+	textPal->setDoc(m_doc);
 
 	updateColorList();
 
@@ -104,10 +120,14 @@ void ContentPalette::unsetDoc()
 	m_doc=nullptr;
 	m_item = nullptr;
 
-	textPal->unsetItem();
-	textPal->unsetDoc();
+	groupPal->unsetItem();
+	groupPal->unsetDoc();
 	imagePal->unsetItem();
 	imagePal->unsetDoc();
+	tablePal->unsetItem();
+	tablePal->unsetDocument();
+	textPal->unsetItem();
+	textPal->unsetDoc();
 
 	stackedWidget->setCurrentIndex((int) Panel::empty);
 }
@@ -117,7 +137,9 @@ void ContentPalette::unsetItem()
 	m_haveItem = false;
 	m_item = nullptr;
 
+	groupPal->unsetItem();
 	imagePal->unsetItem();
+	tablePal->unsetItem();
 	textPal->unsetItem();
 
 	handleSelectionChanged();
@@ -142,6 +164,12 @@ void ContentPalette::AppModeChanged()
 	{
 		if (m_item->isTable())
 		{
+			// TODO: a.l.e: fix the table selection
+			// when a cell is selected it should show the table pane for now
+			// you need to enter the text edit mode to format text.
+			// in the future we will probably add a multiple panes at once
+			// (on top of each other? switching?)
+			// tablePal->setEnabled(m_doc->appMode == modeEditTable);
 			textPal->setEnabled(m_doc->appMode == modeEditTable);
 			if (m_doc->appMode == modeEditTable)
 			{
@@ -175,12 +203,16 @@ void ContentPalette::setCurrentItem(PageItem *item)
 	m_haveItem = true;
 	m_item = item;
 
+	tablePal->setItem(m_item);
+
 	// TODO: in PropertiesPalette there is a a funny if for the groups: take care of it when adding the group panel
 
 	if (!sender() || (m_doc->appMode == modeEditTable))
 	{
-		textPal->handleSelectionChanged();
+		groupPal->handleSelectionChanged();
 		imagePal->handleSelectionChanged();
+		tablePal->handleSelectionChanged();
+		textPal->handleSelectionChanged();
 	}
 }
 
@@ -197,7 +229,7 @@ void  ContentPalette::handleSelectionChanged()
 	// TODO: should me move this to setCurrentIndex()?
 	if (!currItem)
 	{
-		newPanel = Panel::empty;
+		newPanel = Panel::page;
 		m_haveItem = false;
 	}
 	else if (m_doc->m_Selection->count() > 1)
@@ -219,7 +251,10 @@ void  ContentPalette::handleSelectionChanged()
 			newPanel = Panel::text;
 			break;
 		case PageItem::Table:
-			newPanel = m_doc->appMode == modeEditTable ? Panel::text : Panel::empty;
+			newPanel = m_doc->appMode == modeEditTable && !static_cast<PageItem_Table*>(currItem)->hasSelection() ? Panel::text : Panel::table;
+			break;
+		case PageItem::Group:
+			newPanel = Panel::group;
 			break;
 		default:
 			newPanel = Panel::empty;
@@ -247,8 +282,9 @@ void ContentPalette::unitChange()
 	m_unitRatio = m_doc->unitRatio();
 	m_unitIndex = m_doc->unitIndex();
 
-	textPal->unitChange();
+	groupPal->unitChange();
 	imagePal->unitChange();
+	textPal->unitChange();
 
 	m_haveItem = tmp;
 }
@@ -258,6 +294,7 @@ void ContentPalette::updateColorList()
 	if (!m_haveDoc || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 
+	tablePal->updateColorList();
 	textPal->updateColorList();
 
 	assert (m_doc->PageColors.document());
@@ -285,20 +322,31 @@ void ContentPalette::updatePanelTitle()
 		case Panel::empty:
 			setWindowTitle( tr("Content Properties"));
 			break;
-		case Panel::text:
-			setWindowTitle( tr("Text Properties"));
+		case Panel::group:
+			setWindowTitle( tr("Group Properties"));
 			break;
 		case Panel::image:
 			setWindowTitle( tr("Image Properties"));
 			break;
+		case Panel::page:
+			setWindowTitle( tr("Page Properties"));
+			break;
+		case Panel::table:
+			setWindowTitle( tr("Table Properties"));
+			break;
+		case Panel::text:
+			setWindowTitle( tr("Text Properties"));
+			break;
 	}
 }
 
 void ContentPalette::languageChange()
 {
 	updatePanelTitle();
-	textPal->languageChange();
+	groupPal->languageChange();
 	imagePal->languageChange();
+	tablePal->languageChange();
+	textPal->languageChange();
 }
 
 void ContentPalette::update(PageItem_ImageFrame* image)
diff --git a/scribus/ui/contentpalette.h b/scribus/ui/contentpalette.h
index d1d4d7ed6..9ab476d59 100644
--- a/scribus/ui/contentpalette.h
+++ b/scribus/ui/contentpalette.h
@@ -17,8 +17,11 @@ class ScribusMainWindow;
 class ScribusDoc;
 class PageItem;
 
-class PropertiesPalette_Text;
+class PropertiesPalette_Group;
 class PropertiesPalette_Image;
+class ContentPalette_Page;
+class PropertiesPalette_Table;
+class PropertiesPalette_Text;
 class PageItem_TextFrame;
 class PageItem_ImageFrame;
 class ParagraphStyle;
@@ -70,17 +73,23 @@ class SCRIBUS_API ContentPalette : public ScDockPalette
 		double m_unitRatio{1.0};
 		int m_unitIndex{0};
 
-		QStackedWidget* stackedWidget;
-		PropertiesPalette_Text* textPal;
-		PropertiesPalette_Image* imagePal;
+		QStackedWidget* stackedWidget{nullptr};
+		PropertiesPalette_Group* groupPal{nullptr};
+		PropertiesPalette_Image* imagePal{nullptr};
+		ContentPalette_Page* pagePal{nullptr};
+		PropertiesPalette_Table* tablePal{nullptr};
+		PropertiesPalette_Text* textPal{nullptr};
 
 		void updatePanelTitle();
 		
 		// the order must match the insertion of the widgets in the constructor
 		enum class Panel {
 			empty,
-			text,
-			image
+			group,
+			image,
+			page,
+			table,
+			text
 		};
 };
 
diff --git a/scribus/ui/contentpalette_page.cpp b/scribus/ui/contentpalette_page.cpp
new file mode 100644
index 000000000..10f6a2ca8
--- /dev/null
+++ b/scribus/ui/contentpalette_page.cpp
@@ -0,0 +1,132 @@
+/*
+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 "contentpalette_page.h"
+
+#include <QObject>
+#include <QWidget>
+
+#include "units.h"
+#include "scribus.h"
+#include "scribusdoc.h"
+#include "pageitem.h"
+#include "selection.h"
+
+ContentPalette_Page::ContentPalette_Page( QWidget* parent)
+	: QWidget(parent),
+	  m_haveDoc(false),
+	  m_haveItem(false),
+	  m_unitRatio(1.0),
+	  m_unitIndex(SC_PT),
+	  m_doc(nullptr)
+{
+
+	setupUi(this);
+	setSizePolicy( QSizePolicy(QSizePolicy::Maximum, QSizePolicy::Maximum));
+
+	languageChange();
+}
+
+void ContentPalette_Page::setMainWindow(ScribusMainWindow *mw)
+{
+	m_ScMW = mw;
+
+	connect(m_ScMW, &ScribusMainWindow::UpdateRequest, this, &ContentPalette_Page::handleUpdateRequest);
+	// connect(m_ScMW, SIGNAL(UpdateRequest(int)), this, SLOT(handleUpdateRequest(int)));
+}
+
+void ContentPalette_Page::setDoc(ScribusDoc *d)
+{
+	if((d == (ScribusDoc*) m_doc) || (m_ScMW && m_ScMW->scriptIsRunning()))
+		return;
+
+	if (m_doc)
+	{
+		disconnect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
+		disconnect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
+	}
+	
+	m_doc  = d;
+	m_unitRatio   = m_doc->unitRatio();
+	m_unitIndex   = m_doc->unitIndex();
+
+	m_haveDoc  = true;
+	m_haveItem = false;
+
+	connect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
+	connect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
+}
+
+void ContentPalette_Page::unsetDoc()
+{
+	if (m_doc)
+	{
+		disconnect(m_doc->m_Selection, SIGNAL(selectionChanged()), this, SLOT(handleSelectionChanged()));
+		disconnect(m_doc             , SIGNAL(docChanged())      , this, SLOT(handleSelectionChanged()));
+	}
+
+	m_haveDoc  = false;
+	m_haveItem = false;
+	m_doc   = nullptr;
+
+	setEnabled(false);
+}
+
+void ContentPalette_Page::unsetItem()
+{
+	m_haveItem = false;
+	handleSelectionChanged();
+}
+
+void ContentPalette_Page::handleSelectionChanged()
+{
+	if (!m_haveDoc || !m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+
+	if (m_doc->m_Selection->count() > 1)
+		m_haveItem = true;
+}
+
+void ContentPalette_Page::handleUpdateRequest(int updateFlags)
+{
+}
+
+void ContentPalette_Page::setCurrentItem(PageItem *item)
+{
+	if (!m_ScMW || m_ScMW->scriptIsRunning())
+		return;
+
+	if (!m_doc)
+		setDoc(item->doc());
+
+	m_haveItem = true;
+}
+
+void ContentPalette_Page::changeEvent(QEvent *e)
+{
+	if (e->type() == QEvent::LanguageChange)
+	{
+		languageChange();
+		return;
+	}
+	QWidget::changeEvent(e);
+}
+
+
+void ContentPalette_Page::languageChange()
+{
+	retranslateUi(this);
+}
+
+void ContentPalette_Page::unitChange()
+{
+	if (!m_doc)
+		return;
+
+	m_unitRatio = m_doc->unitRatio();
+	m_unitIndex = m_doc->unitIndex();
+}
diff --git a/scribus/ui/contentpalette_page.h b/scribus/ui/contentpalette_page.h
new file mode 100644
index 000000000..a632bb850
--- /dev/null
+++ b/scribus/ui/contentpalette_page.h
@@ -0,0 +1,63 @@
+/*
+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 CONTENTPALETTE_PAGEBASE_H
+#define CONTENTPALETTE_PAGEBASE_H
+
+#include "ui_contentpalette_pagebase.h"
+
+#include "scribusapi.h"
+#include "pageitem.h"
+#include "scguardedptr.h"
+#include "scribusdoc.h"
+
+class ScribusDoc;
+class ScribusMainWindow;
+class Selection;
+
+class SCRIBUS_API ContentPalette_Page : public QWidget, Ui::ContentPalette_PageBase
+{
+	Q_OBJECT
+
+public:
+	ContentPalette_Page(QWidget* parent);
+	~ContentPalette_Page() {};
+
+	virtual void changeEvent(QEvent *e);
+
+	// void showTextFlowMode(PageItem::TextFlowMode mode);
+
+	// void updateColorList();
+	// void updateColorSpecialGradient();
+
+protected:
+
+	bool      m_haveDoc;
+	bool      m_haveItem;
+	double    m_unitRatio;
+	int       m_unitIndex;
+
+	// PageItem *m_item;
+	ScribusMainWindow*       m_ScMW;
+	ScGuardedPtr<ScribusDoc> m_doc;
+	// Selection*               m_tmpSelection;
+
+public slots:
+	void setMainWindow(ScribusMainWindow *mw);
+
+	void setDoc(ScribusDoc *d);
+	void setCurrentItem(PageItem *item);
+	void unsetDoc();
+	void unsetItem();
+
+	void handleSelectionChanged();
+	void handleUpdateRequest(int);
+
+	void languageChange();
+	void unitChange();
+};
+
+#endif
diff --git a/scribus/ui/contentpalette_pagebase.ui b/scribus/ui/contentpalette_pagebase.ui
new file mode 100644
index 000000000..55faaa892
--- /dev/null
+++ b/scribus/ui/contentpalette_pagebase.ui
@@ -0,0 +1,56 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<ui version="4.0">
+ <class>ContentPalette_PageBase</class>
+ <widget class="QWidget" name="ContentPalette_PageBase">
+  <property name="geometry">
+   <rect>
+    <x>0</x>
+    <y>0</y>
+    <width>212</width>
+    <height>47</height>
+   </rect>
+  </property>
+  <property name="windowTitle">
+   <string notr="true">Form</string>
+  </property>
+  <layout class="QVBoxLayout" name="verticalLayout_3">
+   <property name="spacing">
+    <number>3</number>
+   </property>
+   <property name="leftMargin">
+    <number>3</number>
+   </property>
+   <property name="topMargin">
+    <number>3</number>
+   </property>
+   <property name="rightMargin">
+    <number>3</number>
+   </property>
+   <property name="bottomMargin">
+    <number>3</number>
+   </property>
+   <item>
+    <widget class="QLabel" name="label">
+     <property name="text">
+      <string>Select an item to see its properties.</string>
+     </property>
+    </widget>
+   </item>
+   <item>
+    <spacer name="verticalSpacer">
+     <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>
+ <resources/>
+ <connections/>
+</ui>
diff --git a/scribus/ui/propertiespalette.cpp b/scribus/ui/propertiespalette.cpp
index 6e44a4829..59c81dbe3 100644
--- a/scribus/ui/propertiespalette.cpp
+++ b/scribus/ui/propertiespalette.cpp
@@ -41,11 +41,9 @@ for which a new license (GPL+exception) is in place.
 #include "cpalette.h"
 #include "dasheditor.h"
 #include "pageitem_table.h"
-#include "propertiespalette_group.h"
 #include "propertiespalette_line.h"
 #include "propertiespalette_shadow.h"
 #include "propertiespalette_shape.h"
-#include "propertiespalette_table.h"
 #include "propertiespalette_utils.h"
 #include "propertiespalette_xyz.h"
 #include "transparencypalette.h"
@@ -81,9 +79,6 @@ PropertiesPalette::PropertiesPalette( QWidget* parent) : ScDockPalette( parent,
 	shapePal = new PropertiesPalette_Shape( this );
 	idShapeItem = TabStack->addItem( shapePal, "&Shape" );
 
-	groupPal = new PropertiesPalette_Group( this );
-	idGroupItem = TabStack->addItem(groupPal, "Groups");
-
 	linePal = new PropertiesPalette_Line(this);
 	idLineItem=TabStack->addItem( linePal, "&Line" );
 
@@ -93,9 +88,6 @@ PropertiesPalette::PropertiesPalette( QWidget* parent) : ScDockPalette( parent,
 	transparencyPalette = new TransparencyPalette(this);
 	idTransparencyItem = TabStack->addItem(transparencyPalette, "&Transparency" );
 
-	tablePal = new PropertiesPalette_Table(this);
-	idTableItem = TabStack->addItem(tablePal, "T&able" );
-
 	setWidget( TabStack );
 
 	languageChange();
@@ -145,9 +137,7 @@ void PropertiesPalette::setMainWindow(ScribusMainWindow* mw)
 	this->xyzPal->setMainWindow(mw);
 	this->shadowPal->setMainWindow(mw);
 	this->shapePal->setMainWindow(mw);
-	this->groupPal->setMainWindow(mw);
 	this->linePal->setMainWindow(mw);
-	this->tablePal->setMainWindow(mw);
 
 	//connect(this->Cpal, SIGNAL(gradientChanged()), m_ScMW, SLOT(updtGradFill()));
 	//connect(this->Cpal, SIGNAL(strokeGradientChanged()), m_ScMW, SLOT(updtGradStroke()));
@@ -215,9 +205,7 @@ void PropertiesPalette::setDoc(ScribusDoc *d)
 	xyzPal->setDoc(m_doc);
 	shadowPal->setDoc(m_doc);
 	shapePal->setDoc(m_doc);
-	groupPal->setDoc(m_doc);
 	linePal->setDoc(m_doc);
-	tablePal->setDocument(m_doc);
 
 	updateColorList();
 
@@ -247,12 +235,8 @@ void PropertiesPalette::unsetDoc()
 	shadowPal->unsetDoc();
 	shapePal->unsetItem();
 	shapePal->unsetDoc();
-	groupPal->unsetItem();
-	groupPal->unsetDoc();
 	linePal->unsetItem();
 	linePal->unsetDoc();
-	tablePal->unsetItem();
-	tablePal->unsetDocument();
 
 	colorPalette->setCurrentItem(nullptr);
 	colorPalette->setDocument(nullptr);
@@ -272,10 +256,7 @@ void PropertiesPalette::unsetItem()
 	m_item = nullptr;
 	colorPalette->setCurrentItem(nullptr);
 	transparencyPalette->setCurrentItem(nullptr);
-	tablePal->unsetItem();
 	shapePal->unsetItem();
-	groupPal->unsetItem();
-	shadowPal->unsetItem();
 	linePal->unsetItem();
 	handleSelectionChanged();
 }
@@ -300,6 +281,7 @@ void PropertiesPalette::AppModeChanged()
 		return;
 	if ((m_haveDoc) && (m_haveItem))
 	{
+		// TODO: not sure that this is still needed...
 		if (m_item->isTable())
 		{
 			if (m_doc->appMode == modeEditTable)
@@ -338,7 +320,6 @@ void PropertiesPalette::setCurrentItem(PageItem *item)
 	m_haveItem = false;
 	m_item = item;
 
-	tablePal->setItem(m_item);
 	transparencyPalette->setCurrentItem(m_item);
 
 	setTextFlowMode(m_item->textFlowMode());
@@ -353,14 +334,10 @@ void PropertiesPalette::setCurrentItem(PageItem *item)
 		TabStack->setItemEnabled(idXYZItem, true);
 		TabStack->setItemEnabled(idShadowItem, true);
 		TabStack->setItemEnabled(idShapeItem, true);
-		TabStack->setItemEnabled(idGroupItem, true);
 		TabStack->setItemEnabled(idLineItem, false);
 		TabStack->setItemEnabled(idColorsItem, false);
 		TabStack->setItemEnabled(idTransparencyItem, true);
-		TabStack->setItemEnabled(idTableItem, false);
 	}
-	else
-		TabStack->setItemEnabled(idGroupItem, false);
 
 	m_haveItem = true;
 
@@ -376,9 +353,7 @@ void PropertiesPalette::setCurrentItem(PageItem *item)
 		xyzPal->handleSelectionChanged();
 		shadowPal->handleSelectionChanged();
 		shapePal->handleSelectionChanged();
-		groupPal->handleSelectionChanged();
 		linePal->handleSelectionChanged();
-		tablePal->handleSelectionChanged();
 		colorPalette->handleSelectionChanged();
 	}
 
@@ -387,23 +362,18 @@ void PropertiesPalette::setCurrentItem(PageItem *item)
 		TabStack->setItemEnabled(idXYZItem, true);
 		TabStack->setItemEnabled(idShadowItem, true);
 		TabStack->setItemEnabled(idShapeItem, true);
-		TabStack->setItemEnabled(idGroupItem, false);
 		TabStack->setItemEnabled(idLineItem, false);
 		TabStack->setItemEnabled(idColorsItem, true);
-		TabStack->setItemEnabled(idTableItem, false);
 		TabStack->setItemEnabled(idTransparencyItem, false);
-		TabStack->setItemEnabled(idTableItem, false);
 	}
 	if (m_item->asSymbolFrame())
 	{
 		TabStack->setItemEnabled(idXYZItem, true);
 		TabStack->setItemEnabled(idShadowItem, true);
 		TabStack->setItemEnabled(idShapeItem, false);
-		TabStack->setItemEnabled(idGroupItem, true);
 		TabStack->setItemEnabled(idLineItem, false);
 		TabStack->setItemEnabled(idColorsItem, false);
 		TabStack->setItemEnabled(idTransparencyItem, false);
-		TabStack->setItemEnabled(idTableItem, false);
 	}
 	connect(TabStack, SIGNAL(currentChanged2(int)), this, SLOT(SelTab(int)));
 }
@@ -426,12 +396,6 @@ void PropertiesPalette::handleSelectionChanged()
 		TabStack->setItemEnabled(idLineItem, true);
 		TabStack->setItemEnabled(idColorsItem, true);
 		TabStack->setItemEnabled(idTransparencyItem, true);
-		TabStack->setItemEnabled(idTableItem, false); // At least not for now.
-		if (m_haveItem && m_item)
-		{
-			if ((m_item->isGroup()) && (!m_item->isSingleSel))
-				TabStack->setItemEnabled(idGroupItem, true);
-		}
 	}
 	else
 	{
@@ -443,7 +407,6 @@ void PropertiesPalette::handleSelectionChanged()
 		TabStack->setItemEnabled(idXYZItem, true);
 		TabStack->setItemEnabled(idColorsItem, true);
 		TabStack->setItemEnabled(idTransparencyItem, true);
-		TabStack->setItemEnabled(idTableItem, false);
 		switch (itemType)
 		{
 		case -1:
@@ -462,7 +425,6 @@ void PropertiesPalette::handleSelectionChanged()
 				TabStack->setItemEnabled(idXYZItem, true);
 				TabStack->setItemEnabled(idShadowItem, true);
 				TabStack->setItemEnabled(idShapeItem, true);
-				TabStack->setItemEnabled(idGroupItem, false);
 				TabStack->setItemEnabled(idLineItem, false);
 				TabStack->setItemEnabled(idColorsItem, true);
 				TabStack->setItemEnabled(idTransparencyItem, false);
@@ -475,6 +437,9 @@ void PropertiesPalette::handleSelectionChanged()
 				TabStack->setItemEnabled(idLineItem, true);
 			}
 			break;
+		case PageItem::Group:
+		case PageItem::Symbol:
+		case PageItem::Table:
 		case PageItem::TextFrame:
 			TabStack->setItemEnabled(idShadowItem, true);
 			TabStack->setItemEnabled(idShapeItem, true);
@@ -505,24 +470,6 @@ void PropertiesPalette::handleSelectionChanged()
 			TabStack->setItemEnabled(idShapeItem, true);
 			TabStack->setItemEnabled(idLineItem, true);
 			break;
-		case PageItem::Symbol:
-		case PageItem::Group:
-			TabStack->setItemEnabled(idShadowItem, true);
-			TabStack->setItemEnabled(idShapeItem, true);
-			TabStack->setItemEnabled(idLineItem, false);
-			TabStack->setItemEnabled(idGroupItem, true);
-			TabStack->setItemEnabled(idColorsItem, false);
-			TabStack->setItemEnabled(idTransparencyItem, false);
-			break;
-		case PageItem::Table:
-			TabStack->setItemEnabled(idTableItem, true);
-			TabStack->setItemEnabled(idShadowItem, true);
-			TabStack->setItemEnabled(idShapeItem, true);
-			TabStack->setItemEnabled(idLineItem, false);
-			TabStack->setItemEnabled(idGroupItem, false);
-			TabStack->setItemEnabled(idColorsItem, false);
-			TabStack->setItemEnabled(idTransparencyItem, true);
-			break;
 		}
 	}
 	if (TabStack->isItemEnabled(currentTab) && (TabStack->currentIndex() != currentTab))
@@ -550,7 +497,6 @@ void PropertiesPalette::unitChange()
 	xyzPal->unitChange();
 	shadowPal->unitChange();
 	shapePal->unitChange();
-	groupPal->unitChange();
 	linePal->unitChange();
 
 	colorPalette->unitChange(oldRatio, m_unitRatio, m_doc->unitIndex());
@@ -779,7 +725,6 @@ void PropertiesPalette::updateColorList()
 	if (!m_haveDoc || !m_ScMW || m_ScMW->scriptIsRunning())
 		return;
 
-	tablePal->updateColorList();
 	colorPalette->updateColorList();
 	transparencyPalette->updateColorList();
 	shadowPal->updateColorList();
@@ -811,17 +756,13 @@ void PropertiesPalette::languageChange()
 	TabStack->setItemText(idShapeItem, tr("&Shape"));
 	TabStack->setItemText(idLineItem, tr("&Line"));
 	TabStack->setItemText(idColorsItem, tr("&Colors"));
-	TabStack->setItemText(idGroupItem, tr("&Group"));
 	TabStack->setItemText(idTransparencyItem, tr("&Transparency"));
-	TabStack->setItemText(idTableItem, tr("T&able"));
 
 	xyzPal->languageChange();
 	shadowPal->languageChange();
 	shapePal->languageChange();
-	groupPal->languageChange();
 	colorPalette->languageChange();
 	linePal->languageChange();
-	tablePal->languageChange();
 }
 
 void PropertiesPalette::setGradientEditMode(bool on)
diff --git a/scribus/ui/propertiespalette.h b/scribus/ui/propertiespalette.h
index 0b04e900b..12d1912a1 100644
--- a/scribus/ui/propertiespalette.h
+++ b/scribus/ui/propertiespalette.h
@@ -69,11 +69,9 @@ public:
                          // and if in ScribusView a groupTransaction has been started it must be also
                          // commmited
 
-	PropertiesPalette_Group* groupPal {nullptr};
 	PropertiesPalette_Line* linePal {nullptr};
 	PropertiesPalette_Shadow* shadowPal {nullptr};
 	PropertiesPalette_Shape* shapePal {nullptr};
-	PropertiesPalette_Table* tablePal {nullptr};
 	PropertiesPalette_XYZ* xyzPal {nullptr};
 	ColorPalette *colorPalette {nullptr};
 	TransparencyPalette *transparencyPalette {nullptr};
pp-content-g-t-o.diff (24,458 bytes)

Issue History

Date Modified Username Field Change
2019-11-04 16:09 ale New Issue
2019-11-04 16:09 ale File Added: pp-content-g-t-o.diff
2019-11-04 16:27 ale Summary Indigo UI: move the group and table panes to the content palette and create a page pane => [PATCH] Indigo UI: move the group and table panes to the content palette and create a page pane
2019-11-04 16:27 ale Patch No => Yes
2019-11-08 12:44 jghali Summary [PATCH] Indigo UI: move the group and table panes to the content palette and create a page pane => Indigo UI: move the group and table panes to the content palette and create a page pane
2019-11-08 12:44 jghali Assigned To => ale
2019-11-08 12:44 jghali Status new => resolved
2019-11-08 12:44 jghali Resolution open => fixed
2019-11-08 12:44 jghali Fixed in Version => 1.5.6.svn