[Xfce4-commits] [xfce/xfce4-session] 02/04: Check accessibility depending on xfsm configuration

noreply at xfce.org noreply at xfce.org
Thu Dec 7 08:01:24 CET 2017


This is an automated email from the git hooks/post-receive script.

e   r   i   c       p   u   s   h   e   d       a       c   o   m   m   i   t       t   o       b   r   a   n   c   h       m   a   s   t   e   r   
   in repository xfce/xfce4-session.

commit 8a2733e822d5f0bae89027194aa0678a5b72a9c7
Author: Viktor Odintsev <ninetls at xfce.org>
Date:   Tue Dec 5 02:33:47 2017 +0300

    Check accessibility depending on xfsm configuration
    
    Signed-off-by: Eric Koegel <eric.koegel at gmail.com>
---
 xfce4-session/xfsm-logout-dialog.c | 13 ++++++-------
 xfce4-session/xfsm-logout-dialog.h |  3 ++-
 xfce4-session/xfsm-manager.c       |  9 +++++++--
 3 files changed, 15 insertions(+), 10 deletions(-)

diff --git a/xfce4-session/xfsm-logout-dialog.c b/xfce4-session/xfsm-logout-dialog.c
index 57738bf..e473d8b 100644
--- a/xfce4-session/xfsm-logout-dialog.c
+++ b/xfce4-session/xfsm-logout-dialog.c
@@ -743,11 +743,11 @@ xfsm_logout_dialog_run (GtkDialog *dialog,
 gboolean
 xfsm_logout_dialog (const gchar      *session_name,
                     XfsmShutdownType *return_type,
-                    gboolean         *return_save_session)
+                    gboolean         *return_save_session,
+                    gboolean          accessibility)
 {
   gint              result;
   GtkWidget        *hidden;
-  gboolean          a11y;
   GtkWidget        *dialog;
   GdkScreen        *screen;
   gint              monitor;
@@ -785,12 +785,11 @@ xfsm_logout_dialog (const gchar      *session_name,
       monitor = 0;
     }
 
-  /* check if accessibility is enabled */
   hidden = gtk_invisible_new_for_screen (screen);
   gtk_widget_show (hidden);
-  a11y = GTK_IS_ACCESSIBLE (gtk_widget_get_accessible (hidden));
 
-  if (G_LIKELY (!a11y))
+  /* check if accessibility is enabled */
+  if (G_LIKELY (!accessibility))
     {
       /* wait until we can grab the keyboard, we need this for
        * the dialog when running it */
@@ -849,7 +848,7 @@ xfsm_logout_dialog (const gchar      *session_name,
   else
     {
       dialog = g_object_new (XFSM_TYPE_LOGOUT_DIALOG,
-                             "decorated", !a11y,
+                             "decorated", !accessibility,
                              "screen", screen, NULL);
 
       gtk_window_set_keep_above (GTK_WINDOW (dialog), TRUE);
@@ -863,7 +862,7 @@ xfsm_logout_dialog (const gchar      *session_name,
   /* set mode */
   xfsm_logout_dialog_set_mode (xfsm_dialog, MODE_LOGOUT_BUTTONS);
 
-  result = xfsm_logout_dialog_run (GTK_DIALOG (dialog), !a11y);
+  result = xfsm_logout_dialog_run (GTK_DIALOG (dialog), !accessibility);
 
   gtk_widget_hide (dialog);
 
diff --git a/xfce4-session/xfsm-logout-dialog.h b/xfce4-session/xfsm-logout-dialog.h
index 2cb0882..0e7f68b 100644
--- a/xfce4-session/xfsm-logout-dialog.h
+++ b/xfce4-session/xfsm-logout-dialog.h
@@ -38,6 +38,7 @@ GType      xfsm_logout_dialog_get_type (void) G_GNUC_CONST;
 
 gboolean   xfsm_logout_dialog          (const gchar      *session_name,
                                         XfsmShutdownType *return_type,
-                                        gboolean         *return_save_session);
+                                        gboolean         *return_save_session,
+                                        gboolean          accessibility);
 
 #endif
diff --git a/xfce4-session/xfsm-manager.c b/xfce4-session/xfsm-manager.c
index 00309b0..bf189a4 100644
--- a/xfce4-session/xfsm-manager.c
+++ b/xfce4-session/xfsm-manager.c
@@ -1189,8 +1189,13 @@ xfsm_manager_save_yourself_global (XfsmManager     *manager,
         {
           /* if we're not specifying fast shutdown, and we're ok with
            * prompting then ask the user what to do */
-          if (!xfsm_logout_dialog (manager->session_name, &manager->shutdown_type, &shutdown_save))
-            return;
+          if (!xfsm_logout_dialog (manager->session_name,
+                                   &manager->shutdown_type,
+                                   &shutdown_save,
+                                   manager->start_at))
+            {
+              return;
+            }
 
           /* |allow_shutdown_save| is ignored if we prompt the user.  i think
            * this is the right thing to do. */

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Xfce4-commits mailing list