Add display_is_remote.
Add a display_is_remote function and use it instead of get_conn_cfilter to check for remoteness. Change-Id: Ia93d113afec36ede55daf7dc8394b2dc0d8c9abf Reviewed-on: https://code.wireshark.org/review/9659 Reviewed-by: Gerald Combs <gerald@wireshark.org>
This commit is contained in:
parent
78bc3dd93a
commit
6d33c124d5
|
@ -60,7 +60,7 @@ void AccordionFrame::animatedShow()
|
|||
return;
|
||||
}
|
||||
|
||||
if (strlen (get_conn_cfilter()) < 1) {
|
||||
if (!display_is_remote()) {
|
||||
QWidget *parent = parentWidget();
|
||||
|
||||
if (parent && parent->layout()) {
|
||||
|
@ -89,7 +89,7 @@ void AccordionFrame::animatedHide()
|
|||
return;
|
||||
}
|
||||
|
||||
if (strlen (get_conn_cfilter()) < 1) {
|
||||
if (!display_is_remote()) {
|
||||
animation_->setStartValue(frame_height_);
|
||||
animation_->setEndValue(0);
|
||||
animation_->start();
|
||||
|
|
|
@ -83,7 +83,7 @@ SplashOverlay::SplashOverlay(QWidget *parent) :
|
|||
|
||||
#ifndef THROTTLE_STARTUP
|
||||
// Check for a remote connection
|
||||
if (strlen (get_conn_cfilter()) > 0)
|
||||
if (display_is_remote())
|
||||
info_update_freq_ = 1000;
|
||||
#endif
|
||||
|
||||
|
|
11
ui/util.c
11
ui/util.c
|
@ -336,6 +336,17 @@ const gchar *get_conn_cfilter(void) {
|
|||
return filter_str->str;
|
||||
}
|
||||
|
||||
gboolean display_is_remote(void)
|
||||
{
|
||||
static gboolean remote_display_checked;
|
||||
static gboolean is_remote;
|
||||
|
||||
if (!remote_display_checked) {
|
||||
is_remote = (strlen(get_conn_cfilter()) > 0);
|
||||
}
|
||||
return is_remote;
|
||||
}
|
||||
|
||||
/*
|
||||
* Editor modelines
|
||||
*
|
||||
|
|
|
@ -50,6 +50,11 @@ void compute_timestamp_diff(gint *diffsec, gint *diffusec,
|
|||
*/
|
||||
const char *get_conn_cfilter(void);
|
||||
|
||||
/** Check if we're running on a remote connection.
|
||||
* @return TRUE if we're running remotely, FALSE if local.
|
||||
*/
|
||||
gboolean display_is_remote(void);
|
||||
|
||||
/** Set the latest opened directory.
|
||||
* Will already be done when using file_selection_new().
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue