-   Programming (
-   -   Nautilus desktop icons, righ to left (

3saul 01-11-2006 07:31 PM

Nautilus desktop icons, righ to left
I'm wanting to change the lay down code for the desktop only so that icons on the nautilus desktop are layed down right to left instead of left to right (or rather top to bottom right to left). Just like on the Mac. I don't want other nautilus windows to be affected (ie stay the same left to right). I found this code in nautilus-icon-container.c

static void
lay_down_icons (NautilusIconContainer *container, GList *icons, double
switch (container->details->layout_mode)
lay_down_icons_horizontal (container, icons, start_y);

/* FIXME 42479:
* Need to handle T_B_R_L differently. */
lay_down_icons_tblr (container, icons);

g_assert_not_reached ();

But it appears that this would change not only the desktop but other nautilus window icon layouts. I then found the following in fm-desktop-icon-view.c

[I]static void
icon_container_set_workarea (NautilusIconContainer *icon_container,
GdkScreen *screen,
long *workareas,
int n_items)
int left, right, top, bottom;
int screen_width, screen_height;
int i;

left = right = top = bottom = 0;

screen_width = gdk_screen_get_width (screen);
screen_height = gdk_screen_get_height (screen);

for (i = 0; i < n_items; i += 4) {
int x = workareas ;
int y = workareas [i + 1];
int width = workareas [i + 2];
int height = workareas [i + 3];

if ((x + width) > screen_width || (y + height) > screen_height)

left = MAX (left, x);
right = MAX (right, screen_width - width - x);
top = MAX (top, y);
bottom = MAX (bottom, screen_height - height - y);

nautilus_icon_container_set_margins (icon_container,
left, right, top, bottom);

I'm new to programming so if anybody could give me any pointers as to whether or not this is achievable that would be great. I've posted to the Nautilus mailing list and also searched it but got nothing.

Thanks in advance.

All times are GMT -5. The time now is 08:12 AM.