Add 'Search for citations' to 'Remove unused objects' tool
This commit is contained in:
parent
ea4a4cd464
commit
aed80fc725
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.18.3 -->
|
||||
<!-- Generated with glade 3.16.1 -->
|
||||
<interface>
|
||||
<requires lib="gtk+" version="3.10"/>
|
||||
<object class="GtkDialog" id="removeunused">
|
||||
@ -98,6 +98,7 @@
|
||||
<property name="receives_default">False</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -115,6 +116,7 @@
|
||||
<property name="receives_default">False</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
@ -123,6 +125,21 @@
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="citations_box">
|
||||
<property name="label" translatable="yes">Search for citations</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="receives_default">False</property>
|
||||
<property name="xalign">0</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkCheckButton" id="places_box">
|
||||
<property name="label" translatable="yes">Search for places</property>
|
||||
@ -132,12 +149,13 @@
|
||||
<property name="receives_default">False</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">2</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -149,12 +167,13 @@
|
||||
<property name="receives_default">False</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">3</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -166,12 +185,13 @@
|
||||
<property name="receives_default">False</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">4</property>
|
||||
<property name="position">5</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
@ -183,12 +203,13 @@
|
||||
<property name="receives_default">False</property>
|
||||
<property name="events">GDK_POINTER_MOTION_MASK | GDK_POINTER_MOTION_HINT_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="xalign">0.5</property>
|
||||
<property name="draw_indicator">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="position">5</property>
|
||||
<property name="position">6</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
|
@ -103,6 +103,12 @@ class RemoveUnused(tool.Tool, ManagedWindow, UpdateCallback):
|
||||
'editor' : 'EditSource',
|
||||
'icon' : 'gramps-source',
|
||||
'name_ix' : 2},
|
||||
'citations' : {'get_func': self.db.get_citation_from_handle,
|
||||
'remove' : self.db.remove_citation,
|
||||
'get_text': None,
|
||||
'editor' : 'EditCitation',
|
||||
'icon' : 'gramps-citation',
|
||||
'name_ix' : 3},
|
||||
'places' : {'get_func': self.db.get_place_from_handle,
|
||||
'remove' : self.db.remove_place,
|
||||
'get_text': None,
|
||||
@ -138,6 +144,7 @@ class RemoveUnused(tool.Tool, ManagedWindow, UpdateCallback):
|
||||
|
||||
self.events_box = self.top.get_object('events_box')
|
||||
self.sources_box = self.top.get_object('sources_box')
|
||||
self.citations_box = self.top.get_object('citations_box')
|
||||
self.places_box = self.top.get_object('places_box')
|
||||
self.media_box = self.top.get_object('media_box')
|
||||
self.repos_box = self.top.get_object('repos_box')
|
||||
@ -148,6 +155,8 @@ class RemoveUnused(tool.Tool, ManagedWindow, UpdateCallback):
|
||||
self.events_box.set_active(self.options.handler.options_dict['events'])
|
||||
self.sources_box.set_active(
|
||||
self.options.handler.options_dict['sources'])
|
||||
self.citations_box.set_active(
|
||||
self.options.handler.options_dict['citations'])
|
||||
self.places_box.set_active(
|
||||
self.options.handler.options_dict['places'])
|
||||
self.media_box.set_active(self.options.handler.options_dict['media'])
|
||||
@ -229,6 +238,7 @@ class RemoveUnused(tool.Tool, ManagedWindow, UpdateCallback):
|
||||
self.options.handler.options_dict.update(
|
||||
events = self.events_box.get_active(),
|
||||
sources = self.sources_box.get_active(),
|
||||
citations = self.citations_box.get_active(),
|
||||
places = self.places_box.get_active(),
|
||||
media = self.media_box.get_active(),
|
||||
repos = self.repos_box.get_active(),
|
||||
@ -261,6 +271,7 @@ class RemoveUnused(tool.Tool, ManagedWindow, UpdateCallback):
|
||||
tables = (
|
||||
('events', db.get_event_cursor, db.get_number_of_events),
|
||||
('sources', db.get_source_cursor, db.get_number_of_sources),
|
||||
('citations', db.get_citation_cursor, db.get_number_of_citations),
|
||||
('places', db.get_place_cursor, db.get_number_of_places),
|
||||
('media', db.get_media_cursor, db.get_number_of_media),
|
||||
('repos', db.get_repository_cursor, db.get_number_of_repositories),
|
||||
@ -449,6 +460,7 @@ class CheckOptions(tool.ToolOptions):
|
||||
self.options_dict = {
|
||||
'events' : 1,
|
||||
'sources' : 1,
|
||||
'citations' : 1,
|
||||
'places' : 1,
|
||||
'media' : 1,
|
||||
'repos' : 1,
|
||||
@ -461,6 +473,9 @@ class CheckOptions(tool.ToolOptions):
|
||||
'sources' : ("=0/1","Whether to use check for unused sources",
|
||||
["Do not check sources","Check sources"],
|
||||
True),
|
||||
'citations' : ("=0/1","Whether to use check for unused citations",
|
||||
["Do not check citations","Check citations"],
|
||||
True),
|
||||
'places' : ("=0/1","Whether to use check for unused places",
|
||||
["Do not check places","Check places"],
|
||||
True),
|
||||
|
Loading…
x
Reference in New Issue
Block a user