Author |
Message |
PaulR
Joined: 04 May 2005 Posts: 249 Location: UK
|
Posted: Tue 26 Mar 2013, 16:46 Post subject:
Integrate app to Rox filer? |
|
Is there way to integrate a program into the right-click menu in Rox (in the same way as Windows programs 'integrate to shell'). ?
Specifically I'd like to add XArchive so I can right-click and choose 'add to archive' (right-clicking and choosing 'open with' XArchive doesn't work as I'd hoped )
|
Back to top
|
|
 |
`f00

Joined: 06 Nov 2008 Posts: 808 Location: the Western Reserve
|
Posted: Tue 26 Mar 2013, 19:00 Post subject:
Subject description: well |
|
That is one of the reasons I use xfe a lot more than rox. Working with archives is dead simple, fast and intuitive (also for open/view/edit other file types, kybd shortcuts and so forth).
Surely there are ways to get rox to do what you want how you wish .. and perhaps someone else (ball rolled ) will come along with rox guidance.
Merely a thought to try xfe - by the way, it uses fltk rather than gtk (so you still have a working fm even if gtk somehow gets broken )..
Description |
sample of context menu (.tar.gz file type) |
Filesize |
17.45 KB |
Viewed |
255 Time(s) |

|
Description |
sample of context menu (.png file type) |
Filesize |
39.4 KB |
Viewed |
238 Time(s) |

|
Last edited by `f00 on Wed 27 Mar 2013, 12:26; edited 1 time in total
|
Back to top
|
|
 |
R-S-H
Joined: 18 Feb 2013 Posts: 490
|
Posted: Tue 26 Mar 2013, 19:35 Post subject:
|
|
Hi.
Create a empty script (right-click into a opened rox window), name it to 'add2archive' and insert: the code below into this script
Code: | #!/bin/bash -a
#------------------------------------------------------------------------------
# Add files either to an existing or to a new to create archive
# 2013-03-26 RSH for Puppy Linux / PaulR
#------------------------------------------------------------------------------
xarchive --add=ask "$@"
# End
|
Copy the script to /usr/local/bin.
Go to /root/.config/rox.sourceforge.net/OpenWith and create a symbolic link for each and every file type or inode-directory etc. you want to use this for.
Example:
Want to use this for jpeg images, create a symbolic link to /usr/local/bin/add2archive in /root/.config/rox.sourceforge.net/OpenWith/.image_jpeg (I would use 'absolute' most other users would use 'relative')
If you do create a symbolic link also in /root/.config/rox.sourceforge.net/OpenWith, then you can use this also on a selection of several files (right-click option 'Open with' is needed to use then)
Description |
|
Filesize |
8.49 KB |
Viewed |
299 Time(s) |

|
Description |
|
Filesize |
12.64 KB |
Viewed |
304 Time(s) |

|
Description |
|
Filesize |
37.71 KB |
Viewed |
303 Time(s) |

|
_________________ LazY Puppy Home
The new LazY Puppy Information Centre
|
Back to top
|
|
 |
don570

Joined: 10 Mar 2010 Posts: 4984 Location: Ontario
|
Posted: Tue 26 Mar 2013, 20:01 Post subject:
|
|
The method of RSH will work but it lacks a menu icon. Rox solves this
by recognizing a special type of folder. I think Rox calls it a 'AppInfo file' folder in its manual.
http://rox.sourceforge.net/Manual/Manual/Manual.html#appdirs
To see examples of these folders go to /usr/local/apps/
Look inside the folders you see there.
There are typically three files inside the folder
1) description when mousing over folder
2) a script which can be very complex , but typically is very simple
and just launches an app. It is called 'AppRun'
3) usually there is an icon (typically a link to an icon) that is hidden.
It must be called '.DirIcon'.
So just make a right click menu item by linking to this special rox
folder. The link's name is what shows in the right click menu.
.
|
Back to top
|
|
 |
