[prev in list] [next in list] [prev in thread] [next in thread] 

List:       quanta-devel
Subject:    [quanta-devel] kdewebdev/quanta
From:       Andras Mantia <amantia () kde ! org>
Date:       2005-02-28 18:18:31
Message-ID: 20050228181831.520B2148A2 () office ! kde ! org
[Download RAW message or body]

CVS commit by amantia: 

Link DTEPs with documentation packages, so the context help in HTML will not bring up \
                the documentation in PHP. Needs modified documentation packages to \
                work correctly.
CCMAIL: quanta-devel@kde.org


  M +1 -0      data/dtep/html/description.rc   1.36
  M +1 -0      data/dtep/html-frameset/description.rc   1.17
  M +2 -0      data/dtep/html-strict/description.rc   1.20
  M +1 -0      data/dtep/php/description.rc   1.41
  M +1 -0      data/dtep/xhtml/description.rc   1.24
  M +1 -0      data/dtep/xhtml-basic/description.rc   1.14
  M +1 -0      data/dtep/xhtml-frameset/description.rc   1.14
  M +1 -0      data/dtep/xhtml-strict/description.rc   1.17
  M +1 -0      data/dtep/xhtml11/description.rc   1.13
  M +1 -0      parsers/qtag.h   1.65
  M +1 -0      src/dtds.cpp   1.43
  M +2 -1      src/quanta.cpp   1.714
  M +8 -3      treeviews/doctreeview.cpp   1.32
  M +1 -1      treeviews/doctreeview.h   1.15


--- kdewebdev/quanta/data/dtep/html/description.rc  #1.35:1.36
@@ -8,4 +8,5 @@
 NumOfPages = 2
 CaseSensitive = false
+Documentation = HTML
 
 [Toolbars]

--- kdewebdev/quanta/data/dtep/html-frameset/description.rc  #1.16:1.17
@@ -9,4 +9,5 @@
 NumOfPages = 2
 CaseSensitive = false
+Documentation = HTML
 
 [Toolbars]

--- kdewebdev/quanta/data/dtep/html-strict/description.rc  #1.19:1.20
@@ -8,4 +8,6 @@
 NumOfPages = 2
 CaseSensitive = false
+Documentation = HTML
+
 
 [Toolbars]

--- kdewebdev/quanta/data/dtep/php/description.rc  #1.40:1.41
@@ -5,4 +5,5 @@
 CaseSensitive = true
 Family = 2
+Documentation = PHP
 
 [Extra tags]

--- kdewebdev/quanta/data/dtep/xhtml/description.rc  #1.23:1.24
@@ -8,4 +8,5 @@
 NumOfPages = 4
 CaseSensitive = true
+Documentation = HTML
 
 [Toolbars]

--- kdewebdev/quanta/data/dtep/xhtml-basic/description.rc  #1.13:1.14
@@ -8,4 +8,5 @@
 NumOfPages = 1
 CaseSensitive = true
+Documentation = HTML
 
 [Toolbars]

--- kdewebdev/quanta/data/dtep/xhtml-frameset/description.rc  #1.13:1.14
@@ -8,4 +8,5 @@
 NumOfPages = 4
 CaseSensitive = true
+Documentation = HTML
 
 [Toolbars]

--- kdewebdev/quanta/data/dtep/xhtml-strict/description.rc  #1.16:1.17
@@ -8,4 +8,5 @@
 NumOfPages = 4
 CaseSensitive = true
+Documentation = HTML
 
 [Toolbars]

--- kdewebdev/quanta/data/dtep/xhtml11/description.rc  #1.12:1.13
@@ -8,4 +8,5 @@
 NumOfPages = 3
 CaseSensitive = true
+Documentation = HTML
 
 [Toolbars]

--- kdewebdev/quanta/parsers/qtag.h  #1.64:1.65
@@ -101,4 +101,5 @@ typedef struct DTDStruct
      int family;                      ///< xml, script type
      bool toplevel;                   ///< true if the DTD can be the main DTD of a \
document. Always true for XML like DTD's +     QString documentation;           ///< \
                the name of the documentation package 
      QTagList* tagsList;              ///< the list of all defined tags in the DTD
      QString fileName;                ///< the DTD decription.rc with path

--- kdewebdev/quanta/src/dtds.cpp  #1.42:1.43
@@ -207,4 +207,5 @@ bool DTDs::readTagDir2(DTDStruct *dtd)
   dtd->doctypeStr.prepend(' ');
   dtd->inheritsTagsFrom = dtdConfig->readEntry("Inherits").lower();
+  dtd->documentation = dtdConfig->readEntry("Documentation").lower();
 
   dtd->defaultExtension = dtdConfig->readEntry("DefaultExtension", "html");

--- kdewebdev/quanta/src/quanta.cpp  #1.713:1.714
@@ -1704,5 +1704,6 @@ void QuantaApp::slotContextHelp()
            currentWord = w->currentWord();
         }
-        QString *url = dTab->contextHelp(currentWord);
+        const DTDStruct *dtd = w->currentDTD(true);
+        QString *url = dTab->contextHelp(dtd->documentation + "|" + currentWord);
         if (url)
             openDoc(*url);

--- kdewebdev/quanta/treeviews/doctreeview.cpp  #1.31:1.32
@@ -93,4 +93,5 @@ void DocTreeView::slotRefreshTree()
 
       QString relDocDir = config.readEntry("Doc dir");
+      QString name = config.readEntry("Name").lower();
 
       DocFolder *folder = new DocFolder(this, config.readEntry("Top Element"), \
&config , QDir::cleanDirPath(docDir+relDocDir)+"/"); @@ -108,5 +109,5 @@ void \
DocTreeView::slotRefreshTree()  QString keyword = list.at(i);
         QString *url = new QString(QDir::cleanDirPath(docDir + relDocDir + "/" + \
                config.readEntry( list.at(i) )));
-        contextHelpDict->insert( keyword, url );
+        contextHelpDict->insert( name + "|" + keyword, url );
       }
     }
@@ -134,7 +135,11 @@ void DocTreeView::clickItem( QListViewIt
 
 
-QString * DocTreeView::contextHelp( QString keyword )
+QString * DocTreeView::contextHelp(const QString &keyword)
 {
-  return contextHelpDict->find( keyword );
+  QString word = keyword.mid(keyword.find("|"));
+  if (contextHelpDict->find(keyword))
+    return contextHelpDict->find(keyword);
+  else
+    return contextHelpDict->find(word); //to support old documentation packages
 }
 

--- kdewebdev/quanta/treeviews/doctreeview.h  #1.14:1.15
@@ -40,5 +40,5 @@ public:
   ~DocTreeView();
 
-  QString *contextHelp(QString keyword);
+  QString *contextHelp(const QString &keyword);
 
 public slots:


_______________________________________________
quanta-devel mailing list
quanta-devel@kde.org
https://mail.kde.org/mailman/listinfo/quanta-devel


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic