Commit Graph

70 Commits

Author SHA1 Message Date
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
Ronnie Sahlberg 8686381c19 get rid of GTree and use emem trees instead
svn path=/trunk/; revision=23738
2007-12-04 03:28:04 +00:00
Ronnie Sahlberg 643705ac5d reverse previous patch
svn path=/trunk/; revision=23735
2007-12-04 02:09:37 +00:00
Ronnie Sahlberg 75eacd9ad5 remove the use of GTrees and replace these with emem trees instead
svn path=/trunk/; revision=23734
2007-12-04 01:45:17 +00:00
Tomas Kukosa aab2bf936e - fix warnings in prefs.c
- do not flush SSL debug output after each message but only once per packet

svn path=/trunk/; revision=23680
2007-11-30 11:12:55 +00:00
Tomas Kukosa 6caaafbb6d Next few improvements to speed up startup about 10%.
- use GTree instead of GList for preference module lists

svn path=/trunk/; revision=23679
2007-11-30 09:22:01 +00:00
Tomas Kukosa a5ca7ec384 hide implementation of module list
(it makes easier change from GList to GTree as we have many modules now and GList implementation is slow for searching)

svn path=/trunk/; revision=23669
2007-11-29 07:52:52 +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
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
Stephen Fisher eae32f15eb Back out part of revision 23395 - leave the toolbar arrow, but remove the
preference to turn it on / off per discussion on -dev list.


svn path=/trunk/; revision=23407
2007-11-09 02:08:00 +00:00
Stephen Fisher ee3d03b7ae Fix Windows builds that cannot find gtk/gtk.h from epan/prefs.c. Write out
toolbar arrow preference even in GTK < 2.4 and just don't use it unless
running GTK 2.4+.


svn path=/trunk/; revision=23397
2007-11-08 02:29:18 +00:00
Stephen Fisher d7c1ba361f Add an arrow with drop-down menu including any toolbar buttons that do not
fit on the top of the screen.  This only works in GTK 2.4+ and there is
a layout preference setting to disable it.


svn path=/trunk/; revision=23395
2007-11-07 21:50:48 +00:00
Stephen Fisher d1d72fd232 Fix for bug #93: changes to the columns has no effect until restart
These changes allow the packet list clist to be destroyed and recreated
with the new column titles/values/order that the user changed in the
preferences without restarting Wireshark. 


svn path=/trunk/; revision=22038
2007-06-04 20:15:10 +00:00
Ronnie Sahlberg 3f4f542449 add workaround so that gtk1 compiles again thanks to stupid const mismatch between
gtk versions  and warnings treaded as errors


svn path=/trunk/; revision=21852
2007-05-21 02:32:54 +00:00
Stephen Fisher 64cc1b407c From Sebastien Tandel:
(Fixing warnings)

stripped away some unused variables/parameters
+ in prefs.c
    suggestion of parentheses makes gcc happy


svn path=/trunk/; revision=21156
2007-03-23 18:45:21 +00:00
Graeme Lunt a51f1694c9 This change allows a structure to be created under the "Protocols" section of the preferences.
A new function is introduced, prefs_register_protocol_subtree(), that allows the subtree the protocol should appear under to be specified. The subtree is specified as a string, with a '/' delimiting each subtree element. For example,
	prefs_register_protocol(proto_dap, prefs_register_dap);
becomes
	prefs_register_protocol_subtree("OSI/X.500", proto_dap, prefs_register_dap);

The function will create all the intermediate subtree nodes that are required, if they don't already exist. 
This allows the grouping of procotols which should make the list of protocols more manageable as even more are added. The current aim is to group by protocol family e.g. 
+ OSI
  + X.400
      X.411
      X.420
  + X.500
      DISP
      DAP
      DOP
      DSP
  + X.509
      X509AF
      X509CE
      ...

but others grouping could be envisioned (e.g. by first letter). 

As the intermediate nodes may already have preferences (e.g. OSI), then modules are now allowed to have submodules. Previously each node was either a subtree or held preferences. This is consistent with the "User Interface" node.

The subtree structure has no effect on how the preferences are saved to file, and the "Protocol Preferences..." menu option will bring up the preferences expanded to the correct node.

In addition, a new "blank page" has been introduced for intermediate nodes that have no preferences (and is also used when the "Protocols" node itself is chosen). This prevents confusion when the user moves from a node with preferences to a node without preferences, but the page old page is still shown.

