2
2
* Xiphos Bible Study Tool
3
3
* bookmarks_treeview.c - gui for bookmarks using treeview
5
* Copyright (C) 2003-2010 Xiphos Developer Team
5
* Copyright (C) 2003-2011 Xiphos Developer Team
7
7
* This program is free software; you can redistribute it and/or modify
8
8
* it under the terms of the GNU General Public License as published by
452
452
/******************************************************************************
457
* #include "gui/bookmarks_treview.h"
459
* void gui_load_removed()
462
* restore bookmarks that have been removed and saved
468
void gui_load_removed(const xmlChar * file)
470
xmlNodePtr cur = NULL;
471
BOOKMARK_DATA data, *p = NULL;
475
// gchar *caption = NULL;
476
GtkTreeSelection *selection;
477
GtkTreeIter selected;
479
selection = gtk_tree_view_get_selection(bookmark_tree);
480
if (!gtk_tree_selection_get_selected
481
(selection, NULL, &selected))
485
cur = xml_load_bookmark_file(file);
486
while (cur != NULL) {
487
if (!xmlStrcmp(cur->name, (const xmlChar *) "Bookmark")) {
488
get_xml_bookmark_data(cur, p);
489
gui_add_item_to_tree(&iter, &parent, p);
490
free_bookmark_data(p);
492
get_xml_folder_data(cur, p);
494
gui_add_item_to_tree(&parent, &selected, p);
496
free_bookmark_data(p);
497
add_node(cur, &parent);
505
xml_free_bookmark_doc();
507
gtk_tree_model_get_path(GTK_TREE_MODEL(model), &selected);
508
gtk_tree_view_expand_to_path(bookmark_tree, path);
509
gtk_tree_path_free(path);
513
/******************************************************************************
515
454
* load_xml_bookmarks
639
578
pixbuf_finder("epiphany-bookmark-page.png", 0, NULL);
641
580
if (!bm_pixbufs->pixbuf_helpdoc)
583
bm_pixbufs->pixbuf_helpdoc =
584
gtk_widget_render_icon_pixbuf(widgets.app,
586
GTK_ICON_SIZE_MENU );
642
588
bm_pixbufs->pixbuf_helpdoc
643
589
= gtk_widget_render_icon(widgets.app,
645
591
GTK_ICON_SIZE_MENU, NULL);
648
595
/******************************************************************************