*** empty log message ***
authorpcg <pcg>
Sun, 22 Feb 2004 10:37:53 +0000 (10:37 +0000)
committerpcg <pcg>
Sun, 22 Feb 2004 10:37:53 +0000 (10:37 +0000)
Changes
doc/rxvt.1
doc/rxvt.tbl
src/command.C
src/init.C
src/main.C
src/rxvt.h
src/screen.C

diff --git a/Changes b/Changes
index 7d18cb57985b36dc3b5607c09fd9870797ef25bf..bafc4c010434f0e78b652bb254e076713e14cc8e 100644 (file)
--- a/Changes
+++ b/Changes
           keysyms that also have string translations, when not --enable-xim.
           reported by joel reed.
         - countless minor bugfixes.
+        - re-enabled esc-seq. for font-switching (\033 ] 50 ; <fontset> \007).
+        - fix bug in locale-handling that kept the correct locale from
+          being selected.
+        - implemented esc-seq. to switch locales (\033 ] 9 ; <locale> \007).
         - removed greek support.
 
 1.8  Mon Feb  2 20:09:18 CET 2004
index e74499901efe990c46b2a6b51cb29c77d9768d72..80c33b910327ad04084791a55749a9805efb6ed4 100644 (file)
@@ -84,11 +84,6 @@ unicode characters\&. The first font defines the cell size for characters,
 pther fonts might be smaller, but not larger\&. A reasonable default list
 is appended\&.
 resource \fBfont\fP\&.
-.IP "\fB-grk\fP \fImode\fP" 
-Compile \fIGreek\fP: Greek keyboard translation;
-\fBiso\fP: ISO-8859 mapping\&.
-\fBibm\fP: IBM-437 mapping;
-resource \fBgreek_keyboard\fP\&.
 .IP "\fB-name\fP \fIname\fP" 
 Specify the application name under which resources
 are to be obtained, rather than the default executable file name\&.
@@ -293,15 +288,6 @@ unicode characters\&. The first font defines the cell size for characters,
 pther fonts might be smaller, but not larger\&. A reasonable default list
 is appended\&.
 option \fB-fn\fP\&.
-.IP "\fBgreek_keyboard:\fP \fImode\fP" 
-Set the Greek keyboard translation mode to be used;
-\fBiso\fP: ISO-8859 mapping (elot-928) [default]\&.
-\fBibm\fP: IBM-437 mapping (DOS codepage 737);
-option \fB-grk\fP\&.
-.IP "\fBgreektoggle_key:\fP \fIkeysym\fP" 
-Set the key to toggle keyboard input between no translation and
-Greek translation  [default \fBMode_switch\fP]\&.
-For more details, see the distributed file \fBREADME\&.greek\fP\&.
 .IP "\fBselectstyle:\fP \fImode\fP" 
 Set mouse selection style to \fBold\fP which is 2\&.20, \fBoldword\fP which
 is xterm style with 2\&.20 old word selection, or anything else which
@@ -520,10 +506,6 @@ seen via the \fIwho(1)\fP command, and can accept messages\&.  To allow this
 feature, \fBrxvt\fP must be installed setuid root on some systems\&.
 .SH "COLORS AND GRAPHICS" 
 .PP 
-If graphics support was enabled at compile-time, \fBrxvt\fP can be queried
-with ANSI escape sequences and can address individual pixels instead of
-text characters\&.  Note the graphics support is still considered beta code\&.
-.PP 
 In addition to the default foreground and background colours, \fBrxvt\fP
 can display up to 16 colours (8 ANSI colours plus high-intensity bold/blink
 versions of the same)\&.
@@ -1076,7 +1058,7 @@ University of Kent, 1992, wrote the original Xvt\&.
 .IP "Rob Nation <nation@rocket\&.sanders\&.lockheed\&.com>" 
 very heavily modified Xvt and came up with Rxvt
 .IP "Angelo Haritsis <ah@doc\&.ic\&.ac\&.uk>" 
-wrote the Greek Keyboard Input
+wrote the Greek Keyboard Input (no longer in code)
 .IP "mj olesen <olesen@me\&.QueensU\&.CA>" 
 Wrote the menu system\&. 
 .br 
@@ -1084,6 +1066,11 @@ Project Coordinator (changes\&.txt 2\&.11 to 2\&.21)
 .IP "Oezguer Kesim <kesim@math\&.fu-berlin\&.de>" 
 Project Coordinator (changes\&.txt 2\&.21a to 2\&.4\&.5)
 .IP "Geoff Wing <gcw@pobox\&.com>" 
-Rewrote screen display and text selection routines\&. 
+Rewrote screen display and text selection routines\&.
+Project Coordinator (changes\&.txt 2\&.4\&.6 - rxvt-unicode)
+.IP "Marc Alexander Lehman <rxvt@schmorp\&.de>" 
+Rewrote most of the display code and internal character handling
+to store text in unicode\&. Numerous other fixes and extensions\&. 
 .br 
