r23088 by jghali - #15552: Add possibility to search through scribus actions <ale + jghali>

scribus-commit scribus-commit at lists.scribus.net
Sat Jul 27 23:17:42 UTC 2019


Author: jghali
Date: Sat Jul 27 23:17:41 2019
New Revision: 23088

URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=23088
Log:
#15552: Add possibility to search through scribus actions <ale + jghali>

Added:
    trunk/Scribus/scribus/actionsearch.cpp
    trunk/Scribus/scribus/actionsearch.h
    trunk/Scribus/scribus/ui/actionsearchdialog.cpp
    trunk/Scribus/scribus/ui/actionsearchdialog.h
    trunk/Scribus/scribus/ui/actionsearchdialog.ui
Modified:
    trunk/Scribus/Scribus.pro
    trunk/Scribus/scribus/CMakeLists.txt
    trunk/Scribus/scribus/actionmanager.cpp
    trunk/Scribus/scribus/scribus.cpp
    trunk/Scribus/scribus/scribus.h
    trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj
    trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj.filters
    trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj
    trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters

Modified: trunk/Scribus/Scribus.pro
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23088&path=/trunk/Scribus/Scribus.pro
==============================================================================
--- trunk/Scribus/Scribus.pro	(original)
+++ trunk/Scribus/Scribus.pro	Sat Jul 27 23:17:41 2019
@@ -20,6 +20,7 @@
 
 # Input
 HEADERS += scribus/actionmanager.h \
+           scribus/actionsearch.h \
            scribus/annotation.h \
            scribus/appmodehelper.h \
            scribus/appmodes.h \
@@ -394,6 +395,7 @@
            scribus/text/textsource.h \
            scribus/ui/about.h \
            scribus/ui/aboutplugins.h \
+           scribus/ui/actionsearchdialog.h \
            scribus/ui/AdapterWidget.h \
            scribus/ui/adjustcmsdialog.h \
            scribus/ui/aligndistribute.h \
@@ -1022,7 +1024,9 @@
            scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.h \
            scribus/plugins/tools/2geomtools/pathalongpath/pathalongpath.h \
            scribus/plugins/tools/2geomtools/pathalongpath/pathdialog.h
+
 FORMS += scribus/ui/aboutplugins.ui \
+         scribus/ui/actionsearchdialog.ui \
          scribus/ui/aligndistribute.ui \
          scribus/ui/annot.ui \
          scribus/ui/arcvectorbase.ui \
@@ -1178,7 +1182,9 @@
          scribus/plugins/scripter/python/sceditor/mainwindow.ui \
          scribus/plugins/tools/2geomtools/meshdistortion/meshdistortiondialog.ui \
          scribus/plugins/tools/2geomtools/pathalongpath/pathdialogbase.ui
+
 SOURCES += scribus/actionmanager.cpp \
+           scribus/actionsearch.cpp \
            scribus/appmodehelper.cpp \
            scribus/canvas.cpp \
            scribus/canvasgesture_cellselect.cpp \
@@ -1514,6 +1520,7 @@
            scribus/text/textsource.cpp \
            scribus/ui/about.cpp \
            scribus/ui/aboutplugins.cpp \
+           scribus/ui/actionsearchdialog.cpp \
            scribus/ui/AdapterWidget.cpp \
            scribus/ui/adjustcmsdialog.cpp \
            scribus/ui/aligndistribute.cpp \

