Separators in XML

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
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

Separators in XML

#1 Post by LazY Puppy »

Hi.

Anyone knows how to create a true separator item in a AppInfo.xml file (RoxApps XML) ?

Currently I'm using a fake separator item:

Code: Select all

<!-- Separator -->
<Item icon="noicon" option="-noaction">
	<Label></Label>
</Item>
Though, would like to use a true separator item instead.

Thanks.
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

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

#2 Post by musher0 »

Not me! :(

But perhaps a good search engine will bring you closer to your goal?
Such as...
http://www.ask.com/web?q=separators+in+ ... pagination

Good luck!
musher0
~~~~~~~~~~
"You want it darker? We kill the flame." (L. Cohen)

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#3 Post by LazY Puppy »

I searched the web already for this. Couldn't find anything that works in the AppInfo.xml file of a RoxApp.

I'd tried everything that I could find related to separators and xml. Nothing worked!

Crap AppInfo.xml file. The JWM xml files can handle separators very well.

Even the "EXPERTS" from IRC chat #rox couldn't give any useful clue. One mentioned the xml files at /etc/xdg/menus. Of course he even didn't understand a minimum of what I was asking for.

After appr. one hour or so I was leaving the chat by message:
Ok, I see. Lots of experts over here.
:evil: Pure Joy! :lol:
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

Re: Separators in XML

#4 Post by MochiMoppel »

LazY Puppy wrote:Currently I'm using a fake separator item:
...
Though, would like to use a true separator item instead.
OK, you are using a fake item, but this gets you a nice, true separator, so where is the problem?
There is no separator tag documented. Most likely there is none.

Code: Select all

<?xml version="1.0"?>
<AppInfo>
  <AppMenu>
    <Item option="-p=Default">
      <Label>Enable pinboard</Label>
    </Item>

	<Item><Label></Label></Item>

    <Item option="-p=">
      <Label>Disable pinboard</Label>
    </Item>
  </AppMenu>
</AppInfo> 
Attachments
false_item_true_separator.png
(10.67 KiB) Downloaded 135 times

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#5 Post by LazY Puppy »

The problem is:

- when scrolling through the menu by keyboard, it is taken as an item, while a true separator will be skipped
- needs to define a No-Action action (otherwise a click on that fake separator executes the default action at *) ;; in AppRun)
AppInfo.xml wrote:<!-- Separator -->
<Item icon="noicon" option="-noaction">
<Label></Label>
</Item>
AppRun wrote:# The-RoxAppMenu-Separator-Item - do not change or remove this !!!
-noaction) # No Action for the fake separator item
echo "Separator clicked" >/dev/null
;;
Using this for years now, though just thought to update this somehow...
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

User avatar
MochiMoppel
Posts: 2084
Joined: Wed 26 Jan 2011, 09:06
Location: Japan

#6 Post by MochiMoppel »

Yes, you are right. Not so nice after all :cry:

My first thought was to create a multiline label

Code: Select all

    <Item option="-p=Default">
      <Label>Enable pinboard
---------------------</Label>
    </Item>
This would avoid the problems you mentioned but would not look great.
Attachments
false_separator.png
(10.94 KiB) Downloaded 122 times

User avatar
LazY Puppy
Posts: 1934
Joined: Fri 21 Nov 2014, 18:14
Location: Germany

#7 Post by LazY Puppy »

I think I will stay with my "solution". :wink:
RSH

"you only wanted to work your Puppies in German", "you are a separatist in that you want Germany to secede from Europe" (musher0) :lol:

No, but I gave my old drum kit away for free to a music store collecting instruments for refugees! :wink:

Post Reply