GUI now remembers if set to 'Open with default application'; should not effect running report from CLI

svn: r16246
This commit is contained in:
Doug Blank 2010-12-04 18:09:00 +00:00
parent 2354e073f6
commit 79f6646555
3 changed files with 12 additions and 2 deletions

View File

@ -213,6 +213,7 @@ register('interface.note-height', 500)
register('interface.note-sel-height', 450)
register('interface.note-sel-width', 600)
register('interface.note-width', 700)
register('interface.open-with-default-viewer', False)
register('interface.pedview-layout', 0)
register('interface.pedview-show-images', True)
register('interface.pedview-show-marriage', False)

View File

@ -42,6 +42,7 @@ import gtk
#
#-------------------------------------------------------------------------
import const
import config
from _reportdialog import ReportDialog
from _papermenu import PaperFrame
from gui.pluginmanager import GuiPluginManager
@ -112,9 +113,9 @@ class DocReportDialog(ReportDialog):
file. Those chances are made here."""
docgen_plugin = obj.get_active_plugin()
if docgen_plugin.get_extension():
self.open_with_app.set_sensitive (True)
self.open_with_app.set_sensitive(True)
else:
self.open_with_app.set_sensitive (False)
self.open_with_app.set_sensitive(False)
# Is this to be a printed report or an electronic report
# (i.e. a set of web pages)
@ -165,6 +166,8 @@ class DocReportDialog(ReportDialog):
self.row += 1
self.open_with_app = gtk.CheckButton(_("Open with default viewer"))
self.open_with_app.set_active(
config.get('interface.open-with-default-viewer'))
self.tbl.attach(self.open_with_app, 2, 4, self.row, self.row+1,
yoptions=gtk.SHRINK)
self.row += 1
@ -266,3 +269,5 @@ class DocReportDialog(ReportDialog):
# Save options
self.options.handler.save_options()
config.set('interface.open-with-default-viewer',
self.open_with_app.get_active())

View File

@ -1124,6 +1124,8 @@ class GraphvizReportDialog(ReportDialog):
self.row += 1
self.open_with_app = gtk.CheckButton(_("Open with default viewer"))
self.open_with_app.set_active(
config.get('interface.open-with-default-viewer'))
self.tbl.attach(self.open_with_app, 2, 4, self.row, self.row+1,
yoptions=gtk.SHRINK)
self.row += 1
@ -1212,6 +1214,8 @@ class GraphvizReportDialog(ReportDialog):
# Save options
self.options.handler.save_options()
config.set('interface.open-with-default-viewer',
self.open_with_app.get_active())
def parse_format_frame(self):
"""Parse the format frame of the dialog. Save the user