Commit Graph

114 Commits

Author SHA1 Message Date
Alexis La Goutte 43b1f47695 From Thomas ERSFELD (GSoC13) : Add Capture interface dialog window
* Reuse sparkline from welcome
* Split settings in tab (!= GTK)
* No all feature work (Work In Progress...)
* ...

Comments (and review) are welcome !

svn path=/trunk/; revision=53563
2013-11-25 14:15:49 +00:00
Gerald Combs b3a24c5cc4 Replace similar code with a common routine.
svn path=/trunk/; revision=53519
2013-11-23 01:06:30 +00:00
Gerald Combs 213d47a82e Fix packet list selection signaling.
It looks like resetting the packet list model during freezing and
thawing disconnects the selection changed signal between the model and
the main window. Rename the packet list's setMenusFollowStream signal to
packetSelectionChanged and use it to trigger menu updates in the main
window.

svn path=/trunk/; revision=53516
2013-11-22 17:59:15 +00:00
Michael Mann 64c687346b Remove packet_info->ipproto and packet_info->ethertype uses in the GUI. Convert to walking packet protocol list looking for desired protocols.
I may eventually switch this to use proto_* values instead of strings, but just the addition of the loop is more jarring as compared to the simple comparing of ip or ethernet values.  But it should lead to a smaller (less protocol specific) packet_info structure.

svn path=/trunk/; revision=53476
2013-11-21 16:42:10 +00:00
Guy Harris db25270df8 Move the epan/filesystem.c routines to wsutil; they're not specific to
packet dissection, they're specific to the entire Wireshark suite of
programs.

svn path=/trunk/; revision=53377
2013-11-17 02:55:14 +00:00
Gerald Combs b0063a025b Highlight selected sequence diagram items.
Create a new dialog each time the user follows a stream. A lot of the
follow code seems to assume one and only one dialog so there are likely
outstanding bugs.

Don't use the global cfile (should we deprecate its usage?). We want to
move closer to multiple documents, not further away.

Clean up after ourselves. Free our payload list and unlink our temp
file. Make a bunch of gchar*s QStrings. Make sure our destructor gets
called and use it.

Make member variable and method names more consistent.

svn path=/trunk/; revision=53306
2013-11-13 22:18:01 +00:00
Gerald Combs e78924d5a4 Use the correct event filter.
From Richard Moore via bug 9410.

svn path=/trunk/; revision=53239
2013-11-10 17:55:26 +00:00
Gerald Combs 46a0d3644d Try to make the animation a little more natural.
svn path=/trunk/; revision=52992
2013-10-31 00:01:51 +00:00
Gerald Combs 60d6458150 Move the geometry shenanigans a bit further ahead in the startup
sequence. Fix some prefs logic.

svn path=/trunk/; revision=52991
2013-10-30 23:54:46 +00:00
Gerald Combs b17d987960 Fix maximized geometry behavior on non-OS X systems.
svn path=/trunk/; revision=52990
2013-10-30 23:23:24 +00:00
Gerald Combs 8f21bfe46f Fix a comparison.
svn path=/trunk/; revision=52989
2013-10-30 23:14:11 +00:00
Gerald Combs 9075922f42 Add initial support for geometry settings in the main window.
In the current Qt startup sequence the main window + splash screen is
displayed before the main preferences are loaded which means we can't
immediately apply the correct geometry. For now, use an animation to
morph from the default to the saved geometry after the prefs are loaded.

Get rid of main_do_quit() (Qt) and main_window_exit() (Qt+GTK). It looks
like they were unused.

Add wsApp->isInitialized() and use it to see if we should exit() when
the main window is closed. Otherwise we won't shut the application down
and clean up properly.

svn path=/trunk/; revision=52988
2013-10-30 22:39:52 +00:00
Gerald Combs 13c1c9daf7 PacketList and ProtoTree need access to MainWindow at initialization
time in order to fill in their respective context menus. R52386 broke
that. Fix it and add comments about handling reparenting. Fixes bug
9265.

svn path=/trunk/; revision=52600
2013-10-14 16:54:41 +00:00
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