schema source: avoid introspection confusion

Any method that has its prefix'd argument as its first parameter will be
interpreted by introspection as a method. We don't want this, so we need
to swap the first two parameters.
This commit is contained in:
Jasper St. Pierre 2011-11-16 14:53:03 -05:00 committed by Ryan Lortie
parent bef773408c
commit 6339b5fe2d
3 changed files with 7 additions and 7 deletions

View File

@ -95,8 +95,8 @@ g_settings_schema_source_unref (GSettingsSchemaSource *source)
}
GSettingsSchemaSource *
g_settings_schema_source_new_from_directory (GSettingsSchemaSource *parent,
const gchar *directory,
g_settings_schema_source_new_from_directory (const gchar *directory,
GSettingsSchemaSource *parent,
gboolean trusted,
GError **error)
{

View File

@ -33,8 +33,8 @@ GSettingsSchemaSource * g_settings_schema_source_get_default (void);
GSettingsSchemaSource * g_settings_schema_source_ref (GSettingsSchemaSource *source);
void g_settings_schema_source_unref (GSettingsSchemaSource *source);
GSettingsSchemaSource * g_settings_schema_source_new_from_directory (GSettingsSchemaSource *parent,
const gchar *directory,
GSettingsSchemaSource * g_settings_schema_source_new_from_directory (const gchar *directory,
GSettingsSchemaSource *parent,
gboolean trusted,
GError **error);

View File

@ -1903,12 +1903,12 @@ test_schema_source (void)
/* make sure it fails properly */
parent = g_settings_schema_source_get_default ();
source = g_settings_schema_source_new_from_directory (parent, "/path/that/does/not/exist", TRUE, &error);
source = g_settings_schema_source_new_from_directory ("/path/that/does/not/exist", parent, TRUE, &error);
g_assert (source == NULL);
g_clear_error (&error);
/* create a source with the parent */
source = g_settings_schema_source_new_from_directory (parent, "schema-source", TRUE, &error);
source = g_settings_schema_source_new_from_directory ("schema-source", parent, TRUE, &error);
g_assert_no_error (error);
g_assert (source != NULL);
@ -1949,7 +1949,7 @@ test_schema_source (void)
g_settings_schema_source_unref (source);
/* try again, but with no parent */
source = g_settings_schema_source_new_from_directory (NULL, "schema-source", FALSE, NULL);
source = g_settings_schema_source_new_from_directory ("schema-source", NULL, FALSE, NULL);
g_assert (source != NULL);
/* should not find it this time, even if recursive... */