You are not logged in.
Pages: 1
I have a vertical panel and I don't like how the buttons in the task list expand to fill its entire height. There doesn't seem to be an option to change that. Unchecking "use all available space" accomplishes what I want, but forces the list to be only half the panel's height.
I poked through the code and the button sizing logic seems to be buried inside tasklist.c in libwnck. Problem is I can't seem to make any changes to it. I can clearly see the references in the headers and makefile and follow the function calls between the two source files, but it just seems to be pulling the library out of thin air. Even when I delete /usr/local/lib/libwnck-1.a, /usr/local/lib/libwnck-1.la, and /usr/local/lib/libwnck-1.so, all of xfce4-panel compiles (after make clean) and runs as if nothing happened.
So what do I need to change/recompile/what to get a modified libwnck to actually be used in xfce4-panel?
Offline
Well, I found it. Even though "make install" installs to /usr/local/lib, the files actually have to be copied to /usr/lib. :roll:
So I made this patch for libwnck's tasklist.c to make the taskbar buttons fixed 20px tall:
1634,1635c1634,1637
< child_allocation.x = total_width*col / n_cols;
< child_allocation.y = allocation->height*row / n_rows;
---
> int button_height = 20;
> child_allocation.x = total_width*col / n_cols;
> //child_allocation.y = allocation->height*row / n_rows;
> child_allocation.y = button_height*row;
1637c1639
< child_allocation.height = allocation->height*(row + 1) / n_rows - child_allocation.y;
---
> child_allocation.height = button_height; //allocation->height*(row + 1) / n_rows - child_allocation.y;
Then I decided to tidy that up:
206a207,208
> gint fixed_button_width;
> gint fixed_button_height;
695a698,699
> tasklist->priv->fixed_button_width = 0;
> tasklist->priv->fixed_button_height = 0;
1633,1637c1637,1656
<
< child_allocation.x = total_width*col / n_cols;
< child_allocation.y = allocation->height*row / n_rows;
< child_allocation.width = total_width*(col + 1) / n_cols - child_allocation.x;
< child_allocation.height = allocation->height*(row + 1) / n_rows - child_allocation.y;
---
>
> int btnheight = tasklist->priv->fixed_button_height;
> int btnwidth = tasklist->priv->fixed_button_width;
>
> if(btnheight < 1)
> {
> btnheight =allocation->height * (row + 1) / n_rows - child_allocation.y;
> child_allocation.x = total_width*col / n_cols;
> }
> else child_allocation.x = btnwidth * col;
>
> if(btnwidth < 1)
> {
> btnwidth = total_width * (col + 1) / n_cols - child_allocation.x;
> child_allocation.y = allocation->height*row / n_rows;
> }
> else child_allocation.y = btnheight * row;
>
> child_allocation.width = btnwidth;
> child_allocation.height = btnheight;
Once that worked it'd be a simple matter of adding functions to set fixed_button_width and fixed_button_height, and adding a preference in Xfce's task list to set them. But of course nothing is ever that simple. Adding those elements to the struct completely breaks the task list and much of the functionality of the panel itself, even after recompiling. So I don't know what to do about that.
I'd like to try adding the Windows 7 button-doubles-as-progress-bar functionality, but I don't know how feasible that is without being able to modify the structs at all...
Offline
I think you'll have more chance with this kind of question by asking on the mailing list:
http://www.xfce.org/community/lists
Offline
Pages: 1
[ Generated in 0.009 seconds, 11 queries executed - Memory usage: 528.99 KiB (Peak: 530.27 KiB) ]