-Project Coordinator (changes\&.txt 2\&.4\&.6 - )
+Project Coordinator (Changes 1\&.0 - )
+.PP 
index 372d01e2aeaeea84996a3d20c41d76e6b2408b27..763b684ff64d8ac589639b3a0876196663ced074 100644 (file)
@@ -81,11 +81,6 @@ unicode characters\&. The first font defines the cell size for characters,
 pther fonts might be smaller, but not larger\&. A reasonable default list
 is appended\&.
 resource \fBfont\fP\&.
-.IP "\fB-grk\fP \fImode\fP" 
-Compile \fIGreek\fP: Greek keyboard translation;
-\fBiso\fP: ISO-8859 mapping\&.
-\fBibm\fP: IBM-437 mapping;
-resource \fBgreek_keyboard\fP\&.
 .IP "\fB-name\fP \fIname\fP" 
 Specify the application name under which resources
 are to be obtained, rather than the default executable file name\&.
@@ -290,15 +285,6 @@ unicode characters\&. The first font defines the cell size for characters,
 pther fonts might be smaller, but not larger\&. A reasonable default list
 is appended\&.
 option \fB-fn\fP\&.
-.IP "\fBgreek_keyboard:\fP \fImode\fP" 
-Set the Greek keyboard translation mode to be used;
-\fBiso\fP: ISO-8859 mapping (elot-928) [default]\&.
-\fBibm\fP: IBM-437 mapping (DOS codepage 737);
-option \fB-grk\fP\&.
-.IP "\fBgreektoggle_key:\fP \fIkeysym\fP" 
-Set the key to toggle keyboard input between no translation and
-Greek translation  [default \fBMode_switch\fP]\&.
-For more details, see the distributed file \fBREADME\&.greek\fP\&.
 .IP "\fBselectstyle:\fP \fImode\fP" 
 Set mouse selection style to \fBold\fP which is 2\&.20, \fBoldword\fP which
 is xterm style with 2\&.20 old word selection, or anything else which
@@ -517,10 +503,6 @@ seen via the \fIwho(1)\fP command, and can accept messages\&.  To allow this
 feature, \fBrxvt\fP must be installed setuid root on some systems\&.
 .SH "COLORS AND GRAPHICS" 
 .PP 
-If graphics support was enabled at compile-time, \fBrxvt\fP can be queried
-with ANSI escape sequences and can address individual pixels instead of
-text characters\&.  Note the graphics support is still considered beta code\&.
-.PP 
 In addition to the default foreground and background colours, \fBrxvt\fP
 can display up to 16 colours (8 ANSI colours plus high-intensity bold/blink
 versions of the same)\&.
@@ -626,7 +608,7 @@ University of Kent, 1992, wrote the original Xvt\&.
 .IP "Rob Nation <nation@rocket\&.sanders\&.lockheed\&.com>" 
 very heavily modified Xvt and came up with Rxvt
 .IP "Angelo Haritsis <ah@doc\&.ic\&.ac\&.uk>" 
-wrote the Greek Keyboard Input
+wrote the Greek Keyboard Input (no longer in code)
 .IP "mj olesen <olesen@me\&.QueensU\&.CA>" 
 Wrote the menu system\&. 
 .br 
@@ -634,6 +616,11 @@ Project Coordinator (changes\&.txt 2\&.11 to 2\&.21)
 .IP "Oezguer Kesim <kesim@math\&.fu-berlin\&.de>" 
 Project Coordinator (changes\&.txt 2\&.21a to 2\&.4\&.5)
 .IP "Geoff Wing <gcw@pobox\&.com>" 
-Rewrote screen display and text selection routines\&. 
+Rewrote screen display and text selection routines\&.
+Project Coordinator (changes\&.txt 2\&.4\&.6 - rxvt-unicode)
+.IP "Marc Alexander Lehman <rxvt@schmorp\&.de>" 
+Rewrote most of the display code and internal character handling
+to store text in unicode\&. Numerous other fixes and extensions\&. 
 .br 
-Project Coordinator (changes\&.txt 2\&.4\&.6 - )
+Project Coordinator (Changes 1\&.0 - )
+.PP 
index 4e0f9ff1826f6f6e8d5f49240b0361d65edac780..2adbcfc399f97d4fb83504dc8bddeee0b4b54ec5 100644 (file)
@@ -3077,7 +3077,8 @@ rxvt_term::xterm_seq (int op, const char *str, unsigned char resp __attribute__
         change_font (str);
         break;
       case XTerm_locale:
-        /* TODO */
+        set_locale (str);
+        im_cb ();
         break;
 #if 0
       case XTerm_dumpscreen:   /* no error notices */
index 914a357b0e6726f2a05dfd11eefc68d57118bbdb..65b7228b982e49a7aa9b244cb8b3f29102e17652 100644 (file)
@@ -798,7 +798,7 @@ rxvt_term::set_locale (const char *locale)
 {
 #if HAVE_XSETLOCALE || HAVE_SETLOCALE
   free (this->locale);
-  this->locale = rxvt_strdup (setlocale (LC_CTYPE, ""));
+  this->locale = rxvt_strdup (setlocale (LC_CTYPE, locale));
   SET_LOCALE (this->locale);
   mbstate.reset ();
 #endif
index 19ac20ee9149a22cdd71fbf9a8fe39f76e7506fa..e36e077a26241ebab19bed109e33257cbcad5d7b 100644 (file)
@@ -742,6 +742,13 @@ rxvt_term::change_font (const char *fontname)
 
           // TODO: screen needs to be told about new fonts
           
+          if (TermWin.parent[0])
+            {
+              resize_all_windows (0, 0, 0);
+              scr_remap_chars ();
+              scr_touch (true);
+            }   
+
           return true;
         }
     }
