SOURCES: kdebase-branch.diff - updated

arekm arekm at pld-linux.org
Tue Jan 17 16:09:38 CET 2006


Author: arekm                        Date: Tue Jan 17 15:09:38 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- updated

---- Files affected:
SOURCES:
   kdebase-branch.diff (1.22 -> 1.23) 

---- Diffs:

================================================================
Index: SOURCES/kdebase-branch.diff
diff -u SOURCES/kdebase-branch.diff:1.22 SOURCES/kdebase-branch.diff:1.23
--- SOURCES/kdebase-branch.diff:1.22	Sun Jan  8 23:33:18 2006
+++ SOURCES/kdebase-branch.diff	Tue Jan 17 16:09:32 2006
@@ -1,7 +1,7 @@
 Index: ksmserver/shutdown.h
 ===================================================================
---- ksmserver/shutdown.h	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ ksmserver/shutdown.h	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- ksmserver/shutdown.h	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ ksmserver/shutdown.h	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -1,87 +0,0 @@
 -/*****************************************************************
 -ksmserver - the KDE session management server
@@ -93,7 +93,7 @@
 Index: ksmserver/shutdowndlg.cpp
 ===================================================================
 --- ksmserver/shutdowndlg.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 0)
-+++ ksmserver/shutdowndlg.cpp	(.../branches/KDE/3.5/kdebase)	(revision 495788)
++++ ksmserver/shutdowndlg.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -0,0 +1,273 @@
 +/*****************************************************************
 +ksmserver - the KDE session management server
@@ -381,7 +381,7 @@
 Index: ksmserver/startup.cpp
 ===================================================================
 --- ksmserver/startup.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 0)
-+++ ksmserver/startup.cpp	(.../branches/KDE/3.5/kdebase)	(revision 495788)
++++ ksmserver/startup.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -0,0 +1,289 @@
 +/*****************************************************************
 +ksmserver - the KDE session management server
@@ -685,7 +685,7 @@
 Index: ksmserver/legacy.cpp
 ===================================================================
 --- ksmserver/legacy.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 0)
-+++ ksmserver/legacy.cpp	(.../branches/KDE/3.5/kdebase)	(revision 495788)
++++ ksmserver/legacy.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -0,0 +1,388 @@
 +/*****************************************************************
 +ksmserver - the KDE session management server
@@ -1087,8 +1087,8 @@
 
 Index: ksmserver/server.cpp
 ===================================================================
---- ksmserver/server.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ ksmserver/server.cpp	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- ksmserver/server.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ ksmserver/server.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -2,6 +2,7 @@
  ksmserver - the KDE session management server
  
@@ -2308,7 +2308,7 @@
 Index: ksmserver/shutdowndlg.h
 ===================================================================
 --- ksmserver/shutdowndlg.h	(.../tags/KDE/3.5.0/kdebase)	(revision 0)
-+++ ksmserver/shutdowndlg.h	(.../branches/KDE/3.5/kdebase)	(revision 495788)
++++ ksmserver/shutdowndlg.h	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -0,0 +1,88 @@
 +/*****************************************************************
 +ksmserver - the KDE session management server
@@ -2410,8 +2410,8 @@
 
 Index: ksmserver/shutdown.cpp
 ===================================================================
---- ksmserver/shutdown.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ ksmserver/shutdown.cpp	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- ksmserver/shutdown.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ ksmserver/shutdown.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -2,267 +2,514 @@
  ksmserver - the KDE session management server
  
@@ -3122,8 +3122,8 @@
 +}
 Index: ksmserver/server.h
 ===================================================================
---- ksmserver/server.h	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ ksmserver/server.h	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- ksmserver/server.h	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ ksmserver/server.h	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -33,37 +33,8 @@
  typedef QValueList<QCString> QCStringList;
  class KSMListener;
@@ -3211,7 +3211,7 @@
 Index: ksmserver/client.cpp
 ===================================================================
 --- ksmserver/client.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 0)
-+++ ksmserver/client.cpp	(.../branches/KDE/3.5/kdebase)	(revision 495788)
++++ ksmserver/client.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -0,0 +1,190 @@
 +/*****************************************************************
 +ksmserver - the KDE session management server
@@ -3415,8 +3415,8 @@
 
 Index: ksmserver/test.cpp
 ===================================================================
---- ksmserver/test.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ ksmserver/test.cpp	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- ksmserver/test.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ ksmserver/test.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -1,4 +1,4 @@
 -#include <shutdown.h>
 +#include "shutdowndlg.h"
@@ -3442,7 +3442,7 @@
 Index: ksmserver/client.h
 ===================================================================
 --- ksmserver/client.h	(.../tags/KDE/3.5.0/kdebase)	(revision 0)
-+++ ksmserver/client.h	(.../branches/KDE/3.5/kdebase)	(revision 495788)
++++ ksmserver/client.h	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -0,0 +1,60 @@
 +/*****************************************************************
 +ksmserver - the KDE session management server
@@ -3516,8 +3516,8 @@
 
 Index: ksmserver/Makefile.am
 ===================================================================
---- ksmserver/Makefile.am	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ ksmserver/Makefile.am	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- ksmserver/Makefile.am	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ ksmserver/Makefile.am	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -22,11 +22,13 @@
  bin_PROGRAMS =
  lib_LTLIBRARIES =
@@ -3545,8 +3545,8 @@
  	$(XGETTEXT) *.cpp -o $(podir)/ksmserver.pot
 Index: ksmserver/server2.h
 ===================================================================
---- ksmserver/server2.h	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ ksmserver/server2.h	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- ksmserver/server2.h	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ ksmserver/server2.h	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -12,3 +12,5 @@
  #include <X11/SM/SM.h>
  #include <X11/SM/SMlib.h>
@@ -3555,8 +3555,8 @@
 +#include <fixx11h.h>
 Index: debian/local/kdm.options.5
 ===================================================================
---- debian/local/kdm.options.5	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ debian/local/kdm.options.5	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- debian/local/kdm.options.5	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ debian/local/kdm.options.5	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -13,8 +13,8 @@
  .\"
  .\" You should have received a copy of the GNU General Public License with
@@ -3568,10 +3568,109 @@
  .TH kdm.options 5 "2003\-09\-18" "Debian Project"
  .SH NAME
  kdm.options \- configuration options for X display manager
+Index: kate/app/katedocmanager.cpp
+===================================================================
+--- kate/app/katedocmanager.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ kate/app/katedocmanager.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
+@@ -39,6 +39,7 @@
+ #include <kmdcodec.h>
+ #include <kmessagebox.h>
+ #include <kencodingfiledialog.h>
++#include <kio/job.h>
+ 
+ #include <qdatetime.h>
+ #include <qtextcodec.h>
+@@ -229,7 +230,7 @@
+   return findDocumentByUrl (url) != 0;
+ }
+ 
+-Kate::Document *KateDocManager::openURL (const KURL& url,const QString &encoding, uint *id)
++Kate::Document *KateDocManager::openURL (const KURL& url,const QString &encoding, uint *id, bool isTempFile)
+ {
+   // special handling if still only the first initial doc is there
+   if (!documentList().isEmpty() && (documentList().count() == 1) && (!documentList().at(0)->isModified() && documentList().at(0)->url().isEmpty()))
+@@ -244,12 +245,22 @@
+     if (id)
+       *id=doc->documentNumber();
+ 
++    if ( isTempFile && !url.isEmpty() && url.isLocalFile() )
++    {
++      QFileInfo fi( url.path() );
++      if ( fi.exists() )
++      {
++        m_tempFiles[ doc->documentNumber() ] = qMakePair(url, fi.lastModified());
++        kdDebug(13001)<<"temporary file will be deleted after use unless modified: "<<url.prettyURL()<<endl;
++      }
++    }
++
+     connect(doc, SIGNAL(modStateChanged(Kate::Document *)), this, SLOT(slotModChanged(Kate::Document *)));
+ 
+     emit initialDocumentReplaced();
+ 
+     return doc;
+- }
++  }
+ 
+   Kate::Document *doc = findDocumentByUrl (url);
+   if ( !doc )
+@@ -265,6 +276,16 @@
+   if (id)
+     *id=doc->documentNumber();
+ 
++  if ( isTempFile && !url.isEmpty() && url.isLocalFile() )
++  {
++    QFileInfo fi( url.path() );
++    if ( fi.exists() )
++    {
++      m_tempFiles[ doc->documentNumber() ] = qMakePair(url, fi.lastModified());
++      kdDebug(13001)<<"temporary file will be deleted after use unless modified: "<<url.prettyURL()<<endl;
++    }
++  }
++
+   return doc;
+ }
+ 
+@@ -284,6 +305,23 @@
+     KateApp::self()->mainWindow(i)->viewManager()->closeViews(documentNumber);
+   }
+ 
++  if ( closeURL && m_tempFiles.contains( documentNumber ) )
++  {
++    QFileInfo fi( m_tempFiles[ documentNumber ].first.path() );
++    if ( fi.lastModified() <= m_tempFiles[ documentNumber ].second /*||
++         KMessageBox::questionYesNo( KateApp::self()->activeMainWindow(),
++            i18n("The supposedly temporary file %1 has been modified. "
++                "Do you want to delete it anyway?").arg(m_tempFiles[ documentNumber ].first.prettyURL()),
++            i18n("Delete File?") ) == KMessageBox::Yes*/ )
++    {
++      KIO::del( m_tempFiles[ documentNumber ].first, false, false );
++      kdDebug(13001)<<"Deleted temporary file "<<m_tempFiles[ documentNumber ].first<<endl;
++      m_tempFiles.remove( documentNumber );
++    }
++    else
++      kdWarning(13001)<<"The supposedly temporary file "<<m_tempFiles[ documentNumber ].first.prettyURL()<<" have been modified since loaded, and has not been deleted."<<endl;
++  }
++
+   deleteDoc (doc);
+ 
+   // never ever empty the whole document list
 Index: kate/app/kateviewmanager.cpp
 ===================================================================
