Re: How to grey out menu items

2015-09-26 Thread Stefan Salewski
On Sat, 2015-09-26 at 13:14 +0200, Rafał Lużyński wrote: > > On 20.09.2015 01:05 Stefan Salewski wrote: > > [...] May it be better, and is it possible to do that on the fly, > > when the pulldown menu pops on? Maybe a signal which is emitted > > before > > the item becomes visible? Can not find so

Re: How to grey out menu items

2015-09-26 Thread Rafał Lużyński
> On 20.09.2015 01:05 Stefan Salewski wrote: > [...] May it be better, and is it possible to do that on the fly, > when the pulldown menu pops on? Maybe a signal which is emitted before > the item becomes visible? Can not find something like that > unfortunately. You can connect to the "map-event

Re: How to grey out menu items

2015-09-20 Thread Gergely Polonkai
Hello, that depends on what your current approach is. Are you building your UI from code, or do you use Glade .ui files? Best, Gergely On 20 Sep 2015 16:51, "richard boaz" wrote: > >> just a note: doing this "properly" should involve Actions, not widgets. >> >> it is unfortunate that neither GT

Re: How to grey out menu items

2015-09-20 Thread richard boaz
> > > just a note: doing this "properly" should involve Actions, not widgets. > > it is unfortunate that neither GTK's own documentation, along with > most stuff I've read on GUI programming, doesn't emphasize the concept > of Actions as a more basic element of GUI programs. > > and i think this is

Re: How to grey out menu items

2015-09-20 Thread Paul Davis
On Sun, Sep 20, 2015 at 9:30 AM, richard boaz wrote: > Hi Stefan, > > this question also came up a few years ago, where i detailed the solution i > have employed for this problem here: > https://mail.gnome.org/archives/gtk-list/2010-September/msg00047.html > > i subsequently formalized this into a

Re: How to grey out menu items

2015-09-20 Thread richard boaz
Hi Stefan, this question also came up a few years ago, where i detailed the solution i have employed for this problem here: https://mail.gnome.org/archives/gtk-list/2010-September/msg00047.html i subsequently formalized this into a self-contained library, with a complete description of it here: h

Re: How to grey out menu items

2015-09-19 Thread Tristan van Berkom
> On Sep 20, 2015, at 8:05 AM, Stefan Salewski wrote: > > OK, gtk_widget_set_sensitive () will do it. > > But I wonder how to do it for menu items that change sensitively often, > for example COPY menu item. I can set it sensitive whenever something > is selected in my application, for example

How to grey out menu items

2015-09-19 Thread Stefan Salewski
OK, gtk_widget_set_sensitive () will do it. But I wonder how to do it for menu items that change sensitively often, for example COPY menu item. I can set it sensitive whenever something is selected in my application, for example a word in a text editor, and make it insensitive if nothing is select