Don't show hidden tabs border in the editor
This commit is contained in:
parent
a7a0c2cda5
commit
178468e2c0
@ -19,7 +19,6 @@ from sugar.p2p import Buddy
|
||||
from sugar.p2p.Group import LocalGroup
|
||||
from sugar.p2p.Service import Service
|
||||
from sugar.p2p.Stream import Stream
|
||||
from sugar.p2p import network
|
||||
from sugar.session.LogWriter import LogWriter
|
||||
from sugar.chat.sketchpad.Toolbox import Toolbox
|
||||
from sugar.chat.sketchpad.SketchPad import SketchPad
|
||||
@ -92,6 +91,7 @@ class Chat(activity.Activity):
|
||||
def _create_chat_editor(self):
|
||||
nb = gtk.Notebook()
|
||||
nb.set_show_tabs(False)
|
||||
nb.set_show_border(False)
|
||||
nb.set_size_request(-1, 70)
|
||||
|
||||
chat_view_sw = gtk.ScrolledWindow()
|
||||
@ -400,9 +400,6 @@ class Chat(activity.Activity):
|
||||
|
||||
def recv_message(self, buddy, msg):
|
||||
"""Insert a remote chat message into the chat buffer."""
|
||||
if not buddy:
|
||||
return
|
||||
|
||||
chunk = self._get_first_richtext_chunk(msg)
|
||||
if chunk:
|
||||
self._insert_rich_message(buddy.get_nick_name(), chunk)
|
||||
@ -601,16 +598,14 @@ class GroupChat(Chat):
|
||||
self._chats[buddy] = chat
|
||||
chat.activity_connect_to_shell()
|
||||
|
||||
def _request_buddy_icon_cb(self, result_status, response, user_data):
|
||||
def _request_buddy_icon_cb(self, response, user_data):
|
||||
icon = response
|
||||
buddy = user_data
|
||||
if result_status == network.RESULT_SUCCESS:
|
||||
if icon and len(icon):
|
||||
icon = base64.b64decode(icon)
|
||||
print "Buddy icon for '%s' is size %d" % (buddy.get_nick_name(), len(icon))
|
||||
buddy.set_icon(icon)
|
||||
|
||||
if result_status == network.RESULT_FAILED or not icon:
|
||||
else:
|
||||
# What the heck, try again!
|
||||
gobject.timeout_add(1000, self._request_buddy_icon, buddy)
|
||||
|
||||
|
@ -10,9 +10,6 @@ import SimpleXMLRPCServer
|
||||
import SocketServer
|
||||
|
||||
|
||||
RESULT_FAILED = 0
|
||||
RESULT_SUCCESS = 1
|
||||
|
||||
__authinfos = {}
|
||||
|
||||
def _add_authinfo(authinfo):
|
||||
@ -179,7 +176,7 @@ class GlibXMLRPCTransport(xmlrpclib.Transport):
|
||||
if request_cb:
|
||||
if len(response) == 1:
|
||||
response = response[0]
|
||||
gobject.idle_add(request_cb, RESULT_SUCCESS, response, user_data)
|
||||
gobject.idle_add(request_cb, response, user_data)
|
||||
|
||||
class _Method:
|
||||
"""Right, so python people thought it would be funny to make this
|
||||
@ -212,7 +209,7 @@ class GlibServerProxy(xmlrpclib.ServerProxy):
|
||||
Here, 'xmlrpc_test_cb' is the callback function, which has the following
|
||||
signature:
|
||||
|
||||
def xmlrpc_test_cb(result_status, response, user_data=None):
|
||||
def xmlrpc_test_cb(response, user_data=None):
|
||||
...
|
||||
"""
|
||||
def __init__(self, uri, encoding=None, verbose=0, allow_none=0):
|
||||
@ -239,7 +236,6 @@ class GlibServerProxy(xmlrpclib.ServerProxy):
|
||||
request = xmlrpclib.dumps(params, methodname, encoding=self._encoding,
|
||||
allow_none=self._allow_none)
|
||||
|
||||
try:
|
||||
response = self._transport.start_request(
|
||||
self._host,
|
||||
self._handler,
|
||||
@ -248,8 +244,6 @@ class GlibServerProxy(xmlrpclib.ServerProxy):
|
||||
request_cb=request_cb,
|
||||
user_data=user_data
|
||||
)
|
||||
except socket.error, exc:
|
||||
gobject.idle_add(request_cb, RESULT_FAILED, None, user_data)
|
||||
|
||||
def __getattr__(self, name):
|
||||
# magic method dispatcher
|
||||
|
Loading…
Reference in New Issue
Block a user