* src/GrampsDisplay.py: move gnome help and url control into this

module
* various: switch from direct gnome calls to GrampsDisplay calls
* src/TreeTips.py: don't register type if pygtk > 2.8.0


svn: r5274
This commit is contained in:
Don Allingham 2005-10-06 00:44:52 +00:00
parent 3daa4c40bc
commit 484a656897
27 changed files with 73 additions and 82 deletions

View File

@ -1,3 +1,9 @@
2005-10-05 Don Allingham <don@gramps-project.org>
* src/GrampsDisplay.py: move gnome help and url control into this
module
* various: switch from direct gnome calls to GrampsDisplay calls
* src/TreeTips.py: don't register type if pygtk > 2.8.0
2005-10-05 Alex Roitman <shura@gramps-project.org> 2005-10-05 Alex Roitman <shura@gramps-project.org>
* doc/grampsxml.dtd: Add to CVS (replaces gramps.dtd). * doc/grampsxml.dtd: Add to CVS (replaces gramps.dtd).
* src/WriteXML.py: Bring in sync with the DTD: * src/WriteXML.py: Bring in sync with the DTD:

View File

@ -46,7 +46,6 @@ from gettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
from QuestionDialog import ErrorDialog from QuestionDialog import ErrorDialog
import gtk.glade import gtk.glade
import gnome
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -58,6 +57,7 @@ import Utils
import RelImage import RelImage
import RelLib import RelLib
import GrampsMime import GrampsMime
import GrampsDisplay
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -102,7 +102,7 @@ class AddMediaObject:
def on_help_imagesel_clicked(self,obj): def on_help_imagesel_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','gramps-edit-quick') GrampsDisplay.help('gramps-edit-quick')
self.val = self.window.run() self.val = self.window.run()
def on_savephoto_clicked(self): def on_savephoto_clicked(self):

View File

@ -41,7 +41,6 @@ from gettext import gettext as _
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk.glade import gtk.glade
import gnome
import gobject import gobject
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -49,6 +48,7 @@ import gobject
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import GrampsDisplay
import RelLib import RelLib
import const import const
import Utils import Utils
@ -153,7 +153,7 @@ class AddSpouse:
def on_spouse_help_clicked(self,obj): def on_spouse_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','gramps-edit-quick') GrampsDisplay.help('gramps-edit-quick')
def get_selected_ids(self): def get_selected_ids(self):
mlist = [] mlist = []

View File

@ -38,13 +38,13 @@ from gettext import gettext as _
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk.glade import gtk.glade
import gnome
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import GrampsDisplay
import const import const
import Utils import Utils
import Date import Date
@ -189,7 +189,7 @@ class AddressEditor:
def on_help_clicked(self,obj): def on_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','adv-ad') GrampsDisplay.help('adv-ad')
def ok_clicked(self,obj): def ok_clicked(self,obj):
""" """

View File

@ -41,7 +41,6 @@ from gettext import gettext as _
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk.glade import gtk.glade
import gnome
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -54,6 +53,7 @@ import Sources
import AutoComp import AutoComp
import RelLib import RelLib
import Spell import Spell
import GrampsDisplay
from QuestionDialog import WarningDialog from QuestionDialog import WarningDialog
@ -197,7 +197,7 @@ class AttributeEditor:
def on_help_clicked(self,obj): def on_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','adv-at') GrampsDisplay.help('adv-at')
def on_ok_clicked(self,obj): def on_ok_clicked(self,obj):
""" """

View File

@ -43,13 +43,13 @@ from gettext import gettext as _
import gtk.glade import gtk.glade
import gtk.gdk import gtk.gdk
import gobject import gobject
import gnome
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import GrampsDisplay
import RelLib import RelLib
import const import const
import Utils import Utils
@ -314,7 +314,7 @@ class ChooseParents:
def on_help_clicked(self,obj): def on_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','gramps-edit-quick') GrampsDisplay.help('gramps-edit-quick')
def person_added(self,handle_list): def person_added(self,handle_list):
update_father = False update_father = False
@ -759,7 +759,7 @@ class ModifyParents:
def on_help_clicked(self,obj): def on_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','gramps-spec-par') GrampsDisplay.help('gramps-spec-par')
self.val = self.window.run() self.val = self.window.run()
def save_parents_clicked(self): def save_parents_clicked(self):

