Changeset 111 for pykoticon

Show
Ignore:
Timestamp:
03/23/06 18:51:53 (19 years ago)
Author:
jerome
Message:

Improved PyKotIcon?'s look and feel, not a lot, but anyway ;-)

Location:
pykoticon/trunk
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • pykoticon/trunk/bin/pykoticon

    r110 r111  
    5656    raise ImportError, "wxPython is missing. Please install it." 
    5757     
     58aboutbox = """PyKotIcon v1.00 (c) 2003, 2004, 2005, 2006 Jerome Alet - alet@librelogiciel.com     
     59 
     60PyKotIcon is a client side print quota notifier for PyKota, but it  
     61can be used from other applications if you want. 
     62 
     63This program is free software; you can redistribute it and/or modify 
     64it under the terms of the GNU General Public License as published by 
     65the Free Software Foundation; either version 2 of the License, or 
     66(at your option) any later version. 
     67 
     68This program is distributed in the hope that it will be useful, 
     69but WITHOUT ANY WARRANTY; without even the implied warranty of 
     70MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
     71GNU General Public License for more details. 
     72 
     73You should have received a copy of the GNU General Public License 
     74along with this program; if not, write to the Free Software 
     75Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.""" 
     76 
    5877def getCurrentUserName() : 
    5978    """Retrieves the current user's name.""" 
     
    190209        wx.Frame.__init__(self, parent, id, \ 
    191210               _("PyKotIcon info for %s") % getCurrentUserName(), \ 
    192                size = (-1, -1), \ 
    193                style = wx.DEFAULT_FRAME_STYLE \ 
    194                      | wx.SIZE_AUTO_HEIGHT \ 
    195                      | wx.SIZE_AUTO_WIDTH \ 
    196                      | wx.NO_FULL_REPAINT_ON_RESIZE) 
     211               size = (1, 1), \ 
     212               style = wx.FRAME_NO_TASKBAR | wx.NO_FULL_REPAINT_ON_RESIZE) 
    197213        try :              
    198214            self.tbicon = wx.TaskBarIcon() 
     
    211227            wx.EVT_TASKBAR_RIGHT_UP(self.tbicon, self.OnTaskBarMenu) 
    212228         
     229            self.TBMENU_ABOUT = wx.NewId() 
    213230            self.TBMENU_RESTORE = wx.NewId() 
    214231            self.TBMENU_CLOSE = wx.NewId() 
     232            wx.EVT_MENU(self.tbicon, self.TBMENU_ABOUT, \ 
     233                                              self.OnAbout) 
    215234            wx.EVT_MENU(self.tbicon, self.TBMENU_RESTORE, \ 
    216235                                              self.OnTaskBarActivate) 
     
    222241                pass 
    223242            else :     
    224                 self.menu.Append(self.TBMENU_RESTORE, _("About")) 
     243                self.menu.Append(self.TBMENU_ABOUT, _("About")) 
    225244                self.menu.Append(self.TBMENU_CLOSE, _("Quit")) 
    226245         
     
    232251        if not self.IsIconized() : 
    233252            self.Iconize(True) 
    234         #self.Hide() 
     253        self.Hide() 
    235254 
    236255    def OnTaskBarActivate(self, event) : 
     
    262281    def OnTaskBarClose(self, event) : 
    263282        self.Close() 
     283         
     284    def OnAbout(self, event) :     
     285        """Displays the about box.""" 
     286        dialog = wx.MessageDialog(self, aboutbox, _("About"), wx.OK | wx.ICON_INFORMATION) 
     287        dialog.ShowModal() 
     288        dialog.Destroy() 
    264289         
    265290    def showDialog(self, message, yesno) : 
     
    315340     
    316341 
    317 class PyKotIconApp(wx.PySimpleApp): 
     342class PyKotIconApp(wx.App): 
    318343    def OnInit(self) : 
    319344        self.frame = PyKotIcon(None, wx.ID_ANY) 
     345        self.frame.Center(wx.BOTH) 
     346        self.frame.Show(False) 
    320347        return True 
    321348         
     
    323350        """Continues processing.""" 
    324351        self.frame.postInit(printserver, localport) 
    325         #self.frame.Show(True) 
    326352         
    327353def main(printserver, localport): 
  • pykoticon/trunk/NEWS

    r89 r111  
    2222PyKotIcon NEWS : 
    2323 
     24  - 1.00 (2006-03-23) :  
     25   
     26    - First release 
  • pykoticon/trunk/setup.py

    r92 r111  
    4040    withPy2EXE = 1 
    4141 
    42 version = "0.2" 
     42version = "1.00" 
    4343 
    4444setup(name = "pykoticon", version = version,