Commit Graph

138 Commits

Author SHA1 Message Date
Ronnie Sahlberg 6fe839a61a coverity 187
i dont think this can trigger in the current code   but better safe than sorry  and it safeguards against future changes that might break this requirement.


dereferencing a nullpointer would cause crash of wireshark   in case a new bug is introduced making it possible for this variuable to be null.




svn path=/trunk/; revision=18543
2006-06-22 11:23:26 +00:00
Guy Harris 92552c2d76 Get rid of a bunch of "Ethereal"s and "ethereal"s in comments, GUI
strings, and function names.

svn path=/trunk/; revision=18205
2006-05-22 07:29:40 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Anders Broman 8bebcb8d8e From Greg Morris:
add copy functionality to the details window. Also includes a change in the copy function of the hex data window to allow copying just the text strings instead of all of the hex data.

svn path=/trunk/; revision=18129
2006-05-11 05:08:00 +00:00
Guy Harris 84aef00bad Move the file selection dialog routines to file_dlg.c, and give it a
header file.

#if 0 out some includes; if none of the builds have a problem with
that, I'll remove them.

svn path=/trunk/; revision=18036
2006-04-30 01:47:58 +00:00
Guy Harris 0ce9a23b25 Most of the stuff in file_dlg.c is specific to capture files, so rename
it to capture_file_dlg.c, and rename its header file.  We might want to
move the generic file dialog stuff to a file_dlg.c file (it's currently
in dlg_utils.c), and move the non-capture-file dialog stuff in
capture_file_dlg.c to another file.

svn path=/trunk/; revision=18034
2006-04-29 23:03:57 +00:00
Gerald Combs 80e5e0fb15 Copy over the file open/save code from the Win32 native branch.
The Windows-native routines were integrated by inserting

#if GTK_MAJOR_VERSION >= 2 && _WIN32
  win32_native_routine(GDK_WINDOW_HWND(top_level->window));
  return;
#endif

at the beginning of each GTK+ file routine.  There's probably a prettier
way to do this.

Some of the sizes need to be tweaked in win32-file-dlg.rc, but everything
seems to work.

Fix up whitespace.

svn path=/trunk/; revision=17285
2006-02-13 21:25:43 +00:00
Guy Harris 0dbf17b690 Allow a progress dialog to have "Stop" or "Cancel" as the "terminate
button"; "Stop" should be used for operations that can only be stopped
(meaning that what it's already done isn't undone), not cancelled
(meaning that whatever it's already done *is* undone), for which
"Cancel" is used.

Allow the merging process to be cancelled.

Clean up indentation.

Update some comments.

svn path=/trunk/; revision=16489
2005-11-12 11:05:02 +00:00
Ulf Lamping c3187174bf replace *a lot* of file related calls by their GLib counterparts. This is necessary for the switch to GTK 2.6 (at least on WIN32).
to do this, I've added file_util.h to wiretap (would file_compat.h be a better name?), and provide compat_macros like eth_open() instead of open(). While at it, move other file related things there, like #include <io.h>, definition of O_BINARY and alike, so it's all in one place.

deleted related things from config.h.win32

As of these massive changes, I'm almost certain that this will break the Unix build. I'll keep an eye on the buildbot so hopefully everything is working again soon.

svn path=/trunk/; revision=16403
2005-11-06 22:43:25 +00:00
Guy Harris eb7e8111c6 Fix uninitialized variable errors.
Rename some variables to make the names used in progress bars more
common.  (Should more of that functionality be moved into common
progress bar code?)

svn path=/trunk/; revision=16347
2005-10-27 20:18:50 +00:00
Guy Harris 0203c65739 Check on every iteration of a loop whether to pop up a dialog box,
rather than checking only on every progress bar update quantum, so that
if the update quantum is *very* large, we don't end up waiting longer
than the standard time for a dialog box before checking.

svn path=/trunk/; revision=16327
2005-10-27 06:45:37 +00:00
Ulf Lamping 642467ad5c I'm adding the "Expert Info" prototype now, as it seems to be in a state where others might have a look and probably already find it useful :-). Anyway, we can easily disable it at one or two places in the code if it get's in our way of a new release.
Please see: http://wiki.ethereal.com/Development/ExpertInfo for a complete overview of the intended feature and it's current state of implementation.

While I'm working on this, I've also added some more status result codes to the DCE/RPC and DCOM dissectors.

svn path=/trunk/; revision=15754
2005-09-11 16:55:34 +00:00
Ulf Lamping 06c86303e7 The protocol item in the protocol tree will have a gray background now, which makes it much better visible.
Add some more optional flags to the protocol items, so more "special cases" can be marked in the protocol tree.

New flags:
/** The protocol field has a bad checksum */
FI_CHECKSUM_ERROR
/** The protocol field has an unusual sequence (e.g. TCP window is zero) */
FI_SEQUENCE_WARNING
/** The protocol field has a bad sequence (e.g. TCP segment is lost) */
FI_SEQUENCE_ERROR

svn path=/trunk/; revision=15499
2005-08-21 15:23:48 +00:00
Jörg Mayer 0edcc8920e - Declare some functions static
- Add plugins_dlg.h
- Include .h files in their respective .c files
- Include .h and remove extern declarations in .c files
- set eol-style and keywords on gui_utils.[hc]

svn path=/trunk/; revision=15471
2005-08-20 14:02:00 +00:00
Jörg Mayer b55266d3c0 - Include ../ui_util.h into files that implement functions declard in
ui_util.h
- Replace one instance of ui_util.h by gui_utils.h

svn path=/trunk/; revision=15468
2005-08-20 12:57:52 +00:00
Ulf Lamping eafbbbcabb renamed ui_util.c/.h to gui_utils.c/.h to prevent confusion with identical named ui_util.h in / dir
svn path=/trunk/; revision=15465
2005-08-20 12:09:48 +00:00
Ulf Lamping d28861b607 removed tons of MSVC const related warnings.
This might at some places interfere with the changes for gcc4, we might have to negotiate in that case :-)

