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

Gergely Polonkai <[email protected]> Sat, 25 Jun 2016 11:17:44 +0200
Newsgroups gmane.comp.gnome.glade.user
Message-ID <CACczBULh-jUR+q9QPbo7f7jAbFvXX7z9g6DqP9qZuQMyff161w@mail.gmail.com>
--===============1275460483==
Content-Type: multipart/alternative; boundary=001a114b0cfa9378d1053616c2f4

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

Hello,

you=E2=80=99re welcome.

On a side note, could you elaborate on why you need the button-pressed
event instead of clicked? Just out of curiosity, as I rarely see valid use
cases for this signal (and because I prefer using GtkActions).

Best,
Gergely
On Jun 25, 2016 04:59, "Dan Hitt" <[email protected]> wrote:

> 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 d=
o.
>
> 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,
>> you have to check the =E2=80=9CAdd custom content=E2=80=9D checkbox in t=
he button
>> 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
>>>>
>>>
>>>
>>
>

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

<p dir=3D"ltr">Hello,</p>
<p dir=3D"ltr">you=E2=80=99re welcome.</p>
<p dir=3D"ltr">On a side note, could you elaborate on why you need the butt=
on-pressed event instead of clicked? Just out of curiosity, as I rarely see=
 valid use cases for this signal (and because I prefer using GtkActions).</=
p>
<p dir=3D"ltr">Best,<br>
Gergely</p>
<div class=3D"gmail_quote">On Jun 25, 2016 04:59, &quot;Dan Hitt&quot; &lt;=
<a href=3D"mailto:[email protected]">[email protected]</a>&gt; wrote:<br =
type=3D"attribution"><blockquote class=3D"gmail_quote" style=3D"margin:0 0 =
0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=3D"ltr"><div><=
div><div><div><div><div>Ah, thank you very much Gergely.<br><br></div>This =
is exactly what i need.<br><br></div>A little elaboration here as to what i=
&#39;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 proba=
bly be better than anything i could do.<br><br></div>And i want to avoid te=
xt 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 gett=
ing the button-press-event signal, while a button has no such problem.<br><=
br></div>Anyhow, i appreciate your help very much, and 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, Gergely Polonkai <span di=
r=3D"ltr">&lt;<a href=3D"mailto:[email protected]" target=3D"_blank">gerg=
[email protected]</a>&gt;</span> wrote:<br><blockquote class=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 Gl=
ade UI, you have to check the =E2=80=9CAdd custom content=E2=80=9D checkbox=
 in the button properties.</p>
<p dir=3D"ltr">Best,<br>
Gergely</p><div><div>
<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>
</blockquote></div>

--001a114b0cfa9378d1053616c2f4--

--===============1275460483==
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

--===============1275460483==--