Re: [gedit-list] Re: patch for bonobo interface
- From: Paolo Maggi <maggi athena polito it>
- To: James Willcox <jwillcox cs indiana edu>
- Cc: gedit-list lists sourceforge net
- Subject: Re: [gedit-list] Re: patch for bonobo interface
- Date: Sun Aug 25 02:20:02 2002
Hi James,
Yup, I tested the exception stuff. I have now added a getChars() method
and a getLength() method.
what about calling getLength () getCharCount() like in gedit-document?
+static CORBA_long
+impl_gedit_document_server_getLength (PortableServer_Servant _servant,
+ CORBA_Environment *ev)
+{
+ GeditDocumentServer *doc_server;
+ gchar *buf;
+ CORBA_long len;
+
+ doc_server = GEDIT_DOCUMENT_SERVER (bonobo_object_from_servant (_servant));
+
+ buf = gedit_document_get_buffer (doc_server->doc);
+
+ if (buf == NULL) {
+ return 0;
+ }
+
+ len = strlen (buf);
+ g_free (buf);
+
+ return len;
+}
This is broken since it returns the number of bytes and not the number
of chars.
You should use gedit_document_get_char_count
Please, could you split this patch into two parts: the CORBA stuff and
the stdin one?
Please, fix the getLength problem and commit the CORBA stuff.
I have still to review the stdin part.
Thanks again for your patch.
Ciao,
Paolo
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]