---- kate/app/kateviewmanager.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ kate/app/kateviewmanager.cpp	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- kate/app/kateviewmanager.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ kate/app/kateviewmanager.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
+@@ -403,10 +403,10 @@
+   KateDocManager::self()->closeDocument (activeView()->getDoc());
+ }
+ 
+-uint KateViewManager::openURL (const KURL &url, const QString& encoding, bool activate)
++uint KateViewManager::openURL (const KURL &url, const QString& encoding, bool activate, bool isTempFile )
+ {
+   uint id = 0;
+-  Kate::Document *doc = KateDocManager::self()->openURL (url, encoding, &id);
++  Kate::Document *doc = KateDocManager::self()->openURL (url, encoding, &id, isTempFile );
+ 
+   if (!doc->url().isEmpty())
+     m_mainWindow->fileOpenRecent->addURL( doc->url() );
 @@ -462,9 +462,17 @@
  /**
   * session config functions
@@ -3612,8 +3711,8 @@
    int activeOne=config->readNumEntry("Active ViewSpaceContainer",0);
 Index: kate/app/kwritemain.cpp
 ===================================================================
---- kate/app/kwritemain.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ kate/app/kwritemain.cpp	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- kate/app/kwritemain.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ kate/app/kwritemain.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -173,7 +173,7 @@
    a=KStdAction::keyBindings(this, SLOT(editKeys()), actionCollection());
    a->setWhatsThis(i18n("Configure the application's keyboard shortcut assignments."));
@@ -3670,10 +3769,40 @@
  	KDialogBase::slotOk();
  }
 +// kate: space-indent on; indent-width 2; replace-tabs on; mixed-indent off;
+Index: kate/app/kateappIface.cpp
+===================================================================
+--- kate/app/kateappIface.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ kate/app/kateappIface.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
+@@ -71,9 +71,14 @@
+ 
+ bool KateAppDCOPIface::openURL (KURL url, QString encoding)
+ {
+-  return m_app->openURL (url, encoding);
++  return m_app->openURL (url, encoding, false);
+ }
+ 
++bool KateAppDCOPIface::openURL (KURL url, QString encoding, bool isTempFile)
++{
++  return m_app->openURL (url, encoding, isTempFile);
++}
++
+ bool KateAppDCOPIface::setCursor (int line, int column)
+ {
+   return m_app->setCursor (line, column);
+@@ -91,4 +96,9 @@
+   return true;
+ }
+ 
++const QString & KateAppDCOPIface::session() const
++{
++  return m_app->sessionManager()->activeSession()->sessionName();
++}
++
+ // kate: space-indent on; indent-width 2; replace-tabs on;
 Index: kate/app/kateapp.cpp
 ===================================================================
---- kate/app/kateapp.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ kate/app/kateapp.cpp	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- kate/app/kateapp.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ kate/app/kateapp.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -161,7 +161,7 @@
    {
      sessionManager()->activateSession (sessionManager()->giveSession (m_args->getOption("start")), false, false);
@@ -3683,10 +3812,52 @@
    {
      // let the user choose session if possible
      if (!sessionManager()->chooseSession ())
+@@ -181,6 +181,8 @@
+ 
+   QTextCodec *codec = m_args->isSet("encoding") ? QTextCodec::codecForName(m_args->getOption("encoding")) : 0;
+ 
++  bool tempfileSet = KCmdLineArgs::isTempFileSet();
++
+   Kate::Document::setOpenErrorDialogsActivated (false);
+   uint id = 0;
+   for (int z=0; z<m_args->count(); z++)
+@@ -192,9 +194,9 @@
+     {
+       // open a normal file
+       if (codec)
+-        id = activeMainWindow()->viewManager()->openURL( m_args->url(z), codec->name(), false );
++        id = activeMainWindow()->viewManager()->openURL( m_args->url(z), codec->name(), false, tempfileSet );
+       else
+-        id = activeMainWindow()->viewManager()->openURL( m_args->url(z), QString::null, false );
++        id = activeMainWindow()->viewManager()->openURL( m_args->url(z), QString::null, false, tempfileSet );
+     }
+     else
+       KMessageBox::sorry( activeMainWindow(),
+@@ -286,7 +288,7 @@
+   return m_sessionManager;
+ }
+ 
+-bool KateApp::openURL (const KURL &url, const QString &encoding)
++bool KateApp::openURL (const KURL &url, const QString &encoding, bool isTempFile)
+ {
+   KateMainWindow *mainWindow = activeMainWindow ();
+ 
+@@ -304,9 +306,9 @@
+   {
+     // open a normal file
+     if (codec)
+-      mainWindow->viewManager()->openURL( url, codec->name());
++      mainWindow->viewManager()->openURL( url, codec->name(), true, isTempFile );
+     else
+-      mainWindow->viewManager()->openURL( url, QString::null );
++      mainWindow->viewManager()->openURL( url, QString::null, true, isTempFile );
+   }
+   else
+     KMessageBox::sorry( mainWindow,
 Index: kate/app/katemainwindow.h
 ===================================================================
---- kate/app/katemainwindow.h	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ kate/app/katemainwindow.h	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- kate/app/katemainwindow.h	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ kate/app/katemainwindow.h	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -143,6 +143,7 @@
  
      void slotFileQuit();
@@ -3697,8 +3868,8 @@
      void documentMenuAboutToShow();
 Index: kate/app/katemain.cpp
 ===================================================================
---- kate/app/katemain.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ kate/app/katemain.cpp	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- kate/app/katemain.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ kate/app/katemain.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -26,6 +26,7 @@
  #include <kglobal.h>
  #include <kconfig.h>
@@ -3707,7 +3878,38 @@
  #include <dcopclient.h>
  #include <dcopref.h>
  #include <kdebug.h>
-@@ -137,6 +138,8 @@
+@@ -98,6 +99,7 @@
+   // command line args init and co
+   KCmdLineArgs::init (argc, argv, &aboutData);
+   KCmdLineArgs::addCmdLineOptions (options);
++  KCmdLineArgs::addTempFileOption();
+   KateApp::addCmdLineOptions ();
+ 
+   // get our command line args ;)
+@@ -121,6 +123,22 @@
+       if (client.isApplicationRegistered(tryApp))
+         kateApp = tryApp;
+     }
++    else if ( args->isSet("start") )
++    {
++      for (unsigned int i=0; i < allClients.count(); i++)
++      {
++        if (allClients[i] == "kate" || allClients[i].left(5) == "kate-")
++        {
++          DCOPRef ref( allClients[i], "KateApplication" );
++          QString s = ref.call( "session" );
++          if ( QString(args->getOption("start")) == s )
++          {
++            kateApp = allClients[i];
++            break;
++          }
++        }
++      }
++    }
+     else
+     {
+       for (unsigned int i=0; i < allClients.count(); ++i)
+@@ -137,6 +155,8 @@
      if (!kateApp.isEmpty())
      {
        kdDebug () << "kate app: " << kateApp << endl;
@@ -3716,7 +3918,19 @@
  
        DCOPRef kRef (kateApp, "KateApplication");
  
-@@ -189,6 +192,24 @@
+@@ -145,8 +165,10 @@
+ 
+       QString enc = args->isSet("encoding") ? args->getOption("encoding") : QCString("");
+ 
++      bool tempfileSet = KCmdLineArgs::isTempFileSet();
++
+       for (int z=0; z<args->count(); z++)
+-        kRef.call( "openURL", args->url(z), enc );
++        kRef.call( "openURL", args->url(z), enc, tempfileSet );
+ 
+       if( args->isSet( "stdin" ) )
+       {
+@@ -189,6 +211,24 @@
        if (nav)
           kRef.call( "setCursor", line, column );
  
@@ -3741,7 +3955,7 @@
        return 0;
      }
    }
-@@ -198,8 +219,12 @@
+@@ -198,8 +238,12 @@
  
    // app execution should already end :)
    if (app.shouldExit())
@@ -3756,8 +3970,8 @@
 +// kate: space-indent on; indent-width 2; replace-tabs on; mixed-indent off;
 Index: kate/app/kateexternaltools.cpp
 ===================================================================
---- kate/app/kateexternaltools.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ kate/app/kateexternaltools.cpp	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- kate/app/kateexternaltools.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ kate/app/kateexternaltools.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -308,13 +308,8 @@
  
  void KateExternalToolsMenuAction::reload()
@@ -3773,10 +3987,62 @@
  
    // load all the tools, and create a action for each of them
    KConfig *config = new KConfig( "externaltools", false, false, "appdata" );
+Index: kate/app/katedocmanager.h
+===================================================================
+--- kate/app/katedocmanager.h	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ kate/app/katedocmanager.h	(.../branches/KDE/3.5/kdebase)	(revision 499311)
+@@ -30,6 +30,8 @@
+ #include <qobject.h>
+ #include <qptrdict.h>
+ #include <qintdict.h>
++#include <qmap.h>
++#include <qpair.h>
+ 
+ namespace KParts { class Factory; }
+ 
+@@ -49,6 +51,8 @@
+     unsigned char modifiedOnDiscReason;
+ };
+ 
++typedef QPair<KURL,QDateTime> TPair;
++
+ class KateDocManager : public QObject
+ {
+   Q_OBJECT
+@@ -89,7 +93,7 @@
+ 
+     QPtrList<Kate::Document> &documentList () { return m_docList; };
+ 
+-    Kate::Document *openURL(const KURL&,const QString &encoding=QString::null,uint *id =0);
++    Kate::Document *openURL(const KURL&,const QString &encoding=QString::null,uint *id =0,bool isTempFile=false);
+ 
+     bool closeDocument(class Kate::Document *,bool closeURL=true);
+     bool closeDocument(uint);
+@@ -136,6 +140,7 @@
+     QPtrList<Kate::Document> m_docList;
+     QIntDict<Kate::Document> m_docDict;
+     QPtrDict<KateDocumentInfo> m_docInfos;
++    QMap<uint,TPair> m_tempFiles;
+     QGuardedPtr<Kate::Document> m_currentDoc;
+     KConfig *m_metaInfos;
+     bool m_saveMetaInfos;
+Index: kate/app/kateviewmanager.h
+===================================================================
+--- kate/app/kateviewmanager.h	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ kate/app/kateviewmanager.h	(.../branches/KDE/3.5/kdebase)	(revision 499311)
+@@ -65,7 +65,7 @@
+     /* restore it */
+     void restoreViewConfiguration (KConfig *config,const QString& group);
+ 
+-    uint openURL (const KURL &url, const QString& encoding, bool activate = true);
++    uint openURL (const KURL &url, const QString& encoding, bool activate = true, bool isTempFile=false);
+ 
+   public slots:
+     void openURL (const KURL &url);
 Index: kate/app/kwritemain.h
 ===================================================================
---- kate/app/kwritemain.h	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ kate/app/kwritemain.h	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- kate/app/kwritemain.h	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ kate/app/kwritemain.h	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -69,6 +69,9 @@
      void editToolbars();
      void changeEditor();
@@ -3794,8 +4060,8 @@
 +// kate: space-indent on; indent-width 2; replace-tabs on; mixed-indent off;
 Index: kate/app/katemainwindow.cpp
 ===================================================================
---- kate/app/katemainwindow.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 495788)
-+++ kate/app/katemainwindow.cpp	(.../branches/KDE/3.5/kdebase)	(revision 495788)
+--- kate/app/katemainwindow.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ kate/app/katemainwindow.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
 @@ -177,11 +177,11 @@
  
    readOptions();
