Ethereal-dev: Re: [Ethereal-dev] show hostname in window title - feature/patch submission
ronnie sahlberg wrote:
Seems a lot of people would like the feature but it is unclear exactly
how the feature should work.
Yes, indeed. I didn't catch and/or consider the custom window title
feature Gabriel mentioned in his last email. So thanks for the use case
and clarification/examples. Thanks also to the others that responded as
well (Guy, Ulf, ...).
Why not just add the '-C' flag that someone else suggested as a short
term solution and let whatever that flag specifies replace the '-
Ethereal' string on the main window.
Then the users can decide themself how and what they want specified as
the title and we dont have to worry about policy.
-C could, for extra useability take a format string where we let
%h represent the hostname
%H the FQDN of the host
etc but that could be added later.
Taking the above a step further, how about this as another option?:
1) Expand on the preference setting in my previous patch and rename it
from "gui.show_hostname" to "gui.window_title". By default this would be
empty, so the standard title would be displayed. As Ronnie suggested
above, the "%h" and "%H" would be read as a format string for using the
machine's host name in said format.
2) Create a "Window title:" label with an "Edit..." button in the "User
Interface" area in the "Preferences" window. This would allow
customization, via the GUI, of the window title or the option to use the
machine's host name in short or FQDN format.
In Gabriel's case, one could just edit the preferences file directly to
setup the custom window title.
Also, as far as the command-line or a script is concerned, you'd be able
to pass a custom title using the "-o" option, which might include an
interface name (or whatever you'd like).
Remaining, still open thoughts/questions:
1) Should there be an option (preference setting) to include the
interface name in the main window title during a capture?
IMO, no. The interface name is already displayed in the window title of
the capture info dialog, as well as the status bar in the lower
left-hand corner of the main window. If you need to check the interface
once the capture has been stopped, you can use "Statistics" -> "Summary"
to get the capture interface name.
On Windows I know the interface name is quite useless. If you agree with
my reasoning in the previous paragraph, then I think using the
user-provided description or OS description in the above mentioned
places can be done as a separate patch.
2) As Ulf raised, does all this need to be done for Win32?
I don't really know about this one. Any thoughts? If we do, then, as Guy
pointed out, we'd need to distinguish Win95 from Win98 and above. Correct?
Please let me know if I missed something or you have any other
suggestions. If everyone agrees and I get some help with handling the
Win32 versioning (or not doing Win32 at all), I can work up another
patch that includes this.
-Nathan