relocate glade files
svn: r6075
This commit is contained in:
parent
8244e57cd5
commit
71b3c72d70
10
ChangeLog
10
ChangeLog
@ -1,4 +1,14 @@
|
||||
2006-03-04 Don Allingham <don@gramps-project.org>
|
||||
* src/Editors/EditEventRef.py: derive from EditReference
|
||||
* src/const.py.in: change glade file names
|
||||
* src/glade/rule.glade: moved to subdirectory
|
||||
* src/glade/gramps.glade: moved to subdirectory
|
||||
* src/glade/mergedata.glade: moved to subdirectory
|
||||
* src/glade/edit_person.glade: moved to subdirectory
|
||||
* src/glade/scratch_pad.glade: moved to subdirectory
|
||||
* src/glade/plugins.glade: moved to subdirectory
|
||||
* src/ScratchPad.py: fix setting of window icon
|
||||
* src/data/system_filters.xml: moved to data directory
|
||||
* configure.in: use svnversion to get version number
|
||||
* src/DataViews/Makefile.in: added
|
||||
* src/DataViews/__init__.py: added
|
||||
|
@ -595,8 +595,16 @@ class EventEmbedList(EmbeddedList):
|
||||
def add_button_clicked(self,obj):
|
||||
from Editors import EditEventRef
|
||||
try:
|
||||
ref = RelLib.EventRef()
|
||||
event = RelLib.Event()
|
||||
if self.obj.__class__.__name__ == 'Person':
|
||||
event.set_type((RelLib.Event.BIRTH,''))
|
||||
ref.set_role((RelLib.EventRef.PRIMARY,''))
|
||||
else:
|
||||
event.set_type((RelLib.Event.MARRIAGE,''))
|
||||
ref.set_role((RelLib.EventRef.FAMILY,''))
|
||||
EditEventRef(self.dbstate,self.uistate,self.track,
|
||||
None, None, self.obj, self.event_added)
|
||||
event, ref, self.obj, self.event_added)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
|
||||
@ -607,8 +615,13 @@ class EventEmbedList(EmbeddedList):
|
||||
sel = SelectEvent.SelectEvent(self.dbstate.db,"Event Select")
|
||||
event = sel.run()
|
||||
try:
|
||||
ref = RelLib.EventRef()
|
||||
if self.obj.__class__.__name__ == 'Person':
|
||||
ref.set_role((RelLib.EventRef.PRIMARY,''))
|
||||
else:
|
||||
ref.set_role((RelLib.EventRef.FAMILY,''))
|
||||
EditEventRef(self.dbstate,self.uistate,self.track,
|
||||
event, None, self.obj, self.event_added)
|
||||
event, ref, self.obj, self.event_added)
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
|
||||
@ -623,13 +636,12 @@ class EventEmbedList(EmbeddedList):
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
|
||||
def event_updated(self,value):
|
||||
def event_updated(self,ref,event):
|
||||
self.changed = True
|
||||
self.rebuild()
|
||||
|
||||
def event_added(self,value):
|
||||
value[0].ref = value[1].handle
|
||||
self.get_data().append(value[0])
|
||||
def event_added(self,ref,event):
|
||||
self.get_data().append(ref)
|
||||
self.changed = True
|
||||
self.rebuild()
|
||||
|
||||
@ -1373,8 +1385,8 @@ class SourceEmbedList(EmbeddedList):
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
|
||||
def add_callback(self,obj):
|
||||
self.get_data().append(obj)
|
||||
def add_callback(self,reference, primary):
|
||||
self.get_data().append(reference)
|
||||
self.changed = True
|
||||
self.rebuild()
|
||||
|
||||
@ -1390,7 +1402,7 @@ class SourceEmbedList(EmbeddedList):
|
||||
except Errors.WindowActiveError:
|
||||
pass
|
||||
|
||||
def edit_callback(self,name):
|
||||
def edit_callback(self,refererence,primary):
|
||||
self.changed = True
|
||||
self.rebuild()
|
||||
|
||||
|
@ -30,7 +30,6 @@ from gettext import gettext as _
|
||||
try:
|
||||
set()
|
||||
except:
|
||||
print "set import failed"
|
||||
from sets import Set as set
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -48,13 +47,12 @@ import gtk.glade
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import Utils
|
||||
import AutoComp
|
||||
import RelLib
|
||||
import DisplayState
|
||||
|
||||
from QuestionDialog import WarningDialog, ErrorDialog
|
||||
from DisplayTabs import *
|
||||
from GrampsWidgets import *
|
||||
from _EditReference import EditReference
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
@ -71,210 +69,154 @@ for event_type in Utils.family_events.keys():
|
||||
# EditEventRef class
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class EditEventRef(DisplayState.ManagedWindow):
|
||||
def __init__(self, state, uistate, track,
|
||||
event, event_ref, referent, update):
|
||||
self.db = state.db
|
||||
self.state = state
|
||||
class EditEventRef(EditReference):
|
||||
def __init__(self, state, uistate, track, event, event_ref, referent, update):
|
||||
self.referent = referent
|
||||
self.event_ref = event_ref
|
||||
self.event = event
|
||||
|
||||
DisplayState.ManagedWindow.__init__(self, uistate, track, event_ref)
|
||||
EditReference.__init__(self, state, uistate, track, event, event_ref,
|
||||
update)
|
||||
|
||||
self.update = update
|
||||
|
||||
self.title = _('Event Reference Editor')
|
||||
def _local_init(self):
|
||||
|
||||
self.top = gtk.glade.XML(const.gladeFile, "event_eref_edit","gramps")
|
||||
self.window = self.top.get_widget('event_eref_edit')
|
||||
self.general_label = self.top.get_widget("eer_general_tab")
|
||||
self.ok = self.top.get_widget('ok')
|
||||
self.expander = self.top.get_widget("eer_expander")
|
||||
self.warning = self.top.get_widget("eer_warning")
|
||||
self.notebook = self.top.get_widget('notebook')
|
||||
self.notebook_ref = self.top.get_widget('notebook_ref')
|
||||
|
||||
self.define_top_level(self.top.get_widget('event_eref_edit'),
|
||||
self.top.get_widget('eer_title'),
|
||||
_('Event Reference Editor'))
|
||||
self.define_warn_box(self.top.get_widget("eer_warning"))
|
||||
self.define_expander(self.top.get_widget("eer_expander"))
|
||||
|
||||
if self.referent.__class__.__name__ == 'Person':
|
||||
default_type = RelLib.Event.BIRTH
|
||||
default_role = RelLib.EventRef.PRIMARY
|
||||
ev_dict = Utils.personal_events
|
||||
role_dict = Utils.event_roles
|
||||
self.role_dict = Utils.event_roles
|
||||
elif self.referent.__class__.__name__ == 'Family':
|
||||
default_type = RelLib.Event.MARRIAGE
|
||||
default_role = RelLib.EventRef.FAMILY
|
||||
ev_dict = Utils.family_events
|
||||
role_dict = Utils.family_event_roles
|
||||
self.role_dict = Utils.family_event_roles
|
||||
|
||||
Utils.set_titles(self.window,
|
||||
self.top.get_widget('eer_title'),
|
||||
self.title)
|
||||
|
||||
if self.event:
|
||||
self.event_added = False
|
||||
if self.event_ref:
|
||||
if self.event_ref.get_role()[0] == default_role:
|
||||
self.expander.set_expanded(True)
|
||||
self.warning.hide()
|
||||
else:
|
||||
self.expander.set_expanded(False)
|
||||
self.warning.show_all()
|
||||
else:
|
||||
self.event = RelLib.Event()
|
||||
self.event.set_type((default_type,ev_dict[default_type]))
|
||||
self.event.set_handle(self.db.create_id())
|
||||
self.event.set_gramps_id(self.db.find_next_event_gramps_id())
|
||||
self.event_added = True
|
||||
self.expander.set_expanded(True)
|
||||
self.warning.hide()
|
||||
def _connect_signals(self):
|
||||
self.define_ok_button(self.top.get_widget('ok'),self.ok_clicked)
|
||||
self.define_cancel_button(self.top.get_widget('cancel'))
|
||||
|
||||
if not self.event_ref:
|
||||
self.event_ref = RelLib.EventRef()
|
||||
self.event_ref.set_role((default_role,role_dict[default_role]))
|
||||
self.event_ref.set_reference_handle(self.event.get_handle())
|
||||
|
||||
# set event_ref values
|
||||
self._create_tabbed_pages()
|
||||
self._setup_fields(self.state.get_place_completion(),role_dict)
|
||||
self._connect_signals()
|
||||
|
||||
self.show()
|
||||
|
||||
def _setup_fields(self,place_values,role_dict):
|
||||
def _setup_fields(self):
|
||||
|
||||
self.cause_monitor = MonitoredEntry(
|
||||
self.top.get_widget("eer_cause"),
|
||||
self.event.set_cause,
|
||||
self.event.get_cause,
|
||||
self.source.set_cause,
|
||||
self.source.get_cause,
|
||||
self.db.readonly)
|
||||
|
||||
self.ref_privacy = PrivacyButton(
|
||||
self.top.get_widget('eer_ref_priv'),
|
||||
self.event_ref)
|
||||
self.source_ref)
|
||||
|
||||
self.descr_field = MonitoredEntry(
|
||||
self.top.get_widget("eer_description"),
|
||||
self.event.set_description,
|
||||
self.event.get_description,
|
||||
self.source.set_description,
|
||||
self.source.get_description,
|
||||
self.db.readonly)
|
||||
|
||||
self.place_field = PlaceEntry(
|
||||
self.top.get_widget("eer_place"),
|
||||
self.event.get_place_handle(),
|
||||
place_values,
|
||||
self.source.get_place_handle(),
|
||||
self.dbstate.get_place_completion(),
|
||||
self.db.readonly)
|
||||
|
||||
self.ev_privacy = PrivacyButton(
|
||||
self.top.get_widget("eer_ev_priv"),
|
||||
self.event)
|
||||
self.source)
|
||||
|
||||
self.role_selector = MonitoredType(
|
||||
self.top.get_widget('eer_role_combo'),
|
||||
self.event_ref.set_role,
|
||||
self.event_ref.get_role,
|
||||
role_dict,
|
||||
self.source_ref.set_role,
|
||||
self.source_ref.get_role,
|
||||
self.role_dict,
|
||||
RelLib.EventRef.CUSTOM)
|
||||
|
||||
self.event_menu = MonitoredType(
|
||||
self.top.get_widget("eer_type_combo"),
|
||||
self.event.set_type,
|
||||
self.event.get_type,
|
||||
self.source.set_type,
|
||||
self.source.get_type,
|
||||
dict(total_events),
|
||||
RelLib.Event.CUSTOM)
|
||||
|
||||
self.date_check = MonitoredDate(
|
||||
self.top.get_widget("eer_date"),
|
||||
self.top.get_widget("eer_date_stat"),
|
||||
self.event.get_date_object(),
|
||||
self.source.get_date_object(),
|
||||
self.window,
|
||||
self.db.readonly)
|
||||
|
||||
def _connect_signals(self):
|
||||
self.top.get_widget('ok').connect('clicked',self.ok_clicked)
|
||||
self.top.get_widget('cancel').connect('clicked',self.close)
|
||||
self.top.get_widget('help').connect('clicked',self.help_clicked)
|
||||
self.window.connect('delete-event',self.close)
|
||||
|
||||
def _add_page(self,page):
|
||||
self.notebook.insert_page(page)
|
||||
self.notebook.set_tab_label(page,page.get_tab_widget())
|
||||
return page
|
||||
|
||||
def _add_ref_page(self,page):
|
||||
self.notebook_ref.insert_page(page)
|
||||
self.notebook_ref.set_tab_label(page,page.get_tab_widget())
|
||||
return page
|
||||
|
||||
def _create_tabbed_pages(self):
|
||||
"""
|
||||
Creates the notebook tabs and inserts them into the main
|
||||
window.
|
||||
"""
|
||||
|
||||
self.srcref_list = self._add_page(SourceEmbedList(
|
||||
self.state,self.uistate, self.track,
|
||||
self.event.source_list))
|
||||
self.note_tab = self._add_page(NoteTab(
|
||||
self.state, self.uistate, self.track,
|
||||
self.event.get_note_object()))
|
||||
self.note_ref_tab = self._add_ref_page(NoteTab(
|
||||
self.state, self.uistate, self.track,
|
||||
self.event_ref.get_note_object()))
|
||||
self.gallery_tab = self._add_page(GalleryTab(
|
||||
self.state, self.uistate, self.track,
|
||||
self.event.get_media_list()))
|
||||
self.backref_tab = self._add_page(EventBackRefList(
|
||||
self.state, self.uistate, self.track,
|
||||
self.state.db.find_backlink_handles(self.event.handle)))
|
||||
notebook = self.top.get_widget('notebook')
|
||||
notebook_ref = self.top.get_widget('notebook_ref')
|
||||
|
||||
self.srcref_list = self._add_tab(
|
||||
notebook,
|
||||
SourceEmbedList(self.dbstate,self.uistate, self.track,
|
||||
self.source.source_list))
|
||||
|
||||
self.note_tab = self._add_tab(
|
||||
notebook,
|
||||
NoteTab(self.dbstate, self.uistate, self.track,
|
||||
self.source.get_note_object()))
|
||||
|
||||
self.note_ref_tab = self._add_tab(
|
||||
notebook_ref,
|
||||
NoteTab(self.dbstate, self.uistate, self.track,
|
||||
self.source_ref.get_note_object()))
|
||||
|
||||
self.gallery_tab = self._add_tab(
|
||||
notebook,
|
||||
GalleryTab(self.dbstate, self.uistate, self.track,
|
||||
self.source.get_media_list()))
|
||||
|
||||
self.backref_tab = self._add_tab(
|
||||
notebook,
|
||||
EventBackRefList(self.dbstate, self.uistate, self.track,
|
||||
self.db.find_backlink_handles(self.source.handle)))
|
||||
|
||||
def build_menu_names(self,eventref):
|
||||
if self.event:
|
||||
if self.event.get_type()[0] == RelLib.Event.CUSTOM:
|
||||
event_name = self.event.get_type()[1]
|
||||
if self.source:
|
||||
if self.source.get_type()[0] == RelLib.Event.CUSTOM:
|
||||
event_name = self.source.get_type()[1]
|
||||
else:
|
||||
try:
|
||||
event_name = Utils.personal_events[self.event.get_type()[0]]
|
||||
event_name = Utils.personal_events[self.source.get_type()[0]]
|
||||
except:
|
||||
event_name = Utils.family_events[self.event.get_type()[0]]
|
||||
event_name = Utils.family_events[self.source.get_type()[0]]
|
||||
submenu_label = _('Event: %s') % event_name
|
||||
else:
|
||||
submenu_label = _('New Event')
|
||||
return (_('Event Reference Editor'),submenu_label)
|
||||
|
||||
def build_window_key(self,eventref):
|
||||
if self.event:
|
||||
return self.event.get_handle()
|
||||
else:
|
||||
return id(self)
|
||||
|
||||
def help_clicked(self,obj):
|
||||
pass
|
||||
|
||||
def ok_clicked(self,obj):
|
||||
|
||||
(need_new, handle) = self.place_field.get_place_info()
|
||||
if need_new:
|
||||
place_obj = RelLib.Place()
|
||||
place_obj.set_title(handle)
|
||||
self.event.set_place_handle(place_obj.get_handle())
|
||||
self.source.set_place_handle(place_obj.get_handle())
|
||||
else:
|
||||
self.event.set_place_handle(handle)
|
||||
self.source.set_place_handle(handle)
|
||||
|
||||
trans = self.db.transaction_begin()
|
||||
self.db.commit_event(self.event,trans)
|
||||
if self.event_added:
|
||||
if need_new:
|
||||
self.db.add_place(place_obj,trans)
|
||||
self.db.transaction_commit(trans,_("Add Event"))
|
||||
else:
|
||||
self.db.commit_event(self.source,trans)
|
||||
if self.source.handle:
|
||||
if need_new:
|
||||
self.db.add_place(place_obj,trans)
|
||||
self.db.transaction_commit(trans,_("Modify Event"))
|
||||
else:
|
||||
if need_new:
|
||||
self.db.add_place(place_obj,trans)
|
||||
self.db.transaction_commit(trans,_("Add Event"))
|
||||
self.source_ref.ref = self.source.handle
|
||||
|
||||
self.close(None)
|
||||
|
||||
if self.update:
|
||||
self.update((self.event_ref,self.event))
|
||||
self.update(self.source_ref,self.source)
|
||||
|
||||
self.close_window(None)
|
||||
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -49,8 +49,6 @@ import ImgManip
|
||||
import DisplayState
|
||||
import GrampsDisplay
|
||||
|
||||
from QuestionDialog import ErrorDialog
|
||||
from WindowUtils import GladeIf
|
||||
from DisplayTabs import *
|
||||
from GrampsWidgets import *
|
||||
|
||||
@ -60,8 +58,8 @@ from GrampsWidgets import *
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class EditMediaRef(DisplayState.ManagedWindow):
|
||||
def __init__(self, state, uistate, track,
|
||||
media, media_ref, update):
|
||||
def __init__(self, state, uistate, track, media, media_ref, update):
|
||||
|
||||
self.db = state.db
|
||||
self.state = state
|
||||
self.media_ref = media_ref
|
||||
@ -72,68 +70,70 @@ class EditMediaRef(DisplayState.ManagedWindow):
|
||||
|
||||
DisplayState.ManagedWindow.__init__(self, uistate, track, media_ref)
|
||||
|
||||
self.change_dialog = gtk.glade.XML(const.gladeFile,
|
||||
self.top = gtk.glade.XML(const.gladeFile,
|
||||
"change_description","gramps")
|
||||
|
||||
title = _('Media Reference Editor')
|
||||
self.window = self.change_dialog.get_widget('change_description')
|
||||
self.window = self.top.get_widget('change_description')
|
||||
Utils.set_titles(self.window,
|
||||
self.change_dialog.get_widget('title'), title)
|
||||
self.top.get_widget('title'), title)
|
||||
|
||||
self.descr_window = MonitoredEntry(
|
||||
self.change_dialog.get_widget("description"),
|
||||
self.media.set_description,
|
||||
self.media.get_description,
|
||||
self.db.readonly)
|
||||
|
||||
PrivacyButton(self.change_dialog.get_widget("private"),
|
||||
self.media_ref,self.db.readonly)
|
||||
|
||||
mtype = self.media.get_mime_type()
|
||||
|
||||
self.pix = ImgManip.get_thumbnail_image(self.media.get_path(),mtype)
|
||||
self.pixmap = self.change_dialog.get_widget("pixmap")
|
||||
self.pixmap = self.top.get_widget("pixmap")
|
||||
self.pixmap.set_from_pixbuf(self.pix)
|
||||
|
||||
coord = media_ref.get_rectangle()
|
||||
|
||||
if coord and type(coord) == tuple:
|
||||
self.change_dialog.get_widget("upperx").set_value(coord[0])
|
||||
self.change_dialog.get_widget("uppery").set_value(coord[1])
|
||||
self.change_dialog.get_widget("lowerx").set_value(coord[2])
|
||||
self.change_dialog.get_widget("lowery").set_value(coord[3])
|
||||
self.top.get_widget("upperx").set_value(coord[0])
|
||||
self.top.get_widget("uppery").set_value(coord[1])
|
||||
self.top.get_widget("lowerx").set_value(coord[2])
|
||||
self.top.get_widget("lowery").set_value(coord[3])
|
||||
|
||||
self.descr_window = MonitoredEntry(
|
||||
self.top.get_widget("description"),
|
||||
self.media.set_description,
|
||||
self.media.get_description,
|
||||
self.db.readonly)
|
||||
|
||||
self.privacy = PrivacyButton(
|
||||
self.top.get_widget("private"),
|
||||
self.media_ref,
|
||||
self.db.readonly)
|
||||
|
||||
self.gid = MonitoredEntry(
|
||||
self.change_dialog.get_widget("gid"),
|
||||
self.top.get_widget("gid"),
|
||||
self.media.set_gramps_id,
|
||||
self.media.get_gramps_id,
|
||||
self.db.readonly)
|
||||
|
||||
self.path_obj = MonitoredEntry(
|
||||
self.change_dialog.get_widget("path"),
|
||||
self.top.get_widget("path"),
|
||||
self.media.set_path,
|
||||
self.media.get_path,
|
||||
self.db.readonly)
|
||||
|
||||
mt = Mime.get_description(mtype)
|
||||
if mt:
|
||||
self.change_dialog.get_widget("type").set_text(mt)
|
||||
self.top.get_widget("type").set_text(mt)
|
||||
else:
|
||||
self.change_dialog.get_widget("type").set_text("")
|
||||
self.top.get_widget("type").set_text("")
|
||||
|
||||
self.gladeif = GladeIf(self.change_dialog)
|
||||
self.window.connect('delete_event',self.on_delete_event)
|
||||
self.gladeif.connect('button84','clicked',self.close_window)
|
||||
self.gladeif.connect('button82','clicked',self.on_ok_clicked)
|
||||
self.gladeif.connect('button104','clicked',self.on_help_clicked)
|
||||
|
||||
self.notebook_ref = self.change_dialog.get_widget('notebook_ref')
|
||||
self.notebook_src = self.change_dialog.get_widget('notebook_shared')
|
||||
self.notebook_ref = self.top.get_widget('notebook_ref')
|
||||
self.notebook_src = self.top.get_widget('notebook_shared')
|
||||
|
||||
self._create_tabbed_pages()
|
||||
|
||||
self._connect_signals()
|
||||
self.show()
|
||||
|
||||
def _connect_signals(self):
|
||||
self.window.connect('delete_event',self.on_delete_event)
|
||||
self.top.get_widget('button84').connect('clicked',self.close_window)
|
||||
self.top.get_widget('button82').connect('clicked',self.on_ok_clicked)
|
||||
self.top.get_widget('button104').connect('clicked',self.on_help_clicked)
|
||||
|
||||
def _create_tabbed_pages(self):
|
||||
"""
|
||||
Creates the notebook tabs and inserts them into the main
|
||||
@ -179,21 +179,19 @@ class EditMediaRef(DisplayState.ManagedWindow):
|
||||
return page
|
||||
|
||||
def on_delete_event(self,obj,b):
|
||||
self.gladeif.close()
|
||||
self.close()
|
||||
|
||||
def close_window(self,obj):
|
||||
self.gladeif.close()
|
||||
self.window.destroy()
|
||||
self.close()
|
||||
|
||||
def on_apply_clicked(self):
|
||||
|
||||
coord = (
|
||||
self.change_dialog.get_widget("upperx").get_value_as_int(),
|
||||
self.change_dialog.get_widget("uppery").get_value_as_int(),
|
||||
self.change_dialog.get_widget("lowerx").get_value_as_int(),
|
||||
self.change_dialog.get_widget("lowery").get_value_as_int(),
|
||||
self.top.get_widget("upperx").get_value_as_int(),
|
||||
self.top.get_widget("uppery").get_value_as_int(),
|
||||
self.top.get_widget("lowerx").get_value_as_int(),
|
||||
self.top.get_widget("lowery").get_value_as_int(),
|
||||
)
|
||||
if (coord[0] == None and coord[1] == None
|
||||
and coord[2] == None and coord[3] == None):
|
||||
|
@ -96,7 +96,7 @@ class EditPerson(EditPrimary):
|
||||
RelLib.Person.UNKNOWN)
|
||||
|
||||
self.load_obj = None
|
||||
self.top = gtk.glade.XML(const.editPersonFile, "edit_person","gramps")
|
||||
self.top = gtk.glade.XML(const.person_glade, "edit_person","gramps")
|
||||
self.define_top_level(self.top.get_widget("edit_person"), None,
|
||||
_('Edit Person'))
|
||||
|
||||
|
@ -52,7 +52,6 @@ import GrampsDisplay
|
||||
from _EditPrimary import EditPrimary
|
||||
|
||||
from DisplayTabs import *
|
||||
from WindowUtils import GladeIf
|
||||
from GrampsWidgets import *
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
|
@ -47,72 +47,38 @@ import gtk.glade
|
||||
#-------------------------------------------------------------------------
|
||||
import const
|
||||
import Utils
|
||||
import AutoComp
|
||||
import RelLib
|
||||
import DisplayState
|
||||
|
||||
from QuestionDialog import WarningDialog, ErrorDialog
|
||||
from WindowUtils import GladeIf
|
||||
from DisplayTabs import *
|
||||
from GrampsWidgets import *
|
||||
from _EditReference import EditReference
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
# EditSourceRef class
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
class EditSourceRef(DisplayState.ManagedWindow):
|
||||
def __init__(self, state, uistate, track,
|
||||
source, source_ref, update):
|
||||
self.db = state.db
|
||||
self.state = state
|
||||
self.uistate = uistate
|
||||
self.source_ref = source_ref
|
||||
self.source = source
|
||||
class EditSourceRef(EditReference):
|
||||
def __init__(self, state, uistate, track, source, source_ref, update):
|
||||
|
||||
DisplayState.ManagedWindow.__init__(self, uistate, track, source_ref)
|
||||
EditReference.__init__(self, state, uistate, track, source,
|
||||
source_ref, update)
|
||||
|
||||
self.update = update
|
||||
|
||||
self.title = _('Source Reference Editor')
|
||||
|
||||
self.top = gtk.glade.XML(const.gladeFile, "source_ref_edit","gramps")
|
||||
self.window = self.top.get_widget('source_ref_edit')
|
||||
def _local_init(self):
|
||||
|
||||
self.notebook_src = self.top.get_widget('notebook_src')
|
||||
self.notebook_ref = self.top.get_widget('notebook_ref')
|
||||
self.top = gtk.glade.XML(const.gladeFile, "source_ref_edit","gramps")
|
||||
|
||||
self.define_top_level(self.top.get_widget('source_ref_edit'),
|
||||
self.top.get_widget('source_title'),
|
||||
_('Source Reference Editor'))
|
||||
|
||||
expander = self.top.get_widget("src_expander")
|
||||
expander.set_expanded(True)
|
||||
|
||||
warning = self.top.get_widget("warn_box")
|
||||
if self.source.handle:
|
||||
warning.show_all()
|
||||
else:
|
||||
warning.hide()
|
||||
|
||||
if self.source:
|
||||
self.source_added = False
|
||||
else:
|
||||
self.source = RelLib.Source()
|
||||
self.source.set_handle(self.db.create_id())
|
||||
self.source_added = True
|
||||
|
||||
if not self.source_ref:
|
||||
self.source_ref = RelLib.SourceRef()
|
||||
self.source_ref.set_reference_handle(self.source.get_handle())
|
||||
|
||||
Utils.set_titles(self.window, self.top.get_widget('source_title'),
|
||||
self.title)
|
||||
|
||||
self._create_tabbed_pages()
|
||||
self._setup_fields()
|
||||
self._connect_signals()
|
||||
self.show()
|
||||
self.define_warn_box(self.top.get_widget("warn_box"))
|
||||
self.define_expander(self.top.get_widget("src_expander"))
|
||||
|
||||
def _connect_signals(self):
|
||||
self.top.get_widget('ok').connect('clicked',self.ok_clicked)
|
||||
self.top.get_widget('cancel').connect('clicked',self.cancel_clicked)
|
||||
self.define_ok_button(self.top.get_widget('ok'),self.ok_clicked)
|
||||
self.define_cancel_button(self.top.get_widget('cancel'))
|
||||
|
||||
def _setup_fields(self):
|
||||
self.privacy = PrivacyButton(
|
||||
@ -156,19 +122,10 @@ class EditSourceRef(DisplayState.ManagedWindow):
|
||||
(_('Very High'), RelLib.SourceRef.CONF_VERY_HIGH)])
|
||||
|
||||
|
||||
self.date = MonitoredDate(self.top.get_widget("date"),
|
||||
self.top.get_widget("date_stat"),
|
||||
self.source_ref.get_date_object(),self.window)
|
||||
|
||||
def _add_source_page(self,page):
|
||||
self.notebook_src.insert_page(page)
|
||||
self.notebook_src.set_tab_label(page,page.get_tab_widget())
|
||||
return page
|
||||
|
||||
def _add_ref_page(self,page):
|
||||
self.notebook_ref.insert_page(page)
|
||||
self.notebook_ref.set_tab_label(page,page.get_tab_widget())
|
||||
return page
|
||||
self.date = MonitoredDate(
|
||||
self.top.get_widget("date"),
|
||||
self.top.get_widget("date_stat"),
|
||||
self.source_ref.get_date_object(),self.window)
|
||||
|
||||
def _create_tabbed_pages(self):
|
||||
"""
|
||||
@ -176,19 +133,29 @@ class EditSourceRef(DisplayState.ManagedWindow):
|
||||
window.
|
||||
|
||||
"""
|
||||
self.note_tab = self._add_source_page(NoteTab(
|
||||
self.state, self.uistate, self.track,
|
||||
self.source.get_note_object()))
|
||||
self.gallery_tab = self._add_source_page(GalleryTab(
|
||||
self.state, self.uistate, self.track,
|
||||
self.source.get_media_list()))
|
||||
self.srcref_list = self._add_source_page(SourceBackRefList(
|
||||
self.state,self.uistate, self.track,
|
||||
self.db.find_backlink_handles(self.source.handle)))
|
||||
|
||||
self.comment_tab = self._add_ref_page(NoteTab(
|
||||
self.state, self.uistate, self.track,
|
||||
self.source_ref.get_note_object(),_('Comments')))
|
||||
notebook_src = self.top.get_widget('notebook_src')
|
||||
notebook_ref = self.top.get_widget('notebook_ref')
|
||||
|
||||
self.note_tab = self._add_tab(
|
||||
notebook_src,
|
||||
NoteTab(self.dbstate, self.uistate, self.track,
|
||||
self.source.get_note_object()))
|
||||
|
||||
self.gallery_tab = self._add_tab(
|
||||
notebook_src,
|
||||
GalleryTab(self.dbstate, self.uistate, self.track,
|
||||
self.source.get_media_list()))
|
||||
|
||||
self.srcref_list = self._add_tab(
|
||||
notebook_src,
|
||||
SourceBackRefList(self.dbstate,self.uistate, self.track,
|
||||
self.db.find_backlink_handles(self.source.handle)))
|
||||
|
||||
self.comment_tab = self._add_tab(
|
||||
notebook_ref,
|
||||
NoteTab(self.dbstate, self.uistate, self.track,
|
||||
self.source_ref.get_note_object(),_('Comments')))
|
||||
|
||||
def build_menu_names(self,sourceref):
|
||||
if self.source:
|
||||
@ -198,28 +165,19 @@ class EditSourceRef(DisplayState.ManagedWindow):
|
||||
submenu_label = _('New Source')
|
||||
return (_('Source Reference Editor'),submenu_label)
|
||||
|
||||
def build_window_key(self,sourceref):
|
||||
if self.source:
|
||||
return self.source.get_handle()
|
||||
else:
|
||||
return id(self)
|
||||
|
||||
def on_help_clicked(self,obj):
|
||||
pass
|
||||
|
||||
def ok_clicked(self,obj):
|
||||
|
||||
trans = self.db.transaction_begin()
|
||||
self.db.commit_source(self.source,trans)
|
||||
if self.source_added:
|
||||
self.db.transaction_commit(trans,_("Add Source"))
|
||||
else:
|
||||
if self.source.handle:
|
||||
self.db.commit_source(self.source,trans)
|
||||
self.db.transaction_commit(trans,_("Modify Source"))
|
||||
self.close(None)
|
||||
else:
|
||||
self.db.add_source(self.source,trans)
|
||||
self.db.transaction_commit(trans,_("Add Source"))
|
||||
self.source_ref.ref = self.source.handle
|
||||
|
||||
if self.update:
|
||||
self.update((self.source_ref,self.source))
|
||||
self.update(self.source_ref,self.source)
|
||||
|
||||
def cancel_clicked(self,obj):
|
||||
self.close()
|
||||
self.close_window()
|
||||
|
||||
|
@ -62,7 +62,7 @@ class MergePlaces:
|
||||
self.update = update
|
||||
self.trans = self.db.transaction_begin()
|
||||
|
||||
self.glade = gtk.glade.XML(const.mergeFile,"merge_places","gramps")
|
||||
self.glade = gtk.glade.XML(const.merge_glade,"merge_places","gramps")
|
||||
self.top = self.glade.get_widget("merge_places")
|
||||
Utils.set_titles(self.top,self.glade.get_widget('title'),
|
||||
_("Select title"))
|
||||
@ -179,7 +179,7 @@ class MergeSources:
|
||||
self.src2 = self.db.get_source_from_handle(self.old_handle)
|
||||
self.update = update
|
||||
|
||||
self.glade = gtk.glade.XML(const.mergeFile,"merge_sources","gramps")
|
||||
self.glade = gtk.glade.XML(const.merge_glade,"merge_sources","gramps")
|
||||
self.top = self.glade.get_widget("merge_sources")
|
||||
Utils.set_titles(self.top,self.glade.get_widget('title'),
|
||||
_("Merge Sources"))
|
||||
|
@ -98,7 +98,7 @@ class PluginDialog(DisplayState.ManagedWindow):
|
||||
self.state = state
|
||||
self.uistate = uistate
|
||||
|
||||
self.dialog = gtk.glade.XML(const.pluginsFile,"report","gramps")
|
||||
self.dialog = gtk.glade.XML(const.plugins_glade,"report","gramps")
|
||||
self.dialog.signal_autoconnect({
|
||||
"on_report_apply_clicked" : self.on_apply_clicked,
|
||||
"destroy_passed_object" : self.close,
|
||||
|
@ -58,8 +58,8 @@ from DdTargets import DdTargets
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
|
||||
LINK_PIC = gtk.gdk.pixbuf_new_from_file( "%s/%s" % (os.path.dirname(__file__),
|
||||
'images/stock_link.png'))
|
||||
_stock_image = os.path.join(const.image_dir,'stock_link.png')
|
||||
LINK_PIC = gtk.gdk.pixbuf_new_from_file(_stock_image)
|
||||
BLANK_PIC = gtk.gdk.Pixbuf(0,0,8,1,1)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
@ -811,22 +811,16 @@ class ScratchPadWindow:
|
||||
"""Initializes the ScratchPad class, and displays the window"""
|
||||
|
||||
self.parent = parent
|
||||
# if self.parent.child_windows.has_key(self.__class__):
|
||||
# self.parent.child_windows[self.__class__].present(None)
|
||||
# return
|
||||
# self.win_key = self.__class__
|
||||
|
||||
|
||||
self.database_changed(database)
|
||||
self.db.connect('database-changed', self.database_changed)
|
||||
|
||||
base = os.path.dirname(__file__)
|
||||
self.glade_file = "%s/%s" % (base,"scratchpad.glade")
|
||||
self.glade_file = os.path.join(const.glade_dir,"scratchpad.glade")
|
||||
|
||||
self.top = gtk.glade.XML(self.glade_file,"scratch_pad","gramps")
|
||||
self.window = self.top.get_widget("scratch_pad")
|
||||
#FIXME: how do we get the icon now?
|
||||
#self.window.set_icon(self.parent.topWindow.get_icon())
|
||||
|
||||
self.window.set_icon_from_file(const.icon)
|
||||
self.clear_all_btn = self.top.get_widget("btn_clear_all")
|
||||
self.clear_btn = self.top.get_widget("btn_clear")
|
||||
|
||||
@ -938,17 +932,3 @@ def place_title(db,event):
|
||||
def ScratchPad(database,person,callback,parent=None):
|
||||
ScratchPadWindow(database,parent)
|
||||
|
||||
#-------------------------------------------------------------------------
|
||||
#
|
||||
#
|
||||
#
|
||||
#-------------------------------------------------------------------------
|
||||
from PluginMgr import register_tool
|
||||
|
||||
register_tool(
|
||||
ScratchPad,
|
||||
_("Scratch Pad"),
|
||||
category=_("Utilities"),
|
||||
description=_("The Scratch Pad provides a temporary note pad to store "
|
||||
"objects for easy reuse.")
|
||||
)
|
||||
|
@ -661,6 +661,7 @@ def set_titles(window,title,t,msg=None):
|
||||
window.set_title('%s - GRAMPS' % msg)
|
||||
else:
|
||||
window.set_title('%s - GRAMPS' % t)
|
||||
window.set_icon_from_file(const.icon)
|
||||
|
||||
def gfloat(val):
|
||||
"""Converts to floating number, taking care of possible locale differences.
|
||||
|
@ -92,26 +92,34 @@ no_gconf = False
|
||||
root_dir = os.path.abspath(os.path.dirname(__file__))
|
||||
image_dir = os.path.join(root_dir,"images")
|
||||
|
||||
system_filters = os.path.join(root_dir,"system_filters.xml")
|
||||
custom_filters = "~/.gramps/custom_filters.xml"
|
||||
report_options = "~/.gramps/report_options.xml"
|
||||
tool_options = "~/.gramps/tool_options.xml"
|
||||
bsddbenv_dir = "~/.gramps/bsddbenv"
|
||||
|
||||
icon = os.path.join(root_dir,"images","gramps.png")
|
||||
logo = os.path.join(root_dir,"images","logo.png")
|
||||
splash = os.path.join(root_dir,"images","splash.jpg")
|
||||
license = os.path.join(root_dir,"COPYING")
|
||||
gladeFile = os.path.join(root_dir,"gramps.glade")
|
||||
editPersonFile = os.path.join(root_dir,"edit_person.glade")
|
||||
|
||||
#
|
||||
# Glade files
|
||||
#
|
||||
|
||||
glade_dir = os.path.join(root_dir,"glade")
|
||||
gladeFile = os.path.join(glade_dir,"gramps.glade")
|
||||
person_glade = os.path.join(glade_dir,"edit_person.glade")
|
||||
pluginsFile = os.path.join(root_dir,"plugins.glade")
|
||||
mergeFile = os.path.join(root_dir,"mergedata.glade")
|
||||
merge2File = os.path.join(root_dir,"merge.glade")
|
||||
filterFile = os.path.join(root_dir,"rule.glade")
|
||||
|
||||
|
||||
pluginsDir = os.path.join(root_dir,"plugins")
|
||||
datesDir = os.path.join(root_dir,"dates")
|
||||
docgenDir = os.path.join(root_dir,"docgen")
|
||||
data_dir = os.path.join(root_dir,"data")
|
||||
system_filters = os.path.join(data_dir,"system_filters.xml")
|
||||
template_dir = os.path.join(data_dir,"templates")
|
||||
papersize = "file:%s/papersize.xml" % data_dir
|
||||
tipdata = os.path.join(data_dir,"tips.xml")
|
||||
|
@ -8,6 +8,7 @@ dist_pkgdata_DATA = \
|
||||
gedcom.xml \
|
||||
somerights20.gif \
|
||||
papersize.xml \
|
||||
system_filters.xml \
|
||||
tips.xml\
|
||||
main1.css\
|
||||
main2.css\
|
||||
|
@ -12,7 +12,6 @@
|
||||
<property name="default_height">500</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -541,7 +540,8 @@ Unknown</property>
|
||||
<child>
|
||||
<widget class="GtkImage" id="image2261">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">images/edit_sm.png</property>
|
||||
<property name="stock">gtk-edit</property>
|
||||
<property name="icon_size">4</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
@ -14,7 +14,6 @@
|
||||
<property name="default_height">450</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -356,7 +355,6 @@
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -502,7 +500,6 @@
|
||||
<property name="default_height">500</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -1380,7 +1377,6 @@
|
||||
<property name="default_height">450</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -2169,7 +2165,6 @@
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -4034,7 +4029,6 @@ Text Beside Icons</property>
|
||||
<property name="default_height">450</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -4171,7 +4165,6 @@ Text Beside Icons</property>
|
||||
<property name="default_height">300</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -4399,7 +4392,6 @@ Text Beside Icons</property>
|
||||
<property name="modal">True</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -5953,7 +5945,6 @@ Text Beside Icons</property>
|
||||
<property name="default_height">450</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -6271,7 +6262,6 @@ Text Beside Icons</property>
|
||||
<property name="default_height">450</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -7023,7 +7013,6 @@ Text Beside Icons</property>
|
||||
<property name="default_height">450</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -8776,7 +8765,6 @@ Text Beside Icons</property>
|
||||
<property name="default_height">450</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -9223,7 +9211,6 @@ Text Beside Icons</property>
|
||||
<property name="default_height">400</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -9488,7 +9475,6 @@ Text Beside Icons</property>
|
||||
<property name="default_width">500</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -9992,7 +9978,6 @@ Text Beside Icons</property>
|
||||
<property name="default_height">450</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -10542,7 +10527,6 @@ Text Beside Icons</property>
|
||||
<property name="default_width">600</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -10866,7 +10850,6 @@ Text Beside Icons</property>
|
||||
<property name="default_width">600</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -12008,7 +11991,6 @@ Text Beside Icons</property>
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -12914,7 +12896,6 @@ Text Beside Icons</property>
|
||||
<property name="default_height">400</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -13005,7 +12986,6 @@ Text Beside Icons</property>
|
||||
<property name="default_height">450</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -13309,7 +13289,6 @@ Text Beside Icons</property>
|
||||
<property name="default_width">550</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -13856,7 +13835,6 @@ Text Beside Icons</property>
|
||||
<property name="default_height">450</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -14632,7 +14610,6 @@ Text Beside Icons</property>
|
||||
<property name="default_width">600</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
@ -15519,7 +15496,6 @@ Very High</property>
|
||||
<property name="default_height">450</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
@ -11,12 +11,13 @@
|
||||
<property name="modal">False</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="urgency_hint">False</property>
|
||||
<property name="has_separator">False</property>
|
||||
|
||||
<child internal-child="vbox">
|
||||
@ -136,12 +137,13 @@
|
||||
<property name="default_height">400</property>
|
||||
<property name="resizable">True</property>
|
||||
<property name="destroy_with_parent">False</property>
|
||||
<property name="icon">images/gramps.png</property>
|
||||
<property name="decorated">True</property>
|
||||
<property name="skip_taskbar_hint">False</property>
|
||||
<property name="skip_pager_hint">False</property>
|
||||
<property name="type_hint">GDK_WINDOW_TYPE_HINT_NORMAL</property>
|
||||
<property name="gravity">GDK_GRAVITY_NORTH_WEST</property>
|
||||
<property name="focus_on_map">True</property>
|
||||
<property name="urgency_hint">False</property>
|
||||
<signal name="delete_event" handler="on_delete_event" last_modification_time="Sat, 28 Feb 2004 03:40:16 GMT"/>
|
||||
|
||||
<child>
|
||||
@ -214,6 +216,9 @@
|
||||
<property name="rules_hint">False</property>
|
||||
<property name="reorderable">False</property>
|
||||
<property name="enable_search">True</property>
|
||||
<property name="fixed_height_mode">False</property>
|
||||
<property name="hover_selection">False</property>
|
||||
<property name="hover_expand">False</property>
|
||||
</widget>
|
||||
</child>
|
||||
</widget>
|
||||
@ -235,22 +240,6 @@
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="spacing">0</property>
|
||||
|
||||
<child>
|
||||
<widget class="GtkImage" id="image">
|
||||
<property name="visible">True</property>
|
||||
<property name="pixbuf">images/gramps.png</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">0</property>
|
||||
<property name="ypad">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">10</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
|
||||
<child>
|
||||
<widget class="GtkLabel" id="title">
|
||||
<property name="visible">True</property>
|
||||
@ -264,6 +253,10 @@
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">10</property>
|
||||
<property name="ypad">10</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
@ -292,6 +285,10 @@
|
||||
<property name="yalign">0</property>
|
||||
<property name="xpad">10</property>
|
||||
<property name="ypad">20</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="padding">0</property>
|
||||
@ -321,6 +318,10 @@
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">3</property>
|
||||
<property name="ypad">3</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -345,6 +346,10 @@
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">5</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
@ -368,6 +373,10 @@
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">3</property>
|
||||
<property name="ypad">3</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -392,6 +401,10 @@
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">3</property>
|
||||
<property name="ypad">3</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
@ -416,6 +429,10 @@
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">5</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
@ -440,6 +457,10 @@
|
||||
<property name="yalign">0.5</property>
|
||||
<property name="xpad">5</property>
|
||||
<property name="ypad">0</property>
|
||||
<property name="ellipsize">PANGO_ELLIPSIZE_NONE</property>
|
||||
<property name="width_chars">-1</property>
|
||||
<property name="single_line_mode">False</property>
|
||||
<property name="angle">0</property>
|
||||
</widget>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
@ -57,25 +57,25 @@ def register_stock_icons ():
|
||||
import os
|
||||
items = [
|
||||
(os.path.join(const.image_dir,'person.svg'),
|
||||
('gramps-person','Person',gtk.gdk.CONTROL_MASK,0,'')),
|
||||
('gramps-person',_('Person'),gtk.gdk.CONTROL_MASK,0,'')),
|
||||
(os.path.join(const.image_dir,'relation.svg'),
|
||||
('gramps-family','Relationships',gtk.gdk.CONTROL_MASK,0,'')),
|
||||
('gramps-family',_('Relationships'),gtk.gdk.CONTROL_MASK,0,'')),
|
||||
(os.path.join(const.image_dir,'flist.svg'),
|
||||
('gramps-family-list','Family List',gtk.gdk.CONTROL_MASK,0,'')),
|
||||
(os.path.join(const.image_dir,'/media.svg'),
|
||||
('gramps-media','Media',gtk.gdk.CONTROL_MASK,0,'')),
|
||||
('gramps-family-list',_('Family List'),gtk.gdk.CONTROL_MASK,0,'')),
|
||||
(os.path.join(const.image_dir,'media.svg'),
|
||||
('gramps-media',_('Media'),gtk.gdk.CONTROL_MASK,0,'')),
|
||||
(os.path.join(const.image_dir,'ped24.png'),
|
||||
('gramps-pedigree','Pedigree',gtk.gdk.CONTROL_MASK,0,'')),
|
||||
('gramps-pedigree',_('Pedigree'),gtk.gdk.CONTROL_MASK,0,'')),
|
||||
(os.path.join(const.image_dir,'repos.png'),
|
||||
('gramps-repository','Repositories',gtk.gdk.CONTROL_MASK,0,'')),
|
||||
('gramps-repository',_('Repositories'),gtk.gdk.CONTROL_MASK,0,'')),
|
||||
(os.path.join(const.image_dir,'sources.png'),
|
||||
('gramps-source','Sources',gtk.gdk.CONTROL_MASK,0,'')),
|
||||
('gramps-source',_('Sources'),gtk.gdk.CONTROL_MASK,0,'')),
|
||||
(os.path.join(const.image_dir,'events.png'),
|
||||
('gramps-event','Events',gtk.gdk.CONTROL_MASK,0,'')),
|
||||
('gramps-event',_('Events'),gtk.gdk.CONTROL_MASK,0,'')),
|
||||
(os.path.join(const.image_dir,'place.png'),
|
||||
('gramps-place','Places',gtk.gdk.CONTROL_MASK,0,'')),
|
||||
('gramps-place',_('Places'),gtk.gdk.CONTROL_MASK,0,'')),
|
||||
(os.path.join(const.image_dir,'place.png'),
|
||||
('gramps-map','Map',gtk.gdk.CONTROL_MASK,0,'')),
|
||||
('gramps-map',_('Map'),gtk.gdk.CONTROL_MASK,0,'')),
|
||||
]
|
||||
|
||||
# Register our stock items
|
||||
@ -90,19 +90,19 @@ def register_stock_icons ():
|
||||
for dirname in iconpaths:
|
||||
icon_file = os.path.expanduser(os.path.join(dirname,key))
|
||||
if os.path.isfile(icon_file):
|
||||
break
|
||||
try:
|
||||
pixbuf = gtk.gdk.pixbuf_new_from_file (icon_file)
|
||||
break
|
||||
except:
|
||||
pass
|
||||
else:
|
||||
icon_file = os.path.join(const.image_dir,'gramps.png')
|
||||
pixbuf = gtk.gdk.pixbuf_new_from_file (icon_file)
|
||||
|
||||
pixbuf = gtk.gdk.pixbuf_new_from_file (icon_file)
|
||||
pixbuf = pixbuf.add_alpha(True, chr(0xff), chr(0xff), chr(0xff))
|
||||
|
||||
# Register icon to accompany stock item
|
||||
if pixbuf:
|
||||
icon_set = gtk.IconSet (pixbuf)
|
||||
factory.add (data[0], icon_set)
|
||||
else:
|
||||
log.debug('failed to load GTK logo for toolbar')
|
||||
icon_set = gtk.IconSet (pixbuf)
|
||||
factory.add (data[0], icon_set)
|
||||
|
||||
class Gramps:
|
||||
"""
|
||||
|
@ -321,7 +321,7 @@ class FilterEditor:
|
||||
self.filterdb = GenericFilter.GenericFilterList(filterdb)
|
||||
self.filterdb.load()
|
||||
|
||||
self.editor = gtk.glade.XML(const.filterFile,'filter_list',"gramps")
|
||||
self.editor = gtk.glade.XML(const.rule_glade,'filter_list',"gramps")
|
||||
self.window = self.editor.get_widget('filter_list')
|
||||
self.filter_list = self.editor.get_widget('filters')
|
||||
self.edit = self.editor.get_widget('edit')
|
||||
@ -454,7 +454,7 @@ class EditFilter:
|
||||
self.win_key = self.filter
|
||||
self.child_windows = {}
|
||||
|
||||
self.glade = gtk.glade.XML(const.filterFile,'define_filter',"gramps")
|
||||
self.glade = gtk.glade.XML(const.rule_glade,'define_filter',"gramps")
|
||||
self.window = self.glade.get_widget('define_filter')
|
||||
self.define_title = self.glade.get_widget('title')
|
||||
|
||||
@ -634,7 +634,7 @@ class EditRule:
|
||||
self.pmap[p.get_title()] = p_id
|
||||
|
||||
self.active_rule = val
|
||||
self.rule = gtk.glade.XML(const.filterFile,'rule_editor',"gramps")
|
||||
self.rule = gtk.glade.XML(const.rule_glade,'rule_editor',"gramps")
|
||||
self.window = self.rule.get_widget('rule_editor')
|
||||
self.window.hide()
|
||||
self.valuebox = self.rule.get_widget('valuebox')
|
||||
@ -869,7 +869,7 @@ class ShowResults:
|
||||
self.parent = parent
|
||||
self.win_key = self
|
||||
self.filtname = filtname
|
||||
self.glade = gtk.glade.XML(const.filterFile,'test',"gramps")
|
||||
self.glade = gtk.glade.XML(const.rule_glade,'test',"gramps")
|
||||
self.window = self.glade.get_widget('test')
|
||||
text = self.glade.get_widget('text')
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user