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

gtk1/search_cb.c File Reference


Detailed Description

GUI filtering functions.

Author:
Raphael Manfredi

Richard Eckart

Date:
2001-2003
Author:
Raphael Manfredi
Date:
2005

#include "common.h"
#include <gdk/gdkkeysyms.h>
#include "gtk/gui.h"
#include "gtk/gtkcolumnchooser.h"
#include "gtk/search.h"
#include "gtk/statusbar.h"
#include "gtk/gtk-missing.h"
#include "gtk/bitzi.h"
#include "gtk/columns.h"
#include "gtk/misc.h"
#include "gtk/settings.h"
#include "search_cb.h"
#include "if/gui_property.h"
#include "if/gui_property_priv.h"
#include "if/gnet_property.h"
#include "if/bridge/ui2c.h"
#include "if/core/search.h"
#include "if/core/sockets.h"
#include "lib/atoms.h"
#include "lib/cq.h"
#include "lib/glib-missing.h"
#include "lib/iso3166.h"
#include "lib/vendors.h"
#include "lib/utf8.h"
#include "lib/override.h"

Defines

#define ROW_SELECT_TIMEOUT   100

Functions

gchar * search_details_get_text (GtkWidget *widget)
void search_set_xml_metadata (const record_t *rc)
void search_gui_clear_details (void)
void search_gui_append_detail (const gchar *name, const gchar *value)
void search_gui_refresh_details (const record_t *rc)
 Set or clear (when rc == NULL) the information about the record.
record_tsearch_gui_get_record (GtkCTree *ctree, GtkCTreeNode *node)
gint search_cb_autoselect (GtkCTree *ctree, GtkCTreeNode *node)
 Autoselects all searches matching given node in given tree, if the unexpanded root of the tree is selected.
void on_search_notebook_switch (GtkNotebook *notebook, GtkNotebookPage *unused_page, gint page_num, gpointer unused_udata)
 When the user switches notebook tabs, update the rest of GUI.
void on_button_search_clicked (GtkButton *unused_button, gpointer unused_udata)
 Create a search based on query entered.
void on_entry_search_activate (GtkEditable *unused_editable, gpointer unused_udata)
void on_entry_search_changed (GtkEditable *editable, gpointer unused_udata)
 When a search string is entered, activate the search button.
void on_button_search_clear_clicked (GtkButton *unused_button, gpointer unused_udata)
 Clear search results, de-activate clear search button.
void on_button_search_close_clicked (GtkButton *unused_button, gpointer unused_udata)
void on_button_search_download_clicked (GtkButton *unused_button, gpointer unused_udata)
void on_button_search_collapse_all_clicked (GtkButton *unused_button, gpointer unused_udata)
void on_button_search_expand_all_clicked (GtkButton *unused_button, gpointer unused_udata)
void on_button_search_filter_clicked (GtkButton *unused_button, gpointer unused_udata)
gboolean on_clist_search_results_key_press_event (GtkWidget *unused_widget, GdkEventKey *event, gpointer unused_udata)
gboolean on_clist_search_results_button_press_event (GtkWidget *widget, GdkEventButton *event, gpointer unused_udata)
 Handles showing the popup in the event of right-clicks and downloading for double-clicks.
void on_clist_search_results_click_column (GtkCList *clist, gint column, gpointer unused_udata)
 Sort search according to selected column.
void on_clist_search_details_selection_get (GtkWidget *unused_widget, GtkSelectionData *data, guint unused_info, guint unused_eventtime, gpointer unused_udata)
gboolean on_clist_search_details_key_press_event (GtkWidget *widget, GdkEventKey *event, gpointer unused_udata)
gint on_clist_search_details_selection_clear_event (GtkWidget *unused_widget, GdkEventSelection *unused_event)
void on_clist_search_details_select_row (GtkCList *unused_clist, gint row, gint unused_column, GdkEventButton *unused_event, gpointer unused_udata)
void on_clist_search_details_unselect_row (GtkCList *unused_clist, gint unused_row, gint unused_column, GdkEventButton *unused_event, gpointer unused_udata)
gint gui_record_cmp (gconstpointer p, gconstpointer q)
void row_selected_expire (cqueue_t *unused_cq, gpointer unused_udata)
void selected_row_changed (GtkCTree *ctree, GtkCTreeNode *node)
void on_ctree_search_results_select_row (GtkCTree *ctree, GList *node, gint unused_column, gpointer unused_udata)
 This function is called when the user selects a row in the search results pane.
