From 283960f33ee82bea39d8af2aeeb43bc0796846c2 Mon Sep 17 00:00:00 2001 From: nowrep Date: Mon, 10 Feb 2014 17:51:52 +0100 Subject: [PATCH] [Bookmarks] Added default bookmarks.json file Default browsedata.db now also contains icons for default bookmarks. --- src/lib/bookmarks/bookmarkstoolbarbutton.cpp | 3 + src/lib/data/data.qrc | 1 + src/lib/data/data/bookmarks.json | 74 +++++++++++++++++++ src/lib/data/data/browsedata.db | Bin 20480 -> 26624 bytes src/lib/other/browsinglibrary.cpp | 1 + 5 files changed, 79 insertions(+) create mode 100644 src/lib/data/data/bookmarks.json diff --git a/src/lib/bookmarks/bookmarkstoolbarbutton.cpp b/src/lib/bookmarks/bookmarkstoolbarbutton.cpp index 68b6fdc80..378e188d8 100644 --- a/src/lib/bookmarks/bookmarkstoolbarbutton.cpp +++ b/src/lib/bookmarks/bookmarkstoolbarbutton.cpp @@ -204,6 +204,9 @@ void BookmarksToolbarButton::init() QString BookmarksToolbarButton::createTooltip() const { if (!m_bookmark->description().isEmpty()) { + if (!m_bookmark->urlString().isEmpty()) { + return QString("%1\n%2").arg(m_bookmark->description(), m_bookmark->urlString()); + } return m_bookmark->description(); } diff --git a/src/lib/data/data.qrc b/src/lib/data/data.qrc index 1ec12063e..4922d2a36 100644 --- a/src/lib/data/data.qrc +++ b/src/lib/data/data.qrc @@ -2,5 +2,6 @@ data/browsedata.db data/profiles.ini + data/bookmarks.json diff --git a/src/lib/data/data/bookmarks.json b/src/lib/data/data/bookmarks.json new file mode 100644 index 000000000..efc5c78f9 --- /dev/null +++ b/src/lib/data/data/bookmarks.json @@ -0,0 +1,74 @@ +{ + "roots" : { + "bookmark_bar" : { + "children" : [ + { + "description" : "Source code of QupZilla", + "keyword" : "qz-git", + "name" : "QupZilla Git", + "type" : "url", + "url" : "https://github.com/QupZilla/qupzilla", + "visit_count" : 0 + }, + { + "description" : "GitHub Issue Tracker for QupZilla", + "keyword" : "qz-issues", + "name" : "QupZilla Issues", + "type" : "url", + "url" : "https://github.com/QupZilla/qupzilla/issues", + "visit_count" : 0 + }, + { + "description" : "", + "keyword" : "qz-wiki", + "name" : "QupZilla Wiki", + "type" : "url", + "url" : "https://github.com/QupZilla/qupzilla/wiki", + "visit_count" : 0 + }, + { + "description" : "Blog with development updates", + "keyword" : "qz-blog", + "name" : "QupZilla Blog", + "type" : "url", + "url" : "http://blog.qupzilla.com/", + "visit_count" : 0 + }, + { + "description" : "QupZilla Homepage", + "keyword" : "qz-home", + "name" : "QupZilla Home", + "type" : "url", + "url" : "http://www.qupzilla.com/", + "visit_count" : 0 + } + ], + "description" : "Bookmarks located in Bookmarks Toolbar", + "expanded" : true, + "expanded_sidebar" : true, + "name" : "Bookmarks Toolbar", + "type" : "folder" + }, + "bookmark_menu" : { + "children" : [ + + ], + "description" : "Bookmarks located in Bookmarks Menu", + "expanded" : true, + "expanded_sidebar" : true, + "name" : "Bookmarks Menu", + "type" : "folder" + }, + "other" : { + "children" : [ + + ], + "description" : "All other bookmarks", + "expanded" : true, + "expanded_sidebar" : true, + "name" : "Unsorted Bookmarks", + "type" : "folder" + } + }, + "version" : 1 +} \ No newline at end of file diff --git a/src/lib/data/data/browsedata.db b/src/lib/data/data/browsedata.db index 7013963c9bd978eee9f4620d5a86f12c2923103a..95824014bde69d00fc6333052e69d967d6a0d77d 100644 GIT binary patch literal 26624 zcmeI4dpwls9>Cvs#xU-e!O&0>DpT%Jaw|1c2x%H(a&+bv6ULZJ5=&U3by=ZeU3Md+ z)3#Vi>Ef)#Mz*5W!UUlV5pg9T1Ari~jz|Q6elh?63!tnHWmy0~6+op7lxGt-`{dmvB*XL} z3IlZj(Gzet#p&YRBajw^07BqH5m3M=!>Z;+^@mc8=s^e|1paUWNc{idCO{^D5ctCg z!1v~8^b=UW26_Vh6#WD}^oLCbQH&5k2>dSzsKUav(9nY>3VOhS$n_s4f+U2%{3L+H z|NOK&vTB3?OaO_0#19Yx^Ot}EymaLK|M}|x$jaw60VMwCwfT|7&vOFs{XYgQ0l*T}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RW!VpkYX#bDAoeHX6gR-Z3jp0R3mUe+7Sklj_! z$n`^eE*;-hyAN;n^9^p8h33!h{?I#q-pA_MW6$&yMcx~<7QXL?u(zhad9e8Y!09uL zeBp4S>NW9SPrmS_H#O3mRaH~bVcA}^uIt9o&Dgs^$f-^5ynJWi!mfWGIn#gBJal%m zkPvk|_d(G$?9t7@&)dHE<-ILPnCXIGxaTYW);(33nRGCrw9)x*fehMUaoqJ!ba!CO oe~?VzHA%-dA1{#nks$dcF!^Ef!{q;;B)`gN)Rj@@AIty$0=hVN;s5{u diff --git a/src/lib/other/browsinglibrary.cpp b/src/lib/other/browsinglibrary.cpp index 10cf46e4f..840510492 100644 --- a/src/lib/other/browsinglibrary.cpp +++ b/src/lib/other/browsinglibrary.cpp @@ -108,6 +108,7 @@ void BrowsingLibrary::importBookmarks() void BrowsingLibrary::exportBookmarks() { + qDebug("BrowsingLibrary::exportBookmarks() NOT IMPLEMENTED"); } void BrowsingLibrary::showHistory(QupZilla* mainClass)