| 1 | #!/usr/bin/env python |
|---|
| 2 | # -*- coding: utf-8 -*- |
|---|
| 3 | # Copyright (C) 2008 Adriano Monteiro Marques |
|---|
| 4 | # |
|---|
| 5 | # Author: Francesco Piccinno <stack.box@gmail.com> |
|---|
| 6 | # |
|---|
| 7 | # This program is free software; you can redistribute it and/or modify |
|---|
| 8 | # it under the terms of the GNU General Public License as published by |
|---|
| 9 | # the Free Software Foundation; either version 2 of the License, or |
|---|
| 10 | # (at your option) any later version. |
|---|
| 11 | # |
|---|
| 12 | # This program is distributed in the hope that it will be useful, |
|---|
| 13 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 14 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 15 | # GNU General Public License for more details. |
|---|
| 16 | # |
|---|
| 17 | # You should have received a copy of the GNU General Public License |
|---|
| 18 | # along with this program; if not, write to the Free Software |
|---|
| 19 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| 20 | |
|---|
| 21 | import gtk |
|---|
| 22 | import sys |
|---|
| 23 | |
|---|
| 24 | import dummy.dep |
|---|
| 25 | |
|---|
| 26 | from umitPlugin.Engine import Plugin |
|---|
| 27 | from higwidgets.higdialogs import HIGAlertDialog |
|---|
| 28 | |
|---|
| 29 | class Test(Plugin): |
|---|
| 30 | __type__ = "usual" |
|---|
| 31 | |
|---|
| 32 | def start(self, core, reader): |
|---|
| 33 | self.core = core |
|---|
| 34 | self.reader = reader |
|---|
| 35 | |
|---|
| 36 | dialog = HIGAlertDialog( |
|---|
| 37 | None, |
|---|
| 38 | gtk.DIALOG_MODAL, |
|---|
| 39 | gtk.MESSAGE_INFO, |
|---|
| 40 | message_format="Hello", |
|---|
| 41 | secondary_text="I'm the dummy plugin" |
|---|
| 42 | ) |
|---|
| 43 | dialog.run() |
|---|
| 44 | dialog.destroy() |
|---|
| 45 | |
|---|
| 46 | |
|---|
| 47 | def stop(self, core): |
|---|
| 48 | print "Stopping dummy plugin..." |
|---|
| 49 | |
|---|
| 50 | # TODO: Accessing file into zip file doesn't work so we have to provide a function |
|---|
| 51 | # to doing that! :) |
|---|
| 52 | |
|---|
| 53 | # Test().start("miao") |
|---|
| 54 | # f = open("../dist/logo.png") |
|---|
| 55 | # print f.readline() |
|---|
| 56 | # f.close() |
|---|
| 57 | |
|---|
| 58 | __plugins__ = [Test] |
|---|