Changeset 3095
- Timestamp:
- 07/07/08 18:52:06 (5 years ago)
- Location:
- branch/UmitPlugins
- Files:
-
- 11 modified
-
source-plugins/context-menu/sources/main.py (modified) (1 diff)
-
source-plugins/dummy-working/sources/main.py (modified) (2 diffs)
-
source-plugins/flow-analyzer/sources/main.py (modified) (2 diffs)
-
source-plugins/localized-example/sources/main.py (modified) (3 diffs)
-
source-plugins/system-info-consumer/sources/main.py (modified) (2 diffs)
-
source-plugins/system-info/sources/main.py (modified) (1 diff)
-
source-plugins/tabber/sources/main.py (modified) (3 diffs)
-
source-plugins/terminal-pad/sources/main.py (modified) (4 diffs)
-
source-plugins/tray-icon/sources/main.py (modified) (2 diffs)
-
source-plugins/umit-console/sources/main.py (modified) (2 diffs)
-
umitPlugin/Tree.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branch/UmitPlugins/source-plugins/context-menu/sources/main.py
r3022 r3095 22 22 import sys 23 23 24 from umitPlugin.Core import Core 25 from umitPlugin.Engine import Plugin 24 26 from higwidgets.higanimates import HIGAnimatedBar 25 from umitPlugin.Engine import Plugin26 27 27 28 class MenuPlugin(Plugin): 28 __type__ = "usual" 29 30 def start(self, core, reader): 31 self.core = core 29 def start(self, reader): 32 30 self.reader = reader 33 31 34 self.id = self.core.connect('ScanHostsView-created', self.__on_created_hosts)32 self.id = Core().connect('ScanHostsView-created', self.__on_created_hosts) 35 33 36 def stop(self , core):37 self.core.disconnect(self.id)34 def stop(self): 35 Core().disconnect(self.id) 38 36 39 37 def __on_created_hosts(self, core, view): -
branch/UmitPlugins/source-plugins/dummy-working/sources/main.py
r3018 r3095 28 28 29 29 class Test(Plugin): 30 __type__ = "usual" 31 32 def start(self, core, reader): 33 self.core = core 34 self.reader = reader 35 30 def start(self, reader): 36 31 dialog = HIGAlertDialog( 37 32 None, … … 43 38 dialog.run() 44 39 dialog.destroy() 45 46 40 47 def stop(self , core):41 def stop(self): 48 42 print "Stopping dummy plugin..." 49 43 -
branch/UmitPlugins/source-plugins/flow-analyzer/sources/main.py
r3028 r3095 22 22 import sys 23 23 24 from umitPlugin.Core import Core 25 from umitPlugin.Engine import Plugin 24 26 from higwidgets.higanimates import HIGAnimatedBar 25 from umitPlugin.Engine import Plugin26 27 27 28 class FlowContainer(gtk.VBox): … … 61 62 62 63 class FlowPlugin(Plugin): 63 __type__ = "usual" 64 65 def start(self, core, reader): 66 self.core = core 67 self.reader = reader 64 def start(self, reader): 65 self.id = Core().connect('ScanNotebookPage-created', self.__on_created) 68 66 69 self.id = self.core.connect('ScanNotebookPage-created', self.__on_created) 70 71 def stop(self, core): 72 self.core.disconnect(self.id) 67 def stop(self): 68 Core().disconnect(self.id) 73 69 74 70 def __on_created(self, core, page): -
branch/UmitPlugins/source-plugins/localized-example/sources/main.py
r3094 r3095 21 21 import gettext 22 22 23 from umitPlugin.Core import Core 23 24 from umitPlugin.Engine import Plugin 24 25 from umitPlugin.Atoms import StringFile … … 27 28 28 29 class Localize(Plugin): 29 __type__ = "usual" 30 31 def start(self, core, reader): 32 self.core = core 33 self.reader = reader 34 35 cat = self.reader.bind_translation("localizer") 30 def start(self, reader): 31 cat = reader.bind_translation("localizer") 36 32 37 33 if cat: … … 41 37 print _("What the hell are you doing?") 42 38 43 def stop(self , core):39 def stop(self): 44 40 print _("Stopping localize ...") 45 41 -
branch/UmitPlugins/source-plugins/system-info-consumer/sources/main.py
r3003 r3095 21 21 import os 22 22 import gtk 23 24 from umitPlugin.Core import Core 25 from umitPlugin.Engine import Plugin 23 26 from higwidgets.higdialogs import HIGAlertDialog 24 from umitPlugin.Engine import Plugin25 27 26 28 # This is the consumer Plugin 27 29 class SystemInfo(Plugin): 28 __type__ = "usual" 29 30 def start(self, core, reader): 31 self.core = core 30 def start(self, reader): 32 31 self.reader = reader 33 34 print "CORE IS", self.core35 32 36 33 self.sysinfo = self.core.get_need(self.reader, 'SystemInfo') … … 56 53 57 54 58 def stop(self , core):55 def stop(self): 59 56 pass 60 57 -
branch/UmitPlugins/source-plugins/system-info/sources/main.py
r3003 r3095 33 33 34 34 class SystemInfo(Plugin): 35 __type__ = "usual"36 37 35 def start(self, core, reader): 38 self.core = core 39 self.reader = reader 36 pass 40 37 41 38 def stop(self, core): -
branch/UmitPlugins/source-plugins/tabber/sources/main.py
r3022 r3095 25 25 import tabber.views as views 26 26 27 from umitPlugin.Core import Core 27 28 from umitPlugin.Engine import Plugin 28 29 29 30 class TabberPlugin(Plugin): 30 __type__ = "usual" 31 32 def start(self, core, reader): 33 self.core = core 31 def start(self, reader): 34 32 self.reader = reader 35 33 36 34 self._paned = paned.UmitPaned() 37 35 38 main = self.core.mainwindow36 main = Core().mainwindow 39 37 main.vbox.remove(main.scan_notebook) 40 38 main.vbox.pack_start(self._paned) … … 43 41 self._paned.show_all() 44 42 45 # No statusbar 46 #main.vbox.reorder_child(self.core.get_main_statusbar(), -1) 47 48 def stop(self, core): 49 main = self.core.mainwindow 43 def stop(self): 44 main = Core().mainwindow 50 45 self._paned.hide() 51 46 self._paned.remove_child() … … 53 48 main.vbox.pack_start(main.scan_notebook) 54 49 55 def get_viewsmod(self):56 return views57 def get_panedmod(self):58 return paned59 60 50 def get_paned(self): 61 51 return self._paned 62 52 63 53 # Public APIs 64 viewsmod = property(get_viewsmod)65 panedmod = property(get_panedmod)66 54 paned = property(get_paned) 67 55 -
branch/UmitPlugins/source-plugins/terminal-pad/sources/main.py
r3028 r3095 23 23 import gobject 24 24 25 from umitPlugin.Core import Core 26 from umitPlugin.Engine import Plugin 27 25 28 from higwidgets.higtooltips import * 26 29 from higwidgets.hignotebooks import HIGAnimatedTabLabel 27 from umitPlugin.Engine import Plugin28 30 29 31 class TerminalPage(gtk.Bin): … … 55 57 56 58 class TerminalPlugin(Plugin): 57 __type__ = "usual" 58 59 def start(self, core, reader): 60 self.core = core 59 def start(self, reader): 61 60 self.reader = reader 62 61 … … 70 69 71 70 # Append our item 72 self.core.get_main_toolbar().insert(self.item, -1)71 Core().get_main_toolbar().insert(self.item, -1) 73 72 self.item.connect('clicked', self.__on_create_page) 74 73 self.item.show_all() 75 74 76 def stop(self , core):77 self.core.get_main_toolbar().remove(self.item)75 def stop(self): 76 Core().get_main_toolbar().remove(self.item) 78 77 79 78 def __on_create_page(self, widget): 80 nb = self.core.get_main_scan_notebook()79 nb = Core().get_main_scan_notebook() 81 80 82 81 widget = TerminalPage() … … 89 88 90 89 def __on_close_page(self, widget, page): 91 nb = self.core.get_main_scan_notebook()90 nb = Core().get_main_scan_notebook() 92 91 idx = gtk.Notebook.page_num(nb, page) 93 92 -
branch/UmitPlugins/source-plugins/tray-icon/sources/main.py
r3003 r3095 25 25 26 26 class TrayPlugin(Plugin): 27 __type__ = "usual" 28 29 def start(self, core, reader): 30 self.core = core 27 def start(self, reader): 31 28 self.reader = reader 32 29 … … 34 31 self.icon.connect('popup-menu', self.__on_right_click) 35 32 36 def stop(self , core):33 def stop(self): 37 34 self.icon.set_visible(False) 38 35 self.icon = None 39 40 self.core = None41 self.reader = None42 36 43 37 def __on_right_click(self, w, evt, evt_time): -
branch/UmitPlugins/source-plugins/umit-console/sources/main.py
r3093 r3095 29 29 30 30 from umitCore.I18N import _ 31 from umitPlugin.Core import Core 31 32 from umitPlugin.Engine import Plugin 32 33 from umitPlugin.Atoms import Singleton … … 164 165 165 166 class ConsolePlugin(Plugin): 166 __type__ = "usual" 167 168 def start(self, core, reader): 169 self.core = core 167 def start(self, reader): 170 168 self.reader = reader 171 169 172 tabber = self.core.get_need(self.reader, 'Tabber')170 tabber = Core().get_need(self.reader, 'Tabber') 173 171 tabber.paned.add_view(paned.PANE_BOTTOM, ConsoleView()) 174 172 175 def stop(self , core):173 def stop(self): 176 174 pass 177 175 -
branch/UmitPlugins/umitPlugin/Tree.py
r3090 r3095 491 491 #try: 492 492 inst = plug() 493 inst.start( Core(),pkg)493 inst.start(pkg) 494 494 495 495 ret.append(inst) … … 520 520 for inst in self.instances[pkg]: 521 521 try: 522 inst.stop( Core())522 inst.stop() 523 523 except Exception, err: 524 524 log.critical("Error while stopping %s from %s:" % (inst, pkg))
