Commit Graph

66 Commits

Author SHA1 Message Date
Jakub Zawadzki 65db82872c When including <epan/prefs.h> don't force inclusion of <epan/uat.h>
svn path=/trunk/; revision=53769
2013-12-03 22:16:49 +00:00
Guy Harris db25270df8 Move the epan/filesystem.c routines to wsutil; they're not specific to
packet dissection, they're specific to the entire Wireshark suite of
programs.

svn path=/trunk/; revision=53377
2013-11-17 02:55:14 +00:00
Bill Meier 19f63eb2bd Revert SVN #52650 as per discussion on wireshark-dev
svn path=/trunk/; revision=52671
2013-10-18 15:08:19 +00:00
Anders Broman 26ad68d45b Prepend to lists rather than append as that's more efficient.
svn path=/trunk/; revision=52650
2013-10-16 20:02:14 +00:00
Anders Broman 09c5152fa7 From Cal Turney:
Unrecognized preferences and color filters created in proprietary or older versions are discarded when saved.

If the user attempts to save the preferences or colorfilters file, a popup is displayed that warns that unrecognized prefs or color filters have been detected and will be discarded if the save operation is allowed to proceed. In the case of Preferences, the popup message includes the version at which the file was last saved.  A "Continue without Saving" button is provided so that the user can save the profile under a different name.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8942

svn path=/trunk/; revision=50716
2013-07-18 04:28:36 +00:00
Anders Broman e9d236ec0b Backing out r50690 (exept simple_dialog)
struct FILE is different on windows vs *nix


https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8942

svn path=/trunk/; revision=50691
2013-07-17 05:52:51 +00:00
Anders Broman e0341f776c From Cal Turney:
Unrecognized preferences and color filters created in proprietary or older versions are discarded when saved.

If the user attempts to save the preferences or colorfilters file, a popup is displayed that warns that unrecognized prefs or color filters have been detected and will be discarded if the save operation is allowed to proceed. In the case of Preferences, the popup message includes the version at which the file was last saved.  A "Continue without Saving" button is provided so that the user can save the profile under a different name.

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8942

svn path=/trunk/; revision=50690
2013-07-17 04:52:19 +00:00
Jeff Morriss c2ced4a2ab Don't try to open <home>/.wireshark on Windows: Wireshark hasn't written to
that directory since 2001 and reading from that directory was only left in for
backwards compatibility with versions prior to r4702.  I think it's now safe
to remove that backwards compatibility.

This eliminates the last argument of get_persconffile_path().

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8437

svn path=/trunk/; revision=48797
2013-04-09 02:48:03 +00:00
Bill Meier 2115cd7696 color_edit_dlg update:
- Significantly simplify & rework code;
- Use GtkColorChooser instead of GtkColorSelection if GTK 3.4 or newer.
- Minor UI cleanup (default buttons & etc)
- Fix crash which occurred in the (existing) GTK3 related code.
- Fix some other relatively minor bugs (including some minor memory leaks);
- Remove some old, commented-out code;
- Use a more consistent naming scheme for certain variables.

svn path=/trunk/; revision=47958
2013-02-28 23:05:09 +00:00
Bill Meier 6533174856 Use consistent indentation; Add editor modelines.
svn path=/trunk/; revision=47917
2013-02-27 16:15:18 +00:00
Jeff Morriss 3551a86c36 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45015
2012-09-20 01:29:52 +00:00
Jörg Mayer 12a0aa4849 - Replace packet_list_recreate_visible_rows -> packet_list_recreate_visible_rows_list
- Replace new_packet_list_ -> packet_list_


svn path=/trunk/; revision=44765
2012-09-04 02:35:25 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Guy Harris d7b2aad043 Move some headers for UI stuff, and the alert_box.c UI-specific file, to
the ui directory.  (Perhaps some other files that would be used by all
flavors of Wireshark, for any GUI toolkit or for someting such as
ncurses, and not for any command-line tool such as TShark, should be
moved there as well.)

Shuffle some #includes to put the "ui/XXX.h" includes together.

svn path=/trunk/; revision=40529
2012-01-16 01:07:52 +00:00
Anders Broman 706ea4dbd2 Fix indentation.
svn path=/trunk/; revision=38573
2011-08-17 07:10:33 +00:00
Stig Bjørlykke 6bdd7eed16 Renamed "___tmp_color_filter___" to "___conversation_color_filter___"
in the coloring rule name to better describe where it comes from.

svn path=/trunk/; revision=37859
2011-07-01 21:13:40 +00:00
Stig Bjørlykke 8443bbbf75 Replace all strerror() with g_strerror().
Remove our local strerror implementation.
Mark strerror as locale unsafe API.

This fixes bug 5715.

