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

List:       kde-commits
Subject:    QUANTA_3_1_BRANCH: quanta
From:       Andras Mantia <amantia () freemail ! hu>
Date:       2003-06-06 14:06:45
[Download RAW message or body]

CVS commit by amantia: 

Backports:  fix doctype line insertion and modification.


  M +2 -0      ChangeLog   1.90.2.75
  M +1 -1      quanta/document.cpp   1.89.2.10
  M +5 -5      quanta/quantaview_slots.cpp   1.66.2.6


--- quanta/ChangeLog  #1.90.2.74:1.90.2.75
@@ -8,4 +8,6 @@
     - show the directory on the remote PC when using Save As for remote files,
       instead trying to switch to the file on the local disc
+    - don't break the doctype line when changing the DTD
+    - insert valid doctype line when using the Quick Start button
               
   - usability enhancements:

--- quanta/quanta/document.cpp  #1.89.2.9:1.89.2.10
@@ -544,5 +544,5 @@ void Document::changeTag(Tag *tag, QDict
   tagStr = "<"+QuantaCommon::tagCase(tag->name)+tagStr;
 
-  if ( qTag && qTag->parentDTD->singleTagStyle == "xml" &&
+  if ( dict && !dict->isEmpty() && qTag && qTag->parentDTD->singleTagStyle == "xml" \
                &&
        (qTag->isSingle() || (!qConfig.closeOptionalTags && qTag->isOptional()))
      )

--- quanta/quanta/quantaview_slots.cpp  #1.66.2.5:1.66.2.6
@@ -251,8 +251,8 @@ void QuantaView::slotTagQuickStart(){
    {
     const QString chset = QTextCodec::codecForLocale()->mimeName();
-    QString s = dtds->find(DEFAULT_DTD)->url;
-    if (!s.isEmpty()) s = "\n\t\t\"" + s + "\"";
-        QString tag = QString("<!DOCTYPE HTML PUBLIC \
                \""+DEFAULT_DTD+s+"\">\n")+QuantaCommon::tagCase("<html>\n")
-                          \
+space+QuantaCommon::tagCase("<head>\n")+space+QuantaCommon::tagCase("  <title>"); +
+    DTDStruct *dtd = write()->defaultDTD();
+    QString tag = QString("<!DOCTYPE" + dtd->doctypeStr \
+">\n")+QuantaCommon::tagCase("<html>\n") +                          + space + \
QuantaCommon::tagCase("<head>\n")+ space + QuantaCommon::tagCase("  <title>");  if ( \
!QString(quickDlg->lineTitle->text()).isEmpty())  tag += quickDlg->lineTitle->text();


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

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