Move 2 more options to config, increase columndialog size
svn: r14220
This commit is contained in:
parent
65d03d2556
commit
c0fc14960f
@ -96,7 +96,7 @@ class ColumnOrder(gtk.VBox):
|
|||||||
hbox.set_spacing(10)
|
hbox.set_spacing(10)
|
||||||
hbox.pack_start(gtk.Label(' '))
|
hbox.pack_start(gtk.Label(' '))
|
||||||
scroll = gtk.ScrolledWindow()
|
scroll = gtk.ScrolledWindow()
|
||||||
scroll.set_size_request(250,300)
|
scroll.set_size_request(300,300)
|
||||||
hbox.pack_start(scroll)
|
hbox.pack_start(scroll)
|
||||||
self.tree = gtk.TreeView()
|
self.tree = gtk.TreeView()
|
||||||
self.tree.set_reorderable(True)
|
self.tree.set_reorderable(True)
|
||||||
|
@ -203,6 +203,8 @@ class RelationshipView(NavigationView):
|
|||||||
self.redraw()
|
self.redraw()
|
||||||
|
|
||||||
def config_update(self, client, cnxn_id, entry, data):
|
def config_update(self, client, cnxn_id, entry, data):
|
||||||
|
self.show_siblings = self._config.get('preferences.family-siblings')
|
||||||
|
self.show_details = self._config.get('preferences.family-details')
|
||||||
self.redraw()
|
self.redraw()
|
||||||
|
|
||||||
def build_tree(self):
|
def build_tree(self):
|
||||||
@ -341,8 +343,6 @@ class RelationshipView(NavigationView):
|
|||||||
</placeholder>
|
</placeholder>
|
||||||
</menu>
|
</menu>
|
||||||
<menu action="ViewMenu">
|
<menu action="ViewMenu">
|
||||||
<menuitem action="Siblings"/>
|
|
||||||
<menuitem action="Details"/>
|
|
||||||
</menu>
|
</menu>
|
||||||
</menubar>
|
</menubar>
|
||||||
<toolbar name="ToolBar">
|
<toolbar name="ToolBar">
|
||||||
@ -403,13 +403,6 @@ class RelationshipView(NavigationView):
|
|||||||
self._add_action_group(self.order_action)
|
self._add_action_group(self.order_action)
|
||||||
self._add_action_group(self.family_action)
|
self._add_action_group(self.family_action)
|
||||||
|
|
||||||
self._add_toggle_action('Details', None, _('Show Details'),
|
|
||||||
None, None, self.details_toggle,
|
|
||||||
self.show_details)
|
|
||||||
self._add_toggle_action('Siblings', None, _('Show Siblings'),
|
|
||||||
None, None, self.siblings_toggle,
|
|
||||||
self.show_siblings)
|
|
||||||
|
|
||||||
self.order_action.set_sensitive(self.reorder_sensitive)
|
self.order_action.set_sensitive(self.reorder_sensitive)
|
||||||
self.family_action.set_sensitive(False)
|
self.family_action.set_sensitive(False)
|
||||||
|
|
||||||
@ -420,16 +413,6 @@ class RelationshipView(NavigationView):
|
|||||||
except Errors.WindowActiveError:
|
except Errors.WindowActiveError:
|
||||||
return
|
return
|
||||||
|
|
||||||
def siblings_toggle(self, obj):
|
|
||||||
self.show_siblings = obj.get_active()
|
|
||||||
self.change_person(self.get_active())
|
|
||||||
self._config.set('preferences.family-siblings', self.show_siblings)
|
|
||||||
|
|
||||||
def details_toggle(self, obj):
|
|
||||||
self.show_details = obj.get_active()
|
|
||||||
self.change_person(self.get_active())
|
|
||||||
self._config.set('preferences.family-details', self.show_details)
|
|
||||||
|
|
||||||
def change_db(self, db):
|
def change_db(self, db):
|
||||||
#reset the connects
|
#reset the connects
|
||||||
self._change_db(db)
|
self._change_db(db)
|
||||||
@ -1611,6 +1594,10 @@ class RelationshipView(NavigationView):
|
|||||||
self.config_update)
|
self.config_update)
|
||||||
self._config.connect("preferences.relation-display-theme",
|
self._config.connect("preferences.relation-display-theme",
|
||||||
self.config_update)
|
self.config_update)
|
||||||
|
self._config.connect("preferences.family-siblings",
|
||||||
|
self.config_update)
|
||||||
|
self._config.connect("preferences.family-details",
|
||||||
|
self.config_update)
|
||||||
config.connect("interface.toolbar-on",
|
config.connect("interface.toolbar-on",
|
||||||
self.shade_update)
|
self.shade_update)
|
||||||
|
|
||||||
@ -1637,6 +1624,23 @@ class RelationshipView(NavigationView):
|
|||||||
|
|
||||||
return _('Layout'), table
|
return _('Layout'), table
|
||||||
|
|
||||||
|
def content_panel(self, configdialog):
|
||||||
|
"""
|
||||||
|
Function that builds the widget in the configuration dialog
|
||||||
|
"""
|
||||||
|
table = gtk.Table(2, 2)
|
||||||
|
table.set_border_width(12)
|
||||||
|
table.set_col_spacings(6)
|
||||||
|
table.set_row_spacings(6)
|
||||||
|
configdialog.add_checkbox(table,
|
||||||
|
_('Show Details'),
|
||||||
|
0, 'preferences.family-details')
|
||||||
|
configdialog.add_checkbox(table,
|
||||||
|
_('Show Siblings'),
|
||||||
|
1, 'preferences.family-siblings')
|
||||||
|
|
||||||
|
return _('Content'), table
|
||||||
|
|
||||||
def _config_update_theme(self, obj):
|
def _config_update_theme(self, obj):
|
||||||
"""
|
"""
|
||||||
callback from the theme checkbox
|
callback from the theme checkbox
|
||||||
@ -1657,7 +1661,7 @@ class RelationshipView(NavigationView):
|
|||||||
|
|
||||||
:return: list of functions
|
:return: list of functions
|
||||||
"""
|
"""
|
||||||
return [self.config_panel]
|
return [self.content_panel, self.config_panel]
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
Loading…
Reference in New Issue
Block a user