Commit Graph

248 Commits

Author SHA1 Message Date
Guy Harris dc8af1b552 Clean up white space.
svn path=/trunk/; revision=49484
2013-05-21 20:38:51 +00:00
Anders Broman 1569217448 From Cal Turney:
When another profile is selected, its column.hidden preference is ignored.

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

svn path=/trunk/; revision=49434
2013-05-20 05:33:18 +00:00
Gerald Combs a5037603ce Tell the user tha gui.update.channel probably shouldn't be changed.
svn path=/trunk/; revision=48970
2013-04-22 17:58:28 +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 0df5a9390d From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10397

svn path=/trunk/; revision=48438
2013-03-20 01:18:10 +00:00
Irene Rüngeler 44e6a88b13 Add interface options preferences.
svn path=/trunk/; revision=48275
2013-03-13 12:38:08 +00:00
Michael Tüxen 15501fad2a Try to fix the buildbots.
The patch for capture_dlg.c is from Anders...

svn path=/trunk/; revision=48164
2013-03-07 12:06:55 +00:00
Irene Rüngeler cb42bc9fec Add buffersize and snap length to the preferences.
svn path=/trunk/; revision=48163
2013-03-07 09:16:55 +00:00
Anders Broman d4e23d8daa Use explicit casts.
svn path=/trunk/; revision=48162
2013-03-07 07:48:33 +00:00
Bill Meier 24eff41b08 it's ==> its & its ==> it's as needed.
svn path=/trunk/; revision=47896
2013-02-26 02:19:57 +00:00
Gerald Combs 5a5d872639 Register the gui.update.interval preference.
svn path=/trunk/; revision=47750
2013-02-19 23:05:27 +00:00
Gerald Combs 81a5be5813 Enable automatic updates for Win64. Fix a copy/paste error.
svn path=/trunk/; revision=47749
2013-02-19 22:57:40 +00:00
Gerald Combs e48236a436 Add automatic software update checks for Win32 using WinSparkle. Add
preferences (currently hidden) to disable updates, set the update
frequency, and set the update "channel" (stable vs development). Add a
"Help" menu item to manually check for updates.

svn path=/trunk/; revision=47748
2013-02-19 22:21:17 +00:00
Gerald Combs d21f62b73b Add a directory name preference type (PREF_DIRNAME) and registration
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-02-08 18:07:34 +00:00
Gerald Combs d1f6e2e3ec Use a not-quite-black background for marked packets.
http://ianstormtaylor.com/design-tip-never-use-black/

svn path=/trunk/; revision=47392
2013-01-31 18:46:40 +00:00
Gerald Combs 2dff8d7605 Add font and color preferences. Unfortunately Qt doesn't have a color
picker widget so we're back to popping up dialogs. Move the contents of
monospace_font.{cpp,h} to wireshark_application.{cpp,h}.

Pango and Qt use completely different string representations for fonts.
Add a separate gui.qt.font_name preference so that they don't clobber
each other.

svn path=/trunk/; revision=47240
2013-01-24 01:10:12 +00:00
Gerald Combs 6ef1fc5002 GTK+:
Get rid of user-hostile behavior. In the layout preferences pane 2 & 3
radio buttons overrode the user's selection if a duplicate item was
selected. Now we assume that the user knows what he or she is doing and
steal duplicate selections from the other panes.

Qt:

Match the new GTK+ behavior in the layout preferences. Add padding
around the layout images. Add toolbar style preferences to the
Appearance pane (instead of the layout pane).

All:

Remove the selection mode and scrollbar placement prefs and mark them
obsolete as recently discussed on -dev.

Adjust the layout images yet again after more Awful Monitor Testing.

svn path=/trunk/; revision=47214
2013-01-22 18:27:18 +00:00
Jaap Keuter 5fe15dfd37 Fix CID 966637 and CID 966638
Check pointers before using them.

svn path=/trunk/; revision=47186
2013-01-20 21:14:12 +00:00
Gerald Combs ae7ee61e84 Rename the "saved_val" preference element to "stashed_val" in order to
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-18 00:50:14 +00:00
Gerald Combs b0ef1a67ed strcmp → g_strcmp0. Fixes a crash on Windows.
svn path=/trunk/; revision=47085
2013-01-14 23:23:50 +00:00
Gerald Combs b82f42d8cf When the user is editing text or selecting from a combo box, don't
immediately close the dialog if he or she presses the escape or enter
keys. Revert the value if the user presses escape. Properly handle the
base for uint preferences. Fix a NULL pointer dereference.

Add a gchar_free_to_qstring utility routine which creates a QString from
a g_malloced string and frees it.

svn path=/trunk/; revision=47083
2013-01-14 22:21:11 +00:00
Gerald Combs 0fa6a4c421 Allow editing via the advanced preferences tree. Double-clicking an
item's name, status, or type resets it to its default value.
Double-clicking the item's value lets you edit it. Implement the
advanced search field. (Clicking OK and Cancel still doesn't yet do
anything.)

Note that we could probably use a
prefs_register_{uint16|port}_preference routine for 16-bit values. Make
reset_pref public. Update some names and descriptions.

svn path=/trunk/; revision=46986
2013-01-07 19:13:03 +00:00
Alexis La Goutte 86e16b4f61 Fix some Dead Store (Dead initialization) Warning found by Clang
svn path=/trunk/; revision=46978
2013-01-06 19:13:33 +00:00
Gerald Combs b99199fcf8 Constify a couple of variables and export a couple of functions.
svn path=/trunk/; revision=46943
2013-01-05 03:42:28 +00:00
Gerald Combs 4a3342e4ba Break out preference type names, type descriptions, string
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
2013-01-05 02:30:58 +00:00
Gerald Combs 5bd252c44f Remove some duplicate code from ui/profile.c and move in more code from
ui/gtk/profile_dialog.c. Use the correct profile list in
profile_dialog.c so that deletion works.

