]> Pileus Git - ~andy/gtk/commitdiff
return the hostname instead of NULL.
authorMichael Natterer <mitch@imendio.com>
Thu, 24 Aug 2006 19:41:40 +0000 (19:41 +0000)
committerMichael Natterer <mitch@src.gnome.org>
Thu, 24 Aug 2006 19:41:40 +0000 (19:41 +0000)
2006-08-24  Michael Natterer  <mitch@imendio.com>

* gdk/quartz/gdkdisplay-quartz.c (gdk_display_get_name): return
the hostname instead of NULL.

ChangeLog
gdk/quartz/gdkdisplay-quartz.c

index d420efc66e4b773605da8d211e5157534da1229e..15963ecde43633194dc5a94a4d47c254ef141c9e 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2006-08-24  Michael Natterer  <mitch@imendio.com>
+
+       * gdk/quartz/gdkdisplay-quartz.c (gdk_display_get_name): return
+       the hostname instead of NULL.
+
 2006-08-23  Matthias Clasen  <mclasen@redhat.com>
 
        * gtk/gtkprinteroptionwidget.[hc]: Fix confusion about
index fe15eb46c76c5a691bdb95cb8c4bb1bfeaf654a5..0fb75fcbf65b567222f78c7447ebaf50cd89f5ab 100644 (file)
@@ -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 */
 }
-