Commit Graph

101 Commits

Author SHA1 Message Date
Gerald Combs 564ca2d5e9 Try to fix Qt compilation when libpcap is disabled.
svn path=/trunk/; revision=52552
2013-10-11 21:26:26 +00:00
Gerald Combs 259768dc1a Remove GTK+ and global cfile dependencies from file_dlg_win32.c.
Move the declaration of set_last_open_dir() to ui/util.h. It still
has separate GTK+ and Qt implemenations. We might want to move it to
ui/util.c at some point. Remove a lot of unnecessary GTK+ includes.
Remove most of the references to the global cfile while we're at it.

svn path=/trunk/; revision=52542
2013-10-11 17:20:50 +00:00
Gerald Combs c37cd6b66f Fix the white-rectangle-at-startup artifact with the help of GammaRay[1].
Make extra_split_ a member variable again. Make it and master_split_
full-on values. Set various parent/child relationships at startup
so that each widget is associated with a layout (which appears to be
the actual fix).

Make the throttled startup delay huge so that it's easier to browse
using GammaRay.

[1] https://github.com/KDAB/GammaRay

svn path=/trunk/; revision=52386
2013-10-05 22:39:49 +00:00
Gerald Combs 80d1fde12a Delete extra_split if we're not using it. This keeps its handle from
showing up in the main window. Make it local to layoutPanes().

svn path=/trunk/; revision=52211
2013-09-25 00:26:36 +00:00
Gerald Combs 6986eb4866 Move a lot of includes from follow_stream_dialog.h to
follow_stream_dialog.cpp. Remove the ones that we don't use. Use
QMessageBox in place of simple_dialog.

Move IP6OPT_HOME_ADDRESS and related definitions to packet-ipv6.c. It
looks like we only use it there and it conflicts with WinPcap.

Mark some items unused.

svn path=/trunk/; revision=51951
2013-09-11 17:39:49 +00:00
Alexis La Goutte 80f9326b2f From Thomas ERSFELD (GSoC13)
Add TCP/UDP/SSL Follow feature to QtShark

Known issue :
* Duplicate code with GTK (function need follow_info_t struct but in GTK there is some GWidget variable in struct)
* Sometimes TCP Follow fail...

svn path=/trunk/; revision=51883
2013-09-09 19:30:30 +00:00
Evan Huus 259ebc5269 Respect the other layout preference in qtshark: which pane goes in which spot.
svn path=/trunk/; revision=51723
2013-09-03 16:06:20 +00:00
Jörg Mayer 7cd3ff3a8e Fix for
QWidget::setWindowModified: The window title does not contain a '[*]' placeholder

a) Add [*] to the window title.
b) Also set the window title before calling setWindowModified

Not really understanding what I'm doing here, just following the hints
given in http://qt-project.org/forums/viewthread/2108

Original logmessages when closing Wireshark while running a capture.

17:23:39.652 Capture Msg  Capture stopped!
17:23:39.653 Main Dbg  Callback: capture update finished
QWidget::setWindowModified: The window title does not contain a '[*]' placeholder
FIX: packet list heading menu sensitivity
17:23:39.653  Dbg  FIX: capture_info_ui_destroy
17:23:39.653 Main Dbg  Callback: Closing
FIX: packet list heading menu sensitivity
17:23:39.655 Main Dbg  Callback: Closed


svn path=/trunk/; revision=51722
2013-09-03 15:35:32 +00:00
Evan Huus a795048300 Correctly update the pane layout whenever the preferences are changed, you no
longer need to restart for that to take effect. Hopefully I got all the slot
ordering right.

svn path=/trunk/; revision=51720
2013-09-03 13:29:09 +00:00
Evan Huus 78529b2038 Separate window creation from the laying out of the list/tree/byte panes. This
more-or-less restores the correct splash behaviour on startup.