Modified: trunk/Scribus/scribus/CMakeLists.txt
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23088&path=/trunk/Scribus/scribus/CMakeLists.txt
==============================================================================
--- trunk/Scribus/scribus/CMakeLists.txt	(original)
+++ trunk/Scribus/scribus/CMakeLists.txt	Sat Jul 27 23:17:41 2019
@@ -88,6 +88,7 @@
 
 set(SCRIBUS_UI_SRC
 	ui/aboutplugins.ui
+	ui/actionsearchdialog.ui
 	ui/aligndistribute.ui
 	ui/annot.ui
 	ui/arcvectorbase.ui
@@ -307,6 +308,7 @@
 	urllauncher.h
 	ui/about.h
 	ui/aboutplugins.h
+	ui/actionsearchdialog.h
 	ui/adjustcmsdialog.h
 	ui/aligndistribute.h
 	ui/alignselect.h
@@ -564,6 +566,7 @@
 
 set(SCRIBUS_SOURCES
 	actionmanager.cpp
+	actionsearch.cpp
 	appmodehelper.cpp
 	canvas.cpp
 	canvasgesture_cellselect.cpp
@@ -808,6 +811,7 @@
 	third_party/fparser/fparser.cc
 	ui/about.cpp
 	ui/aboutplugins.cpp
+	ui/actionsearchdialog.cpp
 	ui/adjustcmsdialog.cpp
 	ui/aligndistribute.cpp
 	ui/alignselect.cpp

Modified: trunk/Scribus/scribus/actionmanager.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23088&path=/trunk/Scribus/scribus/actionmanager.cpp
==============================================================================
--- trunk/Scribus/scribus/actionmanager.cpp	(original)
+++ trunk/Scribus/scribus/actionmanager.cpp	Sat Jul 27 23:17:41 2019
@@ -991,6 +991,8 @@
 	name="helpAboutQt";
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
 	(*scrActions)[name]->setMenuRole(QAction::AboutQtRole);
+	name="helpActionSearch";
+	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
 	name="helpTooltips";
 	scrActions->insert(name, new ScrAction("", defaultKey(name), mainWindow));
 	name="helpManual";
@@ -1014,6 +1016,7 @@
 	connect( (*scrActions)["helpAboutScribus"], SIGNAL(triggered()), mainWindow, SLOT(slotHelpAbout()) );
 	connect( (*scrActions)["helpAboutPlugins"], SIGNAL(triggered()), mainWindow, SLOT(slotHelpAboutPlugins()) );
 	connect( (*scrActions)["helpAboutQt"], SIGNAL(triggered()), mainWindow, SLOT(slotHelpAboutQt()) );
+	connect( (*scrActions)["helpActionSearch"], SIGNAL(triggered()), mainWindow, SLOT(slotHelpActionSearch()) );
 	connect( (*scrActions)["helpTooltips"], SIGNAL(triggered()), mainWindow, SLOT(ToggleTips()) );
 	connect( (*scrActions)["helpManual"], SIGNAL(triggered()), mainWindow, SLOT(slotOnlineHelp()) );
 	connect( (*scrActions)["helpCheckUpdates"], SIGNAL(triggered()), mainWindow, SLOT(slotHelpCheckUpdates()) );
@@ -1744,6 +1747,7 @@
 	(*scrActions)["helpAboutScribus"]->setTexts( tr("&About Scribus"));
 	(*scrActions)["helpAboutPlugins"]->setTexts( tr("&About Plugins"));
 	(*scrActions)["helpAboutQt"]->setTexts( tr("About &Qt"));
+	(*scrActions)["helpActionSearch"]->setTexts( tr("Action &Search"));
 	(*scrActions)["helpTooltips"]->setTexts( tr("Toolti&ps"));
 	(*scrActions)["showMouseCoordinates"]->setTexts( tr("Move/Resize Value Indicator"));
 	(*scrActions)["helpManual"]->setTexts( tr("Scribus &Manual..."));
@@ -1968,6 +1972,7 @@
 	//Extras Menu
 	//Windows Menu
 	//Help Menu
+	defKeys.insert("helpActionSearch", Qt::CTRL+Qt::Key_Slash);
 	defKeys.insert("helpManual", Qt::Key_F1);
 
 	//GUI and specials

Modified: trunk/Scribus/scribus/scribus.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23088&path=/trunk/Scribus/scribus/scribus.cpp
==============================================================================
--- trunk/Scribus/scribus/scribus.cpp	(original)
+++ trunk/Scribus/scribus/scribus.cpp	Sat Jul 27 23:17:41 2019
@@ -95,6 +95,7 @@
 
 
 #include "actionmanager.h"
+#include "actionsearch.h"
 #include "appmodehelper.h"
 #include "appmodes.h"
 #include "canvasmode.h"
@@ -156,6 +157,7 @@
 #include "tocgenerator.h"
 #include "ui/about.h"
 #include "ui/aboutplugins.h"
+#include "ui/actionsearchdialog.h"
 #include "ui/adjustcmsdialog.h"
 #include "ui/aligndistribute.h"
 #include "ui/annot.h"
@@ -1151,6 +1153,7 @@
 	scrMenuMgr->addMenuItemString("helpManual", "Help");
 	scrMenuMgr->addMenuItemString("helpChat", "Help");
 	scrMenuMgr->addMenuItemString("SEPARATOR", "Help");
+	scrMenuMgr->addMenuItemString("helpActionSearch", "Help");
 	scrMenuMgr->addMenuItemString("helpTooltips", "Help");
 	scrMenuMgr->addMenuItemString("SEPARATOR", "Help");
 	scrMenuMgr->addMenuItemString("helpOnlineWWW", "Help");
@@ -5222,6 +5225,24 @@
 	ScMessageBox::aboutQt(this, tr("About Qt"));
 }
 
+void ScribusMainWindow::slotHelpActionSearch()
+{
+	ActionSearch actionSearch(this->menuBar());
+	actionSearch.update();
+
+	QScopedPointer<ActionSearchDialog> dialog(new ActionSearchDialog(this, actionSearch.getActionNames()));
+	dialog->setModal(true);
+
+	int result = dialog->exec();
+	if (result != QDialog::Accepted)
+		return;
+
+	QString actionName = dialog->getActionName();
+	if (actionName.isEmpty())
+		return;
+	actionSearch.execute(actionName);
+}
+
 void ScribusMainWindow::slotHelpCheckUpdates()
 {
 	About dia(this, About::CheckUpdates);

Modified: trunk/Scribus/scribus/scribus.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23088&path=/trunk/Scribus/scribus/scribus.h
==============================================================================
--- trunk/Scribus/scribus/scribus.h	(original)
+++ trunk/Scribus/scribus/scribus.h	Sat Jul 27 23:17:41 2019
@@ -390,6 +390,7 @@
 	void slotHelpAbout();
 	void slotHelpAboutPlugins();
     void slotHelpAboutQt();
+	void slotHelpActionSearch();
 	void slotHelpCheckUpdates();
 	void slotRaiseOnlineHelp();
 	void slotOnlineHelp(const QString & jumpToSection=QString(), const QString & jumpToFile=QString());

Modified: trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23088&path=/trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj
==============================================================================
--- trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj	(original)
+++ trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj	Sat Jul 27 23:17:41 2019
@@ -236,6 +236,7 @@
   </ItemDefinitionGroup>
   <ItemGroup>
     <moc Include="..\..\..\scribus\appmodehelper.h" />
+    <ClInclude Include="..\..\..\scribus\actionsearch.h" />
     <ClInclude Include="..\..\..\scribus\appmodes.h" />
     <ClInclude Include="..\..\..\scribus\collapsedtablepainterex.h" />
     <ClInclude Include="..\..\..\scribus\colormgmt\scciedata.h" />
@@ -605,6 +606,7 @@
     <moc Include="..\..\..\scribus\ui\pdfversionmodel.h" />
     <moc Include="..\..\..\scribus\ui\cxfimportdialog.h" />
     <moc Include="..\..\..\scribus\ui\numformatcombo.h" />
+    <moc Include="..\..\..\scribus\ui\actionsearchdialog.h" />
     <ClInclude Include="..\..\..\scribus\ui\propertywidgetbase.h" />
     <moc Include="..\..\..\scribus\pslib.h" />
     <moc Include="..\..\..\scribus\ui\query.h" />
@@ -843,6 +845,7 @@
     <ClInclude Include="..\..\..\scribus\colormgmt\sclcms2colortransformimpl.h" />
   </ItemGroup>
   <ItemGroup>
+    <ClCompile Include="..\..\..\scribus\actionsearch.cpp" />
     <ClCompile Include="..\..\..\scribus\appmodehelper.cpp" />
     <ClCompile Include="..\..\..\scribus\collapsedtablepainterex.cpp" />
     <ClCompile Include="..\..\..\scribus\colormgmt\scciedata.cpp" />
@@ -902,6 +905,7 @@
     <ClCompile Include="..\..\..\scribus\ui\about.cpp" />
     <ClCompile Include="..\..\..\scribus\ui\aboutplugins.cpp" />
     <ClCompile Include="..\..\..\scribus\actionmanager.cpp" />
+    <ClCompile Include="..\..\..\scribus\ui\actionsearchdialog.cpp" />
     <ClCompile Include="..\..\..\scribus\ui\adjustcmsdialog.cpp" />
     <ClCompile Include="..\..\..\scribus\ui\aligndistribute.cpp" />
     <ClCompile Include="..\..\..\scribus\ui\alignselect.cpp" />
@@ -1528,6 +1532,7 @@
   </ItemGroup>
   <ItemGroup>
     <uic Include="..\..\..\scribus\ui\aboutplugins.ui" />
+    <uic Include="..\..\..\scribus\ui\actionsearchdialog.ui" />
     <uic Include="..\..\..\scribus\ui\aligndistribute.ui" />
     <uic Include="..\..\..\scribus\ui\annot.ui" />
     <uic Include="..\..\..\scribus\ui\arcvectorbase.ui" />

Modified: trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj.filters
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23088&path=/trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj.filters
==============================================================================
--- trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj.filters	(original)
+++ trunk/Scribus/win32/msvc2013/scribus-main/Scribus.vcxproj.filters	Sat Jul 27 23:17:41 2019
@@ -797,10 +797,10 @@
     <ClInclude Include="..\..\..\scribus\sccolorstructs.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\..\scribus\ui\numformatcombo.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\..\scribus\ui\smnumformatcombo.h">
+    <ClInclude Include="..\..\..\scribus\actionsearch.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\ui\actionsearchdialog.h">
       <Filter>Header Files</Filter>
     </ClInclude>
   </ItemGroup>
@@ -2486,6 +2486,12 @@
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\..\scribus\ui\smnumformatcombo.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\actionsearch.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\ui\actionsearchdialog.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>
@@ -2866,6 +2872,9 @@
     <uic Include="..\..\..\scribus\ui\cxfimportdialogbase.ui">
       <Filter>Form Files</Filter>
     </uic>
+    <uic Include="..\..\..\scribus\ui\actionsearchdialog.ui">
+      <Filter>Form Files</Filter>
+    </uic>
   </ItemGroup>
   <ItemGroup>
     <lrelease Include="..\..\..\resources\translations\scribus.af.ts">
@@ -4103,6 +4112,12 @@
     <moc Include="..\..\..\scribus\ui\cxfimportdialog.h">
       <Filter>Header Files</Filter>
     </moc>
+    <moc Include="..\..\..\scribus\ui\numformatcombo.h">
+      <Filter>Header Files</Filter>
+    </moc>
+    <moc Include="..\..\..\scribus\ui\smnumformatcombo.h">
+      <Filter>Header Files</Filter>
+    </moc>
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="..\..\..\scribus\color.h">

Modified: trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23088&path=/trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj
==============================================================================
--- trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj	(original)
+++ trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj	Sat Jul 27 23:17:41 2019
@@ -236,6 +236,7 @@
   </ItemDefinitionGroup>
   <ItemGroup>
     <moc Include="..\..\..\scribus\appmodehelper.h" />
+    <ClInclude Include="..\..\..\scribus\actionsearch.h" />
     <ClInclude Include="..\..\..\scribus\appmodes.h" />
     <ClInclude Include="..\..\..\scribus\collapsedtablepainterex.h" />
     <ClInclude Include="..\..\..\scribus\colormgmt\scciedata.h" />
@@ -605,6 +606,7 @@
     <moc Include="..\..\..\scribus\ui\pdfversionmodel.h" />
     <moc Include="..\..\..\scribus\ui\cxfimportdialog.h" />
     <moc Include="..\..\..\scribus\ui\numformatcombo.h" />
+    <moc Include="..\..\..\scribus\ui\actionsearchdialog.h" />
     <ClInclude Include="..\..\..\scribus\ui\propertywidgetbase.h" />
     <moc Include="..\..\..\scribus\pslib.h" />
     <moc Include="..\..\..\scribus\ui\query.h" />
@@ -843,6 +845,7 @@
     <ClInclude Include="..\..\..\scribus\colormgmt\sclcms2colortransformimpl.h" />
   </ItemGroup>
   <ItemGroup>
+    <ClCompile Include="..\..\..\scribus\actionsearch.cpp" />
     <ClCompile Include="..\..\..\scribus\appmodehelper.cpp" />
     <ClCompile Include="..\..\..\scribus\collapsedtablepainterex.cpp" />
     <ClCompile Include="..\..\..\scribus\colormgmt\scciedata.cpp" />
@@ -902,6 +905,7 @@
     <ClCompile Include="..\..\..\scribus\ui\about.cpp" />
     <ClCompile Include="..\..\..\scribus\ui\aboutplugins.cpp" />
     <ClCompile Include="..\..\..\scribus\actionmanager.cpp" />
+    <ClCompile Include="..\..\..\scribus\ui\actionsearchdialog.cpp" />
     <ClCompile Include="..\..\..\scribus\ui\adjustcmsdialog.cpp" />
     <ClCompile Include="..\..\..\scribus\ui\aligndistribute.cpp" />
     <ClCompile Include="..\..\..\scribus\ui\alignselect.cpp" />
@@ -1528,6 +1532,7 @@
   </ItemGroup>
   <ItemGroup>
     <uic Include="..\..\..\scribus\ui\aboutplugins.ui" />
+    <uic Include="..\..\..\scribus\ui\actionsearchdialog.ui" />
     <uic Include="..\..\..\scribus\ui\aligndistribute.ui" />
     <uic Include="..\..\..\scribus\ui\annot.ui" />
     <uic Include="..\..\..\scribus\ui\arcvectorbase.ui" />

Modified: trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=23088&path=/trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters
==============================================================================
--- trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters	(original)
+++ trunk/Scribus/win32/msvc2015/scribus-main/Scribus.vcxproj.filters	Sat Jul 27 23:17:41 2019
@@ -797,10 +797,10 @@
     <ClInclude Include="..\..\..\scribus\sccolorstructs.h">
       <Filter>Header Files</Filter>
     </ClInclude>
-    <ClInclude Include="..\..\..\scribus\ui\numformatcombo.h">
-      <Filter>Header Files</Filter>
-    </ClInclude>
-    <ClInclude Include="..\..\..\scribus\ui\smnumformatcombo.h">
+    <ClInclude Include="..\..\..\scribus\actionsearch.h">
+      <Filter>Header Files</Filter>
+    </ClInclude>
+    <ClInclude Include="..\..\..\scribus\ui\actionsearchdialog.h">
       <Filter>Header Files</Filter>
     </ClInclude>
   </ItemGroup>
@@ -2486,6 +2486,12 @@
       <Filter>Source Files</Filter>
     </ClCompile>
     <ClCompile Include="..\..\..\scribus\ui\smnumformatcombo.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\actionsearch.cpp">
+      <Filter>Source Files</Filter>
+    </ClCompile>
+    <ClCompile Include="..\..\..\scribus\ui\actionsearchdialog.cpp">
       <Filter>Source Files</Filter>
     </ClCompile>
   </ItemGroup>
@@ -2866,6 +2872,9 @@
     <uic Include="..\..\..\scribus\ui\cxfimportdialogbase.ui">
       <Filter>Form Files</Filter>
     </uic>
+    <uic Include="..\..\..\scribus\ui\actionsearchdialog.ui">
+      <Filter>Form Files</Filter>
+    </uic>
   </ItemGroup>
   <ItemGroup>
     <lrelease Include="..\..\..\resources\translations\scribus.af.ts">
@@ -4103,6 +4112,12 @@
     <moc Include="..\..\..\scribus\ui\cxfimportdialog.h">
       <Filter>Header Files</Filter>
     </moc>
+    <moc Include="..\..\..\scribus\ui\numformatcombo.h">
+      <Filter>Header Files</Filter>
+    </moc>
+    <moc Include="..\..\..\scribus\ui\smnumformatcombo.h">
+      <Filter>Header Files</Filter>
+    </moc>
   </ItemGroup>
   <ItemGroup>
     <CustomBuild Include="..\..\..\scribus\color.h">




More information about the scribus-commit mailing list