Re: would like a stock button without the text (GtkButton), or a stock GtkToolButton that gets button-pressed-event

Dan Hitt <[email protected]> Fri, 24 Jun 2016 19:59:28 -0700
Newsgroups gmane.comp.gnome.glade.user
Message-ID <CAOphizKd2vp475EHA6yMHF6xtKXjy2k_ypiLt=HZx-bh1DhiVw@mail.gmail.com>
--===============1861359143==
Content-Type: multipart/alternative; boundary=001a11484638cdfe640536117963

--001a11484638cdfe640536117963
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

Ah, thank you very much Gergely.

This is exactly what i need.

A little elaboration here as to what i'm doing: i want to isolate as much
of the gui development to glade as possible, because it will make the app
look more like other apps, and probably be better than anything i could do.

And i want to avoid text on buttons as much as possible for all the usual
reasons.

I thought GtkToolButton was ideal for what i wanted, but it has trouble
getting the button-press-event signal, while a button has no such problem.

Anyhow, i appreciate your help very much, and it lets me get on my way.

dan

On Fri, Jun 24, 2016 at 8:24 AM, Gergely Polonkai <[email protected]>
wrote:

> Add a GtkButton, and inside a GtkImage. If you are using the Glade UI, yo=
u
> have to check the =E2=80=9CAdd custom content=E2=80=9D checkbox in the bu=
tton properties.
>
> Best,
> Gergely
> Thanks Gergely for your suggestion.
>
> But how would i do that entirely in glade, and using only stock images?
>
> TIA for any info.
>
> dan
>
> On Fri, Jun 24, 2016 at 1:04 AM, Gergely Polonkai <[email protected]>
> wrote:
>
>> Hello,
>>
>> how about you create a simple button, and add an image inside? Buttons
>> are containers, you can put anything inside (even a button, but that
>> doesn=E2=80=99t make much sense).
>>
>> Best,
>> Gergely
>>
>>
>>
>> Gergely Polonkai
>> [image: https://]about.me/gergely.polonkai
>>
>> <https://about.me/gergely.polonkai?promo=3Demail_sig&utm_source=3Demail_=
sig&utm_medium=3Demail_sig&utm_campaign=3Dexternal_links>
>>
>> 2016-06-24 7:49 GMT+02:00 Dan Hitt <[email protected]>:
>>
>>> I would like to have a widget, created in glade, that acts like a
>>> button in that it gets button-press-event, and has a stock image, but
>>> does not have any text label.
>>>
>>> A GtkToolButton almost fits the bill, in that it has an image but no
>>> text.
>>>
>>> However, if you put signal handlers on a GtkToolButton, you can see
>>> when it is clicked, or gets a button-released-event, but the
>>> button-pressed-events are unreliable.   In my setup, they only show up
>>> for double clicks.
>>>
>>> On the other hand a GtkButton certainly does get button-pressed-event
>>> and button-released-event, but if it's a stock button, there does not
>>> seem to be a way to tell it to just not show any text.
>>>
>>> I would like to do this entirely in glade, without writing any code,
>>> and using only standard images.
>>>
>>> Is this possible?
>>>
>>> I'm using xubuntu 16.04, and the glade which comes with it which is
>>> 3.18.3.
>>>
>>> Thanks in advance for any clues, and i can provide more details if i'm
>>> leaving something out here.
>>>
>>> dan
>>> _______________________________________________
>>> Glade-users maillist  -  [email protected]
>>> http://lists.ximian.com/mailman/listinfo/glade-users
>>>
>>
>>
>

--001a11484638cdfe640536117963
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div><div><div><div><div><div>Ah, thank you very much Gerg=
ely.<br><br></div>This is exactly what i need.<br><br></div>A little elabor=
ation here as to what i&#39;m doing: i want to isolate as much of the gui d=
evelopment to glade as possible, because it will make the app look more lik=
e other apps, and probably be better than anything i could do.<br><br></div=
>And i want to avoid text on buttons as much as possible for all the usual =
reasons.<br><br></div>I thought GtkToolButton was ideal for what i wanted, =
but it has trouble getting the button-press-event signal, while a button ha=
s no such problem.<br><br></div>Anyhow, i appreciate your help very much, a=
nd it lets me get on my way.<br><br></div>dan<br></div><div class=3D"gmail_=
extra"><br><div class=3D"gmail_quote">On Fri, Jun 24, 2016 at 8:24 AM, Gerg=
ely Polonkai <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" t=
arget=3D"_blank">[email protected]</a>&gt;</span> wrote:<br><blockquote c=
lass=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;=
padding-left:1ex"><p dir=3D"ltr">Add a GtkButton, and inside a GtkImage. If=
 you are using the Glade UI, you have to check the =E2=80=9CAdd custom cont=
ent=E2=80=9D checkbox in the button properties.</p>
<p dir=3D"ltr">Best,<br>
Gergely</p><div class=3D"HOEnZb"><div class=3D"h5">
<div style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex=
"><div dir=3D"ltr"><div><div><div>Thanks Gergely for your suggestion.<br><b=
r></div>But how would i do that entirely in glade, and using only stock ima=
ges?<br><br></div>TIA for any info.<br><br></div>dan<br></div><div class=3D=
"gmail_extra"><br><div class=3D"gmail_quote">On Fri, Jun 24, 2016 at 1:04 A=
M, Gergely Polonkai <span dir=3D"ltr">&lt;<a href=3D"mailto:gergely@polonka=
i.eu" target=3D"_blank">[email protected]</a>&gt;</span> wrote:<br><block=
quote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc=
 solid;padding-left:1ex"><div dir=3D"ltr">Hello,<div><br></div><div>how abo=
ut you create a simple button, and add an image inside? Buttons are contain=
ers, you can put anything inside (even a button, but that doesn=E2=80=99t m=
ake much sense).</div><div><br></div><div>Best,</div><div>Gergely</div></di=
v><div class=3D"gmail_extra"><br clear=3D"all"><div><div data-smartmail=3D"=
gmail_signature"><div dir=3D"ltr"><table style=3D"margin:0px;padding:0px;bo=
rder:0px;outline:0px;font-size:16px;font-family:proxima-nova-1,proxima-nova=
-2,Tahoma,Helvetica,Verdana,sans-serif;vertical-align:baseline;border-spaci=
ng:0px;color:rgb(51,51,51);line-height:22.4px;text-align:center" border=3D"=
0" cellpadding=3D"0" cellspacing=3D"0"><tbody style=3D"margin:0px;padding:0=
px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-famil=
y:inherit;vertical-align:baseline"><tr style=3D"margin:0px;padding:0px;bord=
er:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inher=
it;vertical-align:baseline"><td style=3D"padding:0px;border:0px;outline:0px=
;font-style:inherit;font-size:0px;font-family:inherit;vertical-align:baseli=
ne;text-align:left;width:auto;height:20px">=C2=A0</td></tr><tr style=3D"mar=
gin:0px;padding:0px;border:0px;outline:0px;font-weight:inherit;font-style:i=
nherit;font-family:inherit;vertical-align:baseline"><td style=3D"padding:0p=
x;border:0px;outline:0px;font-style:inherit;font-family:inherit;vertical-al=
ign:baseline;text-align:left;width:auto"><div style=3D"margin:0px;padding:0=
px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-famil=
y:inherit;vertical-align:baseline;line-height:0"><a href=3D"https://about.m=
e/gergely.polonkai?promo=3Demail_sig&amp;utm_source=3Demail_sig&amp;utm_med=
ium=3Demail_sig&amp;utm_campaign=3Dexternal_links" style=3D"margin:0px;padd=
ing:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-=
family:inherit;vertical-align:baseline;color:rgb(43,130,173);text-decoratio=
n:none;display:inline-block" target=3D"_blank"><table style=3D"margin:0px;p=
adding:0px;border:0px;outline:0px;font-weight:inherit;font-style:inherit;fo=
nt-family:inherit;vertical-align:baseline;border-spacing:0px" border=3D"0" =
cellpadding=3D"0" cellspacing=3D"0"><tbody style=3D"margin:0px;padding:0px;=
border:0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:i=
nherit;vertical-align:baseline"><tr style=3D"margin:0px;padding:0px;border:=
0px;outline:0px;font-weight:inherit;font-style:inherit;font-family:inherit;=
vertical-align:baseline"><td style=3D"padding:0px;border:0px;outline:0px;fo=
nt-style:inherit;font-family:inherit;vertical-align:top;width:auto;line-hei=
ght:1" align=3D"left" valign=3D"top"><div style=3D"margin:0px;padding:0px;b=
order:0px;outline:0px;font-weight:bold;font-style:inherit;font-size:18px;fo=
nt-family:proxima-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-a=
lign:baseline;line-height:1;color:rgb(51,51,51)">Gergely Polonkai</div></td=
></tr><tr style=3D"margin:0px;padding:0px;border:0px;outline:0px;font-weigh=
t:inherit;font-style:inherit;font-family:inherit;vertical-align:baseline"><=
td style=3D"padding:0px;border:0px;outline:0px;font-style:inherit;font-fami=
ly:inherit;vertical-align:top;width:auto;line-height:1" align=3D"left" vali=
gn=3D"top"><div style=3D"margin:3px 0px 0px;padding:0px;border:0px;outline:=
0px;font-weight:inherit;font-style:inherit;font-size:12px;font-family:proxi=
ma-nova-1,Proxima-Nova,Helvetica,Arial,sans-serif;vertical-align:baseline">=
<img alt=3D"https://" style=3D"margin:0px;padding:0px;border:0px;outline:0p=
x;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align=
:baseline;display:block;width:0px;min-height:0px;overflow:hidden" height=3D=
"0" width=3D"0">about.me/gergely.polonkai</div></td></tr></tbody></table></=
a></div></td></tr><tr style=3D"margin:0px;padding:0px;border:0px;outline:0p=
x;font-weight:inherit;font-style:inherit;font-family:inherit;vertical-align=
:baseline"><td style=3D"padding:0px;border:0px;outline:0px;font-style:inher=
it;font-size:0px;font-family:inherit;vertical-align:baseline;text-align:lef=
t;width:auto;height:20px"><img src=3D"https://about.me/t/sig?u=3Dgergely.po=
lonkai" style=3D"margin:0px;padding:0px;border:0px;outline:0px;font-weight:=
inherit;font-style:inherit;font-family:inherit;vertical-align:baseline;over=
flow:hidden" height=3D"1" width=3D"1"></td></tr></tbody></table></div></div=
></div>
<br><div class=3D"gmail_quote"><div><div>2016-06-24 7:49 GMT+02:00 Dan Hitt=
 <span dir=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_bla=
nk">[email protected]</a>&gt;</span>:<br></div></div><blockquote class=3D"=
gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-=
left:1ex"><div><div>I would like to have a widget, created in glade, that a=
cts like a<br>
button in that it gets button-press-event, and has a stock image, but<br>
does not have any text label.<br>
<br>
A GtkToolButton almost fits the bill, in that it has an image but no text.<=
br>
<br>
However, if you put signal handlers on a GtkToolButton, you can see<br>
when it is clicked, or gets a button-released-event, but the<br>
button-pressed-events are unreliable.=C2=A0 =C2=A0In my setup, they only sh=
ow up<br>
for double clicks.<br>
<br>
On the other hand a GtkButton certainly does get button-pressed-event<br>
and button-released-event, but if it&#39;s a stock button, there does not<b=
r>
seem to be a way to tell it to just not show any text.<br>
<br>
I would like to do this entirely in glade, without writing any code,<br>
and using only standard images.<br>
<br>
Is this possible?<br>
<br>
I&#39;m using xubuntu 16.04, and the glade which comes with it which is 3.1=
8.3.<br>
<br>
Thanks in advance for any clues, and i can provide more details if i&#39;m<=
br>
leaving something out here.<br>
<br>
dan<br></div></div>
_______________________________________________<br>
Glade-users maillist=C2=A0 -=C2=A0 <a href=3D"mailto:[email protected]=
an.com" target=3D"_blank">[email protected]</a><br>
<a href=3D"http://lists.ximian.com/mailman/listinfo/glade-users" rel=3D"nor=
eferrer" target=3D"_blank">http://lists.ximian.com/mailman/listinfo/glade-u=
sers</a><br>
</blockquote></div><br></div>
</blockquote></div><br></div>
</div>
</div></div></blockquote></div><br></div>

--001a11484638cdfe640536117963--

--===============1861359143==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Glade-users maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/glade-users

--===============1861359143==--