Re: Changing popup menu of GtkSourceView

Mitko Haralanov via gnome-devtools <[email protected]> Mon, 10 Dec 2018 10:29:56 -0800
Newsgroups gmane.comp.gnome.devtools
Message-ID <CAN1y3k+aRbx-ziGAphZC83Q+D_neVVicWf+DUdimUMKv+x95vA@mail.gmail.com>
--===============7768168624497178458==
Content-Type: multipart/alternative; boundary="000000000000027b4c057caf2909"

--000000000000027b4c057caf2909
Content-Type: text/plain; charset="UTF-8"

Any ideas on this?

Thanks.

On Mon, Oct 15, 2018 at 8:23 AM Mitko Haralanov <[email protected]>
wrote:

> Hi,
>
> I am writing an application that uses GtkSourceView but examines source
> files in read-only mode. As such, I don't need a lot of the menu items in
> the pop-up menu that deal with editing/changing the source code. In
> addition, I would like to add some menu items of my own.
>
> I know that I can connect to the "populate-popup" signal in order to edit
> the menu that is displayed but that only makes sense for adding more items
> to the menu.
>
> How would I go about removing items? I'd like to avoid clearing the entire
> menu as I would like to keep items like "Copy" and "Select All".
>
> Thank you,
> Mitko
>

--000000000000027b4c057caf2909
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Any ideas on this?<div><br></div><div>Thanks.</div></div><=
br><div class=3D"gmail_quote"><div dir=3D"ltr">On Mon, Oct 15, 2018 at 8:23=
 AM Mitko Haralanov &lt;<a href=3D"mailto:[email protected]">voidtrance@=
gmail.com</a>&gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=
=3D"margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir=
=3D"ltr">Hi,<div><br></div><div>I am writing an application that uses GtkSo=
urceView but examines source files in read-only mode. As such, I don&#39;t =
need a lot of the menu items in the pop-up menu that deal with editing/chan=
ging the source code. In addition, I would like to add some menu items of m=
y own.</div><div><br></div><div>I know that I can connect to the &quot;popu=
late-popup&quot; signal in order to edit the menu that is displayed but tha=
t only makes sense for adding more items to the menu.</div><div><br></div><=
div>How would I go about removing items? I&#39;d like to avoid clearing the=
 entire menu as I would like to keep items like &quot;Copy&quot; and &quot;=
Select All&quot;.</div><div><br></div><div>Thank you,</div><div>Mitko</div>=
</div>
</blockquote></div>

--000000000000027b4c057caf2909--

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

_______________________________________________
gnome-devtools mailing list
[email protected]
https://mail.gnome.org/mailman/listinfo/gnome-devtools

--===============7768168624497178458==--