gtkhtml r8698 - in branches/mbarnes-composer: . components/html-editor gtkhtml po



Author: mbarnes
Date: Thu Jan 24 02:22:53 2008
New Revision: 8698
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=8698&view=rev

Log:
Merge revisions 8657:8697 from trunk.


Modified:
   branches/mbarnes-composer/ChangeLog
   branches/mbarnes-composer/NEWS
   branches/mbarnes-composer/components/html-editor/ChangeLog
   branches/mbarnes-composer/components/html-editor/Makefile.am
   branches/mbarnes-composer/components/html-editor/gtkhtml-editor-properties.glade
   branches/mbarnes-composer/components/html-editor/search.c
   branches/mbarnes-composer/components/html-editor/spellchecker.c
   branches/mbarnes-composer/components/html-editor/table.c
   branches/mbarnes-composer/configure.in
   branches/mbarnes-composer/gtkhtml-zip.in
   branches/mbarnes-composer/gtkhtml/ChangeLog
   branches/mbarnes-composer/gtkhtml/gtkhtml.c
   branches/mbarnes-composer/gtkhtml/htmlframe.c
   branches/mbarnes-composer/gtkhtml/htmliframe.c
   branches/mbarnes-composer/gtkhtml/testgtkhtml.c
   branches/mbarnes-composer/po/ChangeLog
   branches/mbarnes-composer/po/es.po
   branches/mbarnes-composer/po/et.po
   branches/mbarnes-composer/po/eu.po
   branches/mbarnes-composer/po/ko.po
   branches/mbarnes-composer/po/nb.po
   branches/mbarnes-composer/po/sv.po

Modified: branches/mbarnes-composer/NEWS
==============================================================================
--- branches/mbarnes-composer/NEWS	(original)
+++ branches/mbarnes-composer/NEWS	Thu Jan 24 02:22:53 2008
@@ -1,3 +1,20 @@
+GtkHTML-3.17.5 2008-01-14
+-------------------------
+
+Bug Fixes:
+	#317823: Save inline pictures embedded into HTML Mails (Milan Crha)
+	#447122: Move to next character when searching forward (Milan Crha)
+	#467791: Do not crash on html messages that use "shape" without "map" (Andre Klapper)
+	#493709: Remove deprecated GTK+ symbols (Matthew Barnes)
+	#498089: Fix mnemonics issues (Alex Kloss)
+	#504051: Do not load from file if url starts with "cid:" (Milan Crha)
+
+Updated Translations:
+	Changwoo Ryu (ko)
+	Yannig Marchegay (oc)
+	Ivar Smolin (et)
+	Djihed Afifi (ar)
+
 GtkHTML-3.17.4 2007-12-17
 -------------------------
 

Modified: branches/mbarnes-composer/components/html-editor/Makefile.am
==============================================================================
--- branches/mbarnes-composer/components/html-editor/Makefile.am	(original)
+++ branches/mbarnes-composer/components/html-editor/Makefile.am	Thu Jan 24 02:22:53 2008
@@ -15,7 +15,6 @@
 	-I$(top_srcdir)/gtkhtml \
 	-I$(includedir) \
 	$(GTKHTML_CFLAGS) \
-	$(SOUP_CFLAGS) \
 	$(EDITOR_I18N_CFLAGS) \
 	-DG_LOG_DOMAIN=\"gtkhtml\" \
 	-DSRCDIR=\"$(srcdir)\" \

Modified: branches/mbarnes-composer/components/html-editor/gtkhtml-editor-properties.glade
==============================================================================
--- branches/mbarnes-composer/components/html-editor/gtkhtml-editor-properties.glade	(original)
+++ branches/mbarnes-composer/components/html-editor/gtkhtml-editor-properties.glade	Thu Jan 24 02:22:53 2008
@@ -134,6 +134,7 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">2</property>
 			      <property name="ypad">0</property>
+			      <property name="mnemonic_widget">spin_table_rows</property>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
@@ -196,7 +197,7 @@
 			  <child>
 			    <widget class="GtkLabel" id="label2">
 			      <property name="visible">True</property>
-			      <property name="label" translatable="yes">_Columns:</property>
+			      <property name="label" translatable="yes">Colu_mns:</property>
 			      <property name="use_underline">True</property>
 			      <property name="use_markup">False</property>
 			      <property name="justify">GTK_JUSTIFY_CENTER</property>
@@ -206,6 +207,7 @@
 			      <property name="yalign">0.5</property>
 			      <property name="xpad">2</property>
 			      <property name="ypad">0</property>
+			      <property name="mnemonic_widget">spin_table_columns</property>
 			    </widget>
 			    <packing>
 			      <property name="padding">0</property>
