From 0afdcdc48f5b99b738dfe614ef0d16e7e6132d97 Mon Sep 17 00:00:00 2001 From: Benny Malengier Date: Wed, 19 Mar 2008 11:26:08 +0000 Subject: [PATCH] 2008-03-19 Benny Malengier * 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 --- src/Filters/SideBar/_EventSidebarFilter.py | 2 ++ src/Filters/SideBar/_FamilySidebarFilter.py | 2 ++ src/Filters/SideBar/_MediaSidebarFilter.py | 2 ++ src/Filters/SideBar/_NoteSidebarFilter.py | 2 ++ src/Filters/SideBar/_PersonSidebarFilter.py | 2 ++ src/Filters/SideBar/_PlaceSidebarFilter.py | 2 ++ src/Filters/SideBar/_RepoSidebarFilter.py | 2 ++ src/Filters/SideBar/_SidebarFilter.py | 4 ++++ src/Filters/SideBar/_SourceSidebarFilter.py | 2 ++ 9 files changed, 20 insertions(+) diff --git a/src/Filters/SideBar/_EventSidebarFilter.py b/src/Filters/SideBar/_EventSidebarFilter.py index ff170f800..4d98947c6 100644 --- a/src/Filters/SideBar/_EventSidebarFilter.py +++ b/src/Filters/SideBar/_EventSidebarFilter.py @@ -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') diff --git a/src/Filters/SideBar/_FamilySidebarFilter.py b/src/Filters/SideBar/_FamilySidebarFilter.py index 31c6e2183..53af48ccd 100644 --- a/src/Filters/SideBar/_FamilySidebarFilter.py +++ b/src/Filters/SideBar/_FamilySidebarFilter.py @@ -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') diff --git a/src/Filters/SideBar/_MediaSidebarFilter.py b/src/Filters/SideBar/_MediaSidebarFilter.py index be8a18d22..e4179c541 100644 --- a/src/Filters/SideBar/_MediaSidebarFilter.py +++ b/src/Filters/SideBar/_MediaSidebarFilter.py @@ -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') diff --git a/src/Filters/SideBar/_NoteSidebarFilter.py b/src/Filters/SideBar/_NoteSidebarFilter.py index db01d6713..13b195bd3 100644 --- a/src/Filters/SideBar/_NoteSidebarFilter.py +++ b/src/Filters/SideBar/_NoteSidebarFilter.py @@ -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') diff --git a/src/Filters/SideBar/_PersonSidebarFilter.py b/src/Filters/SideBar/_PersonSidebarFilter.py index 9984a8c1e..90546c15f 100644 --- a/src/Filters/SideBar/_PersonSidebarFilter.py +++ b/src/Filters/SideBar/_PersonSidebarFilter.py @@ -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') diff --git a/src/Filters/SideBar/_PlaceSidebarFilter.py b/src/Filters/SideBar/_PlaceSidebarFilter.py index def747661..d431e58a9 100644 --- a/src/Filters/SideBar/_PlaceSidebarFilter.py +++ b/src/Filters/SideBar/_PlaceSidebarFilter.py @@ -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') diff --git a/src/Filters/SideBar/_RepoSidebarFilter.py b/src/Filters/SideBar/_RepoSidebarFilter.py index 4e45b34c0..fdce88e46 100644 --- a/src/Filters/SideBar/_RepoSidebarFilter.py +++ b/src/Filters/SideBar/_RepoSidebarFilter.py @@ -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') diff --git a/src/Filters/SideBar/_SidebarFilter.py b/src/Filters/SideBar/_SidebarFilter.py index 910820a29..53b77a520 100644 --- a/src/Filters/SideBar/_SidebarFilter.py +++ b/src/Filters/SideBar/_SidebarFilter.py @@ -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 diff --git a/src/Filters/SideBar/_SourceSidebarFilter.py b/src/Filters/SideBar/_SourceSidebarFilter.py index efc1ce288..c80097325 100644 --- a/src/Filters/SideBar/_SourceSidebarFilter.py +++ b/src/Filters/SideBar/_SourceSidebarFilter.py @@ -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')