Commit Graph

59 Commits

Author SHA1 Message Date
Stig Bjørlykke 9660d9e9c2 Some packet_list.h -> main_packet_list.h changes.
svn path=/trunk/; revision=24953
2008-04-12 19:59:05 +00:00
Stig Bjørlykke 41e9bde037 Added an option to save column widths in the recent file.
Not 100% implemented for usage with configuration profiles with 
different column layout yet, as this requires some of the recent
values to be saved in each profile.

svn path=/trunk/; revision=24949
2008-04-12 19:37:05 +00:00
Ulf Lamping b51da2eb77 rename menu -> main_menu
remove old (and unused and confusing) ../menu.h

svn path=/trunk/; revision=24947
2008-04-12 19:18:26 +00:00
Anders Broman c973aa3830 Remove:
#ifdef NEED_G_ASCII_STRCASECMP_H
#include "g_ascii_strcasecmp.h"
#endif

svn path=/trunk/; revision=24868
2008-04-09 19:39:58 +00:00
Ulf Lamping b6c168413f fix some GTK1 related comments
svn path=/trunk/; revision=24862
2008-04-09 05:54:09 +00:00
Ulf Lamping 3b7fe5fc6c remove GTK1 code
svn path=/trunk/; revision=24823
2008-04-07 00:42:04 +00:00
Stig Bjørlykke 1e6d34261d get_persconffile_path() return malloc'd memory,
free it when we're done with the file name.

svn path=/trunk/; revision=24558
2008-03-04 22:02:24 +00:00
Stig Bjørlykke b5886343ea Save correct gui.time_format for "seconds since previous displayed packet"
and "seconds since epoch".

This fixes bug 2315.

svn path=/trunk/; revision=24508
2008-02-29 20:11:29 +00:00
Stig Bjørlykke a6c7284e3b Added cast of argument to isspace.
svn path=/trunk/; revision=24090
2008-01-14 19:19:47 +00:00
Stig Bjørlykke a2d1e9005d This patch adds support for configuration profiles, which can be used to
configure and use more than one set of preferences and configuration files.

This can be found in the "Configuration Profiles..." menu item from the Edit
menu, or by pressing Shift-Ctrl-A.  It's also possible to start wireshark
and tshark with a named profile by using the "-C ProfileName" option.
A new status pane in the main window will show the current profile.

The configuration files currently stored in the Profiles are:
- Preferences
- Capture Filters
- Display Filters
- Coloring Rules
- Disabled Protocols
- User Accessible Tables

The recent data are by design not added to the profile.

Planned future enhancements:
- make a more convenient function to switch between profiles
- add a "clone profile" button to copy an existing profile
- make the profiles list active and accept return as OK
- save users "Decode as" in the profile
- make new, clone and deletion of profiles more secure
- make some of the recent values available in the profile

This patch also fixes:
- setting default status pane sizes
- a bug setting status pane for packets when not having main lower pane.

svn path=/trunk/; revision=24089
2008-01-14 16:40:23 +00:00
Stig Bjørlykke 8b4e80384a Fixed a few "statement not reached" warnings and a "assignment type mismatch" warning.
svn path=/trunk/; revision=24085
2008-01-14 09:39:55 +00:00
Ronnie Sahlberg 2830cf2045 fix the path to include g_ascii_strcasecmp.h
svn path=/trunk/; revision=23636
2007-11-28 01:23:09 +00:00
Guy Harris 9c89cdaaa3 strcasecmp(), strncasecmp(), g_strcasecmp(), and g_strncasecmp() delenda
est.  Use g_ascii_strcasecmp() and g_ascii_strncasecmp(), and supply our
own versions if they're missing from GLib (as is the case with GLib
1.x).

In the code to build the list of named fields for Diameter, don't use
g_strdown(); do our own g_ascii_-style upper-case to lower-case mapping
in the hash function and use g_ascii_strcasecmp() in the compare
function.

We do this because there is no guarantee that toupper(), tolower(), and
functions that use them will, for example, map between "I" and "i" in
all locales; in Turkish locales, for example, there are, in both
upper case and lower case, versions of "i" with and without a dot, and
the upper-case version of "i" is "I"-with-a-dot and the lower-case
version of "I" is "i"-without-a-dot.  This causes strings that should
match not to match.

