From 1e89380047465392e762a52784f146f90b3f7ad4 Mon Sep 17 00:00:00 2001 From: Don Allingham Date: Wed, 27 Nov 2002 05:56:23 +0000 Subject: [PATCH] Removed unneeded pygtk calls svn: r1210 --- example/gramps/data.gramps | Bin 3720 -> 3734 bytes src/AddMedia.py | 6 -- src/AddSpouse.py | 142 +------------------------------------ src/AddrEdit.py | 5 -- src/AttrEdit.py | 5 -- src/AutoComp.py | 5 -- src/Bookmarks.py | 5 -- src/ChooseParents.py | 5 -- src/DateEdit.py | 5 -- src/DbPrompter.py | 5 -- src/DisplayTrace.py | 5 -- src/EditPerson.py | 5 -- src/EditPlace.py | 5 -- src/EditSource.py | 5 -- src/EventEdit.py | 5 -- src/FamilyView.py | 5 -- src/Filter.py | 5 -- src/Find.py | 5 -- src/GenericFilter.py | 5 -- src/GrampsCfg.py | 5 -- src/ImageSelect.py | 11 +-- src/ImgManip.py | 5 -- src/ListModel.py | 5 -- src/LocEdit.py | 4 -- src/Marriage.py | 4 -- src/MediaView.py | 4 -- src/MergeData.py | 4 -- src/NameEdit.py | 4 -- src/NoteEdit.py | 4 -- src/PaperMenu.py | 4 -- src/PedView.py | 7 +- src/PlaceView.py | 4 -- src/Plugins.py | 4 -- src/QuestionDialog.py | 5 -- src/QuickAdd.py | 4 -- src/RelImage.py | 4 -- src/Report.py | 4 -- src/SelectChild.py | 4 -- src/SourceView.py | 4 -- src/Sources.py | 4 -- src/StartupDialog.py | 5 -- src/StyleEditor.py | 4 -- src/UrlEdit.py | 4 -- src/Utils.py | 4 -- src/VersionControl.py | 4 -- src/gramps.py | 11 --- src/gramps_main.py | 5 -- 47 files changed, 9 insertions(+), 354 deletions(-) diff --git a/example/gramps/data.gramps b/example/gramps/data.gramps index 3e43c08f8dcea48227972f74d871445b338262ed..f0d1b873a27675608c4488955dbe4890d8674cfd 100644 GIT binary patch delta 3695 zcmV-#4v_JP9hMyjABzYGQC#Ga2TXt7EaB4ZC286;ZJHq77ZiuXg0bjWtwb7>oHYOb zhL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N9YfdPdP0+`{j2{Gk?{r`he9D`XsNKB!uM!i3%8p zD+-rn@kB&?giceE(U|PODOxo==UFyqNwH8DmhTq@1wCcxdOHrU=)AnDG@unzt+4+*S%@o|4`tEFQ` z$Hmfam%kL%8~HUuF_sU#;z!XzS&{*Rg8nFE`-F8+?P$&0PM)uNSEmv#sf2&M2R6^Z z1dW%Z$ZVD-<)?G|Kf3GE3bG_7vx1Jd(jG2p4|_4+N;b=%U@3h@@|_@);?Fa|$6yKR zpHVHHzCnJlBtPiQ;>kAh>h%WgQ9-4#mY?l#9S3iv8!YJty>GLJCEX;0>D>P|qYuwW zmY;6^JIQAMLe;S`wP~}Jw!cxN?HkeF+#+hA>n-VeFX(f1oTGuPyCmzHkp-WvLZbY} zUju2pB#n(opDsVyqN4U~1f3;8$B1C9`{!>?zq4H7YqIenD8ar{$KzA|8^b{ diff --git a/src/AddMedia.py b/src/AddMedia.py index 7e6b9133d..dd5a9c2e3 100644 --- a/src/AddMedia.py +++ b/src/AddMedia.py @@ -43,12 +43,6 @@ from intl import gettext as _ # #------------------------------------------------------------------------- from QuestionDialog import ErrorDialog - -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk.glade #------------------------------------------------------------------------- diff --git a/src/AddSpouse.py b/src/AddSpouse.py index 5aaf41b6f..a8823ec7a 100644 --- a/src/AddSpouse.py +++ b/src/AddSpouse.py @@ -37,11 +37,6 @@ from intl import gettext as _ # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gobject import gtk.glade @@ -116,7 +111,7 @@ class AddSpouse: when a row has been selected. """ - model,iter = self.selection.get_selected() + model,iter = self.slist.get_selected() if iter: self.ok.set_sensitive(1) else: @@ -157,7 +152,7 @@ class AddSpouse: selected from the list. """ - model,iter = self.selection.get_selected() + model,iter = self.slist.get_selected() if not iter: return @@ -224,137 +219,4 @@ class AddSpouse: continue self.slist.add([data[0],data[1],data[3],data[5],data[6]],key,person==key) -#------------------------------------------------------------------------- -# -# SetSpouse -# -#------------------------------------------------------------------------- -class SetSpouse: - """ - Displays the AddSpouse dialog, allowing the user to create a new - family with the passed person as one spouse, and another person to - be selected. - """ - def __init__(self,db,person,family,update,addperson): - """ - Displays the AddSpouse dialog box. - db - database to which to add the new family - person - the current person, will be one of the parents - update - function that updates the family display - addperson - function that adds a person to the person view - """ - self.db = db - self.update = update - self.person = person - self.family = family - self.addperson = addperson - - self.glade = gtk.glade.XML(const.gladeFile, "spouseDialog") - - self.rel_combo = self.glade.get_widget("rel_combo") - self.relation_type = self.glade.get_widget("rel_type") - self.spouse_list = self.glade.get_widget("spouseList") - self.relation_def = self.glade.get_widget("reldef") - - self.rel_combo.set_popdown_strings(const.familyRelations) - title = _("Choose Spouse/Partner of %s") % GrampsCfg.nameof(person) - self.glade.get_widget("spouseTitle").set_text(title) - - self.glade.signal_autoconnect({ - "on_select_spouse_clicked" : self.select_spouse_clicked, - "on_new_spouse_clicked" : self.new_spouse_clicked, - "on_rel_type_changed" : self.relation_type_changed, - "on_combo_insert_text" : Utils.combo_insert_text, - "destroy_passed_object" : Utils.destroy_passed_object - }) - - self.relation_type.set_text(_("Married")) - - def new_spouse_clicked(self,obj): - """ - Called when the spouse to be added does not exist, and needs - to be created and added to the database - """ - import QuickAdd - - relation = const.save_frel(self.relation_type.get_text()) - if relation == "Partners": - if self.person.getGender() == RelLib.Person.male: - gen = "male" - else: - gen = "female" - elif self.person.getGender() == RelLib.Person.male: - gen = "female" - else: - gen = "male" - QuickAdd.QuickAdd(self.db,gen,self.update_list) - - def update_list(self,person): - self.addperson(person) - self.relation_type_changed(self.relation_type) - - def select_spouse_clicked(self,obj): - """ - Called when the spouse to be added already exists and has been - selected from the list. - """ - if len(self.spouse_list.selection) == 0: - return - row = self.spouse_list.selection[0] - spouse = self.db.getPerson(self.spouse_list.get_row_data(row)) - - # don't do anything if the marriage already exists - for f in self.person.getFamilyList(): - if spouse == f.getMother() or spouse == f.getFather(): - Utils.destroy_passed_object(obj) - return - - Utils.modified() - if self.family.getFather() == self.person: - self.family.setMother(spouse) - else: - self.family.setFather(spouse) - - spouse.addFamily(self.family) - - reltype = self.relation_type.get_text() - self.family.setRelationship(const.save_frel(reltype)) - Utils.destroy_passed_object(obj) - self.update(self.family) - - def relation_type_changed(self,obj): - """ - Called whenever the relationship type changes. Rebuilds the - the potential spouse list. - """ - text = obj.get_text() - self.relation_def.set_text(const.relationship_def(text)) - - # determine the gender of the people to be loaded into - # the potential spouse list. If Partners is selected, use - # the same gender as the current person. - gender = self.person.getGender() - if text == _("Partners"): - if gender == RelLib.Person.male: - sgender = const.female - else: - sgender = const.male - else: - if gender == RelLib.Person.male: - sgender = const.male - else: - sgender = const.female - - index = 0 - self.spouse_list.clear() - self.spouse_list.freeze() - for key in self.db.getPersonKeys(): - data = self.db.getPersonDisplay(key) - if data[2] == sgender: - continue - - self.spouse_list.append([data[0],data[3],data[5],data[6]]) - self.spouse_list.set_row_data(index,key) - index = index + 1 - self.spouse_list.thaw() diff --git a/src/AddrEdit.py b/src/AddrEdit.py index c2f7b86fb..2a50ca338 100644 --- a/src/AddrEdit.py +++ b/src/AddrEdit.py @@ -27,11 +27,6 @@ mechanism for the user to edit address information. # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk.glade #------------------------------------------------------------------------- diff --git a/src/AttrEdit.py b/src/AttrEdit.py index 87f3ee602..ce4dfb4a8 100644 --- a/src/AttrEdit.py +++ b/src/AttrEdit.py @@ -30,11 +30,6 @@ __version__ = "$Revision$" # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk.glade #------------------------------------------------------------------------- diff --git a/src/AutoComp.py b/src/AutoComp.py index 9188d369f..38e9e6e57 100644 --- a/src/AutoComp.py +++ b/src/AutoComp.py @@ -39,11 +39,6 @@ import string # GNOME modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk #------------------------------------------------------------------------- diff --git a/src/Bookmarks.py b/src/Bookmarks.py index d31e5054a..64da9c652 100644 --- a/src/Bookmarks.py +++ b/src/Bookmarks.py @@ -28,11 +28,6 @@ __version__ = "$Revision$" # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk import gnome.ui diff --git a/src/ChooseParents.py b/src/ChooseParents.py index c1bad335a..756dcb560 100644 --- a/src/ChooseParents.py +++ b/src/ChooseParents.py @@ -38,11 +38,6 @@ from intl import gettext as _ # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gobject import gtk.glade diff --git a/src/DateEdit.py b/src/DateEdit.py index 4618e6a2a..b87920a97 100644 --- a/src/DateEdit.py +++ b/src/DateEdit.py @@ -34,11 +34,6 @@ __version__ = "$Revision$" # GNOME modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk import gtk.gdk diff --git a/src/DbPrompter.py b/src/DbPrompter.py index 08f8283b1..23582d6bd 100644 --- a/src/DbPrompter.py +++ b/src/DbPrompter.py @@ -24,11 +24,6 @@ # GNOME modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk import gtk.glade diff --git a/src/DisplayTrace.py b/src/DisplayTrace.py index 75d09b114..b9dd97e4d 100644 --- a/src/DisplayTrace.py +++ b/src/DisplayTrace.py @@ -32,11 +32,6 @@ import sys # GTK/GNOME modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk.glade #------------------------------------------------------------------------- diff --git a/src/EditPerson.py b/src/EditPerson.py index 316b7f3a6..abcc74542 100644 --- a/src/EditPerson.py +++ b/src/EditPerson.py @@ -31,11 +31,6 @@ import pickle # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gobject import gtk import gnome.ui diff --git a/src/EditPlace.py b/src/EditPlace.py index 3fe816aaa..10f56124e 100644 --- a/src/EditPlace.py +++ b/src/EditPlace.py @@ -30,11 +30,6 @@ import pickle # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gobject import gtk import gtk.glade diff --git a/src/EditSource.py b/src/EditSource.py index 8ea4696c6..404a4d77a 100644 --- a/src/EditSource.py +++ b/src/EditSource.py @@ -24,11 +24,6 @@ # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk.glade #------------------------------------------------------------------------- diff --git a/src/EventEdit.py b/src/EventEdit.py index bd82f1256..405cb4c83 100644 --- a/src/EventEdit.py +++ b/src/EventEdit.py @@ -25,11 +25,6 @@ from string import strip # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk import gtk.glade diff --git a/src/FamilyView.py b/src/FamilyView.py index fbb09412b..4acad7665 100644 --- a/src/FamilyView.py +++ b/src/FamilyView.py @@ -23,11 +23,6 @@ # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gobject import gtk import gtk.glade diff --git a/src/Filter.py b/src/Filter.py index 5258d557a..16823e4a4 100644 --- a/src/Filter.py +++ b/src/Filter.py @@ -27,11 +27,6 @@ import re import os import sys -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk from intl import gettext as _ diff --git a/src/Find.py b/src/Find.py index 7acefabbc..d57e814bd 100644 --- a/src/Find.py +++ b/src/Find.py @@ -35,11 +35,6 @@ import string # Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk from gnome.ui import * diff --git a/src/GenericFilter.py b/src/GenericFilter.py index ff95fd654..51b6f42cc 100644 --- a/src/GenericFilter.py +++ b/src/GenericFilter.py @@ -40,11 +40,6 @@ except: import os from string import find,join,strip,replace -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk #------------------------------------------------------------------------- diff --git a/src/GrampsCfg.py b/src/GrampsCfg.py index 5a24f7a2d..8fdc7b51b 100644 --- a/src/GrampsCfg.py +++ b/src/GrampsCfg.py @@ -35,11 +35,6 @@ import Plugins # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gobject import gconf import gtk diff --git a/src/ImageSelect.py b/src/ImageSelect.py index e3b6b4ae9..59118a953 100644 --- a/src/ImageSelect.py +++ b/src/ImageSelect.py @@ -32,11 +32,6 @@ import urlparse # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gobject import gtk import gnome.ui @@ -223,6 +218,7 @@ class Gallery(ImageSelect): icon_list.connect("drag_data_get", self.on_photolist_drag_data_get) + icon_list.connect('destroy',self.unmap) # Remember arguments self.path = path; self.dataobj = dataobj; @@ -239,6 +235,11 @@ class Gallery(ImageSelect): self.sel = None self.photo = None + def unmap(self,obj): + for i in self.item_map.keys(): + print i + i.destroy() + def on_canvas1_event(self,obj,event): """Handle resize events over the canvas, redrawing if the size changes""" diff --git a/src/ImgManip.py b/src/ImgManip.py index bc4937a32..d7df9b9a6 100644 --- a/src/ImgManip.py +++ b/src/ImgManip.py @@ -27,11 +27,6 @@ import string # Check for the python imaging library # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - try: import PIL.Image import StringIO diff --git a/src/ListModel.py b/src/ListModel.py index 0eaf7e1f1..00fca8bcc 100644 --- a/src/ListModel.py +++ b/src/ListModel.py @@ -18,11 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - from gobject import TYPE_STRING, TYPE_PYOBJECT import gtk diff --git a/src/LocEdit.py b/src/LocEdit.py index f80f93641..05780a204 100644 --- a/src/LocEdit.py +++ b/src/LocEdit.py @@ -23,10 +23,6 @@ # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gtk.glade #------------------------------------------------------------------------- diff --git a/src/Marriage.py b/src/Marriage.py index 96885b135..17b6ebe01 100644 --- a/src/Marriage.py +++ b/src/Marriage.py @@ -25,10 +25,6 @@ import pickle # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gobject import gtk import gtk.glade diff --git a/src/MediaView.py b/src/MediaView.py index c6252ef6e..ff7296a17 100644 --- a/src/MediaView.py +++ b/src/MediaView.py @@ -30,10 +30,6 @@ import string # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gobject import gtk import gtk.gdk diff --git a/src/MergeData.py b/src/MergeData.py index 0c0ef72da..62389d8b1 100644 --- a/src/MergeData.py +++ b/src/MergeData.py @@ -30,10 +30,6 @@ import string # GNOME # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gtk.glade #------------------------------------------------------------------------- diff --git a/src/NameEdit.py b/src/NameEdit.py index e7acc3808..7cf73c804 100644 --- a/src/NameEdit.py +++ b/src/NameEdit.py @@ -23,10 +23,6 @@ # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gtk.glade #------------------------------------------------------------------------- diff --git a/src/NoteEdit.py b/src/NoteEdit.py index c68066875..ed380352e 100644 --- a/src/NoteEdit.py +++ b/src/NoteEdit.py @@ -23,10 +23,6 @@ # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gtk import gnome.ui diff --git a/src/PaperMenu.py b/src/PaperMenu.py index b7d0d4b71..d4c8b2261 100644 --- a/src/PaperMenu.py +++ b/src/PaperMenu.py @@ -23,10 +23,6 @@ # GNOME modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gtk #------------------------------------------------------------------------- diff --git a/src/PedView.py b/src/PedView.py index 9a931cc4a..a5af737b0 100644 --- a/src/PedView.py +++ b/src/PedView.py @@ -27,11 +27,6 @@ _PERSON = "p" # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk import gtk.gdk import gnome.canvas @@ -154,7 +149,7 @@ class PedigreeView: as the root person of the tree.""" for i in self.canvas_items: - self.i.destroy() + i.destroy() for i in self.boxes: i.cleanup() diff --git a/src/PlaceView.py b/src/PlaceView.py index fe382ac6f..852b596ab 100644 --- a/src/PlaceView.py +++ b/src/PlaceView.py @@ -27,10 +27,6 @@ Handles the place view for GRAMPS. # GTK modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gobject import gtk import gtk.gdk diff --git a/src/Plugins.py b/src/Plugins.py index 61721c990..71d17bbc7 100644 --- a/src/Plugins.py +++ b/src/Plugins.py @@ -32,10 +32,6 @@ filters, importer, exporters, and document generators. # GTK libraries # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gobject import gtk import gtk.glade diff --git a/src/QuestionDialog.py b/src/QuestionDialog.py index f0db00470..163da9e73 100644 --- a/src/QuestionDialog.py +++ b/src/QuestionDialog.py @@ -18,11 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk import gnome.ui from intl import gettext as _ diff --git a/src/QuickAdd.py b/src/QuickAdd.py index cab195419..685b39360 100644 --- a/src/QuickAdd.py +++ b/src/QuickAdd.py @@ -18,10 +18,6 @@ # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gtk.glade import Utils diff --git a/src/RelImage.py b/src/RelImage.py index de665eed8..48d8bfc51 100644 --- a/src/RelImage.py +++ b/src/RelImage.py @@ -31,10 +31,6 @@ import string # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gtk from QuestionDialog import ErrorDialog diff --git a/src/Report.py b/src/Report.py index b711876d6..2331b61ae 100644 --- a/src/Report.py +++ b/src/Report.py @@ -36,10 +36,6 @@ import string # GNOME/GTK modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gtk import gnome.ui diff --git a/src/SelectChild.py b/src/SelectChild.py index 9a45436c3..03ba2f6c5 100644 --- a/src/SelectChild.py +++ b/src/SelectChild.py @@ -37,10 +37,6 @@ import string # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gtk.glade #------------------------------------------------------------------------- diff --git a/src/SourceView.py b/src/SourceView.py index 5d49fe7e9..dfa6c695c 100644 --- a/src/SourceView.py +++ b/src/SourceView.py @@ -29,10 +29,6 @@ # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gobject import gtk import gtk.gdk diff --git a/src/Sources.py b/src/Sources.py index 844daa20d..dc5438e40 100644 --- a/src/Sources.py +++ b/src/Sources.py @@ -23,10 +23,6 @@ # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gobject import gtk import gtk.glade diff --git a/src/StartupDialog.py b/src/StartupDialog.py index bde13dda8..211d33d29 100644 --- a/src/StartupDialog.py +++ b/src/StartupDialog.py @@ -19,11 +19,6 @@ # import const - -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gtk.glade import gnome import gconf diff --git a/src/StyleEditor.py b/src/StyleEditor.py index 954ca6709..7d23ba734 100644 --- a/src/StyleEditor.py +++ b/src/StyleEditor.py @@ -30,10 +30,6 @@ __version__ = "$Revision$" # GNOME/GTK modules # #------------------------------------------------------------------------ -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gtk.glade import gtk diff --git a/src/UrlEdit.py b/src/UrlEdit.py index f020c5b21..0680e361d 100644 --- a/src/UrlEdit.py +++ b/src/UrlEdit.py @@ -23,10 +23,6 @@ # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gtk.glade #------------------------------------------------------------------------- diff --git a/src/Utils.py b/src/Utils.py index b7e530be6..3950dff17 100644 --- a/src/Utils.py +++ b/src/Utils.py @@ -31,10 +31,6 @@ import os # GNOME/GTK # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gtk import grampslib diff --git a/src/VersionControl.py b/src/VersionControl.py index 83ac4a6ad..5587b6c0e 100644 --- a/src/VersionControl.py +++ b/src/VersionControl.py @@ -37,10 +37,6 @@ from re import compile # GTK/GNOME # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass import gtk.glade #------------------------------------------------------------------------- diff --git a/src/gramps.py b/src/gramps.py index f7468aaca..18e8c02ed 100755 --- a/src/gramps.py +++ b/src/gramps.py @@ -18,12 +18,6 @@ except ImportError: #------------------------------------------------------------------------- import os import locale - -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk.glade import intl @@ -50,11 +44,6 @@ import sys # GNOME/GTK libraries # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gtk import gnome.ui diff --git a/src/gramps_main.py b/src/gramps_main.py index 3b19e1721..4df47d2f4 100755 --- a/src/gramps_main.py +++ b/src/gramps_main.py @@ -39,11 +39,6 @@ from intl import gettext as _ # GTK/Gnome modules # #------------------------------------------------------------------------- -try: - import pygtk; pygtk.require('2.0') -except ImportError: # not set up for parallel install - pass - import gobject import gtk import gnome.ui