[gq-commit] gq/src search.c,1.54,1.55 search.h,1.14,1.15
Status: Beta
Brought to you by:
sur5r
From: <sta...@us...> - 2003-10-19 13:59:48
|
Update of /cvsroot/gqclient/gq/src In directory sc8-pr-cvs1:/tmp/cvs-serv341 Modified Files: search.c search.h Log Message: * Added "Search Options" - a Button and popup window in search mode. Currently allows to specify chasing/showing referrals (not fully implemented), search scope and selection of attributes to show in the search result. * Some cleanups (moved local functions out of the published API) * Added code to better deal with column widths automatically Index: search.c =================================================================== RCS file: /cvsroot/gqclient/gq/src/search.c,v retrieving revision 1.54 retrieving revision 1.55 diff -C2 -d -r1.54 -r1.55 *** search.c 18 Oct 2003 08:27:00 -0000 1.54 --- search.c 19 Oct 2003 12:06:42 -0000 1.55 *************** *** 46,49 **** --- 46,50 ---- #include "i18n.h" #include "browse.h" + #include "schema.h" #include "state.h" #include "syntax.h" *************** *** 53,56 **** --- 54,66 ---- void add_all_to_browser(struct tab *tab); [...1152 lines suppressed...] + i++ ) { + int opt = gtk_clist_optimal_column_width(GTK_CLIST(new_main_clist), i); + if (opt < 40) { + opt = 40; + } + if (opt > 150) { + opt = 150; + } + gtk_clist_set_column_width(GTK_CLIST(new_main_clist), i, opt); + } ! gtk_clist_thaw(GTK_CLIST(new_main_clist)); free_attrlist(attrlist); add_to_search_history(tab); SEARCHTAB(tab)->search_lock = 0; } static void results_popup_menu(struct tab *tab, GdkEventButton *event, Index: search.h =================================================================== RCS file: /cvsroot/gqclient/gq/src/search.h,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** search.h 18 Oct 2003 08:27:00 -0000 1.14 --- search.h 19 Oct 2003 12:06:42 -0000 1.15 *************** *** 41,44 **** --- 41,51 ---- struct resultset *set; GList *history; + + int last_options_tab; + + int scope; + int chase_ref; + int max_depth; + GList *attrs; }; *************** *** 57,69 **** }; struct tab *new_searchmode(); void servername_changed_callback(struct tab *tab); - gint searchbase_button_pressed(GtkWidget *widget, GdkEventButton *event, struct tab *tab); - void findbutton_pressed_callback(struct tab *tab); - - int column_by_attr(struct attrs **attrlist, char *attribute); - int new_attr(struct attrs **attrlist, char *attr); - struct attrs *find_attr(struct attrs *attrlist, char *attr); - void free_cur_attrs(struct attrs *attrlist); char *make_filter(struct ldapserver *server, char *querystring); --- 64,71 ---- }; + #define SEARCHBOX_PADDING 2 + struct tab *new_searchmode(); void servername_changed_callback(struct tab *tab); char *make_filter(struct ldapserver *server, char *querystring); |