View File

@ -52,7 +52,6 @@ import gtk
import gtk.gdk import gtk.gdk
import gtk.glade import gtk.glade
import gobject import gobject
import gnome
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -64,6 +63,7 @@ import DateHandler
import const import const
import Utils import Utils
import QuestionDialog import QuestionDialog
import GrampsDisplay
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -258,10 +258,8 @@ class DateEditorDialog:
while 1: while 1:
response = self.top_window.run() response = self.top_window.run()
if response == gtk.RESPONSE_HELP: if response == gtk.RESPONSE_HELP:
try: GrampsDisplay.help('adv-dates')
gnome.help_display('gramps-manual','adv-dates')
except gobject.GError, msg:
QuestionDialog.ErrorDialog(_("Could not open help"),str(msg))
elif response == gtk.RESPONSE_OK: elif response == gtk.RESPONSE_OK:
(the_quality,the_modifier,the_calendar,the_value,the_text) = \ (the_quality,the_modifier,the_calendar,the_value,the_text) = \
self.build_date_from_ui() self.build_date_from_ui()

View File

@ -35,8 +35,6 @@ from gettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk import gtk
import gtk.glade import gtk.glade
import gobject
import gnome
try: try:
from gnomevfs import get_mime_type from gnomevfs import get_mime_type
@ -61,6 +59,7 @@ import ReadGrdb
import WriteGrdb import WriteGrdb
import WriteXML import WriteXML
import WriteGedcom import WriteGedcom
import GrampsDisplay
from bsddb import db from bsddb import db
@ -113,10 +112,7 @@ class DbPrompter:
elif response == gtk.RESPONSE_CANCEL: elif response == gtk.RESPONSE_CANCEL:
break break
elif response == gtk.RESPONSE_HELP: elif response == gtk.RESPONSE_HELP:
try: GrampsDisplay.help('choose-db-start')
gnome.help_display('gramps-manual','choose-db-start')
except gobject.GError,msg:
QuestionDialog.ErrorDialog(_('Help not available'),msg)
top.destroy() top.destroy()
if response == gtk.RESPONSE_CANCEL: if response == gtk.RESPONSE_CANCEL:

View File

@ -38,8 +38,6 @@ from gettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk import gtk
import gtk.glade import gtk.glade
import gobject
import gnome
from gtk.gdk import ACTION_COPY, BUTTON1_MASK, INTERP_BILINEAR, pixbuf_new_from_file from gtk.gdk import ACTION_COPY, BUTTON1_MASK, INTERP_BILINEAR, pixbuf_new_from_file
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -62,6 +60,7 @@ import DateHandler
import TransTable import TransTable
import NameDisplay import NameDisplay
import Spell import Spell
import GrampsDisplay
from QuestionDialog import WarningDialog, ErrorDialog, SaveDialog, QuestionDialog2 from QuestionDialog import WarningDialog, ErrorDialog, SaveDialog, QuestionDialog2
@ -659,7 +658,7 @@ class EditPerson:
def on_help_clicked(self,obj): def on_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','adv-pers') GrampsDisplay.help('adv-pers')
def build_columns(self,tree,list): def build_columns(self,tree,list):
cnum = 0 cnum = 0
@ -1284,7 +1283,8 @@ class EditPerson:
"""Attempts to display the selected URL in a web browser""" """Attempts to display the selected URL in a web browser"""
text = obj.get() text = obj.get()
if text: if text:
gnome.url_show(text) import GrampsDisplay
GrampsDisplay.url(text)
def on_cancel_edit(self,obj): def on_cancel_edit(self,obj):
"""If the data has changed, give the user a chance to cancel """If the data has changed, give the user a chance to cancel

