#!/usr/bin/env python
#-*- coding: UTF-8 -*-

import wx
import os
from   stomamisc import *

if LINUX:
    docstr = """With StoreMan - the Storage Manager - you can:
➩ scan storage devices to gather dir and file information
➩ define tasks and jobs to backup data to storage devices (i.e.  
    USB-HD, NAS, ...)
➩ execute jobs immediate or scheduled at a predefined date / time
➩ hold scan and backup information in the build in SqLite database
➩ do offline queries (file search, size, ...)

Frank Mersmann (design and coding) - frank.mersmann@gmail.com
Wolfgang Bredow (testing and hints) - bredow.w@googlemail.com"""
else:
    docstr = """With StoreMan - the Storage Manager - you can:
:: scan storage devices to gather dir and file information
:: define tasks and jobs to backup data to storage devices (i.e.  
    USB-HD, NAS, ...)
:: execute jobs immediate or scheduled at a predefined date / time
:: hold scan and backup information in the build in SqLite database
:: do offline queries (file search, size, ...)

Frank Mersmann (design and coding) - frank.mersmann@gmail.com
Wolfgang Bredow (testing and hints) - bredow.w@googlemail.com"""
    

class AboutDialog(wx.Dialog):
    def __init__(self, parent):
        """ place About items on dialog """
        wx.Dialog.__init__(self, parent, -1, TITLE + ' - About')
        sizer = wx.BoxSizer(wx.VERTICAL)
        row1 = wx.BoxSizer(wx.HORIZONTAL)
        png = wx.Image(ICONPATH + os.sep + 'storeman.png', wx.BITMAP_TYPE_PNG).ConvertToBitmap()
        bm = wx.StaticBitmap(self, -1, png, wx.Point(10, 10), (png.GetWidth(), png.GetHeight()))
        row1.Add(bm, 0, wx.RIGHT, BORDER)
        if LINUX:
            st = wx.StaticText(self, -1, '\n%s\n\n➩ release date - %s\n➩ %s\n➩ %s\n➩ %s' % (VERSION, RELEASEDATE, PYVERSION, WXVERSION, PLATFORMINFO),
                               pos = wx.Point(30 + png.GetWidth(), BORDER))
        else:
            st = wx.StaticText(self, -1, '\n%s\n\n:: release date - %s\n:: %s\n:: %s\n:: %s' % (VERSION, RELEASEDATE, PYVERSION, WXVERSION, PLATFORMINFO),
                               pos = wx.Point(30 + png.GetWidth(), BORDER))            
        row1.Add(st, 0, wx.LEFT, BORDER)
        sizer.Add(row1, 0, wx.GROW | wx.ALL, BORDER)
        row2 = wx.BoxSizer(wx.HORIZONTAL)
        st = wx.StaticText(self, -1, docstr)
        row2.Add(st, 0, wx.LEFT | wx.RIGHT, BORDER)
        sizer.Add(row2, 0, wx.GROW | wx.ALL, BORDER)
        sl = wx.StaticLine(self, -1)
        sizer.Add(sl, 0, wx.GROW | wx.ALL, BORDER)
        bt = wx.Button(self, wx.ID_OK)
        sizer.Add(bt, 0,  wx.CENTER | wx.LEFT | wx.RIGHT | wx.BOTTOM, BORDER)
        self.SetSizer(sizer)
        self.Fit()
        self.Centre()        
# - class AboutDialog(wx.Dialog):---------------------------------------------------------------

