Commit Graph

48 Commits

Author SHA1 Message Date
Luis Ontanon 24a5467228 Propagate the main_window_update change of few commits ago into the qt client
:wq



svn path=/trunk/; revision=50198
2013-06-27 19:24:39 +00:00
Guy Harris 1b7fc5422d And handle the no-libpcap case here as well.
svn path=/trunk/; revision=49508
2013-05-22 10:26:07 +00:00
Guy Harris fb7ae678e4 More capture_options -> capture_session changes.
svn path=/trunk/; revision=49499
2013-05-22 08:47:17 +00:00
Guy Harris dd3dcc7a01 And reflect the new capture_options structure here.
svn path=/trunk/; revision=49494
2013-05-22 07:45:11 +00:00
Guy Harris 8596d17d7f Pull the capture-session state information out of capture_opts and put
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-22 07:44:28 +00:00
Guy Harris 1ca63098ac Rename capture_opts_trim_iface() to
capture_opts_default_iface_if_necessary(), to reflect what it actually
does.

svn path=/trunk/; revision=49491
2013-05-22 04:49:31 +00:00
Guy Harris 39779a7bee Send the output of the -D and -L options to the standard output rather
than the standard error.

In Wireshark on Windows, create a console before doing so and destroy it
before exiting.  Don't do that in TShark or dumpcap, as those are
console-mode programs on Windows.

This should fix bug 8609 and still allow "wireshark -D" and "wireshark
-L" to work when the standard output isn't redirected.

svn path=/trunk/; revision=49025
2013-04-25 05:47:11 +00:00
Jeff Morriss c2ced4a2ab Don't try to open <home>/.wireshark on Windows: Wireshark hasn't written to
that directory since 2001 and reading from that directory was only left in for
backwards compatibility with versions prior to r4702.  I think it's now safe
to remove that backwards compatibility.

This eliminates the last argument of get_persconffile_path().

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=8437

svn path=/trunk/; revision=48797
2013-04-09 02:48:03 +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
Jeff Morriss 19214234ae Followup to r48081: use the DEFAULT_CAPTURE_BUFFER_SIZE macro from r47942.
svn path=/trunk/; revision=48085
2013-03-05 15:22:28 +00:00
Chris Maynard 2b93c3b31e Default capture buffer size is now 2MB. (See also r47920 and r47937)
svn path=/trunk/; revision=48081
2013-03-05 02:09:37 +00:00
Gerald Combs b5e9e86826 Only call create_app_running_mutex on Windows.
svn path=/trunk/; revision=47766
2013-02-20 05:04:57 +00:00
Gerald Combs bd4cffae58 When any of our executables start on Windows create or open a "Wireshark
is running" mutex. Have the NSIS installer check for this mutex and ask
the user to close Wireshark if it's found. While not perfect this makes
the WinSparkle update process much less annoying.

svn path=/trunk/; revision=47758
2013-02-20 01:19:42 +00:00
Guy Harris e62aba38e6 In Qt 4, C strings are, by default, treated as 7-bit ASCII when
converted to QStrings, and, to get them to be treated as UTF-8, you need
to call the setCodecForCStrings method of the QTextCodec class to set
the codec to a UTF-8 codec.

In Qt 5, C strings are treated always as UTF-8 when converted to
QStrings, and there's no setCodecForCStrings method for the QTextCodec
class.

In addition, there's also no setCodecForTr method for the QTextCodec
class - and QObject isn't documented as even *having* a tr method, so I
don't know what to do there.

svn path=/trunk/; revision=47436
2013-02-02 03:59:57 +00:00
Gerald Combs 2dff8d7605 Add font and color preferences. Unfortunately Qt doesn't have a color
picker widget so we're back to popping up dialogs. Move the contents of
monospace_font.{cpp,h} to wireshark_application.{cpp,h}.

Pango and Qt use completely different string representations for fonts.
Add a separate gui.qt.font_name preference so that they don't clobber
each other.

svn path=/trunk/; revision=47240
2013-01-24 01:10:12 +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
Guy Harris 09a4761179 Add some routines to wsutil to, at least on some platforms, add
information to crash dumps and the like.  (Currently, we only handle OS
X's CrashReporter, but we should do this on other platforms where this
information can be added and would be helpful.)

svn path=/trunk/; revision=47109
2013-01-16 00:13:33 +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 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
Guy Harris d415d3d87c On error, have capture_opts_trim_iface() return the exit status that
should be used (on success, have it return 0).  Exit with that exit
status; if the problem is that we couldn't get the interface list or if
there are no interfaces in that list, return 2, as that's not a
command-line syntax error.

svn path=/trunk/; revision=46108
2012-11-21 17:14:54 +00:00
Gerald Combs 64c6710857 Have InterfaceTree wait until the application is initialized to start
gathering statistics. This fixes behavior broken by the recent startup
changes.

Enable and disable the SplashOverlay delay via a #define.

svn path=/trunk/; revision=45934
2012-11-05 19:11:11 +00:00
Gerald Combs 56546f1b91 Move the MWOverlay code into its own class, SplashOverlay. Use it to
implement a splash screen.

svn path=/trunk/; revision=45912
2012-11-05 03:54:21 +00:00
Gerald Combs 5b2890e573 Move the main window creation to the top of main() in anticipation of a
splash pane.

Add an "initialized" state to WiresharkApplication and set it when we're
done calling our init routines. Handle FileOpen events. Wait until we're
initialized to try to open the files. On OS X

    open -a /path/to/qtshark.app /path/to/some/file.pcap
    
now works as expected, and

    osascript -e 'tell application "qtshark" to open posix file "'"/path/to/some/file.pcap"'"'
    
works but returns "missing value". 

svn path=/trunk/; revision=45885
2012-11-03 22:48:29 +00:00
Pascal Quantin b439ae0d6a Revert r45692 and try to fix link failure another way: console_win32.[ch] definitely belong to ui/win32
Add console_win32.[ch] to Makefile.am

svn path=/trunk/; revision=45693
2012-10-21 19:12:18 +00:00
Alexis La Goutte 5af3defc46 Try to fix LINK : fatal error LNK1181: cannot open input file 'win32/console_win32.obj'
move ui/win32/console_win32.[ch] to ui/console_win32.[ch]

svn path=/trunk/; revision=45692
2012-10-21 18:10:31 +00:00
Alexis La Goutte b88ff840a3 Add MSWindows console to QtShark
svn path=/trunk/; revision=45678
2012-10-21 14:45:40 +00:00
Alexis La Goutte 74d0df441e Add load of translate QLibraryInfo to have standart button (and other stuff) translated
svn path=/trunk/; revision=45140
2012-09-25 20:18:02 +00:00
Gerald Combs 3069f22bd1 Add a text import dialog. Use libui.
svn path=/trunk/; revision=44956
2012-09-17 23:40:53 +00:00
Alexis La Goutte 42ace71553 Add modelines for Qtshark file
svn path=/trunk/; revision=44766
2012-09-04 08:18:31 +00:00
Gerald Combs 5c715fcc19 It ain't Wireshark unless we can capture.
Implement basic capture start and stop. Add a lot of menu items and
enable and disable them when appropriate. Rename a few variables.

Next step: Let the user select an interface (we just use the default for
now).

svn path=/trunk/; revision=44714
2012-08-31 22:25:51 +00:00
Jörg Mayer 11b1de0cdf Fixes for warnings: unused-but-set-variable
svn path=/trunk/; revision=44628
2012-08-23 10:30:37 +00:00
Gerald Combs 2b21eff0d9 Add automatic tree expansion. Get rid of some unnecessary void * casts.
Fix a couple of compilation warnings.

svn path=/trunk/; revision=44587
2012-08-19 20:47:11 +00:00
Gerald Combs 6f55c03852 Fix compilation warnings.
svn path=/trunk/; revision=44489
2012-08-14 16:01:47 +00:00
Gerald Combs b82eedf94a Make sure global_capture_opts is properly declared.
svn path=/trunk/; revision=44254
2012-08-04 00:01:59 +00:00
Gerald Combs a234d1215c Move capture_globals.h from ui/gtk/ to ui/. Show interface activity
using sparklines in the qtshark main window.

