Commit Graph

53 Commits

Author SHA1 Message Date
Guy Harris cc22748169 Have the routines to get interface lists take a pointer to a "gchar *"
as an argument, and, on an error, if they have an error message, have
them set that "gchar *" to point to a g_malloc()ed string containing the
error message, rather than taking a pointer to a buffer for that message
as an argument.  That's more like what's done in Wiretap, and doesn't
impose an upper limit on the lengths of those error messages.  If that
pointer is null, don't allocate the message string and return it.

Have that error message already have the "cant_get" processing applied
to it, so nobody other than those routines need to call the "cant_get"
routines to process the error messages.

Have get_airpcap_interface_list() explicitly set "*err" to the
appropriate error code.

Clean up indentation.

svn path=/trunk/; revision=20521
2007-01-21 23:45:36 +00:00
Anders Broman 05448fcc3d Ethereal->Wireshark
svn path=/trunk/; revision=18232
2006-05-28 17:19:08 +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
Ulf Lamping 71bcc9b28d some minor fixes to the Preferences tooltip texts
svn path=/trunk/; revision=18099
2006-05-06 12:57:54 +00:00
Ulf Lamping 79053183c5 remove dependencies to pcap.h, so getting an idea what needs to be done by dumpcap in addition to the things already done now
various dumpcap related code cleanup: mainly #include's and capture engine related stuff

svn path=/trunk/; revision=17327
2006-02-17 02:18:48 +00:00
Ulf Lamping 7e3a24418c rename pcap-....c/.h files to capture-pcap-....c/.h
this way, the capture prefix will "logically" group the files together and file browsers will also group them

we may want to move the files into a subdir capture later

svn path=/trunk/; revision=16691
2005-12-06 00:07:13 +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
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
Guy Harris 76c40f573a Always make the elements of the "text" array point to g_mallocated
strings, so that they can safely be g_freed.

svn path=/trunk/; revision=13373
2005-02-10 07:23:01 +00:00
Guy Harris 43869b46a8 Rename capture_combo_utils.{c,h} to capture_ui_utils.{c,h}, as the code
in there is for UI functions including, but not limited to, the combo
box in capture dialogs.

svn path=/trunk/; revision=13061
2005-01-16 02:56:28 +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 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 f0fc7264f4 From Pavel Kankovsky: the items pointed to by elements in the "text[]"
array are all "g_free()"d, so they have to be "g_malloc()"ed - instead
of setting some to "", set them to "g_strdup("")".

svn path=/trunk/; revision=11370
2004-07-13 05:43:59 +00:00
Ulf Lamping 17ca623b0f preference setting for the option to "avoid" the capture info dialog
svn path=/trunk/; revision=11195
2004-06-20 14:48:24 +00:00
Guy Harris f9be24cd13 On Windows, if "get_interface_list()" returns CANT_GET_INTERFACE_LIST
and the error message includes "Not enough storage is available
to process this command" or "The operation completed successfully",
suggest that the user install a WinPcap version later than 3.0 - this is
definitely a Frequently Asked Question on the Ethereal list.

svn path=/trunk/; revision=11143
2004-06-12 07:47:14 +00:00
Ulf Lamping eb60b3e063 some more dialog redesign and code cleanup
svn path=/trunk/; revision=11041
2004-05-31 11:22:58 +00:00
Ulf Lamping 3804c8ae9a interface options preference dialog: remove confusing second interface clist,
fix a bug making garbage of user supplied interface description

svn path=/trunk/; revision=11039
2004-05-31 09:23:14 +00:00
Ulf Lamping 8d121bfb92 use gtk_window_set_default_size() instead of WIDGET_SET_SIZE() for the dialogs,
as WIDGET_SET_SIZE() will prevent the user from shrinking the dialog,
and gtk_window_set_default_size() will not

svn path=/trunk/; revision=11021
2004-05-27 19:59:50 +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
Guy Harris d4bb41b15d Failure to get the list of interfaces should be reported as an error.
svn path=/trunk/; revision=10621
2004-04-17 01:10:09 +00:00
Ulf Lamping 7b62a629e8 replaced sprintf / snprintf by g_snprintf,
various other string related changes

svn path=/trunk/; revision=10373
2004-03-13 15:15:26 +00:00
Guy Harris 36ece5a17a Add a "window_new()" routine that creates a window of a given type, sets
the title, and arranges to set the icon for it.  Use that instead of
"gtk_window_new()" and separate calls to set the title and arrange to
set the icon.

Regularize #includes a bit.

Clean up white space.

svn path=/trunk/; revision=10054
2004-02-13 00:53:37 +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 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 949f1f2d07 using button compatibility macros
svn path=/trunk/; revision=9636
2004-01-10 16:27:43 +00:00
Ulf Lamping 3b77bfee59 removed some MSVC warnings (moved pcap.h before glib.h)
svn path=/trunk/; revision=9393
2003-12-21 12:19:39 +00:00
Guy Harris 4e5896fed7 From Nathan Jennings:
update the CList as you enter/modify options;

	give Windows users OS descriptions in the displayed devices
	list;

	display at least 5 rows in the lists;

	get rid of the "extra" CList for storing edited values.

