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-height', 450)
register('interface.note-sel-width', 600) register('interface.note-sel-width', 600)
register('interface.note-width', 700) register('interface.note-width', 700)
register('interface.open-with-default-viewer', False)
register('interface.pedview-layout', 0) register('interface.pedview-layout', 0)
register('interface.pedview-show-images', True) register('interface.pedview-show-images', True)
register('interface.pedview-show-marriage', False) register('interface.pedview-show-marriage', False)

View File

@ -42,6 +42,7 @@ import gtk
# #
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
import const import const
import config
from _reportdialog import ReportDialog from _reportdialog import ReportDialog
from _papermenu import PaperFrame from _papermenu import PaperFrame
from gui.pluginmanager import GuiPluginManager from gui.pluginmanager import GuiPluginManager
@ -165,6 +166,8 @@ class DocReportDialog(ReportDialog):
self.row += 1 self.row += 1
self.open_with_app = gtk.CheckButton(_("Open with default viewer")) 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, self.tbl.attach(self.open_with_app, 2, 4, self.row, self.row+1,
yoptions=gtk.SHRINK) yoptions=gtk.SHRINK)
self.row += 1 self.row += 1
@ -266,3 +269,5 @@ class DocReportDialog(ReportDialog):
# Save options # Save options
self.options.handler.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.row += 1
self.open_with_app = gtk.CheckButton(_("Open with default viewer")) 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, self.tbl.attach(self.open_with_app, 2, 4, self.row, self.row+1,
yoptions=gtk.SHRINK) yoptions=gtk.SHRINK)
self.row += 1 self.row += 1
@ -1212,6 +1214,8 @@ class GraphvizReportDialog(ReportDialog):
# Save options # Save options
self.options.handler.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): def parse_format_frame(self):
"""Parse the format frame of the dialog. Save the user """Parse the format frame of the dialog. Save the user