Package Gnumed :: Package wxpython :: Package gui :: Module gmKOrganizerPlugin
[frames] | no frames]

Source Code for Module Gnumed.wxpython.gui.gmKOrganizerPlugin

 1  #===================================================== 
 2  # GNUmed KOrganizer link 
 3  #===================================================== 
 4  # $Source: /home/ncq/Projekte/cvs2git/vcs-mirror/gnumed/gnumed/client/wxpython/gui/gmKOrganizerPlugin.py,v $ 
 5  # $Id: gmKOrganizerPlugin.py,v 1.4 2009-06-29 15:13:25 ncq Exp $ 
 6  __version__ = "$Revision: 1.4 $" 
 7  __author__ = "Karsten Hilbert <Karsten.Hilbert@gmx.net>" 
 8  __license__ = "GPL" 
 9   
10  import os, sys 
11   
12  from Gnumed.wxpython import gmPlugin, gmDemographicsWidgets 
13  from Gnumed.pycommon import gmExceptions, gmShellAPI 
14  from Gnumed.wxpython import gmAccessPermissionWidgets 
15 16 #====================================================================== 17 -class gmKOrganizerPlugin(gmPlugin.cNotebookPlugin):
18 """Plugin to encapsulate a simple KOrganizer link window.""" 19 20 tab_name = _('Appointments') 21 required_minimum_role = 'staff' 22 23 @gmAccessPermissionWidgets.verify_minimum_required_role ( 24 required_minimum_role, 25 activity = _('loading plugin <%s>') % tab_name, 26 return_value_on_failure = False, 27 fail_silently = False 28 )
29 - def register(self):
31 #------------------------------------------------- 32 #--------------------------------------------------------
33 - def __init__(self):
34 # detect KOrganizer 35 found, cmd = gmShellAPI.detect_external_binary(binary = 'konsolekalendar') 36 if not found: 37 raise gmExceptions.ConstructorError('cannot detect "konsolekalendar" via [%s]' % cmd) 38 39 gmPlugin.cNotebookPlugin.__init__(self)
40 #--------------------------------------------------------
41 - def name(self):
43 #--------------------------------------------------------
44 - def GetWidget(self, parent):
45 self._widget = gmDemographicsWidgets.cKOrganizerSchedulePnl(parent, -1) 46 return self._widget
47 #--------------------------------------------------------
48 - def MenuInfo(self):
49 return ('office', _('&Appointments'))
50 #--------------------------------------------------------
51 - def can_receive_focus(self):
52 return True
53 #====================================================================== 54 # $Log: gmKOrganizerPlugin.py,v $ 55 # Revision 1.4 2009-06-29 15:13:25 ncq 56 # - improved placement in menu hierarchy 57 # - add active letters 58 # 59 # Revision 1.3 2008/01/14 20:46:20 ncq 60 # - use detect_external_binary() 61 # 62 # Revision 1.2 2007/10/12 07:28:25 ncq 63 # - lots of import related cleanup 64 # 65 # Revision 1.1 2007/07/09 11:10:24 ncq 66 # - new plugin :-) 67 # 68 # Revision 1.1 2007/04/06 23:09:13 ncq 69 # - this is new 70 # 71 # 72