There is also a change to prevent '#' characters in a value being treated as a comment when parsing the preferences file. (There is nothing that adds comments when writing the preferences file.) 


svn path=/trunk/; revision=21066
2007-03-19 19:08:22 +00:00
Luis Ontanon d70a58f881 second iteration:
* fields of an uat table now are passed using an array of uat_filed_t
* field callbacks take two more userdata arguments
* add some macros to define uat field callbacks.
* uats can be registered as preferences for a specific protocol
   - the preference widget is a button that opens the uat's window
* dfilter-macro => reflect changes to API


svn path=/trunk/; revision=20695
2007-02-03 14:25:02 +00:00
Jeff Morriss bf110f3999 Only certain 'base' values make sense in 'prefs_register_uint_preference()': 0 and 2-36. Assert out if a different value is found.
svn path=/trunk/; revision=20644
2007-01-31 04:14:11 +00:00
Ulf Lamping 3e1344fd4b fix #301: Windows file dialog should:
- initially show the "My Documents" folder
- don't use the "open folder" preference setting on save and alike dialogs (we don't do it in the GTK versions either)



svn path=/trunk/; revision=20433
2007-01-14 23:28:35 +00:00
Ulf Lamping 59aa9e4080 change default capturing options to use "show realtime capturing" instead of the "capture summary window"
svn path=/trunk/; revision=20149
2006-12-19 00:51:07 +00:00
Guy Harris 6404c06620 Handle the "no error" return from pref_set_pair_fct(), to squelch
compiler warnings.

svn path=/trunk/; revision=20070
2006-12-08 04:09:44 +00:00
Gerald Combs 40ca271813 From Giorgio Tino: Add a "static text" protocol preference type. This
can be used to add descriptive text inline with other preference items.
The "preference" contents are not written to disk.

Fixup whitespace.


svn path=/trunk/; revision=20037
2006-12-05 00:43:00 +00:00
Jaap Keuter 8868b231bd Fix build
svn path=/trunk/; revision=19919
2006-11-17 07:44:37 +00:00
Ulf Lamping 627b9196a5 various minor prefs code cleanup
svn path=/trunk/; revision=19916
2006-11-17 01:24:03 +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 1e480346d1 Add prefs_apply(), which lets us apply preferences (specifically,
trigger a module's callback) for a specific module.

svn path=/trunk/; revision=19487
2006-10-11 00:37:29 +00:00
Gerald Combs 993305a75f First step in integrating the AirPcap WEP preferences with those
from the 802.11 dissector.  Use a #define for the maximum number of
WEP keys.  Use AirPcap's if we have it (64).  Rename find_module()
prefs_find_module() and make it public.

svn path=/trunk/; revision=19467
2006-10-10 00:28:53 +00:00
Ulf Lamping 8a60a1006b "saying your preferences once ..." -> "applying your preferences once ..."
svn path=/trunk/; revision=19419
2006-10-03 21:25:16 +00:00
Ulf Lamping cdb57f37a2 now: Don't have a Save button in the following settings dialogs:
- Edit/Preferences
- View/Coloring Rules
- Capture/Capture Filters
- Analyze/Display Filters
- Analyze/Enabled Protocols

The settings will be automatically saved when pressing the Ok button.

If someone really wants the explicit Save buttons as before - you can get them back at the Edit/Preferences/User Interface page.

svn path=/trunk/; revision=19415
2006-10-03 19:53:10 +00:00
Ulf Lamping e940ff36b4 from Stephen Fisher:
Attached is a patch for consideration that changes the title in the 
preferences notebook to be the full description of the preference (but 
leaves the short name in the preferences list on the left).

svn path=/trunk/; revision=19370
2006-09-29 22:48:38 +00:00
Ronnie Sahlberg 85f49f1d49 fix for coverity 182
this bug can not currently trigger    but if someone would rename the module
in the future then this could potentially cause a null dereference.



svn path=/trunk/; revision=18494
2006-06-17 11:11:34 +00:00
Anders Broman 996d4db495 Ethereal->Wireshark
svn path=/trunk/; revision=18234
2006-05-28 19:49:07 +00:00
Ronnie Sahlberg 89f022b12b name change
svn path=/trunk/; revision=18197
2006-05-21 05:12:17 +00:00
Guy Harris 5340742d75 Map "mtp3.net_addr_format" to "mtp3.addr_format", for backwards
compatibility.

svn path=/trunk/; revision=17123
2006-01-29 23:10:05 +00:00
Guy Harris cdd6ccea1d Don't pass signed characters to the <ctype.h> macros.
svn path=/trunk/; revision=16457
2005-11-10 07:42:23 +00:00
Guy Harris db9fba20b4 Use <wiretap/file_util.h> to include "file_util.h"; otherwise, the
include fails as we don't do -Iwiretap.

If we have it, include <sys/stat.h> in epan/filesystem.c - we need it
for stat() and the macros and structures it uses.

svn path=/trunk/; revision=16410
2005-11-07 02:47:09 +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 fafdf68095 from Richard van der Hoff:
Attached is a patch which makes the console log level (warning/message/debug etc) a configurable preference. There's no gui for setting it, but since it's pretty much only going to be useful for developers, I'm sure you'll cope...
----
I've added a small comment to the file output that it has no dialog output

svn path=/trunk/; revision=16205
2005-10-12 21:26:27 +00:00
Ronnie Sahlberg b177f170eb convert to g_snprintf()
also make range_convert_range() return an emem allocated string


svn path=/trunk/; revision=15660
2005-09-01 19:05:00 +00:00
Jörg Mayer 0b845c626f Change the default font size on Unix (etc) to 10 pt, just as it was
already on Windows.
Changed the default font to Monospace, as some Linux distributions did
that already. In case this isn't available on all platforms we will
need to change it back to "fixed medium".

svn path=/trunk/; revision=15372
2005-08-16 06:48:06 +00:00
Jörg Mayer efdd4601ce Fix more "no previous declaration" warnings
svn path=/trunk/; revision=15171
2005-08-02 04:34:35 +00:00
Jörg Mayer 54c470762a Fix 'isn't prototype' warning
svn path=/trunk/; revision=15152
2005-07-30 02:30:05 +00:00
Gerald Combs 200ff9dc52 Pick up some fixes and enhancements from
http://cvs.fedora.redhat.com/viewcvs/rpms/ethereal/FC-4/:

In the LPD dissector, make lpd_client_code a value_string so that we
don't segfault.  Do the same for lpd_server_code, although it's not
strictly necessary.

Check to see if htmlview is installed, and use it as our HTML viewer.

The Fedora RPM has other patches, but I'm not sure if they should
be applied.


svn path=/trunk/; revision=15143
2005-07-29 21:55:45 +00:00
Gerald Combs fcd6156423 Move preference initialization to its own routine and make sure it gets run
when we pass "-G defaultprefs" on the command line.

svn path=/trunk/; revision=15119
2005-07-27 16:25:44 +00:00
Guy Harris 554f620001 Constify to remove a bunch of warnings. Add some casts to squelch
(presumably-)harmless-but-otherwise-unremovable const-to-nonconst
warnings.

In the TACACS dissector, clean up the variables used in option parsing
to avoid some const-to-nonconst warnings.

Clean up some white space.

svn path=/trunk/; revision=15043
2005-07-24 19:01:28 +00:00
Jörg Mayer 30a8557868 More 'char*' -> 'const char*' changes to fix warnings.
svn path=/trunk/; revision=15015
2005-07-23 11:41:25 +00:00
Jörg Mayer e1c6d9ac3d Fix some warnings (and one of my previous 'fixes')
svn path=/trunk/; revision=14997
2005-07-22 17:57:40 +00:00
Jörg Mayer f67b00ad9a More 'char*' -> 'const char*' warning fixes
svn path=/trunk/; revision=14986
2005-07-22 07:55:51 +00:00
Ulf Lamping ba1d304f7a prefs.c(1218) : warning C4761: integral size mismatch in argument; conversion supplied
prefs.c(1230) : warning C4761: integral size mismatch in argument; conversion supplied
prefs.c(1240) : warning C4761: integral size mismatch in argument; conversion supplied
prefs.c(1245) : warning C4761: integral size mismatch in argument; conversion supplied

svn path=/trunk/; revision=14783
2005-06-26 11:32:02 +00:00
Guy Harris 76258fe8e3 Constify a bunch of structure members and function arguments, to squelch
compiler warnings.

Clean up indentation.

svn path=/trunk/; revision=14739
2005-06-24 01:32:42 +00:00