@@ -742,7 +744,7 @@
 			  <property name="yalign">0.5</property>
 			  <property name="xpad">0</property>
 			  <property name="ypad">0</property>
-			  <property name="mnemonic_widget">entry7</property>
+			  <property name="mnemonic_widget">entry_table_bg_pixmap</property>
 			</widget>
 			<packing>
 			  <property name="left_attach">0</property>

Modified: branches/mbarnes-composer/components/html-editor/search.c
==============================================================================
--- branches/mbarnes-composer/components/html-editor/search.c	(original)
+++ branches/mbarnes-composer/components/html-editor/search.c	Thu Jan 24 02:22:53 2008
@@ -93,9 +93,9 @@
 	case GTK_RESPONSE_DELETE_EVENT:
 	case GTK_RESPONSE_CLOSE:
 	case GTK_RESPONSE_CANCEL:
+		gtk_widget_grab_focus (GTK_WIDGET (d->cd->html));
 		d->cd->search_dialog = NULL;
 		gtk_html_search_dialog_destroy (d);
-		gtk_widget_grab_focus (GTK_WIDGET (d->cd->html));
 		break;
 	}
 }

Modified: branches/mbarnes-composer/components/html-editor/spellchecker.c
==============================================================================
--- branches/mbarnes-composer/components/html-editor/spellchecker.c	(original)
+++ branches/mbarnes-composer/components/html-editor/spellchecker.c	Thu Jan 24 02:22:53 2008
@@ -212,6 +212,23 @@
 	check_next_word (cd, FALSE, TRUE);
 }
 
+static void 
+replace_all_cb (BonoboListener *listener, const char *event_name, const CORBA_any *arg, CORBA_Environment *ev, gpointer user_data)
+{
+	GtkHTMLControlData *cd = (GtkHTMLControlData *) user_data;
+	const gchar * err_word = NULL;
+
+	err_word = html_engine_get_spell_word (cd->html->engine);
+	g_return_if_fail (err_word);
+
+	html_engine_replace_spell_word_with (cd->html->engine, BONOBO_ARG_GET_STRING (arg)); 
+	while (!next_word (cd, TRUE))	
+		if (!strcmp (err_word, html_engine_get_spell_word (cd->html->engine)))
+			html_engine_replace_spell_word_with (cd->html->engine, BONOBO_ARG_GET_STRING (arg));
+	html_engine_beginning_of_document (cd->html->engine);
+	check_next_word (cd, FALSE, TRUE);
+}
+
 static void
 skip_cb (BonoboListener *listener, const char *event_name, const CORBA_any *arg, CORBA_Environment *ev, gpointer user_data)
 {
@@ -323,6 +340,7 @@
 	bonobo_property_bag_client_set_value_gboolean (cd->spell_control_pb, "single", !whole_document, NULL);
 
 	bonobo_event_source_client_add_listener (cd->spell_control_pb, replace_cb, "Bonobo/Property:change:replace", NULL, cd);
+	bonobo_event_source_client_add_listener (cd->spell_control_pb, replace_all_cb, "Bonobo/Property:change:repall", NULL, cd);
 	bonobo_event_source_client_add_listener (cd->spell_control_pb, add_cb, "Bonobo/Property:change:add", NULL, cd);
 	bonobo_event_source_client_add_listener (cd->spell_control_pb, ignore_cb, "Bonobo/Property:change:ignore", NULL, cd);
 	bonobo_event_source_client_add_listener (cd->spell_control_pb, skip_cb, "Bonobo/Property:change:skip", NULL, cd);

Modified: branches/mbarnes-composer/components/html-editor/table.c
==============================================================================
--- branches/mbarnes-composer/components/html-editor/table.c	(original)
+++ branches/mbarnes-composer/components/html-editor/table.c	Thu Jan 24 02:22:53 2008
@@ -234,6 +234,7 @@
 					     color_group_fetch ("table_bg_color", d->cd));
         gi_color_combo_box_set_preview_relief (GI_COLOR_COMBO (d->combo_bg_color), GTK_RELIEF_NORMAL); \
         g_signal_connect (d->combo_bg_color, "color_changed", G_CALLBACK (changed_bg_color), d);
+        gtk_label_set_mnemonic_widget (GTK_LABEL (glade_xml_get_widget (xml, "label141")), GTK_WIDGET (d->combo_bg_color));
 	gtk_box_pack_start (GTK_BOX (glade_xml_get_widget (xml, "bg_color_hbox")), d->combo_bg_color, FALSE, FALSE, 0);
 
 	d->entry_bg_pixmap = glade_xml_get_widget (xml, "entry_table_bg_pixmap");

