|
Defines |
#define | IO_STALLED 60 /**< If nothing exchanged after that many secs */ |
| If nothing exchanged after that many secs.
|
#define | DL_GUI_TREE_SPACE 5 /**< Space between a child node and a parent */ |
| Space between a child node and a parent.
|
#define | DL_VISIBLE_MAX MAX(DOWNLOADS_VISIBLE_COLUMNS, DOWNLOAD_QUEUE_VISIBLE_COLUMNS) |
Functions |
| RCSID ("$Id:downloads.c, v 1.31 2006/02/04 21:32:37 rmanfredi Exp $") |
const gchar * | download_progress_to_string (const struct download *d) |
const gchar * | source_progress_to_string (const struct download *d) |
void | add_parent_with_fi_handle (GHashTable *ht, gpointer key, GtkCTreeNode *data) |
| Add the given tree node to the hashtable.
|
void | remove_parent_with_fi_handle (GHashTable *ht, const gnet_fi_t fi_handle) |
| Removes the treenode matching the given fi_handle from the hash table and frees the original key used to store it.
|
GtkCTreeNode * | find_parent_with_fi_handle (GHashTable *ht, gpointer key) |
void | record_parent_gui_update (gpointer key, time_t when) |
| Remember when we did the last GUI update of the parent.
|
time_t | get_last_parent_gui_update (gpointer key) |
gboolean | parent_gui_needs_update (struct download *d, time_t now) |
gint | parent_children_add (GtkCTree *ctree, gpointer key, gint x) |
| Add (arithmetically) `x' to the amount of children of the parent, identified by its fileifo hande.
|
GList * | downloads_gui_collect_ctree_data (GtkCTree *ctree, GList *node_list, gboolean unselect, gboolean add_children) |
| Given a GList of GtkCTreeNodes, return a new list pointing to the row data If unselect is TRUE, unselect all nodes in the list If children is TRUE, check and strip out header nodes.
|
gboolean | downloads_gui_any_status (struct download *d, download_status_t status) |
gboolean | downloads_gui_all_aborted (struct download *d) |
gboolean | downloads_gui_update_parent_status (struct download *d, time_t now, gchar *new_status) |
| Finds parent of given download in the active download tree and changes the status column to the given string.
|
void | downloads_gui_init (void) |
| Initialize local data structures.
|
void | downloads_gui_shutdown (void) |
| Cleanup local data structures.
|
void | download_gui_add (struct download *d) |
| Adds a download to the gui.
|
void | gui_update_download_server (struct download *d) |
void | gui_update_download_range (struct download *d) |
void | gui_update_download_size (struct download *d) |
void | gui_update_download_host (struct download *d) |
void | gui_update_download (struct download *d, gboolean force) |
void | gui_update_download_abort_resume (void) |
void | download_gui_remove (struct download *d) |
| Remove a download from the GUI.
|
void | downloads_gui_expand_all (GtkCTree *ctree) |
| Collapse all nodes in given, tree either downloads or downloads_queue.
|
void | downloads_gui_collapse_all (GtkCTree *ctree) |
| Collapse all nodes in given, tree either downloads or downloads_queue.
|
void | downloads_update_active_pane (void) |
| Update "active" pane if needed.
|
void | downloads_update_queue_pane (void) |
| Update "queue" pane if needed.
|
void | downloads_gui_update_display (time_t unused_now) |
| Periodically called to update downloads display.
|
Variables |
gchar | tmpstr [4096] |
GHashTable * | parents |
| table of parent download iterators
|
GHashTable * | parents_queue |
| table of parent queued dl iterators
|
GHashTable * | parents_gui_time |
| Time at which parent was updated.
|
GHashTable * | parents_children |
GHashTable * | parents_queue_children |
GtkCTree * | ctree_downloads = NULL |
GtkCTree * | ctree_downloads_queue = NULL |
GtkNotebook * | notebook = NULL |
gboolean | ctree_downloads_frozen = FALSE |
gboolean | ctree_downloads_queue_frozen = FALSE |