4 # Copyright (C) 2010 Stefanos Harhalakis
6 # This file is part of wifieye.
8 # wifieye is free software: you can redistribute it and/or modify
9 # it under the terms of the GNU General Public License as published by
10 # the Free Software Foundation, either version 3 of the License, or
11 # (at your option) any later version.
13 # wifieye is distributed in the hope that it will be useful,
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 # GNU General Public License for more details.
18 # You should have received a copy of the GNU General Public License
19 # along with wifieye. If not, see <http://www.gnu.org/licenses/>.
21 # $Id: 0.py 2265 2010-02-21 19:16:26Z v13 $
23 __version__ = "$Id: 0.py 2265 2010-02-21 19:16:26Z v13 $"
28 from hildondesktop import *
34 from portrait import FremantleRotation
36 from xdg.IconTheme import getIconPath
42 from icongrid import IconGrid
44 # IconGrid must be before HomePluginItem for its connect()
45 # and do_button_*() to override those of HomePluginItem
46 class DrlaunchPlugin(IconGrid, HomePluginItem, FremantleRotation):
48 IconGrid.__init__(self)
49 HomePluginItem.__init__(self)
50 FremantleRotation.__init__(self, 'DrlaunchPlugin')
54 self.set_settings(True)
55 self.connect('show-settings', self.slot_show_settings)
59 w=config.size * config.iconsize + (config.size) * config.iconspace
60 self.set_size_request(w, w)
62 self.connect('long-press', self.signalLongpress)
65 screen=self.get_screen()
66 self.set_colormap(screen.get_rgba_colormap())
67 self.set_app_paintable(True)
69 HomePluginItem.do_realize(self)
71 def on_orientation_changed(self, orientation):
72 print "orch:", orientation
77 def do_expose_event(self, event):
78 IconGrid.do_expose_event(self, event)
79 HomePluginItem.do_expose_event(self, event)
81 def do_buttonn_press_event(self, event):
84 def slot_show_settings(self, dt):
87 def signalLongpress(self, sender, icon):
88 print "launch:", icon.name
89 launcher.launch(icon.name)
91 hd_plugin_type = DrlaunchPlugin
94 # gobject.type_register(MyQ)
95 gobject.type_register(hd_plugin_type)
96 obj=gobject.new(hd_plugin_type, plugin_id="plugin_id")
102 win.connect('delete-event', gtk.main_quit)
112 if __name__=="__main__":
117 # vim: set ts=8 sts=4 sw=4 noet formatoptions=r ai nocindent: