1 /** 2 * @file feed_list_node.h Handling feed list nodes 3 * 4 * Copyright (C) 2004-2006 Nathan J. Conrad <t98502@users.sourceforge.net> 5 * Copyright (C) 2004-2013 Lars Windolf <lars.windolf@gmx.de> 6 * 7 * This program is free software; you can redistribute it and/or modify 8 * it under the terms of the GNU General Public License as published by 9 * the Free Software Foundation; either version 2 of the License, or 10 * (at your option) any later version. 11 * 12 * This program is distributed in the hope that it will be useful, 13 * but WITHOUT ANY WARRANTY; without even the implied warranty of 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 15 * GNU General Public License for more details. 16 * 17 * You should have received a copy of the GNU General Public License 18 * along with this program; if not, write to the Free Software 19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 20 */ 21 22 #ifndef _feed_list_node_H 23 #define _feed_list_node_H 24 25 #include <gtk/gtk.h> 26 #include "subscription.h" 27 #include "node.h" 28 29 /** 30 * Determines the tree iter of a given node. 31 * 32 * @param nodeId the node id 33 */ 34 GtkTreeIter * feed_list_node_to_iter (const gchar *nodeId); 35 36 /** 37 * Updates the tree iter of a given node. 38 * 39 * @param nodeId the node 40 * @param iter the new iter 41 */ 42 void feed_list_node_update_iter (const gchar *nodeId, GtkTreeIter *iter); 43 44 /** 45 * Add a node to the feedlist tree view 46 * 47 s * @param node the node to add 48 */ 49 void feed_list_node_add (nodePtr node); 50 51 /** 52 * Reload the UI feedlist by removing and readding each node 53 */ 54 void feed_list_node_reload_feedlist (void); 55 56 /** 57 * Remove a node from the feedlist and free its ui_data. 58 * 59 * @param node the node to free 60 */ 61 void feed_list_node_remove_node (nodePtr node); 62 63 /** 64 * Adds an "empty" node to the given tree iter. 65 * 66 * @param parent a tree iter 67 */ 68 void feed_list_node_add_empty_node (GtkTreeIter *parent); 69 70 /** 71 * Removes an "empty" node from the given tree iter. 72 * 73 * @param parent a tree iter 74 */ 75 void feed_list_node_remove_empty_node (GtkTreeIter *parent); 76 77 /** 78 * Determines the expansion state of a feed list tree node. 79 * 80 * @param nodeId the node id 81 * 82 * @returns TRUE if the node is expanded 83 */ 84 gboolean feed_list_node_is_expanded (const gchar *nodeId); 85 86 /** 87 * Change the expansion/collapsing of the given folder node. 88 * 89 * @param folder the folder node 90 * @param expanded new expansion state 91 */ 92 void feed_list_node_set_expansion (nodePtr folder, gboolean expanded); 93 94 /** 95 * Updates the tree view entry of the given node. 96 * 97 * @param nodeId the node id 98 */ 99 void feed_list_node_update (const gchar *nodeId); 100 101 /** 102 * Open dialog to rename a given node. 103 * 104 * @param node the node to rename 105 */ 106 void feed_list_node_rename (nodePtr node); 107 108 /** 109 * Prompt the user for confirmation of a folder or feed, and 110 * recursively remove the feed or folder if the user accepts. This 111 * function does not block, so the folder/feeds will not have 112 * been deleted when this function returns. 113 * 114 * @param node the node to remove 115 */ 116 void feed_list_node_remove (nodePtr node); 117 118 /** 119 * Prompt the user for confirmation and forces adding the node, 120 * even though another node with the same URL exists. 121 * 122 * @param tempSubscription the duplicate URL subscription 123 * @param exNode the existing node 124 */ 125 void feed_list_node_add_duplicate_url_subscription (subscriptionPtr tempSubscription, nodePtr exNode); 126 127 #endif 128