! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
Allow on-click action on the displayed text
Status:
RESOLVED: FIXED
Severity:
enhancement
Product:
Xfce4-genmon-plugin
Component:
General

Comments

Description Dieter Plaetinck 2007-08-05 18:35:47 CEST
User-Agent:       Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.1.5) Gecko/20070728 Firefox/2.0.0.5
Build Identifier: 

Hi, for now the <click> action gets bound to the <img>.  It seems that if your script doesn't use an icon you cannot use the on-click action.
I propose a new syntax that makes use of nesting.
So instead of:
echo "<txt>blah</txt><img>icon.png</img><click>click action</click>"
We would put the <click> element *inside* another element, like this:
echo "<txt>blah<click>action1</click></txt><img>icon.png<click>action2</click></img>"

This would then assign the action1 to the text, and action2 to the image, so you have much more control :-)

We could even do the same for the tooltip ... I think this would rock :-)

Reproducible: Always

Steps to Reproduce:
Comment 1 Julien Devemy 2007-08-21 13:46:07 CEST
Hi,

I think it's a great idea ! I'll work on it soonly. But I don't understand how to create a click action on the tooltip ???

Bye,
Jujucece
Comment 2 Dieter Plaetinck 2007-08-21 14:05:19 CEST
okay, when I said "We could even do the same for the tooltip ..." I should have been more clear.
What I meant was we could also put the tooltip element inside the img and txt elements, so we could have different tooltips depending if you hover over the img or over the text.  (if a user wouldn't want this, he could create a "global" tooltip just like you can do now, and if you would have a tooltip element inside an img or txt element it would "override")
Comment 3 Julien Devemy 2007-08-21 14:09:43 CEST
Ah OK, I guess it...

That's also a good idea.

I'll definitely work on that feature.

Bye,
Jujucece
Comment 4 OmegaPhil 2012-03-06 22:25:47 CET
Commenting to indicate theres still interest in this.
Comment 5 houghi 2012-06-11 22:07:52 CEST
I am also still interested in this.
Comment 6 Landry Breuil editbugs 2014-11-23 21:42:49 CET
Mass-reassign all bugs from florian@ to goodies-dev@, thanks for the maintenance work! (and sorry for the bugmail spam..)
Comment 7 ToZ editbugs 2016-06-19 05:16:48 CEST
Created attachment 6708 
Adds <txtclick> functionality

Attached is a patch (based on the current git tree) that adds the ability to click on the text field (value) and run a command. A new tag has been added:

<txtclick> </txtclick>

that holds the name of the executable to run when clicking on the text (value) field. You can still use <click></click> to run commands on the image.

Example GenMon command:

echo "<img>/home/toz/.icons/arch.png</img><txt>Test</txt><click>gcolor2</click><txtclick>galculator</txtclick><tool>This is a tool tip</tool>"


Would appreciate some testing and feedback.
Comment 8 ToZ editbugs 2016-07-02 15:54:53 CEST
<txtclick> functionality added with this commit: http://git.xfce.org/panel-plugins/xfce4-genmon-plugin/commit/?id=b3490f60ba6df2292ad1498b559ec3f2a4a25665.

Example GenMon command:

echo "<img>/home/toz/.icons/arch.png</img><txt>Test</txt><click>gcolor2</click><txtclick>galculator</txtclick><tool>This is a tool tip</tool>"

Will leave this ticket open for individual tooltip part.
Comment 9 OmegaPhil 2016-07-14 20:43:53 CEST
Sorry for the delay in reaching this - I can confirm it works here (so you've basically turned the output text into a button).

Shame its GTK3 now.
Comment 10 ToZ editbugs 2017-10-30 17:28:48 CET
This enhancement was released in version 3.99 (GTK3 only). Resolving.

Bug #3437

Reported by:
Dieter Plaetinck
Reported on: 2007-08-05
Last modified on: 2017-10-30

People

Assignee:
Xfce-Goodies Maintainers
CC List:
5 users

Version

Version:
3.2 or older

Attachments

Additional information