Made a welcome to gramps gadget

svn: r9594
This commit is contained in:
Doug Blank 2007-12-26 18:32:09 +00:00
parent bb642337f9
commit a8769e138c
2 changed files with 31 additions and 2 deletions

View File

@ -558,7 +558,7 @@ class MyGrampsView(PageView.PageView):
cnt += 1
def load_gadgets(self):
self.column_count = 3
self.column_count = 1
retval = []
filename = GADGET_FILENAME
if filename and os.path.exists(filename):
@ -578,7 +578,8 @@ class MyGrampsView(PageView.PageView):
else:
# give defaults as currently known
for item in AVAILABLE_GADGETS:
retval.append((item["name"], item))
if item["name"] == "Welcome Gadget":
retval.append(("Welcome Gadget", item))
return retval
def save(self, *args):

View File

@ -352,6 +352,26 @@ class TODOGadget(Gadget):
self.gui.textview.set_editable(True)
self.append_text("Enter your TODO list here.")
def make_welcome_content(gui):
text = """
Welcome to GRAMPS!
GRAMPS is a software package designed for genealogical research. Although similar to other genealogical programs, GRAMPS offers some unique and powerful features.
GRAMPS is an Open Source Software package, which means you are free to make copies and distribute it to anyone you like. It's developed and maintained by a worldwide team of volunteers whose goal is to make GRAMPS powerful, yet easy to use.
Getting Started
The first thing you must do is to create a new Family Tree. To create a new Family Tree (sometimes called a database) select "Family Trees" from the menu.... TODO
You are currently reading from the "My Gramps" page, where you can add your own gadgets.
You can right-click on the background of this page to add additional gadgets and change the number of columns. You can also drag the Properties button to reposition the gadget on this page, and detach the gadget to float above GRAMPS. If you close GRAMPS with a gadget detached, it will re-opened detached the next time you start GRAMPS.
"""
gui.set_text(text)
register(type="gadget",
name="Families Gadget",
height=300,
@ -408,3 +428,11 @@ register(type="gadget",
title="TODO List",
)
register(type="gadget",
name="Welcome Gadget",
height=300,
expand=True,
content = make_welcome_content,
title="Welcome to GRAMPS!",
)