LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-11-2006, 06:31 PM   #1
3saul
Member
 
Registered: Aug 2004
Location: Brisbane, Australia
Distribution: Ubuntu/Fedora
Posts: 86

Rep: Reputation: 15
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
start_y)
{
switch (container->details->layout_mode)
{
case NAUTILUS_ICON_LAYOUT_L_R_T_B:
lay_down_icons_horizontal (container, icons, start_y);
break;

case NAUTILUS_ICON_LAYOUT_T_B_L_R:
case NAUTILUS_ICON_LAYOUT_T_B_R_L:
/* FIXME bugzilla.gnome.org 42479:
* Need to handle T_B_R_L differently. */
lay_down_icons_tblr (container, icons);
break;

default:
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)
continue;

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.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
nautilus: right-hand-side icons--how? jonaskoelker Linux - Software 2 03-16-2005 06:10 AM
Nautilus Icons Don't Work linmith Linux - Software 1 02-11-2005 12:05 PM
No Icons in Nautilus GoldenPenguin Linux - Software 0 01-20-2005 08:16 AM
nautilus icons on fluxbox elbriga Linux - Software 2 11-22-2004 06:54 PM
Nautilus Icons in Sarge still not fixed ? tvn Debian 0 08-21-2004 04:32 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 09:48 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration