aboutsummaryrefslogtreecommitdiffstats
path: root/gtk/gtkglobals.h
AgeCommit message (Collapse)AuthorFilesLines
2004-01-09Turn the GTK+ 1.2.10 clist code into our own widget; that lets us modify itGuy Harris1-6/+1
to add functionality or improve performance, although, until we make it work on GTK+ 1.3[.x] and 2.x, we shouldn't count on the performance improvements, or make its API different from that of the GtkClist API (other than names). Move all the code that knows about the packet list into gtk/packet_list.c, so that the GtkClist vs. EthClist stuff is encapsulated inside it. svn path=/trunk/; revision=9608
2003-12-24Do the "isprint()" hack for GTK+ 2.x or 1.3[.x], whether on UNIX orGuy Harris1-7/+7
Windows - the problem is that GTK+ 1.3[.x] and later assume strings handed to them are UTF-8 strings, not, for example, ISO 8859/x strings. In packet-radius.c, re-define "isprint()" rather than #ifdeffing its use (the old code was also incorrectly treating 0x7f as a printable). svn path=/trunk/; revision=9436
2003-08-01From Chris Heath: fix up the check for printable ASCII done on WindowsGuy Harris1-2/+2
not to include DEL as printable ASCII. Also change the check in strutil.c to do it by redefining "isprint()", as is done in "gtk/gtkglobals.h", rather than by #ifdeffing the point at which the test is done. svn path=/trunk/; revision=8118
2002-12-31Update a comment to indicate why there's a problem with printable-but-Guy Harris1-15/+8
not-ASCII characters in GTK+. svn path=/trunk/; revision=6831
2002-11-03Merge gtk and gtk2 directories.Olivier Abad1-6/+12
svn path=/trunk/; revision=6552
2002-09-05Include cleanups in gtk and gtk2:Jörg Mayer1-5/+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-4/+4
winapi_cleanup tool written by Patrik Stridvall for the wine project. svn path=/trunk/; revision=6117
2002-01-11Have routines to create GtkCTrees, set their line and expander styleGuy Harris1-6/+1
based on the user's UI preferences, and add them to a list of GtkCTrees. Use those routines to create all GtkCTrees. Have a routine to update the preferences for all of those GtkCTrees. Call that routine whenever the preferences change. Label the line and expander style preferences as "Tree line style" and "Tree expander style", as they no longer apply only to protocol trees. Move the routines to maintain a list of scrolled windows, and to update scrollbar placement for scrolled windows, to "ui_util.c". svn path=/trunk/; revision=4520
2001-06-05Enable "Match Selected" only if there's a field selected *and* we can doGuy Harris1-5/+3
a "Match Selected" on it - we can't do a "Match Selected" if the field has no value (e.g., FT_NULL) and has a length of 0. If we unselect the current packet, we don't have a protocol tree, so we don't have a currently selected field - clear the "Match Selected" menu item and the display in the status line of information about the currently selected field. Move the low-level statusbar manipulation into "gtk/main.c", in routines whose API doesn't expose anything GTK+-ish. "close_cap_file()" calls one of those routines to clear out the status bar, so it doesn't need to take a pointer to the statusbar widget as an argument. "clear_tree_and_hex_views()" is purely a display-manipulating routine; move it to "gtk/proto_draw.c". Extract from "tree_view_unselect_row_cb()" an "unselect_field()" routine to do all the work that needs to be done if the currently selected protocol tree row is unselected, and call it if the currently selected packet list row is unselected (if it's unselected, there *is* no protocol tree, so no row can be selected), as well as from "tree_view_unselect_row_cb()". Before pushing a new field-description message onto the statusbar, pop the old one off. Get rid of an unused variable (set, but not used). svn path=/trunk/; revision=3513
2001-04-25Undefine "isprint()" before re-defining it, to squelch a compilerGuy Harris1-1/+8
warning. Put in a comment indicating that non-ASCII characters may well pass "isprint()". svn path=/trunk/; revision=3381
2001-04-10Check in isprint() hack for Win32 so that Ethereal is usably whileGilbert Ramirez1-1/+15
we figure out what the real bug is. Fix set_last_open_dir() to use G_DIR_SEPARATOR and G_DIR_SEPARATOR_S for cross-platform compatibility. svn path=/trunk/; revision=3281
2001-03-23Changes required to support multiple named data sources.Jeff Foster1-2/+2
Tvbuffers changed to added the data source name, GUI and printing code changed to support these changes and display the multiple hex views. svn path=/trunk/; revision=3165
2001-03-02Calculate the height and width of m_r_font globally, since variousGilbert Ramirez1-2/+2
routines need it. When a user clicks on a hex digit or on the corresponding character (the "text dump" portion) in the hex dump, find the field in the proto_tree that the byte corresponds to, expand the GtkCTree so that the field is viewable, select the field, and center it vertically. LanAlyzer has this feature, and I've missed it in Ethereal. svn path=/trunk/; revision=3096
2000-08-21Instead of each set of built-in preferences having "ok", "save",Guy Harris1-7/+4
"cancel", and "delete" methods, give them: "fetch" - fetch from the notebook tab any values not already stored in "prefs", and store them there, but doesn't apply them; "apply" - apply the settings in "prefs"; "destroy" - clean up any windows created from the tab. As we no longer have "cancel" methods, we don't have per-preference code to revert preference values; instead, we have the common preference dialog box code make a copy of all the current preferences, and, when the "Cancel" button is clicked, free the current preferences and copy the saved preferences to it, and apply the preferences. Add an "Apply" button to the preference dialog box, which applies the current preferences without closing the dialog box. Treat a request to delete the preferences dialog box as equivalent to clicking "Cancel". Have a "remember_ptree_widget()" routine to remember all protocol tree widgets, and use the list of those widgets when we set GUI preferences for the protocol tree widgets, rather than setting the main protocol tree widget and then using the list of packet windows. Move that code out of "main.c" to "proto_draw.c", as it's not used by anything in "main.c", but is used by stuff in "proto_draw.c". Make the font one of the preferences we can set on the fly for protocol tree widgets. Also make it something we can set on the fly for the packet list widget. svn path=/trunk/; revision=2316
2000-08-17It was silly of me to require that "forget_scrolled_window()" be calledGuy Harris1-2/+1
explicitly; the right thing to do was to have "remember_scrolled_window()" catch the "destroy" signal on the scrolled window widget, and have the handler for that signal forget the scrolled window. Doing that obviates the need to have creators of scrolled windows keep track of the windows they have and forget them when they're destroyed. The signal for a "the window manager has requested that this window go away" event is "delete_event", not "delete-event"; fix the "gtk_signal_connect()" calls that were using "delete-event". svn path=/trunk/; revision=2284
2000-07-03Remove the progress bar from the status line, and, instead, for anyGuy Harris1-2/+2
potentially long-running operation that has a progress indicator, pop up a modal dialog box with an indication of what is being done; a progress bar; a "Cancel" button to stop the operation. This: leaves more room on the status line for a filter expression; provides a mechanism to allow the user to cancel long-running operations (although the way we do so may not back out of them as nicely as the user might like, if it's not obvious what the "right" way is or if the "right" way is difficult to implement or involves doing as much work as letting the operation continue); means that, because the dialog box is modal, we don't have to worry about the user performing arbitrary UI operations out from under the operation and changing arbitrary bits of state being used by that operation. svn path=/trunk/; revision=2103
2000-04-01Split "filter_dialog_cb()" into "filter_dialog_cb()", which pops up aGuy Harris1-2/+2
"global" dialog box when "Edit:Filters" is selected, so that the list of filters can be edited, and "filter_browse_cb()", which pops up a dialog box associated with a "Filter:" button and a text entry widget attached to that button, so that a filter can be selected or saved (although it also supports the same editing that the "global" dialog box does). Have "filter_dialog_cb()" connect the window in which the "Filter:" button lives and the filter dialog box, so that: if the window in which the "Filter:" button lives goes away, so does the filter dialog box (as it no longer has a text widget into which it can stuff the selected filter); if the "Filter:" button is clicked when there's already a filter dialog box open, we just reactivate that existing dialog box rather than popping up a new one. Also keep a pointer to the "global" filter dialog box, so that we also arrange that there's only one of them (by reactivating the existing on if "Edit:Filters" is selected when there's already a "global" filter dialog box open). Keep around pointers to the dialog boxes that contain the "Filter:" buttons, so that we can arrange that there be only one of them (that was a side-effect of an earlier attempt at fixing the problems described above, but it's still useful for keeping multiple competing dialog boxes from being open - there's more of that to be done). Make the pointer to the "Open Capture File" dialog box widget static to "file_dlg.c" - nobody outside of "file_dlg.c cares about it. svn path=/trunk/; revision=1774
2000-03-02Use GtkScrolledWindows to add scrollbars to the hex/ASCII panes and toGuy Harris1-2/+3
the "Follow TCP Stream" displays; that means we can use the same GTK+ calls to set the scrollbar placement on them that is used to set it on other widgets. Keep a list of all the GtkScrolledWindows whose scrollbar placement we control with the GUI preference item for that, and change them all when the GUI preference item is changed (which means that the GUI preference item now applies to the "Follow TCP Stream" window as well as to the hex/ASCII panes). svn path=/trunk/; revision=1676
2000-02-29Jeff Foster's changes, with my additions, to allow the user to pop up aGuy Harris1-5/+10
window showing the protocol tree and hex/ASCII data for the currently selected packet. svn path=/trunk/; revision=1670
1999-12-30Allow user to modify appearance of lines and expanders in GUI protocolGilbert Ramirez1-1/+3
tree. svn path=/trunk/; revision=1400
1999-12-29Changed the protocol tree widget from a GtkTree to a GtkCTree. The two reasonsGilbert Ramirez1-1/+3
I did this: First, Havoc Pennington, in "GTK+/Gnome Application Development", in Appendix seciton A.3.88, recommends using GtkCTree instead of GtkTree because GtkCtree is faster, and GtkTree has limitation on its total row height: since it must fit inside a GdkWindow, it is limited to 32,768 pixels of height. GtkTree is more flexible with regards to the types of widgets that can be placed in the tree, but since we deal only with text, that doesn't matter, at least for now. Secondly, a GtkTree doesn't allow arrow-key navigation (at least as far as I could tell). It always bothered me that the up and down arrow keys worked in the packet list and in the hex dump, but no in the protocol tree. GtkCTree does allow arrow-key navigation. In fact, GtkCTree is a subclass of GtkCList (the packet list widget), so they behave a lot alike. I went ahead and fixed the selection bar which has been bothering Richard for a long time now. :) In the GUI preferences dialogue, you can now set both the packet list selection bar and the protocol tree selection bar to either "browse" or "select" mode. "browse" mode is what you're used to: the arrow keys move an outline of the selection bar, but do not change the selection. "select" mode does change the selection when the arrow keys are pressed. The default behavior is set to "select", which seems more natural for a first-time user. svn path=/trunk/; revision=1393
1999-12-16Add a new page to the Preferences notebook: a GUI page. The soleGilbert Ramirez1-1/+3
option right now is the placement of the vertical scrollbars in the 3 panes. (it's one decision; you can't have the placement of the vertical scrollbar in the packet list pane different than the placement in the protocol tree pane, for example). I did this because I find it convenient to have the vertical scrollbars on the *left* side of the text. My mouse cursor is usually expanding and collapsing the protocol tree widgets, and once the protocol tree changes size, I usually have to scroll. I'd rather move my mouse cursor just a few pixels over to find the vertical scrollbar. svn path=/trunk/; revision=1351
1999-12-09Move the GTK+ implementations of various UI utilities out of "util.c"Guy Harris1-3/+3
into "gtk/ui_util.c", and move the declarations of those UI utilities out of "util.h" into "ui_util.h". (The header file is in the top-level directory, rather than the "gtk" directory, because it declares window-system-independent interfaces to routines with window-system-dependent implementations.) Add to "gtk/ui_util.c" a routine to set the window and icon title. Use that routine to make the title of an Ethereal top-level window be {filename} - Ethereal if there's a capture open, and have "{filename}" be "<capture>" if it's a temporary capture file. svn path=/trunk/; revision=1255
1999-10-20Move GTK-related stuff out of globals.h and put it in gtk/gtkglobals.hGilbert Ramirez1-0/+39
svn path=/trunk/; revision=896