diff options
author | Gerald Combs <gerald@wireshark.org> | 2010-04-01 21:55:01 +0000 |
---|---|---|
committer | Gerald Combs <gerald@wireshark.org> | 2010-04-01 21:55:01 +0000 |
commit | cc5d7670bde3072fdc4aa738c7643e50133c2cb2 (patch) | |
tree | ff46a91b7d856f44d11317046d270906f9b538ef /file.c | |
parent | dc5e066caedd01323d815c60a8c988263bdd9619 (diff) | |
download | wireshark-cc5d7670bde3072fdc4aa738c7643e50133c2cb2.tar.gz wireshark-cc5d7670bde3072fdc4aa738c7643e50133c2cb2.tar.bz2 wireshark-cc5d7670bde3072fdc4aa738c7643e50133c2cb2.zip |
Keep a copy of the interface description and capture filter around so that
we can use it in the main window title during and after capture. Add a
"-X" option for providing a description for stdin.
svn path=/trunk/; revision=32357
Diffstat (limited to 'file.c')
-rw-r--r-- | file.c | 39 |
1 files changed, 38 insertions, 1 deletions
@@ -1024,11 +1024,35 @@ cf_get_display_name(capture_file *cf) } else { /* The file we read is a temporary file from a live capture; we don't mention its name. */ - displayname = "(Untitled)"; + if (cf->source) { + displayname = cf->source; + } else { + displayname = "(Untitled)"; + } } return displayname; } +void cf_set_tempfile_source(capture_file *cf, gchar *source) { + if (cf->source) { + g_free(cf->source); + } + + if (source) { + cf->source = g_strdup(source); + } else { + cf->source = g_strdup(""); + } +} + +const gchar *cf_get_tempfile_source(capture_file *cf) { + if (!cf->source) { + return ""; + } + + return cf->source; +} + /* XXX - use a macro instead? */ int cf_get_packet_count(capture_file *cf) @@ -4623,3 +4647,16 @@ cf_reload(capture_file *cf) { we should free up our copy. */ g_free(filename); } + +/* + * Editor modelines + * + * Local Variables: + * c-basic-offset: 2 + * tab-width: 2 + * indent-tabs-mode: nil + * End: + * + * ex: set shiftwidth=2 tabstop=2 expandtab + * :indentSize=2:tabSize=2:noTabs=true: + */ |