Introduction
Introduction Statistics Contact Development Disclaimer Help
Fix display of hostname on sam -r invocations. - sam - An updated version of th…
git clone git://vernunftzentrum.de/sam.git
Log
Files
Refs
LICENSE
---
commit 184b8ae0b8dfb0ead7bac9340cf04618f49a1b4d
parent 927913580e26b7b0602ee62ee3ff3949a62ca8bc
Author: Rob King <[email protected]>
Date: Fri, 27 May 2016 12:01:27 -0500
Fix display of hostname on sam -r invocations.
Diffstat:
libXg/xtbinit.c | 16 +++++-----------
1 file changed, 5 insertions(+), 11 deletions(-)
---
diff --git a/libXg/xtbinit.c b/libXg/xtbinit.c
@@ -38,6 +38,7 @@ XftColor fontcolor;
XftColor bgcolor;
/* implementation globals */
+extern char *machine;
Display *_dpy;
Widget _toplevel;
unsigned long _fgpixel, _bgpixel;
@@ -145,18 +146,11 @@ xtbinit(Errfunc f, char *class, int *pargc, char **argv, …
n = 0;
XtSetArg(args[n], XtNinput, TRUE); n++;
+ char name[512] = {0};
+ snprintf(name, sizeof(name) - 1, "samterm on %s", machine);
+ XtSetArg(args[n], XtNtitle, XtNewString(name)); n++;
+ XtSetArg(args[n], XtNiconName, XtNewString(name)); n++;
- if (*pargc >= 3 && strcmp(argv[1], "-r") == 0)
- {
- char name[512] = {0};
- snprintf(name, 511, "samterm on %s", argv[2]);
- XtSetArg(args[n], XtNtitle, XtNewString(name)); n++;
- XtSetArg(args[n], XtNiconName, XtNewString(name)); n++;
- }
- else
- {
- XtSetArg(args[n], XtNtitle, XtNewString("samterm on localhost")); n++;…
- }
_toplevel = XtAppInitialize(&app, class,
optable, sizeof(optable)/sizeof(optable[0]),
pargc, argv, fallbacks, args, n);
You are viewing proxied material from vernunftzentrum.de. The copyright of proxied material belongs to its original authors. Any comments or complaints in relation to proxied material should be directed to the original authors of the content concerned. Please see the disclaimer for more details.