GUI now remembers if set to 'Open with default application'; should not effect running report from CLI
svn: r16246
This commit is contained in:
parent
2354e073f6
commit
79f6646555
@ -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)
|
||||||
|
@ -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
|
||||||
@ -112,9 +113,9 @@ class DocReportDialog(ReportDialog):
|
|||||||
file. Those chances are made here."""
|
file. Those chances are made here."""
|
||||||
docgen_plugin = obj.get_active_plugin()
|
docgen_plugin = obj.get_active_plugin()
|
||||||
if docgen_plugin.get_extension():
|
if docgen_plugin.get_extension():
|
||||||
self.open_with_app.set_sensitive (True)
|
self.open_with_app.set_sensitive(True)
|
||||||
else:
|
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
|
# Is this to be a printed report or an electronic report
|
||||||
# (i.e. a set of web pages)
|
# (i.e. a set of web pages)
|
||||||
@ -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())
|
||||||
|
@ -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
|
||||||
|
Loading…
Reference in New Issue
Block a user