Fixed Utils.open_file_with_default_application() to gui.utils instead of Utils now. Works again.
svn: r12699
This commit is contained in:
@ -46,7 +46,7 @@ import gtk
|
|||||||
# gramps modules
|
# gramps modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import PageView
|
from gui.utils import open_file_with_default_applicationimport PageView
|
||||||
import DisplayModels
|
import DisplayModels
|
||||||
import ThumbNails
|
import ThumbNails
|
||||||
import const
|
import const
|
||||||
@ -226,7 +226,7 @@ class MediaView(PageView.ListView):
|
|||||||
for handle in self.selected_handles():
|
for handle in self.selected_handles():
|
||||||
ref_obj = self.dbstate.db.get_object_from_handle(handle)
|
ref_obj = self.dbstate.db.get_object_from_handle(handle)
|
||||||
mpath = Utils.media_path_full(self.dbstate.db, ref_obj.get_path())
|
mpath = Utils.media_path_full(self.dbstate.db, ref_obj.get_path())
|
||||||
Utils.open_file_with_default_application(mpath)
|
open_file_with_default_application(mpath)
|
||||||
|
|
||||||
def _column_editor(self, obj):
|
def _column_editor(self, obj):
|
||||||
"""
|
"""
|
||||||
|
@ -45,6 +45,7 @@ import gobject
|
|||||||
# GRAMPS classes
|
# GRAMPS classes
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
from gui.utils import open_file_with_default_application
|
||||||
import gen.lib
|
import gen.lib
|
||||||
import Utils
|
import Utils
|
||||||
import ThumbNails
|
import ThumbNails
|
||||||
@ -59,7 +60,7 @@ from DisplayTabs._ButtonTab import ButtonTab
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
def make_launcher(path):
|
def make_launcher(path):
|
||||||
return lambda x: Utils.open_file_with_default_application(path)
|
return lambda x: open_file_with_default_application(path)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -40,6 +40,7 @@ import gtk
|
|||||||
# gramps modules
|
# gramps modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
from gui.utils import open_file_with_default_application
|
||||||
import const
|
import const
|
||||||
import Config
|
import Config
|
||||||
import gen.lib
|
import gen.lib
|
||||||
@ -219,7 +220,7 @@ class EditMedia(EditPrimary):
|
|||||||
if ref_obj:
|
if ref_obj:
|
||||||
media_path = Utils.media_path_full(self.dbstate.db,
|
media_path = Utils.media_path_full(self.dbstate.db,
|
||||||
ref_obj.get_path())
|
ref_obj.get_path())
|
||||||
Utils.open_file_with_default_application(media_path)
|
open_file_with_default_application(media_path)
|
||||||
|
|
||||||
def select_file(self, val):
|
def select_file(self, val):
|
||||||
self.determine_mime()
|
self.determine_mime()
|
||||||
|
@ -41,6 +41,7 @@ import gtk
|
|||||||
# gramps modules
|
# gramps modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
from gui.utils import open_file_with_default_application
|
||||||
import const
|
import const
|
||||||
import Config
|
import Config
|
||||||
import Mime
|
import Mime
|
||||||
@ -370,7 +371,7 @@ class EditMediaRef(EditReference):
|
|||||||
def button_press_event(self, obj, event):
|
def button_press_event(self, obj, event):
|
||||||
if event.button==1 and event.type == gtk.gdk._2BUTTON_PRESS:
|
if event.button==1 and event.type == gtk.gdk._2BUTTON_PRESS:
|
||||||
photo_path = Utils.media_path_full(self.db, self.source.get_path())
|
photo_path = Utils.media_path_full(self.db, self.source.get_path())
|
||||||
Utils.open_file_with_default_application(photo_path)
|
open_file_with_default_application(photo_path)
|
||||||
|
|
||||||
def button_press_event_ref(self, widget, event):
|
def button_press_event_ref(self, widget, event):
|
||||||
"""
|
"""
|
||||||
|
@ -48,7 +48,7 @@ import gtk
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
import const
|
import const
|
||||||
import Utils
|
import Utils
|
||||||
from gui.utils import add_menuitem
|
from gui.utils import add_menuitem, open_file_with_default_application
|
||||||
import Mime
|
import Mime
|
||||||
import gen.lib
|
import gen.lib
|
||||||
import widgets
|
import widgets
|
||||||
@ -512,7 +512,7 @@ class EditPerson(EditPrimary):
|
|||||||
object_handle = photo.get_reference_handle()
|
object_handle = photo.get_reference_handle()
|
||||||
ref_obj = self.db.get_object_from_handle(object_handle)
|
ref_obj = self.db.get_object_from_handle(object_handle)
|
||||||
photo_path = Utils.media_path_full(self.db, ref_obj.get_path())
|
photo_path = Utils.media_path_full(self.db, ref_obj.get_path())
|
||||||
Utils.open_file_with_default_application(photo_path)
|
open_file_with_default_application(photo_path)
|
||||||
|
|
||||||
def _popup_change_description(self, obj):
|
def _popup_change_description(self, obj):
|
||||||
"""
|
"""
|
||||||
|
@ -48,7 +48,7 @@ import gobject
|
|||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
import Utils
|
import Utils
|
||||||
from gui.utils import ProgressMeter
|
from gui.utils import ProgressMeter, open_file_with_default_application
|
||||||
from gen.plug.docgen import BaseDoc, GVDoc
|
from gen.plug.docgen import BaseDoc, GVDoc
|
||||||
import Config
|
import Config
|
||||||
from ReportBase import CATEGORY_GRAPHVIZ
|
from ReportBase import CATEGORY_GRAPHVIZ
|
||||||
@ -380,7 +380,7 @@ class GVDotDoc(GVDocBase):
|
|||||||
dotfile.close()
|
dotfile.close()
|
||||||
|
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
Utils.open_file_with_default_application(self._filename)
|
open_file_with_default_application(self._filename)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -441,7 +441,7 @@ class GVPsDoc(GVDocBase):
|
|||||||
os.remove(tmp_dot)
|
os.remove(tmp_dot)
|
||||||
|
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
Utils.open_file_with_default_application(self._filename)
|
open_file_with_default_application(self._filename)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -487,7 +487,7 @@ class GVSvgDoc(GVDocBase):
|
|||||||
os.remove(tmp_dot)
|
os.remove(tmp_dot)
|
||||||
|
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
Utils.open_file_with_default_application(self._filename)
|
open_file_with_default_application(self._filename)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -533,7 +533,7 @@ class GVSvgzDoc(GVDocBase):
|
|||||||
os.remove(tmp_dot)
|
os.remove(tmp_dot)
|
||||||
|
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
Utils.open_file_with_default_application(self._filename)
|
open_file_with_default_application(self._filename)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -579,7 +579,7 @@ class GVPngDoc(GVDocBase):
|
|||||||
os.remove(tmp_dot)
|
os.remove(tmp_dot)
|
||||||
|
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
Utils.open_file_with_default_application(self._filename)
|
open_file_with_default_application(self._filename)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -625,7 +625,7 @@ class GVJpegDoc(GVDocBase):
|
|||||||
os.remove(tmp_dot)
|
os.remove(tmp_dot)
|
||||||
|
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
Utils.open_file_with_default_application(self._filename)
|
open_file_with_default_application(self._filename)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -671,7 +671,7 @@ class GVGifDoc(GVDocBase):
|
|||||||
os.remove(tmp_dot)
|
os.remove(tmp_dot)
|
||||||
|
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
Utils.open_file_with_default_application(self._filename)
|
open_file_with_default_application(self._filename)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -720,7 +720,7 @@ class GVPdfGvDoc(GVDocBase):
|
|||||||
os.remove(tmp_dot)
|
os.remove(tmp_dot)
|
||||||
|
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
Utils.open_file_with_default_application(self._filename)
|
open_file_with_default_application(self._filename)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
@ -782,7 +782,7 @@ class GVPdfGsDoc(GVDocBase):
|
|||||||
os.remove(tmp_dot)
|
os.remove(tmp_dot)
|
||||||
|
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
Utils.open_file_with_default_application(self._filename)
|
open_file_with_default_application(self._filename)
|
||||||
|
|
||||||
#-------------------------------------------------------------------------------
|
#-------------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -34,6 +34,7 @@ from gettext import gettext as _
|
|||||||
# Gramps modules
|
# Gramps modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
from gui.utils import open_file_with_default_application
|
||||||
from gen.plug.docgen import BaseDoc, TextDoc,\
|
from gen.plug.docgen import BaseDoc, TextDoc,\
|
||||||
PARA_ALIGN_RIGHT, PARA_ALIGN_CENTER
|
PARA_ALIGN_RIGHT, PARA_ALIGN_CENTER
|
||||||
from gen.plug import PluginManager, DocGenPlugin
|
from gen.plug import PluginManager, DocGenPlugin
|
||||||
@ -154,7 +155,7 @@ class AsciiDoc(BaseDoc,TextDoc):
|
|||||||
self.f.close()
|
self.f.close()
|
||||||
|
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
Utils.open_file_with_default_application(self.filename)
|
open_file_with_default_application(self.filename)
|
||||||
|
|
||||||
def get_usable_width(self):
|
def get_usable_width(self):
|
||||||
return _WIDTH_IN_CHARS
|
return _WIDTH_IN_CHARS
|
||||||
|
@ -42,6 +42,7 @@ from gettext import gettext as _
|
|||||||
# GRAMPS modules
|
# GRAMPS modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
from gui.utils import open_file_with_default_application
|
||||||
from gen.plug import PluginManager, DocGenPlugin
|
from gen.plug import PluginManager, DocGenPlugin
|
||||||
import ImgManip
|
import ImgManip
|
||||||
import const
|
import const
|
||||||
@ -240,7 +241,7 @@ class HtmlDoc(BaseDoc, TextDoc):
|
|||||||
|
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
import Utils
|
import Utils
|
||||||
Utils.open_file_with_default_application(self._backend.getf())
|
open_file_with_default_application(self._backend.getf())
|
||||||
|
|
||||||
def copy_file(self, from_fname, to_fname, to_dir=''):
|
def copy_file(self, from_fname, to_fname, to_dir=''):
|
||||||
"""
|
"""
|
||||||
|
@ -39,7 +39,7 @@ from gettext import gettext as _
|
|||||||
# gramps modules
|
# gramps modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
from gui.utils import open_file_with_default_application
|
||||||
from gen.plug import PluginManager, DocGenPlugin
|
from gen.plug import PluginManager, DocGenPlugin
|
||||||
from gen.plug.docgen import BaseDoc, TextDoc, PAPER_LANDSCAPE, FONT_SANS_SERIF
|
from gen.plug.docgen import BaseDoc, TextDoc, PAPER_LANDSCAPE, FONT_SANS_SERIF
|
||||||
from gen.plug.docbackend import DocBackend
|
from gen.plug.docbackend import DocBackend
|
||||||
@ -417,7 +417,7 @@ class LaTeXDoc(BaseDoc, TextDoc):
|
|||||||
self._backend.write('\n\\end{document}\n')
|
self._backend.write('\n\\end{document}\n')
|
||||||
self._backend.close()
|
self._backend.close()
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
Utils.open_file_with_default_application(self._backend.filename)
|
open_file_with_default_application(self._backend.filename)
|
||||||
|
|
||||||
def end_page(self):
|
def end_page(self):
|
||||||
"""Issue a new page command"""
|
"""Issue a new page command"""
|
||||||
|
@ -44,6 +44,7 @@ from xml.sax.saxutils import escape
|
|||||||
# Gramps modules
|
# Gramps modules
|
||||||
#
|
#
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
from gui.utils import open_file_with_default_application
|
||||||
from gen.plug import PluginManager, DocGenPlugin
|
from gen.plug import PluginManager, DocGenPlugin
|
||||||
from gen.plug.docgen import (BaseDoc, TextDoc, DrawDoc,
|
from gen.plug.docgen import (BaseDoc, TextDoc, DrawDoc,
|
||||||
FONT_SANS_SERIF, DASHED, PAPER_PORTRAIT,
|
FONT_SANS_SERIF, DASHED, PAPER_PORTRAIT,
|
||||||
@ -435,7 +436,7 @@ class ODFDoc(BaseDoc, TextDoc, DrawDoc):
|
|||||||
self._write_mimetype_file()
|
self._write_mimetype_file()
|
||||||
self._write_zip()
|
self._write_zip()
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
Utils.open_file_with_default_application(self.filename)
|
open_file_with_default_application(self.filename)
|
||||||
|
|
||||||
def add_media_object(self, file_name, pos, x_cm, y_cm, alt=''):
|
def add_media_object(self, file_name, pos, x_cm, y_cm, alt=''):
|
||||||
|
|
||||||
|
@ -31,6 +31,7 @@ from gettext import gettext as _
|
|||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
#Gramps modules
|
#Gramps modules
|
||||||
#-------------------------------------------------------------------------
|
#-------------------------------------------------------------------------
|
||||||
|
from gui.utils import open_file_with_default_application
|
||||||
from ReportBase import ReportUtils
|
from ReportBase import ReportUtils
|
||||||
from gen.plug import PluginManager, DocGenPlugin
|
from gen.plug import PluginManager, DocGenPlugin
|
||||||
from gen.plug.docgen import BaseDoc, DrawDoc, FONT_SERIF, PAPER_PORTRAIT, SOLID
|
from gen.plug.docgen import BaseDoc, DrawDoc, FONT_SERIF, PAPER_PORTRAIT, SOLID
|
||||||
@ -135,7 +136,7 @@ class PSDrawDoc(BaseDoc,DrawDoc):
|
|||||||
self.f.write('%%EOF\n')
|
self.f.write('%%EOF\n')
|
||||||
self.f.close()
|
self.f.close()
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
Utils.open_file_with_default_application(self.filename)
|
open_file_with_default_application(self.filename)
|
||||||
|
|
||||||
def write_text(self,text,mark=None):
|
def write_text(self,text,mark=None):
|
||||||
pass
|
pass
|
||||||
|
@ -36,6 +36,7 @@ from gettext import gettext as _
|
|||||||
# Gramps modules
|
# Gramps modules
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
from gui.utils import open_file_with_default_application
|
||||||
import libcairodoc
|
import libcairodoc
|
||||||
from gen.plug import PluginManager, DocGenPlugin
|
from gen.plug import PluginManager, DocGenPlugin
|
||||||
import Utils
|
import Utils
|
||||||
@ -125,7 +126,7 @@ class PdfDoc(libcairodoc.CairoDoc):
|
|||||||
|
|
||||||
# load the result into an external viewer
|
# load the result into an external viewer
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
Utils.open_file_with_default_application(self._backend.filename)
|
open_file_with_default_application(self._backend.filename)
|
||||||
|
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
@ -34,6 +34,7 @@ from gettext import gettext as _
|
|||||||
# Load the base BaseDoc class
|
# Load the base BaseDoc class
|
||||||
#
|
#
|
||||||
#------------------------------------------------------------------------
|
#------------------------------------------------------------------------
|
||||||
|
from gui.utils import open_file_with_default_application
|
||||||
from gen.plug.docgen import (BaseDoc, TextDoc, FONT_SERIF, PARA_ALIGN_RIGHT,
|
from gen.plug.docgen import (BaseDoc, TextDoc, FONT_SERIF, PARA_ALIGN_RIGHT,
|
||||||
PARA_ALIGN_CENTER, PARA_ALIGN_JUSTIFY)
|
PARA_ALIGN_CENTER, PARA_ALIGN_JUSTIFY)
|
||||||
from gen.plug import PluginManager, DocGenPlugin
|
from gen.plug import PluginManager, DocGenPlugin
|
||||||
@ -129,7 +130,7 @@ class RTFDoc(BaseDoc,TextDoc):
|
|||||||
self.f.close()
|
self.f.close()
|
||||||
|
|
||||||
if self.open_req:
|
if self.open_req:
|
||||||
Utils.open_file_with_default_application(self.filename)
|
open_file_with_default_application(self.filename)
|
||||||
|
|
||||||
#--------------------------------------------------------------------
|
#--------------------------------------------------------------------
|
||||||
#
|
#
|
||||||
|
Reference in New Issue
Block a user