diff options
author | Sake Blok <sake@euronet.nl> | 2009-12-21 23:07:14 +0000 |
---|---|---|
committer | Sake Blok <sake@euronet.nl> | 2009-12-21 23:07:14 +0000 |
commit | 2cd7003383696e69506ab75709b6e733f0f9ccce (patch) | |
tree | 39ef1079ee89d8a41a83911caa20aed7103e8ce1 | |
parent | 4381c54f0709b17e4e337faeae634c82b8b1b7ce (diff) |
Add "Ignore all packets", just like "Mark all packets"
svn path=/trunk/; revision=31343
-rw-r--r-- | gtk/main_packet_list.c | 15 | ||||
-rw-r--r-- | gtk/main_packet_list.h | 7 | ||||
-rw-r--r-- | gtk/menus.c | 4 | ||||
-rw-r--r-- | gtk/new_packet_list.c | 15 | ||||
-rw-r--r-- | gtk/new_packet_list.h | 7 |
5 files changed, 44 insertions, 4 deletions
diff --git a/gtk/main_packet_list.c b/gtk/main_packet_list.c index cf7ee439eb..91232e8d9f 100644 --- a/gtk/main_packet_list.c +++ b/gtk/main_packet_list.c @@ -594,19 +594,30 @@ void packet_list_ignore_frame_cb(GtkWidget *w _U_, gpointer data _U_) } } -void packet_list_unignore_all_frames_cb(GtkWidget *w _U_, gpointer data _U_) +static void ignore_all_frames(gboolean set) { frame_data *fdata; /* XXX: we might need a progressbar here */ for (fdata = cfile.plist_start; fdata != NULL; fdata = fdata->next) { - set_frame_ignore(FALSE, + set_frame_ignore(set, fdata, gtk_clist_find_row_from_data(GTK_CLIST(packet_list), fdata)); } redissect_packets(); } +void packet_list_ignore_all_frames_cb(GtkWidget *w _U_, gpointer data _U_) +{ + ignore_all_frames(TRUE); +} + +void packet_list_unignore_all_frames_cb(GtkWidget *w _U_, gpointer data _U_) +{ + ignore_all_frames(FALSE); +} + + void packet_list_update_ignored_frames(void) { frame_data *fdata; diff --git a/gtk/main_packet_list.h b/gtk/main_packet_list.h index 7488b054a7..10b2a6cbb8 100644 --- a/gtk/main_packet_list.h +++ b/gtk/main_packet_list.h @@ -103,6 +103,13 @@ extern void packet_list_update_marked_frames(void); */ extern void packet_list_ignore_frame_cb(GtkWidget *w _U_, gpointer data _U_); +/** Ignore all packets in the list. + * + * @param widget parent widget (unused) + * @param data unused + */ +extern void packet_list_ignore_all_frames_cb(GtkWidget *w _U_, gpointer data _U_); + /** Un-ignore all packets in the list. * * @param widget parent widget (unused) diff --git a/gtk/menus.c b/gtk/menus.c index 955308a79c..e1a2930a6b 100644 --- a/gtk/menus.c +++ b/gtk/menus.c @@ -528,11 +528,15 @@ static GtkItemFactoryEntry menu_items[] = #ifdef NEW_PACKET_LIST {"/Edit/_Ignore Packet (toggle)", "<control>X", GTK_MENU_FUNC(new_packet_list_ignore_frame_cb), 0, NULL, NULL,}, + {"/Edit/Ignore All Packets", "<alt><shift><control>X", GTK_MENU_FUNC(new_packet_list_ignore_all_frames_cb), + 0, NULL, NULL,}, {"/Edit/U_n-Ignore All Packets", "<shift><control>X", GTK_MENU_FUNC(new_packet_list_unignore_all_frames_cb), 0, NULL, NULL,}, #else {"/Edit/_Ignore Packet (toggle)", "<control>X", GTK_MENU_FUNC(packet_list_ignore_frame_cb), 0, NULL, NULL,}, + {"/Edit/Ignore All Packets", "<alt><shift><control>X", GTK_MENU_FUNC(packet_list_ignore_all_frames_cb), + 0, NULL, NULL,}, {"/Edit/U_n-Ignore All Packets", "<shift><control>X", GTK_MENU_FUNC(packet_list_unignore_all_frames_cb), 0, NULL, NULL,}, #endif /* NEW_PACKET_LIST */ diff --git a/gtk/new_packet_list.c b/gtk/new_packet_list.c index 81df82cccf..bd9da29f97 100644 --- a/gtk/new_packet_list.c +++ b/gtk/new_packet_list.c @@ -1178,17 +1178,28 @@ void new_packet_list_ignore_frame_cb(GtkWidget *w _U_, gpointer data _U_) redissect_packets(); } -void new_packet_list_unignore_all_frames_cb(GtkWidget *w _U_, gpointer data _U_) +static void ignore_all_frames(gboolean set) { frame_data *fdata; /* XXX: we might need a progressbar here */ for (fdata = cfile.plist_start; fdata != NULL; fdata = fdata->next) { - set_frame_ignore(FALSE, fdata); + set_frame_ignore(set, fdata); } redissect_packets(); } +void new_packet_list_ignore_all_frames_cb(GtkWidget *w _U_, gpointer data _U_) +{ + ignore_all_frames(TRUE); +} + +void new_packet_list_unignore_all_frames_cb(GtkWidget *w _U_, gpointer data _U_) +{ + ignore_all_frames(FALSE); +} + + static gboolean get_col_text_from_record( PacketListRecord *record, gint col_num, gchar** cell_text){ diff --git a/gtk/new_packet_list.h b/gtk/new_packet_list.h index 574d401c56..9ed095c13c 100644 --- a/gtk/new_packet_list.h +++ b/gtk/new_packet_list.h @@ -83,6 +83,13 @@ void new_packet_list_unmark_all_frames_cb(GtkWidget *w _U_, gpointer data _U_); */ extern void new_packet_list_ignore_frame_cb(GtkWidget *widget, gpointer data); +/** Ignore all packets in the list. + * + * @param widget parent widget (unused) + * @param data unused + */ +extern void new_packet_list_ignore_all_frames_cb(GtkWidget *w _U_, gpointer data _U_); + /** Un-ignore all packets in the list. * * @param widget parent widget (unused) |