Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Globals | Related Pages

fileinfo.c File Reference


Detailed Description

Displaying of file information in the GUI.

Author:
Richard Eckart
Date:
2003

#include "gtk/gui.h"
#include "gtk/filter.h"
#include "gtk/statusbar.h"
#include "gtk/visual_progress.h"
#include "gtk/columns.h"
#include "gtk/gtk-missing.h"
#include "if/gui_property_priv.h"
#include "if/bridge/ui2c.h"
#include "lib/glib-missing.h"
#include "lib/url.h"
#include "lib/override.h"

Functions

 RCSID ("$Id:fileinfo.c, v 1.23 2006/02/06 14:35:54 cbiere Exp $")
void drag_begin (GtkWidget *unused_widget, GdkDragContext *unused_drag_ctx, gpointer udata)
void drag_data_get (GtkWidget *unused_widget, GdkDragContext *unused_drag_ctx, GtkSelectionData *data, guint unused_info, guint unused_stamp, gpointer udata)
void drag_end (GtkWidget *unused_widget, GdkDragContext *unused_drag_ctx, gpointer udata)
void on_clist_fileinfo_resize_column (GtkCList *unused_clist, gint column, gint width, gpointer unused_udata)
gnet_fi_info_tfi_gui_fill_info (gnet_fi_t fih, gchar *titles[c_fi_num])
 Fill in the cell data.

void fi_gui_fill_status (gnet_fi_t fih, gchar *titles[c_fi_num])
void fi_gui_set_details (gnet_fi_t fih)
 Display details for the given fileinfo entry in the details pane.

void fi_gui_clear_details (void)
 Clear the details pane.

gboolean fi_gui_match_filter (const gchar *s)
void fi_gui_add_row (gnet_fi_t fih)
 Add a fileinfo entry to the list if it matches the currently set row filter.

void fi_gui_remove_row (gnet_fi_t fih, gboolean hide)
 Remove a fileinfo entry from the list.

void fi_gui_set_filter_regex (gchar *s)
 Takes a string containing a regular expression updates the list to only show files matching that expression.

void fi_gui_update (gnet_fi_t fih, gboolean full)
void fi_gui_fi_added (gnet_fi_t fih)
void fi_gui_fi_removed (gnet_fi_t fih)
void fi_gui_fi_status_changed (gnet_fi_t fih)
void fi_gui_fi_status_changed_transient (gnet_fi_t fih)
gboolean fi_gui_update_queued (gpointer key, gpointer unused_value, gpointer unused_udata)
 Hash table iterator to update the display for each queued entry.

void on_clist_fileinfo_select_row (GtkCList *clist, gint row, gint unused_column, GdkEvent *unused_event, gpointer unused_udata)
void on_clist_fileinfo_unselect_row (GtkCList *clist, gint unused_row, gint unused_column, GdkEvent *unused_event, gpointer unused_udata)
void on_button_fi_purge_clicked (GtkButton *unused_button, gpointer unused_udata)
void on_entry_fi_regex_activate (GtkEditable *editable, gpointer unused_udata)
void fi_gui_init (void)
void fi_gui_shutdown (void)
void fi_gui_update_display (time_t now)

Variables

gnet_fi_t last_shown = 0
gboolean last_shown_valid = FALSE
GHashTable * fi_updates = NULL
GSList * visible_fi = NULL
GSList * hidden_fi = NULL
regex_t filter_re
GtkCList * clist_fileinfo = NULL
gnet_fi_info_tlast_fi = NULL


Function Documentation

void drag_begin GtkWidget *  unused_widget,
GdkDragContext *  unused_drag_ctx,
gpointer  udata
[static]
 

void drag_data_get GtkWidget *  unused_widget,
GdkDragContext *  unused_drag_ctx,
GtkSelectionData *  data,
guint  unused_info,
guint  unused_stamp,
gpointer  udata
[static]
 

