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

List:       kde-commits
Subject:    KDE_3_1_BRANCH: kdeutils/kedit
From:       Aaron J. Seigo <aseigo () olympusproject ! org>
Date:       2003-06-30 23:35:16
[Download RAW message or body]

CVS commit by aseigo: 

backport session management fix


  M +24 -23    kedit.cpp   1.165.2.5


--- kdeutils/kedit/kedit.cpp  #1.165.2.4:1.165.2.5
@@ -292,29 +291,31 @@ void TopLevel::readProperties(KConfig* c
     int line = config->readNumEntry("current_line", 0);
     int col = config->readNumEntry("current_column", 0);
+    int result = KEDIT_RETRY;
 
-    if(!filename.isEmpty() && modified){
-        int result = openFile(filename, OPEN_READWRITE, url.fileEncoding());
-        if (result == KEDIT_OK)
+    if(!filename.isEmpty())
         {
-          m_url = url;
-          eframe->setModified(TRUE);
-          eframe->setCursorPosition(line, col);
-          setFileCaption();
-          statusbar_slot();
+        if (modified)
+        {
+            result = openFile(filename, OPEN_READWRITE, url.fileEncoding());
         }
+        else
+        {
+            result = openFile(filename, OPEN_READWRITE, url.fileEncoding());
+        }
+    }
+    else
+    {
+        openURL(url, OPEN_READWRITE);
+        modified = false;
+        result = KEDIT_OK;
     }
-    else{
 
-      if(!filename.isEmpty()){
-        int result = openFile(filename, OPEN_READWRITE, url.fileEncoding());
         if (result == KEDIT_OK)
         {
           m_url = url;
-          eframe->setModified(false);
+        eframe->setModified(modified);
           eframe->setCursorPosition(line, col);
           setFileCaption();
           statusbar_slot();
-        }
-      }
     }
 }


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

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