Commit Graph

61 Commits

Author SHA1 Message Date
c85109fc32 Coding style and whitespace cleanup. 2012-08-19 14:17:55 -04:00
fcbbdfbd18 Coding style and whitespace cleanup. 2011-09-04 07:34:32 -04:00
394e580dfd Including <glib.h> directly is rarely needed. 2011-05-28 10:39:52 -04:00
756c8abcb8 Bug #646109 - Fix use of include <config.h> to make sure translations work 2011-05-27 15:23:07 +02:00
8a186c3588 Coding style cleanups. 2011-05-08 13:37:20 -04:00
c6fd77460f Coding style and whitespace cleanup. 2011-03-05 12:34:28 -05:00
ebcce86769 Coding style and whitespace cleanups. 2010-09-11 14:14:04 -04:00
1040078ce6 Update API documentation.
Also, start fixing some Gtk-Doc warnings.  There's a lot.
2010-02-09 18:02:51 -05:00
5c80f1534b Coding style and whitespace cleanup. 2010-01-04 20:22:21 -05:00
5b771a7500 Developer documentation improvements. 2009-09-22 21:26:54 -04:00
0274669179 Fix excessive whitespace. 2009-07-12 23:33:07 -04:00
fad4af8a3d Prefer GLib basic types over C types. 2009-05-28 12:13:23 -04:00
6f5464f34c Remove trailing whitespace, again. 2009-05-28 12:13:22 -04:00
a6c9a55391 Fix compiler warnings in e-util. 2009-05-25 13:42:03 -04:00
76dbf9df1f License changes. Changed license from GPL to LGPL.
More to come.

