Re: [Gnome-devtools] Recent gIDE changes
- From: Dirk Vangestel <dirk_vangestel yahoo com>
- To: gnome-devtools helixcode com
- Cc: gide-list gide pn org
- Subject: Re: [Gnome-devtools] Recent gIDE changes
- Date: Tue, 21 Nov 2000 03:22:47 -0800 (PST)
--- Dave Camp <dave helixcode com> wrote:
> The major change I made is to the editor. I
> replaced the current editor
> with one that uses bonobo to load and interact with
> the editor.
I believe there was some interest in getting Glimmer
to work too. Is there anyone working on that? Chicane?
> Replacing the editor required these major changes:
>
> * I removed all of the editor code from gIDE. This
> included things like
> the highlighting, text widgets, and all of the
> gI_document.c
> implementation code. This also meant deriving
> GideDocument from a
> different base class.
I guess the preferences should be updated too, but I
suggest leaving that for now. The preferences stuff
should be totally rewritten anyway.
> * Moved gI_text functions into gI_document. This
> split was really
> somewhat artificial, and made no sense with the new
> code. So
> gI_text.[ch] are now obsolete.
It was not artificial; it was meant to ease the
porting to a different editor. If all the
functionality to change text is now present in the
bonobo interface (which I doubt) there is no need for
it anymore, but if it isn't then I think there is
still justification to keep it.
> * Re-implemented gI_document with the bonobo stuff.
> This included
> adding all the gI_text and gtk_editable functions
> that needed
> implementing.
That's what I thought. So there is a need to keep
gI_text.c: it should contain the implementation of the
text handling functions. Those should not be in
gI_document.
> * The plugins should be reworked to do their own
> menu merging with the
> new bonobo UI code.
>
> * It should be possible to write plugins as CORBA
> objects rather than C
> code/gmodules.
What is Gnumeric going to do about this? The plugin
system was re-used from them. It would be cool to have
all plugin-type programs use the same plugin
interface, so people would only have to write similar
plugins once. But then again, that wouldn't be plugins
anymore... Needs more thought.
> * The code should be scanned again to make sure that
> nothing is trying
> to treat a GideDocument as a
> GtkEditable/GtkEditor/GtkSCText.
I already did that for the gtk-editor branch, but it
was never merged :-(
> * Some inefficiencies need to be cleaned up. What
> used to be a local
> function call or array reference is now an RPC call.
> I did a very basic
> conversion, and didn't clean up any inefficiencies.
> So what used to be:
>
> for (i = 0; i < gI_text_get_length (document); i++)
> {
> char *text = gtk_editable_get_chars
> (GTK_EDITABLE (document), i, i +
> 1);
> }
>
> is now:
>
> for (i = 0; i < gI_document_get_length (document);
> i++) {
> char *text = gI_document_get_chars (document, i,
> i + 1);
> }
>
> but SHOULD be:
>
> int length = gI_document_get_length (document);
> for (i = 0; i < length; i++) {
> /* I'll be adding buffering code to make this
> relatively efficient
> */
> char *text = gI_document_get_chars (document, i,
> i + 1);
> }
Call me crazy, but shouldn't that be
char* text = gI_document_get_chars(document, 0,
gI_document_get_length(document))? Looks a wee bit
more efficient to me :)
Dirk
__________________________________________________
Do You Yahoo!?
Yahoo! Shopping - Thousands of Stores. Millions of Products.
http://shopping.yahoo.com/
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]