Re: Changing popup menu of GtkSourceView

Wolfgang Mauer <[email protected]> Tue, 5 Feb 2019 23:34:28 +0100
Newsgroups gmane.comp.gnome.devtools
Message-ID <[email protected]>
This is a multi-part message in MIME format.
--===============6289313580233685488==
Content-Type: multipart/alternative;
 boundary="------------52283A78D24584A8D76281F3"
Content-Language: de-DE

This is a multi-part message in MIME format.
--------------52283A78D24584A8D76281F3
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 7bit

Within the signal you can get the menu an then just 
remove(gtk_container_remove) the items you don't want..


Am 05.02.19 um 22:43 schrieb Mitko Haralanov via gnome-devtools:
> Can no-one help? Are there any GtkSourceView devs reading this forum?
>
> On Mon, Dec 10, 2018 at 10:29 AM Mitko Haralanov <[email protected]> wrote:
>> 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
> _______________________________________________
> gnome-devtools mailing list
> [email protected]
> https://mail.gnome.org/mailman/listinfo/gnome-devtools

--------------52283A78D24584A8D76281F3
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: 7bit

<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <p>Within the signal you can get the menu an then just remove(<font
        face="Ubuntu Mono"><span style="color:#222222;">gtk_container_remove</span></font>)
      the items you don't want..</p>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Am 05.02.19 um 22:43 schrieb Mitko
      Haralanov via gnome-devtools:<br>
    </div>
    <blockquote type="cite"
cite="mid:CAN1y3kJeREB+-UZRisxYzBdbYkJnADu2GxqX3NLDN8gyieXu3A@mail.gmail.com">
      <pre class="moz-quote-pre" wrap="">Can no-one help? Are there any GtkSourceView devs reading this forum?

On Mon, Dec 10, 2018 at 10:29 AM Mitko Haralanov <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a> wrote:
</pre>
      <blockquote type="cite">
        <pre class="moz-quote-pre" wrap="">
Any ideas on this?

Thanks.

On Mon, Oct 15, 2018 at 8:23 AM Mitko Haralanov <a class="moz-txt-link-rfc2396E" href="mailto:[email protected]">&lt;[email protected]&gt;</a> wrote:
</pre>
        <blockquote type="cite">
          <pre class="moz-quote-pre" wrap="">
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
</pre>
        </blockquote>
      </blockquote>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
gnome-devtools mailing list
<a class="moz-txt-link-abbreviated" href="mailto:[email protected]">[email protected]</a>
<a class="moz-txt-link-freetext" href="https://mail.gnome.org/mailman/listinfo/gnome-devtools">https://mail.gnome.org/mailman/listinfo/gnome-devtools</a>
</pre>
    </blockquote>
  </body>
</html>

--------------52283A78D24584A8D76281F3--


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

--===============6289313580233685488==--