svn path=/trunk/; revision=36255
2008-09-04 14:56:39 +00:00
abda2bda85 updated novell copyright notices (left others alone)
svn path=/trunk/; revision=35665
2008-06-20 22:26:57 +00:00
8e47917e8c Update FSF address in header comments (#469886). Patch from Tobias
2007-09-02  Matthew Barnes  <mbarnes@redhat.com>

	* Update FSF address in header comments (#469886).
	  Patch from Tobias Mueller.


svn path=/trunk/; revision=34151
2007-09-02 04:19:22 +00:00
187e0c0464 Clean up compiler warnings in e-util directory (#438467).
svn path=/trunk/; revision=33623
2007-06-03 01:57:58 +00:00
b6e4403f9b identify "sip:" URL's. Fixes bug #396543.
2007-01-27  Andre Klapper  <a9016009@gmx.de>

	* e-html-utils.c: (e_text_to_html_full):
	identify "sip:" URL's. Fixes bug #396543.


svn path=/trunk/; revision=33155
2007-01-27 14:44:48 +00:00
b105af8066 Use g_ascii_strncasecmp() instead of strncasecmp(). We are comparing to
2005-09-28  Tor Lillqvist  <tml@novell.com>

	* e-html-utils.c (e_text_to_html_full): Use g_ascii_strncasecmp()
	instead of strncasecmp(). We are comparing to literal ASCII
	strings, just casefolding ASCII is enough. Also better for
	portability.

svn path=/trunk/; revision=30395
2005-09-28 10:16:34 +00:00
c89d4ffa5d add callto:, h323:, and webcal: schemes.
2004-02-03  Chris Toshok  <toshok@ximian.com>

	* e-html-utils.c (e_text_to_html_full): add callto:, h323:, and
	webcal: schemes.

svn path=/trunk/; revision=24585
2004-02-03 17:29:42 +00:00
d0549a4df4 Removed. No longer used by evolution except via evolution-data-server.
* ename/*: Removed. No longer used by evolution except via
	evolution-data-server.

	* Makefile.am (SUBDIRS): Remove ename

svn path=/trunk/; revision=23232
2003-11-07 21:27:34 +00:00
8c301288f1 add a flag for non-url chars (controls, whitespace, ", and |)
* e-html-utils.c (special_chars): add a flag for non-url chars
	(controls, whitespace, ", and |)
	(url_extract): Use that. When urlifying just a hostname, make sure
	it really is a hostname, and not just something like "www.c".
	(e_text_to_html_full): Deal with url_extract returning NULL in the
	"www." case
	(main): add a regression test, #ifdef E_HTML_UTILS_TEST

svn path=/trunk/; revision=22087
2003-08-05 15:26:11 +00:00
24ee471cb1 Add this back: Connector needs it, and there's no reason for addressbook
* e-html-utils.c: Add this back: Connector needs it, and there's
	no reason for addressbook and calendar to be using camel to get
	this functionality.

	* Makefile.am (libeutil_la_SOURCES): re-add e-html-utils

svn path=/trunk/; revision=19246
2003-01-06 18:55:31 +00:00
d3d65d9bec Removed. Back to the fiery depths of hell from whence ye came!
2002-12-16  Jeffrey Stedfast  <fejj@ximian.com>

	* e-html-utils.[c,h]: Removed. Back to the fiery depths of hell
	from whence ye came!

svn path=/trunk/; revision=19130
2002-12-16 19:47:33 +00:00
9c73777f22 First big sync of my GNOME 2 porting work (incomplete, and still
pretty broken).

Weeeeee!

svn path=/trunk/; revision=18503
2002-11-02 08:25:03 +00:00
bd8e7f9978 Convert file: urls too. Fixes bug #29557.
2002-08-28  Jeffrey Stedfast  <fejj@ximian.com>

	* e-html-utils.c (e_text_to_html_full): Convert file: urls
	too. Fixes bug #29557.

svn path=/trunk/; revision=17899
2002-08-28 19:51:44 +00:00
fb410a4f98 Remove the logic that assumes "Rupert> " is a citation, since it misfires
* e-html-utils.c (is_citation): Remove the logic that assumes
	"Rupert> " is a citation, since it misfires more often than it
	hits.

svn path=/trunk/; revision=17696
2002-08-05 13:39:16 +00:00
3a2c51d2a3 Don't use "isprint(c)" to mean "c >= 32 && c < 128" since it doesn't in
* e-html-utils.c (is_addr_char, is_trailing_garbage): Don't use
	"isprint(c)" to mean "c >= 32 && c < 128" since it doesn't in most
	locales.
	(is_domain_name_char): new macro for dns-valid characters
	(email_address_extract): Use is_domain_name_char rather than
	is_addr_char for the part after the @.

svn path=/trunk/; revision=17655
2002-07-31 19:02:02 +00:00
d7ea6022c1 Fix for if the buffer ends with an email address (and no newline).
* e-html-utils.c (e_text_to_html_full): Fix for if the buffer ends
	with an email address (and no newline).

svn path=/trunk/; revision=15802
2002-02-22 19:57:17 +00:00
08fb7329cb Fixing the license text.
svn path=/trunk/; revision=14212
2001-10-27 16:59:46 +00:00
02dcd0aadf Update the licensing information to require version 2 of the GPL
(instead of version 2 or any later version).

svn path=/trunk/; revision=14190
2001-10-27 00:25:49 +00:00
6a76e39e37 Change " " to "&nbsp;" at start of line.
* e-html-utils.c (e_text_to_html_full): Change " " to "&nbsp;" at
	start of line.

svn path=/trunk/; revision=13940
2001-10-23 13:54:38 +00:00
44faa44bff Pass a CORBA_Environment to bonobo_config_get_string so it doesn't g_warn
* e-passwords.c (e_passwords_get_password): Pass a
	CORBA_Environment to bonobo_config_get_string so it doesn't g_warn
	on error. (Since the "error" is most likely just that the password
	isn't cached.)
	(e_passwords_remember_password, e_passwords_get_password,
	e_passwords_add_password): Change "if (foo) { entire function; }"
	to "if (!foo) return;"

	* e-html-utils.c (special_chars): Don't allow single quote or
	backtick in email addresses, or pipes following URLs.

svn path=/trunk/; revision=13887
2001-10-22 18:46:46 +00:00
f6a949c349 Fix some broken calls to check_size that could result in memory corruption
* e-html-utils.c (e_text_to_html_full): Fix some broken calls to
	check_size that could result in memory corruption displaying short
	replies.

svn path=/trunk/; revision=12705
2001-09-08 16:34:21 +00:00
e14c614159 Add E_TEXT_TO_HTML_CITE, to prepend "> " to each line.
* e-html-utils.c (e_text_to_html_full): Add E_TEXT_TO_HTML_CITE,
	to prepend "> " to each line.

svn path=/trunk/; revision=12655
2001-09-06 19:47:46 +00:00
7e05144bba Added is_addr_char_no_pipes macro, which specifically does not consider
2001-07-12  Jon Trowbridge  <trow@ximian.com>

	* e-html-utils.c: Added is_addr_char_no_pipes macro, which
	specifically does not consider '|' ("pipe") to be a legal address
	character.
	(email_address_extract): Use is_addr_char_no_pipes when looking
	for e-mail addresses to turn into HTML links. (Bug #3940)

svn path=/trunk/; revision=11029
2001-07-12 05:42:49 +00:00
91cc026904 Update the copyrights, replacing Helix Code with Ximian and
helixcode.com with ximian.com all over the place.

svn path=/trunk/; revision=10440
2001-06-23 08:52:02 +00:00
23bcf6e31a add E_TEXT_TO_HTML_ESCAPE_8BIT to turn non-US-ASCII characters into "?"s.
* e-html-utils.c (e_text_to_html_full): add
	E_TEXT_TO_HTML_ESCAPE_8BIT to turn non-US-ASCII characters into
	"?"s.

svn path=/trunk/; revision=9859
2001-05-16 22:30:44 +00:00
05817ac122 Replicate the semantics of the libunicode utf8 functions by returning NULL
2001-05-14  Jon Trowbridge  <trow@ximian.com>

        * camel-search-private.c (utf8_get): Replicate the semantics of
        the libunicode utf8 functions by returning NULL in the arg
        on invalid utf8.

        * camel-pgp-context.c (pgp_verify): Check for valid utf8,
        terminate loop if something looks wrong.

        * camel-mime-utils.c (header_encode_phrase_get_words): Properly
        check for invalid utf8.
        (header_encode_string): Properly check for invalid utf8.

        * camel-charset-map.c (camel_charset_step): Properly check for
        invalid utf8.

2001-05-14  Jon Trowbridge  <trow@ximian.com>

        * e-html-utils.c (is_citation): Check for bad utf8.

svn path=/trunk/; revision=9798
2001-05-14 21:04:35 +00:00
eba2691d5d Don't use g_utf8_next_char on text that isn't valid UTF8, since it won't
* e-html-utils.c (e_text_to_html_full): Don't use g_utf8_next_char
	on text that isn't valid UTF8, since it won't work (and might even
	get into an infinite loop).

svn path=/trunk/; revision=9637
2001-05-01 16:46:31 +00:00
9071df0d8f Make this smarter. Now e_text_to_html_full calls it when it sees a '@',
* e-html-utils.c (email_address_extract): Make this smarter. Now
	e_text_to_html_full calls it when it sees a '@', and
	email_address_extract deals with scanning both forward and
	backward to find the bounds of the email address. It's still
	fooled by Message-IDs, but there's not a whole lot we can do
	there...

svn path=/trunk/; revision=9628
2001-04-29 17:41:33 +00:00
ec67eb41a7 If the buffer is too small, making it twice as big does not guarantee it
* e-html-utils.c (check_size): If the buffer is too small, making
	it twice as big does not guarantee it will be big enough. "Duh".
	Also, a bunch of the check_size calls don't seem to be taking
	trailing NULs into account, so add in a +1 here.

svn path=/trunk/; revision=9549
2001-04-24 20:00:38 +00:00
038d1a932c Removed attempts to use Radek's evil <DATA> hacks, which were just causing
2001-04-23  Jon Trowbridge  <trow@ximian.com>

        * e-html-utils.c (e_text_to_html_full): Removed attempts to use
        Radek's evil <DATA> hacks, which were just causing me
        (and GtkHTML) grief.

2001-04-23  Jon Trowbridge  <trow@ximian.com>

        * gui/component/e-address-popup.c: Lots of code has been
        simplified here.
        (e_address_popup_factory_new_control): Rather than directly pop
        our control up in a window (via the e_address_popup_popup
        function, which is now gone), just return the widget and let the
        caller do the popping.  This works better, since it means we don't
        have to work around the vagaries of bonobo focus & event handling.
        (e_address_popup_set_name): Refresh when both name & email have
        been set, rather than checking a stupid counter.
        (e_address_popup_set_email): Ditto.

2001-04-23  Jon Trowbridge  <trow@ximian.com>

        * mail-display.c (html_button_press_event): Check for mailto:
        links, and pop up our mail address menu when we find one.
        (make_popup_window): The main piece of code (ignoring a zillion
        little callbacks) to pop up our windows with reasonable semantics
        for having them close automatically.
        (mail_text_write): Enable converting addresses to mailto links
        in message bodies.

        * mail-format.c (write_address): Simplify code, removing Radek's
        <DATA> hacks.  Write out addresses as mailto: links.

svn path=/trunk/; revision=9534
2001-04-24 02:51:45 +00:00
a50c888bbe ">From" is not a citation unless the previous or following line is a
* e-html-utils.c (is_citation): ">From" is not a citation unless
        the previous or following line is a citation.
        (e_text_to_html_full): Update for is_citation change. Also, when
        marking citations, unmangle mbox From-mangling.

svn path=/trunk/; revision=9458
2001-04-19 14:37:05 +00:00
2067796514 Add support for converting e-mail addresses to links. (is_email_address):
2001-03-30  Jon Trowbridge  <trow@ximian.com>

        * e-html-utils.c (e_text_to_html_full): Add support for converting
        e-mail addresses to links.
        (is_email_address): Added.  Identifies e-mail addresses.
        (email_address_extract): Added.  Extracts a copy of the e-mail
        address from the text.

        * e-html-utils.h (E_TEXT_TO_HTML_CONVERT_ADDRESSES): Added.

        * e-url.c (e_url_shroud): Added.  Copy a url, replacing
        any plaintext passwords with a single *.
        (e_url_equal): Compare two urls, taking into account that
        they may or may not be shrouded.

2001-03-30  Jon Trowbridge  <trow@ximian.com>

        * camel-mime-message.c (camel_mime_message_set_source): Shrould
        our source URL before putting it into X-Evolution-Source.

2001-03-30  Jon Trowbridge  <trow@ximian.com>

        * mail-display.c (mail_text_write): Add (commented-out)
        E_TEXT_TO_HTML_CONVERT_ADDRESSES.

        * mail-config.c (mail_config_get_account_by_source_url):
        Call e_url_equal to compare URLs.

svn path=/trunk/; revision=9050
2001-03-30 18:05:48 +00:00
6d9167de80 Remove #include <glib.h> Shuffle some headers. Remove #include
2001-03-29  Kjartan Maraas  <kmaraas@gnome.org>

	* e-corba-utils.h: Remove #include <glib.h>
	* e-dialog-widgets.c: Shuffle some headers.
	* e-dialog-widgets.h: Remove #include <libgnomeui/gnome-propertybox.h>
	* e-gtk-utils.c: #include <gtk/gtksignal.h>
	* e-gtk-utils.h: Replace #include <gtk/gtk.h>
	* e-gui-utils.c: Replace #include <gnome.h>
	* e-html-utils.c: Shuffle headers.
	* e-iterator.c: Replace #include <gtk/gtk.h>
	* e-iterator.h: Replace #include <gtk/gtk.h>
	* e-list-iterator.c: Remove #include <gtk/gtk.h>
	* e-list-iterator.h: Replace #include <gtk/gtk.h>
	* e-list.c: Remove #include <gtk/gtk.h>
	* e-list.h: Replace #include <gtk/gtk.h>
	* e-memory.c: #include <string.h> and <stdlib.h>
	* e-msgport.c: Move around some includes. s/%d/%ld/g in a printf()
	call to fix a warning.
	* e-pilot-map.c: #include <string.h>. Replace #include <gnome.h>
	* e-pilot-util.c: Remove #include <gnome.h>
	* e-sexp.c: Remove #include <glib.h>
	* e-sexp.h: Replace #include <gtk/gtk.h>
	* e-time-utils.c: #include <string.h>
	* md5-utils.c: Shuffle headers.
	* test-ename-western-gtk.c: Replace #include <gnome.h>
	* test-ename-western.c: Same here.

svn path=/trunk/; revision=9016
2001-03-29 18:07:13 +00:00
3e105b5bb7 new function, extracted from e_text_to_html, added color parameter
2001-03-20  Radek Doulik  <rodo@ximian.com>

	* e-html-utils.c (e_text_to_html_full): new function, extracted
	from e_text_to_html, added color parameter

2001-03-19  Radek Doulik  <rodo@ximian.com>

	* e-html-utils.c (e_text_to_html): support mark citation

	* e-html-utils.h (E_TEXT_TO_HTML_MARK_CITATION): added
	E_TEXT_TO_HTML_MARK_CITATION

svn path=/trunk/; revision=8847
2001-03-20 16:50:12 +00:00
aa69aa95cd Fix a bit: [mailto:foo] shouldn't grab the ']'
* e-html-utils.c (url_extract): Fix a bit: [mailto:foo] shouldn't
	grab the ']'

svn path=/trunk/; revision=8736
2001-03-15 14:36:23 +00:00
bb6e7097e0 Fix an off-by-one in the "is this for real?" check so that "http:// "
* e-html-utils.c (url_extract): Fix an off-by-one in the "is this
	for real?" check so that "http:// " won't get URLified

svn path=/trunk/; revision=8581
2001-03-07 15:39:54 +00:00