summaryrefslogtreecommitdiff
path: root/ui/gtk/tcp_graph.c
diff options
context:
space:
mode:
authorGerald Combs <gerald@wireshark.org>2013-08-30 21:15:24 +0000
committerGerald Combs <gerald@wireshark.org>2013-08-30 21:15:24 +0000
commit1d27c70838a8dd04dc302dc6c6527bb852b58cc5 (patch)
tree3940900b523269602e861776613d3568bb59f188 /ui/gtk/tcp_graph.c
parent8445c81d50c9c49b61298eed974dbe9f0ed1826c (diff)
downloadwireshark-1d27c70838a8dd04dc302dc6c6527bb852b58cc5.tar.gz
Add an item tracer to the TCP stream graph. Enable packet selection.
QCustomPlot data sets are made up of keys (x axis by default) and values (y axis). It looks like we can have multiple values for a given key (i.e. we can show multiple sequence numbers for a given timestamp) but QCPItemTracers can only be positioned by a key and not a key+value pair. This makes our graph selection behavior a bit different compared to the GTK+ version. We can only select one segment for a give timestamp but our selection targets are much larger (the height of the graph). Add a map for segment data so we don't have to iterate to find them. Use UTF8_RIGHTWARDS_ARROW where appropriate. Set a window title. Tell the user what will happen if he or she clicks. Disable graph selection. svn path=/trunk/; revision=51604
Diffstat (limited to 'ui/gtk/tcp_graph.c')
-rw-r--r--ui/gtk/tcp_graph.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/ui/gtk/tcp_graph.c b/ui/gtk/tcp_graph.c
index 4e98935754..a085a12c57 100644
--- a/ui/gtk/tcp_graph.c
+++ b/ui/gtk/tcp_graph.c
@@ -47,6 +47,7 @@
#include "../../stat_menu.h"
#include "ui/tap-tcp-stream.h"
+#include "ui/utf8_entities.h"
#include "ui/gtk/gui_utils.h"
#include "ui/gtk/dlg_utils.h"
@@ -700,7 +701,7 @@ static void create_drawing_area(struct gtk_graph *g)
/* Set title of window with file + conversation details */
display_name = cf_get_display_name(&cfile);
- g_snprintf(window_title, WINDOW_TITLE_LENGTH, "TCP Graph %d: %s %s:%d -> %s:%d",
+ g_snprintf(window_title, WINDOW_TITLE_LENGTH, "TCP Graph %d: %s %s:%d " UTF8_RIGHTWARDS_ARROW " %s:%d",
refnum,
display_name,
ep_address_to_str(&g->tg.src_address),
@@ -2058,7 +2059,7 @@ static void draw_element_ellipse(struct gtk_graph *g, struct element *e, cairo_t
gdouble x = e->p.ellipse.dim.x + g->geom.x - g->wp.x;
gdouble y = g->geom.height-1 - e->p.ellipse.dim.y + g->geom.y - g->wp.y;
- debug(DBS_GRAPH_DRAWING) printf("ellipse: (x, y) -> (w, h): (%f, %f) -> (%f, %f)\n", x, y, w, h);
+ debug(DBS_GRAPH_DRAWING) printf("ellipse: (x, y) " UTF8_RIGHTWARDS_ARROW " (w, h): (%f, %f) " UTF8_RIGHTWARDS_ARROW " (%f, %f)\n", x, y, w, h);
cairo_save(cr);
cairo_set_source_rgb(cr, 0, 0, 0);
@@ -2383,7 +2384,7 @@ static void axis_compute_ticks(struct axis *axis, double x0, double xmax, int di
axis->major = steps[j] * pow(10, i);
- debug(DBS_AXES_TICKS) printf("zoom=%.1f, x=%f -> i=%d -> ms=%d -> j=%d ->"
+ debug(DBS_AXES_TICKS) printf("zoom=%.1f, x=%f " UTF8_RIGHTWARDS_ARROW " i=%d " UTF8_RIGHTWARDS_ARROW " ms=%d " UTF8_RIGHTWARDS_ARROW " j=%d ->"
" axis->major=%f\n", zoom, x, i, ms, j, axis->major);
/* let's compute minor ticks */