svn path=/trunk/; revision=51719
2013-09-03 12:53:32 +00:00
Evan Huus 16cbf7d4cf Parent the list, tree and byte panes from the main UI rather than the
splitters they're actually layed out in. This should let us reorganize the
splitters at will (when the prefs change) without reconstructing the panes.

svn path=/trunk/; revision=51718
2013-09-03 12:21:14 +00:00
Evan Huus 785c1a5310 Respect the layout preference (just the horizontal/vertical splitting of the
panes, not yet which data goes in which pane).

You currently have to restart for the change to take effect. I also had to move
the preferences-reading (and thus the epan_init) call to before the main window
instantiation so that the preference was actually available for use. This means
that the progress-bar doesn't show up for very long any more, since most of the
work is already done by the time it appears.

I'm sure there is a way to delay just the layout setup until later, but I kept
getting slot errors I couldn't figure out...

svn path=/trunk/; revision=51647
2013-09-02 16:03:13 +00:00
Gerald Combs 186babc6ba When we close a main window, delete the welcome screen, which in turn
deletes the interface list, which in turn kills off the dumpcap process
it may be running. This should hopefully keep us from leaving dumpcap
processes running in the background on Windows. (Am I the only one
running QtShark on that platform?)

svn path=/trunk/; revision=51485
2013-08-23 02:34:51 +00:00
Gerald Combs 79454ef9fa Add initial capture filter support.
Add CaptureFilterCombo and CaptureFilterEdit classes, similar to their
display filter counterparts. Add a CaptureFilterSyntaxWorker class which
runs a syntax check in a background thread similar to the threaded code
in capture_dlg.c. Add a bunch of related signal and slot plumbing. Other
minor fixups.

svn path=/trunk/; revision=51200
2013-08-08 00:26:57 +00:00
Gerald Combs 946b736de2 Set the menuRole for actionCaptureOptions to NoRole similar to
actionEditConfigurationProfiles. This keeps it from being converted to
the default preferences item on OS X.

Remove a hack where we stored the text for
actionEditConfigurationProfiles in its iconText in order to keep it from
clobbering actionEditPreferences. It doesn't seem to be necessary.

svn path=/trunk/; revision=50636
2013-07-15 20:17:17 +00:00
Alexis La Goutte 43c3cb4884 From Thomas ERSFELD (GSOC13) via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8710 QtShark doesn't have a statistics summary window
Add Summary Statistics to qtshark (Statistics => Summary)
Now, use tabs to split summary display (File Capture details, Capture Statistics)

Add also Comment Summary tab (to replace Statistics => Comments Summary)

From me :
Fix order of summary files in Qtshark.pro

svn path=/trunk/; revision=50470
2013-07-09 18:08:40 +00:00
Gerald Combs af02ac36ac On OS X set the toolbar icon size to match our current icons.
svn path=/trunk/; revision=49919
2013-06-13 18:58:29 +00:00
Gerald Combs f5e892cbac Check for QtMacExtras, and if we have it use it to switch to a native
title + toolbar on OS X.

svn path=/trunk/; revision=49873
2013-06-10 21:21:51 +00:00
Guy Harris fb7ae678e4 More capture_options -> capture_session changes.
svn path=/trunk/; revision=49499
2013-05-22 08:47:17 +00:00
Alexis La Goutte 022ce2dea9 From Richard Turner via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8630 QtShark doesn't quit properly after closing the main window during initialization
When trying to close the QtShark application during its initialization process
(by hitting the "close" button), the processes "qtshark.exe" and "dumpcap.exe" don't terminate properly

The patch contains fix to:

1. QtShark doesn't quit properly after closing the main window during initialization

2. User is not prompted to save the capture to file when user chooses to exit
the program during capturing.

3. Bug exists in function MainWindow::testCaptureFileClose(bool from_quit, QString &before_what),
which prevent it from behaving correctly when from_quit == true.