void drag_end GtkWidget *  unused_widget,
GdkDragContext *  unused_drag_ctx,
gpointer  udata
[static]
 

void fi_gui_add_row gnet_fi_t  fih  )  [static]
 

Add a fileinfo entry to the list if it matches the currently set row filter.

visible_fi and hidden_fi are properly updated wether the entry is displayed or not and no matter if the line was already shown/hidden or is newly added.

void fi_gui_clear_details void   )  [static]
 

Clear the details pane.

void fi_gui_fi_added gnet_fi_t  fih  )  [static]
 

void fi_gui_fi_removed gnet_fi_t  fih  )  [static]
 

void fi_gui_fi_status_changed gnet_fi_t  fih  )  [static]
 

void fi_gui_fi_status_changed_transient gnet_fi_t  fih  )  [static]
 

gnet_fi_info_t* fi_gui_fill_info gnet_fi_t  fih,
gchar *  titles[c_fi_num]
[static]
 

Fill in the cell data.

Calling this will always break the data it filled in last time!

Warning:
Returns pointer to global data: the gnet_fi_info_t structure filled from the given `fih'.

void fi_gui_fill_status gnet_fi_t  fih,
gchar *  titles[c_fi_num]
[static]
 

void fi_gui_init void   ) 
 

gboolean fi_gui_match_filter const gchar *  s  )  [inline, static]
 

Returns:
TRUE if the given string matches with the currntly set row filter. Returns FALSE otherwise.

void fi_gui_remove_row gnet_fi_t  fih,
gboolean  hide
[static]
 

Remove a fileinfo entry from the list.

If it is not displayed, then nothing happens. If hide is TRUE, then the row is not unregistered and only moved to the hidden_fi list.

void fi_gui_set_details gnet_fi_t  fih  )  [static]
 

Display details for the given fileinfo entry in the details pane.

It is expected, that the given handle is really used. If not, an assertion will be triggered.

void fi_gui_set_filter_regex gchar *  s  )  [static]
 

Takes a string containing a regular expression updates the list to only show files matching that expression.

void fi_gui_shutdown void   ) 
 

void fi_gui_update gnet_fi_t  fih,
gboolean  full
[static]
 

void fi_gui_update_display time_t  now  ) 
 

Bug:
FIXME: We should remember for every node when it was last updated and only refresh every node at most once every second. This information should be kept in a struct pointed to by the row user_data and should be automatically freed when removing the row (see upload stats code).

gboolean fi_gui_update_queued gpointer  key,
gpointer  unused_value,
gpointer  unused_udata
[static]
 

Hash table iterator to update the display for each queued entry.

void on_button_fi_purge_clicked GtkButton *  unused_button,
gpointer  unused_udata
 

void on_clist_fileinfo_resize_column GtkCList *  unused_clist,
gint  column,
gint  width,
gpointer  unused_udata
 

void on_clist_fileinfo_select_row GtkCList *  clist,
gint  row,
gint  unused_column,
GdkEvent *  unused_event,
gpointer  unused_udata
 

void on_clist_fileinfo_unselect_row GtkCList *  clist,
gint  unused_row,
gint  unused_column,
GdkEvent *  unused_event,
gpointer  unused_udata
 

void on_entry_fi_regex_activate GtkEditable *  editable,
gpointer  unused_udata
 

RCSID "$Id:fileinfo.  c,
v 1.23 2006/02/06 14:35:54 cbiere Exp $" 
 


Variable Documentation

GtkCList* clist_fileinfo = NULL [static]
 

GHashTable* fi_updates = NULL [static]
 

regex_t filter_re [static]
 

GSList* hidden_fi = NULL [static]
 

gnet_fi_info_t* last_fi = NULL [static]
 

gnet_fi_t last_shown = 0 [static]
 

gboolean last_shown_valid = FALSE [static]
 

GSList* visible_fi = NULL [static]
 


Generated on Sun Feb 12 10:50:01 2006 for Gtk-Gnutella by doxygen 1.3.6