wireshark/gtk/gtkglobals.h

62 lines
1.9 KiB
C
Raw Normal View History

/* gtkglobals.h
* GTK-related Global defines, etc.
*
* $Id: gtkglobals.h,v 1.14 2001/04/10 12:07:39 gram Exp $
*
* Ethereal - Network traffic analyzer
* By Gerald Combs <gerald@zing.org>
* Copyright 1998 Gerald Combs
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#ifndef __GTKGLOBALS_H__
#define __GTKGLOBALS_H__
#ifndef __GTK_H__
#include <gtk/gtk.h>
#endif
Split "filter_dialog_cb()" into "filter_dialog_cb()", which pops up a "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-04-01 12:03:42 +00:00
extern GtkWidget *top_level, *packet_list, *tree_view,
*byte_nb_ptr, *info_bar;
extern GdkFont *m_r_font, *m_b_font;
extern guint m_font_height, m_font_width;
extern GtkStyle *item_style;
void set_scrollbar_placement_scrollw(GtkWidget *, int); /* 0=left, 1=right */
void set_scrollbar_placement_all(int); /* 1=right, 0=left */
void remember_scrolled_window(GtkWidget *);
1999-12-29 20:10:12 +00:00
void set_plist_sel_browse(gboolean);
void set_plist_font(GdkFont *font);
#ifdef _WIN32
/* It appears that isprint() is not working well
* with gtk+'s text widget. By narrowing down what
* we print, the ascii portion of the hex display works.
* MSVCRT's isprint() returns true on values like 0xd2,
* which cause the GtkTextWidget to go wacko.
*
* This is a quick fix for the symptom, not the
* underlying problem.
*/
#define isprint(c) (c >= 0x20 && c <= 0x7f)
#endif
#endif