static void
action_show_hide_sidebar_callback (GtkAction *action,
                                   gpointer user_data)
{
    NautilusWindow *window;

    window = NAUTILUS_WINDOW (user_data);

    if (gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (action))) {
        nautilus_window_show_sidebar (window);
    } else {
        nautilus_window_hide_sidebar (window);
    }
}
static void
action_show_hide_sidebar (GSimpleAction *action,
			  GVariant      *state,
			  gpointer       user_data)
{
	GList *window, *windows;

	windows = gtk_application_get_windows (GTK_APPLICATION (user_data));

	for (window = windows; window != NULL; window = window->next) {
		if (g_variant_get_boolean (state)) {
			nautilus_window_show_sidebar (window->data);
		} else {
			nautilus_window_hide_sidebar (window->data);
		}
	}

	g_simple_action_set_state (action, state);
}