Need help with programming of a new function

Discussion on LXDE releases and Development. This forum is not the best way to contact the developers, please use the Development mailing list and Sourceforge to interact with them.
Posts: 1
Joined: Mon Jul 25, 2016 11:52 pm

Need help with programming of a new function

Post by Nightfighter »

I want to add new option to LXPanel, called "Show square brackets around the names of minimized windows". Originally, these names always have square brackets (0.png and 1.png), and it can't be disabled. I want to fix it.
Because I'm even not a programmer, I'm asking for help.
After many attempts, I added new "if" statement to file launchtaskbar.c.

Code: Select all

    /* Set the name into the task context, and also on the tooltip. */
    if (name != NULL)
        tk->name = name;
        if (tb->show_square_brackets)
        {   tk->name_iconified = g_strdup_printf("[%s]", name);
        else tk->name_iconified = name;

        /* Redraw the button. */
        task_button_redraw(tk, tk->tb);
LXPanel compiled after it and started to work. After toggling new option square brackets has gone (2.png), but new problem has appeared: after closing a window LXPanel re-draws itself and crashes after some time (3.png). Please, help with it.
I can enclose full launchtaskbar.c files if you want.
Opened window
(106.09 KiB) Not downloaded yet
Minimized window with brackets
(301.06 KiB) Not downloaded yet
Minimized window without brackets
(300.75 KiB) Not downloaded yet
Opened window after LXPanel crash
(95.18 KiB) Not downloaded yet