aboutsummaryrefslogtreecommitdiffstats
path: root/epan/prefs-int.h
AgeCommit message (Collapse)AuthorFilesLines
2016-01-08Fix warnings for epan/prefs.c [-Wcast-qual]João Valverde1-1/+1
Change-Id: I86032d624ee37edc86a868eb2aaaffce81a8807b Reviewed-on: https://code.wireshark.org/review/12719 Petri-Dish: João Valverde <j@v6e.pt> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: João Valverde <j@v6e.pt>
2015-12-18Provide routines to set string-like and range preferences from a string.Guy Harris1-0/+15
That gets rid of some duplicate code. Change-Id: I4b65c6c73929d18602f6b0425e4f3dbbabbf0127 Reviewed-on: https://code.wireshark.org/review/12713 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-11-20More spelling fixes found by lintianBalint Reczey1-1/+1
Change-Id: Id218dec9e5a721d6c63fd34962ffe50b6ab8dd56 Reviewed-on: https://code.wireshark.org/review/11946 Reviewed-by: Guy Harris <guy@alum.mit.edu> Reviewed-by: Diederik de Groot <dkgroot@talon.nl> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-06-18Add a preferences editor frame.Gerald Combs1-1/+1
This replaces the single preference editor dialog in the GTK+ UI. Change-Id: I10e030981e9f7d1ec121811593586b65cf0797c5 Reviewed-on: https://code.wireshark.org/review/8966 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2014-07-21[WIP] Add a conversation dialog.Gerald Combs1-0/+13
Items are sorted by value. Move common conversation code to ui/conversation_hash.[ch]. Add a conversation_type_e enum along with convenience functions for fetching titles, tap names, etc. We have a single main dialog instead of a main dialog + individual protocol dialogs. It de-clutters the statistics menu and results in simpler code. Conversation type tabs can be added and removed within the dialog itself. The tab list is sticky and saved with the current profile when the dialog closes. Data can be copied as CSV or YAML. Add a FilterAction class and a corresponding filterAction slot to MainWindow. Use it for the Conversations context menu. Add an addressResolutionChanged signal and related plumbing. Get rid of the iterator members in the conversation item struct. Update the GTK+ code accordingly. Excercise for the reader: - Update TShark to use the common hash code. Ping-Bug: 9231 Ping-Bug: 8703 Ping-Bug: 6727 Change-Id: I8728d771fc5b1a85937bed9d898e53c3ecc3a544 Reviewed-on: https://code.wireshark.org/review/2987 Reviewed-by: Michael Mann <mmann78@netscape.net>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2013-12-09Add a function and an enum to register an uat preference for QT only.Irene Rüngeler1-0/+7
svn path=/trunk/; revision=53880
2013-12-03When including <epan/prefs.h> don't force inclusion of <epan/uat.h>Jakub Zawadzki1-1/+1
svn path=/trunk/; revision=53769
2013-07-31Convert preferences to wmem. Exposes some more memory leaks that didn't show upEvan Huus1-1/+2
before. svn path=/trunk/; revision=51046
2013-07-25Add a UAT dialog. Make UAT preferences uat_t * instead of void *.Gerald Combs1-3/+3
C++-ize the UAT headers. Add an ElidedLabel widget. Use it in the File Set, Profile, and UAT dialogs. Update the Qt README. svn path=/trunk/; revision=50896
2013-03-01Export libwireshark symbols using WS_DLL_PUBLIC defineBalint Reczey1-1/+3
Also remove old WS_VAR_IMPORT define and related Makefile magic everywhere in the project. svn path=/trunk/; revision=47992
2013-02-08Add a directory name preference type (PREF_DIRNAME) and registrationGerald Combs1-1/+2
routine (prefs_register_directory_preference). Add PREF_FILENAME and PREF_DIRNAME support to the Qt module preferences. Change a couple of preferences to directory names. Clean up some names and default settings. svn path=/trunk/; revision=47573
2013-01-19Add an "Appearance" (aka "User Interface") preference pane. Having anGerald Combs1-1/+1
"Advanced" pane gives us the luxury of omitting some items in favor of simplicity so do that. svn path=/trunk/; revision=47158
2013-01-18Rename the "saved_val" preference element to "stashed_val" in order toGerald Combs1-2/+2
more clearly indicate that it's a copy of a preference value rather than something we've saved in the preferences file. Update prefs_pref_to_str() to handle default, stashed, and current prefs. Create ui/preference_utils.[ch] and move some common routines there. Use prefs_pref_type_name() in the GTK+ preferences dialog. Make the "OK" button in the Qt preferences dialog work. We simply write the prefs and redissect on "OK" and do nothing on "Cancel". This is intentionally different from the Apply/OK/Cancel behavior in the GTK+ version. Add a general "emitAppSignal" method to wsApp and use it for packet dissection and preference changes. Suggest that we might want to create a WsString class to make conversion between QStrings, gchar *s, and GStrings easier. svn path=/trunk/; revision=47139
2013-01-05Break out preference type names, type descriptions, stringGerald Combs1-2/+11
representations, and default status out of write_prefs and into their own routines. Split the corresponding custom preference write callbacks. Fix an apparent memory leak in the hidden column callback. Add an initial preferences dialog to the Qt port. Use the new preference routines to implement an "Adavanced" page similar to the "about:config" page available in many web browsers. Standard pages will hopefully follow soon. Remove some QDebug includes and make sure our QTreeWidgets have uniform row heights set. svn path=/trunk/; revision=46942
2012-12-26Fix a bunch of warnings.Guy Harris1-2/+2
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-08-08Compiler error fixes resulting from r44348Michael Mann1-5/+3
svn path=/trunk/; revision=44359
2012-08-08Base framework to allow all preferences to be part of generic preferences ↵Michael Mann1-0/+36
API. Implementation will follow, but I wanted the framework in place first. svn path=/trunk/; revision=44331
2012-07-07Clean up mix of tabs and 4-space-tab indents.Guy Harris1-61/+59
svn path=/trunk/; revision=43594
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-25From Michael Mann:Anders Broman1-0/+1
generic preferences implementation https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7402 svn path=/trunk/; revision=43484
2012-06-13Create, and start using, file name preferences.Jeff Morriss1-0/+1
File name preferences are basically just string preferences except that the GUI will present a "Browse" button that allows the user to go and find the file s/he wants (rather than having to blindly type in the full path). svn path=/trunk/; revision=43228
2010-10-29Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=4768 :Jeff Morriss1-2/+2
Return an error if the user specifies a value in a range in excess of the range-specified maximum. Except when reading in preferences files which might have ranges that exceed the maximum (because we didn't use to check): in that case silently lower the out-of-range values. svn path=/trunk/; revision=34698
2010-08-29Doxygen changes.Anders Broman1-24/+24
svn path=/trunk/; revision=33990
2010-08-28Doxygen changes.Anders Broman1-30/+46
svn path=/trunk/; revision=33981
2010-05-26Remember the default value of each protocol preference.Jeff Morriss1-0/+7
If, when we're writing the preferences file, the current value of the preference is the same as the default, write out the preference (since the preference file is also the documentation for the preferences) but comment it out (so that if, for example, you go back to an older version of Wireshark you won't get warnings about non-existant preferences that you didn't change--and thus probably don't care too much about). It might be interesting to, in the future, add a UI to restore the default values. svn path=/trunk/; revision=32967
2010-05-25find_val_for_string() is only used in prefs.c so remove the prototypeJeff Morriss1-5/+1
and make it static. When reading enum preferences, use the current value of the preference as the default value of the preference instead of a hard-coded 1. This way if we couldn't find the appropriate value we'll don't end up changing the preference to something that may or may not make sense. svn path=/trunk/; revision=32950
2009-08-27Add #include <stdio.h> in a few places for SolarisBill Meier1-0/+2
svn path=/trunk/; revision=29576
2007-12-04get rid of GTree and use emem trees insteadRonnie Sahlberg1-1/+1
svn path=/trunk/; revision=23738
2007-12-04reverse previous patchRonnie Sahlberg1-1/+1
svn path=/trunk/; revision=23735
2007-12-04remove the use of GTrees and replace these with emem trees insteadRonnie Sahlberg1-1/+1
svn path=/trunk/; revision=23734
2007-11-30Next few improvements to speed up startup about 10%.Tomas Kukosa1-1/+1
- use GTree instead of GList for preference module lists svn path=/trunk/; revision=23679
2007-03-19This change allows a structure to be created under the "Protocols" section ↵Graeme Lunt1-2/+2
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-02-03second iteration:Luis Ontanon1-0/+2
* 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
2006-12-08A callback in read_prefs_file() should return a prefs_set_pref_e, not anGuy Harris1-1/+1
int. svn path=/trunk/; revision=20069
2006-12-05From Giorgio Tino: Add a "static text" protocol preference type. ThisGerald Combs1-0/+1
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-11-17various minor prefs code cleanupUlf Lamping1-2/+2
svn path=/trunk/; revision=19916
2006-11-15add a "private_data" pointer to the read_prefs_file() function, which will ↵Ulf Lamping1-2/+2
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-09-29from Stephen Fisher:Ulf Lamping1-1/+2
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-06-20Change ETH_VAR_IMPORT to WS_VAR_IMPORT. Try to fix a duplicate variableGerald Combs1-1/+1
definition in the Catapult DCT2000 code. svn path=/trunk/; revision=18524
2006-05-21name changeRonnie Sahlberg1-3/+3
svn path=/trunk/; revision=18197
2005-07-24Constify to remove a bunch of warnings. Add some casts to squelchGuy Harris1-1/+1
(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
2004-10-16Remove the fixed maximum number of subranges in a range_t; dynamicallyGuy Harris1-2/+2
allocate them to be large enough. Add checks that the numbers in the range fit in a guint32. Check the validity of a range before saving or printing, and report errors in an alert box. Clean up white space. svn path=/trunk/; revision=12320
2004-10-14From Jeff Morriss: PREF_RANGE preference type, for ranges of integers.Guy Harris1-0/+4
svn path=/trunk/; revision=12300
2004-10-01"prefs-int.h" belongs in epan, too.Guy Harris1-0/+103
svn path=/trunk/; revision=12168