X-Git-Url: http://git.samba.org/samba.git/?p=obnox%2Fwireshark%2Fwip.git;a=blobdiff_plain;f=gtk%2Fprefs_taps.c;h=8f7cc4991db21eedccddb30594ef261ac71dad85;hp=2a3e6f751c0fc75aa52c1dd32d85d71b33dedaf4;hb=52b316eb7370cfb0dc1f4d3914a34c8fef3ef4ce;hpb=7c0986fad5928cd296d40335270b9d650c30adce diff --git a/gtk/prefs_taps.c b/gtk/prefs_taps.c index 2a3e6f751c..8f7cc4991d 100644 --- a/gtk/prefs_taps.c +++ b/gtk/prefs_taps.c @@ -33,6 +33,7 @@ #include "gtk/prefs_taps.h" #include "gtk/prefs_dlg.h" +#include "gtk/main.h" #define TAP_UPDATE_INTERVAL_KEY "update_interval" @@ -42,7 +43,6 @@ static char update_interval_str[128] = ""; static char max_visible_str[128] = ""; -extern void reset_tap_update_timer(void); GtkWidget* stats_prefs_show(void) @@ -52,8 +52,6 @@ stats_prefs_show(void) #ifdef HAVE_LIBPORTAUDIO GtkWidget *rtp_player_max_visible_te; #endif - - GtkTooltips *tooltips = gtk_tooltips_new(); int pos = 0; /* Main vertical box */ @@ -66,16 +64,14 @@ stats_prefs_show(void) gtk_table_set_row_spacings(GTK_TABLE(main_tb), 10); gtk_table_set_col_spacings(GTK_TABLE(main_tb), 15); gtk_widget_show(main_tb); - g_object_set_data(G_OBJECT(main_tb), E_TOOLTIPS_KEY, tooltips); /* Tap update gap in ms */ tap_update_interval_te = create_preference_entry(main_tb, pos++, "Tap update interval in ms:", "Determines time between tap updates.", max_visible_str); - g_snprintf(update_interval_str, 128, "%d", prefs.tap_update_interval); + g_snprintf(update_interval_str, sizeof(update_interval_str), "%d", prefs.tap_update_interval); gtk_entry_set_text(GTK_ENTRY(tap_update_interval_te), update_interval_str); - gtk_tooltips_set_tip(tooltips, tap_update_interval_te, - "Gap in milliseconds between updates to taps is defined here", NULL); + gtk_widget_set_tooltip_text(tap_update_interval_te, "Gap in milliseconds between updates to taps is defined here"); g_object_set_data(G_OBJECT(main_vb), TAP_UPDATE_INTERVAL_KEY, tap_update_interval_te); #ifdef HAVE_LIBPORTAUDIO @@ -83,10 +79,9 @@ stats_prefs_show(void) rtp_player_max_visible_te = create_preference_entry(main_tb, pos++, "Max visible channels in RTP Player:", "Determines maximum height of RTP Player window.", max_visible_str); - g_snprintf(max_visible_str, 128, "%d", prefs.rtp_player_max_visible); + g_snprintf(max_visible_str, sizeof(max_visible_str), "%d", prefs.rtp_player_max_visible); gtk_entry_set_text(GTK_ENTRY(rtp_player_max_visible_te), max_visible_str); - gtk_tooltips_set_tip(tooltips, rtp_player_max_visible_te, - "Maximum height of RTP Player window is defined here.", NULL); + gtk_widget_set_tooltip_text(rtp_player_max_visible_te, "Maximum height of RTP Player window is defined here."); g_object_set_data(G_OBJECT(main_vb), RTP_PLAYER_MAX_VISIBLE_KEY, rtp_player_max_visible_te); #endif @@ -129,7 +124,9 @@ stats_prefs_fetch(GtkWidget *w _U_) void stats_prefs_apply(GtkWidget *w _U_) { +#if defined(_WIN32) || ! defined USE_THREADS reset_tap_update_timer(); +#endif } void