Add a profile dialog to the Qt port. For some reason it crashes when
changing configuration profiles, which might be related to bug 7722.
Move the Qt configuration profile initialization from main.cpp to
wireshark_application.cpp. Make sure QMenuBar doesn't grab the
configuration profiles action on OS X. Add more role color names to
tango_colors.h.

svn path=/trunk/; revision=46834
2012-12-29 01:39:02 +00:00
Guy Harris f79410f0cd Tabs -> spaces.
svn path=/trunk/; revision=46800
2012-12-26 22:34:39 +00:00
Guy Harris 7df01d368e Update a comment.
svn path=/trunk/; revision=46799
2012-12-26 22:34:09 +00:00
Guy Harris 8ed7a73e22 Fix a bunch of warnings.
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-12-26 05:57:06 +00:00
Evan Huus 6ef55f30d8 Rename wmem_permanent_scope -> wmem_epan_scope to reflect the fact that it
is technically scoped to the library, not the process. It's also shorter :)

svn path=/trunk/; revision=45877
2012-11-03 15:08:00 +00:00
Evan Huus 67f2dc0876 Don't leak memory when registering duplicate preferences subtree modules. Take
wmem_permanent copies of the substrings we actually need, and g_free the
temporary tokenized copy.

svn path=/trunk/; revision=45813
2012-10-27 20:41:58 +00:00
Evan Huus b7ff007bbb There's no need to g_strdup our default prefs - setting them as literals
works just fine and doesn't leak any memory.

Use wmem_permanent_scope() for the one string we do have to copy, to ensure
it doesn't leak either.

svn path=/trunk/; revision=45812
2012-10-27 20:29:12 +00:00
Chris Maynard 5ef60b46a3 We are already saving size and maximized state by default. Save position too.
svn path=/trunk/; revision=45334
2012-10-05 21:58:45 +00:00
Chris Maynard a1722d352a Trivial: LEDs -> Icons
svn path=/trunk/; revision=45223
2012-09-30 15:59:40 +00:00
Gerald Combs 3b6428bb44 Don't pass a null pointer to strcmp.
svn path=/trunk/; revision=45175
2012-09-27 16:23:06 +00:00
Jakub Zawadzki 5376508e7d Fix bug #7669: Preference editor removes (does not save) column definitions after the 27th.
put_string_list() was generating string with list of columns to be saved to preference file, 
but buffer is limited to MAX_FMT_PREF_LEN (1024 bytes). It looks like 1024 bytes is not enough.

Fix bug by writting directly to file.


svn path=/trunk/; revision=45043
2012-09-21 12:29:04 +00:00
Jeff Morriss 3729335973 We always HAVE_CONFIG_H so don't bother checking whether we have it or not.
svn path=/trunk/; revision=45016
2012-09-20 01:48:30 +00:00
Michael Mann 5672bee3a8 Fix bug 7650 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7650)
prefs.gui_colorized_fg and prefs.gui_colorized_bg not properly integrated into newer preference architecture

svn path=/trunk/; revision=44557
2012-08-18 02:47:37 +00:00
Pascal Quantin 6d711993f7 Squelch a few "dereferencing type-punned pointer" warnings when compiling with GCC 4.1.3
svn path=/trunk/; revision=44553
2012-08-17 17:29:51 +00:00
Michael Mann 722fed08b3 Bugfix 7608 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7608)
svn path=/trunk/; revision=44376
2012-08-09 12:46:44 +00:00
Michael Mann bec794d51e Bugfix capture column preferences
svn path=/trunk/; revision=44370
2012-08-09 00:46:17 +00:00
Michael Mann c5a649d613 Complete compiler warnings from r44348
svn path=/trunk/; revision=44364
2012-08-08 21:40:22 +00:00
Michael Tüxen 58e6d17082 Get it compiling on Mac OS X.
svn path=/trunk/; revision=44363
2012-08-08 21:34:43 +00:00
Michael Mann acf2c06044 Compiler error fixes resulting from r44348
svn path=/trunk/; revision=44359
2012-08-08 20:47:20 +00:00
Michael Mann e0e533d643 Have (almost) all preferences use the generic preferences API (per https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7402). This cleaned up a lot of hardcoded code and allows breaking up the prefs structure (or at least prevent it from growing too large) if desired.
Bugfixed problems mentioned in
http://www.wireshark.org/lists/wireshark-dev/201208/msg00001.html

Column preferences now support default '#' character

svn path=/trunk/; revision=44348
2012-08-08 16:54:02 +00:00
Michael Mann 3d12ea758b Base framework to allow all preferences to be part of generic preferences API. Implementation will follow, but I wanted the framework in place first.
svn path=/trunk/; revision=44331
2012-08-08 12:13:24 +00:00
Chris Maynard 6b733f55bc Plug a memory leak introduced with r44239. Resolves Coverity CID 714243: Unused pointer value. (Previous commit actually resolved Coverity CID 714242.)
svn path=/trunk/; revision=44266
2012-08-04 19:01:09 +00:00
Chris Maynard 230c57e6ec Plug a memory leak introduced with r44239. Resolves Coverity CID 714243: Unused pointer value.
svn path=/trunk/; revision=44265
2012-08-04 18:57:16 +00:00
Irene Rüngeler c610984bf5 Fix bug in while loop
svn path=/trunk/; revision=44242
2012-08-03 13:46:57 +00:00
Irene Rüngeler 2e1952678f Make the columns of the capture options dialog selectable. Changes are stored in the preferences file.
The ordering can be changed by dragging the column. The order is not stored.

svn path=/trunk/; revision=44239
2012-08-03 11:15:40 +00:00