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

List:       kde-commits
Subject:    kdewebdev/quanta
From:       Andras Mantia <amantia () kde ! org>
Date:       2005-04-05 12:02:23
Message-ID: 20050405120223.AE22863E () office ! kde ! org
[Download RAW message or body]

CVS commit by amantia: 

Fix bookmark handling in context menu for untitled documents.


  M +2 -2      quanta.kdevelop   1.325
  M +12 -3     src/quanta.cpp   1.719
  M +7 -1      utility/quantabookmarks.cpp   1.6


--- kdewebdev/quanta/quanta.kdevelop  #1.324:1.325
@@ -239,8 +239,8 @@
   <kdevfilecreate>
     <filetypes>
-      <type icon="" ext="h" name="C++ header" create="template" >
+      <type icon="" ext="h" create="template" name="C++ header" >
         <descr>Quanta speicfic header</descr>
       </type>
-      <type icon="source_cpp" ext="cpp" name="C++ source" create="template" >
+      <type icon="source_cpp" ext="cpp" create="template" name="C++ source" >
         <descr>A new empty C++ file.</descr>
       </type>

--- kdewebdev/quanta/src/quanta.cpp  #1.718:1.719
@@ -1619,7 +1619,16 @@ void QuantaApp::setCursorPosition( int r
 void QuantaApp::gotoFileAndLine(const QString& filename, int line, int column)
 {
-  if ( !filename.isEmpty() )
+  if (!filename.isEmpty())
+  {
+    QuantaView* view = ViewManager::ref()->isOpened(KURL::fromPathOrURL(filename));
+    if (view)
+    {
+      view->activate();
+      view->activated();      
+    } else
+    {
     m_doc->openDocument( KURL::fromPathOrURL( filename ) );
-
+    }
+  }
   Document *w = ViewManager::ref()->activeDocument();
   if (w)

--- kdewebdev/quanta/utility/quantabookmarks.cpp  #1.5:1.6
@@ -373,6 +373,12 @@ void QuantaBookmarks::gotoLineNumber(int
   if (doc)
   {
+    if (doc->isUntitled())
+    {
+       emit gotoFileAndLine("file:" + doc->url().path(), line, 0);
+    } else
+    {
     emit gotoFileAndLine(doc->url().url(), line, 0);
   }     
+  }     
 }
 


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

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