summaryrefslogtreecommitdiff
path: root/desktop/hotlist.c
diff options
context:
space:
mode:
Diffstat (limited to 'desktop/hotlist.c')
-rw-r--r--desktop/hotlist.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/desktop/hotlist.c b/desktop/hotlist.c
index fde4c33cf..bedb09535 100644
--- a/desktop/hotlist.c
+++ b/desktop/hotlist.c
@@ -1483,6 +1483,27 @@ bool hotlist_has_selection(void)
/* Exported interface, documented in hotlist.h */
+bool hotlist_get_selection(nsurl **url, const char **title)
+{
+ struct hotlist_entry *e;
+ void *v;
+
+ treeview_get_selection(hl_ctx.tree, &v);
+ if (v == NULL) {
+ *url = NULL;
+ *title = NULL;
+ return false;
+ }
+
+ e = (struct hotlist_entry *)v;
+
+ *url = e->url;
+ *title = e->data[HL_TITLE].value;
+ return true;
+}
+
+
+/* Exported interface, documented in hotlist.h */
void hotlist_edit_selection(void)
{
treeview_edit_selection(hl_ctx.tree);