]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/bookmarkselector.h
A small step in trying to make urlnavigator useable in kdelibs for the file dialog:
[dolphin.git] / src / bookmarkselector.h
index 334f25ba379c0004c1ca18d3c3e69cbe522bcdb8..a92f186ecf9186da1f20ca5ae04d00912f29e243 100644 (file)
@@ -44,7 +44,7 @@ public:
      * @param parent Parent widget where the bookmark selector
      *               is embedded into.
      */
-    BookmarkSelector(UrlNavigator* parent);
+    BookmarkSelector(UrlNavigator* parent, KBookmarkManager* bookmarkManager);
 
     virtual ~BookmarkSelector();
 
@@ -57,12 +57,6 @@ public:
      */
     void updateSelection(const KUrl& url);
 
-    /**
-     * Returns the index of the selected bookmark. To get
-     * the bookmark, use BookmarkSelector::selectedBookmark().
-     */
-    int selectedIndex() const { return m_selectedIndex; }
-
     /** Returns the selected bookmark. */
     KBookmark selectedBookmark() const;
 
@@ -83,7 +77,7 @@ public:
      *
      * The base URL will be '/home/peter/Documents'.
      */
-    static KBookmark baseBookmark(const KUrl& url);
+    static KBookmark baseBookmark(KBookmarkManager* bookmarkManager, const KUrl& url);
 
 signals:
     /**
@@ -107,13 +101,10 @@ private slots:
     void activateBookmark(QAction* action);
 
 private:
-    static int baseBookmarkIndex(const KUrl& url);
-
-private:
-    int m_selectedIndex;
+    QString m_selectedAddress;
     UrlNavigator* m_urlNavigator;
     KMenu* m_bookmarksMenu;
-
+    KBookmarkManager* m_bookmarkManager;
 };
 
 #endif