Commit Graph

90 Commits

Author SHA1 Message Date
Guy Harris 3bee1b0611 When applying preferences, we have to apply the protocol preferences
before applying any other preferences, as, before we've applied them,
the internal state of the preferences in some dissectors might be
inconsistent (for example, the 802.11 dissector might've had its
number-of-WEP-keys preference increased but might not yet have allocated
a table for the WEP keys), and, as "gui_prefs_apply()" could cause a
redissection when redisplaying, that could cause dissectors to
malfunction (e.g., crash).

svn path=/trunk/; revision=12102
2004-09-25 22:50:58 +00:00
Guy Harris f23f4ecf04 Use _WIN32 rather than WIN32 to determine if we're compiling on Win32;
according to Gisle Vanem, WIN32 isn't a built-in in MSVC, but _WIN32 is.

svn path=/trunk/; revision=11972
2004-09-11 23:03:36 +00:00
Guy Harris 8a8b883450 Set the svn:eol-style property on all text files to "native", so that
they have LF at the end of the line on UN*X and CR/LF on Windows;
hopefully this means that if a CR/LF version is checked in on Windows,
the CRs will be stripped so that they show up only when checked out on
Windows, not on UN*X.

svn path=/trunk/; revision=11400
2004-07-18 00:24:25 +00:00
Guy Harris 045b535aed "delete_event" is an event, so its handler takes three arguments, not
two, and it returns a gboolean.

svn path=/trunk/; revision=11133
2004-06-10 10:09:58 +00:00
Guy Harris 257f4b8c80 Tag the "has_child" argument to "prefs_tree_page_add()" as unused when
building with GTK+ 2.x or later, as it's only needed and only used for
1.2[.x].

svn path=/trunk/; revision=11022
2004-05-27 21:42:54 +00:00
Guy Harris 6f8e9eeafe Get rid of an unused variable.
Mark as unused a required argument that's unused.

svn path=/trunk/; revision=11020
2004-05-27 18:12:58 +00:00
Ulf Lamping 54fe7e9e93 a lot of code cleanup
svn path=/trunk/; revision=11017
2004-05-27 16:50:16 +00:00
Ulf Lamping 7d37fc9d23 more code cleanup from dialog things:
changed window_xy (dialog) function calling in a lot of gtk files
cleanup of file selection code
cleanup in dlg_utils/file_dlg/ui_util
Please report any problems!!!

svn path=/trunk/; revision=11003
2004-05-26 03:49:24 +00:00
Guy Harris 911bad80f0 Have two strings in an enum_val_t - one that's a short string that is
convenient to put into a command line (no capital letters, no spaces to
require quotes), and one that's a detailed description for use in the
UI.  Allow either of them in the preferences file or "-o" option; use
the detailed description in the UI, and also use it when writing the
preferences out, so that the preference will be readable by older
versions of Ethereal (assuming the preference existed in that version).

Update "README.developer" to give more detail about an enum_val_t (and
to put the _t in), and to give a more detailed description of the
"radio_buttons" argument to "prefs_register_enum_preference()".

svn path=/trunk/; revision=10982
2004-05-24 02:25:21 +00:00
Ulf Lamping 414b631700 added selection of different main window pane layouts,
also added some preferences and a new preference page for this

svn path=/trunk/; revision=10729
2004-04-29 17:03:27 +00:00
Ulf Lamping 7b62a629e8 replaced sprintf / snprintf by g_snprintf,
various other string related changes

svn path=/trunk/; revision=10373
2004-03-13 15:15:26 +00:00
Ulf Lamping 5297f06717 replaced every appearance of gtk_scrolled_window_new() with
scrolled_window_new().
added gtk_scrolled_window_set_policy(AUTOMATIC,AUTOMATIC) to
scrolled_window_new()
added GTK2's gtk_scrolled_window_set_shadow(GTK_SHADOW_IN)
to every place needed

svn path=/trunk/; revision=9999
2004-02-06 19:19:12 +00:00
Guy Harris 1980fa5dbf Pass ESD_BTN_OK rather than NULL as a second argument to
"simple_dialog()"; NULL might be #defined to be a pointer expression on
some platforms, causing compiler warnings (and, on platforms where a
null pointer doesn't have all its bits 0, possibly causing misbehavior,
although I don't think there are any such platforms on which Ethereal
runs).

Don't allow 0 as button mask argument to "simple_dialog()".

Squelch a compiler warning.

Report fatal problems as errors, not warnings.

Report file I/O errors with "file_open_error_message()".

Report file write errors (including those reported by "close()", e.g.
some errors writing to an NFS server) when saving raw packet data to a
file.