Please note that a lot of these warnings were GTK1.x related only!

svn path=/trunk/; revision=15286
2005-08-10 19:49:45 +00:00
Guy Harris 0632baee21 "g_locale_to_utf8()" returns a "gchar *", and the string it returns is
dynamically allocated.  Don't assign its result to "const gchar *".

svn path=/trunk/; revision=15266
2005-08-09 00:07:12 +00:00
Jörg Mayer 4e1f4b18ab More char -> const char warning fixes.
Removed (very few) casts that only change the warning message
  but don't remove it (with gcc-4).

svn path=/trunk/; revision=15227
2005-08-05 20:59:08 +00:00
Ulf Lamping 9afb969ff7 insensitive context menu "Expand Subtrees" if no protocol field is currently selected, sort and name the tree related menu items like the context menu ones
svn path=/trunk/; revision=14395
2005-05-18 19:30:18 +00:00
Ulf Lamping 2777289f85 removed various gcc warnings
svn path=/trunk/; revision=14246
2005-04-30 17:23:33 +00:00
Ulf Lamping 40222850f8 add keyboard expand/collapse in the tree view (with Left/Right keys) with GTK2
svn path=/trunk/; revision=14137
2005-04-19 20:46:35 +00:00
Ulf Lamping 0861927ce3 huge cleanup of capture file API (functions in file.c/file.h).
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-02-04 18:44:44 +00:00
Guy Harris bbe7f89742 Move prefs.c and prefs.h into the epan subdirectory.
svn path=/trunk/; revision=12115
2004-09-27 22:55:15 +00:00
Guy Harris ac982aa7a5 Move the stuff to handle ASCII <-> EBCDIC conversions to
"epan/charsets.c"; other character set translation code should perhaps
go there as well.

svn path=/trunk/; revision=11958
2004-09-10 22:59:37 +00:00
Guy Harris 6968bc1c0d "g_string_sprintfa()" might be deprecated in GLib 2.x, but it's all GLib
1.2[.x] has, and we support GLib 1.2[.x] - "g_string_append_printf()" is
just the new name for "g_string_sprintfa()", and you can still use
"g_string_sprintfa()" in GLib 2.x, so use that instead.

svn path=/trunk/; revision=11900
2004-09-04 20:25:06 +00:00
Richard Sharpe 5569136351 Add support for copying hex data to the clipboard. Submitted by Thomas
Palmer.

What we really should do is add this to the Edit menu as well.


