annotate frontends/primitivus/primitivus @ 120:1ca5f254ce41

primitivus group chat & misc primitivus: new widget: SurroundedText (text with a character repeated around it) primitivus: new decorator LabelLine (like lineBox, but with a label on the top line) wix & primitivus & quick_app: group chat method move to quick_chat wix: when new message, window is not raised anymore, but RequestUserAttention is called instead
author Goffi <goffi@goffi.org>
date Thu, 08 Jul 2010 14:12:18 +0800
parents ded2431cea5a
children 961e0898271f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
112
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
1 #!/usr/bin/python
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
2 # -*- coding: utf-8 -*-
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
3
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
4 """
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
5 Primitivus: a SAT frontend
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
6 Copyright (C) 2009, 2010 Jérôme Poisson (goffi@goffi.org)
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
7
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
8 This program is free software: you can redistribute it and/or modify
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
9 it under the terms of the GNU General Public License as published by
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
10 the Free Software Foundation, either version 3 of the License, or
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
11 (at your option) any later version.
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
12
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
13 This program is distributed in the hope that it will be useful,
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
16 GNU General Public License for more details.
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
17
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
18 You should have received a copy of the GNU General Public License
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
20 """
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
21
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
22
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
23 from quick_frontend.quick_app import QuickApp
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
24 from quick_frontend.quick_chat_list import QuickChatList
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
25 from quick_frontend.quick_contact_list import QuickContactList
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
26 from quick_frontend.quick_contact_management import QuickContactManagement
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
27 import urwid
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
28 from profile_manager import ProfileManager
116
7c482ecac0ff primitivus: basic contact list, connexion now work \o/
Goffi <goffi@goffi.org>
parents: 113
diff changeset
29 from contact_list import ContactList
119
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
30 from chat import Chat
120
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
31 from custom_widgets import AdvancedEdit,FocusFrame,InputDialog,Alert
112
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
32 import pdb
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
33 """from window import Window
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
34 from editbox import EditBox
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
35 from statusbar import StatusBar
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
36 from chat import Chat
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
37 from tools.jid import JID"""
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
38 import logging
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
39 from logging import debug, info, error
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
40 #import locale
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
41 import sys, os
120
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
42 from tools.jid import JID
112
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
43 #from curses import ascii
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
44 #import locale
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
45 #from signal import signal, SIGWINCH
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
46 #import fcntl
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
47 #import struct
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
48 #import termios
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
49 #from boxsizer import BoxSizer
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
50
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
51
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
52 ### logging configuration FIXME: put this elsewhere ###
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
53 logging.basicConfig(level=logging.CRITICAL, #TODO: configure it to put messages in a log file
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
54 format='%(message)s')
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
55 ###
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
56
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
57 const_APP_NAME = "Primitivus"
113
e5ca22113280 Primitivus: profile manager
Goffi <goffi@goffi.org>
parents: 112
diff changeset
58 const_PALETTE = [('title', 'black', 'light gray', 'standout,underline'),
e5ca22113280 Primitivus: profile manager
Goffi <goffi@goffi.org>
parents: 112
diff changeset
59 ('selected', 'default', 'dark red'),
e5ca22113280 Primitivus: profile manager
Goffi <goffi@goffi.org>
parents: 112
diff changeset
60 ('selected_focus', 'default,bold', 'dark red'),
e5ca22113280 Primitivus: profile manager
Goffi <goffi@goffi.org>
parents: 112
diff changeset
61 ('default', 'default', 'default'),
e5ca22113280 Primitivus: profile manager
Goffi <goffi@goffi.org>
parents: 112
diff changeset
62 ('default_focus', 'default,bold', 'default'),
e5ca22113280 Primitivus: profile manager
Goffi <goffi@goffi.org>
parents: 112
diff changeset
63 ]
112
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
64
119
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
65 class ChatList(QuickChatList):
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
66 """This class manage the list of chat windows"""
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
67
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
68 def __init__(self, host):
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
69 QuickChatList.__init__(self, host)
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
70
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
71 def createChat(self, target):
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
72 return Chat(target, self.host)
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
73
112
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
74 class PrimitivusApp(QuickApp):
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
75
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
76 def __init__(self):
116
7c482ecac0ff primitivus: basic contact list, connexion now work \o/
Goffi <goffi@goffi.org>
parents: 113
diff changeset
77 self.CM = QuickContactManagement() #FIXME: not the best place
112
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
78 QuickApp.__init__(self) #XXX: yes it's an unusual place for the constructor of a parent class, but the init order is important
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
79
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
80 ## main loop setup ##
117
1f0fd6f03e2b misc fixes
Goffi <goffi@goffi.org>
parents: 116
diff changeset
81 self.main_widget = ProfileManager(self)
112
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
82 self.loop = urwid.MainLoop(self.main_widget, const_PALETTE, event_loop=urwid.GLibEventLoop(), unhandled_input=self.key_handler)
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
83
119
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
84 ##misc setup##
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
85 self.chat_wins=ChatList(self)
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
86
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
87 def debug(self):
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
88 """convenience method to reset screen and launch pdb"""
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
89 import os
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
90 os.system('reset')
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
91 print 'Entered debug mode'
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
92 pdb.set_trace()
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
93
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
94 def redraw(self):
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
95 """redraw the screen"""
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
96 self.loop.draw_screen()
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
97
112
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
98 def start(self):
119
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
99 self.i = 0
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
100 self.loop.set_alarm_in(0,lambda a,b: self.postInit())
112
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
101 self.loop.run()
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
102
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
103 def key_handler(self, input):
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
104 if input in ('q', 'Q') or input == 'ctrl x':
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
105 raise urwid.ExitMainLoop()
119
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
106 elif input == 'ctrl d' and 'D' in self.bridge.getVersion(): #Debug only for dev versions
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
107 self.debug()
120
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
108 elif input == 'meta j': #user wants to join a room
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
109 pop_up_widget = InputDialog(_("Entering a MUC room"), _("Please enter MUC's JID"), default_txt = 'test@conference.necton2.int', cancel_cb=self.removePopUp, ok_cb=self.onJoinRoom)
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
110 self.showPopUp(pop_up_widget)
119
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
111
112
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
112 def __buildMainWidget(self):
119
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
113 self.contactList = ContactList(self, self.CM, on_click = self.contactSelected, on_change=lambda w: self.redraw())
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
114 #self.center_part = urwid.Columns([('weight',2,self.contactList),('weight',8,Chat('',self))])
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
115 self.center_part = urwid.Columns([('weight',2,self.contactList), ('weight',8,urwid.Filler(urwid.Text('')))])
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
116 editBar = AdvancedEdit('> ')
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
117 urwid.connect_signal(editBar,'click',self.onTextEntered)
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
118 self.main_widget = FocusFrame(self.center_part, footer=editBar, focus_part='footer')
118
76055a209ed9 primitivus: added edition zone at the bottom
Goffi <goffi@goffi.org>
parents: 117
diff changeset
119 return self.main_widget
112
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
120
116
7c482ecac0ff primitivus: basic contact list, connexion now work \o/
Goffi <goffi@goffi.org>
parents: 113
diff changeset
121 def plug_profile(self, profile_key='@DEFAULT@'):
118
76055a209ed9 primitivus: added edition zone at the bottom
Goffi <goffi@goffi.org>
parents: 117
diff changeset
122 self.loop.widget = self.__buildMainWidget()
116
7c482ecac0ff primitivus: basic contact list, connexion now work \o/
Goffi <goffi@goffi.org>
parents: 113
diff changeset
123 QuickApp.plug_profile(self, profile_key)
117
1f0fd6f03e2b misc fixes
Goffi <goffi@goffi.org>
parents: 116
diff changeset
124
120
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
125 def removePopUp(self, widget=None):
117
1f0fd6f03e2b misc fixes
Goffi <goffi@goffi.org>
parents: 116
diff changeset
126 self.loop.widget = self.main_widget
1f0fd6f03e2b misc fixes
Goffi <goffi@goffi.org>
parents: 116
diff changeset
127
1f0fd6f03e2b misc fixes
Goffi <goffi@goffi.org>
parents: 116
diff changeset
128 def showPopUp(self, pop_up_widget):
1f0fd6f03e2b misc fixes
Goffi <goffi@goffi.org>
parents: 116
diff changeset
129 display_widget = urwid.Overlay(pop_up_widget, self.main_widget, 'center', ('relative', 40), 'middle', ('relative', 40))
1f0fd6f03e2b misc fixes
Goffi <goffi@goffi.org>
parents: 116
diff changeset
130 self.loop.widget = display_widget
112
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
131
119
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
132 def contactSelected(self, contact_list):
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
133 contact = contact_list.get_contact()
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
134 if contact:
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
135 assert(len(self.center_part.widget_list)==2)
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
136 #self.center_part.widget_list.append(self.chat_wins[contact])
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
137 #self.center_part.column_types.append(('weight',8))
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
138 self.center_part.widget_list[1] = self.chat_wins[contact]
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
139
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
140 def onTextEntered(self, editBar):
120
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
141 """Called when text is entered in the main edit bar"""
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
142 contact = self.contactList.get_contact() ###Based on the fact that there is currently only one contact selectableat once
119
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
143 if contact:
120
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
144 chat = self.chat_wins[contact]
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
145 self.bridge.sendMessage(contact,
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
146 editBar.get_edit_text(),
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
147 type = "groupchat" if chat.type == 'group' else "chat",
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
148 profile_key=self.profile)
119
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
149 editBar.set_edit_text('')
ded2431cea5a Primitivus: chat window / text sending.
Goffi <goffi@goffi.org>
parents: 118
diff changeset
150
120
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
151 def onJoinRoom(self, button, edit):
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
152 self.removePopUp()
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
153 room_jid = JID(edit.get_edit_text())
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
154 if room_jid.is_valid():
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
155 self.bridge.joinMUC(room_jid.domain, room_jid.node, self.profiles[self.profile]['whoami'].node, self.profile)
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
156 else:
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
157 message = _("'%s' is an invalid JID !") % room_jid
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
158 error (message)
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
159 Alert(_("Error"), message, ok_cb=self.removePopUp)
1ca5f254ce41 primitivus group chat & misc
Goffi <goffi@goffi.org>
parents: 119
diff changeset
160
112
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
161 sat = PrimitivusApp()
f551e44adb25 Primitivus first draft
Goffi <goffi@goffi.org>
parents:
diff changeset
162 sat.start()
117
1f0fd6f03e2b misc fixes
Goffi <goffi@goffi.org>
parents: 116
diff changeset
163