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 21 Nov 2014, 12:51
All times are UTC - 4
 Forum index » Advanced Topics » Puppy Projects
New xdg menu proposal and implementation
Moderators: Flash, JohnMurga
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
Page 2 of 2 Posts_count   Goto page: Previous 1, 2
Author Message
01micko


Joined: 11 Oct 2008
Posts: 7841
Location: qld

PostPosted: Sat 18 May 2013, 08:28    Post_subject:  

Hi Mobeus,

I like it! I gave it some brief trials, and when I get a bit of time in about a month or so I'll probably whack it in a thinslacko build (which has become my favoured test bed) as the main menu generator. That way fellows like peebee can test with lxde, also icewm should run fine maybe some others. (there is a fluxbox official slacko pet, created by dejan555).

Cheers

_________________
Woof Mailing List | keep the faith Cool |
Back to top
View user's profile Send_private_message Visit_website 
peebee


Joined: 21 Sep 2008
Posts: 1512
Location: Malvern, Worcs, UK

PostPosted: Sat 18 May 2013, 12:34    Post_subject:  

01micko wrote:
Hi Mobeus,
I like it! ..... I'll probably whack it in a thinslacko build .... fellows like peebee can test with lxde
Cheers

I'm up for experimenting and testing....I'm following the thread....
Cheers
peebee

_________________
LxPup-14.10 = Puppy + LXDE
Back to top
View user's profile Send_private_message Visit_website 
oldyeller


Joined: 15 Nov 2011
Posts: 818
Location: Mishawaka IN

PostPosted: Sat 18 May 2013, 14:22    Post_subject:  

Hi Mobeus,

Which tar.gz do I need to compile? and do I need all three? I did the manual moving of the files. This is a very promising fix to the menu Cool


Cheers
Back to top
View user's profile Send_private_message 
Mobeus


Joined: 26 Aug 2010
Posts: 94

PostPosted: Mon 20 May 2013, 11:18    Post_subject:  

Hi everyone,

Sorry for not getting back sooner, been offline for a few days.
lvds wrote:
Did Barry said something about integration on future releases ?

As far as I know, Barry is unaware of this thread.

@01micko, peebee
Sounds good. I'll be patient.

oldyeller wrote:
Which tar.gz do I need to compile? and do I need all three?

implementation.tar.gz has everything in it to implement the menus. If for any reason the /root/my-applications/bin/gen_pup_xdg fails to run for you then you would need to compile the source-gen_pup_xdg.tar.gz source with BaCon BASIC version 2.0 build 1 or greater.

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


Joined: 23 Jan 2007
Posts: 315
Location: Near the window

PostPosted: Wed 22 May 2013, 03:32    Post_subject:  

Mobeus wrote:
Hi everyone,

Sorry for not getting back sooner, been offline for a few days.
lvds wrote:
Did Barry said something about integration on future releases ?

As far as I know, Barry is unaware of this thread.


would be great to bring it all upstream for the next puppy release Wink
great work

_________________
This is China today
Asus 1225C eeePC Atom Cedar Trail 2G Ram - DELL Optiplex 780 core2 duo 4G Ram, Intel4 chipset Video, ICH10 chipset Audio, Intel 82567LM-3 Network
Back to top
View user's profile Send_private_message 
musher0


Joined: 04 Jan 2009
Posts: 4318
Location: Gatineau (Qc), Canada

PostPosted: Thu 23 May 2013, 04:18    Post_subject:  

@Mobeus:

Hi!

Do you think that a discussion of the *.desktop categories and a draft remedy would be off-subject in this thread? (Since they have a bearing on menu creation.) It would from a non-XML angle, since my default wm is pekwm (which works with straight-text menu and config files).

I think I might have stumbled onto a corrective. (Not the right word in English, I know.)

BFN.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send_private_message Visit_website 
musher0


Joined: 04 Jan 2009
Posts: 4318
Location: Gatineau (Qc), Canada

PostPosted: Thu 30 May 2013, 14:08    Post_subject:  

Hello, all.

I have made some observations which may also be relevant to this xdg-menu thread, here:

http://murga-linux.com/puppy/viewtopic.php?p=706193&sort=lastpost#706193

Because the desktop standards are not all that more logical, when you take a close look at them.

Best regards.

musher0

_________________
"Logical entities must not be multiplied needlessly." / "Il ne faut pas multiplier les êtres logiques inutilement." (Ockham)
Back to top
View user's profile Send_private_message Visit_website 
Mobeus


Joined: 26 Aug 2010
Posts: 94

PostPosted: Sat 01 Jun 2013, 01:20    Post_subject:  

Hi musher0,

