How to create submenu in the Puppy Menu for Wine?

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

How to create submenu in the Puppy Menu for Wine?

#1 Post by darkcity »

Hi,

I found it annoying that Wine has so many entries in the Utility Menu.

I wanted to create a submenu from the 'Utility menu'

---

The best I have managed so far is creating a menu for Wine entries in a menu off the root Menu - see Pic

---

I have created a category called X-WineDir
Changed the category to Wine entries' categories to X-WIneDir

but how do I shift the menu into/ create a subdir off the Utility menu?

:oops:
Attachments
MenuSubDir.jpg
(61.08 KiB) Downloaded 861 times

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

#2 Post by technosaurus »

if you want to see an example, jwm tools has jwm_menu_create - all entries go to appropriate subdirectories (if configured for submenus)
http://www.murga-linux.com/puppy/viewtopic.php?t=70804

they just need a nested menu for each subcategory
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].

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#3 Post by musher0 »

Hello, darkcity.

I've been trying to do the exact same thing for a while and couldn't figure it out. Can you post the details of your X-WineDir ? (I know it's not a "code"per se, more like the xml structure.) Many thanks in advance.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

#4 Post by technosaurus »

btw, its my fault all of those menu entries exist in the first place (before they were only accessible via terminal) - sorry about that

if you use akita linux (formerly puplite), scottman is using a modified version of my jwm_menu_create that supports submenus, but it has been so long since I made the .desktop files that I'm not sure where they would end up.

you may want to modify the desktop files to go in more appropriate places and submit them to greendome
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
r1tz
Posts: 162
Joined: Thu 09 Sep 2010, 05:19
Location: In #puppylinux (IRC)

#5 Post by r1tz »

Hmm... edit the files in /etc/xdg/menus

For hints (look at the related links for more details):
http://puppylinux.org/wikka/JWMMenuCategory


ps. sorry if im telling you what you already know XD

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#6 Post by musher0 »

Sorry, guys, this is much too complicated.

The average user will get nowhere fast with this xml structure and lose so many precious hours trying to understand xml before getting any results -- when all (s)he want is a new menu or sub-directory entry -- which should as easy as typing "hello".

Re-starting investigation on this subject from the icewm menu instead, which is closer to a plain text file.

Thanks anyway. TWYL.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

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

#7 Post by technosaurus »

its only complicated because you are overcomplicating it

follow the link I posted for submenu support in jwm

jwm_menu_create doesn't bother to mess with the gunk in /etc/xdg - it is all in single, simple shell script and can be configured in a human readable text file, just install jwm_tools-0.9 and run:
jwm_menu_create;jwm -restart
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].

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#8 Post by musher0 »

technosaurus wrote:its only complicated because you are overcomplicating it

follow the link I posted for submenu support in jwm

jwm_menu_create doesn't bother to mess with the gunk in /etc/xdg - it is all in single, simple shell script and can be configured in a human readable text file, just install jwm_tools-0.9 and run:
jwm_menu_create;jwm -restart
Let's not get personal... Maybe I don't have any talent at all for xml. I did download and try your package, but on my setup (Lucid Puppy 5.25 retro), jwm_menu_create simply doesn't start -- and the console displays no explanation as to missing dependencies, etc.

In any case, if you can't do it one way, try another, eh? Here's something that's not complicated at all. It's a menu editor based on icewm rather than jwm. It looks a lot like a csv editor, if you've ever worked with one. (dmcsv, for example.)

Packaged from the ubuntu repository at http://packages.ubuntu.com/hardy/icemc.

When you bring up icemc, it's rather self-explanatory. All you have to do at the beginning of your session is to specify ~/.icewm (where the icewm menu is) and the icons directory of your choice.

After that, the most practical thing to do is to use the right click to see the options at your disposal. Just be careful that any new "directory" is marked with a minus sign at the left if you want to insert programs in them. A "+" means they're closed, so you can't put anything in them.

Beforehand, don't forget to
1) run fixmenus, so you have a fresh icewm menu; and
2) make a back-up of your original icewm menu beforehand, although icemc allows you to save your new menu to a different name.

Requires Qt-3. But I have Qt-4.5 installed, and it worked great.

All in all, a very useful program.

