- Also pass AT's to the session from the plain greeter (#232518)

- New faces including new subpackage gdm-extra-faces
This commit is contained in:
David Zeuthen 2007-03-20 04:08:18 +00:00
parent 8d5a4b0060
commit 6b7e7b397d
4 changed files with 309 additions and 4 deletions

View File

@ -1 +1,2 @@
gdm-2.18.0.tar.bz2
fedora-faces-20070319.tar.bz2

View File

@ -0,0 +1,279 @@
Index: gui/modules/dwellmouselistener.c
===================================================================
--- gui/modules/dwellmouselistener.c (revision 4608)
+++ gui/modules/dwellmouselistener.c (working copy)
@@ -665,6 +665,8 @@
G_CALLBACK (gtk_widget_destroy), NULL);
gtk_widget_show (dialog);
} else {
+ const char *at_name;
+ const char *ats_launched;
GdkCursor *cursor = gdk_cursor_new (GDK_WATCH);
gdk_window_set_cursor (gdk_get_default_root_window (),
cursor);
@@ -673,6 +675,26 @@
latch_core_pointer = FALSE;
/* once we've recognized a gesture, we need to *
* leave the pointer alone */
+
+ at_name = strstr (action, "#AT_TYPE=");
+ if (at_name != NULL) {
+ int i;
+ char **v;
+ at_name += 9;
+ v = g_strsplit (at_name, " ", 0);
+ for (i = 0; v[i] != NULL; i++) {
+ ats_launched = g_getenv ("GDM_ATS");
+ if (ats_launched == NULL) {
+ g_setenv ("GDM_ATS", v[i], TRUE);
+ } else if (strstr (ats_launched, v[i]) == NULL) {
+ char *s;
+ s = g_strdup_printf ("%s %s", ats_launched, v[i]);
+ g_setenv ("GDM_ATS", s, TRUE);
+ g_free (s);
+ }
+ }
+ g_strfreev (v);
+ }
}
}
}
Index: gui/modules/keymouselistener.c
===================================================================
--- gui/modules/keymouselistener.c (revision 4608)
+++ gui/modules/keymouselistener.c (working copy)
@@ -937,6 +937,8 @@
NULL);
gtk_widget_show (dialog);
} else {
+ char *at_name;
+ const char *ats_launched;
GdkCursor *cursor = gdk_cursor_new (GDK_WATCH);
gdk_window_set_cursor (gdk_get_default_root_window (),
cursor);
@@ -944,6 +946,26 @@
g_timeout_add (2000,
change_cursor_back,
NULL);
+
+ at_name = strstr (action, "#AT_TYPE=");
+ if (at_name != NULL) {
+ int i;
+ char **v;
+ at_name += 9;
+ v = g_strsplit (at_name, " ", 0);
+ for (i = 0; v[i] != NULL; i++) {
+ ats_launched = g_getenv ("GDM_ATS");
+ if (ats_launched == NULL) {
+ g_setenv ("GDM_ATS", v[i], TRUE);
+ } else if (strstr (ats_launched, v[i]) == NULL) {
+ char *s;
+ s = g_strdup_printf ("%s %s", ats_launched, v[i]);
+ g_setenv ("GDM_ATS", s, TRUE);
+ g_free (s);
+ }
+ }
+ g_strfreev (v);
+ }
}
}
return GDK_FILTER_CONTINUE;
Index: gui/modules/AccessDwellMouseEvents.in
===================================================================
--- gui/modules/AccessDwellMouseEvents.in (revision 4608)
+++ gui/modules/AccessDwellMouseEvents.in (working copy)
@@ -37,23 +37,23 @@
# user needs. Note these gestures all start by moving the mouse into the top
# window border.
#
-TBLR I 10000 @AT_BINDIR@/gok --login --access-method=dwellselection
-TLBR I 10000 @AT_BINDIR@/gok --login --access-method=automaticscanning --scan-action=switch1 --select-action=switch1
-TRBL I 10000 @AT_BINDIR@/gok --login --access-method=inversescanning --scan-action=switch1 --select-action=switch2
-TBRL I 10000 @AT_BINDIR@/gok --login --access-method=automaticscanning --scan-action=switch3 --select-action=switch3
+TBLR I 10000 @AT_BINDIR@/gok --login --access-method=dwellselection #AT_TYPE=onscreenkeyboard
+TLBR I 10000 @AT_BINDIR@/gok --login --access-method=automaticscanning --scan-action=switch1 --select-action=switch1 #AT_TYPE=onscreenkeyboard
+TRBL I 10000 @AT_BINDIR@/gok --login --access-method=inversescanning --scan-action=switch1 --select-action=switch2 #AT_TYPE=onscreenkeyboard
+TBRL I 10000 @AT_BINDIR@/gok --login --access-method=automaticscanning --scan-action=switch3 --select-action=switch3 #AT_TYPE=onscreenkeyboard
# Orca. Note these gestures all start by moving the mouse into the
# bottom window border.
#
# Speech
#
-BTRL I 10000 @AT_BINDIR@/orca -n -d main-window
+BTRL I 10000 @AT_BINDIR@/orca -n -d main-window #AT_TYPE=screenreader
# Magnifier
#
-BTLR I 10000 @AT_BINDIR@/orca -n -d main-window -d speech -e magnifier
+BTLR I 10000 @AT_BINDIR@/orca -n -d main-window -d speech -e magnifier #AT_TYPE=magnifier
# Speech and Magnifier
#
-BRTL I 10000 @AT_BINDIR@/orca -n -d main-window -e magnifier
+BRTL I 10000 @AT_BINDIR@/orca -n -d main-window -e magnifier #AT_TYPE=screenreader magnifier
Index: gui/modules/AccessKeyMouseEvents.in
===================================================================
--- gui/modules/AccessKeyMouseEvents.in (revision 4608)
+++ gui/modules/AccessKeyMouseEvents.in (working copy)
@@ -69,18 +69,18 @@
# press ctrl-s for 1 second to launch orca in speech mode
#
-<Control>s 1 1000 10000 @AT_BINDIR@/orca -n -d main-window
+<Control>s 1 1000 10000 @AT_BINDIR@/orca -n -d main-window #AT_TYPE=screenreader
# press ctrl-m for 1 second to launch orca in mag mode
#
-<Control>m 1 1000 10000 @AT_BINDIR@/orca -n -d main-window -d speech -e magnifier
+<Control>m 1 1000 10000 @AT_BINDIR@/orca -n -d main-window -d speech -e magnifier #AT_TYPE=magnifier
# press ctrl-o or ctrl-g for 1 second to launch orca in speech and mag mode
#
-<Control>o 1 1000 10000 @AT_BINDIR@/orca -n -d main-window -e magnifier
-<Control>g 1 1000 10000 @AT_BINDIR@/orca -n -d main-window -e magnifier
+<Control>o 1 1000 10000 @AT_BINDIR@/orca -n -d main-window -e magnifier #AT_TYPE=screenreader magnifier
+<Control>g 1 1000 10000 @AT_BINDIR@/orca -n -d main-window -e magnifier #AT_TYPE=screenreader magnifier
# Start GOK with direct selection mode.
#
-<Control>k 5 1000 10000 @AT_BINDIR@/gok --login --access-method=directselection
+<Control>k 5 1000 10000 @AT_BINDIR@/gok --login --access-method=directselection #AT_TYPE=onscreenkeyboard
Index: gui/greeter/greeter.c
===================================================================
--- gui/greeter/greeter.c (revision 4608)
+++ gui/greeter/greeter.c (working copy)
@@ -340,6 +340,19 @@
g_free (session);
break;
+ case GDM_A11Y:
+ {
+ const char *ats_launched;
+ /* print out the assistive technologies that we've started for the user */
+ ats_launched = g_getenv ("GDM_ATS");
+ if (ats_launched != NULL)
+ printf ("%c%s\n", STX, ats_launched);
+ else
+ printf ("%c\n", STX);
+ fflush (stdout);
+ break;
+ }
+
case GDM_LANG:
language = greeter_language_get_language (args);
if (greeter_language_get_save_language () == GTK_RESPONSE_CANCEL)
Index: daemon/gdm.h
===================================================================
--- daemon/gdm.h (revision 4608)
+++ daemon/gdm.h (working copy)
@@ -98,6 +98,7 @@
#define GDM_PROMPT 'N'
#define GDM_SESS 'G'
#define GDM_LANG '&'
+#define GDM_A11Y 'Z'
#define GDM_SSESS 'C'
#define GDM_SLANG 'R'
#define GDM_RESET 'A'
Index: daemon/slave.c
===================================================================
--- daemon/slave.c (revision 4608)
+++ daemon/slave.c (working copy)
@@ -3430,6 +3430,7 @@
const char *session,
const char *save_session,
const char *language,
+ const char *a11y_ats,
const char *gnome_session,
gboolean usrcfgok,
gboolean savesess,
@@ -3522,6 +3523,9 @@
g_setenv ("XDG_SESSION_COOKIE", ck_session_cookie, TRUE);
}
#endif
+ if (a11y_ats != NULL) {
+ g_setenv ("GDM_ATS", a11y_ats, TRUE);
+ }
g_setenv ("GDMSESSION", session, TRUE);
g_setenv ("DESKTOP_SESSION", session, TRUE);
g_setenv ("SHELL", pwent->pw_shell, TRUE);
@@ -4016,7 +4020,7 @@
{
struct passwd *pwent;
const char *home_dir = NULL;
- char *save_session = NULL, *session = NULL, *language = NULL, *usrsess, *usrlang;
+ char *save_session = NULL, *session = NULL, *language = NULL, *a11y_ats = NULL, *usrsess, *usrlang;
char *gnome_session = NULL;
#ifdef WITH_CONSOLE_KIT
char *ck_session_cookie;
@@ -4187,9 +4191,19 @@
g_free (usrlang);
return;
}
+
+ a11y_ats = gdm_slave_greeter_ctl (GDM_A11Y, NULL);
+ if (a11y_ats != NULL &&
+ strcmp (a11y_ats, GDM_RESPONSE_CANCEL) == 0) {
+ gdm_debug ("User canceled login");
+ gdm_verify_cleanup (d);
+ session_started = FALSE;
+ return;
+ }
} else {
session = g_strdup (usrsess);
language = g_strdup (usrlang);
+ a11y_ats = NULL;
}
tmp = gdm_strip_extension (session, ".desktop");
@@ -4210,11 +4224,16 @@
language = NULL;
}
+ if G_LIKELY (ve_string_empty (a11y_ats)) {
+ g_free (a11y_ats);
+ a11y_ats = NULL;
+ }
+
g_free (usrsess);
g_free (usrlang);
- gdm_debug ("Initial setting: session: '%s' language: '%s'\n",
- session, ve_sure_string (language));
+ gdm_debug ("Initial setting: session: '%s' language: '%s' ATs enabled in gdm: '%s'\n",
+ session, ve_sure_string (language), ve_sure_string (a11y_ats));
/* save this session as the users session */
save_session = g_strdup (session);
@@ -4378,6 +4397,7 @@
session,
save_session,
language,
+ a11y_ats,
gnome_session,
usrcfgok,
savesess,
--- gui/gdmlogin.c.orig 2007-03-19 23:32:04.000000000 -0400
+++ gui/gdmlogin.c 2007-03-19 23:32:33.000000000 -0400
@@ -1784,6 +1784,19 @@
fflush (stdout);
break;
+ case GDM_A11Y:
+ {
+ const char *ats_launched;
+ /* print out the assistive technologies that we've started for the user */
+ ats_launched = g_getenv ("GDM_ATS");
+ if (ats_launched != NULL)
+ printf ("%c%s\n", STX, ats_launched);
+ else
+ printf ("%c\n", STX);
+ fflush (stdout);
+ break;
+ }
+
case GDM_LANG:
gdm_login_language_lookup (args);
if (savelang == GTK_RESPONSE_CANCEL)

