[rkward] rkward: Highlight (some) useful kate plugins, remove some debug code.

Thomas Friedrichsmeier null at kde.org
Wed Apr 1 15:08:28 BST 2020


Git commit 7a2c60683cc1a58df332123f39bf1454a33fd29f by Thomas Friedrichsmeier.
Committed on 01/04/2020 at 14:07.
Pushed by tfry into branch 'master'.

Highlight (some) useful kate plugins, remove some debug code.

M  +7    -1    rkward/settings/rksettingsmodulekateplugins.cpp
M  +0    -3    rkward/windows/katepluginintegration.cpp

https://commits.kde.org/rkward/7a2c60683cc1a58df332123f39bf1454a33fd29f

diff --git a/rkward/settings/rksettingsmodulekateplugins.cpp b/rkward/settings/rksettingsmodulekateplugins.cpp
index 81ab1340..3fdbea18 100644
--- a/rkward/settings/rksettingsmodulekateplugins.cpp
+++ b/rkward/settings/rksettingsmodulekateplugins.cpp
@@ -37,17 +37,23 @@ QStringList RKSettingsModuleKatePlugins::plugins_to_load;
 RKSettingsModuleKatePlugins::RKSettingsModuleKatePlugins(RKSettings *gui, QWidget *parent) : RKSettingsModule(gui, parent) {
 	RK_TRACE(SETTINGS);
 
+/* Known kate plugins at the time of this writing (March 2020): katesearchplugin katexmltoolsplugin katexmlcheckplugin katectagsplugin katefiletreeplugin katecloseexceptplugin katebacktracebrowserplugin tabswitcherplugin kterustcompletionplugin katekonsoleplugin katesnippetsplugin katefilebrowserplugin katereplicodeplugin ktexteditor_lumen kateprojectplugin kateopenheaderplugin katesymbolviewerplugin ktexteditorpreviewplugin katesqlplugin kategdbplugin katebuildplugin textfilterplugin */
+	QStringList recommended_plugins = QStringList () << "katesearchplugin" << "katecloseexceptplugin" << "katekonsoleplugin" << "katesnippetsplugin" << "katefiletreeplugin" << "kateprojectplugin" << "ktexteditorpreviewplugin" << "textfilterplugin";
+
 	QVBoxLayout *vbox = new QVBoxLayout(this);
 	vbox->setContentsMargins(0, 0, 0, 0);
-	vbox->addWidget(RKCommonFunctions::wordWrappedLabel(i18n("Kate plugins to load in RKWard. Note that some loaded plugins will not become visible until certain conditions are met, e.g. you are loading a version controlled file for the <i>Project</i> plugin. Also, many of the plugins listed here do not make a whole lot of sense in the context of RKWard.")));
+	vbox->addWidget(RKCommonFunctions::wordWrappedLabel(i18n("<p>Kate plugins to load in RKWard. Note that some loaded plugins will not become visible until certain conditions are met, e.g. you are loading a version controlled file for the <i>Project</i> plugin.</p><p>The plugins listed here have not been developed specifically for RKWard, and several do not make a whole lot of sense in the context of RKWard. Plugins shown in <b>bold</b> have been reported as \"useful\" by RKWard users.</p>")));
 
 	plugin_table = new QTreeWidget();
+	QFont boldfont = plugin_table->font();
+	boldfont.setBold(true);
 	plugin_table->setHeaderLabels(QStringList() << QString() << i18n("Name") << i18n("Description"));
 	KatePluginIntegrationApp *pluginapp = RKWardMainWindow::getMain()->katePluginIntegration();
 	foreach (const QString &key, pluginapp->known_plugins.keys()) {
 		QTreeWidgetItem *item = new QTreeWidgetItem();
 		KPluginMetaData plugindata = pluginapp->known_plugins.value(key).data;
 		item->setData(1, Qt::DisplayRole, plugindata.name());
+		if (recommended_plugins.contains(key)) item->setData(1, Qt::FontRole, boldfont); 
 		item->setData(2, Qt::DisplayRole, plugindata.description());
 		item->setData(1, Qt::DecorationRole, QIcon::fromTheme(plugindata.iconName()));
 		item->setData(1, Qt::UserRole, key);
diff --git a/rkward/windows/katepluginintegration.cpp b/rkward/windows/katepluginintegration.cpp
index 7179baf6..bd42838b 100644
--- a/rkward/windows/katepluginintegration.cpp
+++ b/rkward/windows/katepluginintegration.cpp
@@ -63,9 +63,6 @@ KatePluginIntegrationApp::KatePluginIntegrationApp(QObject *parent) : QObject (p
 		info.data = plugins[i];
 		// Note: creates a lookup-table *and* eliminates potential dupes later in the search path
 		known_plugins.insert(idForPlugin(info.data), info);
-
-		// TODO: remove me
-		qDebug ("%s", qPrintable(info.data.fileName()));
 	}
 	// NOTE: Destructor is too late for this, esp. As plugin destructors will try to unregister from the guiFactory(), and such.
 	connect(RKWardMainWindow::getMain(), &RKWardMainWindow::aboutToQuitRKWard, this, &KatePluginIntegrationApp::saveConfigAndUnload);



More information about the rkward-tracker mailing list