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

List:       kde-commits
Subject:    [lokalize/Applications/16.04] /: CCBUG: 368842
From:       Nick Shaforostoff <shafff () ukr ! net>
Date:       2016-11-20 17:40:39
Message-ID: E1c8W6Z-0006z1-Rw () code ! kde ! org
[Download RAW message or body]

Git commit 70662d13782654a2dc9802d835fd26ae99b7fe00 by Nick Shaforostoff.
Committed on 20/11/2016 at 17:39.
Pushed by shaforo into branch 'Applications/16.04'.

CCBUG: 368842
pass also the filename to file save dialog

M  +2    -2    scripts/xliff2odf-standalone.py
M  +1    -1    src/editortab.cpp

http://commits.kde.org/lokalize/70662d13782654a2dc9802d835fd26ae99b7fe00

diff --git a/scripts/xliff2odf-standalone.py b/scripts/xliff2odf-standalone.py
index 88cb61c..8ce2a4f 100644
--- a/scripts/xliff2odf-standalone.py
+++ b/scripts/xliff2odf-standalone.py
@@ -26,10 +26,10 @@ def show_in_ooo(odfpathname,entryid):
             try:ctx = establish_connection()
             except: continue
             break
-    print ("file://"+odfpathname)
+    print (uno.systemPathToFileUrl(odfpathname))
     
     desktop = ctx.ServiceManager.createInstanceWithContext( \
                "com.sun.star.frame.Desktop",ctx)
-    model = desktop.loadComponentFromURL( "file://"+odfpathname,"_default", 0, () )
+    model = desktop.loadComponentFromURL( \
uno.systemPathToFileUrl(odfpathname),"_default", 0, () )  
     dispatcher = ctx.ServiceManager.createInstanceWithContext( \
                "com.sun.star.frame.DispatchHelper",ctx)
     dispatcher.executeDispatch(model.getCurrentController().getFrame(),".uno:Reload","",0,())
                
diff --git a/src/editortab.cpp b/src/editortab.cpp
index 4ab252c..4573b8c 100644
--- a/src/editortab.cpp
+++ b/src/editortab.cpp
@@ -938,7 +938,7 @@ bool EditorTab::fileOpen(QString filePath, QString \
suggestedDirPath, bool silent  bool EditorTab::saveFileAs()
 {
     QString filePath=QFileDialog::getSaveFileName(this, i18nc("@title:window", "Save \
                File As"),
-                                             \
QFileInfo(m_catalog->url()).absolutePath(), m_catalog->fileType()); +                 \
QFileInfo(m_catalog->url()).absoluteFilePath(), m_catalog->fileType());  if \
                (filePath.isEmpty()) return false;
     if (!Catalog::extIsSupported(filePath)&&m_catalog->url().contains('.'))
         filePath+=m_catalog->url().midRef(m_catalog->url().lastIndexOf('.'));


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

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