svn path=/trunk/; revision=44253
2012-08-03 23:30:47 +00:00
Gerald Combs 2643a5b02d Update qtshark to match the recent file dialog changes.
svn path=/trunk/; revision=43786
2012-07-18 16:40:34 +00:00
Jakub Zawadzki bf81b42e1e Update Free Software Foundation address.
(COPYING will be updated in next commit)

svn path=/trunk/; revision=43536
2012-06-28 22:56:06 +00:00
Anders Broman 3814106d7e From Michael Mann:
generic preferences implementation

https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7402

svn path=/trunk/; revision=43484
2012-06-25 21:05:36 +00:00
Jörg Mayer 6a60fdd5fc gcc 4.7 would complain that the getopt stuff was not declared.
Looks like getopt.h was silently included somewhere in gcc-4.6's
includes. Explicitely include <getopt.h>. No idea whether this
is the correct fix.
Whitespace change: indent includes, if they are inside a conditional.

svn path=/trunk/; revision=41847
2012-03-30 14:55:00 +00:00
Alexis La Goutte fe840481ec Add i18n to QtShark
The goal is only to translate the Gui (Not dissector)
Actually, there is only a french translation.

To try, (if you are not French) launch qtshark with LANG=fr ./qtshark (in ui/qt folder)

Missing some feature :
* Add preference to select (force) your language
* Some Gui Text, it no available for translation
* Documentation about how to translate (Coming soon...)
* Your translation !

svn path=/trunk/; revision=41389
2012-03-07 10:16:33 +00:00
Jörg Mayer 35508464b2 Start moving files to ui/ and ui/cli/
svn path=/trunk/; revision=41047
2012-02-17 12:30:27 +00:00
Alexis La Goutte 94e4fa3e76 Fix -v for QtShark
./Wireshark -v
wireshark 1.7.1 (SVN Rev Unknown from unknown)

Copyright 1998-2012 Gerald Combs <gerald@wireshark.org> and contributors.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

Compiled (64-bit) with Qt 4.7.4 with GLib 2.30.0, with libpcap (version
unknown), with libz 1.2.3.4, with POSIX capabilities (Linux), with SMI 0.4.8,
with c-ares 1.7.4, with Lua 5.1, without Python, with GnuTLS 2.10.5, with Gcrypt
1.5.0, with MIT Kerberos, with GeoIP, with PortAudio V19-devel (built Jul 27
2011 11:52:20), without AirPcap.

Running on Linux 3.0.0-13-generic, with locale fr_FR.UTF-8, with libpcap version
1.1.1, with libz 1.2.3.4, GnuTLS 2.10.5, Gcrypt 1.5.0.

Built using gcc 4.6.1.

get_gui_compiled_info & get_gui_runtime_info copied from ../gtk/main.c 
the function is common to GTK and Qt need to put in version_info.[ch] ?

svn path=/trunk/; revision=40633
2012-01-21 18:56:01 +00:00
Gerald Combs 41c54f9e5d Remove or mark unused variables.
svn path=/trunk/; revision=40599
2012-01-20 00:01:53 +00:00
Guy Harris ee0089dfe7 Reflect the changes to make the recent-file code GUI-independent.
svn path=/trunk/; revision=40563
2012-01-18 19:59:13 +00:00
Guy Harris ee1e0a0368 Reflect the move of some header files to the ui directory.
svn path=/trunk/; revision=40530
2012-01-16 01:18:56 +00:00
Jörg Mayer be706c6380 Move gtk to ui/gtk.
This looses the last checkin to gtk, will add this manually back.

svn path=/trunk/; revision=40518
2012-01-15 21:59:11 +00:00
Gerald Combs bc957229f8 Initial status bar functionality. Promote the main window's status bar
to a MainStatusBar. Add a "LabelStack" widget, which MainStatusBar uses
to duplicate features in GtkStatusbar. Make the protocol tree a
full-blown ProtoTree widget. Move main_cf_callback from main to
WiresharkApplication. Duplicate a lot of the cf callbacks as signals and
slots. Use Q_UNUSED in a few places.

svn path=/trunk/; revision=40488
2012-01-14 00:16:16 +00:00
Gerald Combs 23a520237b Add initial support for Qt along with a "ui" subdirectory.
svn path=/trunk/; revision=40378
2012-01-04 22:13:01 +00:00