From 64544fa0ed354623be9ce34221f051c3935dadc8 Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 20 Feb 2013 15:19:31 -0500 Subject: [PATCH] window: deduplicate is_remote logic set_title_text does the equivalent of meta_window_is_remote on its own. This commit changes set_title_text to just use meta_window_is_remote. https://bugzilla.gnome.org/show_bug.cgi?id=688716 --- src/core/window-props.c | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/core/window-props.c b/src/core/window-props.c index 5e7eb8f54..7f44d174b 100644 --- a/src/core/window-props.c +++ b/src/core/window-props.c @@ -37,7 +37,6 @@ */ #define _GNU_SOURCE -#define _SVID_SOURCE /* for gethostname() */ #include #include "window-props.h" @@ -48,10 +47,6 @@ #include #include #include -#ifndef HOST_NAME_MAX -/* Solaris headers apparently don't define this so do so manually; #326745 */ -#define HOST_NAME_MAX 255 -#endif typedef void (* ReloadValueFunc) (MetaWindow *window, MetaPropValue *value, @@ -399,7 +394,6 @@ set_title_text (MetaWindow *window, Atom atom, char **target) { - char hostname[HOST_NAME_MAX + 1]; gboolean modified = FALSE; if (!target) @@ -416,9 +410,7 @@ set_title_text (MetaWindow *window, } /* if WM_CLIENT_MACHINE indicates this machine is on a remote host * lets place that hostname in the title */ - else if (window->wm_client_machine && - !gethostname (hostname, HOST_NAME_MAX + 1) && - strcmp (hostname, window->wm_client_machine)) + else if (meta_window_is_remote (window)) { *target = g_strdup_printf (_("%s (on %s)"), title, window->wm_client_machine);