aboutsummaryrefslogtreecommitdiffstats
path: root/ui/gtk/drag_and_drop.c
AgeCommit message (Collapse)AuthorFilesLines
2015-12-12Remove -Wwrite-strings compiler flagJoão Valverde1-1/+1
The "-Wwrite-strings" flag produces nuisance warnings. These warnings are not useful, they're impossible to fix in a sane way and therefore are being handled with casts of static strings to (char *). This just moves the warning to [-Wcast-qual] and a compiler pragma is in turn required (and used) to squelch that warning. Remove the Wwrite-strings warning. Let that responsibility fall on the programmer (as is done by casting). Change-Id: I5a44dfd9decd6d80797a521a3373593074962fb5 Reviewed-on: https://code.wireshark.org/review/12162 Petri-Dish: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Alexis La Goutte <alexis.lagoutte@gmail.com> Reviewed-by: Michael Mann <mmann78@netscape.net>
2015-08-18Improve file merging for mergecap and wiresharkHadriel Kaplan1-1/+1
Refactor the file merging code by removing the duplicate logic from mergecap.c and file.c's cf_merge_files(), into a new merge_files() function in merge.c. Also the following user-visible changes: * Removed the '-T' encap type option from mergecap, as it's illogical for mergecap and would complicate common merge code. * Input files with IDBs of different name, speed, tsprecision, etc., will produce an output PCAPNG file with separate IDBs, even if their encap types are the same. * Added a '-I' IDB merge mode option for mergecap, to control how IDBs are merged. * Changed Wireshark's drag-and-drop merging to use PCAPNG instead of PCAP. Bug: 8795 Bug: 7381 Change-Id: Icc30d217e093d6f40114422204afd2e332834f71 Reviewed-on: https://code.wireshark.org/review/10058 Petri-Dish: Hadriel Kaplan <hadrielk@yahoo.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
2015-02-15ui/gtk/*.c: Add editor modelines; As needed: Fix indentationBill Meier1-1/+12
Change-Id: I8cd9d9fe5f12c284f46b8f725766f681faccd753 Reviewed-on: https://code.wireshark.org/review/7138 Reviewed-by: Bill Meier <wmeier@newsguy.com>
2015-01-01Remove unneeded includes from ui folderMartin Mathieson1-3/+0
Change-Id: Ifd1eebff9080cd3867e44e4dcb2d2681370ed60a Reviewed-on: https://code.wireshark.org/review/6128 Reviewed-by: Martin Mathieson <martin.r.mathieson@googlemail.com>
2014-06-30Move capture.[ch] to libui.Guy Harris1-1/+1
Change-Id: I86e7e781cc9e14abab0374a18b95438529b046f0 Reviewed-on: https://code.wireshark.org/review/2711 Reviewed-by: Guy Harris <guy@alum.mit.edu>
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-25Wireshark: Add option to choose format type of capture fileMichal Labedzki1-2/+2
The best heuristic can fail, so add possibility to manually choose capture file format type, so not correctly recognize file format can be loaded in Wireshark. On the other side now it is possible to open capture file as file format to be dissected. Change-Id: I5a9f662b32ff7e042f753a92eaaa86c6e41f400a Reviewed-on: https://code.wireshark.org/review/16 Reviewed-by: Michal Labedzki <michal.labedzki@tieto.com> Reviewed-by: Hadriel Kaplan <hadrielk@yahoo.com> Reviewed-by: Evan Huus <eapache@gmail.com> Tested-by: Evan Huus <eapache@gmail.com>
2013-11-08The "file types" we have are actually combinations of types andGuy Harris1-1/+1
subtypes, e.g. Network Monitor version 1 and Network Monitor version 2 are separate "file types", even though they both come from Network Monitor. Rename various functions, #defines, and variables appropriately. svn path=/trunk/; revision=53166
2013-05-22Pull the capture-session state information out of capture_opts and putGuy Harris1-1/+1
it into a separate capture_session structure. capture_opts should contain only user-specified option information (and stuff directly derived from it, such as the "capturing from a pipe" flag). svn path=/trunk/; revision=49493
2013-05-14Pull dnd_merge_files() into dnd_open_file_cmd(); the resulting code is aGuy Harris1-72/+26
bit simpler. Don't bother popping up a window saying "you dragged more than one file, so we're merging"; presumably that's what they had in mind when they dragged multiple files. (If that's not what they had in mind, the window should at least offer a choice to cancel.) svn path=/trunk/; revision=49293
2013-03-26From Jim Young:Anders Broman1-1/+1
Add casts to support c++ when HAVE_GTKOSXAPPLICATION is defined. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8525 svn path=/trunk/; revision=48557
2013-03-09Use explicit casts.Anders Broman1-2/+2
svn path=/trunk/; revision=48212
2013-02-11strlen() returns a size_t, so assign its return value to a size_t.Guy Harris1-2/+2
gtk_selection_data_set() takes an int, rather than a size_t, as its last argument, so cast away that bit of "ZOMG ARENT SIZE_T AND INT THE SAME SIZE!!!!!!!111ONE!!!!!" svn path=/trunk/; revision=47628
2013-01-14Fix Coverity CID 741081: Logically dead code. (Minor whitespace cleanup also.)Chris Maynard1-35/+27
svn path=/trunk/; revision=47075
2012-12-26Fix a bunch of warnings.Guy Harris1-1/+1
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-11-02From Jim Young and updated by Max Romanov:Anders Broman1-11/+22
The modification to acinclude.m4 adds a new test in the AC_WIRESHARK_OSX_INTEGRATION_CHECK section to first look for the library gtkmacintegration. "gtkmacintegration" is the new internal name for GTK+ MAC OSX library after the project was moved to www.gtk.org. Previously this library was known as igemacintegration. The patches to the three gtk/*.c files update the conditional #include <gtkmacintegration/gtkosxapplication.h> to use the new folder name. The Option 1 patch will break any build environment that expects to find the gtkosapplication.h file in the older igemacintegration folder. In addition the patch includes updates to gtk/main.c and gtk/main_menubar.c for a more standard looking App menu. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6702 svn path=/trunk/; revision=45869
2012-09-22Fix for bug 7744:Jaap Keuter1-24/+19
Have the DND data receiver make sure that the URI-list is always correctly terminated. Do so for any source, either X server, Windows or OS X. svn path=/trunk/; revision=45058
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-08-03Move capture_globals.h from ui/gtk/ to ui/. Show interface activityGerald Combs1-3/+3
using sparklines in the qtshark main window. svn path=/trunk/; revision=44253
2012-06-28Update Free Software Foundation address.Jakub Zawadzki1-1/+1
(COPYING will be updated in next commit) svn path=/trunk/; revision=43536
2012-06-04Have a main_update_for_unsaved_changes() routine that, if changes areGuy Harris1-1/+0
made to the capture file (adding/removing/editing comments, for now) or if a capture file with unsaved changes are unsaved, updates the menu bar, the toolbar, *and* the titlebar, which now has a GNOME-style "*" to indicate unsaved changes. Make set_menus_for_capture_file() a private interface between main.c and main_menubar.c, and have its callers, such as main_update_for_unsaved_changes(), be responsible for updating the toolbar as well. svn path=/trunk/; revision=43051
2012-05-25Use GTK+'s GtkMessageDialog for the questions we ask in the process ofGuy Harris1-36/+3
saving files, and run it modal (which we're already doing with the GtkFileChooserDialog); this means less callback-based state machine stuff, simplifying the code paths a bit. If we're saving a file before closing it, don't bother reloading it after saving it. svn path=/trunk/; revision=42855
2012-05-22"Save As" always saves everything and, when the save is done, makes theGuy Harris1-1/+1
new file the current file, as is the case in most if not all other GUI applications. A new "Export Specified Packets" menu option allows you to specify which packets to write out, with the default being the displayed packets (and those on which the displayed packets depend for, e.g. reassembly), and never makes the resulting file the current file. The two operations are conceptually distinct. Lumping them into one menu item, with the default for "Save As" being "displayed packets only" and thus making it behave like the latter operation, was causing some confusion; see, for example, bug 6640. Make the dialog popped up if you try to "Save As" or "Export Specified Packets" on top of an existing file ask the "do you want to do this?" question in the main part of the message, and note in the secondary text that doing that will overwrite what's in the file; that matches what TextEdit on OS X and the GNOME text editor say. svn path=/trunk/; revision=42792
2012-05-20Change the "user_saved" member of a capture_file structure toGuy Harris1-2/+4
"unsaved_changes", and have it be TRUE iff changes have been made to the file since it was read - *not* if it's a temporary file from a live capture. Check the "is_tempfile" member, and the "unsaved_changes" member, when appropriate. Just have a set_toolbar_for_capture_file() routine that updates the "save", "close", and "reload" toolbar as appropriate, given a capture_file structure - absorb the function of set_toolbar_for_unsaved_capture_file() into it. svn path=/trunk/; revision=42721
2012-05-05AFAICT '#include sys/types.h' is not needed for these files.Bill Meier1-3/+0
svn path=/trunk/; revision=42443
2012-02-17include "../util.h" -> include "ui/util.h"Jörg Mayer1-1/+1
svn path=/trunk/; revision=41048
2012-01-20Convert forward slashes in URI to backslashes if WIN32. Patch from Cal ↵Chris Maynard1-4/+10
Turney via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5237 svn path=/trunk/; revision=40615
2012-01-18Restructure the recent file code so that recent.c is GUI-independent;Guy Harris1-0/+1
move it to the top-level source directory for now, and move ui/gtk/recent.h to the ui directory. svn path=/trunk/; revision=40561
2012-01-16Move some headers for UI stuff, and the alert_box.c UI-specific file, toGuy Harris1-1/+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/+417
This looses the last checkin to gtk, will add this manually back. svn path=/trunk/; revision=40518