I don't understand your issue with the xdg categories. The official categories are defined so that application developers have a standard choice of which one their app should go in so it will actually show up in the menus of different distros.

There is no rule that says a desktop file must have multiple categories, but my understanding is the category list is an order of preference and once the app has been assigned to a menu it is not to show up in another one. There also is no rule that prevents a user from reassigning the app to a single category or even a self-defined category.

Also, if the OS developers want the categories limited to a specific few or expanded with X-custom ones that is their choice. But that choice only applies to official packages targeted for that system and the user is still free to add, subtract, or rearrange as they please. If the OS developers make a complete hash of the menu that is a reflection on those developers, not the menu spec.

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

Joined: 26 Feb 2007
Posts: 2230
Location: The Blue Marble

PostPosted: Mon 03 Jun 2013, 03:29    Post_subject:  

Hi Mobeus,

Thanks for this very informative thread. I have always been curious about xdg menu system but didn't have the motivation enough to investigate it because it used to work fine with the old lxpanel used in earlier versions of Fatdog.

It's only in very recent versions where we finally use the updated lxpanel, the menus (especially the categories) got screwed. With the help of your informative posts, I re-read the xdg menu spec. Turned out that the newer Lxpanel / menu-cache implements the spec fully now and all I need to do is fix the applications.menu file (and other *.menu files as needed).

I may not be using your programs to auto-generate the applications.menu but other than that I still thank you for your posts as they get me thinking. I am definitely going to edit those *.menu files so that future xdg-compliant panels and wms will work correctly.

cheers!

_________________
Fatdog64, Slacko and Puppeee user. Puppy user since 2.13.
Contributed Fatdog64 packages thread
Back to top
View user's profile Send_private_message 
Nathan F


Joined: 08 Jun 2005
Posts: 1760
Location: Wadsworth, OH (occasionally home)

PostPosted: Sat 20 Jul 2013, 13:49    Post_subject:  

Thought I'd give this a whirl. Compiling on Arch. Minor problem. Won't affect Puppy users, until you get newer toolchains...
Code:
./bacon.ksh gen_pup_xdg.bac
Converting 'gen_pup_xdg.bac'... done.
Compiling 'gen_pup_xdg.bac'... Compiler error:

Problem:
    file 'gen_pup_xdg.bac' line 324: g_type_init()
Cause:
    'g_type_init' is deprecated (declared at /usr/include/glib-2.0/gobject/gtype.h:669) [-Wdeprecated-declarations]

_________________
Bring on the locusts ...
Back to top
View user's profile Send_private_message AIM YIM MSNM 
sfs

Joined: 02 Nov 2013
Posts: 24
Location: Russia

PostPosted: Sat 02 Nov 2013, 02:23    Post_subject:  

Code:
#!/bin/ash
#131102 sfs
[ ! "$1" ] && echo 'Find ico & change:
         <item label="Leafpad - editor" icon="leafpad">
    to
         <item label="Leafpad - editor" icon="/usr/share/pixmaps/leafpad.xpm">

    Usage: '$0' menufile' && exit

ICONPATH="/usr/share/icons /usr/share/pixmaps" # /usr/local/share/pixmaps"

for j in `sed -n '/icon=/s/^.*icon="\([^"\.]*\)".*$/\1/p' "$1" | sort -u` ;do
    i="`find $ICONPATH -name "$j.[px][np][gm]"|tail -1`"
    [ -z "$i" ] && continue
    sed -i 's,icon="'"$j"'",icon="'"$i"'",' "$1"
done
Back to top
View user's profile Send_private_message Visit_website 
technosaurus


Joined: 18 May 2008
Posts: 4376

PostPosted: Sat 02 Nov 2013, 12:21    Post_subject:  

musher0 wrote:
I remember I also tried technosaurus' menu tools a while back on the same Puppy. So there might have been interferences.
There should be no interference by jwm_menu_create, it doesn't even touch the .menu files because the whole menu spec is targeted toward multiuser systems in such a way that the C implementation is 15X slower than my shell implementation that ignores the puppy-irrelevant parts of the spec. (mostly due to the "exclude" directive)

On a single user system all you need to do to customize a menu is move .desktop files from /usr/share/applications (and maybe back later), which can be done with ROX-Filer or a gtkdialog interface (woof has an example, adapted from the really old puppy builder - the include/exclude packages with arrows in the middle) to move them between /usr/share/applications and /usr/share/apps.hide (or whatever)

_________________
Web Programming - Pet Packaging 100 & 101
Back to top
View user's profile Send_private_message 
mcewanw

Joined: 16 Aug 2007
Posts: 2348
Location: New Zealand

