summaryrefslogtreecommitdiff
path: root/gdk/quartz
diff options
context:
space:
mode:
authorMichael Natterer <mitch@imendio.com>2006-08-24 19:41:40 +0000
committerMichael Natterer <mitch@src.gnome.org>2006-08-24 19:41:40 +0000
commit4773f80c48d62f446318414adfa373da2fd1223f (patch)
tree258f210b6f895b80d0585125eddf3965ae31d70d /gdk/quartz
parentbbdff62bd30f6468281941f98ae93b610a58359b (diff)
downloadgtk+-4773f80c48d62f446318414adfa373da2fd1223f.tar.gz
return the hostname instead of NULL.
2006-08-24 Michael Natterer <mitch@imendio.com> * gdk/quartz/gdkdisplay-quartz.c (gdk_display_get_name): return the hostname instead of NULL.
Diffstat (limited to 'gdk/quartz')
-rw-r--r--gdk/quartz/gdkdisplay-quartz.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/gdk/quartz/gdkdisplay-quartz.c b/gdk/quartz/gdkdisplay-quartz.c
index fe15eb46c7..0fb75fcbf6 100644
--- a/gdk/quartz/gdkdisplay-quartz.c
+++ b/gdk/quartz/gdkdisplay-quartz.c
@@ -73,8 +73,12 @@ gdk_display_open (const gchar *display_name)
G_CONST_RETURN gchar *
gdk_display_get_name (GdkDisplay *display)
{
- /* FIXME: Implement */
- return NULL;
+ static gchar *display_name = NULL;
+
+ if (! display_name)
+ display_name = g_strdup ([[[NSHost currentHost] name] UTF8String]);
+
+ return display_name;
}
int
@@ -157,4 +161,3 @@ gdk_display_store_clipboard (GdkDisplay *display,
{
/* FIXME: Implement */
}
-