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:
parent
67ef4c8352
commit
78b28b583b
@ -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>
|
2008-01-18 Jerome Rapinat <romjerome@yahoo.fr>
|
||||||
* data/man/gramps.1.in: add missing -l option
|
* data/man/gramps.1.in: add missing -l option
|
||||||
|
|
||||||
|
@ -252,8 +252,14 @@ class Gramplet(object):
|
|||||||
enditer = self.gui.buffer.get_end_iter()
|
enditer = self.gui.buffer.get_end_iter()
|
||||||
end = self.gui.buffer.create_mark(None, enditer, True)
|
end = self.gui.buffer.create_mark(None, enditer, True)
|
||||||
self.gui.textview.scroll_to_mark(end, 0.0, True, 0, 0)
|
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)
|
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):
|
def load_data_to_text(self, pos=0):
|
||||||
if len(self.gui.data) >= pos + 1:
|
if len(self.gui.data) >= pos + 1:
|
||||||
|
@ -254,7 +254,7 @@ class TopSurnamesGramplet(Gramplet):
|
|||||||
break
|
break
|
||||||
self.append_text(("\n" + _("Total unique surnames") + ": %d\n") %
|
self.append_text(("\n" + _("Total unique surnames") + ": %d\n") %
|
||||||
total_surnames)
|
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):
|
def make_tag_size(n, counts, mins=8, maxs=20):
|
||||||
# return font sizes mins to maxs
|
# return font sizes mins to maxs
|
||||||
@ -345,7 +345,7 @@ class SurnameCloudGramplet(Gramplet):
|
|||||||
break
|
break
|
||||||
self.append_text(("\n" + _("Total unique surnames") + ": %d\n") %
|
self.append_text(("\n" + _("Total unique surnames") + ": %d\n") %
|
||||||
total_surnames)
|
total_surnames)
|
||||||
self.append_text((_("Total people") + ": %d") % total_people)
|
self.append_text((_("Total people") + ": %d") % total_people, "begin")
|
||||||
|
|
||||||
class StatsGramplet(Gramplet):
|
class StatsGramplet(Gramplet):
|
||||||
def init(self):
|
def init(self):
|
||||||
|
Loading…
Reference in New Issue
Block a user