terminal patches



Hi,

Jonathan is honeymooning, but he asked me to submit these
gnome-terminal patches from RH 6.2 for inclusion in April GNOME. One
of them makes gnome-terminal comply with the Debian backspace/delete
behavior which is now standard for both Debian and Red Hat and people
seem to feel is correct. I'm not sure what the others do but I guess
it's pretty obvious to the people that would be applying the patch.

Havoc


===File /usr/src/redhat/SOURCES/RH-gnome-terminal-escseqs.patch===
--- gnome-libs-1.0.55/zvt/zvtterm.c.escseq	Thu Jan  6 07:27:54 2000
+++ gnome-libs-1.0.55/zvt/zvtterm.c	Mon Feb 21 15:30:26 2000
@@ -2264,8 +2264,8 @@
  */
 
 /* remapping table for function keys 5-20 */
-static unsigned char f5_f20_remap[] =
-   {15,17,18,19,20,21,23,24,25,26,28,29,31,32,33,34};
+static unsigned char f1_f20_remap[] =
+   {11,12,13,14,15,17,18,19,20,21,23,24,25,26,28,29,31,32,33,34};
 
 static gint
 zvt_term_key_press (GtkWidget *widget, GdkEventKey *event)
@@ -2331,13 +2331,6 @@
     }
     break;
   case GDK_Delete:
-    if (event->state & GDK_MOD1_MASK)
-      *p++ = '\033';
-    if (term->swap_del_key)
-      *p++ = 8;
-    else
-      *p++ = '\177';
-    break;
   case GDK_KP_Delete:
     p+=sprintf (p, "\033[3~");
     break;
@@ -2364,27 +2357,29 @@
       p+=sprintf (p, "\033[6~");
     break;
 
-  case GDK_KP_F1:
-  case GDK_F1:
-    p+=sprintf (p, "\033OP");
-    break;
-  case GDK_KP_F2:
-  case GDK_F2:
-    p+=sprintf (p, "\033OQ");
-    break;
-  case GDK_KP_F3:
-  case GDK_F3:
-    p+=sprintf (p, "\033OR");
-    break;
-  case GDK_KP_F4:
-  case GDK_F4:
-    p+=sprintf (p, "\033OS");
+  case GDK_KP_F1:  case GDK_KP_F2:  case GDK_KP_F3:  case GDK_KP_F4:
+    if (event->state & GDK_SHIFT_MASK){
+       p+=sprintf (p, "\033[%d~", f1_f20_remap[10+event->keyval-GDK_KP_F1]);
+    } else
+       p+=sprintf (p, "\033[%d~", f1_f20_remap[event->keyval-GDK_KP_F1]);
+    break;
+
+  case GDK_F1:  case GDK_F2:  case GDK_F3:  case GDK_F4:
+    if (event->state & GDK_SHIFT_MASK){
+       p+=sprintf (p, "\033[%d~", f1_f20_remap[10+event->keyval-GDK_F1]);
+    } else
+       p+=sprintf (p, "\033O%c", 'P' + (event->keyval-GDK_F1));
     break;
+      
   case GDK_F5:  case GDK_F6:  case GDK_F7:  case GDK_F8:
   case GDK_F9:  case GDK_F10:  case GDK_F11:  case GDK_F12:
   case GDK_F13:  case GDK_F14:  case GDK_F15:  case GDK_F16:
   case GDK_F17:  case GDK_F18:  case GDK_F19:  case GDK_F20:
-    p+=sprintf (p, "\033[%d~", f5_f20_remap[event->keyval-GDK_F5]);
+    if ( (event->state & GDK_SHIFT_MASK) &&
+         ((event->keyval-GDK_F1) < 10) ){
+       p+=sprintf (p, "\033[%d~", f1_f20_remap[10+event->keyval-GDK_F1]);
+    } else
+       p+=sprintf (p, "\033[%d~", f1_f20_remap[event->keyval-GDK_F1]);
     break;
 
   case GDK_KP_0:  case GDK_KP_1:  case GDK_KP_2:  case GDK_KP_3:
@@ -2415,6 +2410,20 @@
       p+=sprintf (p, "\033Om");
     } else {
       *p++ = '-';
+    }
+    break;
+  case GDK_KP_Multiply:
+    if (appl_keypad) {
+      p+=sprintf (p, "\033Oj");
+    } else {
+      *p++ = '*';
+    }
+    break;
+  case GDK_KP_Divide:
+    if (appl_keypad) {
+      p+=sprintf (p, "\033Oo");
+    } else {
+      *p++ = '/';
     }
     break;
   case GDK_KP_Separator:  /* aka KP Comma */
============================================================


===File /usr/src/redhat/SOURCES/RH-gnome-libs-echok.patch===
--- gnome-libs-1.0.55/zvt/gnome-pty-helper.c.echok	Thu Feb  3 18:35:38 2000
+++ gnome-libs-1.0.55/zvt/gnome-pty-helper.c	Thu Feb  3 18:36:01 2000
@@ -442,6 +442,7 @@
 #ifdef ECHOKE
 	  | ECHOKE
 #endif
+        | ECHOK
 #ifdef ECHOCTL
 	  | ECHOCTL
 #endif
============================================================


===File /usr/src/redhat/SOURCES/gnome-core-1.0.55-swapbs.patch===
--- gnome-core-1.0.55/gnome-terminal/gnome-terminal.c.swapbs	Tue Feb 29 10:15:29 2000
+++ gnome-core-1.0.55/gnome-terminal/gnome-terminal.c	Tue Feb 29 10:16:11 2000
@@ -482,7 +482,7 @@
 		cfg->color_type = PALETTE_LINUX;
 	cfg->bell      = gnome_config_get_bool ("bell_silenced=0");
 	cfg->blink     = gnome_config_get_bool ("blinking=0");
-	cfg->swap_keys = gnome_config_get_bool ("swap_del_and_backspace=0");
+	cfg->swap_keys = gnome_config_get_bool ("swap_del_and_backspace=1");
 
 	cfg->login_by_default = gnome_config_get_bool ("login_by_default=0");
 
============================================================




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