gtkhtml r8781 - in branches/mbarnes-composer: . gtkhtml po



Author: mbarnes
Date: Wed Mar 12 13:24:49 2008
New Revision: 8781
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=8781&view=rev

Log:
Merge revisions 8755:8780 from trunk.


Modified:
   branches/mbarnes-composer/ChangeLog
   branches/mbarnes-composer/NEWS
   branches/mbarnes-composer/configure.in
   branches/mbarnes-composer/gtkhtml/ChangeLog
   branches/mbarnes-composer/gtkhtml/gtkhtml.c
   branches/mbarnes-composer/gtkhtml/htmlengine.c
   branches/mbarnes-composer/po/ChangeLog
   branches/mbarnes-composer/po/bn_IN.po
   branches/mbarnes-composer/po/da.po
   branches/mbarnes-composer/po/en_GB.po
   branches/mbarnes-composer/po/es.po
   branches/mbarnes-composer/po/hu.po
   branches/mbarnes-composer/po/ko.po
   branches/mbarnes-composer/po/lt.po
   branches/mbarnes-composer/po/mr.po
   branches/mbarnes-composer/po/oc.po
   branches/mbarnes-composer/po/ru.po
   branches/mbarnes-composer/po/sv.po
   branches/mbarnes-composer/po/uk.po

Modified: branches/mbarnes-composer/NEWS
==============================================================================
--- branches/mbarnes-composer/NEWS	(original)
+++ branches/mbarnes-composer/NEWS	Wed Mar 12 13:24:49 2008
@@ -1,3 +1,37 @@
+GtkHTML-3.17.93 2008-03-10
+--------------------------
+
+Updated Translations:
+	Gabor Kelemen (hu)
+	Vasiliy Faronov (ru)
+	Runa Bhattacharjee (bn_IN)
+	Maxim Dziumanenko (uk)
+	Philip Withnall (en_GB)
+	Sandeep Shedmake (mr)
+	Kenneth Nielsen (da)
+
+GtkHTML-3.17.92 2008-02-25
+--------------------------
+
+Other Contributors:
+
+Updated Translations:
+	Yair Hershkovitz (he)
+	Claude Paroz (fr)
+	Wouter Bolsterlee (nl)
+	Gil Forcada (ca)
+	Pawan Chitrakar (ne)
+	Ilkka Tuohela (fi)
+	Lucas Lommer (cs)
+	Pedro de Medeiros (pt_BR)
+	Chao-Hsiung Liao (zh_HK)
+	Chao-Hsiung Liao (zh_TW)
+	Luca Ferretti (it)
+	Takeshi AIHANA (ja)
+
+Bug Fixes:
+	#391730: Fix cut/paste oddities in the composer window (Milan Crha)
+
 GtkHTML-3.17.91 2008-02-11
 --------------------------
 

Modified: branches/mbarnes-composer/configure.in
==============================================================================
--- branches/mbarnes-composer/configure.in	(original)
+++ branches/mbarnes-composer/configure.in	Wed Mar 12 13:24:49 2008
@@ -37,7 +37,7 @@
 
 AC_DEFINE(BONOBO_DISABLE_DEPRECATED,1,[No deprecated bonobo functions])
 
-AM_INIT_AUTOMAKE($PACKAGE, 3.17.92)
+AM_INIT_AUTOMAKE($PACKAGE, 3.18.0)
 
 AM_MAINTAINER_MODE
 

Modified: branches/mbarnes-composer/gtkhtml/gtkhtml.c
==============================================================================
--- branches/mbarnes-composer/gtkhtml/gtkhtml.c	(original)
+++ branches/mbarnes-composer/gtkhtml/gtkhtml.c	Wed Mar 12 13:24:49 2008
@@ -2072,7 +2072,7 @@
 /* X11 selection support.  */
 
 static char *
-ucs2_order (gboolean swap)
+utf16_order (gboolean swap)
 {
 	gboolean be;
 
@@ -2087,9 +2087,9 @@
 	be = swap ? be : !be;
 
 	if (be)
-		return "UCS-2BE";
+		return "UTF-16BE";
 	else
-		return "UCS-2LE";
+		return "UTF-16LE";
 
 }
 
@@ -2164,7 +2164,7 @@
 }
 
 static gchar *