svn path=/trunk/; revision=37812
2011-06-28 09:00:11 +00:00
Guy Harris 1372515b02 More eradication of old-style function definitions.
svn path=/trunk/; revision=37216
2011-05-17 22:18:32 +00:00
Guy Harris b6c370c994 Get rid of a cast that was causing alignment warnings and that was bogus
anyway (the second argument to g_slist_find_custom is a gconstpointer,
not a gpointer * or a gconstpointer *).

svn path=/trunk/; revision=36863
2011-04-26 02:53:58 +00:00
Chris Maynard 41c433856f Display a console warning instead of a simple_dialog for invalid color filters.
svn path=/trunk/; revision=36173
2011-03-08 21:21:48 +00:00
Stephen Fisher a96e3dbe3b A little more old packet list cleanup
svn path=/trunk/; revision=36172
2011-03-08 20:23:48 +00:00
Sake Blok 307c0d70fb Removal of the old packet-list in favor of the new packet list.
It compiles with "./configure without options" on my Mac. Let's see what the buildbots have to say about it :-)


svn path=/trunk/; revision=36161
2011-03-08 01:52:25 +00:00
Bill Meier 2e4f755e13 Define some vars & fcns as static;
Also: do some minor reformmating and cleanup of whitespace.

svn path=/trunk/; revision=34492
2010-10-12 19:26:07 +00:00
Guy Harris 042b27ba9c Squelch some compiler warnings.
svn path=/trunk/; revision=32079
2010-03-02 00:26:51 +00:00
Stig Bjørlykke 2f199b9d96 Made some functions static.
svn path=/trunk/; revision=30616
2009-10-19 14:21:11 +00:00
Kovarththanan Rajaratnam 3ea9409792 Store 'color_filter' as const in 'frame_data'
svn path=/trunk/; revision=30051
2009-09-21 18:48:53 +00:00
Kovarththanan Rajaratnam 5c51aacb21 Add NEW_PACKET_LIST guard to color_filters_colorize_packet()
svn path=/trunk/; revision=29729
2009-09-06 06:07:53 +00:00
Bill Meier 94f28dd8f9 (FWIW) One step towards including stdio.h & stdlib.h only when req'd.
svn path=/trunk/; revision=29568
2009-08-26 19:27:49 +00:00
Anders Broman ca335d25cb From Kovarththanan Rajaratnam:
- Compute and cache color/custom filters dynamically.
- Delay column construction.

svn path=/trunk/; revision=29370
2009-08-10 20:52:56 +00:00
Stephen Fisher edc8ae64f1 Introduce packet list coloring for the NEW_PACKET_LIST. One caveat: when
enabling/disabling the coloring of the packet list from the menus, the user
has to drag the mouse cursor over each displayed row to take away/add the
coloring.  Dragging the scroll bar up or down will also take care of this as
only the displayed rows are colored.


svn path=/trunk/; revision=29142
2009-07-20 06:21:35 +00:00
Stephen Fisher e6d0686f7b Introduce experimental new feature: GTK2 tree view based packet list
To use the GTK2 based packet list, define NEW_PACKET_LIST when compiling.
To do this with gcc, set the environment variable CPPFLAGS to
"-DNEW_PACKET_LIST" and re-run configure.

Many features do not yet work.  This work began with prototypes by Ulf
quite a while back.  I've put quite a bit of work into this so far and
as discussed with a few of the core team members at Sharkfest09 and it was
decided that it would be best to commit what I have so far to allow others to
help work on this.


svn path=/trunk/; revision=28892
2009-06-30 18:05:04 +00:00
Jeff Morriss a5cee04fad Move the file utility functions from wiretap to libwsutil so that
libwireshark (and the plugins using those functions) do not depend on
wiretap on Windows.

While doing that, rename the eth_* functions to ws_*.

svn path=/trunk/; revision=25354
2008-05-22 15:46:27 +00:00
Bill Meier a2b19b3603 Fix another compile error ....
svn path=/trunk/; revision=24484
2008-02-27 00:24:24 +00:00
Jeff Morriss 2389b57232 get_datafile_path() and get_persconffile_path() return malloc'd memory,
free it when we're done with the file name.

svn path=/trunk/; revision=24478
2008-02-26 19:13:43 +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
Sake Blok 9a2d18d386 Changes the name of the menu item "View/Reset Coloring" to
"View/Reset Coloring 1-10" and adds sensitivity to it so that
it will be greyed out when none of the temporary color filters
are used.

(as per discussion on wireshark-dev some time ago)


