Commit Graph

42 Commits

Author SHA1 Message Date
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 4dcc156cf3 Move the print modules into epan.
svn path=/trunk/; revision=50526
2013-07-12 03:50:50 +00:00
Gerald Combs d98b0cc231 Fix and clarify name resolution preference tooltips. Print the
description before the name+type since that's presumably what people
are looking for.

svn path=/trunk/; revision=49622
2013-05-29 18:01:03 +00:00
Evan Huus c4a36c513f Redissect extra packet windows in all cases (that I know of) where we
redissect normal packet list.

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

svn path=/trunk/; revision=48528
2013-03-24 16:47:38 +00:00
Bill Meier 8112ecc321 From beroset:
remove C++ incompatibilities
 https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8416 attachment #10404

Note: The following parts of the patch had been previously done:
 asn1/snmp/packet-snmp-template.c
 epan/dissectors/packet-snmp.c
 epan/dissectors/packet-x11.c

Also; hostlist_table.c: code under '#ifdef HAVE_GEOIP'
 didn't compile and needed a few additional patches.


svn path=/trunk/; revision=48447
2013-03-21 02:29:09 +00:00
Bill Meier c63dfc2ab4 gtk_widget_set_vexpand() is only for GTK3.
svn path=/trunk/; revision=48281
2013-03-13 20:25:28 +00:00
Bill Meier ea64ac1937 Certain prefs window contents should not be centered vertically in GTK3.
(Fix: prevent vertical expand/fill of grid widget in certain cases).

(This stuff in GTK3 about "parents inheriting expand/fill properties from children"
is driving me crazy).

svn path=/trunk/; revision=48280
2013-03-13 20:04:48 +00:00
Bill Meier 1fb0ac3983 Fir Gtk 3.8 & newer: gtk_scrolled_window_add_with_viewport() ==> gtk_container_add().
svn path=/trunk/; revision=48065
2013-03-04 19:20:39 +00:00
Bill Meier 162817ad33 it's ==> its & its ==> it's as needed.
In a few cases:
 Fix spelling;
 Clean up whitespace and formatting style.

svn path=/trunk/; revision=47889
2013-02-25 23:35:13 +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
Bill Meier 92bc64a2ac Use ws_gtk_grid...() in place of gtk_table...().
This completes the process of replacing
     Wireshark gtk_table...() usage !!

(However: the prefs dialogs still have a few Gtk3
          related Expand/Fill issues which need to be fixed).

svn path=/trunk/; revision=47262
2013-01-24 21:21:51 +00:00
Gerald Combs 7f70a5e438 Fix compilation on Windows.
svn path=/trunk/; revision=47140
2013-01-18 00:59:47 +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 430e97c866 Move the font preferences to the colors pane and change its name to
"Font and Colors". Use a GtkFontButton to select the font and update the
sample text accordingly. Instead of attempting to resize the sample
color text (which didn't appear to work) scroll to the text that matches
the current combo box selection.

svn path=/trunk/; revision=46909
2013-01-03 01:02:30 +00:00
Bill Meier 7fd75ad2c5 Use scrolled-windows to enclose "custom" prefs pages (User Interface, Layout, etc)
in the same manner as to "protocol prefs" pages.

This ensures that the bottom row buttons won't disappear off the bottom
of the prefs window if one (or more) of the custom prefs pages is too large
to fit vertically within the available screen space.

In Wireshark 1.8, more items were added to the "User Interface" prefs page
thus leading to an increased possibility of this issue occurring.

I believe this fixes Bug #8078.

#Backport Wireshark 1.8


svn path=/trunk/; revision=46885
2013-01-01 20:50:45 +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
Michael Mann ed7b3f276f From Masatake Yamato, adding preference names used with -o option to tooltip text. Bug 6641 (https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6641)
svn path=/trunk/; revision=46545
2012-12-15 12:43:13 +00:00
Bill Meier db4c220cea Fix several [-Wshadow] warnings;
Also: Do some minor whitespace and formatting changes.

svn path=/trunk/; revision=46183
2012-11-25 19:27:59 +00:00
Anders Broman 8366b45559 Try to fix prefs_dlg.c:1814: warning: 'abbrev' may be used uninitialized in this function.
svn path=/trunk/; revision=45919
2012-11-05 09:55:04 +00:00
Anders Broman 217c746d83 From Michal Labedzki:
Add Preferences submenu to packet list menu

Preferences point to protocol which is on top expect "malformed", "text" and "expert" fields.


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

svn path=/trunk/; revision=45914
2012-11-05 08:59:25 +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
Jakub Zawadzki 78019edc99 cinfo.columns_changed is only used by ui/gtk, move it to cfile structure.
svn path=/trunk/; revision=44750
2012-09-03 15:12:49 +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
Jeff Morriss 76150c9a20 Fix a typo.
svn path=/trunk/; revision=44251
2012-08-03 18:11:26 +00:00
Jeff Morriss 78c4677cfb (Attempt to) avoid using capture_page uninitialized when we don't HAVE_LIBPCAP.
svn path=/trunk/; revision=44250
2012-08-03 17:41:06 +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
Jakub Zawadzki 73b0691fd8 gtk_container_add() -> gtk_box_pack_start() [bug #7377]
svn path=/trunk/; revision=43874
2012-07-20 21:35:45 +00:00
Guy Harris ef825ec6d3 Only one place is needed for creating preference panes; this clears up
some warnings from GTK+.

For interior nodes in the preference module tree, we create a page even
if the module itself has no preferences, so there's *something* we can
show if the user clicks on it.  (Showing the top-level protocols page is
a bit weird, and requires us to keep track of it.)

svn path=/trunk/; revision=43596
2012-07-07 02:49:17 +00:00
Guy Harris ab5e6696e1 Uniformly use two-space indents (most of the file uses it).
svn path=/trunk/; revision=43593
2012-07-07 00:41:12 +00:00
Anders Broman c19583b72c From Michael Mann:
Generic preferences implementation - Printing and Name Resolution.

svn path=/trunk/; revision=43579
2012-07-06 04:48:36 +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
Jeff Morriss af63e14c68 Get rid of a couple of unused variables and parameters.
svn path=/trunk/; revision=43486
2012-06-25 21:45:21 +00:00
Anders Broman 3814106d7e From Michael Mann:
generic preferences implementation

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

svn path=/trunk/; revision=43484
2012-06-25 21:05:36 +00:00
Anders Broman 1992295e16 Revert:
airpcap_tb -> wireless_tb

Second try.

svn path=/trunk/; revision=43364
2012-06-19 14:37:46 +00:00
Jeff Morriss 4fdc3c3cc2 Create, and start using, file name preferences.
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
2012-06-13 01:13:12 +00:00
Anders Broman dbc4b09004 From Evan Huus Convert a bunch more GTK-2 calls to their cross-version ws_ equivalent
svn path=/trunk/; revision=43009
2012-06-02 23:53:04 +00:00
Anders Broman 987ce281e4 Use GtkFontChooser if GTK >= 3.2
svn path=/trunk/; revision=42205
2012-04-23 11:10:08 +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
Jörg Mayer be706c6380 Move gtk to ui/gtk.
This looses the last checkin to gtk, will add this manually back.

svn path=/trunk/; revision=40518
2012-01-15 21:59:11 +00:00