svn path=/trunk/; revision=8552
2003-09-26 23:11:17 +00:00
Guy Harris 29ea42f868 If we have no interfaces, don't set the popdown list for interface combo
boxes.

svn path=/trunk/; revision=8443
2003-09-10 06:55:28 +00:00
Guy Harris 27ea7816ee Have "get_interface_list()" return a list of "if_info_t" structures
containing a pointer to an interface name and possibly a pointer to an
interface description (although that pointer might be null if no
description is available), rather than having the Windows version glue
together the name and description into a single string.

Supply for the Linux "any" device the same description that libpcap's
"pcap_findalldevs()" returns.

svn path=/trunk/; revision=8440
2003-09-10 05:35:26 +00:00
Guy Harris 935a07c593 From Nathan Jennings: fix a problem with empty descriptions.
svn path=/trunk/; revision=8435
2003-09-09 18:27:49 +00:00
Guy Harris ba400ac5fe From Nathan Jennings: give the "Edit..." window for the capture options
dialog the right icon, and make ESC cancel it.

svn path=/trunk/; revision=8422
2003-09-09 04:44:57 +00:00
Guy Harris 81fc518ec6 From Nathan Jennings:
support for user-supplied interface descriptions;

	support for hiding interfaces in drop-down list in capture
	dialog.

Clean up comments written to preferences file.

svn path=/trunk/; revision=8419
2003-09-08 21:44:42 +00:00
Olivier Abad 3cd4fed22d Use gtk1/gtk2 compatibility macros.
svn path=/trunk/; revision=6616
2002-11-11 18:57:00 +00:00
Jörg Mayer e4a2e2cefe Include cleanups in gtk and gtk2:
Remove unneded includes
Add include wrappers where missing

svn path=/trunk/; revision=6191
2002-09-05 18:48:52 +00:00
Jörg Mayer b147295e08 Remove redundant HAVE_LIBPCAP check (copied from gtk2)
svn path=/trunk/; revision=6158
2002-08-31 14:22:11 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Guy Harris ca6badc579 Get rid of some "unused variable" and "unused static function" warnings,
and some compile errors in Tethereal, when compiling without libpcap.

If libpcap is missing (whether that's detected at compile time or, as on
Windows, at run time), don't call any of the "capture_prefs" routines -
the routine to create the capture preferences page wasn't called, so the
other routines can try to refer to non-existent widgets and other items
and crash.

Get rid of the stub routines in "capture_prefs()" used when compiling
without libpcap, as they're no longer called.

svn path=/trunk/; revision=5888
2002-07-17 00:22:30 +00:00
Guy Harris e65f81cc5c Trim leading and trailing white space from the capture device in the
preference setting, and, if it's empty, treat that as an indication that
the user doesn't want to wire in a default device, and just wants the
first device in the list chosen.

svn path=/trunk/; revision=5773
2002-06-28 01:59:46 +00:00
Guy Harris ad6e52bd25 Get rid of an unused variable.
svn path=/trunk/; revision=5540
2002-05-24 07:05:44 +00:00
Gerald Combs ae64e9539c Save the whole capture device name in the preferences file. Under
Windows, this saves the description + device name.

svn path=/trunk/; revision=5534
2002-05-23 15:56:05 +00:00
Guy Harris 5fe414c555 From Joerg Mayer: use _U_ to flag unused arguments.
svn path=/trunk/; revision=4878
2002-03-05 11:56:00 +00:00
Guy Harris a0d7e90519 Make the blurbs for protocol preference items into tooltips. (This also
lets us add tooltips to other preference items whose widgets are created
with the "create_preference_XXX()" routines - just pass in a tooltip
text string rather than a null pointer.)

svn path=/trunk/; revision=4577
2002-01-20 20:05:18 +00:00
Guy Harris 0a03b0f73e Add a preferences page for the name resolution flags.
Separate the preferences value for those flags and the name resolution
code's value into separate variables; this means that the resolution
code no longer depends on the preferences code, and may let us
eventually have the current setting and the preference setting differ
(so that a user can temporarily override the preference setting without
causing subsequent saves of the preferences to save the temporary
value).

Add routines to create various types of widgets for preferences, and to
fetch the values for "enumerated" preferences, and use them both in the
code to handle hardwired preference pages and table-driven preference
pages.

svn path=/trunk/; revision=4536
2002-01-13 20:35:12 +00:00
Guy Harris 6437001da6 Get rid of unused variables.
Put the labels of check boxes to the left of the checkboxes,
right-aligned, and give all of them a colon at the end, to match the
style of module preferences.

svn path=/trunk/; revision=4534
2002-01-12 11:02:47 +00:00
Guy Harris ea02d23f06 While you're at it, use the key for the auto scroll option checkbox for
the pointer to the auto scroll options checkbox....

svn path=/trunk/; revision=4532
2002-01-12 09:19:59 +00:00
Guy Harris 0ad27ce8a7 Make the key for the capture preference window's pointer to the auto
scroll option checkbox distinct from the key for the pointer to the
real-time capture option checkbox, so thee auto scroll option checkbox
can be fetched.

svn path=/trunk/; revision=4531
2002-01-12 09:13:50 +00:00