svn path=/trunk/; revision=23879
2007-12-15 23:38:29 +00:00
Sake Blok f9ca33580f Make it possible to "move" a filter around the temporary coloring rules
svn path=/trunk/; revision=23585
2007-11-25 15:55:45 +00:00
Sake Blok 61e7574a5c Reset the temporary coloring filters to defaults instead of doing it
implicitly by calling "color_filters_init()". This should probably
fix the crashes experienced when pressing ctrl-space a couple of times


svn path=/trunk/; revision=23583
2007-11-25 14:17:56 +00:00
Sake Blok db2f6ce546 Fixes crashing when opening color filters and pressing OK
(introduced in SVN 23560)


svn path=/trunk/; revision=23582
2007-11-25 12:36:33 +00:00
Sake Blok 9b6f806089 This patch adds (ten) temporary coloring rules which will only live until Wireshark is
quit. Temporary coloring filters can be set by:

- pressing <ctrl>-<digit> will create a conversation coloring filter based on the
  addresses of the currently selected packet (order TCP/UDP/IP/Ethernet)
  This can also be achieved from the "View|Colorize Conversation" menu.

- Rightclicking on a packet in the packet-list will give the option to
  "Colorize Conversation" just as "Conversation Filter" does.

- Rightclicking on an item in the packet-detail-list will give the option to
  "Colorize with filter" which works similar to "Apply as filter"

Temporary filters can be cleared from the same menus or by pressing <ctrl>-<space>.

This patch also adds an item to the above mentioned menu's to add a permanent color filter
in the same way.


The colors for the temporary coloring rules are now hardcoded as I do not know
how to change the color of menu-items and therefore I chose to use icons to
show the actual color of each of the ten temporary coloring rules. Is it at all
possible to have different menu items in different colors?

One other way of solving this is to recreate the icons on the fly after changing
the colors. I will have a look into that once it is clear whether I can use 
different colors within the menu structure.


svn path=/trunk/; revision=23560
2007-11-24 11:38:16 +00:00
Sake Blok 508e268063 This patch makes it possible to disable individual coloring rules
without having to delete them. The patch has been tested on
Fedora-7 with GTK+ 1.2.10 and GTK+ 2.10.11.

Since I don't know how to use "strikethrough" in clists in GTK1
there is a little difference in how the disabled coloring rules
are displayed. In GTK2 they are striked through and in GTK1
they are shown in lightgrey on a white background.

Any info on how to use strikthrough in clists within GTK1 is more
than welcome :-)


svn path=/trunk/; revision=23421
2007-11-10 15:18:49 +00:00
Richard van der Hoff 0c3e8b7c31 From Florent DROUIN <florent.drouin@alcatel.fr>, bug 1518:
Fix for g_assert when clicking 'OK' on colour filters dialogue whilst
individual filter edit window is open. 


svn path=/trunk/; revision=22572
2007-08-21 21:15:57 +00:00
Ulf Lamping ba962a91ea fix 1203 as found by stephen fisher
svn path=/trunk/; revision=19839
2006-11-06 23:59:49 +00:00
Guy Harris ea6f745160 Fix some compiler warnings.
svn path=/trunk/; revision=19470
2006-10-10 08:07:14 +00:00
Ulf Lamping 7a7b422fa9 fix the memory leak problem mentioned lately by adding and using color_filters_cleanup()
svn path=/trunk/; revision=19422
2006-10-03 23:24:48 +00:00
Ulf Lamping 0da877169b changes of the coloring rules sometimes crashed as dissection keeps pointers to the color_filter for later reference -> simply deleting the filters leave the pointers invalid -> crash.
for now, don't delete the filters but keep them floating around in memory (leaking) -> at least better than crashing

svn path=/trunk/; revision=19421
2006-10-03 22:32:03 +00:00
Ulf Lamping 9e6c7b11ae Implement a real "Cancel" button for the coloring rules dialog - this was a hard one! It seems to be working without bugs and as designed now.
As this was a huge internal change, new bugs are very probable - please report.

The implementation isn't still perfect, a new dialog internal list could possibly be removed again. 

However, I want to check in at this condition, just in case I make things worse - again.

svn path=/trunk/; revision=19413
2006-10-03 18:39:36 +00:00
Ulf Lamping 59d206d18e further code cleanup: don't use the term "marked" for the color filters, the right term is "selected". That caused me "concerns" wether the marked feature of the packet list was involved - which is actually not
svn path=/trunk/; revision=19399
2006-10-02 23:01:33 +00:00
Ulf Lamping b2c8fb8f55 refactor apply_color_filter() as it was a bit confusing - it will also be a bit faster now -
and some other minor code cleanup

svn path=/trunk/; revision=19398
2006-10-02 21:55:26 +00:00
Ronnie Sahlberg f0b33a4789 ethereal->wireshark updates
svn path=/trunk/; revision=18206
2006-05-22 08:14:01 +00:00