Example #1
0
 def __init__(self, *args, **kwds):
     # First we create and fill the info object
     parent = args[0]
     
     info = wx.AboutDialogInfo()
     info.Name = "pyspread"
     info.Version = config["version"]
     info.Copyright = "(C) Martin Manns 2008-2011"
     info.Description = wordwrap( 
         "A cross-platform Python spreadsheet application.\nPyspread is "
         "based on and written in the programming language Python.",
         350, wx.ClientDC(parent))
     info.WebSite = ("http://pyspread.sourceforge.net", 
                     "Pyspread Web site")
     info.Developers = ["Martin Manns"]
     info.DocWriters = ["Martin Manns", "Bosko Markovic"]
     
     license_file = open(get_program_path() + "/COPYING", "r")
     license_text = license_file.read()
     license_file.close()
     
     info.License = wordwrap(license_text, 500, wx.ClientDC(parent))
     
     # Then we call wx.AboutBox giving it that info object
     wx.AboutBox(info)
Example #2
0
 def __init__(self, theme, icon_size):
     
     wx.ArtProvider.__init__(self)
     
     _size_str = "x".join(map(str, icon_size))
     
     _theme_path = get_program_path() + "share/icons/" 
     _icon_path = _theme_path + theme + "/" + _size_str + "/"
     _action_path = _icon_path + "actions/"
     _toggle_path = _icon_path + "toggles/"
 
     self.extra_icons = { \
         "PyspreadLogo": _theme_path + "pyspread.png",
         "EditCopyRes": _action_path + "edit-copy-results.png",
         "FormatTextBold": _action_path + "format-text-bold.png",
         "FormatTextItalic": _action_path + "format-text-italic.png",
         "FormatTextUnderline": _action_path + \
                                         "format-text-underline.png",
         "FormatTextStrikethrough": _action_path + \
                                         "format-text-strikethrough.png",
         "JustifyRight": _action_path + "format-justify-right.png",
         "JustifyCenter": _action_path + "format-justify-center.png",
         "JustifyLeft": _action_path + "format-justify-left.png",
         "AlignTop": _action_path + "format-text-aligntop.png",
         "AlignCenter": _action_path + "format-text-aligncenter.png", 
         "AlignBottom": _action_path + "format-text-alignbottom.png", 
         "Freeze": _action_path + "frozen_small.png",
         "AllBorders": _toggle_path + "border_all.xpm",
         "LeftBorders": _toggle_path + "border_left.xpm",
         "RightBorders": _toggle_path + "border_right.xpm",
         "TopBorders": _toggle_path + "border_top.xpm",
         "BottomBorders": _toggle_path + "border_bottom.xpm",
         "InsideBorders": _toggle_path + "border_inside.xpm",
         "OutsideBorders": _toggle_path + "border_outside.xpm",
         "TopBottomBorders": _toggle_path + "border_top_n_bottom.xpm",
         "SearchCaseSensitive": _toggle_path + "aA.png",
         "SearchRegexp": _toggle_path + "regex.png",
         "SearchWholeword": _toggle_path + "wholeword.png",
         }
Example #3
0
__ = wx.App(False)  # Windows Hack

from sysvars import get_program_path
import lib.i18n as i18n

try:
    import gnupg
except ImportError:
    gnupg = None


# Use ugettext instead of getttext to avoid unicode errors
_ = i18n.language.ugettext

sys.setrecursionlimit(65535)
sys.path.insert(0, get_program_path())

# Separate icon in the Windows dock for Ms Windows
try:
    import ctypes
    ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID('pyspread')
except AttributeError:
    # Probably not on Windows
    pass

# Patch for using with PyScripter thanks to Colin J. Williams
# If wx exists in sys,modules, we dont need to import wx version.
# wx is already imported if the PyScripter wx engine is used.

try:
    sys.modules['wx']
Example #4
0
"""

import sys
import optparse

import wx
__ = wx.App(False)  # Windows Hack

from sysvars import get_program_path
import lib.i18n as i18n

#use ugettext instead of getttext to avoid unicode errors
_ = i18n.language.ugettext

sys.setrecursionlimit(10000)
sys.path.insert(0, get_program_path())

# Patch for using with PyScripter thanks to Colin J. Williams
# If wx exists in sys,modules, we dont need to import wx version.
# wx is already imported if the PyScripter wx engine is used.

try:
    sys.modules['wx']
except KeyError:
    # Select wx version 2.8 if possible
    try:
        import wxversion
        wxversion.select(['2.8', '2.9'])

    except ImportError:
        pass