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

Comparing rxvt-unicode/src/main.C (file contents):
Revision 1.344 by root, Fri Jan 7 21:17:08 2011 UTC vs.
Revision 1.348 by sf-exg, Thu Jan 20 16:41:23 2011 UTC

956void 956void
957rxvt_term::set_colorfgbg () 957rxvt_term::set_colorfgbg ()
958{ 958{
959 unsigned int i; 959 unsigned int i;
960 const char *xpmb = ""; 960 const char *xpmb = "";
961 char fstr[sizeof ("default") + 1], bstr[sizeof ("default") + 1]; 961 char fstr[] = "default";
962 char bstr[] = "default";
962 963
963 strcpy (fstr, "default");
964 strcpy (bstr, "default");
965 for (i = Color_Black; i <= Color_White; i++) 964 for (i = Color_Black; i <= Color_White; i++)
966 if (pix_colors[Color_fg] == pix_colors[i]) 965 if (pix_colors[Color_fg] == pix_colors[i])
967 { 966 {
968 sprintf (fstr, "%d", (i - Color_Black)); 967 sprintf (fstr, "%d", i - Color_Black);
969 break; 968 break;
970 } 969 }
971 970
972 for (i = Color_Black; i <= Color_White; i++) 971 for (i = Color_Black; i <= Color_White; i++)
973 if (pix_colors[Color_bg] == pix_colors[i]) 972 if (pix_colors[Color_bg] == pix_colors[i])
974 { 973 {
975 sprintf (bstr, "%d", (i - Color_Black)); 974 sprintf (bstr, "%d", i - Color_Black);
976#ifdef BG_IMAGE_FROM_FILE 975#ifdef BG_IMAGE_FROM_FILE
977 xpmb = "default;"; 976 xpmb = "default;";
978#endif 977#endif
979 break; 978 break;
980 } 979 }
1091 } 1090 }
1092 1091
1093 if (fix_screen || old_height == 0) 1092 if (fix_screen || old_height == 0)
1094 scr_reset (); 1093 scr_reset ();
1095 1094
1096#ifdef HAVE_BG_PIXMAP
1097// TODO: this don't seem to have any effect - do we still need it ? If so - in which case exactly ?
1098// if (bgPixmap.pixmap)
1099// scr_touch (false);
1100#endif
1101
1102#ifdef USE_XIM 1095#ifdef USE_XIM
1103 IMSetPosition (); 1096 IMSetPosition ();
1104#endif 1097#endif
1105} 1098}
1106 1099
1354 p = pet[pi]; 1347 p = pet[pi];
1355 1348
1356 if (!p) 1349 if (!p)
1357 continue; 1350 continue;
1358 1351
1359 s = rxvt_splitcommastring (p); 1352 s = rxvt_strsplit (',', p);
1360 1353
1361 for (i = found = 0; !found && s[i]; i++) 1354 for (i = found = 0; !found && s[i]; i++)
1362 { 1355 {
1363 if (!strcmp (s[i], "OverTheSpot")) 1356 if (!strcmp (s[i], "OverTheSpot"))
1364 input_style = XIMPreeditPosition | XIMStatusNothing; 1357 input_style = XIMPreeditPosition | XIMStatusNothing;
1376 input_style = XIMPreeditNothing | XIMStatusNothing; 1369 input_style = XIMPreeditNothing | XIMStatusNothing;
1377 1370
1378 for (j = 0; j < xim_styles->count_styles; j++) 1371 for (j = 0; j < xim_styles->count_styles; j++)
1379 if (input_style == xim_styles->supported_styles[j]) 1372 if (input_style == xim_styles->supported_styles[j])
1380 { 1373 {
1381 rxvt_freecommastring (s); 1374 rxvt_free_strsplit (s);
1382 1375
1383 found = 1; 1376 found = 1;
1384 goto foundpet; 1377 goto foundpet;
1385 } 1378 }
1386 1379
1387 } 1380 }
1388 1381
1389 rxvt_freecommastring (s); 1382 rxvt_free_strsplit (s);
1390 } 1383 }
1391 1384
1392foundpet: 1385foundpet:
1393 1386
1394 XFree (xim_styles); 1387 XFree (xim_styles);
1550 p = rs[Rs_inputMethod]; 1543 p = rs[Rs_inputMethod];
1551 if (p && *p) 1544 if (p && *p)
1552 { 1545 {
1553 bool found = false; 1546 bool found = false;
1554 1547
1555 s = rxvt_splitcommastring (p); 1548 s = rxvt_strsplit (',', p);
1556 1549
1557 for (i = 0; s[i]; i++) 1550 for (i = 0; s[i]; i++)
1558 { 1551 {
1559 if (*s[i]) 1552 if (*s[i])
1560 { 1553 {
1566 break; 1559 break;
1567 } 1560 }
1568 } 1561 }
1569 } 1562 }
1570 1563
1571 rxvt_freecommastring (s); 1564 rxvt_free_strsplit (s);
1572 1565
1573 if (found) 1566 if (found)
1574 goto done; 1567 goto done;
1575 } 1568 }
1576 1569

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines