Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sun 20 Apr 2014, 09:38
All times are UTC - 4
 Forum index » House Training » Beginners Help ( Start Here)
Integrate app to Rox filer?
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [9 Posts]  
Author Message
PaulR

Joined: 04 May 2005
Posts: 241
Location: UK

PostPosted: 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 Sad )
Back to top
View user's profile Send private message 
`f00


Joined: 06 Nov 2008
Posts: 809
Location: the Western Reserve

PostPosted: 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 Smile ) 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 Shocked )..
archive-xfe.png
 Description   sample of context menu (.tar.gz file type)
 Filesize   17.45 KB
 Viewed   119 Time(s)

archive-xfe.png

context-xfe.png
 Description   sample of context menu (.png file type)
 Filesize   39.4 KB
 Viewed   112 Time(s)

context-xfe.png


Last edited by `f00 on Wed 27 Mar 2013, 12:26; edited 1 time in total
Back to top
View user's profile Send private message 
R-S-H

Joined: 18 Feb 2013
Posts: 490

PostPosted: 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)
image-2.jpg
 Description   
 Filesize   8.49 KB
 Viewed   185 Time(s)

image-2.jpg

image-1.jpg
 Description   
 Filesize   12.64 KB
 Viewed   193 Time(s)

image-1.jpg

image-3.jpg
 Description   
 Filesize   37.71 KB
 Viewed   190 Time(s)

image-3.jpg


_________________
LazY Puppy Home
The new LazY Puppy Information Centre

Back to top
View user's profile Send private message 
don570


Joined: 10 Mar 2010
Posts: 3078
Location: Ontario

PostPosted: 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
View user's profile Send private message 
R-S-H

Joined: 18 Feb 2013
Posts: 490

PostPosted: 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
View user's profile Send private message 
PaulR

Joined: 04 May 2005
Posts: 241
Location: UK

PostPosted: 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 Very Happy

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
View user's profile Send private message 
CatDude


Joined: 03 Jan 2007
Posts: 1432
Location: UK

PostPosted: 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
.
hacked-xarchive.png
 Description   
 Filesize   46.83 KB
 Viewed   145 Time(s)

hacked-xarchive.png


_________________

Back to top
View user's profile Send private message 
PaulR

Joined: 04 May 2005
Posts: 241
Location: UK

PostPosted: 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. Laughing

Paul
Back to top
View user's profile Send private message 
disciple

Joined: 20 May 2006
Posts: 6378
Location: Auckland, New Zealand

PostPosted: Thu 28 Mar 2013, 04:34    Post subject:  

Does Puppy not include Pupzip (a wrapper for xarchive) anymore?
_________________
DEATH TO SPREADSHEETS
- - -
Classic Puppy quotes
- - -
Beware the demented serfers!
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [9 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Beginners Help ( Start Here)
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0751s ][ Queries: 13 (0.0063s) ][ GZIP on ]