2008-03-19 Benny Malengier <benny.malengier@gramps-project.org>
* src/Filters/SideBar/_MediaSidebarFilter.py * src/Filters/SideBar/_SidebarFilter.py * src/Filters/SideBar/_SourceSidebarFilter.py * src/Filters/SideBar/_EventSidebarFilter.py * src/Filters/SideBar/_FamilySidebarFilter.py * src/Filters/SideBar/_PlaceSidebarFilter.py * src/Filters/SideBar/_NoteSidebarFilter.py * src/Filters/SideBar/_RepoSidebarFilter.py * src/Filters/SideBar/_PersonSidebarFilter.py issue 0001941: Filter side bar grows to cover all information in view svn: r10338
This commit is contained in:
parent
6cb7eb77be
commit
0afdcdc48f
@ -81,6 +81,8 @@ class EventSidebarFilter(SidebarFilter):
|
||||
|
||||
def create_widget(self):
|
||||
cell = gtk.CellRendererText()
|
||||
cell.set_property('width', self._FILTER_WIDTH)
|
||||
cell.set_property('ellipsize', self._FILTER_ELLIPSIZE)
|
||||
self.generic.pack_start(cell, True)
|
||||
self.generic.add_attribute(cell, 'text', 0)
|
||||
self.on_filters_changed('Event')
|
||||
|
@ -102,6 +102,8 @@ class FamilySidebarFilter(SidebarFilter):
|
||||
|
||||
def create_widget(self):
|
||||
cell = gtk.CellRendererText()
|
||||
cell.set_property('width', self._FILTER_WIDTH)
|
||||
cell.set_property('ellipsize', self._FILTER_ELLIPSIZE)
|
||||
self.generic.pack_start(cell, True)
|
||||
self.generic.add_attribute(cell, 'text', 0)
|
||||
self.on_filters_changed('Family')
|
||||
|
@ -71,6 +71,8 @@ class MediaSidebarFilter(SidebarFilter):
|
||||
|
||||
def create_widget(self):
|
||||
cell = gtk.CellRendererText()
|
||||
cell.set_property('width', self._FILTER_WIDTH)
|
||||
cell.set_property('ellipsize', self._FILTER_ELLIPSIZE)
|
||||
self.generic.pack_start(cell, True)
|
||||
self.generic.add_attribute(cell, 'text', 0)
|
||||
self.on_filters_changed('MediaObject')
|
||||
|
@ -75,6 +75,8 @@ class NoteSidebarFilter(SidebarFilter):
|
||||
|
||||
def create_widget(self):
|
||||
cell = gtk.CellRendererText()
|
||||
cell.set_property('width', self._FILTER_WIDTH)
|
||||
cell.set_property('ellipsize', self._FILTER_ELLIPSIZE)
|
||||
self.generic.pack_start(cell, True)
|
||||
self.generic.add_attribute(cell, 'text', 0)
|
||||
self.on_filters_changed('Note')
|
||||
|
@ -106,6 +106,8 @@ class PersonSidebarFilter(SidebarFilter):
|
||||
|
||||
def create_widget(self):
|
||||
cell = gtk.CellRendererText()
|
||||
cell.set_property('width', self._FILTER_WIDTH)
|
||||
cell.set_property('ellipsize', self._FILTER_ELLIPSIZE)
|
||||
self.generic.pack_start(cell, True)
|
||||
self.generic.add_attribute(cell, 'text', 0)
|
||||
self.on_filters_changed('Person')
|
||||
|
@ -72,6 +72,8 @@ class PlaceSidebarFilter(SidebarFilter):
|
||||
|
||||
def create_widget(self):
|
||||
cell = gtk.CellRendererText()
|
||||
cell.set_property('width', self._FILTER_WIDTH)
|
||||
cell.set_property('ellipsize', self._FILTER_ELLIPSIZE)
|
||||
self.generic.pack_start(cell, True)
|
||||
self.generic.add_attribute(cell, 'text', 0)
|
||||
self.on_filters_changed('Place')
|
||||
|
@ -81,6 +81,8 @@ class RepoSidebarFilter(SidebarFilter):
|
||||
|
||||
def create_widget(self):
|
||||
cell = gtk.CellRendererText()
|
||||
cell.set_property('width', self._FILTER_WIDTH)
|
||||
cell.set_property('ellipsize', self._FILTER_ELLIPSIZE)
|
||||
self.generic.pack_start(cell, True)
|
||||
self.generic.add_attribute(cell, 'text', 0)
|
||||
self.on_filters_changed('Repository')
|
||||
|
@ -22,6 +22,8 @@
|
||||
|
||||
from gettext import gettext as _
|
||||
import gtk
|
||||
import pango
|
||||
|
||||
import GrampsWidgets
|
||||
import Config
|
||||
|
||||
@ -29,6 +31,8 @@ _RETURN = gtk.gdk.keyval_from_name("Return")
|
||||
_KP_ENTER = gtk.gdk.keyval_from_name("KP_Enter")
|
||||
|
||||
class SidebarFilter:
|
||||
_FILTER_WIDTH = 200
|
||||
_FILTER_ELLIPSIZE = pango.ELLIPSIZE_END
|
||||
|
||||
def __init__(self, dbstate, uistate):
|
||||
self.position = 1
|
||||
|
@ -69,6 +69,8 @@ class SourceSidebarFilter(SidebarFilter):
|
||||
|
||||
def create_widget(self):
|
||||
cell = gtk.CellRendererText()
|
||||
cell.set_property('width', self._FILTER_WIDTH)
|
||||
cell.set_property('ellipsize', self._FILTER_ELLIPSIZE)
|
||||
self.generic.pack_start(cell, True)
|
||||
self.generic.add_attribute(cell, 'text', 0)
|
||||
self.on_filters_changed('Source')
|
||||
|
Loading…
Reference in New Issue
Block a user