comparison frontends/src/wix/chat.py @ 1093:11e2bb20e896

core, frontends (menus): MENU_ROOM and MENU_SINGLE are now managed
author Goffi <goffi@goffi.org>
date Thu, 26 Jun 2014 00:05:20 +0200
parents 5a6354ff468c
children 75025461141f
comparison
equal deleted inserted replaced
1092:0eefc74c346b 1093:11e2bb20e896
17 # You should have received a copy of the GNU Affero General Public License 17 # You should have received a copy of the GNU Affero General Public License
18 # along with this program. If not, see <http://www.gnu.org/licenses/>. 18 # along with this program. If not, see <http://www.gnu.org/licenses/>.
19 19
20 20
21 from sat.core.i18n import _ 21 from sat.core.i18n import _
22 from sat_frontends.wix.constants import Const as C
22 import wx 23 import wx
23 import os.path 24 import os.path
24 import time 25 import time
25 from sat.core.log import getLogger 26 from sat.core.log import getLogger
26 log = getLogger(__name__) 27 log = getLogger(__name__)
171 self.__eraseMenus() 172 self.__eraseMenus()
172 menuBar = self.GetMenuBar() 173 menuBar = self.GetMenuBar()
173 actionMenu = wx.Menu() 174 actionMenu = wx.Menu()
174 actionMenu.Append(idSEND, _("&SendFile CTRL-s"),_(" Send a file to contact")) 175 actionMenu.Append(idSEND, _("&SendFile CTRL-s"),_(" Send a file to contact"))
175 menuBar.Append(actionMenu,_("&Action")) 176 menuBar.Append(actionMenu,_("&Action"))
177 self.host.addMenus(menuBar, C.MENU_SINGLE, {'jid': self.target})
176 178
177 #events 179 #events
178 wx.EVT_MENU(self, idSEND, self.onSendFile) 180 wx.EVT_MENU(self, idSEND, self.onSendFile)
179 181
180 def __createMenus_group(self): 182 def __createMenus_group(self):
183 self.__eraseMenus() 185 self.__eraseMenus()
184 menuBar = self.GetMenuBar() 186 menuBar = self.GetMenuBar()
185 actionMenu = wx.Menu() 187 actionMenu = wx.Menu()
186 actionMenu.Append(idTAROT, _("Start &Tarot game CTRL-t"),_(" Start a Tarot card game")) #tmp 188 actionMenu.Append(idTAROT, _("Start &Tarot game CTRL-t"),_(" Start a Tarot card game")) #tmp
187 menuBar.Append(actionMenu,_("&Games")) 189 menuBar.Append(actionMenu,_("&Games"))
190 self.host.addMenus(menuBar, C.MENU_ROOM, {'room_jid': self.target.bare})
188 191
189 #events 192 #events
190 wx.EVT_MENU(self, idTAROT, self.onStartTarot) 193 wx.EVT_MENU(self, idTAROT, self.onStartTarot)
191 194
192 def __del__(self): 195 def __del__(self):