Hopefully this can help our friend darkcity. Enjoy!
Attachments
icemc-0.2.4-3_i386.pet
A simple but efficient editor for the icewm menu. Your customized icewm menu can be used for icewm of course, but also as a template for aemenu, MyGtkMemu, deskmenu, and the like. N.B.: This app is NOT a substitute or replacement for jwm menu utilities.
(70.59 KiB) Downloaded 321 times
Last edited by musher0 on Sun 05 Feb 2012, 20:05, edited 2 times in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#9 Post by darkcity »

thanks for all the comments

Using Puppy 5.29, no Qt so I get 'Permission Denied' in terminal

--

Regard url tags, ensure there are no space before or after url, otherwise your whole post will disappear!

for example

Code: Select all

[url]http://www.cheese.com [/url] 
won't work

--

will experiment more laterz ; -)

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

#10 Post by technosaurus »

musher0 wrote: Maybe I don't have any talent at all for xml. I did download and try your package, but on my setup (Lucid Puppy 5.25 retro), jwm_menu_create simply doesn't start -- and the console displays no explanation as to missing dependencies, etc. !
it has no dependencies other than jwm and a shell - it is a silent script and runs really fast (about 10x faster than fixmenus) you probably didn't run jwm -restart ... or you ran fixmenus afterwards (yeah - don't do that, it makes fixmenus obsolete for jwm)
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].

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#11 Post by musher0 »

@darkcity : thanks for the info.
@technosaurus. will give your jwm menu utilities another (really thorough, as in rubbing my hands together while saying "yan-han-han") :twisted: try.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
`f00
Posts: 807
Joined: Thu 06 Nov 2008, 19:13
Location: the Western Reserve

#12 Post by `f00 »

(actually more in the edit line than real programming)

___utilwine___(attached utilwine.tar.gz)
..these are examples for a UtilityWine subcat of Utilities..

/etc/xdg/menus/puppy-utility.menu
..is the edit I use, rename your oem before trying this one..
you may need to add separators back in if desired,
'bad habit' of mine to take'em out
:P

/usr/share/applications/*
..these are my 'usual' dotdesktops in UtilityWine,
yours may vary but Category=UtilityWine is standard..

/usr/share/desktop-directories/Puppy-UtilityWine.directory
..is the new subcat dotdirectory file..

/usr/share/pixmaps/*
..a couple generic images if needed..

After doing the copy/edit and/or moves,
refresh your menu(s) according to wm policy(s).
Usually a simple "fixmenus" in console and
reload (jwm and maybe icewm), other stuff is
dependent on options at the end of fixmenus.

___further - not guaranteed to work 'automagically' in all wms, panels, menu plug-ins, etc. Mostly I do these others manually (tedious but do-able) if desired - usually because some scripts do things (like take 'way too long with fvwm or make a ton of syms or..) and I lack the skill to fix them. Oh well, plodding gets me there eventually.

Yes, advantages to using jwm_tools-0.9 (or icemc if you swing that 8) way) .. only disadvantage I can see off the bat with 'tools is the all/not for subcats rather than the xdg limits value gunk to give a choice as to just what subcats branch :| (drove me nuts in one of the macpups, almost every dang subcat was up no matter how diminutive its content..)

hth

___addenda (see below) - Yep, just basic xdg. By the way, xfe has some icons for its add-ons (sym them to a more usual place, maybe) in its own collection.
Attachments
utilwine.tar.gz
examples
(8.22 KiB) Downloaded 328 times
Last edited by `f00 on Thu 09 Feb 2012, 15:35, edited 1 time in total.

musher0
Posts: 14629
Joined: Mon 05 Jan 2009, 00:54
Location: Gatineau (Qc), Canada

#13 Post by musher0 »

Many thanks, 'roo.

Your "non-code" worked wonders! :D (Please see attached.)

TWYL.
Attachments
UtilityWineCategory.jpg
Successful example of "Categories=UtilityWine" in the *.desktop files for wine utilities and programs.
(45.3 KiB) Downloaded 768 times
Last edited by musher0 on Sat 10 Mar 2012, 17:06, edited 1 time in total.
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
darkcity
Posts: 2534
Joined: Sun 23 May 2010, 19:16
Location: near here
Contact:

#14 Post by darkcity »

Thanks for everyone's help. I'm now a menu expert ; -) on JWM anyhow-

the crucial part was working out submenus are controlled by inline limit

http://www.murga-linux.com/puppy/viewto ... h&id=51849

Post Reply