Idea: adopt ROX-Filer

A home for all kinds of Puppy related projects
Message
Author
User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#16 Post by sc0ttman »

why not just fork it? to a new project called "PuppyROX" or something...

I'm sure if iguleder, amigo or others post a few HOW TOs on using git, finding, making or applying patches, etc, then there would be a number of Puppy users who would contribute what they can, as usual.

IMHO, it would be nice to have a thread on this forum about updating "PuppyROX" - showing the patches that had been applied, the patches that are still in testing (needing improvements), etc..

There's no reason we couldn't also keep pace with the standard ROX, as iguleder says updates are sparse....

If "PuppyROX" is good, it will probably go into Puppy, to be used instead of ROX, if not, it won't. What's the controversy?

My personal preferences for ROX:

I'd like to see ROX produce a nicer set of desktop icons - without that border which appears when you click on an icon, maybe a translucent mask instead? This would match the way other, 'prettier' desktop systems work (thunar, etc)..
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#17 Post by Dougal »

sc0ttman wrote:My personal preferences for ROX:

I'd like to see ROX produce a nicer set of desktop icons - without that border which appears when you click on an icon, maybe a translucent mask instead? This would match the way other, 'prettier' desktop systems work (thunar, etc)..
From pinboard.c:

Code: Select all

/* The size of the border around the icon which is used when winking */
#define WINK_FRAME 2
and later

Code: Select all

	gtk_container_set_border_width(GTK_CONTAINER(pi->win), WINK_FRAME);
	g_signal_connect(pi->win, "expose-event", G_CALLBACK(draw_wink), pi);
and later on you have

Code: Select all

/* Put a border around the icon, briefly.
 * If icon is NULL then cancel any existing wink.
 * The icon will automatically unhighlight unless timeout is FALSE,
 * in which case you must call this function again (with NULL or another
 * icon) to remove the highlight.
 */
static void pinboard_wink_item(PinIcon *pi, gboolean timeout)
and also

Code: Select all

static gint draw_wink(GtkWidget *widget, GdkEventExpose *event, PinIcon *pi)
{
	gint x, y, width, height;

	if (current_wink_icon != pi)
		return FALSE;

	x = widget->allocation.x;
	y = widget->allocation.y;
	width = widget->allocation.width;
	height = widget->allocation.height;

	gdk_draw_rectangle(widget->window,
			pi->widget->style->white_gc,
			FALSE,
			x, y, width - 1, height - 1);
	gdk_draw_rectangle(widget->window,
			pi->widget->style->black_gc,
			FALSE,
			x + 1, y + 1, width - 3, height - 3);

	return FALSE;
}
So I'm guessing white_gc and black_gc are the colours you care about (defined in struct _GtkStyle in /usr/include/gtk-2.0/gtk/gtkstyle.h), while /usr/include/gtk-2.0/gdk/gdkdrawable.h tells us:

Code: Select all

void gdk_draw_rectangle (GdkDrawable      *drawable,
			 GdkGC            *gc,
			 gboolean          filled,
			 gint              x,
			 gint              y,
			 gint              width,
			 gint              height);
So it will appear you only need one rectangle and you just change the third variable from FALSE to TRUE in order for it to be filled.

All written in the Queen's English...

So you probably end up with something like

Code: Select all

--- rox-filer/ROX-Filer/src/pinboard.c	2010-08-21 20:55:22.000000000 +0800
+++ rox-filer/ROX-Filer/src/pinboard.c.mod	2011-03-11 22:08:43.686079623 +0800
@@ -1164,12 +1164,8 @@
 
 	gdk_draw_rectangle(widget->window,
 			pi->widget->style->white_gc,
-			FALSE,
+			TRUE,
 			x, y, width - 1, height - 1);
-	gdk_draw_rectangle(widget->window,
-			pi->widget->style->black_gc,
-			FALSE,
-			x + 1, y + 1, width - 3, height - 3);
 
 	return FALSE;
 }
Or so I presume (this is untested).

Note that you might want to replace white_gc with something else relating to the gtk theme. You might want to look here and here. ('Though you might as well just change from the deprecated gdk_draw_rectangle to using Cairo... look here for an example.)
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
Makoto
Posts: 1665
Joined: Fri 04 Sep 2009, 01:30
Location: Out wandering... maybe.

#18 Post by Makoto »

Hmm... is there, perhaps, an easier way of selecting a large group of files without Ctrl-clicking (or middle-mouse button-clicking) on each file, one by one... or in those rare instances when I'm at the end of the list and can draw a rectangle around the files?

I wouldn't really know how difficult it would be to implement if the behavior isn't already there, though. :(
[ Puppy 4.3.1 JP, Frugal install ] * [ XenialPup 7.5, Frugal install ] * [XenialPup 64 7.5, Frugal install] * [ 4GB RAM | 512MB swap ]
In memory of our beloved American Eskimo puppy (1995-2010) and black Lab puppy (1997-2011).

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#19 Post by Flash »

Makoto, if the list of files is contiguous it is easy to draw a rectangle around them. Just switch to ROX's "Extra details" view first. Is that what you mean? Or do you mean where there are unwanted files and folders mixed in with the list as it is shown in ROX's "Extra details" view?

User avatar
Makoto
Posts: 1665
Joined: Fri 04 Sep 2009, 01:30
Location: Out wandering... maybe.

#20 Post by Makoto »

I have Extra Details as my normal view, though I don't really care much for the draw-a-box method - I usually have mediocre luck with it. Most of the time, I'll end up accidentally carrying a file around, instead. :) (It only works every time for me if I start drawing the box off the bottom of the file list, really. Unless I'm doing something wrong... and probably am.)

Of course, I'm also long since used to the Windows Explorer way of doing it, too (didn't care for the box-drawing method there, either :oops: ) - click on the first file, scroll down to the end file, hold down Shift and click on the ending file to select all of the files between them. :|
[ Puppy 4.3.1 JP, Frugal install ] * [ XenialPup 7.5, Frugal install ] * [XenialPup 64 7.5, Frugal install] * [ 4GB RAM | 512MB swap ]
In memory of our beloved American Eskimo puppy (1995-2010) and black Lab puppy (1997-2011).

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#21 Post by sc0ttman »

Nice Dougal..

Another issue I thought of... I have ROX desktop using double click for icons. If you single click on an icon, it is highlighted with the translucent mask. But how would we add the feature of clicking on the desktop (not on another icon) to remove focus from the highlighted desktop icon?


Also, if you have double click enabled for ROX file manager navigation as well, you will see that when you click once on a file/folder (to select it), holding shift and using the cursor keys does not make ROX highlight the next or previous files - you cannot use the keyboard to highlight multiple files.

I personally like using the keyboard, especially on laptops... So these things needs doing as well IMHO. Just my 2 cents.
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#22 Post by Flash »

sc0ttman wrote:...Another issue I thought of... I have ROX desktop using double click for icons. If you single click on an icon, it is highlighted with the translucent mask. But how would we add the feature of clicking on the desktop (not on another icon) to remove focus from the highlighted desktop icon?
If I click in the ROX window between two files or directories, the highlight mask goes away from the file or directory I had highlighted. It's hard to find the dead area :) . It seems to help if I'm using ROX's "Extra details" view and move the cursor over to the middle or right side.
Also, if you have double click enabled for ROX file manager navigation as well, you will see that when you click once on a file/folder (to select it), holding shift and using the cursor keys does not make ROX highlight the next or previous files - you cannot use the keyboard to highlight multiple files.

I personally like using the keyboard, especially on laptops... So these things needs doing as well IMHO. Just my 2 cents.
I agree. Sometimes the keyboard is better than the cursor. :)

User avatar
sc0ttman
Posts: 2812
Joined: Wed 16 Sep 2009, 05:44
Location: UK

#23 Post by sc0ttman »

Flash wrote:
sc0ttman wrote:...Another issue I thought of... I have ROX desktop using double click for icons. If you single click on an icon, it is highlighted with the translucent mask. But how would we add the feature of clicking on the desktop (not on another icon) to remove focus from the highlighted desktop icon?
If I click in the ROX window between two files or directories, the highlight mask goes away from the file or directory I had highlighted. It's hard to find the dead area :) . It seems to help if I'm using ROX's "Extra details" view and move the cursor over to the middle or right side.
Sorry, but here I was actually referring to the desktop icons created by the ROX pinboard, not the file manager. I have no problem de-selecting things in the file manager (just to be clear)
[b][url=https://bit.ly/2KjtxoD]Pkg[/url], [url=https://bit.ly/2U6dzxV]mdsh[/url], [url=https://bit.ly/2G49OE8]Woofy[/url], [url=http://goo.gl/bzBU1]Akita[/url], [url=http://goo.gl/SO5ug]VLC-GTK[/url], [url=https://tiny.cc/c2hnfz]Search[/url][/b]

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#24 Post by Dougal »

Makoto wrote:Hmm... is there, perhaps, an easier way of selecting a large group of files without Ctrl-clicking (or middle-mouse button-clicking) on each file, one by one... or in those rare instances when I'm at the end of the list and can draw a rectangle around the files?
Well, you could look at the docs to see if there's another fancy way (rox has heaps of nice features), but there are a few I use:
- Ctrl-A... if you don't want all, just un-select the ones you don't want (the spacebar makes this pretty easy).
- Select the few you don't want and invert the selection...
- If you want all the files with the same extension, use the "." feature: for all .html files, just type ".html" and they'll get selected.
- Use the "?" feature: if you want all the files with a name starting with "pup", type ? and then

Code: Select all

'pup*'
(the quotes are important)
A more complicated example: you have a directory with files named 01 02 ... 40 and want only 20-40, so you type ? and then

Code: Select all

'[234][0-9]'
For 25-40, type ? and then

Code: Select all

'2[5-9]', '[34][0-9]'
But in many cases just pressing the spacebar for a few seconds is the fastest way... what do you need but a spacebar and four arrow keys?

Note another nice trick rox has (appears under "Saving and restoring the selection" in the manual): if you go to a certain directory a lot, when you are in that directory you just need to type Ctrl+<number> and that directory will be remembered by that number, like a simple bookmark.
Example: go to /usr/share/doc, then press Ctrl+1 -- afterwards every time you press "1" it will jump to /usr/share/doc!
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
Dougal
Posts: 2502
Joined: Wed 19 Oct 2005, 13:06
Location: Hell more grotesque than any medieval woodcut

#25 Post by Dougal »

sc0ttman wrote:Another issue I thought of... I have ROX desktop using double click for icons. If you single click on an icon, it is highlighted with the translucent mask. But how would we add the feature of clicking on the desktop (not on another icon) to remove focus from the highlighted desktop icon?
The best solution would be to cure yourself from the MS disease... double-clicking, I mean, not Multiple Sclerosis...
As for what to do with rox, the question is how rox actually behaves in double-click mode: can you highlight a few icons and then move them, like in Windows?
If not, then you don't want the highlighting at all, in which case you just make the draw_wink function to check if you're in double-click mode and, if so, do nothing.
If it does, you probably want to add something to forward_to_root() to make it unselect the selected icons.

Also, if you have double click enabled for ROX file manager navigation as well, you will see that when you click once on a file/folder (to select it), holding shift and using the cursor keys does not make ROX highlight the next or previous files - you cannot use the keyboard to highlight multiple files.
I don't know about this, you need to look in the relevant part of the code...
What's the ugliest part of your body?
Some say your nose
Some say your toes
But I think it's your mind

User avatar
Makoto
Posts: 1665
Joined: Fri 04 Sep 2009, 01:30
Location: Out wandering... maybe.

#26 Post by Makoto »

Dougal wrote:Well, you could look at the docs to see if there's another fancy way (rox has heaps of nice features), but there are a few I use:
- Ctrl-A... if you don't want all, just un-select the ones you don't want (the spacebar makes this pretty easy).
Yeah, but in the hypothetical example I had in my mind, there were 1,000 files in a directory, and I'd want to select 200 of them, from somewhere in the middle. :P

I didn't know you could use the spacebar like that, though. (Tested it a moment ago.) I've learned something new, today. :)
- Select the few you don't want and invert the selection...
- If you want all the files with the same extension, use the "." feature: for all .html files, just type ".html" and they'll get selected.
Hmm... didn't know about that one, either.
But in many cases just pressing the spacebar for a few seconds is the fastest way... what do you need but a spacebar and four arrow keys?
Enter, maybe? Or Ctrl/Alt for the occasional alternate option. :)

