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

Comparing rxvt-unicode/src/command.C (file contents):
Revision 1.509 by sf-exg, Thu May 17 10:18:32 2012 UTC vs.
Revision 1.511 by sf-exg, Fri May 25 18:45:40 2012 UTC

3451#if BG_IMAGE_FROM_FILE 3451#if BG_IMAGE_FROM_FILE
3452 case Rxvt_Pixmap: 3452 case Rxvt_Pixmap:
3453 if (!strcmp (str, "?")) 3453 if (!strcmp (str, "?"))
3454 { 3454 {
3455 char str[256]; 3455 char str[256];
3456 int h_scale = 0, v_scale = 0;
3457 int h_align = 0, v_align = 0;
3458 if (image_vec.size () > 0)
3459 {
3460 h_scale = image_vec[0].h_scale;
3461 v_scale = image_vec[0].v_scale;
3462 h_align = image_vec[0].h_align;
3463 v_align = image_vec[0].v_align;
3464 }
3456 3465
3457 sprintf (str, "[%dx%d+%d+%d]", 3466 sprintf (str, "[%dx%d+%d+%d]",
3458 min (bg_image.h_scale, 32767), min (bg_image.v_scale, 32767), 3467 h_scale, v_scale,
3459 min (bg_image.h_align, 32767), min (bg_image.v_align, 32767)); 3468 h_align, v_align);
3460 process_xterm_seq (XTerm_title, str, CHAR_ST); 3469 process_xterm_seq (XTerm_title, str, CHAR_ST);
3461 } 3470 }
3462 else 3471 else
3463 { 3472 {
3464 bool changed = false; 3473 bool changed = false;
3465 3474
3466 if (*str != ';') 3475 if (*str != ';')
3467 { 3476 {
3468 if (bg_image.set_file (str)) /* change pixmap */ 3477 if (image_vec.size () > 0)
3478 changed = image_vec[0].set_file_geometry (str);
3479 else
3480 {
3481 rxvt_image *image = new_image ();
3482 if (!image->set_file_geometry (str))
3483 image_vec.pop_back ();
3484 else
3469 changed = true; 3485 changed = true;
3486 }
3470 } 3487 }
3471 else 3488 else
3472 { 3489 {
3473 str++; 3490 str++;
3491 if (image_vec.size () > 0)
3474 if (bg_image.set_geometry (str, true)) 3492 changed = image_vec[0].set_geometry (str, true);
3475 changed = true;
3476 } 3493 }
3477 3494
3478 if (changed) 3495 if (changed)
3479 { 3496 {
3480 if (bg_window_position_sensitive ()) 3497 if (bg_window_position_sensitive ())

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines