~ubuntu-branches/ubuntu/vivid/liferea/vivid-proposed

« back to all changes in this revision

Viewing changes to src/ui/ui_itemlist.h

  • Committer: Package Import Robot
  • Author(s): bojo42
  • Date: 2012-03-29 14:17:21 UTC
  • mfrom: (1.3.9) (3.2.5 sid)
  • Revision ID: package-import@ubuntu.com-20120329141721-tbfopcrc5797wxt7
Tags: 1.8.3-0.1ubuntu1
* New upstream release (LP: #290666, #371754, #741543, #716688)
* Merge from Debian unstable (LP: #935147), remaining changes:
* debian/patches:
  - drop gtk-status-icon.patch & notification-append as in upstream
  - drop fix_systray_behavior as mostly upstreamed and rest seems unused
  - 01_ubuntu_feedlists: update & rename, move planets to "Open Source"  
  - add_X-Ubuntu-Gettext-Domain: rebase
  - libunity.patch: rebase, apply before indicator patch (liferea_shell.c)
  - libindicate_increase_version.patch: exclude from libindicate.patch
  - deactivate libindicate.patch, seems partly upstreamed and needs rework
* debian/control: libindicate-dev, libindicate-gtk-dev & libunity-dev
* debian/liferea.indicate & liferea.install: ship indicator desktop file
* debian/rules: enable libindicate

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/**
2
 
 * @file ui_itemlist.h  item list GUI handling
3
 
 *
4
 
 * Copyright (C) 2004-2009 Lars Lindner <lars.lindner@gmail.com>
5
 
 * Copyright (C) 2004-2005 Nathan J. Conrad <t98502@users.sourceforge.net>
6
 
 *            
7
 
 * This library is free software; you can redistribute it and/or
8
 
 * modify it under the terms of the GNU Library General Public
9
 
 * License as published by the Free Software Foundation; either
10
 
 * version 2 of the License, or (at your option) any later version.
11
 
 * 
12
 
 * This library 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 GNU
15
 
 * Library General Public License for more details.
16
 
 * 
17
 
 * You should have received a copy of the GNU Library General Public License
18
 
 * along with this library; see the file COPYING.LIB.  If not, write to
19
 
 * the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
20
 
 * Boston, MA 02111-1307, USA.
21
 
 */
22
 
 
23
 
#ifndef _UI_ITEMLIST_H
24
 
#define _UI_ITEMLIST_H
25
 
 
26
 
#include <gtk/gtk.h>
27
 
#include <time.h>
28
 
 
29
 
#include "item.h"
30
 
#include "node_view.h"
31
 
 
32
 
/**
33
 
 * Initializes the itemlist. For example, it creates the various
34
 
 * columns and renderers needed to show the list.
35
 
 */
36
 
GtkWidget* ui_itemlist_new (GtkWidget *mainwindow);
37
 
 
38
 
// FIXME: use GObject
39
 
void ui_itemlist_destroy (void);
40
 
 
41
 
/**
42
 
 * Checks wether the given id is currently displayed.
43
 
 *
44
 
 * @param id    the item id
45
 
 *
46
 
 * @returns TRUE if the item is in the tree view 
47
 
 */
48
 
gboolean ui_itemlist_contains_item(gulong id);
49
 
 
50
 
/**
51
 
 * Changes the sorting type (and direction).
52
 
 *
53
 
 * @param sortType      new sort type
54
 
 * @param sortReversed  TRUE for ascending order
55
 
 */
56
 
void ui_itemlist_set_sort_column (nodeViewSortType sortType, gboolean sortReversed);
57
 
 
58
 
void ui_itemlist_reset_tree_store(void);
59
 
 
60
 
/**
61
 
 * Unselect all items in the list and scroll to top. This is typically
62
 
 * called when changing feed.
63
 
 */
64
 
void ui_itemlist_prefocus(void);
65
 
 
66
 
/**
67
 
 * Selects the given item (if it is in the current item list).
68
 
 *
69
 
 * @param ip    the item to select
70
 
 */
71
 
void ui_itemlist_select(itemPtr ip);
72
 
 
73
 
/**
74
 
 * Add an item to the itemlist
75
 
 *
76
 
 * @param ip    the item to add
77
 
 */
78
 
void ui_itemlist_add_item(itemPtr item);
79
 
 
80
 
/**
81
 
 * Remove an item from the itemlist
82
 
 */
83
 
void ui_itemlist_remove_item(itemPtr ip);
84
 
 
85
 
/**
86
 
 * Enable the favicon column of the currently displayed itemlist
87
 
 */
88
 
void ui_itemlist_enable_favicon_column(gboolean enabled);
89
 
 
90
 
/**
91
 
 * Enable the enclosure column of the currently displayed itemlist
92
 
 */
93
 
void ui_itemlist_enable_encicon_column(gboolean enabled);
94
 
 
95
 
/**
96
 
 * Remove the items from the itemlist.
97
 
 */
98
 
void ui_itemlist_clear(void);
99
 
 
100
 
 
101
 
/**
102
 
 * When switching tabs, the horizontal scrolling sometimes gets messed
103
 
 * up. This reverses that.
104
 
 */
105
 
void ui_itemlist_scroll_left (void);
106
 
 
107
 
/**
108
 
 * @name Callbacks used from interface.c
109
 
 * @{
110
 
 */
111
 
 
112
 
/**
113
 
 * Callback activated when an item is double-clicked. It opens the URL
114
 
 * of the item in a web browser.
115
 
 */
116
 
 
117
 
void
118
 
on_Itemlist_row_activated              (GtkTreeView     *treeview,
119
 
                                        GtkTreePath     *path,
120
 
                                        GtkTreeViewColumn *column,
121
 
                                        gpointer         user_data);
122
 
 
123
 
/**
124
 
 * Callback for column selection change.
125
 
 */
126
 
void itemlist_sort_column_changed_cb(GtkTreeSortable *treesortable, gpointer user_data);
127
 
 
128
 
/**
129
 
 * Callback for item list selection change.
130
 
 */
131
 
void on_itemlist_selection_changed(GtkTreeSelection *selection, gpointer data);
132
 
 
133
 
/* menu callbacks */
134
 
 
135
 
/**
136
 
 * Toggles the unread status of the selected item. This is called from
137
 
 * a menu.
138
 
 */
139
 
void on_toggle_unread_status(GtkMenuItem *menuitem, gpointer user_data);
140
 
 
141
 
/**
142
 
 * Toggles the flag of the selected item. This is called from a menu.
143
 
 */
144
 
void on_toggle_item_flag(GtkMenuItem *menuitem, gpointer user_data);
145
 
 
146
 
/**
147
 
 * Opens the selected item in a browser.
148
 
 */
149
 
void on_popup_launchitem_selected(void);
150
 
 
151
 
/**
152
 
 * Opens the selected item in a browser.
153
 
 */
154
 
void on_popup_launchitem_in_tab_selected(void);
155
 
 
156
 
/**
157
 
 * Toggles the read status of right-clicked item.
158
 
 */
159
 
void on_popup_toggle_read(void);
160
 
 
161
 
/**
162
 
 * Toggles the flag of right-clicked item.
163
 
 */
164
 
void on_popup_toggle_flag(void);
165
 
 
166
 
/**
167
 
 * Removes all items from the selected feed.
168
 
 *
169
 
 * @param menuitem The menuitem that was selected.
170
 
 * @param user_data Unused.
171
 
 */
172
 
void on_remove_items_activate(GtkMenuItem *menuitem, gpointer user_data);
173
 
 
174
 
/**
175
 
 * Removes the selected item from the selected feed.
176
 
 *
177
 
 * @param menuitem The menuitem that was selected.
178
 
 * @param user_data Unused.
179
 
 */  
180
 
void on_remove_item_activate(GtkMenuItem *menuitem, gpointer user_data);
181
 
 
182
 
void on_popup_remove_selected(void);
183
 
 
184
 
/**
185
 
 * Finds and selects the next unread item starting at the given
186
 
 * item in the current item list according to the current 
187
 
 * GtkTreeView sorting order.
188
 
 *
189
 
 * @param startId       0 or the item id to start from
190
 
 *
191
 
 * @returns item if an unread item was found
192
 
 */
193
 
itemPtr ui_itemlist_find_unread_item(gulong startId);
194
 
 
195
 
/**
196
 
 * Searches the displayed feed and then all feeds for an unread
197
 
 * item. If one it found, it is displayed.
198
 
 *
199
 
 * @param menuitem The menuitem that was selected.
200
 
 * @param user_data Unused.
201
 
 */
202
 
void on_next_unread_item_activate(GtkMenuItem *menuitem, gpointer user_data);
203
 
 
204
 
void on_popup_next_unread_item_selected(gpointer callback_data, guint callback_action, GtkWidget *widget);
205
 
 
206
 
void on_nextbtn_clicked(GtkButton *button, gpointer user_data);
207
 
 
208
 
/**
209
 
 * Update a single item of the currently displayed item list.
210
 
 *
211
 
 * @param item  the item
212
 
 */
213
 
void ui_itemlist_update_item (itemPtr item);
214
 
 
215
 
/**
216
 
 * Update all items of the currently displayed item list.
217
 
 */
218
 
void ui_itemlist_update_all_items (void);
219
 
 
220
 
// FIXME: the following two functions have nothing to do with the "item list"!
221
 
 
222
 
/**
223
 
 * Launches the configured link search engine for the given item
224
 
 *
225
 
 * @param item  the item
226
 
 */
227
 
void ui_itemlist_search_item_link (itemPtr item);
228
 
 
229
 
/**
230
 
 * Launches the configured social bookmarking site for the given item
231
 
 *
232
 
 * @param item  the item
233
 
 */
234
 
void ui_itemlist_add_item_bookmark (itemPtr item);
235
 
 
236
 
/**
237
 
 * Copies the selected items URL to the clipboard.
238
 
 */
239
 
void on_popup_copy_URL_clipboard(void);
240
 
 
241
 
void on_popup_social_bm_item_selected(void);
242
 
 
243
 
/*@}*/
244
 
 
245
 
#endif