comparison src/gui.c @ 857:b933657f7c9d

updated for version 7.0g01
author vimboss
date Tue, 02 May 2006 22:08:30 +0000
parents 8cd729851562
children 99305c4c42d4
comparison
equal deleted inserted replaced
856:8cd729851562 857:b933657f7c9d
3421 { 3421 {
3422 int modified = FALSE; 3422 int modified = FALSE;
3423 char_u buf[40]; 3423 char_u buf[40];
3424 int wincount; 3424 int wincount;
3425 win_T *wp; 3425 win_T *wp;
3426 char_u *opt; 3426 char_u **opt;
3427 3427
3428 /* Use 'guitablabel' or 'guitabtooltip' if it's set. */ 3428 /* Use 'guitablabel' or 'guitabtooltip' if it's set. */
3429 opt = (tooltip ? p_gtt : p_gtl); 3429 opt = (tooltip ? &p_gtt : &p_gtl);
3430 if (*opt != NUL) 3430 if (**opt != NUL)
3431 { 3431 {
3432 int use_sandbox = FALSE; 3432 int use_sandbox = FALSE;
3433 int save_called_emsg = called_emsg; 3433 int save_called_emsg = called_emsg;
3434 char_u res[MAXPATHL]; 3434 char_u res[MAXPATHL];
3435 tabpage_T *save_curtab; 3435 tabpage_T *save_curtab;
3454 lastwin = curtab->tp_lastwin; 3454 lastwin = curtab->tp_lastwin;
3455 curwin = curtab->tp_curwin; 3455 curwin = curtab->tp_curwin;
3456 curbuf = curwin->w_buffer; 3456 curbuf = curwin->w_buffer;
3457 3457
3458 /* Can't use NameBuff directly, build_stl_str_hl() uses it. */ 3458 /* Can't use NameBuff directly, build_stl_str_hl() uses it. */
3459 build_stl_str_hl(curwin, res, MAXPATHL, opt, use_sandbox, 3459 build_stl_str_hl(curwin, res, MAXPATHL, *opt, use_sandbox,
3460 0, (int)Columns, NULL, NULL); 3460 0, (int)Columns, NULL, NULL);
3461 STRCPY(NameBuff, res); 3461 STRCPY(NameBuff, res);
3462 3462
3463 /* Back to the original curtab. */ 3463 /* Back to the original curtab. */
3464 curtab = save_curtab; 3464 curtab = save_curtab;
3471 if (called_emsg) 3471 if (called_emsg)
3472 set_string_option_direct(opt_name, -1, 3472 set_string_option_direct(opt_name, -1,
3473 (char_u *)"", OPT_FREE, SID_ERROR); 3473 (char_u *)"", OPT_FREE, SID_ERROR);
3474 called_emsg |= save_called_emsg; 3474 called_emsg |= save_called_emsg;
3475 } 3475 }
3476 else 3476
3477 /* If 'guitablabel'/'guitabtooltip' is not set or the result is empty then
3478 * use a default label. */
3479 if (**opt == NUL || *NameBuff == NUL)
3477 { 3480 {
3478 /* Get the buffer name into NameBuff[] and shorten it. */ 3481 /* Get the buffer name into NameBuff[] and shorten it. */
3479 get_trans_bufname(tp == curtab ? curbuf : tp->tp_curwin->w_buffer); 3482 get_trans_bufname(tp == curtab ? curbuf : tp->tp_curwin->w_buffer);
3480 if (!tooltip) 3483 if (!tooltip)
3481 shorten_dir(NameBuff); 3484 shorten_dir(NameBuff);