aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/prefs_dlg.c
AgeCommit message (Collapse)AuthorFilesLines
2004-10-17Have "range_convert_range()" dynamically allocate a string large enoughGuy Harris1-2/+3
to hold the representation of the range, rather than imposing a fixed-size limit on the string. Check for overflow in "strtoul()" - and use "strtoul()" rather than "strtol()" for range members. Clean up indentation. Get rid of an unnecessary include in <epan/range.h>. svn path=/trunk/; revision=12323
2004-10-16Remove the fixed maximum number of subranges in a range_t; dynamicallyGuy Harris1-13/+23
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-16Make the nranges member of a range_t be the number of ranges, not theGuy Harris1-7/+8
number of ranges - 1, and update loops that iterate over all the ranges appropriately. Make "range_convert_str()" return a success/failure indication, and check it. Rewrite it to do more checks, and not to blithely ignore unknown characters. svn path=/trunk/; revision=12313
2004-10-14From Jeff Morriss: PREF_RANGE preference type, for ranges of integers.Guy Harris1-0/+63
svn path=/trunk/; revision=12300
2004-10-12Check the values of the protocol preferences before fetching them; ifGuy Harris1-13/+93
any are not valid, pop up an alert box and don't dismiss the preferences dialog. svn path=/trunk/; revision=12269
2004-10-01"prefs-int.h" belongs in epan, too.Guy Harris1-1/+1
svn path=/trunk/; revision=12168
2004-09-27Move prefs.c and prefs.h into the epan subdirectory.Guy Harris1-1/+1
svn path=/trunk/; revision=12115
2004-09-25When applying preferences, we have to apply the protocol preferencesGuy Harris1-3/+7
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-11Use _WIN32 rather than WIN32 to determine if we're compiling on Win32;Guy Harris1-1/+1
according to Gisle Vanem, WIN32 isn't a built-in in MSVC, but _WIN32 is. svn path=/trunk/; revision=11972
2004-07-18Set the svn:eol-style property on all text files to "native", so thatGuy Harris1-1/+1
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-06-10"delete_event" is an event, so its handler takes three arguments, notGuy Harris1-5/+6
two, and it returns a gboolean. svn path=/trunk/; revision=11133
2004-05-27Tag the "has_child" argument to "prefs_tree_page_add()" as unused whenGuy Harris1-2/+7
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-27Get rid of an unused variable.Guy Harris1-3/+2
Mark as unused a required argument that's unused. svn path=/trunk/; revision=11020
2004-05-27a lot of code cleanupUlf Lamping1-283/+179
svn path=/trunk/; revision=11017
2004-05-26more code cleanup from dialog things:Ulf Lamping1-10/+9
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-24Have two strings in an enum_val_t - one that's a short string that isGuy Harris1-7/+15
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-04-29added selection of different main window pane layouts,Ulf Lamping1-4/+33
also added some preferences and a new preference page for this svn path=/trunk/; revision=10729
2004-03-13replaced sprintf / snprintf by g_snprintf,Ulf Lamping1-4/+4
various other string related changes svn path=/trunk/; revision=10373
2004-02-06replaced every appearance of gtk_scrolled_window_new() withUlf Lamping1-1/+5
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-01-31Pass ESD_BTN_OK rather than NULL as a second argument toGuy Harris1-3/+3
"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-25make resized prefs_dlg look betterUlf Lamping1-2/+2
svn path=/trunk/; revision=9836
2004-01-23Improve some comments.Guy Harris1-6/+12
svn path=/trunk/; revision=9798
2004-01-23gtk_font_selection_set_filter doesn't work when run before appendingUlf Lamping1-1/+22
the font selection widget to the notebook. svn path=/trunk/; revision=9795
2004-01-21implemented dlg_button_row_new to get a standard function forUlf Lamping1-20/+6
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-21gtk_font_selection_set_font_name doesn't work when run before appendingOlivier Abad1-1/+5
the font selection widget to the notebook (at least in GTK2). svn path=/trunk/; revision=9769
2004-01-17new "Font" preferences page instead of a font dialog in "User Interface"Ulf Lamping1-4/+30
svn path=/trunk/; revision=9686
2004-01-14Change labels from "TCP Streams" to "Colors", to add other color values laterUlf Lamping1-4/+4
Later, file has to be renamed to color_prefs.dlg (function renaming similar) svn path=/trunk/; revision=9666
2004-01-10using button compatibility macrosUlf Lamping1-21/+5
svn path=/trunk/; revision=9636
2004-01-01rearranged prefs topicsUlf Lamping1-63/+65
svn path=/trunk/; revision=9509
2003-12-04In GTK+ 2.x, "gtk_entry_get_text()" returns a "const gchar *"; assignGuy Harris1-2/+2
its value to pointer-to-const variables. svn path=/trunk/; revision=9161
2003-12-03The "ptr_u" unions no longer have a "next" pointer - they now just haveGuy Harris1-2/+2
one member - or have one that's not used, so get rid of those unions. svn path=/trunk/; revision=9151
2003-11-24Make the recent epan/proto.{c,h} change compile.Guy Harris1-2/+2
svn path=/trunk/; revision=9075
2003-11-04Skip the check for the module if a page doesn't have a module.Guy Harris1-1/+3
svn path=/trunk/; revision=8881
2003-11-04Clean up the way we find the properties page for a given protocolGuy Harris1-35/+49
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-10-02From Tomas Kukosa: radio button groups are GSLists, which means that theGuy Harris1-3/+2
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-02Don't put an entry for a protocol into the Preferences dialog if itGuy Harris1-7/+36
doesn't have any settable preferences (for example, if it has only obsolete preferences). svn path=/trunk/; revision=8590
2003-09-24Make "finfo_selected" a member of a "capture_file" structure rather thanGuy Harris1-3/+3
an independent global variable. svn path=/trunk/; revision=8524
2003-09-01Make the capitalization of the "Name Resolution" frame consistent with theGerald Combs1-3/+3
other frames. svn path=/trunk/; revision=8327
2003-03-11When registering a string preference, if the value of the preference isGuy Harris1-10/+5
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
2002-12-27Make last modifications work with gtk2.Olivier Abad1-3/+7
svn path=/trunk/; revision=6817
2002-12-20Support putting preferences into arbitrary places in a tree, which isGuy Harris1-66/+109
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-11-28Constify some pointers to avoid converting const pointers to non-constGuy Harris1-5/+5
pointers. svn path=/trunk/; revision=6685
2002-11-11Use gtk1/gtk2 compatibility macros to reduce #ifdefs.Olivier Abad1-131/+68
svn path=/trunk/; revision=6610
2002-11-03Merge gtk and gtk2 directories.Olivier Abad1-84/+267
svn path=/trunk/; revision=6552
2002-09-05Include cleanups in gtk and gtk2:Jörg Mayer1-12/+1
Remove unneded includes Add include wrappers where missing svn path=/trunk/; revision=6191
2002-08-28Removed trailing whitespaces from .h and .c files using theJörg Mayer1-27/+27
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-08-02Replace the types from sys/types.h and netinet/in.h by their glib.hJörg Mayer1-5/+1
equivalents for the gtk/ directory. svn path=/trunk/; revision=5930
2002-08-01Fix a few more memleaks found by valgrind (all derivingJörg Mayer1-2/+3
from the get_persconffile_path mess). svn path=/trunk/; revision=5927
2002-07-17Get rid of some "unused variable" and "unused static function" warnings,Guy Harris1-2/+68
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-06-16Handle the "bool" members the same way we handled the members forGuy Harris1-7/+7
enumerated values - "boolp" for pointers, "boolval" for values. svn path=/trunk/; revision=5678