[mutter] window: deduplicate is_remote logic
- From: Ray Strode <halfline src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] window: deduplicate is_remote logic
- Date: Wed, 20 Feb 2013 21:20:02 +0000 (UTC)
commit 64544fa0ed354623be9ce34221f051c3935dadc8
Author: Ray Strode <rstrode redhat com>
Date: Wed Feb 20 15:19:31 2013 -0500
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 files changed, 1 insertions(+), 9 deletions(-)
---
diff --git a/src/core/window-props.c b/src/core/window-props.c
index 5e7eb8f..7f44d17 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 <config.h>
#include "window-props.h"
@@ -48,10 +47,6 @@
#include <X11/Xatom.h>
#include <unistd.h>
#include <string.h>
-#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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]