Commits

abderrahim  committed f22dc3f

add sample plugin

  • Participants
  • Parent commits 5cbb43e

Comments (0)

Files changed (3)

File sample/anjuta-sample-python.plugin

+[Anjuta Plugin]
+Language=Python
+Name=Sample Python Plugin
+Description=Sample python plugin.
+Location=anjuta-sample-python:SamplePythonPlugin
+Icon=sample-python.png
+UserActivatable=yes
+
+[File Loader]
+SupportedMimeTypes=text/x-python

File sample/anjuta-sample-python.py

+from gi.repository import Anjuta
+
+class SamplePythonPlugin(Anjuta.Plugin):
+	__gtype_name__ = "SamplePythonPlugin"
+	def __init__(self):
+		print "Sample Python: Initialize plugin"
+		super(SamplePythonPlugin, self).__init__()
+
+	def do_activate(self):
+		print "Sample Python: Activating plugin..."
+		status = self.shell.get_status ()
+		status.set_title ("Sample python plugin loaded")
+
+	def do_deactivate(self):
+		print "Sample Python: Deactivating plugin..."
+

File sample/sample-python.png

Added
New image