summaryrefslogtreecommitdiff
path: root/ui/gtk/filter_dlg.c
AgeCommit message (Collapse)AuthorFilesLines
2017-04-09Pull the error reporting into {read,save}_filter_list.Guy Harris1-30/+5
Change-Id: I4d9582661f2f1728d400eeb2a1b1dea98f32ce7f Reviewed-on: https://code.wireshark.org/review/20982 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2017-04-09Move the filter file reading code to libui.Guy Harris1-1/+1
It doesn't belong in libwireshark, as it doesn't affect dissection, but it *does* belong in libui, as it's helper code for the UIs. Change-Id: I8a5e0640a299a08e9ec1917dd253197438ebfdbc Reviewed-on: https://code.wireshark.org/review/20974 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2016-09-01gtk: fix compilation with GTK+ before 2.18Peter Wu1-0/+1
Removed in v1.99.2rc0-399-g43f09e6, but some includes are still needed. Basically I looked for the functions defined in the ui/gtk/old-gtk-compat.h header file that were in files below ui/gtk/. Then I matched it against the removed part in the above commit and added the header back at its old place. In two other cases, the header was only needed for Windows. If the above commit did not reference the file, I checked which function was in use and added the header on top, removing redundant conditionals. Reported and tested by a user of GTK+ 2.12.12 on top of v2.0.5. Change-Id: I649eec1e5531070f88c99d893c4920306f56d849 Reviewed-on: https://code.wireshark.org/review/17371 Petri-Dish: Peter Wu <peter@lekensteyn.nl> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Peter Wu <peter@lekensteyn.nl>
2016-01-27Allow/Create an option to use "capture filter" labels defined in wireshark ↵Mike781-1/+1
GUI from CLI Move ui/filters.[ch] to filter_files.[ch] because dumpcap is using functionality. Bug: 8091 Change-Id: I195c82fc023f97d6f331b8718c45a2d83d30faea Reviewed-on: https://code.wireshark.org/review/5925 Petri-Dish: Michael Mann <mmann78@netscape.net> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-12-20Add COL_CUSTOM_PRIME_REGEXStig Bjørlykke1-1/+2
Use this as a common regex to split multi-field custom columns. Change-Id: I40f76743284c5981c95d2e47d6d1d2a7f357d2ea Reviewed-on: https://code.wireshark.org/review/12753 Petri-Dish: Stig Bjørlykke <stig@bjorlykke.org> Reviewed-by: Stig Bjørlykke <stig@bjorlykke.org>
2015-06-05Qt: Add the capture and display filter dialog.Gerald Combs1-1/+1
Use a single overloaded dialog, similar to the GTK+ UI. Change-Id: If85db14a7101770f115bef725f5145e0010c518d Reviewed-on: https://code.wireshark.org/review/8776 Petri-Dish: Gerald Combs <gerald@wireshark.org> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Gerald Combs <gerald@wireshark.org>
2015-01-18Clean up ftype-conversion and dfilter error message string handling.Guy Harris1-28/+28
Have dfilter_compile() take an additional gchar ** argument, pointing to a gchar * item that, on error, gets set to point to a g_malloc()ed error string. That removes one bit of global state from the display filter parser, and doesn't impose a fixed limit on the error message strings. Have fvalue_from_string() and fvalue_from_unparsed() take a gchar ** argument, pointer to a gchar * item, rather than an error-reporting function, and set the gchar * item to point to a g_malloc()ed error string on an error. Allow either gchar ** argument to be null; if the argument is null, no error message is allocated or provided. Change-Id: Ibd36b8aaa9bf4234aa6efa1e7fb95f7037493b4c Reviewed-on: https://code.wireshark.org/review/6608 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2015-01-01Remove unneeded includes from ui folderMartin Mathieson1-2/+0
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a Reviewed-on: https://code.wireshark.org/review/6128 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-12-20Fix filter test for multifield custom columnStig Bjørlykke1-1/+1
This adds support for "field||field" without spaces. Change-Id: Ia738d6642d12a188d1629bbdd9701cc8f8bb7a68 Reviewed-on: https://code.wireshark.org/review/5922 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-12-20Fix filter valid/invalid test for multifield custom typeMichal Labedzki1-0/+22
Check for "or" or "||" (also ignore whitespaces) and check both arguments of this operator to be fieldname (character check), then check whole filter is valid for dfilter compiler. Change-Id: I412b5dc1fca16fcd2b640aa74af81167300fd11e Reviewed-on: https://code.wireshark.org/review/5848 Petri-Dish: Michal Labedzki <michal.labedzki@tieto.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Tested-by: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com>
2014-06-30Move filters.[ch] to libui.Guy Harris1-1/+1
Change-Id: I32f04016498dfe8f54b0480f30a84ffe5ef7868f Reviewed-on: https://code.wireshark.org/review/2727 Reviewed-by: Guy Harris <guy@alum.mit.edu>
2014-06-24GTK3: Fix changing filter expression's bg color based on validityBalint Reczey1-8/+20
Bug: 8598 Change-Id: Id5a52c05cab25df9e228b1b4d2caf07335c1f4c8 Reviewed-on: https://code.wireshark.org/review/2614 Reviewed-by: Anders Broman <a.broman58@gmail.com> Reviewed-by: Evan Huus <eapache@gmail.com>
2014-03-11Migrate GTK icon handling to GTK 3.10 APIBalint Reczey1-3/+3
GtkStockItem usage is deprecated with all the GTK_STOCK_.* stock ids. We keep a stock id based approach but without relying on GTK's GtkStockItem system. We create our own internal stock ids for {icon, label} tuples and keep the original GTK stock id #define-s and values to preserve backward compatibility. Change-Id: Ia0b35a5903f079e92c8026e3df21bbf0be2d06b0 Reviewed-on: https://code.wireshark.org/review/302 Reviewed-by: Gerald Combs <gerald@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-03-04Remove all $Id$ from top of fileAlexis La Goutte1-2/+0
(Using sed : sed -i '/^ \* \$Id\$/,+1 d') Fix manually some typo (in export_object_dicom.c and crc16-plain.c) Change-Id: I4c1ae68d1c4afeace8cb195b53c715cf9e1227a8 Reviewed-on: https://code.wireshark.org/review/497 Reviewed-by: Anders Broman <a.broman58@gmail.com>
2014-02-25Remove trailing whitespaceBill Meier1-1/+1
Change-Id: I8116f63ff88687c8db3fd6e8e23b22ab2f759af0 Reviewed-on: https://code.wireshark.org/review/385 Reviewed-by: Bill Meier <wmeier@newsguy.com> Tested-by: Bill Meier <wmeier@newsguy.com>
2013-11-17Move the epan/filesystem.c routines to wsutil; they're not specific toGuy Harris1-1/+1
packet dissection, they're specific to the entire Wireshark suite of programs. svn path=/trunk/; revision=53377
2013-06-28Make colors used by colorize_filter_te_as_* as preferences. Bug 5413 ↵Michael Mann1-6/+3
(https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5413) svn path=/trunk/; revision=50203
2013-05-05Revert 49166: It breaks compilation:Jörg Mayer1-1/+1
[ 82%] Building C object ui/gtk/CMakeFiles/gtkui.dir/filter_dlg.c.o /home/jmayer/work/wireshark/svn/trunk/ui/gtk/filter_dlg.c: In function ‘color_filter_te’: /home/jmayer/work/wireshark/svn/trunk/ui/gtk/filter_dlg.c:1258:5: error: enum conversion when passing argument 2 of ‘gtk_widget_modify_bg’ is invalid in C++ [-Werror=c++-compat] gtk_widget_modify_bg(w, GTK_STATE_FLAG_NORMAL, &bg); ^ In file included from /usr/include/gtk-3.0/gtk/gtkaction.h:38:0, from /usr/include/gtk-3.0/gtk/gtkactiongroup.h:38, from /usr/include/gtk-3.0/gtk/gtkapplication.h:29, from /usr/include/gtk-3.0/gtk/gtkwindow.h:35, from /usr/include/gtk-3.0/gtk/gtkdialog.h:35, from /usr/include/gtk-3.0/gtk/gtkaboutdialog.h:32, from /usr/include/gtk-3.0/gtk/gtk.h:33, from /home/jmayer/work/wireshark/svn/trunk/ui/gtk/filter_dlg.c:29: /usr/include/gtk-3.0/gtk/gtkwidget.h:813:13: note: expected ‘GtkStateType’ but argument is of type ‘int’ void gtk_widget_modify_bg (GtkWidget *widget, ^ /home/jmayer/work/wireshark/svn/trunk/ui/gtk/filter_dlg.c:1258:5: error: passing argument 3 of ‘gtk_widget_modify_bg’ from incompatible pointer type [-Werror] gtk_widget_modify_bg(w, GTK_STATE_FLAG_NORMAL, &bg); ^ In file included from /usr/include/gtk-3.0/gtk/gtkaction.h:38:0, from /usr/include/gtk-3.0/gtk/gtkactiongroup.h:38, from /usr/include/gtk-3.0/gtk/gtkapplication.h:29, from /usr/include/gtk-3.0/gtk/gtkwindow.h:35, from /usr/include/gtk-3.0/gtk/gtkdialog.h:35, from /usr/include/gtk-3.0/gtk/gtkaboutdialog.h:32, from /usr/include/gtk-3.0/gtk/gtk.h:33, from /home/jmayer/work/wireshark/svn/trunk/ui/gtk/filter_dlg.c:29: /usr/include/gtk-3.0/gtk/gtkwidget.h:813:13: note: expected ‘const struct GdkColor *’ but argument is of type ‘struct GdkRGBA *’ void gtk_widget_modify_bg (GtkWidget *widget, ^ cc1: all warnings being treated as errors make[2]: *** [ui/gtk/CMakeFiles/gtkui.dir/filter_dlg.c.o] Error 1 Also note that https://developer.gnome.org/gtk3/3.6/GtkWidget.html#gtk-widget-modify-bg states: gtk_widget_modify_bg has been deprecated since version 3.0 and should not be used in newly-written code. Use gtk_widget_override_background_color() instead Of course we are not the only ones who have problems with that replacement: http://gtk.10911.n7.nabble.com/button-background-color-in-gtk3-td14268.html which ends with a sort of ugly solution without the deprecated function. svn path=/trunk/; revision=49169
2013-05-05Really change display filter combo box's background color using GTK3Balint Reczey1-1/+1
svn path=/trunk/; revision=49166
2013-03-09Use explicit casts.Anders Broman1-46/+46
svn path=/trunk/; revision=48217
2013-01-10Another solution to fix bug ↵Irene Rüngeler1-0/+1
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8183. Now both windows are modal. svn path=/trunk/; revision=47018
2012-12-26Fix a bunch of warnings.Guy Harris1-2/+2
Cast away some implicit 64-bit-to-32-bit conversion errors due to use of sizeof. Cast away some implicit 64-bit-to-32-bit conversion errors due to use of strtol() and strtoul(). Change some data types to avoid those implicit conversion warnings. When assigning a constant to a float, make sure the constant isn't a double, by appending "f" to the constant. Constify a bunch of variables, parameters, and return values to eliminate warnings due to strings being given const qualifiers. Cast away those warnings in some cases where an API we don't control forces us to do so. Enable a bunch of additional warnings by default. Note why at least some of the other warnings aren't enabled. randpkt.c and text2pcap.c are used to build programs, so they don't need to be in EXTRA_DIST. If the user specifies --enable-warnings-as-errors, add -Werror *even if the user specified --enable-extra-gcc-flags; assume they know what they're doing and are willing to have the compile fail due to the extra GCC warnings being treated as errors. svn path=/trunk/; revision=46748
2012-09-20We always HAVE_CONFIG_H so don't bother checking whether we have it or not.Jeff Morriss1-3/+1
svn path=/trunk/; revision=45016
2012-07-20Fix some clang warnings: implicit conversion from enumeration type ↵Jakub Zawadzki1-4/+4
'GtkStateType' to different enumeration type 'GtkStateFlags' [-Werror,-Wconversion] GTK_STATE_NORMAL and GTK_STATE_FLAG_NORMAL are both 0. svn path=/trunk/; revision=43854
2012-07-19gtk_container_add() -> gtk_box_pack_start().Anders Broman1-4/+5
svn path=/trunk/; revision=43829
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-04-21Replace gtk_vbox_new() and gtk_hbox_new() with ws_gtk_box_new().Anders Broman1-7/+7
svn path=/trunk/; revision=42176
2012-01-16Move some headers for UI stuff, and the alert_box.c UI-specific file, toGuy Harris1-2/+2
the ui directory. (Perhaps some other files that would be used by all flavors of Wireshark, for any GUI toolkit or for someting such as ncurses, and not for any command-line tool such as TShark, should be moved there as well.) Shuffle some #includes to put the "ui/XXX.h" includes together. svn path=/trunk/; revision=40529
2012-01-15Move gtk to ui/gtk.Jörg Mayer1-0/+1395
This looses the last checkin to gtk, will add this manually back. svn path=/trunk/; revision=40518