From 655f573a33091a6e17d67419ac825fc7003efaf7 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Thu, 18 May 2006 01:39:50 +0000 Subject: [PATCH] 2006-05-17 Don Allingham * src/GrampsCfg.py: pychecker fixes * src/GrampsWidgets.py: pychecker fixes * src/glade/gramps.glade: fix text entry -> label * src/NameDisplay.py: pychecker fixes * src/DisplayState.py: pychecker fixes * src/GrampsDisplay.py: pychecker fixes * src/DateEdit.py: pychecker fixes * src/gramps_main.py: pychecker fixes * src/DbLoader.py: pychecker fixes svn: r6701 --- gramps2/ChangeLog | 11 + gramps2/src/DateEdit.py | 1 - gramps2/src/DbLoader.py | 1 - gramps2/src/DisplayState.py | 1 + gramps2/src/GrampsCfg.py | 7 - gramps2/src/GrampsDisplay.py | 1 - gramps2/src/GrampsWidgets.py | 1 - gramps2/src/NameDisplay.py | 12 +- gramps2/src/glade/gramps.glade | 399 +++++++++------------------------ gramps2/src/gramps_main.py | 10 - 10 files changed, 121 insertions(+), 323 deletions(-) diff --git a/gramps2/ChangeLog b/gramps2/ChangeLog index 562f0e7d2..5e2f53a5d 100644 --- a/gramps2/ChangeLog +++ b/gramps2/ChangeLog @@ -1,3 +1,14 @@ +2006-05-17 Don Allingham + * src/GrampsCfg.py: pychecker fixes + * src/GrampsWidgets.py: pychecker fixes + * src/glade/gramps.glade: fix text entry -> label + * src/NameDisplay.py: pychecker fixes + * src/DisplayState.py: pychecker fixes + * src/GrampsDisplay.py: pychecker fixes + * src/DateEdit.py: pychecker fixes + * src/gramps_main.py: pychecker fixes + * src/DbLoader.py: pychecker fixes + 2006-05-17 Alex Roitman * src/ArgHandler.py: Adapt to recent changes. * src/BasicUtils.py (update_empty): Clean up callback. diff --git a/gramps2/src/DateEdit.py b/gramps2/src/DateEdit.py index 8b1f75c22..39a9a7a21 100644 --- a/gramps2/src/DateEdit.py +++ b/gramps2/src/DateEdit.py @@ -68,7 +68,6 @@ import gtk.glade from RelLib import Date import DateHandler import const -import Utils import GrampsDisplay import ManagedWindow diff --git a/gramps2/src/DbLoader.py b/gramps2/src/DbLoader.py index d667a97eb..7b3e0812a 100644 --- a/gramps2/src/DbLoader.py +++ b/gramps2/src/DbLoader.py @@ -48,7 +48,6 @@ import gtk #------------------------------------------------------------------------- import const import Config -import Errors import Mime import GrampsDb import Utils diff --git a/gramps2/src/DisplayState.py b/gramps2/src/DisplayState.py index 7f7efa661..245e6a3a3 100644 --- a/gramps2/src/DisplayState.py +++ b/gramps2/src/DisplayState.py @@ -26,6 +26,7 @@ # #------------------------------------------------------------------------- from cStringIO import StringIO +from gettext import gettext as _ #------------------------------------------------------------------------- # diff --git a/gramps2/src/GrampsCfg.py b/gramps2/src/GrampsCfg.py index ab2b60be3..fcf47be3d 100644 --- a/gramps2/src/GrampsCfg.py +++ b/gramps2/src/GrampsCfg.py @@ -25,7 +25,6 @@ # Standard python modules # #------------------------------------------------------------------------- -import sets from gettext import gettext as _ #------------------------------------------------------------------------- @@ -43,7 +42,6 @@ import gtk.glade #------------------------------------------------------------------------- import Config import DateHandler -import GrampsDisplay import ManagedWindow from GrampsWidgets import * @@ -60,8 +58,6 @@ _surname_styles = [ _("Icelandic style"), ] -_pallette = "#fce94f:#edd400:#c4a000:#facf3e:#f57900:#ce5c00:#e9b96e:#c17d11:#8f5902:#8ae234:#73d216:#4e9a06:#729fcf:#3465a4:#204a87:#ad7fa8:#7ff07b:#5c3566:#ef2929:#cc0000:#a40000" - def set_calendar_date_format(): format_list = DateHandler.get_date_formats() DateHandler.set_format(Config.get_date_format(format_list)) @@ -320,7 +316,4 @@ class GrampsPreferences(ManagedWindow.ManagedWindow): def build_menu_names(self,obj): return (_('Preferences'),None) -if __name__ == "__main__": - GrampsPreferences(None,None) - gtk.main() diff --git a/gramps2/src/GrampsDisplay.py b/gramps2/src/GrampsDisplay.py index d1c3c3bc2..67dfdcdf1 100644 --- a/gramps2/src/GrampsDisplay.py +++ b/gramps2/src/GrampsDisplay.py @@ -18,7 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -import gobject from QuestionDialog import ErrorDialog def help(target): diff --git a/gramps2/src/GrampsWidgets.py b/gramps2/src/GrampsWidgets.py index fc584b2f4..9d91f39d7 100644 --- a/gramps2/src/GrampsWidgets.py +++ b/gramps2/src/GrampsWidgets.py @@ -21,7 +21,6 @@ # $Id$ import cgi -import locale import os from gettext import gettext as _ diff --git a/gramps2/src/NameDisplay.py b/gramps2/src/NameDisplay.py index 2e5cc116a..ea9737a61 100644 --- a/gramps2/src/NameDisplay.py +++ b/gramps2/src/NameDisplay.py @@ -173,7 +173,7 @@ class NameDisplay: else: return "%s, %s" % (last, first) - def _fnln(self,name,nickname=""): + def _fnln(self,name): """ Prints the Western style first name, last name style. Typically this is:: @@ -233,7 +233,7 @@ class NameDisplay: else: return "%s %s" % (first, last) - def _lnfn(self,name,nickname=u""): + def _lnfn(self,name): """ Prints the Western style last name, first name style. Typically this is:: @@ -318,9 +318,9 @@ class NameDisplay: """ name = person.get_primary_name() if name.display_as == Name.LNFN: - return self._lnfn(name,"") + return self._lnfn(name) else: - return self._fnln(name,"") + return self._fnln(name) def display_formal(self,person): """ @@ -336,9 +336,9 @@ class NameDisplay: """ name = person.get_primary_name() if name.display_as == Name.LNFN: - return self._lnfn(name,'') + return self._lnfn(name) else: - return self._fnln(name,'') + return self._fnln(name) def display_name(self,name): """ diff --git a/gramps2/src/glade/gramps.glade b/gramps2/src/glade/gramps.glade index 9dc0a3b7d..eec372948 100644 --- a/gramps2/src/glade/gramps.glade +++ b/gramps2/src/glade/gramps.glade @@ -1330,22 +1330,6 @@ - - - True - False - True - True - - - 4 - 5 - 1 - 2 - fill - - - True @@ -1374,22 +1358,6 @@ - - - True - False - True - True - - - 6 - 7 - 1 - 2 - fill - - - True @@ -1449,6 +1417,38 @@ + + + + True + False + True + True + + + 4 + 5 + 1 + 2 + + + + + + + True + False + True + True + + + 6 + 7 + 1 + 2 + + + 0 @@ -8523,23 +8523,6 @@ Text Beside Icons - - - True - False - True - True - - - 1 - 2 - 0 - 1 - fill - fill - - - True @@ -8889,6 +8872,23 @@ Text Beside Icons fill + + + + True + False + True + True + + + 1 + 2 + 0 + 1 + fill + + + 0 @@ -9889,23 +9889,6 @@ Text Beside Icons - - - True - False - True - True - - - 1 - 2 - 0 - 1 - fill - fill - - - True @@ -9980,6 +9963,23 @@ Text Beside Icons + + + + True + False + True + True + + + 1 + 2 + 0 + 1 + fill + + + 0 @@ -11891,205 +11891,6 @@ Text Beside Icons - - True - - GTK_WINDOW_TOPLEVEL - GTK_WIN_POS_NONE - False - 500 - 450 - True - False - True - False - False - GDK_WINDOW_TYPE_HINT_DIALOG - GDK_GRAVITY_NORTH_WEST - True - False - False - - - - True - False - 0 - - - - True - GTK_BUTTONBOX_END - - - - True - True - True - gtk-cancel - True - GTK_RELIEF_NORMAL - True - -6 - - - - - - True - True - True - gtk-ok - True - GTK_RELIEF_NORMAL - True - -5 - - - - - 0 - False - True - GTK_PACK_END - - - - - - 6 - True - False - 6 - - - - True - - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - False - 6 - - - - True - Title: - False - False - GTK_JUSTIFY_LEFT - False - False - 0.5 - 0.5 - 0 - 0 - PANGO_ELLIPSIZE_NONE - -1 - False - 0 - - - 0 - False - False - - - - - - True - True - True - True - 0 - - True - * - False - - - 0 - True - True - - - - - 0 - False - True - - - - - - True - True - GTK_POLICY_NEVER - GTK_POLICY_AUTOMATIC - GTK_SHADOW_IN - GTK_CORNER_TOP_LEFT - - - - True - True - True - False - True - GTK_JUSTIFY_LEFT - GTK_WRAP_NONE - True - 0 - 0 - 0 - 0 - 0 - 0 - - - - - - 0 - True - True - - - - - 0 - True - True - - - - - - True GRAMPS @@ -12697,7 +12498,7 @@ Text Beside Icons 3 0 1 - fill + @@ -13171,16 +12972,22 @@ Text Beside Icons 0 - + True - True - True - True - 0 - - True - * - False + + False + False + GTK_JUSTIFY_LEFT + False + False + 0 + 0.5 + 0 + 0 + PANGO_ELLIPSIZE_NONE + -1 + False + 0 0 @@ -13673,27 +13480,6 @@ Text Beside Icons - - - True - Very Low -Low -Normal -High -Very High - False - True - - - 1 - 2 - 2 - 3 - fill - fill - - - True @@ -13724,6 +13510,27 @@ Very High + + + + True + Very Low +Low +Normal +High +Very High + False + True + + + 1 + 2 + 2 + 3 + fill + + + False diff --git a/gramps2/src/gramps_main.py b/gramps2/src/gramps_main.py index 5f7ca35fc..3294f8baf 100644 --- a/gramps2/src/gramps_main.py +++ b/gramps2/src/gramps_main.py @@ -40,7 +40,6 @@ import ViewManager import GrampsDb import ArgHandler import Config -import GrampsCfg import const import Errors import TipOfDay @@ -62,7 +61,6 @@ else: relation_icon = "relation.svg" def register_stock_icons (): - import os items = [ (os.path.join(const.image_dir,person_icon), ('gramps-person',_('Person'),gtk.gdk.CONTROL_MASK,0,'')), @@ -192,8 +190,6 @@ class Gramps: self.researcher_key_update) Config.client.notify_add("/apps/gramps/interface/statusbar", self.statusbar_key_update) - Config.client.notify_add("/apps/gramps/interface/toolbar", - self.toolbar_key_update) if Config.get(Config.USE_TIPS): TipOfDay.TipOfDay(self.vm.uistate) @@ -237,10 +233,4 @@ class Gramps: def statusbar_key_update(self,client,cnxn_id,entry,data): self.vm.uistate.modify_statusbar() - def toolbar_key_update(self,client,cnxn_id,entry,data): - the_style = Config.get(Config.TOOLBAR) - if the_style == -1: - self.vm.toolbar.unset_style() - else: - self.vm.toolbar.set_style(the_style)