circle-discuss
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[circle] oops I did it again


From: thomasV1
Subject: [circle] oops I did it again
Date: Sat, 24 Jan 2004 18:23:16 +0100 (MET)

Hi everybody,

Given the previous discussion, I understand that there are 
two possible interpretations of what gui and core mean:

1. 'gui' can be understood in the strict sense, as: 
'all what the user directly interacts with'
This is what thomasM and rodrigo mean.
The goal of this separation is to write cleaner code.

2. 'gui' can be understood as : 'all the objects that are needed once the
window is open,
but that are not needed if the daemon is running' (which is my
interpretation).
in this interpretation, gui includes chat and name_server.
The goal of this separation is not to write cleaner code, but to have a
'core' running 
in the background, to which it is possible to attach various programs.

I implemented the separation at both levels.

The core now runs as a daemon (to start it, type you have to type 'circle
start').
The gtk interface can be called by typing 'circle gtk'. The chat and
name_server 
objects are instanciated at this time, and they are stopped when the user
closes 
the window. It is also possible to use the text interface, with 'circle
text'. However it 
is still very buggy, and it needs to run in the same terminal where the
daemon was started.

So this implements my interpretation of the separation (2).

However, I also had to do the separation (1), because all gtk stuff 
must run in the same thread. The gtk thread is no longer the main 
thread as it used to be. So, in the sense of (1), the main thread does 
the 'core' stuff and the gtk thread does the 'gui' stuff. if the core needs 
to generate a gui action, it has to put this action in the gtk queue, and 
the action will be performed in the gtk thread 
(this is done using gtk.idle_add, or gtk.add_timeout).

The new version is in cvs.

a few eggs have been broken in the process:
 - the proxy support is currently broken, but I will fix it.
 - I would be very surprised if circle still works under windows.

-- 
+++ GMX - die erste Adresse für Mail, Message, More +++
Bis 31.1.: TopMail + Digicam für nur 29 EUR http://www.gmx.net/topmail





reply via email to

[Prev in Thread] Current Thread [Next in Thread]