@@ -3873,10 +4139,153 @@
  }
  
  void KateMainWindow::pluginHelp()
+@@ -812,7 +818,14 @@
+     c = m_viewManager->activeView()->getDoc()->url().prettyURL();
+   }
+ 
+-  setCaption( KStringHandler::lsqueeze(c,64), m_viewManager->activeView()->getDoc()->isModified());
++  QString sessName = KateApp::self()->sessionManager()->activeSession()->sessionName();
++  if ( !sessName.isEmpty() )
++    sessName = QString(" (%1)").arg( sessName );
++
++  setPlainCaption( KateApp::self()->makeStdCaption(
++      KStringHandler::lsqueeze(c,64), true,
++      m_viewManager->activeView()->getDoc()->isModified()
++                                                  )+sessName);
+ }
+ 
+ void KateMainWindow::saveProperties(KConfig *config)
+Index: kate/app/kateappIface.h
+===================================================================
+--- kate/app/kateappIface.h	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ kate/app/kateappIface.h	(.../branches/KDE/3.5/kdebase)	(revision 499311)
+@@ -52,6 +52,14 @@
+     bool openURL (KURL url, QString encoding);
+ 
+     /**
++     * Like the above, but adds an option to let the documentManager know
++     * if the file should be deleted when closed.
++     * @p isTempFile should be set to true with the --tempfile option set ONLY,
++     * files opened with this set to true will be deleted when closed.
++     */
++    bool openURL(KURL url, QString encoding, bool isTempFile);
++
++    /**
+      * set cursor of active view in active main window
+      * @param line line for cursor
+      * @param column column for cursor
+@@ -74,6 +82,11 @@
+      */
+     bool activateSession (QString session);
+ 
++    /**
++     * @return the name of the active session
++     */
++    const QString & session() const;
++
+   private:
+     KateApp *m_app;
+ };
+Index: kate/app/katesession.cpp
+===================================================================
+--- kate/app/katesession.cpp	(.../tags/KDE/3.5.0/kdebase)	(revision 499311)
++++ kate/app/katesession.cpp	(.../branches/KDE/3.5/kdebase)	(revision 499311)
+@@ -43,6 +43,7 @@
+ #include <qhbox.h>
+ #include <qcheckbox.h>
+ #include <qdatetime.h>
++#include <qmap.h>
+ 
+ #include <unistd.h>
<<Diff was trimmed, longer than 597 lines>>

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/kdebase-branch.diff?r1=1.22&r2=1.23&f=u



More information about the pld-cvs-commit mailing list