Gramplet getting closer to finished(ish)

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Gramplet getting closer to finished(ish)

Stephen Adams
I say finished(ish) because is a project ever truly finished?

I'm working on my options menu.  I want the users to be able to filter out events they don't want and right from the get go I'm a bit puzzled on getting the output I'm looking for.

I recognize that there are 2 different "add_option" methods, one if you are building a menu from scratch and one in the Gramplet class that gives you some access to the Configure Dashboard.

When I add an option such as:
        op = BooleanOption( "Report only living tree members?", False )
        self.add_option( op )

What I see in the configure dashboard is:

Report only living tree members?: checkbox Report only living tree members?

Where the word checkbox is an actual checkbox.  Below that is the save button.

Looking at the code at https://www.gramps-project.org/docs/_modules/gramps/gen/plug/_gramplet.html#Gramplet this looks pretty much like what it's going to do, unless I've missed something in my option creation?  When I looked at https://www.gramps-project.org/docs/_modules/gramps/gen/plug/menu/_boolean.html#BooleanOption I didn't see any hints that I've missed something, but it's easy enough to assume that there was something inherited from Option I overlooked.

Am I better to look into creating my own menu?  I'm going to want a couple of groups of checkboxes together...

Thanks,
Steve

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gramplet getting closer to finished(ish)

prculley
I'd be a bit careful with using those 'docs' pages; they appear to be somewhat out of date in that they represent a much earlier version of the code.  You would be better searching and reading the current code in your release.

I'm not too clear on what your real question is.  If you add several options (BooleanOption, or other types) they will all appear in the GUI before the save button.  If you are not happy with the layout of the options, you will probably have to create your own menu.  Or perhaps override the make_gui_options method from grampletpane.py.  The reports options menus use these type of options on their various panels, so you can see how they usually get set up.

Paul C.

On Fri, Jun 1, 2018 at 10:32 PM, Stephen Adams <[hidden email]> wrote:
I say finished(ish) because is a project ever truly finished?

I'm working on my options menu.  I want the users to be able to filter out events they don't want and right from the get go I'm a bit puzzled on getting the output I'm looking for.

I recognize that there are 2 different "add_option" methods, one if you are building a menu from scratch and one in the Gramplet class that gives you some access to the Configure Dashboard.

When I add an option such as:
        op = BooleanOption( "Report only living tree members?", False )
        self.add_option( op )

What I see in the configure dashboard is:

Report only living tree members?: checkbox Report only living tree members?

Where the word checkbox is an actual checkbox.  Below that is the save button.

Looking at the code at https://www.gramps-project.org/docs/_modules/gramps/gen/plug/_gramplet.html#Gramplet this looks pretty much like what it's going to do, unless I've missed something in my option creation?  When I looked at https://www.gramps-project.org/docs/_modules/gramps/gen/plug/menu/_boolean.html#BooleanOption I didn't see any hints that I've missed something, but it's easy enough to assume that there was something inherited from Option I overlooked.

Am I better to look into creating my own menu?  I'm going to want a couple of groups of checkboxes together...

Thanks,
Steve

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel



------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel
Reply | Threaded
Open this post in threaded view
|

Re: Gramplet getting closer to finished(ish)

Stephen Adams
I appreciate the reply, my main issue at the moment is that the layout seems repetitive.  Option_Label: checkbox Option_label ... I wasn't sure if this was something I had done in error, my glance at the code seems to indicate that it's correct though.

Your reply about creating my own menu is how I was leaning, I'm just concerned about  doing anything custom if there's a perfectly good, established way of doing things.

Steve

On Sat, Jun 2, 2018 at 7:04 PM, Paul Culley <[hidden email]> wrote:
I'd be a bit careful with using those 'docs' pages; they appear to be somewhat out of date in that they represent a much earlier version of the code.  You would be better searching and reading the current code in your release.

I'm not too clear on what your real question is.  If you add several options (BooleanOption, or other types) they will all appear in the GUI before the save button.  If you are not happy with the layout of the options, you will probably have to create your own menu.  Or perhaps override the make_gui_options method from grampletpane.py.  The reports options menus use these type of options on their various panels, so you can see how they usually get set up.

Paul C.

On Fri, Jun 1, 2018 at 10:32 PM, Stephen Adams <[hidden email]> wrote:
I say finished(ish) because is a project ever truly finished?

I'm working on my options menu.  I want the users to be able to filter out events they don't want and right from the get go I'm a bit puzzled on getting the output I'm looking for.

I recognize that there are 2 different "add_option" methods, one if you are building a menu from scratch and one in the Gramplet class that gives you some access to the Configure Dashboard.

When I add an option such as:
        op = BooleanOption( "Report only living tree members?", False )
        self.add_option( op )

What I see in the configure dashboard is:

Report only living tree members?: checkbox Report only living tree members?

Where the word checkbox is an actual checkbox.  Below that is the save button.

Looking at the code at https://www.gramps-project.org/docs/_modules/gramps/gen/plug/_gramplet.html#Gramplet this looks pretty much like what it's going to do, unless I've missed something in my option creation?  When I looked at https://www.gramps-project.org/docs/_modules/gramps/gen/plug/menu/_boolean.html#BooleanOption I didn't see any hints that I've missed something, but it's easy enough to assume that there was something inherited from Option I overlooked.

Am I better to look into creating my own menu?  I'm going to want a couple of groups of checkboxes together...

Thanks,
Steve

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel




------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
Gramps-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gramps-devel