diff options
author | Gerald Combs <gerald@wireshark.org> | 2009-12-22 20:29:28 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2009-12-22 20:29:28 +0000 |
commit | 6580e861df4e78c00a6d8a22ef2538961585a36d (patch) | |
tree | f3e93011d048f10d3c76d6425f98bbc521382a75 | |
parent | 4f30c2170ecf9cf634facd4f36423d3280a3e2d0 (diff) |
Rename splash_register_freq to info_update_freq. Use it to throttle name
resolution updates as well as splash screen updates.
svn path=/trunk/; revision=31351
-rw-r--r-- | gtk/about_dlg.c | 4 | ||||
-rw-r--r-- | gtk/main.c | 11 |
2 files changed, 8 insertions, 7 deletions
diff --git a/gtk/about_dlg.c b/gtk/about_dlg.c index 5510c8d600..69d31b5bf1 100644 --- a/gtk/about_dlg.c +++ b/gtk/about_dlg.c @@ -59,7 +59,7 @@ /* * Update frequence for the splash screen, given in milliseconds. */ -int splash_register_freq = 100; +int info_update_freq = 100; static void about_wireshark_destroy_cb(GtkWidget *, gpointer); @@ -188,7 +188,7 @@ splash_update(register_action_e action, const char *message, gpointer client_dat return; } memcpy(&next_tv, &cur_tv, sizeof(next_tv)); - next_tv.tv_usec += splash_register_freq * 1000; + next_tv.tv_usec += info_update_freq * 1000; if (next_tv.tv_usec >= 1000000) { next_tv.tv_sec++; next_tv.tv_usec -= 1000000; diff --git a/gtk/main.c b/gtk/main.c index 831a85003d..df9a75f7d6 100644 --- a/gtk/main.c +++ b/gtk/main.c @@ -1875,7 +1875,7 @@ main(int argc, char *argv[]) int opt; gboolean arg_error = FALSE; - extern int splash_register_freq; /* Found in about_dlg.c */ + extern int info_update_freq; /* Found in about_dlg.c. */ const gchar *filter; #ifdef _WIN32 @@ -2187,10 +2187,11 @@ main(int argc, char *argv[]) /* Initialize whatever we need to allocate colors for GTK+ */ colors_init(); - /* Non-blank filter means we're remote. Throttle splash screen updates. */ + /* Non-blank filter means we're remote. Throttle splash screen and resolution updates. */ filter = get_conn_cfilter(); - if ( *filter != '\0' ) - splash_register_freq = 1000; /* Milliseconds */ + if ( *filter != '\0' ) { + info_update_freq = 1000; /* Milliseconds */ + } /* We won't come till here, if we had a "console only" command line parameter. */ splash_win = splash_new("Loading Wireshark ..."); @@ -2251,7 +2252,7 @@ main(int argc, char *argv[]) tap_update_timer_id = g_timeout_add(prefs->tap_update_interval, tap_update_cb, NULL); #endif /* !_WIN32 && G_THREADS_ENABLED && USE_THREADS */ - g_timeout_add(750, resolv_update_cb, NULL); + g_timeout_add(info_update_freq, resolv_update_cb, NULL); splash_update(RA_CONFIGURATION, NULL, (gpointer)splash_win); |