summaryrefslogtreecommitdiff
path: root/lib/extensions/install.py
diff options
context:
space:
mode:
Diffstat (limited to 'lib/extensions/install.py')
-rw-r--r--lib/extensions/install.py26
1 files changed, 11 insertions, 15 deletions
diff --git a/lib/extensions/install.py b/lib/extensions/install.py
index e405cbac..6c179beb 100644
--- a/lib/extensions/install.py
+++ b/lib/extensions/install.py
@@ -3,13 +3,7 @@
import sys
import traceback
import os
-from os.path import realpath, dirname
from glob import glob
-from threading import Thread
-import socket
-import errno
-import time
-import logging
import wx
import inkex
@@ -28,23 +22,24 @@ class InstallerFrame(wx.Frame):
text_sizer = wx.BoxSizer(wx.HORIZONTAL)
- text = _('Ink/Stitch can install files ("add-ons") that make it easier to use Inkscape to create machine embroidery designs. These add-ons will be installed:') + \
- "\n\n • " + _("thread manufacturer color palettes") + \
- "\n • " + _("Ink/Stitch visual commands (Object -> Symbols...)")
+ text = (_('Ink/Stitch can install files ("add-ons") that make it easier to use Inkscape to create machine embroidery designs. '
+ 'These add-ons will be installed:') +
+ "\n\n • " + _("thread manufacturer color palettes") +
+ "\n • " + _("Ink/Stitch visual commands (Object -> Symbols...)"))
static_text = wx.StaticText(panel, label=text)
font = wx.Font(12, wx.DEFAULT, wx.NORMAL, wx.NORMAL)
static_text.SetFont(font)
- text_sizer.Add(static_text, proportion=0, flag=wx.ALL|wx.EXPAND, border=10)
- sizer.Add(text_sizer, proportion=3, flag=wx.ALL|wx.EXPAND, border=0)
+ text_sizer.Add(static_text, proportion=0, flag=wx.ALL | wx.EXPAND, border=10)
+ sizer.Add(text_sizer, proportion=3, flag=wx.ALL | wx.EXPAND, border=0)
buttons_sizer = wx.BoxSizer(wx.HORIZONTAL)
install_button = wx.Button(panel, wx.ID_ANY, _("Install"))
install_button.SetBitmap(wx.ArtProvider.GetBitmap(wx.ART_TICK_MARK))
- buttons_sizer.Add(install_button, proportion=0, flag=wx.ALIGN_RIGHT|wx.ALL, border=5)
+ buttons_sizer.Add(install_button, proportion=0, flag=wx.ALIGN_RIGHT | wx.ALL, border=5)
cancel_button = wx.Button(panel, wx.ID_CANCEL, _("Cancel"))
- buttons_sizer.Add(cancel_button, proportion=0, flag=wx.ALIGN_RIGHT|wx.ALL, border=5)
- sizer.Add(buttons_sizer, proportion=1, flag=wx.ALIGN_RIGHT|wx.ALIGN_BOTTOM)
+ buttons_sizer.Add(cancel_button, proportion=0, flag=wx.ALIGN_RIGHT | wx.ALL, border=5)
+ sizer.Add(buttons_sizer, proportion=1, flag=wx.ALIGN_RIGHT | wx.ALIGN_BOTTOM)
panel.SetSizer(sizer)
panel.Layout()
@@ -64,7 +59,7 @@ class InstallerFrame(wx.Frame):
try:
self.install_addons('palettes')
self.install_addons('symbols')
- except Exception, e:
+ except Exception:
wx.MessageDialog(self,
_('Inkscape add-on installation failed') + ': \n' + traceback.format_exc(),
_('Installation Failed'),
@@ -98,6 +93,7 @@ class InstallerFrame(wx.Frame):
for palette_file in files:
shutil.copy(palette_file, dest)
+
class Install(inkex.Effect):
@classmethod
def name(cls):