svn path=/trunk/; revision=11883
2004-09-02 16:58:43 +00:00
Guy Harris fcfde0b0c0 Include "colors.h" to define BLACK and WHITE.
svn path=/trunk/; revision=11505
2004-07-24 06:38:33 +00:00
Guy Harris 8f79902cb3 Get rid of unneeded include of "colors.h".
svn path=/trunk/; revision=11496
2004-07-24 00:34:04 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
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-07-18 00:24:25 +00:00
Guy Harris fe1b0f99c4 In the GTK+ code, move the redefinition of "isprint()" to
"gtk/isprint.h", and include that in "follow_dlg.c" (which wasn't
including "gtkglobals.h" and thus wasn't getting the redefinition) and
"proto_draw.c" (which was including "gtkglobals.h" but now needs to
include "isprint.h" as well).

svn path=/trunk/; revision=11355
2004-07-09 23:02:38 +00:00
Guy Harris 272a2055ab On at least some platforms, a #define of O_BINARY is needed even if
<fcntl.h> is included, as <fcntl.h> doesn't define it.

svn path=/trunk/; revision=11276
2004-06-30 06:58:59 +00:00
Ulf Lamping a24b176c32 define of O_BINARY not needed, if fcntl.h is included
other #include related cleanups

svn path=/trunk/; revision=11272
2004-06-29 20:51:26 +00:00
Ulf Lamping 25e6749eb4 move font related stuff to new file font_utils.c/.h
do some font related renaming/code cleanup

svn path=/trunk/; revision=11166
2004-06-17 16:35:26 +00:00
Ulf Lamping 14bf83c340 add details for doxygen, various code cleanups as a result of this
svn path=/trunk/; revision=11052
2004-06-01 17:33:37 +00:00
Guy Harris a467bac215 Eliminate a no-longer-used routine.
svn path=/trunk/; revision=11050
2004-06-01 01:01:31 +00:00
Ulf Lamping 95f1ce8d4b directly use the file selection dialog instead of using an additional custom dialog
svn path=/trunk/; revision=11042
2004-05-31 12:06:28 +00:00
Ulf Lamping 7d37fc9d23 more code cleanup from dialog things:
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-26 03:49:24 +00:00
Ulf Lamping cc68368037 use new functions in window API (ui_util.h),
use window_new instead of dlg_window_new for the statistics windows
(as these are no dialog windows)
do some code cleanup

svn path=/trunk/; revision=10979
2004-05-23 23:24:07 +00:00
Guy Harris 6e014216a9 Tag unused parameters with _U_ to squelch GCC compiler warnings (they're
GTK+ callbacks so we don't get to change the calling sequence).

svn path=/trunk/; revision=10934
2004-05-21 00:18:46 +00:00
Ulf Lamping 8fea0f1db2 this is a hack, to workaround a bug in GTK2.x!
when changing the font size, even refilling of the corresponding
gtk_text_buffer doesn't seem to trigger an update.
The only workaround is to freshly select the frame, which will remove any
existing notebook tabs and "restart" the whole byte view again.

svn path=/trunk/; revision=10915
2004-05-18 00:05:12 +00:00
Ulf Lamping fbe2e42bb9 remove FI_LINK again,
as this info can be derived from the presence of the FT_FRAMENUM field

svn path=/trunk/; revision=10900
2004-05-15 00:41:27 +00:00
Ulf Lamping 9bd912b22b add support to link from specially marked fields to related packets,
a doubleclick will follow the link (GTK1 is working now too)

svn path=/trunk/; revision=10898
2004-05-14 18:02:38 +00:00
Ulf Lamping 1314808bd5 add support to link from specially marked fields to related packets,
a doubleclick will follow the link

svn path=/trunk/; revision=10892
2004-05-14 15:55:37 +00:00
Ulf Lamping 09962ebb64 make notebook tabs scrollable, if not all fits into the pane,
enable a popup menu on the notebook tabs, with the tab labels

svn path=/trunk/; revision=10828
2004-05-09 07:01:07 +00:00
Ulf Lamping d9118dc089 add PROTO_ITEM_SET_HIDDEN() and PROTO_ITEM_SET_GENERATED(),
this sets flags for later rendering of the field data

svn path=/trunk/; revision=10752
2004-05-01 15:15:08 +00:00
Guy Harris f38a9edcc9 Note that a custom widget might be the right way to speed up the
construction of the hex dump pane (so we don't need a progress bar(!)
while it's being filled in), and might have some other UI advantages as
well.

svn path=/trunk/; revision=10723
2004-04-28 20:56:43 +00:00
Ulf Lamping 018535b82f added a progress dialog box, while processing packet details,
activating packet details notebook pages, to avoid desegmenting GUI confusion

svn path=/trunk/; revision=10674
2004-04-23 19:43:06 +00:00
Guy Harris ddc5a1773a From Tomas Kukosa:
add Expand Tree to the View menu;

	make the Expand Tree context menu active iff the
	currently-selected item has a subtree;

	fix the GTK2 code for Expand Tree.

svn path=/trunk/; revision=10415
2004-03-20 06:34:09 +00:00
Ulf Lamping b083ba1ed4 bugfix for export selected data: win32 needs O_BINARY flag for open call,
otherwise it will do text mode translations (CRNL things) which isn't desired here

svn path=/trunk/; revision=10134
2004-02-20 17:31:00 +00:00