You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
46 lines
1.2 KiB
46 lines
1.2 KiB
Index: rednotebook-1.1.1/rednotebook/gui/browser.py
|
|
===================================================================
|
|
--- rednotebook-1.1.1.orig/rednotebook/gui/browser.py
|
|
+++ rednotebook-1.1.1/rednotebook/gui/browser.py
|
|
@@ -40,40 +40,6 @@ from rednotebook.util import filesystem
|
|
|
|
webkit = None
|
|
|
|
-def windows_webkit_import():
|
|
- global webkit
|
|
-
|
|
- cwd = os.getcwd()
|
|
-
|
|
- if filesystem.main_is_frozen():
|
|
- gtk_bin_dir = filesystem.app_dir
|
|
- else:
|
|
- gtk_bin_dir = r'C:\GTK'
|
|
-
|
|
- try:
|
|
- # It seems the dlls are only found if we are in the bin dir
|
|
- # during import
|
|
- os.chdir(gtk_bin_dir)
|
|
- except WindowsError:
|
|
- logging.error('Changing dir to "%s" failed' % gtk_bin_dir)
|
|
- return
|
|
-
|
|
- try:
|
|
- import webkit
|
|
- except ImportError:
|
|
- logging.info('webkit not found. For a nicer preview install python-webkit or pywebkitgtk')
|
|
- os.chdir(cwd)
|
|
-
|
|
-if False and sys.platform == 'win32':
|
|
- windows_webkit_import()
|
|
-else:
|
|
- try:
|
|
- import webkit
|
|
- except ImportError:
|
|
- logging.info('webkit not found. For a nicer preview install python-webkit or pywebkitgtk')
|
|
-
|
|
-
|
|
-
|
|
def can_print_pdf():
|
|
if not webkit:
|
|
return False
|