gnome-desktop r5314 - in trunk/libgnome-desktop: . libgnomeui
- From: federico svn gnome org
- To: svn-commits-list gnome org
- Subject: gnome-desktop r5314 - in trunk/libgnome-desktop: . libgnomeui
- Date: Thu, 4 Dec 2008 00:29:35 +0000 (UTC)
Author: federico
Date: Thu Dec 4 00:29:34 2008
New Revision: 5314
URL: http://svn.gnome.org/viewvc/gnome-desktop?rev=5314&view=rev
Log:
Report file-loading errors from gnome_rr_config_new_stored()
Signed-off-by: Federico Mena Quintero <federico novell com>
Modified:
trunk/libgnome-desktop/gnome-rr-config.c
trunk/libgnome-desktop/libgnomeui/gnome-rr-config.h
Modified: trunk/libgnome-desktop/gnome-rr-config.c
==============================================================================
--- trunk/libgnome-desktop/gnome-rr-config.c (original)
+++ trunk/libgnome-desktop/gnome-rr-config.c Thu Dec 4 00:29:34 2008
@@ -1106,7 +1106,7 @@
}
GnomeRRConfig *
-gnome_rr_config_new_stored (GnomeRRScreen *screen)
+gnome_rr_config_new_stored (GnomeRRScreen *screen, GError **error)
{
GnomeRRConfig *current;
GnomeRRConfig **configs;
@@ -1114,12 +1114,12 @@
/* FMQ: return error */
- if (!screen)
- return NULL;
+ g_return_val_if_fail (screen != NULL, NULL);
+ g_return_val_if_fail (error == NULL || *error == NULL, NULL);
current = gnome_rr_config_new_current (screen);
- configs = configurations_read (NULL); /* NULL_GError */
+ configs = configurations_read (error);
result = NULL;
if (configs)
@@ -1135,6 +1135,8 @@
}
}
+ /* FMQ: what if result == NULL here? Do we return an error? */
+
configurations_free (configs);
}
Modified: trunk/libgnome-desktop/libgnomeui/gnome-rr-config.h
==============================================================================
--- trunk/libgnome-desktop/libgnomeui/gnome-rr-config.h (original)
+++ trunk/libgnome-desktop/libgnomeui/gnome-rr-config.h Thu Dec 4 00:29:34 2008
@@ -73,7 +73,8 @@
};
GnomeRRConfig *gnome_rr_config_new_current (GnomeRRScreen *screen);
-GnomeRRConfig *gnome_rr_config_new_stored (GnomeRRScreen *screen);
+GnomeRRConfig *gnome_rr_config_new_stored (GnomeRRScreen *screen,
+ GError **error);
void gnome_rr_config_free (GnomeRRConfig *configuration);
gboolean gnome_rr_config_match (GnomeRRConfig *config1,
GnomeRRConfig *config2);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]