aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/funnel_stat.c
diff options
context:
space:
mode:
Diffstat (limited to 'ui/gtk/funnel_stat.c')
-rw-r--r--ui/gtk/funnel_stat.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/ui/gtk/funnel_stat.c b/ui/gtk/funnel_stat.c
index 319f80ec75..b791b423cd 100644
--- a/ui/gtk/funnel_stat.c
+++ b/ui/gtk/funnel_stat.c
@@ -141,7 +141,7 @@ static gboolean text_window_delete_event_cb(GtkWidget *win _U_, GdkEvent *event
return TRUE;
}
-static funnel_text_window_t* new_text_window(const gchar* title) {
+static funnel_text_window_t* new_text_window(const char* title) {
funnel_text_window_t* tw = (funnel_text_window_t *)g_malloc(sizeof(funnel_text_window_t));
GtkWidget *txt_scrollw, *main_vb, *hbox;
@@ -243,7 +243,7 @@ static void text_window_append(funnel_text_window_t* tw, const char *str)
}
-static void text_window_set_text(funnel_text_window_t* tw, const gchar* text)
+static void text_window_set_text(funnel_text_window_t* tw, const char* text)
{
if (! tw->win) return;
@@ -410,12 +410,11 @@ static void funnel_new_dialog(const gchar* title,
dd->dlg_cb = dlg_cb;
dd->data = data;
- for (i=0; fieldnames[i]; i++);
-
win = dlg_window_new(title);
dd->win = win;
+ for (i=0; fieldnames[i]; i++);
gtk_window_resize(GTK_WINDOW(win),400,10*(i+2));
main_vb = ws_gtk_box_new(GTK_ORIENTATION_VERTICAL, 5, FALSE);
@@ -457,11 +456,11 @@ static void funnel_new_dialog(const gchar* title,
gtk_widget_show(win);
}
-static gchar * funnel_get_filter(void) {
- return (gchar *)gtk_entry_get_text(GTK_ENTRY(main_display_filter_widget));
+static const gchar * funnel_get_filter(funnel_ops_id_t *ops_id _U_ _U_) {
+ return gtk_entry_get_text(GTK_ENTRY(main_display_filter_widget));
}
-static void funnel_set_filter(const char* filter_string) {
+static void funnel_set_filter(funnel_ops_id_t *ops_id _U_, const char* filter_string) {
gtk_entry_set_text(GTK_ENTRY(main_display_filter_widget), filter_string);
}
@@ -469,7 +468,7 @@ static void funnel_set_color_filter_slot(guint8 filt_nr, const gchar* filter_str
color_filters_set_tmp(filt_nr, (gchar *)filter_string, FALSE);
}
-static void funnel_apply_filter(void) {
+static void funnel_apply_filter(funnel_ops_id_t *ops_id _U_) {
const char* filter_string = gtk_entry_get_text(GTK_ENTRY(main_display_filter_widget));
main_filter_packets(&cfile, filter_string, FALSE);
}
@@ -482,11 +481,11 @@ static void funnel_logger(const gchar *log_domain _U_,
fputs(message,stderr);
}
-static void funnel_retap_packets(void) {
+static void funnel_retap_packets(funnel_ops_id_t *ops_id _U_) {
cf_retap_packets(&cfile);
}
-static gboolean funnel_open_file(const char* fname, const char* filter, char** err_str) {
+static gboolean funnel_open_file(funnel_ops_id_t *ops_id _U_, const char* fname, const char* filter, char** err_str) {
int err = 0;
dfilter_t *rfcode = NULL;
@@ -529,23 +528,24 @@ static gboolean funnel_open_file(const char* fname, const char* filter, char** e
return TRUE;
}
-static funnel_progress_window_t* funnel_new_progress_window(const gchar* label, const gchar* task, gboolean terminate_is_stop, gboolean *stop_flag) {
- return (funnel_progress_window_t*)create_progress_dlg(top_level, label, task, terminate_is_stop, stop_flag);
+static struct progdlg* funnel_new_progress_window(funnel_ops_id_t *ops_id _U_, const gchar* label, const gchar* task, gboolean terminate_is_stop, gboolean *stop_flag) {
+ return create_progress_dlg(top_level, label, task, terminate_is_stop, stop_flag);
}
-static void funnel_update_progress(funnel_progress_window_t* win, float pr, const gchar* task) {
- update_progress_dlg((progdlg_t*)win, pr, task);
+static void funnel_update_progress(struct progdlg* win, float pr, const gchar* task) {
+ update_progress_dlg(win, pr, task);
}
-static void funnel_destroy_progress_window(funnel_progress_window_t* win) {
- destroy_progress_dlg((progdlg_t*)win);
+static void funnel_destroy_progress_window(struct progdlg* win) {
+ destroy_progress_dlg(win);
}
-static void funnel_reload(void) {
+static void funnel_reload(funnel_ops_id_t *ops_id _U_) {
if (cfile.state == FILE_READ_DONE) cf_reload(&cfile);
}
static const funnel_ops_t funnel_ops = {
+ NULL, /* ops_id */
new_text_window,
text_window_set_text,
text_window_append,