aboutsummaryrefslogtreecommitdiffstats
path: root/ui
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2018-04-15 17:35:42 -0700
committerAnders Broman <a.broman58@gmail.com>2018-04-17 03:44:47 +0000
commit1d030928ef88d630299e8e3531d9935ff1dfd342 (patch)
tree1bf6347a407ad216237cb275bbf728934d8f9f48 /ui
parentc8cf127375a1f785fbbcd4d63070a51c306a2c58 (diff)
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>
Diffstat (limited to 'ui')
-rw-r--r--ui/capture.c2
-rw-r--r--ui/preference_utils.c5
-rw-r--r--ui/qt/capture_file.cpp13
-rw-r--r--ui/qt/packet_list.cpp6
-rw-r--r--ui/recent.c19
-rw-r--r--ui/recent.h2
-rw-r--r--ui/rtp_stream.h3
-rw-r--r--ui/simple_dialog.h5
-rw-r--r--ui/tap-rlc-graph.h3
-rw-r--r--ui/voip_calls.c15
-rw-r--r--ui/voip_calls.h2
-rw-r--r--ui/win32/settings.ini5
-rw-r--r--ui/ws_ui_util.h8
13 files changed, 7 insertions, 81 deletions
diff --git a/ui/capture.c b/ui/capture.c
index c510e176e1..48100fceb3 100644
--- a/ui/capture.c
+++ b/ui/capture.c
@@ -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;
}
diff --git a/ui/preference_utils.c b/ui/preference_utils.c
index 4914b9192b..01584f0eb8 100644
--- a/ui/preference_utils.c
+++ b/ui/preference_utils.c
@@ -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 */
diff --git a/ui/qt/capture_file.cpp b/ui/qt/capture_file.cpp
index f291c14158..69d502b96d 100644
--- a/ui/qt/capture_file.cpp
+++ b/ui/qt/capture_file.cpp
@@ -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);
diff --git a/ui/qt/packet_list.cpp b/ui/qt/packet_list.cpp
index f77215d248..e90c72d75d 100644
--- a/ui/qt/packet_list.cpp
+++ b/ui/qt/packet_list.cpp
@@ -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)
{
diff --git a/ui/recent.c b/ui/recent.c
index e3dc0a72be..86271706ec 100644
--- a/ui/recent.c
+++ b/ui/recent.c
@@ -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;
diff --git a/ui/recent.h b/ui/recent.h
index cfafcc6350..f82b341330 100644
--- a/ui/recent.h
+++ b/ui/recent.h
@@ -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;
diff --git a/ui/rtp_stream.h b/ui/rtp_stream.h
index f2808795a6..a8e5b2cc02 100644
--- a/ui/rtp_stream.h
+++ b/ui/rtp_stream.h
@@ -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;
diff --git a/ui/simple_dialog.h b/ui/simple_dialog.h
index 53c1c52975..23710504f9 100644
--- a/ui/simple_dialog.h
+++ b/ui/simple_dialog.h
@@ -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);
diff --git a/ui/tap-rlc-graph.h b/ui/tap-rlc-graph.h
index 8dfdc247db..a3ec88c1ef 100644
--- a/ui/tap-rlc-graph.h
+++ b/ui/tap-rlc-graph.h
@@ -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,
diff --git a/ui/voip_calls.c b/ui/voip_calls.c
index 4432a60f73..9be42b6e38 100644
--- a/ui/voip_calls.c
+++ b/ui/voip_calls.c
@@ -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;
diff --git a/ui/voip_calls.h b/ui/voip_calls.h
index 5a724759f0..9c95603a0e 100644
--- a/ui/voip_calls.h
+++ b/ui/voip_calls.h
@@ -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;
/**
diff --git a/ui/win32/settings.ini b/ui/win32/settings.ini
deleted file mode 100644
index 13d8b783be..0000000000
--- a/ui/win32/settings.ini
+++ /dev/null
@@ -1,5 +0,0 @@
-# Gtk+ only.
-[Settings]
-gtk-toolbar-icon-size=GTK_ICON_SIZE_SMALL_TOOLBAR
-# disable images in buttons.
-gtk-button-images = 0
diff --git a/ui/ws_ui_util.h b/ui/ws_ui_util.h
index 03a1415d6c..34888d04ad 100644
--- a/ui/ws_ui_util.h
+++ b/ui/ws_ui_util.h
@@ -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);