index fd797327c374919bd10e63b42f21797991d9b866..da8440f146c7765e192b0241bec0c39e9c2e7551 100644 (file)
@@ -271,11 +271,13 @@ struct mouse_event {
   *           +---< SB_WIDTH_NEXT
   */
 
-#define NO_REFRESH              0       /* Window not visible at all!        */
-#define FAST_REFRESH            (1<<0)  /* Fully exposed window              */
-#define SLOW_REFRESH            (1<<1)  /* Partially exposed window          */
-#define SMOOTH_REFRESH          (1<<2)  /* Do sync'ing to make it smooth     */
-#define REFRESH_BOUNDS          (1<<3)
+enum {
+  NO_REFRESH       = 0   ,  /* Window not visible at all!        */
+  FAST_REFRESH     = 1<<0,  /* Fully exposed window              */
+  SLOW_REFRESH     = 1<<1,  /* Partially exposed window          */
+  SMOOTH_REFRESH   = 1<<2,  /* Do sync'ing to make it smooth     */
+  REFRESH_BOUNDS   = 1<<3
+};
 
 #ifdef NO_SECONDARY_SCREEN
 # define NSCREENS               0
@@ -293,14 +295,18 @@ struct mouse_event {
 #define FONT_UP                 "#+"
 
 /* flags for rxvt_scr_gotorc () */
-#define C_RELATIVE              1       /* col movement is relative */
-#define R_RELATIVE              2       /* row movement is relative */
-#define RELATIVE                (R_RELATIVE|C_RELATIVE)
+enum {
+  C_RELATIVE = 1    ,       /* col movement is relative */
+  R_RELATIVE =     2,       /* row movement is relative */
+  RELATIVE   = 1 | 2
+};
 
 /* modes for rxvt_scr_insdel_chars (), rxvt_scr_insdel_lines () */
-#define INSERT                  -1      /* don't change these values */
-#define DELETE                  +1
-#define ERASE                   +2
+enum {
+  INSERT = -1,                         /* don't change these values */
+  DELETE = +1,
+  ERASE  = +2
+};
 
 /* modes for rxvt_scr_page () - scroll page. used by scrollbar window */
 enum page_dirn {
@@ -1150,6 +1156,8 @@ struct rxvt_term : rxvt_vars {
   void scr_erase_screen (int mode);
   void scr_touch (bool refresh);
   void scr_expose (int x, int y, int width, int height, bool refresh);
+  void scr_remap_chars ();
+  void scr_remap_chars (text_t *tp, rend_t *rp);
 
   /* autoconvert */
 
@@ -1162,7 +1170,7 @@ struct rxvt_term : rxvt_vars {
   void button_release (const XButtonEvent &ev);
   int check_our_parents ();
 #ifdef PRINTPIPE
-  FILE * popen_printer ();
+  FILE *popen_printer ();
   int pclose_printer (FILE *stream);
 #endif
   void process_print_pipe ();
index 8b4763a92d92f0cd68a9694abe9fd15c97bcbfa9..7baf4fbb3c226d3e3c76c3a5cdfadf7f9aa55a2e 100644 (file)
@@ -2262,6 +2262,29 @@ rxvt_term::scr_refresh (unsigned char refresh_type)
   want_refresh = 0;        /* screen is current */
 }
 
+void
+rxvt_term::scr_remap_chars (text_t *tp, rend_t *rp)
+{
+  if (!rp || !tp)
+    return;
+
+  for (int i = TermWin.ncol; i; i--, rp++, tp++)
+    *rp = SET_FONT (*rp, TermWin.fontset->find_font (*tp));
+}
+
+void
+rxvt_term::scr_remap_chars ()
+{
+  for (int i = TermWin.nrow + TermWin.saveLines; i--; )
+    scr_remap_chars (screen.text[i], screen.rend[i]);
+
+  for (int i = TermWin.nrow; i--; )
+    {
+      scr_remap_chars (drawn_text[i], drawn_rend[i]);
+      scr_remap_chars (swap.text[i], swap.rend[i]);
+    }
+}
+
 /* ------------------------------------------------------------------------- */
 void
 rxvt_term::scr_clear ()