This finishes fixing bug 2010 - an earlier checkin prevented the crash
(as there are other ways to produce the same crash, e.g. a bogus
dictionary.xml file), but didn't fix the case-insensitive string matching.

svn path=/trunk/; revision=23623
2007-11-27 18:52:51 +00:00
Gerald Combs d2d4fcd903 Add routines under Windows to check if npf.sys is running, and to
fetch the major OS version.  If we're running Windows >= 6 (Vista)
_and_ npf.sys isn't running, warn the user in Wireshark and TShark.
Add a recent prefs item to disable the warning in Wireshark.

svn path=/trunk/; revision=22877
2007-09-15 00:18:17 +00:00
Gerald Combs 92802883a6 Change the "--enable-setuid-install" option to install dumpcap and TShark
setuid instead of Wireshark.  Remove the "DANGEROUS" notices, but leave it
disabled by default.  Whine if the user runs Wireshark or TShark as root.
Add a preference to disable the whining.  Add a "setuid-root" script that
can be used to switch dumpcap and TShark's setuid-ness on and off for
development and testing.  Update the release notes and README.packaging.

svn path=/trunk/; revision=22733
2007-08-30 00:24:40 +00:00
Stephen Fisher 8fd3ee0560 Remove almost all of the casts I committed recently and in place of
them, add -Wno-pointer-sign to CFLAGS when gcc will accept it.


svn path=/trunk/; revision=21253
2007-03-28 21:55:11 +00:00
Stephen Fisher 1909b97d4d Remove all warnings under Unix for the gtk/ directory.
svn path=/trunk/; revision=21160
2007-03-24 00:45:11 +00:00
Graeme Lunt 6fd190ecec U3 support for "recent" files.
When the "recent" file is written, any references to files on the U3 device itself are modified to have the drive replace with "$U3_DEVICE_PATH". Similarly, when the recent file is read, "$U3_DEVICE_PATH" is replaced with the current U3 device path.

This ensures that if/when the U3 device path changes when inserting it into different machines, recent captures on the U3 device itself can still be opened from the recent menu.


svn path=/trunk/; revision=20417
2007-01-13 16:06:28 +00:00
Guy Harris 72bc2582fc A callback in read_prefs_file() should return a prefs_set_pref_e, not an
int.

svn path=/trunk/; revision=20069
2006-12-08 01:11:20 +00:00
Stephen Fisher 75acf34518 From Douglas Pratley with trivial changes and documentation changes
by myself:

Corrected patch; epan/column.c and epan/column_utils.c were not included. This
one has now been properly tested against a clean checkout of today's code.

- New menu option available under view\time display format
- New sub-option (e) to -t switch for both wireshark and tshark
- Extended recent settings code to handle new value
- Did NOT add new explicit epoch time column


svn path=/trunk/; revision=20040
2006-12-05 03:19:51 +00:00
Ulf Lamping 58c388e903 add a "private_data" pointer to the read_prefs_file() function, which will be "tunneled" to the callback function. This seems to be generally a good idea - as a lot of GLib/GTK function doing similiar and I'll need this for the upcoming update mechanisms.
svn path=/trunk/; revision=19905
2006-11-15 23:33:39 +00:00
Gerald Combs 2fcb67b496 From Giorgio Tino: Add a "Don't show this message again" option to an
AirPcap warning dialog.  Fix a callback bug in simple_dialog.c.

svn path=/trunk/; revision=19747
2006-10-31 01:44:11 +00:00
Gerald Combs f9661850d1 Add support for AirPcap, an upcoming wireless product from CACE. Support
is disabled by default, and can be enabled by setting AIRPCAP_CONFIG
in config.nmake.  The code is currently limited to Windows, but should
be adaptable to other platforms.

The official announcement won't come until next week, so you'll have to
read the source for details.  :)

svn path=/trunk/; revision=18928
2006-08-16 18:01:25 +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
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
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
Ulf Lamping 723c80ea90 timestamp display precision:
- automatic adjustment depending on file format
- manual adjustment through menu items

