|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
connecting to update signal in uimanagerHi there,
I'm trying to hack gimp. For my purposes, I want to be notified when certain actions become sensitive, or insensitive. The way I wanted to do this was to store the actions I wanted to keep track of and connect to the UIManager's update signal. That way, when an update happened, my callback function would be called and I could loop through my list and check the sensitive property of my actions. My problem is when I connect to the update command, I set the update data (the last parameter), which doesn't end up being what is passed to my callback function. In fact, its a GimpDisplay pointer that's being passed, instead of the pointer to my data. I'm pretty new to GTK as well as GIMP, so please forgive my ignorance. Thanks in advance!
- Jordan
_______________________________________________ Gimp-developer mailing list Gimp-developer@... https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer |
|
|
Re: connecting to update signal in uimanagerJordan Stinson (jordan.stinson83@...) wrote:
> I'm trying to hack gimp. For my purposes, I want to be notified when certain > actions become sensitive, or insensitive. The way I wanted to do this was to > store the actions I wanted to keep track of and connect to the UIManager's > update signal. That way, when an update happened, my callback function would > be called and I could loop through my list and check the sensitive property > of my actions. Wouldn't it make more sense to connect to "notify::sensitive" on the actions you're interested in? Bye, Simon -- simon@... http://simon.budig.de/ _______________________________________________ Gimp-developer mailing list Gimp-developer@... https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer |
|
|
Re: connecting to update signal in uimanagerOn 06/30/2009 02:02 AM, Jordan Stinson wrote:
> Hi there, > > I'm trying to hack gimp. For my purposes, I want to be notified when > certain actions become sensitive, or insensitive. Why not subscribe to changes to whatever it is that changes the sensitivity of your action instead of subscribing to changes of the sensitivity of the action itself? / Martin _______________________________________________ Gimp-developer mailing list Gimp-developer@... https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer |
|
|
Re: connecting to update signal in uimanagerSimon,
I didn't think of subscribing to the notify::sensitive action on the action itself; I suppose I should have though. Martin, I think the thing that changes the sensitivity of the actions is the UIManager via each action group. So, that's what I'm doing or trying to do at least.
Is there any reason why when I subscribe to the "update" signal in the UIManager, the update data I set doesn't make it back to my callback function? Thanks,
Jordan
On Tue, Jun 30, 2009 at 12:54 AM, Martin Nordholts <enselic@...> wrote:
_______________________________________________ Gimp-developer mailing list Gimp-developer@... https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer |
|
|
Re: connecting to update signal in uimanagerOn 06/30/2009 03:23 PM, Jordan Stinson wrote:
> Is there any reason why when I subscribe to the "update" signal in the > UIManager, the update data I set doesn't make it back to my callback > function? > Some code would help here Probably, you using g_signal_connect_swapped() instead of g_signal_connect(), or vice versa. / Martin _______________________________________________ Gimp-developer mailing list Gimp-developer@... https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer |
|
|
|
|
|
Re: connecting to update signal in uimanagerYes, this helps.
Thanks! - Jordan
On Wed, Jul 1, 2009 at 12:41 AM, Martin Nordholts <enselic@...> wrote:
_______________________________________________ Gimp-developer mailing list Gimp-developer@... https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-developer |
| Free embeddable forum powered by Nabble | Forum Help |