1 diff -up gnome-control-center-2.21.5/capplets/keyboard/Makefile.am.orig gnome-control-center-2.21.5/capplets/keyboard/Makefile.am 2 --- gnome-control-center-2.21.5/capplets/keyboard/Makefile.am.orig 2008-01-15 00:56:42.000000000 +0000 3 +++ gnome-control-center-2.21.5/capplets/keyboard/Makefile.am 2008-01-18 14:00:59.749645000 +0000 4 @@ -3,10 +3,8 @@ cappletname = keyboard 5 6 bin_PROGRAMS = gnome-keyboard-properties 7 8 -gnome_keyboard_properties_SOURCES = \ 9 - gnome-keyboard-properties.c \ 10 - gnome-keyboard-properties-a11y.c \ 11 - gnome-keyboard-properties-a11y.h \ 12 +if HAVE_GSWITCHIT 13 +GSWITCHIT_FILES = \ 14 gnome-keyboard-properties-xkb.c \ 15 gnome-keyboard-properties-xkbmc.c \ 16 gnome-keyboard-properties-xkblt.c \ 17 @@ -14,6 +12,13 @@ gnome_keyboard_properties_SOURCES = \ 18 gnome-keyboard-properties-xkbot.c \ 19 gnome-keyboard-properties-xkbpv.c \ 20 gnome-keyboard-properties-xkb.h 21 +endif 22 + 23 +gnome_keyboard_properties_SOURCES = \ 24 + gnome-keyboard-properties.c \ 25 + gnome-keyboard-properties-a11y.c \ 26 + gnome-keyboard-properties-a11y.h \ 27 + $(GSWITCHIT_FILES) 28 29 gnome_keyboard_properties_LDADD = $(GNOMECC_CAPPLETS_LIBS) $(LIBGNOMEKBDUI_LIBS) 30 31 32 diff -up gnome-control-center-2.22.1/capplets/keyboard/gnome-keyboard-properties.c.orig gnome-control-center-2.22.1/capplets/keyboard/gnome-keyboard-properties.c 33 --- gnome-control-center-2.22.1/capplets/keyboard/gnome-keyboard-properties.c.orig 2008-03-27 13:12:29.000000000 +0000 34 +++ gnome-control-center-2.22.1/capplets/keyboard/gnome-keyboard-properties.c 2008-04-24 16:53:12.389156746 +0100 35 @@ -38,7 +38,9 @@ 36 #include "capplet-stock-icons.h" 37 38 #include "gnome-keyboard-properties-a11y.h" 39 +#ifdef HAVE_GSWITCHIT 40 #include "gnome-keyboard-properties-xkb.h" 41 +#endif 42 43 enum { 44 RESPONSE_APPLY = 1, 45 @@ -194,7 +196,9 @@ setup_dialog (GladeXML * dialog, GConfCh 46 g_signal_connect (WID ("keyboard_dialog"), "response", 47 (GCallback) dialog_response, changeset); 48 49 +#ifdef HAVE_GSWITCHIT 50 setup_xkb_tabs (dialog, changeset); 51 +#endif 52 setup_a11y_tabs (dialog, changeset); 53 } 54 55 @@ -302,17 +306,37 @@ main (int argc, char **argv) 56 changeset = NULL; 57 dialog = create_dialog (); 58 setup_dialog (dialog, changeset); 59 + 60 +#ifndef HAVE_GSWITCHIT 61 + /* Do not display Layout tabs if libxklavier is not enabled */ 62 + gtk_notebook_remove_page (GTK_NOTEBOOK (WID ("keyboard_notebook")), 1); 63 +#endif 64 + 65 if (switch_to_typing_break_page) { 66 +#ifdef HAVE_GSWITCHIT 67 gtk_notebook_set_current_page (GTK_NOTEBOOK 68 (WID 69 ("keyboard_notebook")), 70 4); 71 +#else 72 + gtk_notebook_set_current_page (GTK_NOTEBOOK 73 + (WID 74 + ("keyboard_notebook")), 75 + 3); 76 +#endif 77 } 78 else if (switch_to_a11y_page) { 79 +#ifdef HAVE_GSWITCHIT 80 gtk_notebook_set_current_page (GTK_NOTEBOOK 81 (WID 82 ("keyboard_notebook")), 83 2); 84 +#else 85 + gtk_notebook_set_current_page (GTK_NOTEBOOK 86 + (WID 87 + ("keyboard_notebook")), 88 + 1); 89 +#endif 90 91 } 92 93 94 95 diff -u gnome-control-center-2.19.91/config.h.in.orig gnome-control-center-2.19.91/config.h.in 96 --- gnome-control-center-2.19.91/config.h.in.orig 2007-08-28 17:28:50.000000000 +0100 97 +++ gnome-control-center-2.19.91/config.h.in 2007-09-04 16:30:11.113054000 +0100 98 @@ -113,3 +113,7 @@ 99 100 /* Define to 1 if the X Window System is missing or not being used. */ 101 #undef X_DISPLAY_MISSING 102 + 103 +/* Defined when gswitchit is detected */ 104 +#undef HAVE_GSWITCHIT 105 + 106 107 diff -up ./configure.in.orig ./configure.in 108 --- ./configure.in.orig 1974-05-26 05:57:48.000000000 +0100 109 +++ ./configure.in 2008-06-04 13:58:43.468537508 +0100 110 @@ -179,13 +179,21 @@ CAPPLET_LIBS="$CAPPLET_LIBS $XCURSOR_LIB 111 dnl ============== 112 dnl gswitchit 113 dnl ============== 114 -PKG_CHECK_MODULES(LIBGNOMEKBD, [libgnomekbd >= 2.21.4.1 libxklavier >= 3.6]) 115 -AC_SUBST(LIBGNOMEKBD_CFLAGS) 116 -AC_SUBST(LIBGNOMEKBD_LIBS) 117 - 118 -PKG_CHECK_MODULES(LIBGNOMEKBDUI, [libgnomekbdui >= 2.21]) 119 -AC_SUBST(LIBGNOMEKBDUI_CFLAGS) 120 -AC_SUBST(LIBGNOMEKBDUI_LIBS) 121 +AC_ARG_ENABLE(gswitchit, 122 + AC_HELP_STRING([--disable-gswitchit], 123 + [Do not build with gswitchit support]),, 124 + enable_gswitchit=yes) 125 + 126 +if test x$enable_libxklavier = xyes; then 127 + PKG_CHECK_MODULES(LIBGNOMEKBD, [libgnomekbd >= 2.21.4.1 libxklavier >= 3.6]) 128 + AC_SUBST(LIBGNOMEKBD_CFLAGS) 129 + AC_SUBST(LIBGNOMEKBD_LIBS) 130 + 131 + PKG_CHECK_MODULES(LIBGNOMEKBDUI, [libgnomekbdui >= 2.21]) 132 + AC_SUBST(LIBGNOMEKBDUI_CFLAGS) 133 + AC_SUBST(LIBGNOMEKBDUI_LIBS) 134 +fi 135 +AM_CONDITIONAL(HAVE_GSWITCHIT, [test $enable_gswitchit = yes]) 136 137 dnl ============================================== 138 dnl fontilus dependencies 139 140