save the setting in the recent file

svn path=/trunk/; revision=15534
2005-08-25 21:29:54 +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
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
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 7259a05303 Include <ctype.h> to define/declare "isspace()".
svn path=/trunk/; revision=14654
2005-06-16 06:33:49 +00:00
Ulf Lamping 047cdd0f2a First part to fix #148: use command line parameter -o not only for preferences but also for recent settings.
This way we can simply remove the GUI related command line parameters -B, -P and -T, which are useless now.

svn path=/trunk/; revision=14483
2005-05-30 04:06:22 +00:00
Ulf Lamping c997fbfae9 clarify some recent file entry descriptions
svn path=/trunk/; revision=14480
2005-05-29 14:09:58 +00:00
Ulf Lamping 729749c5b9 add a new checkitem "Colorize Packet List" into the View menu
keep it's setting in the recent file

svn path=/trunk/; revision=13929
2005-03-27 02:19:51 +00:00
Guy Harris 5ef0665d34 Create the directory for the preferences files before writing out the
"recent" file.

Have "write_recent()" handle putting up error windows for failed
attempts to write the "recent" file.

svn path=/trunk/; revision=13909
2005-03-26 01:05:29 +00:00
Guy Harris 92ee993e82 "prefs-int.h" belongs in epan, too.
svn path=/trunk/; revision=12168
2004-10-01 08:33:53 +00:00
Ulf Lamping 28c4511d07 from Thomas Palmer: add a combobox for the recently used capture filter strings
svn path=/trunk/; revision=12123
2004-09-28 18:04:15 +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 0e754b6725 If the pane separator positions are 0 (e.g., because this is GTK+
1.2[.x] and you can't get the positions), don't write them out, as
they'll get errors when they're read back in.

svn path=/trunk/; revision=11414
2004-07-18 19:54:07 +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 70e22b4aba Don't allow non-positive values for the main window width and height
values in the "recent" file.  Also, check for syntax errors in numerical
values.

Set the main window height, as well as the main window width, to default
values before we read in the values from the "recent" file.  (Use
non-positive values here if you want the default to be "don't set the
geometry" - note that you can't set one to a positive value and the
other one to a non-positive value and expect only one to be set; they
*both* have to be positive in order for the size to be set.)

Treat non-positive values for those settings in the "recent" structure
as an indication that we don't have values from them and that we should
therefore not set the window size.

svn path=/trunk/; revision=11353
2004-07-09 21:13:22 +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 d6d7816485 The "key" argument to "write_recent_geom()" is required (as it's called
through a pointer), but isn't used - mark it as unused.

svn path=/trunk/; revision=11036
2004-05-31 02:42:39 +00:00
Ulf Lamping 68c730e54d save window position/size/maximized state into recent file
(only help dialog for now)

svn path=/trunk/; revision=11032
2004-05-30 11:54:37 +00:00
Ulf Lamping 727b63bd8c Freely adjustable status line separations.
svn path=/trunk/; revision=10715
2004-04-27 19:16:11 +00:00
Ulf Lamping f59f209d4f save the position of the main window panes in the recent file,
and restore their position when program is started again (GTK2 only)

svn path=/trunk/; revision=10706
2004-04-25 23:45:12 +00:00
Guy Harris 5321ccb6c6 Revert to the previous scheme, wherein we always save the geometry
information - there's really no reason not to do so (it turned out not
to be the cause of the problem I saw wherein recent versions of Ethereal
were popping up the main window in an inconvenient place - the problem
wasn't that it was remembering the inconvenient place, it's something
else).

svn path=/trunk/; revision=10147
2004-02-20 23:04:50 +00:00
Guy Harris 98a225ac08 Don't save the geometry items unless the user asked to have them saved.
svn path=/trunk/; revision=10114
2004-02-19 10:48:28 +00:00
Ulf Lamping d50cbeb79a bugfix: use last_open_dir for the recent file,
instead of the somewhat duplicated value in the recent struct

svn path=/trunk/; revision=10077
2004-02-17 14:49:11 +00:00