Modified: branches/mbarnes-composer/configure.in
==============================================================================
--- branches/mbarnes-composer/configure.in	(original)
+++ branches/mbarnes-composer/configure.in	Thu Jan 24 02:22:53 2008
@@ -36,7 +36,7 @@
 
 AC_DEFINE(BONOBO_DISABLE_DEPRECATED,1,[No deprecated bonobo functions])
 
-AM_INIT_AUTOMAKE($PACKAGE, 3.17.5)
+AM_INIT_AUTOMAKE($PACKAGE, 3.17.90)
 
 AM_MAINTAINER_MODE
 
@@ -118,12 +118,7 @@
 dnl soup for testgtkhtml
 dnl **********************************
 
-PKG_CHECK_MODULES(SOUP, libsoup-2.2 >= 2.1.6, have_soup="yes", have_soup="no")
-if test "x$have_soup" = "xno"; then
-	PKG_CHECK_MODULES(SOUP, soup-2.0 >= 0.7.9, [have_soup="yes"
-						    AC_DEFINE(HAVE_OLD_SOUP)],
-						   have_soup="no")
-fi
+PKG_CHECK_MODULES(SOUP, libsoup-2.4, have_soup="yes", have_soup="no")
 AM_CONDITIONAL(HAVE_SOUP, test x$have_soup != xno)
 AC_SUBST(SOUP_CFLAGS)
 AC_SUBST(SOUP_LIBS)

Modified: branches/mbarnes-composer/gtkhtml-zip.in
==============================================================================
--- branches/mbarnes-composer/gtkhtml-zip.in	(original)
+++ branches/mbarnes-composer/gtkhtml-zip.in	Thu Jan 24 02:22:53 2008
@@ -18,7 +18,11 @@
 share/gtkhtml- GTKHTML_API_VERSION@
 EOF
 
-zip $ZIP lib/locale/*/LC_MESSAGES/gtkhtml- GTKHTML_API_VERSION@.mo
+if [ -f share/locale/de/LC_MESSAGES/gtkhtml- GTKHTML_API_VERSION@.mo ]; then
+  zip $ZIP share/locale/*/LC_MESSAGES/gtkhtml- GTKHTML_API_VERSION@.mo
+else
+  zip $ZIP lib/locale/*/LC_MESSAGES/gtkhtml- GTKHTML_API_VERSION@.mo
+fi
 
 rm $DEVZIP
 zip -r $DEVZIP -@ <<EOF

Modified: branches/mbarnes-composer/gtkhtml/gtkhtml.c
==============================================================================
--- branches/mbarnes-composer/gtkhtml/gtkhtml.c	(original)
+++ branches/mbarnes-composer/gtkhtml/gtkhtml.c	Thu Jan 24 02:22:53 2008
@@ -4287,7 +4287,6 @@
 
 		if (utf8)
 			g_free (utf8);
-		g_object_unref (data);
 
 		return;
 	}

Modified: branches/mbarnes-composer/gtkhtml/htmlframe.c
==============================================================================
--- branches/mbarnes-composer/gtkhtml/htmlframe.c	(original)
+++ branches/mbarnes-composer/gtkhtml/htmlframe.c	Thu Jan 24 02:22:53 2008
@@ -377,6 +377,29 @@
 	HTML_OBJECT_CLASS (parent_class)->destroy (o);
 }
 
+static HTMLAnchor *
+find_anchor (HTMLObject *self, const char *name, gint *x, gint *y)
+{
+	HTMLFrame *frame;
+	HTMLAnchor *anchor;
+
+	g_return_val_if_fail (HTML_IS_FRAME (self), NULL);
+
+	frame = HTML_FRAME (self);
+
+	if (!frame || !frame->html || !GTK_IS_HTML (frame->html) || !GTK_HTML (frame->html)->engine || !GTK_HTML (frame->html)->engine->clue)
+		return NULL;
+
+	anchor = html_object_find_anchor (GTK_HTML (frame->html)->engine->clue, name, x, y);
+
+	if (anchor) {
+		*x += self->x;
+		*y += self->y - self->ascent;
+	}
+
+	return anchor;
+}
+
 void
 html_frame_set_margin_width (HTMLFrame *frame, gint margin_width)
 {
@@ -570,6 +593,7 @@
 	object_class->is_container            = is_container;
 	object_class->append_selection_string = append_selection_string;
 	object_class->select_range            = select_range;
+	object_class->find_anchor             = find_anchor;
 
 	embedded_class->reparent = reparent;
 }

Modified: branches/mbarnes-composer/gtkhtml/htmliframe.c
==============================================================================
--- branches/mbarnes-composer/gtkhtml/htmliframe.c	(original)
+++ branches/mbarnes-composer/gtkhtml/htmliframe.c	Thu Jan 24 02:22:53 2008
@@ -273,6 +273,29 @@
 	return dup;
 }
 
+static HTMLAnchor *
+find_anchor (HTMLObject *self, const char *name, gint *x, gint *y)
+{
+	HTMLIFrame *iframe;
+	HTMLAnchor *anchor;
+
+	g_return_val_if_fail (HTML_IS_IFRAME (self), NULL);
+
+	iframe = HTML_IFRAME (self);
+
+	if (!iframe || !iframe->html || !GTK_IS_HTML (iframe->html) || !GTK_HTML (iframe->html)->engine || !GTK_HTML (iframe->html)->engine->clue)
+		return NULL;
+
+	anchor = html_object_find_anchor (GTK_HTML (iframe->html)->engine->clue, name, x, y);
+
+	if (anchor) {
+		*x += self->x;
+		*y += self->y - self->ascent;
+	}
+
+	return anchor;
+}
+
 void
 html_iframe_set_margin_width (HTMLIFrame *iframe, gint margin_width)
 {
@@ -706,6 +729,7 @@
 	object_class->check_point             = check_point;
 	object_class->is_container            = is_container;
 	object_class->append_selection_string = append_selection_string;
+	object_class->find_anchor             = find_anchor;
 
 	embedded_class->reparent = reparent;
 }

Modified: branches/mbarnes-composer/gtkhtml/testgtkhtml.c
==============================================================================
--- branches/mbarnes-composer/gtkhtml/testgtkhtml.c	(original)
+++ branches/mbarnes-composer/gtkhtml/testgtkhtml.c	Thu Jan 24 02:22:53 2008
@@ -31,6 +31,11 @@
 #include <gtk/gtk.h>
 #include <gtk/gtkbutton.h>
 
+#ifdef G_OS_WIN32
+/* Clashes with objidl.h, which gets included through a chain of includes from libsoup/soup.h */
+#undef DATADIR			
+#endif
+
 #include <libsoup/soup.h>
 #include <sys/stat.h>
 #include <fcntl.h>
