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 $"
30 from hildon import StackableWindow
31 #from portrait import FremantleRotation
32 #from xdg.IconTheme import getIconPath
36 from icon import Icon, getIcon
37 from icongrid import IconGridWidget
39 class WinConfig(StackableWindow):
41 StackableWindow.__init__(self)
46 self.igw=IconGridWidget(True)
50 self.igw.connect('long-press', self.signalLongpress)
52 def signalLongpress(self, sender, icon):
56 def doConfig(self, icon):
59 lst=[aps[x]['name'] for x in aps]
62 dialog=gtk.Dialog('App select', None,
63 gtk.DIALOG_DESTROY_WITH_PARENT, buttons=())
65 selector=hildon.TouchSelectorEntry(text=True)
66 selector.set_column_selection_mode(
67 hildon.TOUCH_SELECTOR_SELECTION_MODE_SINGLE)
69 dialog.vbox.pack_start(selector, True, True, 0)
70 dialog.set_size_request(0,900)
71 dialog.add_button(gtk.STOCK_CANCEL, gtk.RESPONSE_CANCEL)
72 dialog.add_button(gtk.STOCK_OK, gtk.RESPONSE_OK)
74 selector.append_text('None')
81 selector.append_text(app)
82 if icon.name!=None and aps[icon.name]['name']==app:
86 selector.set_active(0, idx)
94 if r==gtk.RESPONSE_OK:
95 cur=selector.get_current_text()
100 if aps[i]['name']==cur:
104 app['icon2']=getIcon(app['icon'])
115 if __name__=="__main__":
117 win.connect('delete-event', gtk.main_quit)
124 # vim: set ts=8 sts=4 sw=4 noet formatoptions=r ai nocindent: