summaryrefslogtreecommitdiffstats
path: root/redhat/tdebase/tdebase-14.0.0-bookmark_global_copy.patch
blob: 0f8a68045f89123b6a233f79a63f4a4518994ea9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
--- ./libkonq/konqbookmarkmanager.h.ori	2013-05-08 23:26:03.558587419 +0200
+++ ./libkonq/konqbookmarkmanager.h	2013-05-08 23:29:25.317517880 +0200
@@ -3,6 +3,8 @@
 
 #include <kbookmarkmanager.h>
 #include <kstandarddirs.h>
+#include <kurl.h>
+#include <tdeio/job.h>
 #include <libkonq_export.h>
 
 class LIBKONQ_EXPORT KonqBookmarkManager
@@ -11,7 +13,14 @@
     static KBookmarkManager * self() {
         if ( !s_bookmarkManager )
         {
-            TQString bookmarksFile = locateLocal("data", TQString::fromLatin1("konqueror/bookmarks.xml"));
+            TQString globalBookmarkFile = locate( "data",  TQString::fromLatin1( "konqueror/bookmarks.xml" ) );
+            TQString bookmarksFile = locateLocal( "data", TQString::fromLatin1("konqueror/bookmarks.xml" ), true);
+            if ( globalBookmarkFile != TQString::null && bookmarksFile == TQString::null ) {
+                TDEIO::file_copy( 
+                   KURL::fromPathOrURL( globalBookmarkFile ), 
+                   KURL::fromPathOrURL( bookmarksFile ), -1, false, false
+                );
+            }
             s_bookmarkManager = KBookmarkManager::managerForFile( bookmarksFile );
         }
         return s_bookmarkManager;