svn path=/trunk/; revision=9915
2004-01-31 03:22:42 +00:00
Ulf Lamping 74d16224c4 make resized prefs_dlg look better
svn path=/trunk/; revision=9836
2004-01-25 12:22:20 +00:00
Guy Harris f54a741b3b Improve some comments.
svn path=/trunk/; revision=9798
2004-01-23 02:09:18 +00:00
Ulf Lamping 70e45ae806 gtk_font_selection_set_filter doesn't work when run before appending
the font selection widget to the notebook.

svn path=/trunk/; revision=9795
2004-01-23 01:12:46 +00:00
Ulf Lamping 8e2a930023 implemented dlg_button_row_new to get a standard function for
layouting the dialog buttons, and use it where appropriate.
This will help us with the GTK1/2 conflict on button layouts and
will also result in a more consistent look of the dialogs at all.

svn path=/trunk/; revision=9771
2004-01-21 21:19:34 +00:00
Olivier Abad 7728b2c563 gtk_font_selection_set_font_name doesn't work when run before appending
the font selection widget to the notebook (at least in GTK2).

svn path=/trunk/; revision=9769
2004-01-21 12:19:19 +00:00
Ulf Lamping af78977df5 new "Font" preferences page instead of a font dialog in "User Interface"
svn path=/trunk/; revision=9686
2004-01-17 00:26:22 +00:00
Ulf Lamping d0efc49be5 Change labels from "TCP Streams" to "Colors", to add other color values later
Later, file has to be renamed to color_prefs.dlg (function renaming similar)

svn path=/trunk/; revision=9666
2004-01-14 23:32:48 +00:00
Ulf Lamping 949f1f2d07 using button compatibility macros
svn path=/trunk/; revision=9636
2004-01-10 16:27:43 +00:00
Ulf Lamping 20ae160191 rearranged prefs topics
svn path=/trunk/; revision=9509
2004-01-01 13:29:16 +00:00
Guy Harris 64bc566ea8 In GTK+ 2.x, "gtk_entry_get_text()" returns a "const gchar *"; assign
its value to pointer-to-const variables.

svn path=/trunk/; revision=9161
2003-12-04 00:45:39 +00:00
Guy Harris dcd98ae8d3 The "ptr_u" unions no longer have a "next" pointer - they now just have
one member - or have one that's not used, so get rid of those unions.

svn path=/trunk/; revision=9151
2003-12-03 09:28:26 +00:00
Guy Harris 122dd3959c Make the recent epan/proto.{c,h} change compile.
svn path=/trunk/; revision=9075
2003-11-24 22:11:55 +00:00
Guy Harris 7089251f68 Skip the check for the module if a page doesn't have a module.
svn path=/trunk/; revision=8881
2003-11-04 20:33:13 +00:00
Guy Harris 343a178e33 Clean up the way we find the properties page for a given protocol
somewhat; this fixes a bug wherein we were assuming all modules
necessarily had preference pages (they won't, if the only preferences
for the module are obsolete preferences).

svn path=/trunk/; revision=8880
2003-11-04 20:22:21 +00:00
Guy Harris 6b7afbb593 From Tomas Kukosa: radio button groups are GSLists, which means that the
radio button group for a button changes when new buttons are added to it
(adding to the beginning of a singly-linked list takes constant time,
adding to the end takes time linear in the length of the list, and a
GSList * points to the beginning of the list).  Re-fetch the radio
button group each time through the loop that adds new radio buttons to a
radio button group for a preference.

svn path=/trunk/; revision=8591
2003-10-02 21:18:38 +00:00
Guy Harris 301bc24c43 Don't put an entry for a protocol into the Preferences dialog if it
doesn't have any settable preferences (for example, if it has only
obsolete preferences).

svn path=/trunk/; revision=8590
2003-10-02 21:06:11 +00:00
Guy Harris dd628e00c7 Make "finfo_selected" a member of a "capture_file" structure rather than
an independent global variable.

svn path=/trunk/; revision=8524
2003-09-24 00:47:37 +00:00
Gerald Combs d87e75c585 Make the capitalization of the "Name Resolution" frame consistent with the
other frames.

svn path=/trunk/; revision=8327
2003-09-01 01:49:20 +00:00
Guy Harris 50899dad38 When registering a string preference, if the value of the preference is
NULL, convert it to a copy of a null string, otherwise replace it with a
copy of the string, so that we know that the variable for the preference
always points to a string that can be freed.

That also obviates the need to worry about a null-pointer value for a
preference variable when checking to see whether a preference has changed.

When checking for a string preference not being set, check for an empty
string, not a null pointer - the above code turns null pointers into
pointers to empty strings, *and* the GUI code does (and always did!) the
same.

