gnome-desktop r5303 - trunk/libgnome-desktop
- From: federico svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-desktop r5303 - trunk/libgnome-desktop
- Date: Thu, 4 Dec 2008 00:27:06 +0000 (UTC)
Author: federico
Date: Thu Dec 4 00:27:06 2008
New Revision: 5303
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5303&view=rev
Log:
Report errors from output_initialize()
Signed-off-by: Federico Mena Quintero <federico novell com>
Modified:
trunk/libgnome-desktop/gnome-rr.c
Modified: trunk/libgnome-desktop/gnome-rr.c
==============================================================================
--- trunk/libgnome-desktop/gnome-rr.c (original)
+++ trunk/libgnome-desktop/gnome-rr.c Thu Dec 4 00:27:06 2008
@@ -128,8 +128,9 @@
/* GnomeRROutput */
static GnomeRROutput *output_new (ScreenInfo *info,
RROutput id);
-static void output_initialize (GnomeRROutput *output,
- XRRScreenResources *res);
+static gboolean output_initialize (GnomeRROutput *output,
+ XRRScreenResources *res,
+ GError **error);
static void output_free (GnomeRROutput *output);
/* GnomeRRMode */
@@ -420,7 +421,13 @@
}
for (output = info->outputs; *output; ++output)
- output_initialize (*output, resources); /* FMQ: return error */
+ {
+ if (!output_initialize (*output, resources, error))
+ {
+ screen_info_free (info);
+ return FALSE;
+ }
+ }
for (i = 0; i < resources->nmode; ++i)
{
@@ -774,8 +781,8 @@
return NULL;
}
-static void
-output_initialize (GnomeRROutput *output, XRRScreenResources *res)
+static gboolean
+output_initialize (GnomeRROutput *output, XRRScreenResources *res, GError **error)
{
XRROutputInfo *info = XRRGetOutputInfo (
DISPLAY (output), res, output->id);
@@ -788,9 +795,11 @@
if (!info || !output->info)
{
- /* FIXME */
- /* FMQ: return error */
- return;
+ /* FIXME: see the comment in crtc_initialize() */
+ g_set_error (error, GNOME_RR_ERROR, GNOME_RR_ERROR_RANDR_ERROR,
+ _("could not get information about output %d"),
+ (int) output->id);
+ return FALSE;
}
output->name = g_strdup (info->name); /* FIXME: what is nameLen used for? */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]