Find the answer to your Linux question:
Results 1 to 1 of 1
Enjoy an ad free experience by logging in. Not a member yet? Register.
  1. #1

    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);
    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

    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);
                                            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.

    Mod edit - Passed code through indent -kr and added code tags
    Last edited by Dolda2000; 01-12-2006 at 04:20 PM.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts