mirror of
https://git.tartarus.org/simon/putty.git
synced 2025-04-21 04:55:02 -05:00
And everyone's favourite cosmetic change: Unix PuTTY now doesn't
claim to be pterm in the window title :-) [originally from svn r3032]
This commit is contained in:
parent
0ec4f0620d
commit
3a41ec782e
16
unix/pterm.c
16
unix/pterm.c
@ -2309,11 +2309,6 @@ int pt_main(int argc, char **argv)
|
|||||||
|
|
||||||
inst->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
inst->window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
|
||||||
|
|
||||||
if (inst->cfg.wintitle[0])
|
|
||||||
set_title(inst, inst->cfg.wintitle);
|
|
||||||
else
|
|
||||||
set_title(inst, "pterm");
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set up the colour map.
|
* Set up the colour map.
|
||||||
*/
|
*/
|
||||||
@ -2413,10 +2408,19 @@ int pt_main(int argc, char **argv)
|
|||||||
|
|
||||||
inst->back = select_backend(&inst->cfg);
|
inst->back = select_backend(&inst->cfg);
|
||||||
{
|
{
|
||||||
char *realhost; /* FIXME: don't ignore this! */
|
char *realhost;
|
||||||
|
|
||||||
inst->back->init((void *)inst->term, &inst->backhandle, &inst->cfg,
|
inst->back->init((void *)inst->term, &inst->backhandle, &inst->cfg,
|
||||||
inst->cfg.host, inst->cfg.port, &realhost,
|
inst->cfg.host, inst->cfg.port, &realhost,
|
||||||
inst->cfg.tcp_nodelay);
|
inst->cfg.tcp_nodelay);
|
||||||
|
|
||||||
|
if (inst->cfg.wintitle[0])
|
||||||
|
set_title(inst, inst->cfg.wintitle);
|
||||||
|
else {
|
||||||
|
char *title = make_default_wintitle(realhost);
|
||||||
|
set_title(inst, title);
|
||||||
|
sfree(title);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
inst->back->provide_logctx(inst->backhandle, inst->logctx);
|
inst->back->provide_logctx(inst->backhandle, inst->logctx);
|
||||||
|
|
||||||
|
@ -16,6 +16,11 @@ int cfgbox(Config *cfg)
|
|||||||
return 1; /* no-op in pterm */
|
return 1; /* no-op in pterm */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *make_default_wintitle(char *hostname)
|
||||||
|
{
|
||||||
|
return dupstr("pterm");
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
extern int pt_main(int argc, char **argv);
|
extern int pt_main(int argc, char **argv);
|
||||||
|
@ -58,6 +58,9 @@ long get_windowid(void *frontend);
|
|||||||
/* Things gtkdlg.c needs from pterm.c */
|
/* Things gtkdlg.c needs from pterm.c */
|
||||||
void *get_window(void *frontend); /* void * to avoid depending on gtk.h */
|
void *get_window(void *frontend); /* void * to avoid depending on gtk.h */
|
||||||
|
|
||||||
|
/* Things pterm.c needs from {ptermm,uxputty}.c */
|
||||||
|
char *make_default_wintitle(char *hostname);
|
||||||
|
|
||||||
/* Things uxstore.c needs from pterm.c */
|
/* Things uxstore.c needs from pterm.c */
|
||||||
char *x_get_default(const char *key);
|
char *x_get_default(const char *key);
|
||||||
|
|
||||||
|
@ -13,16 +13,10 @@
|
|||||||
/*
|
/*
|
||||||
* TODO:
|
* TODO:
|
||||||
*
|
*
|
||||||
* - Arrange for the window title not to be `pterm'.
|
|
||||||
*
|
|
||||||
* - Fix command-line parsing to be more PuTTYlike and not so
|
* - Fix command-line parsing to be more PuTTYlike and not so
|
||||||
* ptermy - in particular non-option arguments should be
|
* ptermy - in particular non-option arguments should be
|
||||||
* hostname and port in the obvious way.
|
* hostname and port in the obvious way.
|
||||||
*
|
*
|
||||||
* - Session loading and saving; current thinking says the best
|
|
||||||
* way is to have a subdir .putty/sessions containing files
|
|
||||||
* whose names are actually munged saved session names.
|
|
||||||
*
|
|
||||||
* - libcharset enumeration.
|
* - libcharset enumeration.
|
||||||
*
|
*
|
||||||
* - fix the printer enum (I think the sensible thing is simply to
|
* - fix the printer enum (I think the sensible thing is simply to
|
||||||
@ -150,6 +144,11 @@ int cfgbox(Config *cfg)
|
|||||||
return do_config_box("PuTTY Configuration", cfg);
|
return do_config_box("PuTTY Configuration", cfg);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
char *make_default_wintitle(char *hostname)
|
||||||
|
{
|
||||||
|
return dupcat(hostname, " - PuTTY", NULL);
|
||||||
|
}
|
||||||
|
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
extern int pt_main(int argc, char **argv);
|
extern int pt_main(int argc, char **argv);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user