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

search.h File Reference

#include "gui.h"
#include "filter_core.h"
#include "if/core/search.h"
#include "if/core/bitzi.h"
#include "lib/hashlist.h"
#include "lib/prop.h"
#include "search_common.h"

Go to the source code of this file.

Data Structures

struct  search
 Structure for search results. More...


Functions

void search_gui_init (void)
void search_gui_shutdown (void)
gboolean search_gui_new_search_full (const gchar *query, time_t create_time, guint lifetime, guint32 reissue_timeout, gint sort_col, gint sort_order, flag_t flags, search_t **search)
 Create a new search and start it.

searchsearch_new_full (const gchar *, guint32, flag_t flags)
void search_gui_close_search (search_t *sch)
 Remove the search from the list of searches and free all associated ressources (including filter and gui stuff).

void search_gui_clear_search (search_t *sch)
 Clear all results from search.

void search_gui_remove_search (search_t *sch)
 Remove the search from the gui and update all widgets accordingly.

void search_gui_reset_search (search_t *sch)
 Reset the internal model of the search.

void search_gui_download_files (void)
 Download selected files.

void search_gui_discard_files (void)
 Discard selected files.

void search_gui_sort_column (search_t *search, gint column)
 Draws arrows for the given column of the GtkCTree and sorts the contents of the GtkCTree according to the sorting parameters set in search.

void search_gui_add_record (search_t *sch, record_t *rc, GString *vinfo, GdkColor *fg, GdkColor *bg)
 Adds the record to gth GtkCTree for this search.

gboolean gui_search_update_tab_label (struct search *)
 Update the label if nothing's changed or if the last update was recent.

void gui_search_clear_results (void)
 Removes all search results from the current search.

void gui_search_force_update_tab_label (struct search *)
 gui_search_force_update_tab_label

GtkCTreeNode * find_parent_with_sha1 (GHashTable *ht, gpointer key)
void search_gui_expand_all (void)
 Expand all nodes in tree for current search.

void search_gui_collapse_all (void)
 Expand all nodes in tree for current search.

void gui_search_set_enabled (struct search *sch, gboolean enabled)
 Flag whether search is enabled.

const GList * search_gui_get_searches (void)
void search_gui_set_clear_button_sensitive (gboolean flag)
void gui_search_get_colors (search_t *sch, GdkColor **mark_color, GdkColor **ignore_color, GdkColor **download_color)
 Extract the mark/ignore/download color.

void search_gui_start_massive_update (search_t *sch)
void search_gui_end_massive_update (search_t *sch)
void search_gui_metadata_update (const bitzi_data_t *data)
 Metadata Update.

gboolean search_gui_search_results_col_widths_changed (property_t prop)
 Callback to update the columns withs in the currently visible search.

gboolean search_gui_search_results_col_visible_changed (property_t prop)
 Callback to update the columns withs in the currently visible search.

void search_gui_queue_bitzi_by_sha1 (const record_t *rec, gpointer unused_udata)
 Update the search displays with the correct meta-data.


Function Documentation

GtkCTreeNode* find_parent_with_sha1 GHashTable *  ht,
gpointer  key
 

Returns:
the tree node corresponding to the given key, an atomized sha1.

void gui_search_clear_results void   ) 
 

Removes all search results from the current search.

void gui_search_force_update_tab_label struct search sch  ) 
 

gui_search_force_update_tab_label

Like search_update_tab_label but always update the label

void gui_search_get_colors search_t *  sch,
GdkColor **  mark_color,
GdkColor **  ignore_color,
GdkColor **  download_color
 

Extract the mark/ignore/download color.

void gui_search_set_enabled struct search sch,
gboolean  enabled
 

Flag whether search is enabled.

gboolean gui_search_update_tab_label struct search  ) 
 

Update the label if nothing's changed or if the last update was recent.

void search_gui_add_record search_t *  sch,
record_t rc,
GString *  vinfo,
GdkColor *  fg,
GdkColor *  bg
 

Adds the record to gth GtkCTree for this search.

This is where the search grouping (parenting) is done

void search_gui_clear_search search_t *  sch  ) 
 

Clear all results from search.

void search_gui_close_search search_t *  sch  ) 
 

Remove the search from the list of searches and free all associated ressources (including filter and gui stuff).

void search_gui_collapse_all void   ) 
 

Expand all nodes in tree for current search.

void search_gui_discard_files void   ) 
 

Discard selected files.

void search_gui_download_files void   ) 
 

Download selected files.

void search_gui_end_massive_update search_t *  sch  ) 
 

void search_gui_expand_all void   ) 
 

Expand all nodes in tree for current search.

const GList* search_gui_get_searches void   ) 
 

void search_gui_init void   ) 
 

void search_gui_metadata_update const bitzi_data_t data  ) 
 

Metadata Update.

gboolean search_gui_new_search_full const gchar *  querystr,
time_t  create_time,
guint  lifetime,
guint32  reissue_timeout,
gint  sort_col,
gint  sort_order,
flag_t  flags,
search_t **  search
 

Create a new search and start it.

Returns:
TRUE if search was sucessfully created and FALSE if an error happened. If the "search" argument is not NULL a pointer to the new search is stored there.

void search_gui_queue_bitzi_by_sha1 const record_t rec,
gpointer  unused_udata
 

Update the search displays with the correct meta-data.

(called from seach_cb.c)

void search_gui_remove_search search_t *  sch  ) 
 

Remove the search from the gui and update all widgets accordingly.

void search_gui_reset_search search_t *  sch  ) 
 

Reset the internal model of the search.

Called when a search is restarted, for example.

gboolean search_gui_search_results_col_visible_changed property_t  prop  ) 
 

Callback to update the columns withs in the currently visible search.

This is not in settings_gui because the current search should not be known outside this file.

gboolean search_gui_search_results_col_widths_changed property_t  prop  ) 
 

Callback to update the columns withs in the currently visible search.

This is not in settings_gui because the current search should not be known outside this file.

void search_gui_set_clear_button_sensitive gboolean  flag  ) 
 

void search_gui_shutdown void   ) 
 

void search_gui_sort_column search_t *  search,
gint  column
 

Draws arrows for the given column of the GtkCTree and sorts the contents of the GtkCTree according to the sorting parameters set in search.

void search_gui_start_massive_update search_t *  sch  ) 
 

struct search* search_new_full const gchar *  ,
guint32  ,
flag_t  flags
 


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