-ucs2_to_utf8_with_bom_check (guchar  *data, guint len) {
+utf16_to_utf8_with_bom_check (guchar  *data, guint len) {
 	char    *fromcode = NULL;
 	GError  *error = NULL;
 	guint16 c;
@@ -2183,12 +2183,12 @@
 	switch (c) {
 	case 0xfeff:
 	case 0xfffe:
-		fromcode = ucs2_order (c == 0xfeff);
+		fromcode = utf16_order (c == 0xfeff);
 		data += 2;
 		len  -= 2;
 		break;
 	default:
-		fromcode = "UCS-2";
+		fromcode = "UTF-16";
 		break;
 	}
 
@@ -2419,12 +2419,12 @@
 				complete_url = g_strconcat (url, target && *target ? "#" : NULL, target, NULL);
 
 				if (info == DND_TARGET_TYPE_MOZILLA_URL) {
-					/* MOZ_URL is in UCS-2 but in format 8. BROKEN!
+					/* MOZ_URL is in UTF-16 but in format 8. BROKEN!
 					 *
 					 * The data contains the URL, a \n, then the
 					 * title of the web page.
 					 */
-					char *ucs2;
+					char *utf16;
 					char *utf8;
 					gsize written_len;
 
@@ -2438,12 +2438,12 @@
 					} else
 						utf8 = g_strconcat (complete_url, "\n", complete_url, NULL);
 
-					ucs2 = g_convert (utf8, strlen (utf8), "UCS-2", "UTF-8", NULL, &written_len, NULL);
+					utf16 = g_convert (utf8, strlen (utf8), "UTF-16", "UTF-8", NULL, &written_len, NULL);
 					gtk_selection_data_set (selection_data, selection_data->target, 8,
-								(guchar *) ucs2, written_len);
+								(guchar *) utf16, written_len);
 					g_free (utf8);
 					g_free (complete_url);
-					GTK_HTML (widget)->priv->dnd_url = ucs2;
+					GTK_HTML (widget)->priv->dnd_url = utf16;
 				} else {
 					gtk_selection_data_set (selection_data, selection_data->target, 8,
 								(guchar *) complete_url, strlen (complete_url));
@@ -3186,6 +3186,7 @@
 	gchar *text = NULL;
 
 	if (!html_object_is_text (o)) {
+		*offset = 0;
 		if (e->cursor->offset == 0) {
 			prev = html_object_prev_not_slave (o);
 			if (html_object_is_text (prev)) {
@@ -3201,7 +3202,6 @@
 			} else
 				return NULL;
 		}
-		*offset = 0;
 	} else
 		*offset = e->cursor->offset;
 
@@ -3257,8 +3257,9 @@
 		html_engine_set_mark (html->engine);
 		html_cursor_exactly_jump_to_position_no_spell (html->engine->cursor, html->engine, orig_position + offset + n_chars);
 		html_engine_delete (html->engine);
-		if (offset >= 0)
-			html_cursor_exactly_jump_to_position_no_spell (html->engine->cursor, html->engine, orig_position);
+		if (offset < 0)
+			orig_position -= MIN (n_chars, - offset);
+		html_cursor_jump_to_position_no_spell (html->engine->cursor, html->engine, orig_position);
 	}
 	return TRUE;
 }
@@ -4249,7 +4250,7 @@
 		if (type == gdk_atom_intern (selection_targets[TARGET_HTML].target, FALSE)) {
 			if (selection_data->length > 1 &&
 			    !g_utf8_validate ((const gchar *) selection_data->data, selection_data->length - 1, NULL)) {
-				utf8 = ucs2_to_utf8_with_bom_check (selection_data->data, selection_data->length);
+				utf8 = utf16_to_utf8_with_bom_check (selection_data->data, selection_data->length);
 
 			} else {
 				utf8 = g_strndup ((const gchar *) selection_data->data, selection_data->length);

Modified: branches/mbarnes-composer/gtkhtml/htmlengine.c
==============================================================================
--- branches/mbarnes-composer/gtkhtml/htmlengine.c	(original)
+++ branches/mbarnes-composer/gtkhtml/htmlengine.c	Wed Mar 12 13:24:49 2008
@@ -1788,12 +1788,11 @@
 	if (id == NULL && html_element_get_attr (element, "name", &value))
 		id = g_strdup (value);
 
-	if (html_element_get_attr (element, "shape", &type)
-	    || html_element_get_attr (element, "coords", &coords)) {
+	if (e->map && (html_element_get_attr (element, "shape", &type) || html_element_get_attr (element, "coords", &coords))) {
 		HTMLShape *shape;
 
 		shape = html_shape_new (type, coords, url, target);
-		if (shape && e->map)
+		if (shape)
 			html_map_add_shape (e->map, shape);
 	}
 



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