void on_ctree_search_results_unselect_row (GtkCTree *ctree, GList *unused_node, gint unused_column, gpointer unused_udata)
void on_ctree_search_results_resize_column (GtkCList *unused_clist, gint column, gint width, gpointer unused_udata)
void on_button_search_passive_clicked (GtkButton *unused_button, gpointer unused_udata)
 Please add comment.
void search_gui_browse_selected (void)
 Request host browsing for the selected entries.
GSList * search_cb_collect_ctree_data (GtkCTree *ctree, GList *node_list, GCompareFunc cfn)
 Given a GList of GtkCTreeNodes, return a new list pointing to the shared record contained by the row data.
void add_filter (filter_t *filter, GFunc filter_add_func, GCompareFunc cfn)
void search_add_filter (GFunc filter_add_func, GCompareFunc cfn)
void global_add_filter (GFunc filter_add_func, GCompareFunc cfn)
void on_popup_search_drop_name_activate (GtkMenuItem *unused_menuitem, gpointer unused_udata)
 For all selected results, create a filter based on name.
void on_popup_search_drop_sha1_activate (GtkMenuItem *unused_menuitem, gpointer unused_udata)
 For all selected results, create a filter based on sha1.
void on_popup_search_drop_host_activate (GtkMenuItem *unused_menuitem, gpointer unused_udata)
 For all selected results, create a filter based on host.
void on_popup_search_drop_name_global_activate (GtkMenuItem *unused_menuitem, gpointer unused_udata)
 For all selected results, create a global filter based on name.
void on_popup_search_drop_sha1_global_activate (GtkMenuItem *unused_menuitem, gpointer unused_udata)
 For all selected results, create a global filter based on sha1.
void on_popup_search_drop_host_global_activate (GtkMenuItem *unused_menuitem, gpointer unused_udata)
 For all selected results, create a global filter based on host.
void on_popup_search_config_cols_activate (GtkMenuItem *unused_menuitem, gpointer unused_udata)
 Please add comment.
void on_popup_search_metadata_activate (GtkMenuItem *unused_menuitem, gpointer unused_udata)
 Queue a bitzi queries from the search context menu.
void search_gui_callbacks_shutdown (void)

Variables

gint search_details_selected_row = -1
gchar * selected_text
record_tselected_record
GtkCList * clist_search_details
cevent_trow_selected_ev


Define Documentation

#define ROW_SELECT_TIMEOUT   100
 


Function Documentation

void add_filter filter_t filter,
GFunc  filter_add_func,
GCompareFunc  cfn
[static]
 

void global_add_filter GFunc  filter_add_func,
GCompareFunc  cfn
[static]
 

gint gui_record_cmp gconstpointer  p,
gconstpointer  q
[static]
 

void on_button_search_clear_clicked GtkButton *  unused_button,
gpointer  unused_udata
 

Clear search results, de-activate clear search button.

void on_button_search_clicked GtkButton *  unused_button,
gpointer  unused_udata
 

Create a search based on query entered.

void on_button_search_close_clicked GtkButton *  unused_button,
gpointer  unused_udata
 

void on_button_search_collapse_all_clicked GtkButton *  unused_button,
gpointer  unused_udata
 

void on_button_search_download_clicked GtkButton *  unused_button,
gpointer  unused_udata
 

void on_button_search_expand_all_clicked GtkButton *  unused_button,
gpointer  unused_udata
 

void on_button_search_filter_clicked GtkButton *  unused_button,
gpointer  unused_udata
 

void on_button_search_passive_clicked GtkButton *  unused_button,
gpointer  unused_udata
 

Please add comment.

gboolean on_clist_search_details_key_press_event GtkWidget *  widget,
GdkEventKey *  event,
gpointer  unused_udata
 

void on_clist_search_details_select_row GtkCList *  unused_clist,
gint  row,
gint  unused_column,
GdkEventButton *  unused_event,
gpointer  unused_udata
 

gint on_clist_search_details_selection_clear_event GtkWidget *  unused_widget,
GdkEventSelection *  unused_event
 

void on_clist_search_details_selection_get GtkWidget *  unused_widget,
GtkSelectionData *  data,
guint  unused_info,
guint  unused_eventtime,
gpointer  unused_udata
 

void on_clist_search_details_unselect_row GtkCList *  unused_clist,
gint  unused_row,
gint  unused_column,
GdkEventButton *  unused_event,
gpointer  unused_udata
 

