[gnome-desktop] gnome-rr: Simplify connector type comparison



commit 113c7c8252531665d9e9090c6f48cd3f6b16e120
Author: Bastien Nocera <hadess hadess net>
Date:   Tue May 29 10:20:56 2012 +0100

    gnome-rr: Simplify connector type comparison

 libgnome-desktop/gnome-rr.c |    6 +-----
 1 files changed, 1 insertions(+), 5 deletions(-)
---
diff --git a/libgnome-desktop/gnome-rr.c b/libgnome-desktop/gnome-rr.c
index 47164e2..24daa89 100644
--- a/libgnome-desktop/gnome-rr.c
+++ b/libgnome-desktop/gnome-rr.c
@@ -1884,17 +1884,13 @@ gnome_rr_output_get_connector_type (GnomeRROutput *output)
 gboolean
 gnome_rr_output_is_laptop (GnomeRROutput *output)
 {
-    const char *connector_type;
-
     g_return_val_if_fail (output != NULL, FALSE);
 
     if (!output->connected)
 	return FALSE;
 
     /* The ConnectorType property is present in RANDR 1.3 and greater */
-
-    connector_type = gnome_rr_output_get_connector_type (output);
-    if (connector_type && strcmp (connector_type, GNOME_RR_CONNECTOR_TYPE_PANEL) == 0)
+    if (g_strcmp0 (output->connector_type, GNOME_RR_CONNECTOR_TYPE_PANEL) == 0)
 	return TRUE;
 
     /* Older versions of RANDR - this is a best guess, as @#$% RANDR doesn't have standard output names,



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]