svn path=/trunk/; revision=49454
2013-05-20 18:56:47 +00:00
Alexis La Goutte 36495e5e98 From report of mot990-8omk7tp8mio8ro via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8469 QtShark (wireshark-qt) doesn't use the saved preferences
Detail about this issue :
Bug is reproduced when accessing Preferences Dialog before QtShark start-up is finished,
specifically before preferences loading is completed which comes very late in the initialization process.

Fix from Richard Turner :
Patch to fix problems arising from users interacting with main interface before initialization is complete

Introduced a new slot function in main window for the locking of features before
init complete and for the unlocking of features after all systems good to go.

svn path=/trunk/; revision=49453
2013-05-20 18:56:33 +00:00
Alexis La Goutte a80ad2f9f2 Add Some missing text to translate
svn path=/trunk/; revision=49271
2013-05-13 20:23:46 +00:00
Jörg Mayer 9db6d700cd The porting guide for Qt5 requires that Q_OS_ be used instead
of Q_WS_ in Qt4 projects
See:
http://qt-project.org/doc/qt-5.0/qtdoc/portingguide.html

svn path=/trunk/; revision=49013
2013-04-24 11:07:25 +00:00
Guy Harris e4271a94fc OK, if we're setting the file path for the window - which we want to do,
at least on OS X, to set the "proxy icon" - we need to clear the window
title *and* the file path before we set it, otherwise the set doesn't
happen.

While we're at it, clear the file path whenever we're *not* using a
path.  For temporary files, don't set the file path.

The file path is, in fact, the *full path*, not just the last component.

svn path=/trunk/; revision=48715
2013-04-02 22:10:16 +00:00
Guy Harris 432e914dbd Rename cf_not_saved() to cf_has_unsaved_data() to clarify what it
indicates.  (Note: "unsaved data" is more than just "unsaved changes";
it could also mean "temporary file that hasn't been saved anywhere".)

