← Back to team overview

qreator-discuss team mailing list archive

Re: Help with the color editing branch and Glade

 

On Sat, Nov 10, 2012 at 9:47 PM, David Planella
<david.planella@xxxxxxxxxx>wrote:

> 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?
>
>
I have no other idea than to check it like this:

if response == 1:

My guess is that the color selector dialog no longer returns anything of
the type gi.repository.Gtk.GtkResponseType, but that this was not
documented. Thats why I think that there is this third bug..,



> Otherwise I'll just create the dialog in code.
>
> Very hard to tell what would be better. Did you try if your changes are
overwritten by Glade if you do other work with the ui file?

Cheers,
Stefan


> Cheers,
> David.
>
>
> --
> Mailing list: https://launchpad.net/~qreator-discuss
> Post to     : qreator-discuss@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~qreator-discuss
> More help   : https://help.launchpad.net/ListHelp
>
>

References