View File

@ -36,7 +36,6 @@ from gettext import gettext as _
import gobject import gobject
import gtk import gtk
import gtk.glade import gtk.glade
import gnome
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -49,6 +48,7 @@ import Sources
import ImageSelect import ImageSelect
import NameDisplay import NameDisplay
import Spell import Spell
import GrampsDisplay
from DdTargets import DdTargets from DdTargets import DdTargets
@ -309,7 +309,7 @@ class EditPlace:
def on_help_clicked(self,obj): def on_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','adv-plc') GrampsDisplay.help('adv-plc')
def build_columns(self,tree,list): def build_columns(self,tree,list):
cnum = 0 cnum = 0
@ -372,7 +372,8 @@ class EditPlace:
def on_web_go_clicked(self,obj): def on_web_go_clicked(self,obj):
text = obj.get() text = obj.get()
if text != "": if text != "":
gnome.url_show(text) import GrampsDisplay
GrampsDisplay.url(text)
def set(self,field,getf,setf): def set(self,field,getf,setf):
text = unicode(field.get_text()) text = unicode(field.get_text())

View File

@ -34,7 +34,6 @@ from gettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gobject import gobject
import gtk.glade import gtk.glade
import gnome
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -48,6 +47,7 @@ import ListModel
import RelLib import RelLib
import NameDisplay import NameDisplay
import Spell import Spell
import GrampsDisplay
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -221,7 +221,7 @@ class EditSource:
def on_help_clicked(self,obj): def on_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','adv-src') GrampsDisplay.help('adv-src')
def close(self,obj): def close(self,obj):
self.gallery.close() self.gallery.close()

View File

@ -35,7 +35,6 @@ import sets
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk import gtk
import gtk.glade import gtk.glade
import gnome
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -53,6 +52,7 @@ import DateHandler
import ImageSelect import ImageSelect
import DateEdit import DateEdit
import Spell import Spell
import GrampsDisplay
from QuestionDialog import WarningDialog, ErrorDialog from QuestionDialog import WarningDialog, ErrorDialog
@ -292,7 +292,7 @@ class EventEditor:
def on_help_clicked(self,obj): def on_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','adv-ev') GrampsDisplay.help('adv-ev')
def get_place(self,field,trans): def get_place(self,field,trans):
text = unicode(field.get_text().strip()) text = unicode(field.get_text().strip())

View File

@ -37,7 +37,6 @@ from gettext import gettext as _
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk import gtk
import gnome
from gnome.ui import Druid, DruidPageEdge, DruidPageStandard from gnome.ui import Druid, DruidPageEdge, DruidPageStandard
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -50,6 +49,7 @@ import Utils
import PluginMgr import PluginMgr
import QuestionDialog import QuestionDialog
import GrampsKeys import GrampsKeys
import GrampsDisplay
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -120,7 +120,7 @@ class Exporter:
""" """
Help handler. Help handler.
""" """
gnome.help_display('gramps-manual','export-data') GrampsDisplay.help('export-data')
def build_info_page(self): def build_info_page(self):
""" """

View File

@ -36,7 +36,6 @@ from gettext import gettext as _
import gobject import gobject
import gtk import gtk
import gtk.glade import gtk.glade
import gnome
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -48,6 +47,7 @@ import RelLib
import const import const
import Utils import Utils
import DateHandler import DateHandler
import GrampsDisplay
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -333,7 +333,7 @@ class GrampsPreferences:
self.panel.set_current_page(self.imap[path]) self.panel.set_current_page(self.imap[path])
def on_propertybox_help(self,obj): def on_propertybox_help(self,obj):
gnome.help_display('gramps-manual','gramps-prefs') GrampsDisplay.help('gramps-prefs')
def on_close_clicked(self,obj): def on_close_clicked(self,obj):
Utils.destroy_passed_object(self.window) Utils.destroy_passed_object(self.window)

View File

