Statistics are kept by _FILENAME_ and file size, not by actual path, so two files with the same name and size will be counted in the same bin.
I dont see this as a limitation because the user wouldn't be able to differentiate the files anyway. This could be extended to keep the entire path to each file and optionally show the entire path, but..
The 'upload_history' file has the following format:
#include "gtk/gui.h"
#include "interface-glade.h"
#include "gtk/columns.h"
#include "gtk/gtk-missing.h"
#include "gtk/misc.h"
#include "if/gui_property.h"
#include "if/bridge/ui2c.h"
#include "lib/glib-missing.h"
#include "lib/utf8.h"
#include "lib/override.h"
Functions | |
RCSID ("$Id:upload_stats.c, v 1.13 2005/11/16 13:35:14 cbiere Exp $") | |
gboolean | on_button_press_event (GtkWidget *unused_widget, GdkEventButton *event, gpointer unused_udata) |
Private callbacks. | |
void | cell_render_size_func (GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter, gpointer unused_data) |
Render the size column. | |
void | cell_render_norm_func (GtkTreeViewColumn *column, GtkCellRenderer *cell, GtkTreeModel *model, GtkTreeIter *iter, gpointer unused_data) |
Render the normalized statistic column. | |
void | add_column (GtkTreeView *tree, gint column_id, const gchar *title, gfloat xalign, GtkTreeCellDataFunc cell_data_func) |
Add a column to the GtkTreeView. | |
ul_stats * | upload_stats_gui_find (const gchar *name, guint64 size, GtkTreeModel *model, GtkTreeIter *iter) |
Find an ul_stats structure associated with the given name and size. | |
void | upload_stats_gui_init_intern (gboolean intern) |
Initialize the upload statistics GUI. | |
void | upload_stats_gui_add (const struct ul_stats *us) |
Add a new upload stats row to the model. | |
void | upload_stats_gui_init (void) |
void | upload_stats_gui_update (const gchar *name, guint64 size) |
Update the visible statistics for a given file. | |
void | upload_stats_gui_clear_all (void) |
Clear all upload statistic entries from the GtkTreeModel. | |
void | upload_stats_gui_shutdown (void) |
Variables | |
GtkTreeView * | upload_stats_treeview = NULL |
GtkWidget * | popup_upload_stats = NULL |
|
Add a column to the GtkTreeView. This function adds a column to the treeview.
|
|
Render the normalized statistic column. Generate the text string which should be displayed in the normalized cell.
|
|
Render the size column. Generate the text string which should be displayed in the size cell.
|
|
Private callbacks.
|
|
|
|
Add a new upload stats row to the model. Add the information within the ul_stats structure to the GtkTreeModel and another row the the upload statistics pane.
|
|
Clear all upload statistic entries from the GtkTreeModel.
|
|
Find an ul_stats structure associated with the given name and size. Given the filename and it's size, iterate through the list of all ul_stats and find the one that matches up.
|
|
|
|
Initialize the upload statistics GUI. Initialize the upload statistics GUI. Define the GtkTreeModel used to store the information as well as rendering and sorting functions to use on the cells and columns. |
|
|
|
Update the visible statistics for a given file.
|
|
|
|
|