svn path=/trunk/; revision=7343
2003-03-11 23:14:42 +00:00
Olivier Abad 0b721e0ccf Make last modifications work with gtk2.
svn path=/trunk/; revision=6817
2002-12-27 18:32:55 +00:00
Guy Harris 392fee6d7a Support putting preferences into arbitrary places in a tree, which is
used to construct the "Edit->Preferences" dialog box; this includes the
ability to register a "subtree" for preferences.  Instead of
special-casing protocol preferences, have a subtree "Protocols" for
protocol preferences.

svn path=/trunk/; revision=6808
2002-12-20 01:48:57 +00:00
Guy Harris 5dbad1dcdc Constify some pointers to avoid converting const pointers to non-const
pointers.

svn path=/trunk/; revision=6685
2002-11-28 01:58:27 +00:00
Olivier Abad 29011060de Use gtk1/gtk2 compatibility macros to reduce #ifdefs.
svn path=/trunk/; revision=6610
2002-11-11 15:39:06 +00:00
Olivier Abad 05ef1fc475 Merge gtk and gtk2 directories.
svn path=/trunk/; revision=6552
2002-11-03 17:38:45 +00:00
Jörg Mayer e4a2e2cefe Include cleanups in gtk and gtk2:
Remove unneded includes
Add include wrappers where missing

svn path=/trunk/; revision=6191
2002-09-05 18:48:52 +00:00
Jörg Mayer 7c4176d868 Removed trailing whitespaces from .h and .c files using the
winapi_cleanup tool written by Patrik Stridvall for the wine
project.

svn path=/trunk/; revision=6117
2002-08-28 21:04:11 +00:00
Jörg Mayer 96ab70e209 Replace the types from sys/types.h and netinet/in.h by their glib.h
equivalents for the gtk/ directory.

svn path=/trunk/; revision=5930
2002-08-02 22:34:54 +00:00
Jörg Mayer 9630bf353e Fix a few more memleaks found by valgrind (all deriving
from the get_persconffile_path mess).

svn path=/trunk/; revision=5927
2002-08-01 03:15:29 +00:00
Guy Harris ca6badc579 Get rid of some "unused variable" and "unused static function" warnings,
and some compile errors in Tethereal, when compiling without libpcap.

If libpcap is missing (whether that's detected at compile time or, as on
Windows, at run time), don't call any of the "capture_prefs" routines -
the routine to create the capture preferences page wasn't called, so the
other routines can try to refer to non-existent widgets and other items
and crash.

Get rid of the stub routines in "capture_prefs()" used when compiling
without libpcap, as they're no longer called.

svn path=/trunk/; revision=5888
2002-07-17 00:22:30 +00:00
Guy Harris 3baa49d71d Handle the "bool" members the same way we handled the members for
enumerated values - "boolp" for pointers, "boolval" for values.

svn path=/trunk/; revision=5678
2002-06-16 00:58:38 +00:00
Guy Harris 3a407d9567 From Chris Waters: don't use "bool" as a variable name or structure
member, as it's a C++ keyword.

svn path=/trunk/; revision=5677
2002-06-16 00:53:20 +00:00
Guy Harris d40820124b On Windows, include "capture-wpcap.h", to define "has_wpcap".
svn path=/trunk/; revision=5209
2002-04-20 20:29:28 +00:00
Guy Harris 3e35c8a9b1 On Windows, don't put the capture preferences item into the
"Preferences" dialog box if we couldn't load WinPcap.

svn path=/trunk/; revision=5204
2002-04-19 20:49:28 +00:00
Guy Harris e28f56867d From Joerg Mayer: remove unused variables.
svn path=/trunk/; revision=4879
2002-03-05 12:03:27 +00:00
Guy Harris 5fe414c555 From Joerg Mayer: use _U_ to flag unused arguments.
svn path=/trunk/; revision=4878
2002-03-05 11:56:00 +00:00
Gilbert Ramirez 756707ac0d FIRST_PROTO_PREFS_PAGE needs to be incremented by 2 in order for
the "Protocol Preferences" pop-up menu option to work properly.

svn path=/trunk/; revision=4735
2002-02-14 10:58:49 +00:00
Guy Harris ee5ca25d31 Include files from the "epan" directory and subdirectories thereof with
"epan/..." pathnames, so as to avoid collisions with header files in any
of the directories in which we look (e.g., "proto.h", as some other
package has its own "proto.h" file which it installs in the top-level
include directory).

Don't add "-I" flags to search "epan", as that's no longer necessary
(and we want includes of "epan" headers to fail if the "epan/" is left
out, so that we don't re-introduce includes lacking "epan/").

svn path=/trunk/; revision=4586
2002-01-21 07:37:49 +00:00