Heh, I'm definitely one of the older veterans used to doing almost everything via the keyboard. :D

Thanks!

Edit: As for double-clicking/the "MS disease," I have ROX set to double-click as well, but that's mainly because I want to avoid accidentally executing something (every once in a while I might accidentally get a little heavy-handed and left-click the mouse on something when I didn't mean to, for example).
[ Puppy 4.3.1 JP, Frugal install ] * [ XenialPup 7.5, Frugal install ] * [XenialPup 64 7.5, Frugal install] * [ 4GB RAM | 512MB swap ]
In memory of our beloved American Eskimo puppy (1995-2010) and black Lab puppy (1997-2011).

Puppyt
Posts: 907
Joined: Fri 09 May 2008, 23:37
Location: Moorooka, Queensland
Contact:

#27 Post by Puppyt »

Rather than go to the trouble of adding a tree-like graphical interface for ROX's file management, and taking Konquerer's lead I was thinking that perhaps add-ons might already exist in Dillo or SeaMonkey to fill the gap. Then I found one for FireFox: "Firefly" (https://addons.mozilla.org/en-us/firefox/addon/firefly/) - though it hasn't been updated for years and gets mixed reviews.

In my wildest imagination I picture a Puppy user opening ROX and thinking "Damn - now I need trees", and just dragging the ROX window either onto a browser icon or into an open browser. The file tree for that given location might be highlighted in an automatically-generated new page, providing the the user the opportunity to view and re-organize files within a single window, external to ROX and using the existing functionality of the browser.

Maybe something that fancy is implausible- but at least an "Explorer" or "Navigator" function for Puppy's Dillo or Pupbrowser would be sweet. Is the idea possible, plausible, or just plain fantasy?
Search engines for Puppy
[url]http://puppylinux.us/psearch.html[/url]; [url=https://cse.google.com/cse?cx=015995643981050743583%3Aabvzbibgzxo&q=#gsc.tab=0]Google Custom Search[/url]; [url]http://wellminded.net63.net/[/url] others TBA...

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#28 Post by technosaurus »

I still like the gtk1 version of rox ... a couple more backports like the ones amigo did and it would be great and only 1/3 the weight
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
Flash
Official Dog Handler
Posts: 13071
Joined: Wed 04 May 2005, 16:04
Location: Arizona USA

#29 Post by Flash »

Where can I find this gtk1 version of ROX? Would it work in Lucid 245? I'd like to try it to see if it copies files inside a directory in numerical order of filename. Presently, when I drag an mp3 book directory containing several hundred mp3 files to my mp3 player, the files in the directory are copied in some weird order, not in the order of their filenames as you would expect.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#30 Post by disciple »

Flash wrote:Where can I find this gtk1 version of ROX?
In the Puppy 2.x repository, which was still alive last time I looked. You might want to build Amigo's latest version instead though.
Would it work in Lucid 245?
Yes - it would also need the libgtk12 and libgdk12 packages or whatever they are called.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#31 Post by Lobster »

Tree function in Rox:

I suppose we could nab and add source code . . .
. . . meanwhile in Lucid I installed xfe from ppm (puppy package manager)
dragged xfe icon from
/usr/bin
to
/root/.config/rox.sourceforge.net/SendTo/xfe

Now in a rox window I can
right click and 'open with' xfe

8)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#32 Post by disciple »

Flash wrote:For what it's worth, there's a feature I'd like to see included in all file managers. It seems to me that a file manager ought to be able to show a tree view of the subdirectories in a directory, without showing any files.
Puppyt wrote:I very much agree with you, Flash -
ROX needs at least a Directory Tree option - not primarily for, but at the very least incredibly helpful for users from different OS backgrounds. (Multi-panels would be nice too but perhaps overdoing it.) Indeed, within Puppy my main turn-off always has been ROX's "babied-up" icon-default display as it strikes me as patronizing to users new to Puppy and Linux as a whole. I do appreciate what ROX has hidden under its hood. However, for my part, without tree view ROX frequently has me barking up the wrong sub-directories and I am much happier using Thunar or Konqueror.
amigo wrote:The tree-view idea is, of course, not new. Thomas always resisted that as it is not RISC-like. I would also have like to see it as an option, but my gtk skills are still not up to doing that myself.
Lobster wrote:Tree function in Rox:

I suppose we could nab and add source code . . .
. . . meanwhile in Lucid I installed xfe from ppm (puppy package manager)
dragged xfe icon from
/usr/bin
to
/root/.config/rox.sourceforge.net/SendTo/xfe

Now in a rox window I can
right click and 'open with' xfe

8)
I haven't actually managed to build it, but there seems to be a program based on rox which has a tree view (using gqview code) - perhaps a look at its code could be helpful: http://samplecat.orford.org/
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

amigo
Posts: 2629
Joined: Mon 02 Apr 2007, 06:52

#33 Post by amigo »

Actually, I don't see anything to indicate any relation or similarity to rox there.

disciple
Posts: 6984
Joined: Sun 21 May 2006, 01:46
Location: Auckland, New Zealand

#34 Post by disciple »

If you look at https://github.com/ayyi/samplecat/blob/ ... _manager.c you'll see that it came from rox. I think it is the file manager pane in the screenshot that looks kind of like rox in details view.
Do you know a good gtkdialog program? Please post a link here

Classic Puppy quotes

ROOT FOREVER
GTK2 FOREVER

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#35 Post by technosaurus »

* Copyright (C) 2006, Thomas Leonard and others (see changelog for details).
Appears to be from rox

both rox and gtk2 (or was it glib2) use libraries from the xdg project and statically build them in (well technically gtk2 builds in the PIC objects) ... and other projects do the same thing. Its only ~100kb but still, I'm suprised Debian doesn't have a patch since they have a policy against such things (but apparently Arch has no such policy)
I once attempted to patch glib and rox so they could share the common objects by exporting those symbols in glib and removing them from the rox build, but after looking at xdg-open, its hard to tell what practical purpose it would serve when we could instead patch rox to use xdg-open directly and not have *.desktop and mime stuff in non-standard locations that make it inoperable with gtk,kde,xfce,lxde, enlightenment and others that do follow the standards ... for no real reason except for NIH (and the zeroinstall thing is pretty damned annoying too - can I just build the sources please)


One of my other pet peeves about rox is not having "yes to all" or "no to all" or "older" (I mention older only because it is useful for copying ./dirbackup to ./dir when you have borked something up and have to return to a known good state ... but that is what tarballs are for I guess) and for that matter "copy" and "paste" for files. I could do without treeview if you could do a split view (basically 2 filer windows smashed together) by middle clicking on the up arrow or home button
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

Post Reply