Commit graph

270 commits

Author SHA1 Message Date
Guy Harris
90c43120ca The GUI's state machine requires that, when reloading a capture after a
save, we post capture file callback events similar to the ones posted
when reading a capture - otherwise, the reload will leave the welcome
screen up.

Rename cf_cb_file_save_reload_finished to cf_cb_file_reload_finished,
add a cf_cb_file_reload_started callback, have them work similarly to
read_finished and read_started except that the reload uses "Reloading"
in the progress bar and status bar.

Clean up some indentation while we're at it.

svn path=/trunk/; revision=42764
2012-05-22 03:52:12 +00:00
Guy Harris
4a9b825c49 Change the "user_saved" member of a capture_file structure to
"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-20 08:56:06 +00:00
Bill Meier
a297af9d64 Add an 'if' test to prevent a potential null pointer dereference
identified by clang scan-build.


svn path=/trunk/; revision=42719
2012-05-19 17:21:32 +00:00
Bill Meier
576fcd2a47 Rework 'ct_nb_switch_page_cb()' slightly to prevent a scan-build "null pointer de-reference" message;
(In practice, the "null pointer de-reference" would not actually occur ?).

svn path=/trunk/; revision=42718
2012-05-19 16:55:22 +00:00
Jakub Zawadzki
e8c69cef7e Free memory when create_tempfile() failed.
svn path=/trunk/; revision=42654
2012-05-16 09:07:19 +00:00
Gerald Combs
09487194e4 Check the return value of create_tempfile. Fixes CIDs 280527 and 280528.
svn path=/trunk/; revision=42645
2012-05-16 00:27:26 +00:00
Gerald Combs
9d9aa0f241 Don't leak an open file handle (CID 702423).
svn path=/trunk/; revision=42642
2012-05-15 22:25:35 +00:00
pascal
78d983a963 From Akos Lukovics:
Fix div-by-zero error in the moving average filter of IO graph
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6236

svn path=/trunk/; revision=42598
2012-05-12 15:19:25 +00:00
Jakub Zawadzki
35745a33cd Fix bug #7251
We're already checking in gtk if end highlight offsets don't exceed len.
Do the same for start offset.

I wonder if it this checks should be also done when adding items to tree...

svn path=/trunk/; revision=42596
2012-05-12 07:57:51 +00:00
Guy Harris
f1b11f62f8 proto_registrar_get_ftype() returns an FT_ value; make its return type
"enum ftenum" to reflect that, and fix the "switch doesn't handle XXX"
warnings that provokes.

svn path=/trunk/; revision=42579
2012-05-11 17:29:56 +00:00
Jakub Zawadzki
709d04976c Avoid calling tvb_get_ptr() on 0-length TVBs.
It seems to be better fix than r42420

svn path=/trunk/; revision=42460
2012-05-07 10:51:14 +00:00
Bill Meier
a703450659 AFAICT '#include sys/types.h' is not needed for these files.
svn path=/trunk/; revision=42443
2012-05-05 20:51:14 +00:00
Bill Meier
f672e4822a Cosmetic change....
svn path=/trunk/; revision=42440
2012-05-05 16:02:36 +00:00
Jeff Morriss
7afb363eab Fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=6892 :
Sort the recent filters list by "most recently used" (that is, put the most
recently used filter at the head of the list).

svn path=/trunk/; revision=42439
2012-05-05 15:09:19 +00:00
Jeff Morriss
24f5265620 Clean up white space and indentation; remove tabs.
svn path=/trunk/; revision=42438
2012-05-05 14:37:19 +00:00
Jakub Zawadzki
fd38b34c2c Fix opening packet window when frame has got cap_len = 0 (i.e. last frame from mime_file reader)
Workaround, if someone has better idea how to fix it, please do.

svn path=/trunk/; revision=42420
2012-05-04 10:28:16 +00:00
Jakub Zawadzki
8bf8070340 Add proto_hier_tree_model.c to CMakeLists
svn path=/trunk/; revision=42419
2012-05-04 08:17:46 +00:00
Jakub Zawadzki
82b077278c cleanup proto_hier_tree_model a little.
svn path=/trunk/; revision=42415
2012-05-04 06:08:22 +00:00
Jakub Zawadzki
fdaa9aa3ac Fix memleak of GtkTextBuffer
svn path=/trunk/; revision=42414
2012-05-04 05:56:38 +00:00
Anders Broman
0cea399fda From Jakub Zawadzki: Use custom model in Filter Expression dialog.
svn path=/trunk/; revision=42411
2012-05-04 04:44:23 +00:00
Anders Broman
77074a5a37 From Evan Huus: - Make sure that unsupported link-layer types *always* have a dlt of -1 in the device.links list so that we can tell if they're unsupported. - When building the combo-box of link-layer types, make the unsupported ones insensitive (disabled), and be sure to default to a supported one if we have one. - Compiling a capture filter requires a supported link-layer type, so disable the 'Compile BPF' button if there are none. - It is not always a programming error to have no active pointer in the combo-box, as this can happen when all the available entries are unsupported (and thus disabled). Don't abort with g_assert_not_reached() when this happens. - Unlock the pcap_compile_mtx mutex in all cases after compiling a packet filter. This was causing a deadlock (complete program hang) if you tried to compile two different filters in a row on the same interface. https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7135
svn path=/trunk/; revision=42410
2012-05-04 04:35:43 +00:00
Martin Mathieson
6eb94dd35e Test a return value to avoid an initialised warning from clang.
svn path=/trunk/; revision=42313
2012-04-28 16:18:28 +00:00
Jakub Zawadzki
4253c73d8f Fix sigsegv in filter expression dialog when user clicked on some BASE_CUSTOM field.
svn path=/trunk/; revision=42301
2012-04-27 20:35:17 +00:00
Jakub Zawadzki
31f6e7e35d Don't store protocol field names in Filter Expression dialog.
Using gtk_tree_view_column_set_cell_data_func() and formating string on request 
gives significant speedup (before patch: 12.392ms, after: 9.779ms).

