Пример #1
0
/* Log Out
 */
static void
panel_action_logout (GtkWidget *widget)
{
	PanelSessionManager *manager;
	gboolean             prompt = TRUE;

	if (mate_gsettings_schema_exists (MATE_SESSION_SCHEMA)) {
		GSettings *msm_settings;
		msm_settings = g_settings_new (MATE_SESSION_SCHEMA);
		prompt = g_settings_get_boolean (msm_settings, MATE_SESSION_LOGOUT_PROMPT_KEY);
		g_object_unref (msm_settings);
	}

	manager = panel_session_manager_get ();

	if (!prompt)
		panel_session_manager_request_logout (manager,
						      PANEL_SESSION_MANAGER_LOGOUT_MODE_NO_CONFIRMATION);
	else
		/* FIXME: we need to use widget to get the screen for the
		 * confirmation dialog, see
		 * http://bugzilla.gnome.org/show_bug.cgi?id=536914 */
		panel_session_manager_request_logout (manager,
						      PANEL_SESSION_MANAGER_LOGOUT_MODE_NORMAL);
}
Пример #2
0
/* Log Out
 */
static void
panel_action_logout (GtkWidget *widget)
{
	/* FIXME: we need to use widget to get the screen for the
	 * confirmation dialog, see
	 * http://bugzilla.gnome.org/show_bug.cgi?id=536914 */
	panel_session_manager_request_logout (panel_session_manager_get (),
					      PANEL_SESSION_MANAGER_LOGOUT_MODE_NORMAL);
}
/* Log Out
 */
static void
panel_action_logout (GtkWidget *widget)
{
	PanelSessionManager *manager;
	gboolean             not_prompt;

	not_prompt = mateconf_client_get_bool (panel_mateconf_get_client (),
					    LOGOUT_PROMPT_KEY, NULL);
	/* this avoids handling errors from mateconf since prompting is
	 * safer */
	not_prompt = !not_prompt;

	manager = panel_session_manager_get ();

	if (not_prompt)
		panel_session_manager_request_logout (manager,
						      PANEL_SESSION_MANAGER_LOGOUT_MODE_NO_CONFIRMATION);
	else
		/* FIXME: we need to use widget to get the screen for the
		 * confirmation dialog, see
		 * http://bugzilla.gnome.org/show_bug.cgi?id=536914 */
		panel_session_manager_request_logout (manager,
						      PANEL_SESSION_MANAGER_LOGOUT_MODE_NORMAL);
}