1 /**
2  * @file feed_list_view.h  the feed list in a GtkTreeView
3  *
4  * Copyright (C) 2004-2010 Lars Windolf <lars.windolf@gmx.de>
5  * Copyright (C) 2004-2005 Nathan J. Conrad <t98502@users.sourceforge.net>
6  * Copyright (C) 2005 Raphael Slinckx <raphael@slinckx.net>
7  *
8  * This program is free software; you can redistribute it and/or modify
9  * it under the terms of the GNU General Public License as published by
10  * the Free Software Foundation; either version 2 of the License, or
11  * (at your option) any later version.
12  *
13  * This program is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16  * GNU General Public License for more details.
17  *
18  * You should have received a copy of the GNU General Public License
19  * along with this program; if not, write to the Free Software
20  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
21  */
22 
23 #ifndef _FEED_LIST_VIEW_H
24 #define _FEED_LIST_VIEW_H
25 
26 #include <gtk/gtk.h>
27 #include "feed.h"
28 
29 /* constants for attributes in feedstore */
30 enum {
31 	FS_LABEL,	/**< Displayed name */
32 	FS_ICON,	/**< Icon to use */
33 	FS_PTR,		/**< pointer to the folder or feed */
34 	FS_UNREAD,	/**< Number of unread items */
35 	FS_COUNT,	/**< Number of unread items as string */
36 	FS_LEN
37 };
38 
39 extern GtkTreeStore	*feedstore;
40 extern gboolean		feedlist_reduced_unread;
41 
42 /**
43  * Selects the given node in the feed list.
44  *
45  * @param node	the node to select
46  */
47 void feed_list_view_select (nodePtr node);
48 
49 /**
50  * Initializes the feed list. For example, it creates the various
51  * columns and renderers needed to show the list.
52  */
53 void feed_list_view_init (GtkTreeView *treeview);
54 
55 /**
56  * Sort the feeds of the given folder node.
57  *
58  * @param folder	the folder
59  */
60 void feed_list_view_sort_folder (nodePtr folder);
61 
62 void on_menu_delete (GSimpleAction *action, GVariant *parameter, gpointer user_data);
63 
64 void on_menu_update (GSimpleAction *action, GVariant *parameter, gpointer user_data);
65 void on_menu_update_all (GSimpleAction *action, GVariant *parameter, gpointer user_data);
66 
67 void on_action_mark_all_read (GSimpleAction *action, GVariant *parameter, gpointer user_data);
68 
69 void on_menu_properties (GSimpleAction *action, GVariant *parameter, gpointer user_data);
70 void on_menu_feed_new (GSimpleAction *menuitem, GVariant *parameter, gpointer user_data);
71 void on_menu_folder_new (GSimpleAction *menuitem, GVariant *parameter, gpointer user_data);
72 
73 void on_new_plugin_activate (GSimpleAction *menuitem, GVariant *parameter, gpointer user_data);
74 void on_new_newsbin_activate (GSimpleAction *menuitem, GVariant *parameter, gpointer user_data);
75 void on_new_vfolder_activate (GSimpleAction *menuitem, GVariant *parameter, gpointer user_data);
76 
77 void on_feedlist_reduced_activate (GSimpleAction *action, GVariant *parameter, gpointer user_data);
78 #endif
79