Bug 85215 - When opening another instance, no change of encoding is possible
Summary: When opening another instance, no change of encoding is possible
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: kwrite (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 92254 (view as bug list)
Depends on:
Blocks:
 
Reported: 2004-07-15 01:41 UTC by Gerrit Visscher
Modified: 2004-11-25 12:16 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Gerrit Visscher 2004-07-15 01:41:53 UTC
Version:           4.2 (using KDE 3.2.91 (3.3 beta1), SuSE)
Compiler:          gcc version 3.3.3 (SuSE Linux)
OS:                Linux (i686) release 2.6.5-7.95-default

When kwrite has opened a textfile e.g. in iso-8859-15 and opens a new instance (I clicked on "Open file") kwrite ignores the Dropdown-field in the Open-Dialog. The second file will display in iso-8859-15, too. It is possible to change the encoding afterwards. (I only tried this with iso-8859-15 and UTF-8).
Comment 1 Christoph Cullmann 2004-11-25 00:21:32 UTC
CVS commit by cullmann: 

BUG: 85215
anders: could you backport

CCMAIL: kwrite-devel@kde.org


  M +1 -1      katedocmanager.cpp   1.74
  M +1 -1      kwritemain.cpp   1.107


--- kdebase/kate/app/katedocmanager.cpp  #1.73:1.74
@@ -235,5 +235,5 @@ Kate::Document *KateDocManager::openURL 
     Kate::Document* doc = documentList().getFirst();
 
-    doc->setEncoding(encoding.isNull() ? Kate::Document::defaultEncoding() : encoding);
+    doc->setEncoding(encoding);
 
     if (!loadMetaInfos(doc, url))

--- kdebase/kate/app/kwritemain.cpp  #1.106:1.107
@@ -261,5 +261,5 @@ void KWrite::slotOpen( const KURL& url )
   {
     KWrite *t = new KWrite();
-    if (KTextEditor::encodingInterface(m_view->document())) KTextEditor::encodingInterface(m_view->document())->setEncoding(encoding);
+    if (KTextEditor::encodingInterface(t->m_view->document())) KTextEditor::encodingInterface(t->m_view->document())->setEncoding(encoding);
     t->loadURL(url);
   }


Comment 2 Christoph Cullmann 2004-11-25 00:26:21 UTC
*** Bug 92254 has been marked as a duplicate of this bug. ***
Comment 3 Anders Lund 2004-11-25 12:16:40 UTC
CVS commit by alund: 

Backport for Cullmann
CCBUG: 85215


  M +1 -1      katedocmanager.cpp   1.64.2.1
  M +1 -1      kwritemain.cpp   1.103.2.1


--- kdebase/kate/app/katedocmanager.cpp  #1.64:1.64.2.1
@@ -227,5 +227,5 @@ Kate::Document *KateDocManager::openURL 
     Kate::Document* doc = documentList().getFirst();
 
-    doc->setEncoding(encoding.isNull() ? Kate::Document::defaultEncoding() : encoding);
+    doc->setEncoding(encoding);
 
     if (!loadMetaInfos(doc, url))

--- kdebase/kate/app/kwritemain.cpp  #1.103:1.103.2.1
@@ -261,5 +261,5 @@ void KWrite::slotOpen( const KURL& url )
   {
     KWrite *t = new KWrite();
-    if (KTextEditor::encodingInterface(m_view->document())) KTextEditor::encodingInterface(m_view->document())->setEncoding(encoding);
+    if (KTextEditor::encodingInterface(t->m_view->document())) KTextEditor::encodingInterface(t->m_view->document())->setEncoding(encoding);
     t->loadURL(url);
   }