svn path=/trunk/; revision=48709
2013-04-02 20:35:46 +00:00
Guy Harris d942759401 Add routines to file.c to indicate whether:
a save can be done ("can" in the sense of "there's something to
	save" and in the sense of "we can write that something out");

	a "save as" can be done (in the sense of "we can write what we
	have out");

	there's unsaved data to save (which might be unsaved changes or
	might be a temporary file full of packets);

and use them as appropriate.  This means that the "unsaved data"
indicator in the UI will be turned on for temporary files full of
packets as well as for files with unsaved changes; that's what we want.

svn path=/trunk/; revision=48693
2013-04-01 23:44:29 +00:00
Guy Harris 2deedfb1e1 Add a setTitlebarForCaptureInProgress() method to MainWindow, and use it
to set the title when we have a capture in progress.

svn path=/trunk/; revision=48688
2013-04-01 17:57:47 +00:00
Guy Harris 6c5c65b486 Add a setTitlebarForCaptureFile() and have it set the titlebar and the
"modified" indicator.  For some reason, it's not getting called in all
the right places.

svn path=/trunk/; revision=48682
2013-03-31 22:59:56 +00:00
Guy Harris 78ab71cc9d Rename set_display_filename() to set_titlebar_for_capture_file(), as
it affects more than just the file name, it also affects whatever "you
have unsaved changes" indicator the UI provides.

Put a comment in the Qt code as a reminder of how to set the "you have
unsaved changes" indicator.

svn path=/trunk/; revision=48680
2013-03-31 22:17:43 +00:00
Gerald Combs dcb3a4a8a5 Add support for software updates. Remove qtshark.rc and use
image/wireshark.rc (which contains resources needed by WinSparkle)
instead.

svn path=/trunk/; revision=48147
2013-03-06 22:04:17 +00:00
Gerald Combs 1c0deb0fc8 Add Filter Expressions^WButton^WShortcut^WBookmark preferences.
Add comments noting that

- We might want to do something different when the bookmark button is
  pressed.
- The display filters (dfilters file) and gui.filter_expressions
  preferences should be merged.
- Many buttons on Qt4 + OS X + unifiedTitleAndToolBarOnMac makes the
  main window really wide.

Add a qstring_strdup convenience routine. Add "disabled" display filter
edit icons. Fix up whitespace and descriptions in a couple of places.

svn path=/trunk/; revision=47522
2013-02-06 18:22:54 +00:00
Gerald Combs 21e66f0c6f Add column preferences.
svn path=/trunk/; revision=47231
2013-01-23 19:04:36 +00:00
Gerald Combs ae7ee61e84 Rename the "saved_val" preference element to "stashed_val" in order to
more clearly indicate that it's a copy of a preference value rather than
something we've saved in the preferences file. Update
prefs_pref_to_str() to handle default, stashed, and current prefs.

Create ui/preference_utils.[ch] and move some common routines there. Use
prefs_pref_type_name() in the GTK+ preferences dialog.

Make the "OK" button in the Qt preferences dialog work. We simply write
the prefs and redissect on "OK" and do nothing on "Cancel". This is
intentionally different from the Apply/OK/Cancel behavior in the GTK+
version.

Add a general "emitAppSignal" method to wsApp and use it for packet
dissection and preference changes.

Suggest that we might want to create a WsString class to make conversion
between QStrings, gchar *s, and GStrings easier.

svn path=/trunk/; revision=47139
2013-01-18 00:50:14 +00:00
Gerald Combs 5bd252c44f Remove some duplicate code from ui/profile.c and move in more code from
ui/gtk/profile_dialog.c. Use the correct profile list in
profile_dialog.c so that deletion works.

Add a profile dialog to the Qt port. For some reason it crashes when
changing configuration profiles, which might be related to bug 7722.
Move the Qt configuration profile initialization from main.cpp to
wireshark_application.cpp. Make sure QMenuBar doesn't grab the
configuration profiles action on OS X. Add more role color names to
tango_colors.h.

svn path=/trunk/; revision=46834
2012-12-29 01:39:02 +00:00
Gerald Combs 7cf5334332 Add an AccordionFrame class which can animate showing and hiding (except
when we detect a remote connection). Use it for the "go to" and search
frames. Properly detect remote connections in the splash overlay.

svn path=/trunk/; revision=46591
2012-12-18 17:21:20 +00:00
Gerald Combs 77e6140ba9 Implement the frame mark, ignore, and time reference actions. Update the
text of a few menu items.

svn path=/trunk/; revision=46576
2012-12-17 23:03:21 +00:00
Gerald Combs 5c2c5aed87 Rename the search type menu items to more accurately reflect what we're
actually doing and what users are likely to want to do.  Rename the
search enum values and functions to reflect what we're actually doing
and add a comment explaining why making searches more correct might make
searching worse.  Add a search bar to the Qt main window, thus
continuing the War On Gratuitous Dialogs.

Clear out any previous temporary label stack items before adding a new one.

svn path=/trunk/; revision=46541
2012-12-15 01:04:39 +00:00
Gerald Combs 59cd52b5ca Implement the items under "Edit→Copy", "Analyze→Apply as Filter" and
"Analyze→Prepare a Filter". Add a context menu to the protocol tree and
fill in the items we've implemented so far.

Add an "applyAllPreferences" method and corresponding
"preferencesUpdated" signal to wsApp. Use it to set the maximum display
filter combo count.

Move the packet filtering code from the display filter edit to the main
window (which makes more sense and matches what we're doing in the GTK+
version and gets rid of more global cfile references). Try to center the
display filter edit button images.

Use a different "close" button in the main toolbar. It looks better but
is still wrong (on OS X at least).

svn path=/trunk/; revision=46434
2012-12-07 01:46:20 +00:00
Gerald Combs 224666c60e Fix up a comment.
svn path=/trunk/; revision=46375
2012-12-04 18:20:28 +00:00
Gerald Combs c0c7a64d71 Replace GTK_STOCK_SAVE with WIRESHARK_STOCK_FILE in a few places,
including the GTK+ and Qt main toolbars.

svn path=/trunk/; revision=46374
2012-12-04 18:00:50 +00:00
Gerald Combs b2239669e2 Rename utilityToolBar to displayFilterToolbar and move the display
filter widget there. Add a few more items to the main toolbar. Note that
Qt 4.8 doesn't support a unified title+toolbar with multiple toolbar
rows on OS X (at least not easily) but Qt 5 might.

Disable icons-in-menus on OS X.

svn path=/trunk/; revision=46371
2012-12-04 17:16:09 +00:00
Gerald Combs 9e67335ea8 Update the interface list to reflect the recent interface name changes.
Allow multiple interface selections. Make sure we update the packet list
properly in a couple of places.

Use the right callback+signal to update capture statistics in the status
bar. Remove the global cfile from the main_statusbar.cpp

Add the version to the main window.

svn path=/trunk/; revision=46350
2012-12-03 19:58:55 +00:00
Gerald Combs 66b13e2961 Enable and disable the File→Print and Go menu items as needed. Have the
print dialog cancel itself if we don't hand it a capture file.

svn path=/trunk/; revision=45863
2012-11-01 22:12:57 +00:00
Gerald Combs 0a28fb8f6a Update the Qt byte view widget to reflect the recent changes in the GTK+
byte view.

Move the packet_char_enc enum from packet.h to frame_data.h. Make the
encoding flag a packet_char_enc and make it one bit.

Get rid of the "cfile" global in a few places. C++-ize some of the font
code. Clean up some variable names.

svn path=/trunk/; revision=45838
2012-10-30 19:21:24 +00:00
Gerald Combs 576b24c96e Move ui-independent object export routines to the common ui directory.
Implement DICOM, HTTP, and SMB object exports. Rename the GTK+ export
files. C++-ize epan/tap.h. Fix an apparent memory leak in
eo_save_all_clicked_cb.

The Qt dialog has an indeterminate progress bar. I tried adding
something similar to the GTK+ dialog but event processing led down a
rabbit hole.

svn path=/trunk/; revision=45647
2012-10-18 21:14:43 +00:00
Gerald Combs 677c913f42 Add "Export Packet Bytes".
svn path=/trunk/; revision=45567
2012-10-16 00:01:23 +00:00
Evan Huus d11b00d760 Reduce variable scopes where possible.
svn path=/trunk/; revision=45518
2012-10-13 01:29:29 +00:00
Gerald Combs 419f851e34 Fix Windows compilation problems from r45513. #ifdef out some non-Windows
code.  Get rid of a few uses of the global cfile.

svn path=/trunk/; revision=45514
2012-10-13 00:18:46 +00:00
Gerald Combs cfa22deaae Add a packet format group box, similar to the packet range group box.
Use it in the new "Export Packet Dissections" dialog.

I'm omitting PostScript exports on purpose. If you *really* need that
feature you can probably get better results than we produce using text +
enscript or print-to-PDF + pdf2ps/pdftops or PSML/PDML + XSL + ...

The Windows code is untested. I'll check in any needed fixes shortly.

svn path=/trunk/; revision=45513
2012-10-12 23:40:29 +00:00
Gerald Combs 445148ac0e Add a PacketRangeGroupBox widget. Use it to implement "Export Selected
Packets". Not yet tested on Windows. "Ignore Packet" hasn't been
implemented so we can't test that either.

Create a SyntaxLineEdit widget from the QLineEdit code in
DisplayFilterEdit. Use it in the file import and export dialogs and the
PacketRangeGroupBox widget. This lets us provide instant feedback
instead of popping up an error dialog.

Expand the Tango color list based on
http://emilis.info/other/extended_tango .

Rearrange QtShark.pro to (hopefully) work better with Qt Creator.

svn path=/trunk/; revision=45405
2012-10-08 20:01:59 +00:00