svn path=/trunk/; revision=42291
2012-04-27 13:54:21 +00:00
Guy Harris
177be74688 Get rid of tabs; make white space consistent.
Get rid of gtk_widget_set_size_request() calls - at least on my machine
and GTK+ version, they make some of the items too small to show the full
text.  Let GTK+ figure out how big things have to be - and if that makes
the toolbar too wide, redesign the toolbar.

svn path=/trunk/; revision=42277
2012-04-26 22:11:01 +00:00
Guy Harris
661afd4ba9 Consistently InterCapitalize StatusBar.
Separate "Toolbar" from the toolbar name in the View menu items.

Use "l", rather than "W", as the whatchamacallit for the wireless
toolbar - "W" is already used for "show packet in new window".

svn path=/trunk/; revision=42275
2012-04-26 18:02:04 +00:00
Guy Harris
99a66a0e77 While we're at it, add back the shortcuts, or whatever the heck the
Alt+{letter}+... things are called, for the Expand and Collapse items.

svn path=/trunk/; revision=42274
2012-04-26 17:36:39 +00:00
Anders Broman
47fdd93c3c Restore Accelerators for "Expand Subtree", "Expand All" and "Collapse All".
https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=7197

svn path=/trunk/; revision=42261
2012-04-26 15:17:01 +00:00
Anders Broman
01abbdf6d2 Add missing ";"
svn path=/trunk/; revision=42222
2012-04-24 14:48:46 +00:00
Michael Tüxen
fd356ab4c8 Get it compiling...
svn path=/trunk/; revision=42214
2012-04-23 18:48:00 +00:00
Anders Broman
78cba09c8d Use a crosshair cursor insted of the XOR thingy.
Selected with a define to make it easily reversed if some one does not like it.

svn path=/trunk/; revision=42210
2012-04-23 15:17:31 +00:00
Bill Meier
ef1ede5d77 Fix a compile error (missing semi-colon) when building for gtk3
svn path=/trunk/; revision=42209
2012-04-23 15:07:30 +00:00
Anders Broman
6c88c479c6 g_object_unref(cursor) craches pre GTK 3.0 protect it with
#if GTK_CHECK_VERSION(3,0,0)

svn path=/trunk/; revision=42207
2012-04-23 13:39:12 +00:00
ruengeler
0819722ad8 Fix bug #7178 reported by aparan
svn path=/trunk/; revision=42206
2012-04-23 12:34:16 +00:00
Anders Broman
987ce281e4 Use GtkFontChooser if GTK >= 3.2
svn path=/trunk/; revision=42205
2012-04-23 11:10:08 +00:00
ruengeler
618afe1a77 Get rid of GTK warning when START was hit in the "Capture Interfaces Dialog" while a device was hidden.
svn path=/trunk/; revision=42204
2012-04-23 11:06:21 +00:00
Anders Broman
cd57bd6bb6 Add casts to make in compile on Windows
svn path=/trunk/; revision=42191
2012-04-22 13:59:28 +00:00
Anders Broman
9e09a1fd0f Use g_object_unref
svn path=/trunk/; revision=42190
2012-04-22 13:54:35 +00:00
Guy Harris
6f1d74b9b1 Another cut-and-pasteo.
svn path=/trunk/; revision=42188
2012-04-21 21:16:54 +00:00
Anders Broman
8bab40a99e More GTK3 adaptations
svn path=/trunk/; revision=42187
2012-04-21 21:13:13 +00:00
Anders Broman
c483317006 port gtk_scrollbar_new() gtk_paned_new() gtk_separator_new() to GTK2
svn path=/trunk/; revision=42186
2012-04-21 20:45:35 +00:00
Guy Harris
780061ed74 Fix probable cut-and-pasteo.
svn path=/trunk/; revision=42185
2012-04-21 20:38:18 +00:00
Guy Harris
b8087943a1 Clean up indentation (get rid of 4-space tabs).
svn path=/trunk/; revision=42184
2012-04-21 20:13:38 +00:00
Anders Broman
60cb4652e4 gtk_button_box_new() for pre GTK 3.0
svn path=/trunk/; revision=42183
2012-04-21 20:06:51 +00:00
Guy Harris
63040040d2 Clean up indentation - don't use 4-space tabs.
svn path=/trunk/; revision=42182
2012-04-21 19:12:50 +00:00
Guy Harris
f16eb8cf14 GTK+ 1.x is no longer supported, and there's no toggle_tree to move any
more; remove a comment.

svn path=/trunk/; revision=42181
2012-04-21 19:07:23 +00:00
Guy Harris
051263c85d "homogeneous" is a Boolean; we can just pass it on to gtk_hbox_new() and
gtk_vbox_new().

svn path=/trunk/; revision=42180
2012-04-21 18:48:49 +00:00
Guy Harris
317769c903 Include "ui/gtk/gui_utils.h" so the ws_gtk_box routines are declared.
svn path=/trunk/; revision=42179
2012-04-21 18:40:43 +00:00
Anders Broman
85118f9213 Replace gtk_vbox_new() and gtk_hbox_new() with ws_gtk_box_new().
svn path=/trunk/; revision=42178
2012-04-21 17:06:30 +00:00
Anders Broman
0a693fb2f6 Missing include
svn path=/trunk/; revision=42177
2012-04-21 16:45:41 +00:00