* src/ListModel.py: set the cell renderers to a fixed size

to improve performance
* src/PlaceView.py: set the cell renderers to a fixed size
to improve performance
* src/SourceView.py: set the cell renderers to a fixed size
to improve performance
* src/Sources.py: set the cell renderers to a fixed size
to improve performance
* src/Utils.py: set the cell renderers to a fixed size
to improve performance
* src/gramps_main.py: prevent double loading of place_view


svn: r1931
This commit is contained in:
Don Allingham 2003-07-27 03:50:57 +00:00
parent bc09c11778
commit 1943b4e560
6 changed files with 8 additions and 4 deletions

View File

@ -45,6 +45,7 @@ class ListModel:
cnum = 0 cnum = 0
for name in dlist: for name in dlist:
renderer = gtk.CellRendererText() renderer = gtk.CellRendererText()
renderer.set_fixed_height_from_font(1)
column = gtk.TreeViewColumn(name[0],renderer,text=cnum) column = gtk.TreeViewColumn(name[0],renderer,text=cnum)
column.set_min_width(name[2]) column.set_min_width(name[2])
if name[0] == '': if name[0] == '':

View File

@ -70,6 +70,7 @@ class PlaceView:
colno = 0 colno = 0
for title in self.column_headers: for title in self.column_headers:
renderer = gtk.CellRendererText () renderer = gtk.CellRendererText ()
renderer.set_fixed_height_from_font(1)
column = gtk.TreeViewColumn (title[0], renderer, text=colno) column = gtk.TreeViewColumn (title[0], renderer, text=colno)
colno = colno + 1 colno = colno + 1
column.set_clickable (gtk.TRUE) column.set_clickable (gtk.TRUE)

View File

@ -70,6 +70,7 @@ class SourceView:
for title in self.column_headers: for title in self.column_headers:
renderer = gtk.CellRendererText () renderer = gtk.CellRendererText ()
renderer.set_fixed_height_from_font(1)
column = gtk.TreeViewColumn (title[0], renderer, text=colno) column = gtk.TreeViewColumn (title[0], renderer, text=colno)
colno = colno + 1 colno = colno + 1
column.set_clickable (gtk.TRUE) column.set_clickable (gtk.TRUE)

View File

@ -76,6 +76,7 @@ class SourceSelector:
colno = 0 colno = 0
for title in [ (_('ID'),0,100), (_('Title'),1,150)]: for title in [ (_('ID'),0,100), (_('Title'),1,150)]:
renderer = gtk.CellRendererText () renderer = gtk.CellRendererText ()
renderer.set_fixed_height_from_font(1)
column = gtk.TreeViewColumn (title[0], renderer, text=colno) column = gtk.TreeViewColumn (title[0], renderer, text=colno)
colno = colno + 1 colno = colno + 1
column.set_clickable (gtk.TRUE) column.set_clickable (gtk.TRUE)

View File

@ -464,6 +464,7 @@ def build_columns(tree,list):
cnum = 0 cnum = 0
for name in list: for name in list:
renderer = gtk.CellRendererText() renderer = gtk.CellRendererText()
renderer.set_fixed_height_from_font(1)
column = gtk.TreeViewColumn(name[0],renderer,text=cnum) column = gtk.TreeViewColumn(name[0],renderer,text=cnum)
column.set_min_width(name[1]) column.set_min_width(name[1])
if name[2] >= 0: if name[2] >= 0:

View File

@ -273,6 +273,7 @@ class Gramps:
"""Initializes the GLADE interface, and gets references to the """Initializes the GLADE interface, and gets references to the
widgets that it will need. widgets that it will need.
""" """
self.gtop = gtk.glade.XML(const.gladeFile, "gramps") self.gtop = gtk.glade.XML(const.gladeFile, "gramps")
self.topWindow = self.gtop.get_widget("gramps") self.topWindow = self.gtop.get_widget("gramps")
@ -1254,6 +1255,7 @@ class Gramps:
self.topWindow.set_title("%s - GRAMPS" % name) self.topWindow.set_title("%s - GRAMPS" % name)
self.status_text("") self.status_text("")
self.statusbar.set_progress_percentage(0.0) self.statusbar.set_progress_percentage(0.0)
self.statusbar.set_pulse_step(0.02)
if os.path.exists(autosave): if os.path.exists(autosave):
try: try:
os.remove(autosave) os.remove(autosave)
@ -1570,11 +1572,8 @@ class Gramps:
self.status_text(_('Updating display - this may take a few seconds...')) self.status_text(_('Updating display - this may take a few seconds...'))
else: else:
self.status_text(_('Updating display...')) self.status_text(_('Updating display...'))
if self.place_loaded == 0:
self.place_view.load_places()
self.place_loaded = 1
self.modify_statusbar()
self.views.set_current_page(4) self.views.set_current_page(4)
self.modify_statusbar()
def on_media_activate(self,obj): def on_media_activate(self,obj):
"""Switches to the media view""" """Switches to the media view"""