Page 1 of 1

Need help with programming of a new function

Posted: Tue Jul 26, 2016 12:33 am
by Nightfighter
Hello!
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)
    {
        task_free_names(tk);
        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.