Commit Graph

114 Commits

Author SHA1 Message Date
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
Guy Harris 3a4e71a724 Add "write_failure_alert_box()" to put up an alert box for a failed
attempt to write to a file (or close a file opened for writing).

Get rid of no-longer-needed #includes of <epan/filesystem.h>.

svn path=/trunk/; revision=10027
2004-02-11 01:37:13 +00:00
Guy Harris 727b913bbd Add an "open_failure_alert_box()" routine to pop up an alert box for a
failed attempt to open/create a file.

Fix one call to pass the right value for the "for_writing" flag.

svn path=/trunk/; revision=10026
2004-02-11 01:23:25 +00:00
Ulf Lamping 5297f06717 replaced every appearance of gtk_scrolled_window_new() with
scrolled_window_new().
added gtk_scrolled_window_set_policy(AUTOMATIC,AUTOMATIC) to
scrolled_window_new()
added GTK2's gtk_scrolled_window_set_shadow(GTK_SHADOW_IN)
to every place needed

svn path=/trunk/; revision=9999
2004-02-06 19:19:12 +00:00
Guy Harris 1980fa5dbf Pass ESD_BTN_OK rather than NULL as a second argument to
"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-31 03:22:42 +00:00
Ulf Lamping bd0c381cfd "Export Selected Packet Bytes" -> change all appearances to this text,
don't show up this dialog if no data *is* selected (didn't find an easy way
to control sensitivity of the menus by some mechanism :-(

svn path=/trunk/; revision=9891
2004-01-27 20:58:19 +00:00
Guy Harris b179725c39 Make "{byte,tree}_view_select()" return "gboolean", not "gint", as they
return TRUE or FALSE as a success/failure indication.

svn path=/trunk/; revision=9890
2004-01-27 20:36:48 +00:00
Ulf Lamping aa34344c3c always select the current item under cursor, before showing up the
corresponding context menu (right mouse click)

svn path=/trunk/; revision=9887
2004-01-27 19:46:52 +00:00
Ulf Lamping 8e2a930023 implemented dlg_button_row_new to get a standard function for
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-21 21:19:34 +00:00
Ulf Lamping e3dd2f5472 use stock buttons whereever possible,
added some ethereal specific stock icons

svn path=/trunk/; revision=9763
2004-01-21 03:54:32 +00:00
Ulf Lamping 453309c0c6 added some menuitems "View->Show" including show/hide of all main widgets,
saving the states in the recent file

svn path=/trunk/; revision=9726
2004-01-19 00:42:12 +00:00
Ulf Lamping 685a68e597 using button compatibility macros
svn path=/trunk/; revision=9638
2004-01-10 16:35:10 +00:00
Jörg Mayer df49dc9409 Include string.h to import strerror
svn path=/trunk/; revision=9597
2004-01-07 22:16:17 +00:00
Ulf Lamping bd37ba81eb added some simple_dialogs, if save of raw data fails for some reasons
svn path=/trunk/; revision=9594
2004-01-07 20:14:17 +00:00
Ulf Lamping 0f2765c1f8 removed some MSVC warnings (warning level 2)
svn path=/trunk/; revision=9460
2003-12-28 12:50:42 +00:00
Richard Sharpe 0023dcd0e1 A small patch from Kai Krueger <kai@kruegernetz.de> to ensure that we
keep the file name around long enough to use it when saving highlighted
data etc.

svn path=/trunk/; revision=9348
2003-12-18 20:36:45 +00:00
Ulf Lamping 1a2ecc19c3 removed some more MSVC warnings (type casting), GTK2 specific
svn path=/trunk/; revision=9333
2003-12-17 23:41:10 +00:00
Olivier Abad abb4aec1fe Use gtk compatibility macros (from compat_macros.h) instead of some gtk+
v1.2 functions which are deprecated in gtk+ v2.

Update OBJECT_SET_DATA macros to cast "data" to (gpointer).

svn path=/trunk/; revision=9296
2003-12-16 18:43:35 +00:00
Guy Harris f0b9d12b6a Don't use GNodes for the protocol tree, put the sibling pointer, and
pointers to the first *and* last child, in the "proto_node" structure
itself.  That saves us one level of indirection and memory allocation,
and lets us append to a tree by appending to the last child directly,
rather than having to scan through the list of siblings of the first
child to find the end of that list.

svn path=/trunk/; revision=9171
2003-12-04 10:59:34 +00:00
Guy Harris bb0eb4879f "select_file_cb()" only needs a title, not a "construct_args_t" -
"construct_args_t" is for use with filter dialogs, and the members other
than the title apply only to filter dialogs.

Have "select_file_cb()" actually use the title supplied to it.

svn path=/trunk/; revision=9125
2003-12-01 02:01:56 +00:00
Guy Harris 971d7e3816 Not all platforms have <unistd.h> - in particular, Windows doesn't.
If you're using "open()", "close()", "read()", "write()", etc., you
should include <io.h> on Windows.

svn path=/trunk/; revision=9123
2003-11-30 23:05:45 +00:00
Richard Sharpe fc6c270c4b Fix some warnings in proto_draw.c
svn path=/trunk/; revision=9122
2003-11-30 18:01:20 +00:00
Richard Sharpe 114c52bf0b Move print_file_cb out of gtk/print_dlg.c and into gtk/file_dlg.c and
rename it to select_file_cb to reflect its function.

While this cleans things up a bit, I am still not happy because now
filter_prefs.h must be included before file_dlg.h just to get
construct_args_t.

svn path=/trunk/; revision=9119
2003-11-30 04:21:55 +00:00
Richard Sharpe 02087e332f Add an entry in the byte_view pane that allows the user to save the highlighted
data to a file. This allows the user to select some stuff, and analyse it with
external tools, and is very useful for quickly prototying dissectors etc.

This works by retrieving the info that is needed to define where the selected
region is.

It puts up a dialog box that asks for the file to save in.

However, it is an ugly hack, because it reuses print_file_cb, while
print_file_cb should be moved into file_dlg.c.

It also needs to have some warning dialogs put up in error cases.

Finally, it would be good to be able to select a region in the byte_view,
which you can do with click and drag, and then have a menu item to save the
selected bytes.

svn path=/trunk/; revision=9116
2003-11-29 06:09:54 +00:00
Ronnie Sahlberg 9d88e58e51 remove another slow GMemChunk from ethereal making ethereal a little bit faster
svn path=/trunk/; revision=9085
2003-11-25 14:07:45 +00:00