@@ -89,13 +94,7 @@
 
 static gchar *parse_href (const gchar *s);
 
-#ifdef HAVE_OLD_SOUP
-#define SOUP_STATUS_IS_SUCCESSFUL SOUP_ERROR_IS_SUCCESSFUL
-#define status_code errorcode
-#define reason_phrase errorphrase
-#else
 static SoupSession *session;
-#endif
 
 static GtkHTML *html;
 static GtkHTMLStream *html_stream_handle = NULL;
@@ -516,11 +515,7 @@
 stop_cb (GtkWidget *widget, gpointer data)
 {
 	/* Kill all requests */
-#ifdef HAVE_OLD_SOUP
-	soup_shutdown ();
-#else
 	soup_session_abort (session);
-#endif
 	html_stream_handle = NULL;
 }
 
@@ -667,7 +662,7 @@
 }
 
 static void
-got_data (SoupMessage *msg, gpointer user_data)
+got_data (SoupSession *session, SoupMessage *msg, gpointer user_data)
 {
 	GtkHTMLStream *handle = user_data;
 
@@ -677,7 +672,8 @@
 		return;
 	}
 
-	gtk_html_write (html, handle, msg->response.body, msg->response.length);
+	gtk_html_write (html, handle, msg->response_body->data,
+			msg->response_body->length);
 	gtk_html_end (html, handle, GTK_HTML_STREAM_OK);
 }
 
@@ -690,17 +686,8 @@
 
 	if (full_url && !strncmp (full_url, "http", 4)) {
 		SoupMessage *msg;
-#ifdef HAVE_OLD_SOUP
-		SoupContext *ctx;
-
-		ctx = soup_context_get (full_url);
-		msg = soup_message_new (ctx, SOUP_METHOD_GET);
-
-		soup_message_queue (msg, got_data, handle);
-#else
 		msg = soup_message_new (SOUP_METHOD_GET, full_url);
 		soup_session_queue_message (session, msg, got_data, handle);
-#endif
 	} else if (full_url && !strncmp (full_url, "file:", 5)) {
 		char *filename = gtk_html_filename_from_uri (full_url);
 		struct stat st;
@@ -851,11 +838,7 @@
 	gchar *full_url;
 
 	/* Kill all requests */
-#ifdef HAVE_OLD_SOUP
-	soup_shutdown ();
-#else
 	soup_session_abort (session);
-#endif
 
 	/* Remove any pending redirection */
 	if(redirect_timerId) {
@@ -1060,9 +1043,7 @@
 
 	gnome_app_set_contents (GNOME_APP (app), scrolled_window);
 
-#ifndef HAVE_OLD_SOUP
 	session = soup_session_async_new ();
-#endif
 
 	html_widget = gtk_html_new ();
 	html = GTK_HTML (html_widget);



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