diff --git a/gui/nbrowserwindow.cpp b/gui/nbrowserwindow.cpp
index 4c22e177..5722dff0 100644
--- a/gui/nbrowserwindow.cpp
+++ b/gui/nbrowserwindow.cpp
@@ -960,37 +960,48 @@ void NBrowserWindow::pasteButtonPressed() {
if (urltext.toLower().mid(0,17) == "evernote:///view/") {
- urltext = urltext.mid(17);
- int pos = urltext.indexOf("/");
- urltext = urltext.mid(pos+1);
- pos = urltext.indexOf("/");
- urltext = urltext.mid(pos+1);
- pos = urltext.indexOf("/");
- urltext = urltext.mid(pos+1);
- pos = urltext.indexOf("/");
- QString guid = urltext.mid(0,pos);
- urltext = urltext.mid(pos);
- pos = urltext.indexOf("/");
- QString locguid = urltext.mid(pos);
-
- Note n;
- bool goodrc = false;
- NoteTable ntable(global.db);
- goodrc = ntable.get(n, guid,false, false);
- if (!goodrc)
- goodrc = ntable.get(n,locguid,false, false);
-
- // If we have a good return, then we can paste the link, otherwise we fall out
- // to a normal paste.
- if (goodrc) {
- QString url = QString("%3").arg(QApplication::clipboard()->text(), n.title, n.title);
- QLOG_DEBUG() << "HTML to insert:" << url;
- QString script = QString("document.execCommand('insertHtml', false, '%1');").arg(url);
- editor->page()->mainFrame()->evaluateJavaScript(script);
- return;
- } else {
- QLOG_ERROR() << "Error retrieving note";
+ QStringList urlList = urltext.split(" ");
+ QString url = "";
+ for (int i=0; i%3").arg(urlList[i], n.title, n.title);
+ QLOG_DEBUG() << "HTML to insert:" << url;
+ if (i+1 ";
+ } else {
+ if (urltext != "") {
+ QLOG_ERROR() << "Error retrieving note: " << urlList[i];
+ }
+ }
}
+ QLOG_DEBUG() << url;
+ QString script = QString("document.execCommand('insertHtml', false, '%1');").arg(url);
+ editor->page()->mainFrame()->evaluateJavaScript(script);
+ return;
}
}
diff --git a/gui/ntableview.cpp b/gui/ntableview.cpp
index 078e93fe..7e172324 100644
--- a/gui/ntableview.cpp
+++ b/gui/ntableview.cpp
@@ -924,19 +924,22 @@ void NTableView::copyNoteLink() {
Note note;
NoteTable ntable(global.db);
- ntable.get(note, lids[0], false, false);
-
- QString guid = "";
- if (note.guid.isSet())
- guid = note.guid;
- QString localid;
- if (!note.updateSequenceNum.isSet() || note.updateSequenceNum == 0) {
- syncneeded = true;
- localid = QString::number(lids[0]);
- } else
- localid = guid;
-
- QString lidUrl = "evernote:///view/" + userid +"/" +shard + "/" +guid + "/" +localid +"/";
+ QString lidUrl = "";
+ for (int i=0; i 0) {
+ QLOG_ERROR() << tr("Error removing file:") << f.RemoveError;
+ count--;
+ }
}
}