summaryrefslogtreecommitdiffstats
path: root/parts/documentation/documentation_part.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'parts/documentation/documentation_part.cpp')
-rw-r--r--parts/documentation/documentation_part.cpp42
1 files changed, 30 insertions, 12 deletions
diff --git a/parts/documentation/documentation_part.cpp b/parts/documentation/documentation_part.cpp
index b0d59e24..3b9e9b78 100644
--- a/parts/documentation/documentation_part.cpp
+++ b/parts/documentation/documentation_part.cpp
@@ -33,6 +33,7 @@
#include <dcopclient.h>
#include <kiconloader.h>
#include <tdelocale.h>
+#include <tdemessagebox.h>
#include <ktrader.h>
#include <kdebug.h>
#include <tdeparts/componentfactory.h>
@@ -106,6 +107,7 @@ DocumentationPart::DocumentationPart(TQObject *parent, const char *name, const T
i18n("Documentation browser"));
setupActions();
+ checkLastVersion();
TQTimer::singleShot(5, this, TQT_SLOT(init()));
@@ -151,18 +153,6 @@ void DocumentationPart::loadDocumentationPlugins()
}
}
-void DocumentationPart::reloadDocumentationPlugins()
-{
- TQValueList<DocumentationPlugin*>::iterator it;
- for (it = m_plugins.begin(); it != m_plugins.end(); ++it)
- {
- DocumentationPlugin *plugin=*it;
- plugin->clear();
- plugin->autoSetupPlugin();
- plugin->reinit(m_widget->contents(), m_widget->index(), TQStringList());
- }
-}
-
void DocumentationPart::emitIndexSelected(IndexBox *indexBox)
{
if (!m_hasIndex)
@@ -774,4 +764,32 @@ void DocumentationPart::init( )
loadSettings();
}
+void DocumentationPart::checkLastVersion()
+{
+ // Check whether TDevelop is run for the first time under
+ // a new TDE version. If so displays a message to invite
+ // the user to update the documentation plugin lists
+ TDEConfig *config = DocumentationFactory::instance()->config();
+ TQString group = config->group();
+ config->setGroup("General");
+ TQString lastVersion = config->readEntry("Last version");
+ if (lastVersion != TDE_VERSION_STRING)
+ {
+ config->writeEntry("Last version", TDE_VERSION_STRING);
+ config->sync();
+ KMessageBox::information(m_widget,
+ i18n("It seems TDevelop is being run for the first time "
+ "under TDE version " TDE_VERSION_STRING ".\n"
+ "Some documentation catalogs may have changed "
+ "since the previous version, so we suggest "
+ "that you use the Rescan button in "
+ "Settings --> Configure TDevelop --> Documentation "
+ "to update the list of the available items.\n"
+ "This operation has not been automated to allow you "
+ "to preserve local changes that you may have made before."),
+ i18n("Rescan documentation"));
+ }
+ config->setGroup(group);
+}
+
#include "documentation_part.moc"