PostPosted: Fri 21 Feb 2014, 23:15    Post_subject:  

I've just come across this thread Mobeus, and I think your work is really on track here, having been reading a lot about xdg recently. I hope you are still developing it and that it is being adopted.

EDIT:

Don't know if you are aware of the thread below Mobeus. If your efforts could be adapted to solve the icewm (and jwm) xdg menu issues there, they would be very welcomed I'm sure. It is a true debian-based, multiuser, but puppy-like look and feel (and size) system that boots by default to desktop as root user. It's creator is murga forum member saintless (Toni). I've notified Toni of your work (and rarsa's) there:

http://murga-linux.com/puppy/viewtopic.php?p=760187#760187

_________________
Non enim propter gloriam, diuicias aut honores pugnamus set propter libertatem solummodo quam Nemo bonus nisi simul cum vita amittit.
Back to top
View user's profile Send_private_message Visit_website 
s243a

Joined: 02 Sep 2014
Posts: 32

PostPosted: Wed 15 Oct 2014, 13:58    Post_subject:  

Is this the latest source for the Menu system or is it maintained at a repository somewhere?

Mobeus wrote:
Menu Implementation, Test Procedure and Notes

The binary portion of the implementation was tested on Puppies lucid 5.2.8, slacko 5.5, and upup-precise so should work on a wide range of Puppies. Please test and provide feedback with as many Puppy editions as possible.

Use a fresh 32 bit Puppy running in ram or with a new small save-file. Testing example assumes JWM window manager.


Manually install all of the files from the implementation.tar.gz
There is a hidden directory /root/.fluxbox

Test:

cd /root/my-applications/bin

#generate the /etc/xdg/applications.menu
./createmenus
fixmenus
jwm -reload

Observe the duplicated original Puppy menu with a new 'Other' menu.

#Simulate a custom edited user menu
./editmenus
fixmenus
jwm -reload

Observe the users edited menu.
Note the layout changes.
Note the Utility menu and Abiword menu item changes.

Delete /root/.config/menus/applications.menu
fixmenus
jwm -reload

Observe the restored system menu layout with the new 'Other' menu.
Note the Utility menu and Abiword menu item still have the users changes.

Delete /usr/share/applications/AA-Strange-Program.desktop
fixmenus
jwm -reload

Observe the 'Other' menu is no longer visible

Delete /root/.local/share/applications/Abiword-wordprocessor.desktop
fixmenus
jwm -reload

Observe Abiword menu item is restored to the original.

Delete /root/.local/share/desktop-directories/Puppy-Utility.directory
fixmenus
jwm -reload

Observe the Utility menu is restored to the original.

At no time were any changes made to the system menu files.


Notes:
Supported non-xdg window managers and panels are jwm, icewm, openbox, fluxbox and fbpanel.
The misc-support.tar.gz archive contains the modified scripts that fixmenus calls when refreshing the menus for jwm, icewm, openbox, fluxbox and fbpanel. The original scripts are from Puppy and various packages found on this forum and the Quirky source archive. These are provided for convenience. The modification consists of deleting the multiple lines containing the commands to <windowmanager>-xdgmenu /etc/xdg/menus/puppy-*.menu with one gen_pup_xdg <windowmanager> [svgflag] line. This is the only change these scripts require.

The menus generated by the included binary gen_pup_xdg have menu icon support.
The icon syntax has not been confirmed on openbox and fluxbox. Feedback from
testing with these two window managers would be helpful.

The binary gen_pup_xdg is simply rarsas *-xdgmenu files combined into one with some improvements.
The improvements include:
Automatic detection of the proper applications.menu to use, either the user's or system's.
Removal of exec arguments (%F %U etc.) from the menu. They don't belong there.
Output of menu icons for all menus.
The option to ignore svg icons for compatibility with window managers/panels such as openbox.
Fast xdg compliant search & find of the menu icons for fluxbox.
Menu icon search includes Puppy's icon theme directory.
Some formatting of the menu output for readability.

The binary is written and compiled with BaCon BASIC to C converter version 2.0 build 1. The source code can easily be translated to C if you prefer; it uses plain Gtk and can be compiled against gtk2 or gtk3, 32 or 64 bit.
This is an alpha and source code will likely be changed during testing.
Back to top
View user's profile Send_private_message 
Display_posts:   Sort by:   
Page 2 of 2 Posts_count   Goto page: Previous 1, 2
Post_new_topic   Reply_to_topic View_previous_topic :: View_next_topic
 Forum index » Advanced Topics » Puppy Projects
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.1019s ][ Queries: 12 (0.0051s) ][ GZIP on ]