← Back to team overview

qreator-discuss team mailing list archive

Re: Help with the color editing branch and Glade

 

Al 10/11/12 19:28, En/na Stefan Schwarzburg ha escrit:
> 
> 
> On Sat, Nov 10, 2012 at 7:24 PM, David Planella
> <david.planella@xxxxxxxxxx <mailto:david.planella@xxxxxxxxxx>> wrote:
> 
>     Al 10/11/12 16:44, En/na Stefan Schwarzburg ha escrit:
>     > Hi David,
>     >
>     > this is a typical case of documentation that ... well... is not
>     good :-)
>     >
>     > You need to manually edit the action response for the different
>     buttons
>     > in the glade file (because in Glade, the properties are
>     insensitive for
>     > some reason).
>     >
> 
>     Ah, good catch, I would have never come across that. So I guess it's two
>     bugs:
> 
>     - The response properties for each button should be set to the
>       appropriate value
>     - The response properties for each button should be editable in Glade
> 
> 
> Yes. And a third bug: missing documentation.
>  
> 
>     > You can see an edited version here:
>     >
>     > lp:~stefan-schwarzburg/+junk/qreator-color-editing
>     >
>     <https://code.launchpad.net/%7Estefan-schwarzburg/+junk/qreator-color-editing>
>     >
>     > there, cancel returns 0, ok returns 1, help returns 2 (although
>     I'm not
>     > sure if the help response makes any sense...)
>     >
> 
>     I think you might have forgotten to do the last commit, as I can only
>     see my revisions there, but I think I get the idea. I'm more leaning
>     towards setting the response ID in code (if I can), as I'm concerned
>     that Glade might inadvertently revert any manual changes to the .ui
>     file.
> 
> You are right. I have pushed the changes now, but you already know what
> is going on.
> 

Thanks. I had to resort to change the response ids in the .ui file in
the end as well, as they don't seem to be a property of Gtk.Button and I
could not figure out how to set them in the code.

However, this still does not work, as

if response == Gtk.ResponseType.OK:

expects a gi.repository.Gtk.GtkResponseType, and the result that the
buttons return as a response id is an integer. Any other ideas?

Otherwise I'll just create the dialog in code.

Cheers,
David.

Attachment: signature.asc
Description: OpenPGP digital signature


Follow ups

References