View File

@ -16,7 +16,7 @@
Summary: The GNOME Display Manager
Name: gdm
Version: 2.18.0
Release: 2%{?dist}
Release: 3%{?dist}
Epoch: 1
License: LGPL/GPL
Group: User Interface/X
@ -26,6 +26,7 @@ Source1: gdm-pam
Source2: gdm-autologin-pam
Source3: gdmsetup-pam
Source4: 90-grant-audio-devices-to-gdm.fdi
Source5: fedora-faces-20070319.tar.bz2
Patch1: gdm-2.18.0-change-defaults.patch
Patch4: gdm-2.13.0.4-update-switchdesk-location.patch
@ -61,7 +62,7 @@ Patch31: gdm-2.17.8-hide-uninstalled-languages.patch
Patch32: gdm-2.17.8-a11y-fixes-for-themed-greeter.patch
# http://bugzilla.gnome.org/show_bug.cgi?id=411501
Patch33: gdm-2.17.7-pass-at-to-session-3.patch
Patch33: gdm-2.17.7-pass-at-to-session-4.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
@ -121,8 +122,16 @@ reimplementation of xdm, the X Display Manager. Gdm allows you to log
into your system with the X Window System running and supports running
several different X sessions on your local machine at the same time.
%package extra-faces
Summary: Extra faces for GDM
Group: User Interface/X
Requires: %name
%description extra-faces
Extra icons / faces for the GNOME Display Manager.
%prep
%setup -q
%setup -q -a 5
%patch1 -p1 -b .change-defaults
%patch4 -p1 -b .update-switchdesk-location
@ -225,6 +234,11 @@ rm -rf $RPM_BUILD_ROOT%{_localstatedir}/scrollkeeper
mkdir -p $RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/20thirdparty
cp %{SOURCE4} $RPM_BUILD_ROOT%{_datadir}/hal/fdi/policy/20thirdparty
# replace faces with the ones from fedora-faces
rm -rf $RPM_BUILD_ROOT%{_datadir}/pixmaps/faces
mkdir $RPM_BUILD_ROOT%{_datadir}/pixmaps/faces
cp -Rpr faces $RPM_BUILD_ROOT%{_datadir}/pixmaps
%find_lang gdm
%clean
@ -328,7 +342,9 @@ fi
%dir %{_sysconfdir}/gdm/PostSession
%dir %{_sysconfdir}/gdm/PostLogin
%dir %{_sysconfdir}/gdm/modules
%{_datadir}/pixmaps
%{_datadir}/pixmaps/*.png
%{_datadir}/pixmaps/faces/*.png
%{_datadir}/pixmaps/faces/*.jpg
%{_datadir}/icons/hicolor/*/apps/*.png
%{_datadir}/gdm
%{_datadir}/applications
@ -344,7 +360,15 @@ fi
%attr(1770, root, gdm) %dir %{_localstatedir}/gdm
%files extra-faces
%{_datadir}/pixmaps/faces/extras/*.png
%{_datadir}/pixmaps/faces/extras/*.jpg
%changelog
* Mon Mar 19 2007 David Zeuthen <davidz@redhat.com> - 1:2.18.0-3
- Also pass AT's to the session from the plain greeter (#232518)
- New faces including new subpackage gdm-extra-faces
* Tue Mar 13 2007 David Zeuthen <davidz@redhat.com> - 1:2.18.0-2
- Update to upstream release 2.18.0
- Switch default theme to FedoraFlyingHigh and show /etc/passwd users

View File

@ -1 +1,2 @@
a569a8275f0e0396e6ef5f63c5f56ad5 gdm-2.18.0.tar.bz2
7387935ad09f746889b58bd69bf815e1 fedora-faces-20070319.tar.bz2