ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/rxvt-unicode/src/init.C
(Generate patch)

Comparing rxvt-unicode/src/init.C (file contents):
Revision 1.28 by pcg, Sat Feb 21 20:33:40 2004 UTC vs.
Revision 1.33 by pcg, Sun Feb 22 10:37:54 2004 UTC

9 * - extensive modifications 9 * - extensive modifications
10 * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com> 10 * Copyright (c) 1998-2001 Geoff Wing <gcw@pobox.com>
11 * - extensive modifications 11 * - extensive modifications
12 * Copyright (c) 1999 D J Hawkey Jr <hawkeyd@visi.com> 12 * Copyright (c) 1999 D J Hawkey Jr <hawkeyd@visi.com>
13 * - QNX support 13 * - QNX support
14 * Copyright (c) 2003-2004 Marc Lehmann <pcg@goof.com>
14 * 15 *
15 * This program is free software; you can redistribute it and/or modify 16 * This program is free software; you can redistribute it and/or modify
16 * it under the terms of the GNU General Public License as published by 17 * it under the terms of the GNU General Public License as published by
17 * the Free Software Foundation; either version 2 of the License, or 18 * the Free Software Foundation; either version 2 of the License, or
18 * (at your option) any later version. 19 * (at your option) any later version.
398#if defined (HOTKEY_CTRL) || defined (HOTKEY_META) 399#if defined (HOTKEY_CTRL) || defined (HOTKEY_META)
399 ks_bigfont = XK_greater; 400 ks_bigfont = XK_greater;
400 ks_smallfont = XK_less; 401 ks_smallfont = XK_less;
401#endif 402#endif
402 403
403#ifdef GREEK_SUPPORT
404 ks_greekmodeswith = GREEK_KEYBOARD_MODESWITCH;
405#endif
406
407 refresh_limit = 1; 404 refresh_limit = 1;
408 refresh_type = SLOW_REFRESH; 405 refresh_type = SLOW_REFRESH;
409 prev_nrow = prev_ncol = 0; 406 prev_nrow = prev_ncol = 0;
410#ifdef MULTICHAR_SET 407#ifdef MULTICHAR_SET
411# ifdef MULTICHAR_ENCODING 408# ifdef MULTICHAR_ENCODING
666 663
667#ifdef HAVE_SCROLLBARS 664#ifdef HAVE_SCROLLBARS
668 setup_scrollbar (rs[Rs_scrollBar_align], rs[Rs_scrollstyle], 665 setup_scrollbar (rs[Rs_scrollBar_align], rs[Rs_scrollstyle],
669 rs[Rs_scrollBar_thickness]); 666 rs[Rs_scrollBar_thickness]);
670#endif 667#endif
671
672 TermWin.fontset = new rxvt_fontset (this);
673 TermWin.fontset->populate (rs[Rs_font]);
674 TermWin.fwidth = TermWin.fontset->base_font ()->width;
675 TermWin.fheight = TermWin.fontset->base_font ()->height;
676 TermWin.fbase = TermWin.fontset->base_font ()->ascent;
677 668
678#ifdef XTERM_REVERSE_VIDEO 669#ifdef XTERM_REVERSE_VIDEO
679 /* this is how xterm implements reverseVideo */ 670 /* this is how xterm implements reverseVideo */
680 if (Options & Opt_reverseVideo) 671 if (Options & Opt_reverseVideo)
681 { 672 {
805void 796void
806rxvt_term::set_locale (const char *locale) 797rxvt_term::set_locale (const char *locale)
807{ 798{
808#if HAVE_XSETLOCALE || HAVE_SETLOCALE 799#if HAVE_XSETLOCALE || HAVE_SETLOCALE
809 free (this->locale); 800 free (this->locale);
810 this->locale = rxvt_strdup (setlocale (LC_CTYPE, "")); 801 this->locale = rxvt_strdup (setlocale (LC_CTYPE, locale));
811 rxvt_set_locale (this->locale); 802 SET_LOCALE (this->locale);
812 mbstate.reset (); 803 mbstate.reset ();
813#endif 804#endif
814#if HAVE_NL_LANGINFO 805#if HAVE_NL_LANGINFO
815 free (codeset); 806 free (codeset);
816 codeset = strdup (nl_langinfo (CODESET)); 807 codeset = strdup (nl_langinfo (CODESET));
899 if (menubar_visible ()) 890 if (menubar_visible ())
900 { 891 {
901 PrivateModes |= PrivMode_menuBar; 892 PrivateModes |= PrivMode_menuBar;
902 SavedModes |= PrivMode_menuBar; 893 SavedModes |= PrivMode_menuBar;
903 } 894 }
904
905#ifdef GREEK_SUPPORT
906 greek_init ();
907#endif
908 895
909#ifdef CURSOR_BLINK 896#ifdef CURSOR_BLINK
910 if (Options & Opt_cursorBlink) 897 if (Options & Opt_cursorBlink)
911 (void)gettimeofday (&lastcursorchange, NULL); 898 (void)gettimeofday (&lastcursorchange, NULL);
912#endif 899#endif
1144 } 1131 }
1145 1132
1146 /* grab colors before netscape does */ 1133 /* grab colors before netscape does */
1147 Get_Colours (); 1134 Get_Colours ();
1148 1135
1149 change_font (1, NULL); 1136 if (!change_font (rs[Rs_font]))
1137 {
1138 fprintf (stderr, "unable to load a base font, please provide one using -fn fontname\n");
1139 destroy ();
1140 return;
1141 }
1142
1150 window_calc (0, 0); 1143 window_calc (0, 0);
1151 old_width = szHint.width; 1144 old_width = szHint.width;
1152 old_height = szHint.height; 1145 old_height = szHint.height;
1153 1146
1154 /* parent window - reverse video so we can see placement errors 1147 /* parent window - reverse video so we can see placement errors

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines