How to add markup to a frame_Label (gtkdialog)?
How to add markup to a frame_Label (gtkdialog)?
Hi all,
A burning question :
I'm slowly learning how to use gtkdialog and it has been fun so far.
Now I want to add markup to a frame_Label, but cannot find how to do that.
See this, taken from a tutorial in PCLinuxOS Magazine:
The frame label "Commands Information" is bold. But when you look at the code, no markup is specified.
Obviously, the markup has been defined somewhere else in the script (not shown by the author).
Can markup be defined globally?
I realize this is probably kindergarten level, but that's where I am at this moment.
Thanks a lot for any pointers!
A burning question :
I'm slowly learning how to use gtkdialog and it has been fun so far.
Now I want to add markup to a frame_Label, but cannot find how to do that.
See this, taken from a tutorial in PCLinuxOS Magazine:
The frame label "Commands Information" is bold. But when you look at the code, no markup is specified.
Obviously, the markup has been defined somewhere else in the script (not shown by the author).
Can markup be defined globally?
I realize this is probably kindergarten level, but that's where I am at this moment.
Thanks a lot for any pointers!
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]
Zenity allows a font to be specified apparently????
https://help.gnome.org/users/zenity/stable/text.html.en
___________________________________________________
https://help.gnome.org/users/zenity/stable/text.html.en
___________________________________________________
When I look at code the bold frame heading is actually the normal
text and the button labels are controlled by zenity.
text and the button labels are controlled by zenity.
Code: Select all
<frame Commands Information>
<hbox>
<text> <label>Command:</label> </text>
<entry><variable>VAR1</variable></entry>
</hbox>
<hbox>
<button>
<label>Help</label>
<action>$VAR1 --help | zenity --text-info --width=600 --height=600 --title $"Help" &</action>
</button>
<button>
<label>Whereis</label>
<action>whereis $VAR1 | zenity --text-info --width=400 --height=20 --title $"Whereis" &</action>
</button>
<button>
<label>Which</label>
<action>which $VAR1 | zenity --text-info --width=200 --height=200 --title $"Version" &</action>
</button>
<button>
<label>Version</label>
<action>$VAR1 --version | zenity --text-info --width=200 --height=200 --title $"Version" &</action>
</button>
<button>
<label>Manual</label>
<action>man $VAR1 | zenity --text-info --width=400 --height=500 --title $"Manual" &</action>
</button>
<button>
<label>Kate Manual</label>
<action>man $VAR1 >>'$HOME'/tmp/temp_man.txt</action>
<action>kate '$HOME'/tmp/temp_man.txt</action>
<action>rm -f '$HOME'/tmp/temp_man.txt</action>
</button>
</hbox>
</frame>
Thanks for your reply and for looking into it.
You're right, he used a pre-existing script with zenity in it.
So it looks like the gtkdialog frame_Label does not allow markup.
Or at least not in a way that beginners like me can easily apply.
You're right, he used a pre-existing script with zenity in it.
So it looks like the gtkdialog frame_Label does not allow markup.
Or at least not in a way that beginners like me can easily apply.
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
Try using pango markup
If it doesn't work (I don't recall if it does or not), I could patch gtkdialog to make all label tags accept pango markup.
If it doesn't work (I don't recall if it does or not), I could patch gtkdialog to make all label tags accept pango markup.
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].
Thanks technosaurus,
I saw there is pango in Puppy (libpango, libpango-dev, pangomm_DEV).
Is that enough to use pango?
I tried the example in your link:
But that does not work. Maybe I have to define pango somehow in the script.
( Just found out I cannot add markup anywhere in the script! Better do some more reading first! )
Thanks again.
I saw there is pango in Puppy (libpango, libpango-dev, pangomm_DEV).
Is that enough to use pango?
I tried the example in your link:
Code: Select all
"<span foreground="blue" size="x-large">Blue text</span> is <i>cool</i>!"
( Just found out I cannot add markup anywhere in the script! Better do some more reading first! )
Thanks again.
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
Bert, have you read through 'Color text' page in my gtkdialog manual?
It shouldn't be too hard to add color text to a script using a text widget.
http://murga-linux.com/puppy/viewtopic.php?t=89045
________________________________________
It shouldn't be too hard to add color text to a script using a text widget.
http://murga-linux.com/puppy/viewtopic.php?t=89045
________________________________________
Here's a "grep" of the source code which doesn't seem to show any "markup" aspect for the frame.
Cheers,
s
Code: Select all
# grep markup gtkdialog-0.8.3/src
widget_hscale.c: /* Now we'll position on the markup or the terminating zero */
widget_hscale.c: printf("%s: value=%.16f position=%i markup='%s'\n",
widget_text.c: (value = get_tag_attribute(attr, "use-markup")) &&
widget_text.c: gtk_label_set_use_markup(GTK_LABEL(widget), TRUE);
widget_text.c: if (gtk_label_get_use_markup(GTK_LABEL(var->Widget))) {
widget_text.c: gtk_label_set_markup(GTK_LABEL(var->Widget), text->str);
widget_text.c: if (gtk_label_get_use_markup(GTK_LABEL(var->Widget))) {
widget_text.c: gtk_label_set_markup(GTK_LABEL(var->Widget), text->str);
widget_timer.c: gtk_label_set_markup(GTK_LABEL(var->Widget), text);
#
s
(I didn't get an email notification for this thread since Monday. Only now see Don and seaside have replied. Sorry )
Don, yes, I had already installed your manual, which is truly excellent btw!
Markup in general is no longer a problem. I got the quotes wrong.
Thanks all.
Don, yes, I had already installed your manual, which is truly excellent btw!
Markup in general is no longer a problem. I got the quotes wrong.
Thanks all.
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]
- L18L
- Posts: 3479
- Joined: Sat 19 Jun 2010, 18:56
- Location: www.eussenheim.de/
How to add markup to a frame_Label
... and what about markup in frame_Label", is it solved, and if then how?Bert wrote:Markup in general is no longer a problem. I got the quotes wrong.
Yours curious
Re: How to add markup to a frame_Label
Hi L18L,L18L wrote: ... and what about markup in frame_Label", is it solved, and if then how?
Yours curious
No that isn't solved.
But the question has become less ..burning
I feel a bit like a spoiled child, just been given its first bicycle, reacting with "How many gears...?"
I can see where markup for the frame_label could be very useful, but essential? No, not in the bigger scheme of things.
[url=http://pupsearch.weebly.com/][img]http://pupsearch.weebly.com/uploads/7/4/6/4/7464374/125791.gif[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]
[url=https://startpage.com/do/search?q=host%3Awww.murga-linux.com%2F][img]http://i.imgur.com/XJ9Tqc7.png[/img][/url]