New package: uberwriter-12.11.02

This commit is contained in:
Andrea Brancaleoni 2015-07-30 15:37:23 +02:00
parent f3218e1331
commit fce1fb4c03
3 changed files with 107 additions and 0 deletions

View file

@ -0,0 +1,37 @@
diff -up uberwriter_bugfixes/setup.py.orig uberwriter_bugfixes/setup.py
--- uberwriter_bugfixes/setup.py.orig 2012-12-10 23:22:28.168386230 -0600
+++ uberwriter_bugfixes/setup.py 2012-12-10 23:24:50.598256044 -0600
@@ -159,7 +159,4 @@ DistUtilsExtra.auto.setup(
"uberwriter_lib",
"uberwriter"
],
- package_data={
- 'pylocales' : ['locales.db']
- }
)
\ No newline at end of file
diff -up uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py.orig uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py
--- uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py.orig 2012-12-10 23:25:11.512379118 -0600
+++ uberwriter_bugfixes/uberwriter_lib/pylocales/locales.py 2012-12-10 23:26:03.519678793 -0600
@@ -38,20 +38,8 @@ __all__ = ['Country', 'Language', 'Langu
_translator_language = gettext.translation('iso_639', fallback=True).gettext
_translator_country = gettext.translation('iso_3166', fallback=True).gettext
-# Decides where the database is located. If an application provides an
-# os.path.get_module_path monkey patch to determine the path where the module
-# is located it uses this. If not it searches in the directory of this source
-# code file.
-__path__ = None
-if hasattr(os.path, 'get_module_path'):
- __path__ = os.path.get_module_path(__file__)
- if not os.path.isfile(os.path.join(__path__, 'locales.db')):
- __path__ = None
-if __path__ is None:
- __path__ = os.path.abspath(os.path.realpath(os.path.dirname(__file__)))
-
# Loading the Database
-_database = sqlite3.connect(os.path.join(__path__, 'locales.db'))
+_database = sqlite3.connect('/usr/share/uberwriter/locales.db')
logger = logging.getLogger(__name__)

View file

@ -0,0 +1,48 @@
diff -up uberwriter_bugfixes/uberwriter/UberwriterWindow.py.orig uberwriter_bugfixes/uberwriter/UberwriterWindow.py
--- uberwriter_bugfixes/uberwriter/UberwriterWindow.py.orig 2012-12-10 13:24:22.947869013 -0600
+++ uberwriter_bugfixes/uberwriter/UberwriterWindow.py 2012-12-10 13:24:38.839927266 -0600
@@ -19,7 +19,6 @@ import subprocess
import os
import codecs
import webbrowser
-import apt
import urllib
from locale import gettext as _
@@ -528,25 +527,6 @@ class UberwriterWindow(Window):
self.export("html")
def export_as_pdf(self, widget, data=None):
- if self.texlive_installed == False:
- try:
- cache = apt.Cache()
- inst = cache["texlive"].is_installed
- except:
- inst = True
-
- if inst == False:
- dialog = Gtk.MessageDialog(self,
- Gtk.DialogFlags.MODAL | Gtk.DialogFlags.DESTROY_WITH_PARENT,
- Gtk.MessageType.INFO,
- None,
- _("You can not export to PDF.")
- )
- dialog.format_secondary_markup(_("Please install <a href=\"apt:texlive\">texlive</a> from the software center."))
- response = dialog.run()
- return
- else:
- self.texlive_installed = True
self.export("pdf")
def copy_html_to_clipboard(self, widget, date=None):
@@ -851,10 +831,6 @@ class UberwriterWindow(Window):
self.UberwriterAdvancedExportDialog = UberwriterAdvancedExportDialog
# Code for other initialization actions should be added here.
-
- # Texlive checker
-
- self.texlive_installed = False
# Draw background
self.background_image = helpers.get_media_path('bg_light.png')

View file

@ -0,0 +1,22 @@
# Template file for 'uberwriter'
pkgname=uberwriter
version=12.11.02
revision=1
_subversion=public1-beta
wrksrc=uberwriter_bugfixes
build_style=python-module
pycompile_module=$pkgname
noarch=yes
patch_args='-p1'
hostmakedepends="python-distutils-extra intltool"
depends="python-enchant python-gobject python-enchant pandoc ttf-ubuntu-font-family"
short_desc="The simplest writing application"
maintainer="Andrea Brancaleoni <miwaxe@gmail.com>"
license="GPL-3"
homepage="http://uberwriter.wolfvollprecht.de"
distfiles="https://launchpad.net/$pkgname/trunk/${version%.*}/+download/${pkgname}_${version}-${_subversion}.tar.gz"
checksum=1cfedcac0c76200cf2d1de2c34574646d9fb5100e48a8c99994aef1906a0f598
post_install() {
vinstall uberwriter_lib/pylocales/locales.db 644 usr/share/uberwriter
}