@ -36,8 +36,6 @@ from gettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gobject import gobject
import gtk import gtk
import gnome
import gnome.ui
import gtk.glade import gtk.glade
try: try:
@ -66,6 +64,8 @@ import DateHandler
import Date import Date
import ImgManip import ImgManip
import Spell import Spell
import GrampsDisplay
from QuestionDialog import ErrorDialog from QuestionDialog import ErrorDialog
from DdTargets import DdTargets from DdTargets import DdTargets
@ -143,7 +143,7 @@ class ImageSelect:
def on_help_imagesel_clicked(self,obj): def on_help_imagesel_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','gramps-edit-quick') GrampsDisplay.help('gramps-edit-quick')
self.val = self.window.run() self.val = self.window.run()
def on_name_changed(self, obj): def on_name_changed(self, obj):
@ -860,7 +860,7 @@ class LocalMediaProperties:
def on_help_clicked(self, obj): def on_help_clicked(self, obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','gramps-edit-complete') GrampsDisplay.help('gramps-edit-complete')
def on_ok_clicked(self,obj): def on_ok_clicked(self,obj):
self.on_apply_clicked() self.on_apply_clicked()
@ -1227,7 +1227,7 @@ class GlobalMediaProperties:
def on_help_clicked(self, obj): def on_help_clicked(self, obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','adv-media') GrampsDisplay.help('adv-media')
def on_ok_clicked(self, obj): def on_ok_clicked(self, obj):
self.on_apply_clicked(obj) self.on_apply_clicked(obj)

View File

@ -27,7 +27,6 @@
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk import gtk
import gtk.glade import gtk.glade
import gnome
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -37,6 +36,7 @@ import gnome
import const import const
import Utils import Utils
import RelLib import RelLib
import GrampsDisplay
from gettext import gettext as _ from gettext import gettext as _
@ -116,7 +116,7 @@ class LocationEditor:
def on_help_clicked(self,obj): def on_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','gramps-edit-complete') GrampsDisplay.help('gramps-edit-complete')
def on_location_edit_ok_clicked(self,obj): def on_location_edit_ok_clicked(self,obj):
city = unicode(self.city.get_text()) city = unicode(self.city.get_text())

View File

@ -58,6 +58,7 @@ gdir_PYTHON = \
GrampsBSDDB.py\ GrampsBSDDB.py\
GrampsDbBase.py\ GrampsDbBase.py\
GrampsDBCallback.py\ GrampsDBCallback.py\
GrampsDisplay.py\
GrampsInMemDB.py\ GrampsInMemDB.py\
GrampsXMLDB.py\ GrampsXMLDB.py\
GrampsGEDDB.py\ GrampsGEDDB.py\

View File

@ -37,7 +37,6 @@ import sets
import gtk import gtk
import gtk.gdk import gtk.gdk
import gtk.glade import gtk.glade
import gnome
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -58,6 +57,7 @@ import NameDisplay
import Date import Date
import DateEdit import DateEdit
import Spell import Spell
import GrampsDisplay
from QuestionDialog import QuestionDialog, WarningDialog, SaveDialog from QuestionDialog import QuestionDialog, WarningDialog, SaveDialog
from DdTargets import DdTargets from DdTargets import DdTargets
@ -389,7 +389,7 @@ class Marriage:
def on_help_clicked(self,obj): def on_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','adv-rel') GrampsDisplay.help('adv-rel')
def ev_drag_begin(self, context, a): def ev_drag_begin(self, context, a):
return return

View File

@ -33,7 +33,6 @@ from gettext import gettext as _
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk.glade import gtk.glade
import gnome
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -50,6 +49,7 @@ import Date
import DateEdit import DateEdit
import DateHandler import DateHandler
import Spell import Spell
import GrampsDisplay
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -243,7 +243,7 @@ class NameEditor:
def on_help_clicked(self,*obj): def on_help_clicked(self,*obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','adv-an') GrampsDisplay.help('adv-an')
def on_name_edit_ok_clicked(self,obj): def on_name_edit_ok_clicked(self,obj):
first = unicode(self.given_field.get_text()) first = unicode(self.given_field.get_text())

View File

@ -36,7 +36,6 @@ importers, exporters, and document generators.
import gobject import gobject
import gtk import gtk
import gtk.glade import gtk.glade
import gnome
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -61,6 +60,7 @@ import Errors
import Report import Report
import Tool import Tool
import PluginMgr import PluginMgr
import GrampsDisplay
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -412,7 +412,7 @@ class PluginStatus:
def help(self,obj): def help(self,obj):
"""Display the GRAMPS manual""" """Display the GRAMPS manual"""
gnome.help_display('gramps-manual','gramps-getting-started') GrampsDisplay.help('gramps-getting-started')
def pop_button_update(self, client,cnxn_id,entry,data): def pop_button_update(self, client,cnxn_id,entry,data):
self.pop_button.set_active(GrampsKeys.get_pop_plugin_status()) self.pop_button.set_active(GrampsKeys.get_pop_plugin_status())

View File

@ -34,7 +34,6 @@ from gettext import gettext as _
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk.glade import gtk.glade
import gnome
import gobject import gobject
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
@ -49,6 +48,7 @@ import PeopleModel
import NameDisplay import NameDisplay
import GenericFilter import GenericFilter
import Date import Date
import GrampsDisplay
from QuestionDialog import ErrorDialog from QuestionDialog import ErrorDialog
@ -164,7 +164,7 @@ class SelectChild:
def on_child_help_clicked(self,obj): def on_child_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','gramps-edit-quick') GrampsDisplay.help('gramps-edit-quick')
def redraw_child_list(self): def redraw_child_list(self):
self.refmodel = PeopleModel.PeopleModel(self.db,self.active_filter) self.refmodel = PeopleModel.PeopleModel(self.db,self.active_filter)

View File

@ -34,7 +34,6 @@ from gettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk import gtk
import gtk.glade import gtk.glade
import gnome
from gtk.gdk import ACTION_COPY, BUTTON1_MASK, INTERP_BILINEAR, pixbuf_new_from_file from gtk.gdk import ACTION_COPY, BUTTON1_MASK, INTERP_BILINEAR, pixbuf_new_from_file
from gobject import TYPE_PYOBJECT from gobject import TYPE_PYOBJECT
import cPickle as pickle import cPickle as pickle
@ -51,6 +50,7 @@ import Date
import DateEdit import DateEdit
import DateHandler import DateHandler
import GrampsDBCallback import GrampsDBCallback
import GrampsDisplay
import Spell import Spell
from DdTargets import DdTargets from DdTargets import DdTargets
@ -165,7 +165,7 @@ class SourceSelector:
def on_help_clicked(self,obj): def on_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','gramps-edit-complete') GrampsDisplay.help('gramps-edit-complete')
def selection_changed(self,obj): def selection_changed(self,obj):
(store,node) = self.selection.get_selected() (store,node) = self.selection.get_selected()
@ -480,7 +480,7 @@ class SourceEditor:
def on_help_clicked(self,obj): def on_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','adv-si') GrampsDisplay.help('adv-si')
def set_button(self): def set_button(self):
if self.active_source: if self.active_source:

View File

@ -254,4 +254,7 @@ class TreeTips(gtk.Widget):
y = 0 y = 0
return x, y return x, y
if gtk.pygtk_version < (2.8.0):
gobject.type_register(TreeTips) gobject.type_register(TreeTips)

View File

@ -33,7 +33,6 @@ from gettext import gettext as _
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk.glade import gtk.glade
import gnome
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -43,6 +42,7 @@ import gnome
import const import const
import Utils import Utils
import RelLib import RelLib
import GrampsDisplay
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -119,7 +119,7 @@ class UrlEditor:
def on_help_clicked(self,*obj): def on_help_clicked(self,*obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','gramps-edit-complete') GrampsDisplay.help('gramps-edit-complete')
def on_url_edit_ok_clicked(self,obj): def on_url_edit_ok_clicked(self,obj):
des = unicode(self.des.get_text()) des = unicode(self.des.get_text())

View File

@ -37,12 +37,6 @@ from gettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk import gtk
import gtk.gdk import gtk.gdk
import gnome
try:
from gnomevfs import get_mime_type, mime_get_description
except:
from gnome.vfs import get_mime_type, mime_get_description
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -251,11 +245,7 @@ def find_mime_type_pixbuf(mime_type):
def get_mime_description(mime_type): def get_mime_description(mime_type):
try: try:
value = mime_get_description(mime_type) return GrampsMime.get_description(mime_type)
if value:
return value
else:
return ''
except: except:
return '' return ''

View File

@ -34,7 +34,6 @@ from gettext import gettext as _
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import gtk import gtk
import gtk.glade import gtk.glade
import gnome
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -46,6 +45,7 @@ import Utils
import RelLib import RelLib
import ListModel import ListModel
import NameDisplay import NameDisplay
import GrampsDisplay
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
# #
@ -205,7 +205,7 @@ class WitnessEditor:
def on_help_clicked(self,obj): def on_help_clicked(self,obj):
"""Display the relevant portion of GRAMPS manual""" """Display the relevant portion of GRAMPS manual"""
gnome.help_display('gramps-manual','adv-wit') GrampsDisplay.help('adv-wit')
def choose(self,obj): def choose(self,obj):
import SelectPerson import SelectPerson

View File

@ -51,6 +51,7 @@ import gtk.gdk
# gramps modules # gramps modules
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import GrampsDisplay
import RelLib import RelLib
import GrampsDbBase import GrampsDbBase
import GrampsBSDDB import GrampsBSDDB
@ -123,6 +124,7 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
args, const.popt_table) args, const.popt_table)
except: except:
self.program = gnome.program_init('gramps',const.version) self.program = gnome.program_init('gramps',const.version)
self.program.set_property('app-libdir','%s/lib' % const.prefixdir) self.program.set_property('app-libdir','%s/lib' % const.prefixdir)
self.program.set_property('app-datadir','%s/share/gramps' % const.prefixdir) self.program.set_property('app-datadir','%s/share/gramps' % const.prefixdir)
self.program.set_property('app-sysconfdir','%s/etc' % const.prefixdir) self.program.set_property('app-sysconfdir','%s/etc' % const.prefixdir)
@ -1068,13 +1070,13 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
self.filter_text.set_sensitive(0) self.filter_text.set_sensitive(0)
def home_page_activate(self,obj): def home_page_activate(self,obj):
gnome.url_show(_HOMEPAGE) GrampsDisplay.url(_HOMEPAGE)
def mailing_lists_activate(self,obj): def mailing_lists_activate(self,obj):
gnome.url_show(_MAILLIST) GrampsDisplay.url(_MAILLIST)
def report_bug_activate(self,obj): def report_bug_activate(self,obj):
gnome.url_show(_BUGREPORT) GrampsDisplay.url(_BUGREPORT)
def on_fast_merge_activate(self,obj): def on_fast_merge_activate(self,obj):
"""Calls up the merge dialog for the selection""" """Calls up the merge dialog for the selection"""
@ -1175,17 +1177,11 @@ class Gramps(GrampsDBCallback.GrampsDBCallback):
def on_contents_activate(self,obj): def on_contents_activate(self,obj):
"""Display the GRAMPS manual""" """Display the GRAMPS manual"""
try: GrampsDisplay.help('index')
gnome.help_display('gramps-manual','index')
except gobject.GError, msg:
ErrorDialog(_("Could not open help"),str(msg))
def on_faq_activate(self,obj): def on_faq_activate(self,obj):
"""Display FAQ""" """Display FAQ"""
try: GrampsDisplay.help('faq')
gnome.help_display('gramps-manual','faq')
except gobject.GError, msg:
ErrorDialog(_("Could not open help"),str(msg))
def on_new_clicked(self,obj): def on_new_clicked(self,obj):
"""Prompt for permission to close the current database""" """Prompt for permission to close the current database"""