Commit 859ed525 authored by Ray Strode's avatar Ray Strode

display: drop error arg from gdm_display_get_timed_login_details

It turns out it never fails, and all callers always pass NULL for
it's error argument, so drop that argument and the gboolean return
type.

https://bugzilla.gnome.org/show_bug.cgi?id=744764
parent 8d3d988b
......@@ -329,19 +329,16 @@ gdm_display_real_get_timed_login_details (GdmDisplay *display,
}
}
gboolean
void
gdm_display_get_timed_login_details (GdmDisplay *display,
gboolean *out_enabled,
char **out_username,
int *out_delay,
GError **error)
int *out_delay)
{
gboolean enabled;
char *username;
int delay;
g_return_val_if_fail (GDM_IS_DISPLAY (display), FALSE);
GDM_DISPLAY_GET_CLASS (display)->get_timed_login_details (display, &enabled, &username, &delay);
g_debug ("GdmDisplay: Got timed login details for display %s: %d '%s' %d",
......@@ -363,8 +360,6 @@ gdm_display_get_timed_login_details (GdmDisplay *display,
if (out_delay) {
*out_delay = delay;
}
return TRUE;
}
gboolean
......@@ -925,7 +920,7 @@ handle_get_timed_login_details (GdmDBusDisplay *skeleton,
char *username;
int delay;
gdm_display_get_timed_login_details (display, &enabled, &username, &delay, NULL);
gdm_display_get_timed_login_details (display, &enabled, &username, &delay);
gdm_dbus_display_complete_get_timed_login_details (skeleton,
invocation,
......
......@@ -117,11 +117,10 @@ gboolean gdm_display_get_seat_id (GdmDisplay *disp
gboolean gdm_display_is_local (GdmDisplay *display,
gboolean *local,
GError **error);
gboolean gdm_display_get_timed_login_details (GdmDisplay *display,
void gdm_display_get_timed_login_details (GdmDisplay *display,
gboolean *enabled,
char **username,
int *delay,
GError **error);
int *delay);
gboolean gdm_display_is_initial (GdmDisplay *display,
gboolean *initial,
GError **error);
......
......@@ -1324,7 +1324,7 @@ display_should_autologin (GdmManager *manager,
return FALSE;
}
gdm_display_get_timed_login_details (display, &enabled, NULL, &delay, NULL);
gdm_display_get_timed_login_details (display, &enabled, NULL, &delay);
return enabled && delay == 0;
}
......@@ -1756,7 +1756,7 @@ on_session_client_connected (GdmSession *session,
g_object_get (display, "is-local", &display_is_local, NULL);
enabled = FALSE;
gdm_display_get_timed_login_details (display, &enabled, &username, &delay, NULL);
gdm_display_get_timed_login_details (display, &enabled, &username, &delay);
if (! enabled) {
return;
......@@ -1876,7 +1876,7 @@ on_session_conversation_started (GdmSession *session,
}
enabled = FALSE;
gdm_display_get_timed_login_details (display, &enabled, &username, &delay, NULL);
gdm_display_get_timed_login_details (display, &enabled, &username, &delay);
if (! enabled) {
return;
}
......@@ -1932,7 +1932,7 @@ start_autologin_conversation_if_necessary (GdmManager *manager,
gboolean enabled;
int delay = 0;
gdm_display_get_timed_login_details (display, &enabled, NULL, &delay, NULL);
gdm_display_get_timed_login_details (display, &enabled, NULL, &delay);
if (delay == 0 && g_file_test (GDM_RAN_ONCE_MARKER_FILE, G_FILE_TEST_EXISTS)) {
return;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment