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 Fri 24 Oct 2014, 14:18
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
JWM knows path to icons, why doesn't Fluxbox?
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 1 of 1 Posts_count  
Author Message
PaulR

Joined: 04 May 2005
Posts: 246
Location: UK

PostPosted: Tue 09 Apr 2013, 09:01    Post_subject:  JWM knows path to icons, why doesn't Fluxbox?
Sub_title: Bacon
 

I'm modifying my JWM menu export utility ( http://murga-linux.com/puppy/viewtopic.php?t=85526 ) so icons can be included in the exported file.

The problem I have is that only the icon filenames appear in .jwmrc but I have to add the full path to get it to work in Fluxbox's 'menu' file, for example:

[exec] (Chtheme GTK theme chooser) {gtk-chtheme} </usr/local/lib/X11/mini-icons/mini.window3d.xpm>

How do I add this folder to Fluxbox's known paths (or would it be better to just pre-pend the path programmatically in the export routine)?

Actually, I haven't checked if all the menu icons are stored in this directory. A better option might therefore be for me to make sure that all the paths known to JWM are known to Fluxbox... how can I do that?

TIA Smile

Paul

EDIT not sure if it matters but this is on Slacko 5.5.

Edited_times_total
Back to top
View user's profile Send_private_message 
PaulR

Joined: 04 May 2005
Posts: 246
Location: UK

PostPosted: Tue 09 Apr 2013, 16:01    Post_subject:  

Right, I can probably get round this by executing:

#find / -name <iconfilename>

for each icon that doesn't already have an explicit path. It will be flipping slow but it should work and the program will most likely only be used as a one-off.
Back to top
View user's profile Send_private_message 
PaulR

Joined: 04 May 2005
Posts: 246
Location: UK

PostPosted: Tue 09 Apr 2013, 17:02    Post_subject:  

I've now got this piece of code in a function:

Code:

   command$ = "find / -name " & iconText$
   iconText$=EXEC$(command$)
   'if there were multiple instances of the icon file, get first line of output only
   RETURN LEFT$(iconText$, INSTR(iconText$, NL$)-1)


Sometimes is spits out a line like this:

find: ` /proc/12154': No such file or directory

(note the odd apostrophes)

I thought this might be something to do with how puppy maps directories (TBH that's way over my head at present!) but, despite this seems to return the correct text - here's an entry from the generated 'menu' file where one such event happened:

[exec] (mtPaint image editor) {/usr/bin/mtpaint} </usr/share/pixmaps/mtpaint.png>

I've checked and that file does exist but oddly the icon doesn't actually show up in the Fluxbox menu - see the screenshot.

Help appreciated... I'm confused!

Cheers

Paul
icon-missing.jpg
 Description   
 Filesize   55.96 KB
 Viewed   272 Time(s)

icon-missing.jpg

Back to top
View user's profile Send_private_message 
seaside

Joined: 11 Apr 2007
Posts: 887

PostPosted: Tue 09 Apr 2013, 20:02    Post_subject:  

PaulR,

I don't know how Fluxbox sets icon paths but the paths for JWM are in /root/.jwmrc as follows:
Code:
<!-- <Icons> -->
<!--   <IconPath>$HOME/.icons</IconPath> -->
<IconPath>/usr/local/lib/X11/mini-icons</IconPath>
<IconPath>/usr/local/lib/X11/pixmaps</IconPath>
<IconPath>/usr/share/pixmaps</IconPath>
<IconPath>/usr/local/share/pixmaps</IconPath>
<!-- </Icons> -->


So if you can find how to add the above paths to Fluxbox, I think it should work.

Edit: Sorry, I just realized that Fluxbox doesn't have that capability to refer by icon name without the path. It looks like a programmatic method to find and set the icon path as you described is needed. You may get more help in the Bacon thread.

Cheers,
s
Back to top
View user's profile Send_private_message 
PaulR

Joined: 04 May 2005
Posts: 246
Location: UK

PostPosted: Wed 10 Apr 2013, 03:46    Post_subject:  

Thanks seaside.

Reading up on 'find' I think I can fix the problem by using the -prune option to avoid searching /proc. Why the icon doesn't display in Fluxbox when the path is correct though is another mystery! I suspect some weird embedded character. I'll try a fix later...

Paul
Back to top
View user's profile Send_private_message 
scsijon

Joined: 23 May 2007
Posts: 1047
Location: the australian mallee

PostPosted: Wed 10 Apr 2013, 04:22    Post_subject:  

paul, it could be the icon size your using.

I had that problem with mage2 until I worked it out. Fixing it the easy way seems to be with setting global font size for some reason with JWM.

I sugest you try a smaller one for a test and see what happens,don't forget you need a full reboot for the result to 'kick-in'. If necessary, you can always resize them slightly to overcome the problem if that is all it is.

regards
scsijon

_________________
Puppy T290 - BarryK's Racy but with T2 Version 9.0 is under development.
http://www.murga-linux.com/puppy/viewtopic.php?t=94575
Back to top
View user's profile Send_private_message Visit_website 
PaulR

Joined: 04 May 2005
Posts: 246
Location: UK

PostPosted: Wed 10 Apr 2013, 13:50    Post_subject:  

Thanks scsijon, I'll look into that once I've cracked the 'find' problem! Smile


Paul
Back to top
View user's profile Send_private_message 
Mobeus


Joined: 26 Aug 2010
Posts: 94

PostPosted: Thu 11 Apr 2013, 10:02    Post_subject:  

Paul,

Have you checked how your fluxbox was compiled for image support?

See http://fluxbox-wiki.org/index.php?title=Editing_the_menu

Regards,
Mobeus

_________________
/root for the home team
Back to top
View user's profile Send_private_message 
PaulR

Joined: 04 May 2005
Posts: 246
Location: UK

PostPosted: Thu 11 Apr 2013, 10:12    Post_subject:  

Hi Mobeus

Yes, I've read that thanks - I'm presently trying to recompile Fluxbox with png support Smile

Paul
Back to top
View user's profile Send_private_message 
technosaurus


Joined: 18 May 2008
Posts: 4353

PostPosted: Thu 11 Apr 2013, 22:44    Post_subject:  

its not the image support, puppy puts crap in all sorts of non-standard locations... one of which is /usr/share/mini-icons which is a symlink to /usr/local/lib/X11/mini-icons and contains mostly xpm images ... another is /usr/share/midi-icons which is a symlink to /usr/local/lib/X11/pixmaps and contains mostly png images for puppy's theme

... fonts are another big non-standard, so if the text looks bad, that is why

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 1 of 1 Posts_count  
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Off-Topic Area » Programming
Jump to:  

Rules_post_cannot
Rules_reply_cannot
Rules_edit_cannot
Rules_delete_cannot
Rules_vote_cannot
You cannot attach files in this forum
You can download files in this forum


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