R-S-H
Joined: 18 Feb 2013 Posts: 490
|
Posted: Tue 26 Mar 2013, 20:29 Post subject:
|
|
Yes, don570 is right!
That's why I've made the Add2Archive-0.0.1.pet.
So, you just can install this package and everything should work out of the box.
_________________ LazY Puppy Home
The new LazY Puppy Information Centre
|
Back to top
|
|
 |
PaulR
Joined: 04 May 2005 Posts: 249 Location: UK
|
Posted: Wed 27 Mar 2013, 05:04 Post subject:
|
|
Thanks all! I guessed it would be possible... and lots of useful info there to play with
One other related thing - see image3 in R-S-H's post, I always have to resize this window to see the filenames, is there a way to overcome that annoyance?
Thanks again
Paul
|
Back to top
|
|
 |
CatDude

Joined: 03 Jan 2007 Posts: 1570 Location: UK
|
Posted: Wed 27 Mar 2013, 07:43 Post subject:
|
|
Hello PaulR
PaulR wrote: | ...One other related thing - see image3 in R-S-H's post, I always have to resize this window to see the filenames, is there a way to overcome that annoyance?
|
Re-compile the bugger.
I just had a quick test myself,
and this is what i did:
Downloaded the sources: http://switch.dl.sourceforge.net/project/xarchive/xarchive/0.2.8-6/xarchive-0.2.8-6.tar.gz
Unpacked them (into /root for this example)
In the titlebar of the image you refer to, we see the string "Select Files or Directories To Add"
so let's find out which file contains that string.
Open a terminal inside of the sources directory and run the following command:
Code: | grep -rn "Select Files or Directories To Add" . |
which returns the following:
Code: | ./src/myfc_gtk.c:219: "Select Files or Directories To Add", NULL, |
So, open up: /root/xarchive-0.2.8-6/src/myfc_gtk.c in Geany.
and scroll down to line 219 you will see the string,
scroll down further and you will see these:
Line 238
Code: | gtk_widget_set_size_request(GTK_WIDGET(myfcd.fc), 450, 200); |
Line 243
Code: | gtk_widget_set_size_request(vbox, 450, 180); |
They are what we need to change.
The attached image is the result of using these changes:
Line 238
Code: | gtk_widget_set_size_request(GTK_WIDGET(myfcd.fc), 600, 305); |
Line 243
Code: | gtk_widget_set_size_request(vbox, 600, 225); |
When tou have finished making your changes,
run:
Code: | ./configure --prefix=/usr && make |
there's no need to do the make install
Your new binary is located here: /root/xarchive-0.2.8-6/src/xarchive
NOTE:
It is considerably larger than the current one, so you may wish to strip it.
Now rename: /usr/bin/xarchive to someting like /usr/bin/xarchiveORIG
and place a copy of your new binary file into: /usr/bin
Then fire up xarchive and check if your happy with the new size,
if not have another go until you are.
Hope this helps
CatDude
.
Description |
|
Filesize |
46.83 KB |
Viewed |
267 Time(s) |

|
_________________

|
Back to top
|
|
 |
PaulR
Joined: 04 May 2005 Posts: 249 Location: UK
|
Posted: Wed 27 Mar 2013, 08:52 Post subject:
|
|
Cheers catdude, that's one way of fixing it I guess!
Might be better to add some code to write out a file (or add a line to an existing config if any?) when closing and reload it when opening such that the window size is remembered but I kmow nothing about coding for GTK and would probably break it.
Paul
|
Back to top
|
|
 |
disciple
Joined: 20 May 2006 Posts: 6781 Location: Auckland, New Zealand
|
Posted: Thu 28 Mar 2013, 04:34 Post subject:
|
|
Does Puppy not include Pupzip (a wrapper for xarchive) anymore?
_________________ If you have or know of a good gtkdialog application, please post a link here
Classic Puppy quotes
ROOT FOREVER
|
Back to top
|
|
 |
|