aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/find_dlg.c
AgeCommit message (Collapse)AuthorFilesLines
2005-02-04huge cleanup of capture file API (functions in file.c/file.h).Ulf Lamping1-11/+11
This includes: all functions in file.h now have a cf_ prefix, will have doxygen tags, will have the capture_file *cf as the first parameter and I tried to generalize the return values for non trivial functions. Hopefully, I didn't introduced any new bugs, as I had to change a lot of files... svn path=/trunk/; revision=13289
2005-01-20add some more online help functionality and help buttons at various dialog ↵Ulf Lamping1-2/+12
boxes, if a help page *is* available. However, the new help system needs a lot more work before completed. svn path=/trunk/; revision=13152
2004-09-27Move prefs.c and prefs.h into the epan subdirectory.Guy Harris1-1/+1
svn path=/trunk/; revision=12115
2004-08-13Move convert_string_to_hex() and convert_string_case() from gtk/find_dlg.cGerald Combs1-128/+22
to epan/strutil.c svn path=/trunk/; revision=11733
2004-07-19renamed filter_prefs to filter_dlg, as the filter settings are (well, for a ↵Ulf Lamping1-1/+1
long time) no longer part of the preferences dialog. svn path=/trunk/; revision=11436
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
they have LF at the end of the line on UN*X and CR/LF on Windows; hopefully this means that if a CR/LF version is checked in on Windows, the CRs will be stripped so that they show up only when checked out on Windows, not on UN*X. svn path=/trunk/; revision=11400
2004-05-26more code cleanup from dialog things:Ulf Lamping1-10/+12
changed window_xy (dialog) function calling in a lot of gtk files cleanup of file selection code cleanup in dlg_utils/file_dlg/ui_util Please report any problems!!! svn path=/trunk/; revision=11003
2004-05-26Don't capitalize "Filter" in "Display Filter" in the "Find" dialog box,Guy Harris1-2/+2
just as we don't capitalize "value" in "Hex value" in the same set of radio buttons. svn path=/trunk/; revision=11002
2004-04-15Rename a bunch of variables and routines that pertain to string searchGuy Harris1-51/+34
with "string" rather than "ascii", to make it clearer what they're involved with. Use "gtk_toggle_button_set_active()", not "gtk_toggle_button_set_state()" (the latter is a deprecated alias for the former, probably dating back to GTK+ 1.0[.x] - 1.2[.x] and later have "gtk_toggle_button_set_active()"). Do *NOT* change the radio buttons for the type of string search to do based on whether we're doing a string search or not - doing so means we don't correctly remember the type of string search. Get rid of code to fetch some values that we don't subsequently use. svn path=/trunk/; revision=10609
2004-02-29improved resizabilityUlf Lamping1-2/+2
svn path=/trunk/; revision=10267
2004-02-28redesign of the whole dialogUlf Lamping1-123/+187
svn path=/trunk/; revision=10261
2004-02-28The string in the Find Frame dialog box isn't necessarily a displayGuy Harris1-9/+100
filter string; check its syntax appropriately for the type of search we're doing when colorizing it. Searching for an empty text string is a pointless exercise; report that as an error. svn path=/trunk/; revision=10253
2004-02-27added dfilter string syntax check to various placesUlf Lamping1-1/+2
svn path=/trunk/; revision=10252
2004-02-11Add a routine to be used to put up alert boxes for invalid displayGuy Harris1-3/+4
filter expressions; use that in a number of places, so we use the same alert box. (More work is needed to figure out the right way to handle some other "dfilter_compile()" failures.) Use the error message from the display filter as the primary error, as that's the message that tells you what the underlying problem is. (The GNOME HIG says "In most situations the user should only need the primary text to make a quick decision", so the primary text should tell you what's wrong with the filter, not just that it's invalid. If there are messages from the display filter code that don't give enough information, or are a bit cryptic, such as "Unexpected end of filter string," those should be fixed in the display filter code.) Improve the error used if an empty filter is used for "find frame". svn path=/trunk/; revision=10025
2004-01-31Pass ESD_BTN_OK rather than NULL as a second argument toGuy Harris1-10/+10
"simple_dialog()"; NULL might be #defined to be a pointer expression on some platforms, causing compiler warnings (and, on platforms where a null pointer doesn't have all its bits 0, possibly causing misbehavior, although I don't think there are any such platforms on which Ethereal runs). Don't allow 0 as button mask argument to "simple_dialog()". Squelch a compiler warning. Report fatal problems as errors, not warnings. Report file I/O errors with "file_open_error_message()". Report file write errors (including those reported by "close()", e.g. some errors writing to an NFS server) when saving raw packet data to a file. svn path=/trunk/; revision=9915
2004-01-31renamed ESD_TYPE_CRIT to ESD_TYPE_ERROR toUlf Lamping1-10/+10
better reflect the real error text svn path=/trunk/; revision=9913
2004-01-21implemented dlg_button_row_new to get a standard function forUlf Lamping1-16/+6
layouting the dialog buttons, and use it where appropriate. This will help us with the GTK1/2 conflict on button layouts and will also result in a more consistent look of the dialogs at all. svn path=/trunk/; revision=9771
2004-01-20code cleanup and added some moreUlf Lamping1-2/+2
application specific stock items in toolbar.c, use them where appropriate svn path=/trunk/; revision=9747
2004-01-10using button compatibility macrosUlf Lamping1-69/+14
svn path=/trunk/; revision=9636
2003-12-04In GTK+ 2.x, "gtk_entry_get_text()" returns a "const gchar *"; assignGuy Harris1-2/+2
its value to pointer-to-const variables. svn path=/trunk/; revision=9161
2003-11-28renamed frame to packet in all GUI elementsUlf Lamping1-10/+10
svn path=/trunk/; revision=9113
2003-10-07Add Find Next/Find Previous submenu to conversation lists.Ronnie Sahlberg1-1/+31
By using Find Next/Previous you will jump to the next/previous matching packet in the ethereal main window. I could not get CTRL-N / CTRL-B to work and was too lazy to research. It would be nice if CTRL-N / CTRL-P would invoke the same thing as selecting /Find Frame/Find Next/EP1 <-> EP2 or /Find Frame/Find Previous/EP1 <-> EP2 from the menu. I could not figure out how to get gtk to do this. The person that adds CTRL-N/CTRL-B here will be a hero. svn path=/trunk/; revision=8635
2003-09-09In the Find dialog add periods or dashes to the list of allowed hexGerald Combs1-5/+5
separator characters. Update the Ethereal man page accordingly. svn path=/trunk/; revision=8420
2003-09-05Add a Find Frame item to the popup menu for the conversation listRonnie Sahlberg1-10/+19
that will open the find frame dialogue and preload the filter string with the conversation and the direction the user selected from the menu. svn path=/trunk/; revision=8386
2003-08-29Make the hex to string conversion code in find_dlg.c handle ':' charactersRonnie Sahlberg1-1/+5
such as you might find when doing "prepare" on a FT_BYTES field. So one need not delete the ':' characters manually svn path=/trunk/; revision=8309
2003-08-29Make the CList of character sets non-editable, so you only get to chooseGuy Harris1-2/+3
from what we offer. (XXX - should it be an option menu, instead?) svn path=/trunk/; revision=8308
2003-08-29Get rid of the EBCDIC stuff in the find dialog - it's not supported yet,Guy Harris1-75/+270
so we shouldn't torment the users by offering it. Check the string type and convert it to an internal representation in the GUI code; have the search code deal only with the internal representation. Save the case-sensitivity flag, and the indication of where string searches look, along with other search parameters. Upper-casify the string, for case-insensitive searches, in the GUI code; don't save the upper-casified string, so it doesn't SHOUT at you when you next pop up a "find" dialog. Convert the hex value string to raw binary data in the GUI code, rather than doing so in the search code. Check that it's a valid string. Connect the signals to the radio buttons after the pointers have been attached to various GUI items - the signal handlers expect some of those pointers to be attached, and aren't happy if they're not. Have "find_packet()" contain a framework for searching, but not contain the matching code; instead, pass it a pointer to a matching routine and an opaque pointer to be passed to the matching routine. Have all the routines that do different types of searching have their own matching routines, and use the common "find_packet()" code, rather than duplicating that code. Search for the Info column by column type, not by name (the user can change the name). When matching on the protocol tree, don't format the entire protocol tree into a big buffer - just have a routine that matches the text representation of a protocol tree item against a string, and, if it finds a match, sets a "we found a match flag" and returns; have that routine not bother doing any more work if that flag is set. (Unfortunately, you can't abort "g_node_children_foreach()" in the middle of a traversal.) Free the generated display filter code after a find-by-display-filter finishes. svn path=/trunk/; revision=8306
2003-08-28From Greg Morris: put borders around the options to delimit them andGuy Harris1-23/+94
indicate where they apply, and give tooltips to some of the options. Disable the "Filter:" button unless we're searching with a display filter. Use "Frame data" instead of "Hex" for the option to search the raw frame data, use "Decoded packet" instead of "Decode" for the option to search the strings in the protocol tree display, and use "Packet summary" instead of "Summary" for the option to search the Info column in the packet list display, to make it a bit clearer what's being searched. svn path=/trunk/; revision=8303
2003-08-11Applied the "Updated find capabilities...." from Greg Morris.Richard Sharpe1-8/+125
svn path=/trunk/; revision=8158
2003-08-05From Greg Morris: add support for case-insensitive full-text searches.Guy Harris1-6/+24
svn path=/trunk/; revision=8132
2003-07-22From Greg Morris: code to support searches for text or raw binary dataGuy Harris1-16/+119
in a frame in Find Frame. svn path=/trunk/; revision=8067
2003-04-24Fix a comment.Guy Harris1-2/+2
svn path=/trunk/; revision=7554
2003-01-15Add a new routine "filter_button_destroy_cb()", and make it theGuy Harris1-13/+3
"destroy" signal handler for any button that pops up a filter; if the button has a filter dialog box associated with it, it destroys that dialog box. Have the routines that create filter dialog boxes asociate the dialog box with the button that created it, so that if the button is destroyed the filter dialog box can be destroyed as well, and associate the button with the dialog box. This means that if a dialog box has a button to create a filter, we no longer have to have the destroy handler for the dialog box destroy any filters - that'll happen when the button in the dialog box is destroyed as part of the process of destroying the dialog box. Don't make the "Filter" buttons in the io_stat dialog box insensitive if there's already a filter dialog box open - we can have more than one open per dialog box. svn path=/trunk/; revision=6930
2002-11-11Use gtk1/gtk2 compatibility macros to reduce #ifdefs.Olivier Abad1-30/+13
svn path=/trunk/; revision=6610
2002-11-03Merge gtk and gtk2 directories.Olivier Abad1-7/+42
svn path=/trunk/; revision=6552
2002-09-05Include cleanups in gtk and gtk2:Jörg Mayer1-7/+1
Remove unneded includes Add include wrappers where missing svn path=/trunk/; revision=6191
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-11/+11
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-05-03From Didieer Gautheron:Guy Harris1-1/+29
Don't show progress bar for quick "Find Frame" searches Add "Find Next" and "Find Previous" to repeat searches Add documentation for "Find Next" and "Find Previous". svn path=/trunk/; revision=5378
2002-03-05From Joerg Mayer: use _U_ to flag unused arguments.Guy Harris1-5/+5
svn path=/trunk/; revision=4878
2002-01-21Include files from the "epan" directory and subdirectories thereof withGuy Harris1-5/+4
"epan/..." pathnames, so as to avoid collisions with header files in any of the directories in which we look (e.g., "proto.h", as some other package has its own "proto.h" file which it installs in the top-level include directory). Don't add "-I" flags to search "epan", as that's no longer necessary (and we want includes of "epan" headers to fail if the "epan/" is left out, so that we don't re-introduce includes lacking "epan/"). svn path=/trunk/; revision=4586
2001-02-01Create a more modular type system for the FT_* types. Put themGilbert Ramirez1-4/+4
into epan/ftypes. Re-write display filter routines using Lemon parser instead of yacc. Besides using a different tool, the new grammar is much simpler, while the display filter engine itself is more powerful and more easily extended. Add dftest executable, to test display filter "bytecode" generation. Add option to "configure" to build dftest or randpkt, both of which are not built by default. Implement Ed Warnicke's ideas about dranges in the new display filter and ftype code. Remove type FT_TEXT_ONLY in favor of FT_NONE, and have protocols registered as FT_PROTOCOL. Thus, FT_NONE is used only for simple labels in the proto tree, while FT_PROTOCOL is used for protocols. This was necessary for being able to make byte slices (ranges) out of protocols, like "frame[0:3]" Win32 Makefile.nmake's will be added tonight. svn path=/trunk/; revision=2967
2001-01-21Give various filter constructing/editing dialog boxes titles to reflectGuy Harris1-2/+6
what they were popped up for. svn path=/trunk/; revision=2923
2001-01-21In the process of destroying a filter editing dialog box, we get aGuy Harris1-2/+5
selection change event on the list of filters. Unfortunately, this can happen after some other widgets in that dialog box have already been destroyed - including some of the widgets that such a selection change event can change. This sometimes happened when "filter_prefs_delete()" hadn't been called, so the mechanism we had been using, with a Boolean datum attached to the dialog box, set in "filter_prefs_delete()" before we actually destroy the dialog box, wasn't sufficient to keep that from happening. Attach to the top-level window data items containing pointers to the widgets changed when a filter is selected from the list, give each of those widgets their own destroy callbacks, clear the pointer attached to the top-level widget when the widget is destroyed, and don't do anything to the widget when a filter is selected from the list if the pointer for that widget is null, as that means the widget's been destroyed and we *can't* do anything to it. Not all filter editing dialogs created on behalf of a "Filter:" button next to a text entry box should, when you click "OK", activate the text entry box; if the text entry box is part of a dialog box with multiple widgets, the user might not have filled in all of the items in that dialog box, so you shouldn't activate it for them. Add a mechanism by which, when creating a filter editing dialog box, you can specify whether the "OK" button should just fill in the text entry box or should fill it in and also activate it. svn path=/trunk/; revision=2922
2001-01-02Add a dialog box for constructing expressions that test a field in theGuy Harris1-2/+2
display tree, based on Jeff Foster's dialog box for selecting fields. Make the dialog box for browsing filters into a dialog box for constructing filters; make the "Apply" button and the "OK" button apply the filter in the text entry box in the dialog, not the currently selected filter (selecting a filter puts it in that text entry box, but the user may edit it afterwards, or may use the aforementioned dialog box to construct a filter not in the list). Get rid of extra declarations of "m_r_font" and "m_b_font" in "proto_draw.c"; they're declared in "gtk/gtkglobals.h", which it includes. svn path=/trunk/; revision=2805
2000-08-23Bleah. What was I thinking? "dlg_window_new()" should take the titleGuy Harris1-3/+2
for the dialog window as an argument (as various dialog creators in GTK+ do), not oblige every caller of it to cut-and-paste a "gtk_window_set_title()" call after it. svn path=/trunk/; revision=2345
2000-08-11Miscellaneous code cleaningLaurent Deniel1-3/+1
- add <stdarg.h> or <varargs.h> in snprintf.h and remove those inclusions in the other #ifdef NEED_SNPRINTF_H codes - remove the check of multiple inclusions in source (.c) code (there is a bit loss of _cpp_ performance, but I prefer the gain of code reading and maintenance; and nowadays, disk caches and VM are correctly optimized ;-). - protect all (well almost) header files against multiple inclusions - add header (i.e. GPL license) in some include files - reorganize a bit the way header files are included: First: #include <system_include_files> #include <external_package_include_files (e.g. gtk, glib etc.)> Then #include "ethereal_include_files" with the correct HAVE_XXX or NEED_XXX protections. - add some HAVE_XXX checks before including some system header files - add the same HAVE_XXX in wiretap as in ethereal Please forgive me, if I break something (I've only compiled and regression tested on Linux). svn path=/trunk/; revision=2254
2000-07-20Use ESD_TYPE_CRIT for most errors (the model used by various GUIs seemsGuy Harris1-4/+4
to use "warning" dialog boxes only to warn the user "if you do that, bad things may happen" *and* to offer them the option either to drive on or quit, so perhaps ESD_TYPE_CRIT should be used for all errors). However, put "Ethereal: Error" rather than "Ethereal: Critical" in the title bar, in the hopes that it'll make it clearer that Something Bad Happened. If the user specifies that captures should be saved to a user-specified file rather than a temporary file, report errors trying to create that file with "file_open_error_message()". Make the "for_writing" argument to "file_open_error_message()" a "gboolean", as it's either TRUE (if the file is being opened for writing) or FALSE (if it's being opened for reading). Report EISDIR as "XXX is a directory (folder), not a file.". svn path=/trunk/; revision=2143
2000-07-05Add a "dlg_window_new()" routine, which creates a GTK_WINDOW_DIALOGGuy Harris1-2/+2
window and makes it transient for the top-level window; the transient-for at least provides a hint to X window managers to minimize the dialog if the main window is minimized; keep the dialog on top of the main window in the Z order for windows; perhaps (if there are any window managers that actually *do* this) even put it atop the main window in the X-Y plane (KWM doesn't and I seem to remember that the Exceed X server for Windows doesn't). It's generally considered the Right Thing To Do for dialog boxes. Use that routine to create dialog boxes, rather than doing it directly in the code for that dialog box. svn path=/trunk/; revision=2112
2000-06-27Patch from Ben Fowler to rename the global variable "cf" to "cfile", toGuy Harris1-9/+9
make it easier to use grep to find all references to it without getting a lot of false hits and to check, after allocating the memory chunk for "frame_data" structures, that the allocation succeeded. svn path=/trunk/; revision=2092
2000-05-08Set up the buttons in the "Find Frame" and "Print" dialog boxes to useGuy Harris1-4/+12
mnemonics. svn path=/trunk/; revision=1916