~ubuntu-branches/ubuntu/maverick/vim/maverick

« back to all changes in this revision

Viewing changes to src/gui_x11.c

  • Committer: Bazaar Package Importer
  • Author(s): Steve Langasek
  • Date: 2009-05-04 11:13:42 UTC
  • mfrom: (1.1.8 upstream) (0.1.2 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090504111342-60miqybsixdpc345
Tags: 2:7.2.148-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - debian/runtime/vimrc: "syntax on" is a sane default for non-tiny vim.
  - runtime/syntax/debcontrol.vim:
    + Add "metapackages" to the list of valid sections.
  - runtime/syntax/grub.vim:
    + Add Ubuntu-specific 'quiet' keyword.
  - Drop vim-lesstif package and lesstif2-dev build-dependency.
  - Enable Python interpreter on basic builds.
  - Disable autoindent, line-wrapping, and backup files by default.
* Dropped changes, merged in Debian:
  - Add jaunty, karmic to the list of valid suites.
  - runtime/syntax/debsources.vim:
    + Add "jaunty" to debsourcesDistrKeyword
  - Create a .pot file for translations.
* Drop gutsy from the list of valid distro series, it's been EOLed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1587
1587
    XtCloseDisplay(gui.dpy);
1588
1588
    gui.dpy = NULL;
1589
1589
    vimShell = (Widget)0;
 
1590
    vim_free(gui_argv);
 
1591
    gui_argv = NULL;
1590
1592
}
1591
1593
 
1592
1594
/*
1761
1763
     * says that this isn't needed when exiting, so just skip it. */
1762
1764
    XtCloseDisplay(gui.dpy);
1763
1765
#endif
 
1766
    vim_free(gui_argv);
 
1767
    gui_argv = NULL;
1764
1768
}
1765
1769
 
1766
1770
/*
3439
3443
    char_u          *signfile;
3440
3444
{
3441
3445
    XpmAttributes   attrs;
3442
 
    XImage          *sign;
 
3446
    XImage          *sign = NULL;
3443
3447
    int             status;
3444
3448
 
3445
3449
    /*
3446
3450
     * Setup the color substitution table.
3447
3451
     */
3448
 
    sign = NULL;
3449
3452
    if (signfile[0] != NUL && signfile[0] != '-')
3450
3453
    {
3451
 
        sign = (XImage *)alloc(sizeof(XImage));
3452
 
        if (sign != NULL)
 
3454
        XpmColorSymbol color[5] =
3453
3455
        {
3454
 
            XpmColorSymbol color[5] =
3455
 
            {
3456
 
                {"none", NULL, 0},
3457
 
                {"iconColor1", NULL, 0},
3458
 
                {"bottomShadowColor", NULL, 0},
3459
 
                {"topShadowColor", NULL, 0},
3460
 
                {"selectColor", NULL, 0}
3461
 
            };
3462
 
            attrs.valuemask = XpmColorSymbols;
3463
 
            attrs.numsymbols = 2;
3464
 
            attrs.colorsymbols = color;
3465
 
            attrs.colorsymbols[0].pixel = gui.back_pixel;
3466
 
            attrs.colorsymbols[1].pixel = gui.norm_pixel;
3467
 
            status = XpmReadFileToImage(gui.dpy, (char *)signfile,
 
3456
            {"none", NULL, 0},
 
3457
            {"iconColor1", NULL, 0},
 
3458
            {"bottomShadowColor", NULL, 0},
 
3459
            {"topShadowColor", NULL, 0},
 
3460
            {"selectColor", NULL, 0}
 
3461
        };
 
3462
        attrs.valuemask = XpmColorSymbols;
 
3463
        attrs.numsymbols = 2;
 
3464
        attrs.colorsymbols = color;
 
3465
        attrs.colorsymbols[0].pixel = gui.back_pixel;
 
3466
        attrs.colorsymbols[1].pixel = gui.norm_pixel;
 
3467
        status = XpmReadFileToImage(gui.dpy, (char *)signfile,
3468
3468
                                                         &sign, NULL, &attrs);
3469
 
 
3470
 
            if (status == 0)
3471
 
            {
3472
 
                /* Sign width is fixed at two columns now.
3473
 
                if (sign->width > gui.sign_width)
3474
 
                    gui.sign_width = sign->width + 8; */
3475
 
            }
3476
 
            else
3477
 
            {
3478
 
                vim_free(sign);
3479
 
                sign = NULL;
3480
 
                EMSG(_(e_signdata));
3481
 
            }
 
3469
        if (status == 0)
 
3470
        {
 
3471
            /* Sign width is fixed at two columns now.
 
3472
            if (sign->width > gui.sign_width)
 
3473
                gui.sign_width = sign->width + 8; */
3482
3474
        }
 
3475
        else
 
3476
            EMSG(_(e_signdata));
3483
3477
    }
3484
3478
 
3485
3479
    return (void *)sign;
3489
3483
gui_mch_destroy_sign(sign)
3490
3484
    void *sign;
3491
3485
{
3492
 
    XFree(((XImage *)sign)->data);
3493
 
    vim_free(sign);
 
3486
    XDestroyImage((XImage*)sign);
3494
3487
}
3495
3488
#endif
3496
3489