Remove some GTK+-only code.

Change-Id: Ic2498c7acd6a1a522be45094148402ee34a6b4d1
Reviewed-on: https://code.wireshark.org/review/26958
Reviewed-by: Gerald Combs <gerald@wireshark.org>
Petri-Dish: Gerald Combs <gerald@wireshark.org>
Tested-by: Petri Dish Buildbot
Reviewed-by: Anders Broman <a.broman58@gmail.com>
This commit is contained in:
Gerald Combs 2018-04-15 17:35:42 -07:00 committed by Anders Broman
parent c8cf127375
commit 1d030928ef
32 changed files with 22 additions and 528 deletions

View File

@ -84,7 +84,6 @@ cmake_push_check_state()
set(CMAKE_REQUIRED_INCLUDES ${M_INCLUDE_DIRS})
set(CMAKE_REQUIRED_LIBRARIES ${M_LIBRARIES})
check_symbol_exists("floorl" "math.h" HAVE_FLOORL)
check_symbol_exists("lrint" "math.h" HAVE_LRINT) # GTK+ only
cmake_pop_check_state()
check_function_exists("getopt_long" HAVE_GETOPT_LONG)

View File

@ -95,8 +95,8 @@ void ws80211_free_interfaces(GArray *interfaces);
*/
int ws80211_set_freq(const char *name, guint32 freq, int chan_type, guint32 _U_ center_freq, guint32 _U_ center_freq2);
int ws80211_str_to_chan_type(const gchar *s); /* GTK+ only? */
const gchar *ws80211_chan_type_to_str(int type); /* GTK+ only? */
int ws80211_str_to_chan_type(const gchar *s);
const gchar *ws80211_chan_type_to_str(int type);
/** Check to see if we have FCS filtering.
*

View File

@ -107,7 +107,6 @@ typedef struct _capture_file {
guint32 first_displayed; /* Frame number of first frame displayed */
guint32 last_displayed; /* Frame number of last frame displayed */
column_info cinfo; /* Column formatting information */
gboolean columns_changed; /**< Have the columns been changed in the prefs? (GTK+ only) */
frame_data *current_frame; /* Frame data for current frame */
gint current_row; /* Row number for current frame */
epan_dissect_t *edt; /* Protocol dissection for currently selected packet */

View File

@ -987,7 +987,6 @@ libwireshark.so.0 libwireshark0 #MINVER#
prefs_find_preference@Base 1.9.1
prefs_get_bool_value@Base 2.3.0
prefs_get_color_value@Base 2.3.0
prefs_get_control@Base 2.3.0
prefs_get_description@Base 2.3.0
prefs_get_effect_flags@Base 2.5.0
prefs_get_enum_value@Base 2.3.0
@ -997,7 +996,6 @@ libwireshark.so.0 libwireshark0 #MINVER#
prefs_get_module_effect_flags@Base 2.5.0
prefs_get_max_value@Base 2.3.0
prefs_get_name@Base 2.3.0
prefs_get_ordinal@Base 2.3.0
prefs_get_range_value@Base 2.3.0
prefs_get_range_value_real@Base 2.3.0
prefs_get_string_list@Base 1.9.1
@ -1042,7 +1040,6 @@ libwireshark.so.0 libwireshark0 #MINVER#
prefs_remove_decode_as_value@Base 2.3.0
prefs_set_bool_value@Base 2.3.0
prefs_set_color_value@Base 2.3.0
prefs_set_control@Base 2.3.0
prefs_set_effect_flags@Base 2.5.0
prefs_set_effect_flags_by_name@Base 2.5.0
prefs_set_enum_value@Base 2.3.0

View File

@ -248,8 +248,6 @@ color_filter_clone(color_filter_t *colorf)
new_colorf->fg_color = colorf->fg_color;
new_colorf->disabled = colorf->disabled;
new_colorf->c_colorfilter = NULL;
new_colorf->color_edit_dlg_info = NULL;
new_colorf->selected = FALSE;
return new_colorf;
}
@ -760,7 +758,7 @@ write_filter(gpointer filter_arg, gpointer data_arg)
color_filter_t *colorf = (color_filter_t *)filter_arg;
FILE *f = data->f;
if ( (colorf->selected || !data->only_selected) &&
if ( (!data->only_selected) &&
(strstr(colorf->filter_name,CONVERSATION_COLOR_PREFIX)==NULL) ) {
fprintf(f,"%s@%s@%s@[%u,%u,%u][%u,%u,%u]\n",
colorf->disabled ? "!" : "",

View File

@ -32,13 +32,11 @@ typedef struct _color_filter {
color_t bg_color; /* background color for packets that match */
color_t fg_color; /* foreground color for packets that match */
gboolean disabled; /* set if the filter is disabled */
gboolean selected; /* set if the filter is selected in the color dialog box. GTK+ only. */
/* only used inside of color_filters.c */
struct epan_dfilter *c_colorfilter; /* compiled filter expression */
/* only used outside of color_filters.c (beside init) */
void *color_edit_dlg_info; /* if filter is being edited, ptr to req'd info. GTK+ only. */
} color_filter_t;
/** A color filter was added (while importing).

View File

@ -72,7 +72,6 @@ static void* display_filter_copy_cb(void* n, const void* o, size_t siz _U_) {
filter_expression_t* new_record = (filter_expression_t*)n;
const filter_expression_t* old_record = (const filter_expression_t*)o;
new_record->button = old_record->button;
new_record->label = g_strdup(old_record->label);
new_record->expression = g_strdup(old_record->expression);
new_record->comment = g_strdup(old_record->comment);

View File

@ -25,7 +25,6 @@ extern "C" {
*/
typedef struct filter_expression {
gpointer button; /* Filter toolbar (GTK only) */
gchar *label;
gchar *expression;
gchar *comment;

View File

@ -201,12 +201,6 @@ unsigned int prefs_get_module_effect_flags(module_t * module);
WS_DLL_PUBLIC
void prefs_set_module_effect_flags(module_t * module, unsigned int flags);
// GTK only
WS_DLL_PUBLIC void* prefs_get_control(pref_t *pref);
WS_DLL_PUBLIC void prefs_set_control(pref_t *pref, void* control);
WS_DLL_PUBLIC int prefs_get_ordinal(pref_t *pref);
WS_DLL_PUBLIC
gboolean prefs_set_range_value_work(pref_t *pref, const gchar *value,
gboolean return_range_errors, unsigned int *changed_flags);

View File

@ -97,13 +97,6 @@ static const enum_val_t gui_ptree_expander_style[] = {
{NULL, NULL, -1}
};
/* GTK+ only. */
static const enum_val_t gui_hex_dump_highlight_style[] = {
{"BOLD", "BOLD", 0},
{"INVERSE", "INVERSE", 1},
{NULL, NULL, -1}
};
static const enum_val_t gui_console_open_type[] = {
{"NEVER", "NEVER", console_open_never},
{"AUTOMATIC", "AUTOMATIC", console_open_auto},
@ -125,8 +118,6 @@ static const enum_val_t gui_fileopen_style[] = {
{NULL, NULL, -1}
};
/* GTK knows of two ways representing "both", vertical and horizontal aligned.
* as this may not work on other guis, we use only "both" in general here */
static const enum_val_t gui_toolbar_style[] = {
{"ICONS", "ICONS", 0},
{"TEXT", "TEXT", 1},
@ -280,21 +271,6 @@ guint32 prefs_get_max_value(pref_t *pref)
return pref->info.max_value;
}
void* prefs_get_control(pref_t *pref)
{
return pref->control;
}
void prefs_set_control(pref_t *pref, void* control)
{
pref->control = control;
}
int prefs_get_ordinal(pref_t *pref)
{
return pref->ordinal;
}
/*
* List of all modules with preference settings.
*/
@ -3035,11 +3011,7 @@ prefs_register_modules(void)
prefs_register_obsolete_preference(gui_module, "scrollbar_on_right");
prefs_register_obsolete_preference(gui_module, "packet_list_sel_browse");
prefs_register_obsolete_preference(gui_module, "protocol_tree_sel_browse");
prefs_register_bool_preference(gui_module, "tree_view_altern_colors",
"Alternating colors in TreeViews",
"Alternating colors in TreeViews?",
&prefs.gui_altern_colors);
prefs_register_obsolete_preference(gui_module, "tree_view_altern_colors");
prefs_register_bool_preference(gui_module, "expert_composite_eyecandy",
"Display Icons on Expert Composite Dialog Tabs",
@ -3066,10 +3038,7 @@ prefs_register_modules(void)
"Protocol-tree expander style",
&prefs.gui_ptree_expander_style, gui_ptree_expander_style, FALSE);
prefs_register_enum_preference(gui_module, "hex_dump_highlight_style",
"Hex dump highlight style",
"Hex dump highlight style",
&prefs.gui_hex_dump_highlight_style, gui_hex_dump_highlight_style, FALSE);
prefs_register_obsolete_preference(gui_module, "hex_dump_highlight_style");
gui_column_module = prefs_register_subtree(gui_module, "Columns", "Columns", NULL);
@ -3114,9 +3083,7 @@ prefs_register_modules(void)
prefs_register_obsolete_preference(gui_font_module, "font_name");
register_string_like_preference(gui_font_module, "gtk2.font_name", "Font name",
"Font name for packet list, protocol tree, and hex dump panes. (GTK+)",
&prefs.gui_gtk2_font_name, PREF_STRING, NULL, TRUE);
prefs_register_obsolete_preference(gui_font_module, "gtk2.font_name");
register_string_like_preference(gui_font_module, "qt.font_name", "Font name",
"Font name for packet list, protocol tree, and hex dump panes. (Qt)",
@ -3239,11 +3206,7 @@ prefs_register_modules(void)
"Save window maximized state at exit?",
&prefs.gui_geometry_save_maximized);
/* GTK+ only */
prefs_register_bool_preference(gui_module, "macosx_style",
"Use macOS style",
"Use macOS style (macOS with native GTK only)?",
&prefs.gui_macosx_style);
prefs_register_obsolete_preference(gui_module, "macosx_style");
prefs_register_obsolete_preference(gui_module, "geometry.main.x");
prefs_register_obsolete_preference(gui_module, "geometry.main.y");
@ -3298,18 +3261,8 @@ prefs_register_modules(void)
"Show version in the start page and/or main screen's title bar",
(gint*)(void*)(&prefs.gui_version_placement), gui_version_placement_type, FALSE);
prefs_register_bool_preference(gui_module, "auto_scroll_on_expand",
"Automatically scroll packet details",
"When selecting a new packet, automatically scroll"
"to the packet detail item that matches the most"
"recently selected item",
&prefs.gui_auto_scroll_on_expand);
prefs_register_uint_preference(gui_module, "auto_scroll_percentage",
"Packet detail scroll percentage",
"The percentage down the view the recently expanded detail item should be scrolled",
10,
&prefs.gui_auto_scroll_percentage);
prefs_register_obsolete_preference(gui_module, "auto_scroll_on_expand");
prefs_register_obsolete_preference(gui_module, "auto_scroll_percentage");
/* User Interface : Layout */
gui_layout_module = prefs_register_subtree(gui_module, "Layout", "Layout", gui_layout_callback);
@ -3492,7 +3445,7 @@ prefs_register_modules(void)
prefs_register_bool_preference(capture_module, "auto_scroll", "Scroll packet list during capture",
"Scroll packet list during capture?", &prefs.capture_auto_scroll);
/* GTK+ only */
/* GTK+ only, but we might implement this in Qt */
prefs_register_bool_preference(capture_module, "show_info", "Show capture info dialog while capturing",
"Show capture info dialog while capturing?", &prefs.capture_show_info);
@ -4000,22 +3953,13 @@ pre_init_prefs(void)
g_free(prefs.pr_cmd);
prefs.pr_cmd = g_strdup("lpr");
prefs.gui_altern_colors = FALSE;
prefs.gui_expert_composite_eyecandy = FALSE;
prefs.gui_ptree_line_style = 0;
prefs.gui_ptree_expander_style = 1;
prefs.gui_hex_dump_highlight_style = 1; /* GTK+ only */
prefs.filter_toolbar_show_in_statusbar = FALSE;
prefs.restore_filter_after_following_stream = FALSE;
prefs.gui_toolbar_main_style = TB_STYLE_ICONS;
prefs.gui_toolbar_filter_style = TB_STYLE_TEXT;
/* These will be g_freed, so they must be g_mallocated. */
g_free(prefs.gui_gtk2_font_name);
#ifdef _WIN32
prefs.gui_gtk2_font_name = g_strdup("Lucida Console 10");
#else
prefs.gui_gtk2_font_name = g_strdup("Monospace 10");
#endif
/* We try to find the best font in the Qt code */
g_free(prefs.gui_qt_font_name);
prefs.gui_qt_font_name = g_strdup("");
@ -4075,7 +4019,6 @@ pre_init_prefs(void)
prefs.gui_geometry_save_position = TRUE;
prefs.gui_geometry_save_size = TRUE;
prefs.gui_geometry_save_maximized= TRUE;
prefs.gui_macosx_style = TRUE;
prefs.gui_console_open = console_open_never;
prefs.gui_fileopen_style = FO_STYLE_LAST_OPENED;
prefs.gui_recent_df_entries_max = 10;
@ -4098,8 +4041,6 @@ pre_init_prefs(void)
g_free(prefs.gui_start_title);
prefs.gui_start_title = g_strdup("The World's Most Popular Network Protocol Analyzer");
prefs.gui_version_placement = version_both;
prefs.gui_auto_scroll_on_expand = FALSE;
prefs.gui_auto_scroll_percentage = 0;
prefs.gui_layout_type = layout_type_5;
prefs.gui_layout_content_1 = layout_pane_content_plist;
prefs.gui_layout_content_2 = layout_pane_content_pdetails;

View File

@ -138,16 +138,13 @@ typedef struct _e_prefs {
gint num_cols;
color_t st_client_fg, st_client_bg, st_server_fg, st_server_bg;
color_t gui_text_valid, gui_text_invalid, gui_text_deprecated;
gboolean gui_altern_colors; /* GTK only */
gboolean gui_expert_composite_eyecandy;
gboolean filter_toolbar_show_in_statusbar;
gboolean restore_filter_after_following_stream;
gint gui_ptree_line_style;
gint gui_ptree_expander_style;
gboolean gui_hex_dump_highlight_style;
gint gui_toolbar_main_style;
gint gui_toolbar_filter_style; /* GTK only? */
gchar *gui_gtk2_font_name;
gint gui_toolbar_filter_style;
gchar *gui_qt_font_name;
color_t gui_marked_fg;
color_t gui_marked_bg;
@ -158,7 +155,6 @@ typedef struct _e_prefs {
gboolean gui_geometry_save_position;
gboolean gui_geometry_save_size;
gboolean gui_geometry_save_maximized;
gboolean gui_macosx_style; /* GTK only */
console_open_e gui_console_open;
guint gui_recent_df_entries_max;
guint gui_recent_files_count_max;
@ -173,8 +169,6 @@ typedef struct _e_prefs {
gchar *gui_prepend_window_title;
gchar *gui_start_title;
version_info_e gui_version_placement;
gboolean gui_auto_scroll_on_expand; /* GTK+ only */
guint gui_auto_scroll_percentage; /* GTK+ only */
layout_type_e gui_layout_type;
layout_pane_content_e gui_layout_content_1;
layout_pane_content_e gui_layout_content_2;
@ -199,7 +193,7 @@ typedef struct _e_prefs {
gboolean capture_prom_mode;
gboolean capture_pcap_ng;
gboolean capture_real_time;
gboolean capture_auto_scroll;
gboolean capture_auto_scroll; /* XXX - Move to recent */
gboolean capture_no_extcap;
gboolean capture_show_info;
GList *capture_columns;

View File

@ -41,7 +41,7 @@ typedef struct _rtd_stat_table {
*/
typedef struct _rtd_data_t {
rtd_stat_table stat_table; /**< RTD table data */
void *user_data; /**< "GUI" specifics (GTK+ only) */
void *user_data; /**< "GUI" specifics (sharkd only?) */
} rtd_data_t;
/** Structure for information about a registered service response table */

View File

@ -398,7 +398,6 @@ setup_tree_presentation(gpointer k _U_, gpointer v, gpointer p)
stats_tree_cfg *cfg = (stats_tree_cfg *)v;
struct _stats_tree_pres_cbs *d = (struct _stats_tree_pres_cbs *)p;
cfg->in_use = FALSE;
cfg->setup_node_pr = d->setup_node_pr;
cfg->free_tree_pr = d->free_tree_pr;

View File

@ -128,7 +128,6 @@ struct _stats_tree_cfg {
gchar* tapname;
register_stat_group_t stat_group;
gboolean in_use; /* GTK+ only */
gboolean plugin;
/** dissector defined callbacks */

32
file.c
View File

@ -71,10 +71,6 @@
# include <ws2tcpip.h>
#endif
#ifdef HAVE_LIBPCAP
gboolean auto_scroll_live; /* GTK+ only? */
#endif
static gboolean read_record(capture_file *cf, dfilter_t *dfcode,
epan_dissect_t *edt, column_info *cinfo, gint64 offset);
@ -756,7 +752,6 @@ cf_continue_tail(capture_file *cf, volatile int to_read, int *err)
*err = 0;
packet_list_check_end();
/* Don't freeze/thaw the list when doing live capture */
/*packet_list_freeze();*/
@ -825,7 +820,7 @@ cf_continue_tail(capture_file *cf, volatile int to_read, int *err)
/* moving to the end of the packet list - if the user requested so and
we have some new packets. */
if (newly_displayed_packets && auto_scroll_live && cf->count != 0)
if (newly_displayed_packets && cf->count != 0)
packet_list_moveto_end();
if (cf->state == FILE_READ_ABORTED) {
@ -903,7 +898,6 @@ cf_finish_tail(capture_file *cf, int *err)
return CF_READ_ERROR;
}
packet_list_check_end();
/* Don't freeze/thaw the list when doing live capture */
/*packet_list_freeze();*/
@ -937,9 +931,6 @@ cf_finish_tail(capture_file *cf, int *err)
return CF_READ_ABORTED;
}
if (auto_scroll_live && cf->count != 0)
packet_list_moveto_end();
/* We're done reading sequentially through the file. */
cf->state = FILE_READ_DONE;
@ -3666,8 +3657,6 @@ cf_select_packet(capture_file *cf, int row)
dfilter_macro_build_ftv_cache(cf->edt->tree);
cf_callback_invoke(cf_cb_packet_selected, cf);
if (old_edt != NULL)
epan_dissect_free(old_edt);
@ -3685,25 +3674,11 @@ cf_unselect_packet(capture_file *cf)
cf->current_frame = NULL;
cf->current_row = 0;
cf_callback_invoke(cf_cb_packet_unselected, cf);
/* No protocol tree means no selected field. */
cf_unselect_field(cf);
/* Destroy the epan_dissect_t for the unselected packet. */
if (old_edt != NULL)
epan_dissect_free(old_edt);
}
/* Unset the selected protocol tree field, if any. */
void
cf_unselect_field(capture_file *cf)
{
cf->finfo_selected = NULL;
cf_callback_invoke(cf_cb_field_unselected, cf);
}
/*
* Mark a particular frame.
*/
@ -4585,8 +4560,6 @@ cf_export_specified_packets(capture_file *cf, const char *fname,
GArray *nrb_hdrs = NULL;
int encap;
cf_callback_invoke(cf_cb_file_export_specified_packets_started, (gpointer)fname);
packet_range_process_init(range);
/* We're writing out specified packets from the specified capture
@ -4653,7 +4626,6 @@ cf_export_specified_packets(capture_file *cf, const char *fname,
wtap_dump_close(pdh, &err);
if (fname_new != NULL)
ws_unlink(fname_new);
cf_callback_invoke(cf_cb_file_export_specified_packets_stopped, NULL);
return CF_WRITE_ABORTED;
break;
@ -4682,7 +4654,6 @@ cf_export_specified_packets(capture_file *cf, const char *fname,
}
}
cf_callback_invoke(cf_cb_file_export_specified_packets_finished, NULL);
return CF_WRITE_OK;
fail:
@ -4696,7 +4667,6 @@ fail:
ws_unlink(fname_new);
g_free(fname_new);
}
cf_callback_invoke(cf_cb_file_export_specified_packets_failed, NULL);
return CF_WRITE_ERROR;
}

16
file.h
View File

@ -63,18 +63,11 @@ typedef enum {
cf_cb_file_retap_finished,
cf_cb_file_merge_started, /* Qt only */
cf_cb_file_merge_finished, /* Qt only */
cf_cb_file_fast_save_finished, /* GTK+ only? */
cf_cb_packet_selected, /* GTK+ only. */
cf_cb_packet_unselected, /* GTK+ only. */
cf_cb_field_unselected, /* GTK+ only. */
cf_cb_file_fast_save_finished,
cf_cb_file_save_started,
cf_cb_file_save_finished,
cf_cb_file_save_failed,
cf_cb_file_save_stopped,
cf_cb_file_export_specified_packets_started, /* GTK+ only. */
cf_cb_file_export_specified_packets_finished, /* GTK+ only. */
cf_cb_file_export_specified_packets_failed, /* GTK+ only. */
cf_cb_file_export_specified_packets_stopped /* GTK+ only. */
} cf_cbs;
typedef void (*cf_callback_t) (gint event, gpointer data, gpointer user_data);
@ -606,13 +599,6 @@ void cf_select_packet(capture_file *cf, int row);
*/
void cf_unselect_packet(capture_file *cf);
/**
* Unselect all protocol tree fields, if any.
*
* @param cf the capture file
*/
void cf_unselect_field(capture_file *cf);
/**
* Mark a particular frame in a particular capture.
*

View File

@ -1,294 +0,0 @@
#
# Valgrind suppression file for Gtk+ 2.12
#
# Format specification:
# http://valgrind.org/docs/manual/manual-core.html#manual-core.suppress
#
#
# glibc Ubuntu Edgy
#
{
libc: getpwnam_r
Memcheck:Addr4
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/tls/i686/cmov/libc-*.so
obj:/lib/ld-*.so
fun:__libc_dlopen_mode
fun:__nss_lookup_function
obj:/lib/tls/i686/cmov/libc-*.so
fun:__nss_passwd_lookup
fun:getpwnam_r
fun:g_get_any_init_do
fun:g_get_home_dir
fun:gtk_rc_add_initial_default_files
fun:_gtk_rc_init
fun:post_parse_hook
fun:g_option_context_parse
fun:gtk_parse_args
fun:gtk_init_check
fun:gtk_init
}
{
libc: getpwnam_r
Memcheck:Addr4
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/tls/i686/cmov/libc-*.so
obj:/lib/ld-*.so
fun:__libc_dlopen_mode
fun:__nss_lookup_function
obj:/lib/tls/i686/cmov/libc-*.so
fun:__nss_passwd_lookup
fun:getpwnam_r
fun:g_get_any_init_do
fun:g_get_home_dir
fun:gtk_rc_add_initial_default_files
fun:_gtk_rc_init
fun:post_parse_hook
fun:g_option_context_parse
fun:gtk_parse_args
fun:gtk_init_check
fun:gtk_init
}
{
libc: getpwnam_r
Memcheck:Addr4
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/tls/i686/cmov/libc-*.so
obj:/lib/ld-*.so
fun:__libc_dlopen_mode
fun:__nss_lookup_function
fun:__nss_next
fun:getpwnam_r
fun:g_get_any_init_do
fun:g_get_home_dir
fun:gtk_rc_add_initial_default_files
fun:_gtk_rc_init
fun:post_parse_hook
fun:g_option_context_parse
fun:gtk_parse_args
fun:gtk_init_check
fun:gtk_init
}
{
libc: getpwnam_r
Memcheck:Addr4
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/ld-*.so
obj:/lib/tls/i686/cmov/libc-*.so
obj:/lib/ld-*.so
fun:__libc_dlopen_mode
fun:__nss_lookup_function
fun:__nss_next
fun:getpwnam_r
fun:g_get_any_init_do
fun:g_get_home_dir
fun:gtk_rc_add_initial_default_files
fun:_gtk_rc_init
fun:post_parse_hook
fun:g_option_context_parse
fun:gtk_parse_args
fun:gtk_init_check
fun:gtk_init
}
#
# glibc Ubuntu feisty
#
{
getpwnam_r
Memcheck:Leak
fun:malloc
obj:/lib/libc-2.5.so
fun:__nss_database_lookup
obj:*
obj:*
fun:getpwnam_r
}
#
# X
#
{
XSupportsLocale
Memcheck:Addr4
obj:/lib/ld-*.so
obj:/lib/tls/i686/cmov/libdl-*.so
obj:/lib/ld-*.so
obj:/lib/tls/i686/cmov/libdl-*.so
fun:dlopen
obj:/usr/lib/libX11.so.6.2.0
fun:_XlcDynamicLoad
fun:_XOpenLC
fun:_XlcCurrentLC
fun:XSupportsLocale
fun:_gdk_x11_initialize_locale
fun:_gdk_windowing_init
fun:gdk_pre_parse_libgtk_only
fun:pre_parse_hook
fun:g_option_context_parse
fun:gtk_parse_args
fun:gtk_init_check
fun:gtk_init
fun:main
}
{
Xcursor
Memcheck:Leak
fun:malloc
obj:/usr/lib/libXcursor.so.1.0.2
obj:/usr/lib/libXcursor.so.1.0.2
fun:XcursorXcFileLoadImages
fun:XcursorFileLoadImages
fun:XcursorLibraryLoadImages
fun:XcursorShapeLoadImages
fun:XcursorTryShapeCursor
fun:XCreateGlyphCursor
fun:XCreateFontCursor
fun:gdk_cursor_new_for_display
}
{
XcursorGetTheme
Memcheck:Leak
fun:malloc
fun:/usr/lib/libX11.so.6.2.0
fun:/usr/lib/libX11.so.6.2.0
fun:XrmGetStringDatabase
fun:XGetDefault
fun:_XcursorGetDisplayInfo
fun:XcursorGetTheme
}
{
XOpenDisplay
Memcheck:Leak
fun:calloc
fun:XOpenDisplay
}
{
XOpenDisplay
Memcheck:Leak
fun:malloc
fun:XOpenDisplay
}
#
# fontconfig
#
{
fontconfig
Memcheck:Leak
fun:realloc
fun:FcPatternObjectInsertElt
fun:FcPatternObjectAddWithBinding
}
{
pango_fc_font_map_load_fontset
Memcheck:Leak
fun:malloc
fun:FcLangSetCreate
fun:FcLangSetCopy
fun:FcValueSave
fun:FcPatternObjectAddWithBinding
fun:FcPatternObjectAdd
fun:FcFontRenderPrepare
fun:pango_fc_font_map_load_fontset
fun:pango_font_map_load_fontset
}
{
pango_font_map_load_fontset
Memcheck:Leak
fun:malloc
fun:FcPatternObjectAddWithBinding
fun:FcPatternObjectAdd
fun:FcFontRenderPrepare
fun:pango_fc_font_map_load_fontset
fun:pango_font_map_load_fontset
}
{
pango_fc_font_map_load_fontset
Memcheck:Leak
fun:malloc
fun:FcStrStaticName
fun:FcPatternObjectAddWithBinding
fun:FcPatternObjectAdd
fun:FcFontRenderPrepare
fun:pango_fc_font_map_load_fontset
}
{
pango_fc_font_map_list_families
Memcheck:Leak
fun:malloc
fun:FcStrStaticName
fun:FcPatternObjectAddWithBinding
fun:FcPatternAdd
fun:FcFontSetList
fun:FcFontList
fun:pango_fc_font_map_list_families
}
#
# freetype
#
{
freetype FT_Init_FreeType
Memcheck:Leak
fun:malloc
obj:/usr/lib/libfreetype.so.6.3.10
fun:ft_mem_qalloc
fun:ft_mem_alloc
fun:FT_New_Library
fun:FT_Init_FreeType
}
#
# glib
#
{
glib g_rand_new
Memcheck:Leak
fun:calloc
fun:g_malloc0
fun:g_rand_new_with_seed_array
fun:g_rand_new
fun:g_random_int
}

View File

@ -54,9 +54,6 @@ while getopts ":2a:b:C:lmnpP:rstTYwcevWdG" OPTCHAR ; do
W) COMMAND=wireshark
COMMAND_ARGS=""
VALID=1 ;;
G) COMMAND=wireshark-gtk
COMMAND_ARGS=""
VALID=1 ;;
d) COMMAND=dumpcap
COMMAND_ARGS="-i eth1 -c 3000"
VALID=1 ;;
@ -126,7 +123,6 @@ else
fi
cmdline="$LIBTOOL valgrind --suppressions=`dirname $0`/vg-suppressions $ADDITIONAL_SUPPRESSION_FILE \
--suppressions=`dirname $0`/gtk.suppression \
--tool=$TOOL $CALLGRIND_OUT_FILE $VERBOSE $LEAK_CHECK $REACHABLE $GEN_SUPPRESSIONS $TRACK_ORIGINS \
$COMMAND $COMMAND_ARGS $PCAP $COMMAND_ARGS2"

View File

@ -262,7 +262,7 @@ capture_input_read_all(capture_session *cap_session, gboolean is_tempfile,
case CF_READ_ABORTED:
/* User wants to quit program. Exit by leaving the main loop,
so that any quit functions we registered get called. */
main_window_nested_quit();
main_window_quit();
return FALSE;
}

View File

@ -27,6 +27,9 @@
#include "ui/preference_utils.h"
#include "ui/simple_dialog.h"
#ifdef HAVE_LIBPCAP
gboolean auto_scroll_live;
#endif
/* Fill in capture options with values from the preferences */
void
@ -37,7 +40,7 @@ prefs_to_capture_opts(void)
/* the same applies to other preferences settings as well. */
global_capture_opts.default_options.promisc_mode = prefs.capture_prom_mode;
global_capture_opts.use_pcapng = prefs.capture_pcap_ng;
global_capture_opts.show_info = prefs.capture_show_info; /* GTK+ only */
global_capture_opts.show_info = prefs.capture_show_info; /* GTK+ only? */
global_capture_opts.real_time_mode = prefs.capture_real_time;
auto_scroll_live = prefs.capture_auto_scroll;
#endif /* HAVE_LIBPCAP */

View File

@ -246,12 +246,6 @@ void CaptureFile::captureFileEvent(int event, gpointer data)
// the equivalent?
break;
case(cf_cb_packet_selected):
case(cf_cb_packet_unselected):
case(cf_cb_field_unselected):
// GTK+ only. Handled in Qt via signals and slots.
break;
case(cf_cb_file_save_started):
{
emit captureEvent(new CaptureEvent(CaptureEvent::Save, CaptureEvent::Started, QString((const char *)data)));
@ -267,13 +261,6 @@ void CaptureFile::captureFileEvent(int event, gpointer data)
emit captureEvent(new CaptureEvent(CaptureEvent::Save, CaptureEvent::Stopped));
break;
case cf_cb_file_export_specified_packets_started:
case cf_cb_file_export_specified_packets_finished:
case cf_cb_file_export_specified_packets_failed:
case cf_cb_file_export_specified_packets_stopped:
// GTK+ only.
break;
default:
qWarning() << "CaptureFile::captureFileCallback: event " << event << " unknown";
Q_ASSERT(false);

View File

@ -134,12 +134,6 @@ packet_list_select_row_from_data(frame_data *fdata_needle)
return FALSE;
}
gboolean
packet_list_check_end(void)
{
return FALSE; // GTK+ only.
}
void
packet_list_clear(void)
{

View File

@ -46,8 +46,6 @@
#define RECENT_GUI_BYTES_ENCODING "gui.bytes_encoding"
#define RECENT_GUI_GEOMETRY_MAIN_X "gui.geometry_main_x"
#define RECENT_GUI_GEOMETRY_MAIN_Y "gui.geometry_main_y"
#define RECENT_GUI_GTK_GEOMETRY_MAIN_X "gui.gtk.geometry_main_x"
#define RECENT_GUI_GTK_GEOMETRY_MAIN_Y "gui.gtk.geometry_main_y"
#define RECENT_GUI_GEOMETRY_MAIN_WIDTH "gui.geometry_main_width"
#define RECENT_GUI_GEOMETRY_MAIN_HEIGHT "gui.geometry_main_height"
#define RECENT_GUI_GEOMETRY_MAIN_MAXIMIZED "gui.geometry_main_maximized"
@ -251,9 +249,6 @@ window_geom_recent_read_pair(const char *name,
geom.set_size = FALSE;
geom.width = -1;
geom.height = -1;
geom.set_maximized = FALSE;/* this is valid in GTK2 only */
geom.maximized = FALSE; /* this is valid in GTK2 only */
}
if (strcmp(key, "x") == 0) {
@ -680,8 +675,6 @@ write_recent(void)
fprintf(rf, "# Decimal numbers.\n");
fprintf(rf, RECENT_GUI_GEOMETRY_MAIN_X ": %d\n", recent.gui_geometry_main_x);
fprintf(rf, RECENT_GUI_GEOMETRY_MAIN_Y ": %d\n", recent.gui_geometry_main_y);
fprintf(rf, RECENT_GUI_GTK_GEOMETRY_MAIN_X ": %d\n", recent.gui_gtk_geometry_main_x);
fprintf(rf, RECENT_GUI_GTK_GEOMETRY_MAIN_Y ": %d\n", recent.gui_gtk_geometry_main_y);
fprintf(rf, RECENT_GUI_GEOMETRY_MAIN_WIDTH ": %d\n",
recent.gui_geometry_main_width);
fprintf(rf, RECENT_GUI_GEOMETRY_MAIN_HEIGHT ": %d\n",
@ -925,16 +918,6 @@ read_set_recent_common_pair_static(gchar *key, const gchar *value,
if (p == value || *p != '\0')
return PREFS_SET_SYNTAX_ERR; /* number was bad */
recent.gui_geometry_main_y = (gint)num;
} else if (strcmp(key, RECENT_GUI_GTK_GEOMETRY_MAIN_X) == 0) {
num = strtol(value, &p, 0);
if (p == value || *p != '\0')
return PREFS_SET_SYNTAX_ERR; /* number was bad */
recent.gui_gtk_geometry_main_x = (gint)num;
} else if (strcmp(key, RECENT_GUI_GTK_GEOMETRY_MAIN_Y) == 0) {
num = strtol(value, &p, 0);
if (p == value || *p != '\0')
return PREFS_SET_SYNTAX_ERR; /* number was bad */
recent.gui_gtk_geometry_main_y = (gint)num;
} else if (strcmp(key, RECENT_GUI_GEOMETRY_MAIN_WIDTH) == 0) {
num = strtol(value, &p, 0);
if (p == value || *p != '\0')
@ -1237,8 +1220,6 @@ recent_read_static(char **rf_path_return, int *rf_errno_return)
/* set defaults */
recent.gui_geometry_main_x = 20;
recent.gui_geometry_main_y = 20;
recent.gui_gtk_geometry_main_x = 20;
recent.gui_gtk_geometry_main_y = 20;
recent.gui_geometry_main_width = DEF_WIDTH;
recent.gui_geometry_main_height = DEF_HEIGHT;
recent.gui_geometry_main_maximized= FALSE;

View File

@ -82,8 +82,6 @@ typedef struct recent_settings_tag {
gint gui_geometry_main_x;
gint gui_geometry_main_y;
gint gui_gtk_geometry_main_x;
gint gui_gtk_geometry_main_y;
gint gui_geometry_main_width;
gint gui_geometry_main_height;

View File

@ -59,9 +59,6 @@ typedef struct _rtp_stream_info {
gboolean tag_vlan_error;
gboolean tag_diffserv_error;
gboolean decode; /**< Decode this stream. GTK+ only? */
GList *rtp_packet_list; /**< List of RTP rtp_packet_t. GTK+ only */
tap_rtp_stat_t rtp_stats; /**< here goes the RTP statistics info */
gboolean problem; /**< if the streams had wrong sequence numbers or wrong timestamps */
gchar *ed137_info;

View File

@ -80,9 +80,6 @@ typedef enum {
* - simple_dialog_primary_end
* - Optionally, the secondary message.
*
* In the GTK+ UI primary_start and primary_end make up a <span> that adds
* text formatting. The whole string is then shoved into a GtkLabel.
*
* In the Qt UI we use primary_start and _end to split the primary and
* secondary messages. They are then added to a QMessageBox via setText and
* setInformativeText respectively. No formatting is applied.
@ -100,12 +97,10 @@ extern gpointer simple_dialog(ESD_TYPE_E type, gint btn_mask,
/** Surround the primary dialog message text by
* simple_dialog_primary_start() and simple_dialog_primary_end().
* To highlight the first sentence (will take effect on GTK2 only).
*/
extern const char *simple_dialog_primary_start(void);
/** Surround the primary dialog message text by
* simple_dialog_primary_start() and simple_dialog_primary_end().
* To highlight the first sentence (will take effect on GTK2 only).
*/
extern const char *simple_dialog_primary_end(void);

View File

@ -61,9 +61,6 @@ struct rlc_graph {
guint16 channelId;
guint8 rlcMode;
guint8 direction;
/* Lists of elements to draw. N.B. GTK version only. */
struct element_list *elists;
};
gboolean rlc_graph_segment_list_get(capture_file *cf, struct rlc_graph *tg, gboolean stream_known,

View File

@ -934,7 +934,6 @@ t38_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt, const
callsinfo->from_identity=g_strdup("T38 Media only");
callsinfo->to_identity=g_strdup("T38 Media only");
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
callsinfo->selected=FALSE;
callsinfo->start_fd = pinfo->fd;
callsinfo->start_rel_ts = pinfo->rel_ts;
callsinfo->protocol=MEDIA_T38;
@ -1129,7 +1128,6 @@ sip_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt ,
callsinfo->from_identity=g_strdup(pi->tap_from_addr);
callsinfo->to_identity=g_strdup(pi->tap_to_addr);
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
callsinfo->selected=FALSE;
callsinfo->start_fd=pinfo->fd;
callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->protocol=VOIP_SIP;
@ -1365,7 +1363,6 @@ isup_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
callsinfo->call_active_state = VOIP_ACTIVE;
callsinfo->call_state = VOIP_UNKNOWN;
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
callsinfo->selected = FALSE;
callsinfo->start_fd = pinfo->fd;
callsinfo->start_rel_ts = pinfo->rel_ts;
callsinfo->protocol = VOIP_ISUP;
@ -1779,7 +1776,6 @@ q931_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
callsinfo->from_identity=g_strdup(tapinfo->q931_calling_number);
callsinfo->to_identity=g_strdup(tapinfo->q931_called_number);
copy_address(&(callsinfo->initial_speaker),tapinfo->actrace_direction?&pstn_add:&(pinfo->src));
callsinfo->selected=FALSE;
callsinfo->start_fd=pinfo->fd;
callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->protocol=VOIP_AC_ISDN;
@ -1997,7 +1993,6 @@ h225_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
callsinfo->from_identity=g_strdup("");
callsinfo->to_identity=g_strdup("");
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
callsinfo->selected=FALSE;
callsinfo->start_fd=pinfo->fd;
callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->protocol=VOIP_H323;
@ -2639,7 +2634,6 @@ mgcp_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
callsinfo->to_identity=g_strdup(pi->endpointId);
}
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
callsinfo->selected=FALSE;
callsinfo->start_fd=pinfo->fd;
callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->protocol=VOIP_MGCP;
@ -2847,7 +2841,6 @@ actrace_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
callsinfo->from_identity=g_strdup("N/A");
callsinfo->to_identity=g_strdup("N/A");
copy_address(&(callsinfo->initial_speaker),tapinfo->actrace_direction?&pstn_add:&(pinfo->src));
callsinfo->selected=FALSE;
callsinfo->start_fd=pinfo->fd;
callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->protocol=VOIP_AC_CAS;
@ -2994,8 +2987,6 @@ h248_calls_packet_common(voip_calls_tapinfo_t *tapinfo, packet_info *pinfo, epan
callsinfo->stop_fd = pinfo->fd;
callsinfo->stop_rel_ts = pinfo->rel_ts;
callsinfo->selected = FALSE;
g_queue_push_tail(tapinfo->callsinfos, callsinfo);
} else {
@ -3168,7 +3159,6 @@ sccp_calls(voip_calls_tapinfo_t *tapinfo, packet_info *pinfo, epan_dissect_t *ed
callsinfo->stop_fd = pinfo->fd;
callsinfo->stop_rel_ts = pinfo->rel_ts;
callsinfo->selected = FALSE;
callsinfo->call_num = tapinfo->ncalls++;
g_queue_push_tail(tapinfo->callsinfos, callsinfo);
@ -3387,7 +3377,6 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
callsinfo->from_identity=g_strdup_printf("%x",pi->termid);
callsinfo->to_identity=g_strdup("UNKNOWN");
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
callsinfo->selected=FALSE;
/* Set this on init of struct so in case the call doesn't complete, we'll have a ref. */
/* Otherwise if the call is completed we'll have the open/close streams to ref actual call duration */
@ -3644,7 +3633,6 @@ unistim_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *e
callsinfo->from_identity=g_strdup("UNKNOWN");
callsinfo->to_identity=g_strdup("UNKNOWN");
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
callsinfo->selected=FALSE;
/* Set this on init of struct so in case the call doesn't complete, we'll have a ref. */
/* Otherwise if the call is completed we'll have the open/close streams to ref actual call duration */
@ -3891,7 +3879,6 @@ skinny_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *ed
callsinfo->stop_fd = pinfo->fd;
callsinfo->stop_rel_ts = pinfo->rel_ts;
callsinfo->selected = FALSE;
g_queue_push_tail(tapinfo->callsinfos, callsinfo);
} else {
if (si->callingParty) {
@ -4050,7 +4037,6 @@ iax2_calls_packet( void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt
callsinfo->stop_fd = pinfo->fd;
callsinfo->stop_rel_ts = pinfo->rel_ts;
callsinfo->selected = FALSE;
g_queue_push_tail(tapinfo->callsinfos, callsinfo);
} else {
@ -4157,7 +4143,6 @@ voip_calls_packet(void *tap_offset_ptr, packet_info *pinfo, epan_dissect_t *edt,
callsinfo->from_identity = g_strdup((pi->from_identity)?pi->from_identity:"");
callsinfo->to_identity = g_strdup((pi->to_identity)?pi->to_identity:"");
copy_address(&(callsinfo->initial_speaker),&(pinfo->src));
callsinfo->selected=FALSE;
callsinfo->start_fd=pinfo->fd;
callsinfo->start_rel_ts=pinfo->rel_ts;
callsinfo->protocol=VOIP_COMMON;

View File

@ -158,8 +158,6 @@ typedef struct _voip_calls_info {
nstime_t start_rel_ts;
frame_data *stop_fd;
nstime_t stop_rel_ts;
gboolean selected; /* GTK+ only */
} voip_calls_info_t;
/**

View File

@ -1,5 +0,0 @@
# Gtk+ only.
[Settings]
gtk-toolbar-icon-size=GTK_ICON_SIZE_SMALL_TOOLBAR
# disable images in buttons.
gtk-button-images = 0

View File

@ -33,15 +33,12 @@ typedef struct window_geometry_s {
gboolean set_size; /**< set the width and height values */
gint width; /**< the windows width */
gint height; /**< the windows height */
gboolean set_maximized; /**< set the maximized state (GTK2 only) */
gboolean maximized; /**< the windows maximized state (GTK2 only) */
gboolean set_maximized; /**< set the maximized state */
gboolean maximized; /**< the windows maximized state */
} window_geometry_t;
/* update the main window */
extern void main_window_update(void);
/* quit a nested main window. GTK+ only. */
extern void main_window_nested_quit(void);
/* quit the main window */
extern void main_window_quit(void);
@ -68,7 +65,6 @@ void packet_list_recolor_packets(void);
void packet_list_queue_draw(void);
void packet_list_select_first_row(void);
void packet_list_moveto_end(void);
gboolean packet_list_check_end(void); /* GTK+ only */
gboolean packet_list_select_row_from_data(frame_data *fdata_needle);
void packet_list_resize_column(gint col);

View File

@ -141,12 +141,6 @@ void main_window_update(void)
#ifdef HAVE_LIBPCAP
/* quit a nested main window */
void main_window_nested_quit(void)
{
wsApp->quit();
}
/* quit the main window */
void main_window_quit(void)
{