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

misc.c File Reference


Detailed Description

General GUI functions and stuff which doesn't fit in anywhere else.

Author:
Raphael Manfredi

Richard Eckart

Date:
2001-2003

#include "gui.h"
#include "gtk-shared/callbacks.h"
#include "nodes.h"
#include "downloads.h"
#include "settings.h"
#include "search.h"
#include "gtk-missing.h"
#include "if/gnet_property.h"
#include "if/gui_property.h"
#include "if/gui_property_priv.h"
#include "if/core/net_stats.h"
#include "if/bridge/ui2c.h"
#include "lib/glib-missing.h"
#include "lib/override.h"

Functions

 RCSID ("$Id:misc.c, v 1.25 2006/01/10 10:28:53 cbiere Exp $")
void gui_update_files_scanned (void)
void gui_allow_rescan_dir (gboolean flag)
void gui_general_timer (time_t now)
 Update some general information displayed in the gui.

void update_stat (guint32 *max, GtkProgressBar *pg, gnet_bw_stats_t *stats, gboolean avg_mode, gboolean inout)
void gnet_bw_stats_sum (gnet_bw_stats_t *dest, gnet_bw_stats_t *other)
 Sum `dest' and `other', putting results in `dest'.

void gui_update_traffic_stats (void)
void gui_update_stats_frames (void)
gint gui_record_name_eq (gconstpointer rec1, gconstpointer rec2)
 Tells if two hit records have the same filename.

gint gui_record_sha1_eq (gconstpointer rec1, gconstpointer rec2)
 Tells if two hit records have the same SHA1.

gint gui_record_host_eq (gconstpointer rec1, gconstpointer rec2)
 Tells if two hit records come from the same host.

gint gui_record_sha1_or_name_eq (gconstpointer rec1, gconstpointer rec2)
 Tells if two hit records have the same SHA1 or the same name.

void gui_fix_coords (guint32 *coord)
 If the given coordinates are not reasonable, they're appriopriately adjusted.

void gui_restore_window (GtkWidget *widget, property_t prop)
void gui_save_window (GtkWidget *widget, property_t prop)
void paned_save_position (GtkPaned *paned, property_t prop)
void paned_restore_position (GtkPaned *paned, property_t prop)


Function Documentation

void gnet_bw_stats_sum gnet_bw_stats_t dest,
gnet_bw_stats_t other
[static]
 

Sum `dest' and `other', putting results in `dest'.

void gui_allow_rescan_dir gboolean  flag  ) 
 

void gui_fix_coords guint32 *  coord  ) 
 

If the given coordinates are not reasonable, they're appriopriately adjusted.

Parameters:
coord must point to an array of 4 guint32 values which describe an position an size [x, y, width, height].

void gui_general_timer time_t  now  ) 
 

Update some general information displayed in the gui.

gint gui_record_host_eq gconstpointer  rec1,
gconstpointer  rec2
 

Tells if two hit records come from the same host.

gint gui_record_name_eq gconstpointer  rec1,
gconstpointer  rec2
 

Tells if two hit records have the same filename.

gint gui_record_sha1_eq gconstpointer  rec1,
gconstpointer  rec2
 

Tells if two hit records have the same SHA1.

gint gui_record_sha1_or_name_eq gconstpointer  rec1,
gconstpointer  rec2
 

Tells if two hit records have the same SHA1 or the same name.

The targetted search feature by Andrew Meredith (andrew@anvil.org) now uses this function to filter input and avoid duplicates. Andrew, if this somehow breaks the intent, let me know at junkpile@free.fr.

This provides the following behavior :

  • If several hits with the same SHA1 are selected, only one SHA1 rule will be added even if the filenames differ (same as before).

  • If several hits with the same filename and no SHA1 are selected, only one filename rule will be added.

  • If two selected hits have the same filename, but one has an SHA1 and the other doesn't, both rules (filename and SHA1) will be added.

void gui_restore_window GtkWidget *  widget,
property_t  prop
 

void gui_save_window GtkWidget *  widget,
property_t  prop
 

void gui_update_files_scanned void   ) 
 

void gui_update_stats_frames void   ) 
 

void gui_update_traffic_stats void   ) 
 

void paned_restore_position GtkPaned *  paned,
property_t  prop
 

void paned_save_position GtkPaned *  paned,
property_t  prop
 

RCSID "$Id:misc.  c,
v 1.25 2006/01/10 10:28:53 cbiere Exp $" 
 

void update_stat guint32 *  max,
GtkProgressBar *  pg,
gnet_bw_stats_t stats,
gboolean  avg_mode,
gboolean  inout
[static]
 


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