Gtk+ diffs for non-X11R6



First, gtk+/gdk/gdkcursors.h and gtk+/gdk/gdkkeysyms.h should not be in
CVS; they're generated files.  (gdkcursors.h is harmless; the diff removes
the comment at the top of the file.)

I'm not sure what the actual assumption here is.  Some of the keysyms look
XFree86-specific; others visible in the diff of gdkkeysyms.h are I18N keysyms.
My assumption is that it's X11R6, sincse that's the most likely explanation
of why other people are successfully building on Solaris 2.5.1 without such
patches (I'm stuck with X11R5, we need to support commercial programs which
appear to be rather picky about what X server they're talking to).

Index: gtk+/gtk/gtkaccelgroup.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkaccelgroup.c,v
retrieving revision 1.11
diff -u -r1.11 gtkaccelgroup.c
--- gtkaccelgroup.c	1998/09/03 02:48:52	1.11
+++ gtkaccelgroup.c	1998/10/17 20:36:53
@@ -704,16 +704,30 @@
 {
   guint invalid_accelerator_vals[] = {
     GDK_BackSpace, GDK_Delete, GDK_KP_Delete,
-    GDK_Shift_L, GDK_Shift_R, GDK_Shift_Lock, GDK_Caps_Lock, GDK_ISO_Lock,
+    GDK_Shift_L, GDK_Shift_R, GDK_Shift_Lock, GDK_Caps_Lock,
+    /* X11R6 and/or XFree86 assumptions? ++bsa */
+#ifdef GDK_ISO_Lock
+    GDK_ISO_Lock,
+#endif
     GDK_Control_L, GDK_Control_R, GDK_Meta_L, GDK_Meta_R,
     GDK_Super_L, GDK_Super_R, GDK_Hyper_L, GDK_Hyper_R,
     GDK_Mode_switch, GDK_Num_Lock, GDK_Multi_key,
     GDK_Scroll_Lock, GDK_Sys_Req, 
-    GDK_Up, GDK_Down, GDK_Left, GDK_Right, GDK_Tab, GDK_ISO_Left_Tab,
+    GDK_Up, GDK_Down, GDK_Left, GDK_Right, GDK_Tab,
+#ifdef GDK_ISO_Left_Tab
+    GDK_ISO_Left_Tab,
+#endif
     GDK_KP_Up, GDK_KP_Down, GDK_KP_Left, GDK_KP_Right, GDK_KP_Tab,
+#ifdef GDK_First_Virtual_Screen
     GDK_First_Virtual_Screen, GDK_Prev_Virtual_Screen,
     GDK_Next_Virtual_Screen, GDK_Last_Virtual_Screen,
-    GDK_Terminate_Server, GDK_AudibleBell_Enable,
+#endif
+#ifdef GDK_Terminate_Server
+    GDK_Terminate_Server,
+#endif
+#ifdef GDK_AudibleBell_Enable
+    GDK_AudibleBell_Enable,
+#endif
     0
   };
   guint *ac_val;
Index: gtk+/gtk/gtkclist.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkclist.c,v
retrieving revision 1.100
diff -u -r1.100 gtkclist.c
--- gtkclist.c	1998/10/16 14:59:59	1.100
+++ gtkclist.c	1998/10/17 20:36:54
@@ -5915,7 +5915,9 @@
   switch (event->keyval)
     {
     case GDK_Tab:
+#ifdef GDK_ISO_Left_Tab
     case GDK_ISO_Left_Tab:
+#endif
       if (event->state & GDK_SHIFT_MASK)
 	return gtk_container_focus (GTK_CONTAINER (widget),
 				    GTK_DIR_TAB_BACKWARD);
Index: gtk+/gtk/gtknotebook.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtknotebook.c,v
retrieving revision 1.37
diff -u -r1.37 gtknotebook.c
--- gtknotebook.c	1998/09/03 02:38:39	1.37
+++ gtknotebook.c	1998/10/17 20:36:54
@@ -3415,7 +3415,9 @@
       direction = GTK_DIR_RIGHT;
       break;
     case GDK_Tab:
+#ifdef GDK_ISO_Left_Tab
     case GDK_ISO_Left_Tab:
+#endif
       if (event->state & GDK_SHIFT_MASK)
 	direction = GTK_DIR_TAB_BACKWARD;
       else
Index: gtk+/gtk/gtkwindow.c
===================================================================
RCS file: /cvs/gnome/gtk+/gtk/gtkwindow.c,v
retrieving revision 1.51
diff -u -r1.51 gtkwindow.c
--- gtkwindow.c	1998/09/15 14:59:48	1.51
+++ gtkwindow.c	1998/10/17 20:36:54
@@ -805,7 +805,9 @@
 	case GDK_Left:
 	case GDK_Right:
 	case GDK_Tab:
+#ifdef GDK_ISO_Left_Tab
 	case GDK_ISO_Left_Tab:
+#endif
 	  switch (event->keyval)
 	    {
 	    case GDK_Up:
@@ -821,7 +823,15 @@
 	      direction = GTK_DIR_RIGHT;
 	      break;
 	    case GDK_Tab:
+	      /*
+	       * this makes shift-tab work even on systems that don't have
+	       * a keysym for left tab, but does make the assumption that
+	       * shift-tab isn't something else.  then again, the existing
+	       * code assumes that left tab is shifted...  ++bsa
+	       */
+#ifdef GDK_ISO_Left_Tab
 	    case GDK_ISO_Left_Tab:
+#endif
 	      if (event->state & GDK_SHIFT_MASK)
 		direction = GTK_DIR_TAB_BACKWARD;
 	      else

-- 
brandon s. allbery	[os/2][linux][solaris][japh]	 allbery@kf8nh.apk.net
system administrator	     [WAY too many hats]	   allbery@ece.cmu.edu
electrical and computer engineering
carnegie mellon university			   (bsa@kf8nh is still valid.)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]