2008-01-18 Douglas S. Blank <dblank@cs.brynmawr.edu>

* src/plugins/DefaultGramplets.py (SurnameCloudGramplet.main): 
	moved cursor to beginning of text
	* src/DataViews/GrampletView.py (Gramplet.append_text): 
	new scroll_to="begin" to go to start of text area



svn: r9884
This commit is contained in:
Doug Blank 2008-01-18 12:22:44 +00:00
parent 67ef4c8352
commit 78b28b583b
3 changed files with 15 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2008-01-18 Douglas S. Blank <dblank@cs.brynmawr.edu>
* src/plugins/DefaultGramplets.py (SurnameCloudGramplet.main):
moved cursor to beginning of text
* src/DataViews/GrampletView.py (Gramplet.append_text):
new scroll_to="begin" to go to start of text area
2008-01-18 Jerome Rapinat <romjerome@yahoo.fr>
* data/man/gramps.1.in: add missing -l option

View File

@ -252,8 +252,14 @@ class Gramplet(object):
enditer = self.gui.buffer.get_end_iter()
end = self.gui.buffer.create_mark(None, enditer, True)
self.gui.textview.scroll_to_mark(end, 0.0, True, 0, 0)
else:
elif scroll_to == "start": # beginning of this append
self.gui.textview.scroll_to_mark(start, 0.0, True, 0, 0)
elif scroll_to == "begin": # beginning of this append
begin_iter = self.gui.buffer.get_start_iter()
begin = self.gui.buffer.create_mark(None, begin_iter, True)
self.gui.textview.scroll_to_mark(begin, 0.0, True, 0, 0)
else:
raise AttributeError, ("no such cursor position: '%s'" % scroll_to)
def load_data_to_text(self, pos=0):
if len(self.gui.data) >= pos + 1:

View File

@ -254,7 +254,7 @@ class TopSurnamesGramplet(Gramplet):
break
self.append_text(("\n" + _("Total unique surnames") + ": %d\n") %
total_surnames)
self.append_text((_("Total people") + ": %d") % total_people)
self.append_text((_("Total people") + ": %d") % total_people, "begin")
def make_tag_size(n, counts, mins=8, maxs=20):
# return font sizes mins to maxs
@ -345,7 +345,7 @@ class SurnameCloudGramplet(Gramplet):
break
self.append_text(("\n" + _("Total unique surnames") + ": %d\n") %
total_surnames)
self.append_text((_("Total people") + ": %d") % total_people)
self.append_text((_("Total people") + ": %d") % total_people, "begin")
class StatsGramplet(Gramplet):
def init(self):