gboolean on_clist_search_results_button_press_event GtkWidget *  widget,
GdkEventButton *  event,
gpointer  unused_udata
 

Handles showing the popup in the event of right-clicks and downloading for double-clicks.

void on_clist_search_results_click_column GtkCList *  clist,
gint  column,
gpointer  unused_udata
 

Sort search according to selected column.

gboolean on_clist_search_results_key_press_event GtkWidget *  unused_widget,
GdkEventKey *  event,
gpointer  unused_udata
 

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

void on_ctree_search_results_select_row GtkCTree *  ctree,
GList *  node,
gint  unused_column,
gpointer  unused_udata
 

This function is called when the user selects a row in the search results pane.

Autoselection takes place here.

void on_ctree_search_results_unselect_row GtkCTree *  ctree,
GList *  unused_node,
gint  unused_column,
gpointer  unused_udata
 

void on_entry_search_activate GtkEditable *  unused_editable,
gpointer  unused_udata
 

void on_entry_search_changed GtkEditable *  editable,
gpointer  unused_udata
 

When a search string is entered, activate the search button.

void on_popup_search_config_cols_activate GtkMenuItem *  unused_menuitem,
gpointer  unused_udata
 

Please add comment.

void on_popup_search_drop_host_activate GtkMenuItem *  unused_menuitem,
gpointer  unused_udata
 

For all selected results, create a filter based on host.

void on_popup_search_drop_host_global_activate GtkMenuItem *  unused_menuitem,
gpointer  unused_udata
 

For all selected results, create a global filter based on host.

void on_popup_search_drop_name_activate GtkMenuItem *  unused_menuitem,
gpointer  unused_udata
 

For all selected results, create a filter based on name.

void on_popup_search_drop_name_global_activate GtkMenuItem *  unused_menuitem,
gpointer  unused_udata
 

For all selected results, create a global filter based on name.

void on_popup_search_drop_sha1_activate GtkMenuItem *  unused_menuitem,
gpointer  unused_udata
 

For all selected results, create a filter based on sha1.

void on_popup_search_drop_sha1_global_activate GtkMenuItem *  unused_menuitem,
gpointer  unused_udata
 

For all selected results, create a global filter based on sha1.

void on_popup_search_metadata_activate GtkMenuItem *  unused_menuitem,
gpointer  unused_udata
 

Queue a bitzi queries from the search context menu.

void on_search_notebook_switch GtkNotebook *  notebook,
GtkNotebookPage *  unused_page,
gint  page_num,
gpointer  unused_udata
 

When the user switches notebook tabs, update the rest of GUI.

This may be obsolete as we removed the tabbed interface --Emile 27/12/03

void row_selected_expire cqueue_t unused_cq,
gpointer  unused_udata
[static]
 

void search_add_filter GFunc  filter_add_func,
GCompareFunc  cfn
[static]
 

gint search_cb_autoselect GtkCTree *  ctree,
GtkCTreeNode *  node
[static]
 

Autoselects all searches matching given node in given tree, if the unexpanded root of the tree is selected.

Otherwise, select only the node on which they clicked.

Returns:
the amount of entries selected.

GSList* search_cb_collect_ctree_data GtkCTree *  ctree,
GList *  node_list,
GCompareFunc  cfn
 

Given a GList of GtkCTreeNodes, return a new list pointing to the shared record contained by the row data.

List will have to be freed later on.

gchar* search_details_get_text GtkWidget *  widget  ) 
 

void search_gui_append_detail const gchar *  name,
const gchar *  value
 

void search_gui_browse_selected void   ) 
 

Request host browsing for the selected entries.

void search_gui_callbacks_shutdown void   ) 
 

void search_gui_clear_details void   ) 
 

record_t* search_gui_get_record GtkCTree *  ctree,
GtkCTreeNode *  node
 

void search_gui_refresh_details const record_t rc  )  [static]
 

Set or clear (when rc == NULL) the information about the record.

void search_set_xml_metadata const record_t rc  )  [static]
 

void selected_row_changed GtkCTree *  ctree,
GtkCTreeNode *  node
[static]
 


Variable Documentation

GtkCList* clist_search_details [static]
 

cevent_t* row_selected_ev [static]
 

gint search_details_selected_row = -1 [static]
 

record_t* selected_record [static]
 

gchar* selected_text [static]
 


Generated on Sat Jun 30 17:53:30 2007 for gtk-gnutella by  doxygen 1.3.9.1