gtkhtml r8691 - in trunk: . components/html-editor gtkhtml
- From: danw svn gnome org
- To: svn-commits-list gnome org
- Subject: gtkhtml r8691 - in trunk: . components/html-editor gtkhtml
- Date: Thu, 17 Jan 2008 14:58:57 +0000 (GMT)
Author: danw
Date: Thu Jan 17 14:58:57 2008
New Revision: 8691
URL: http://svn.gnome.org/viewvc/gtkhtml?rev=8691&view=rev
Log:
* configure.in: Update to check for libsoup 2.4 rather than 2.2.
Remove ancient fallback support for libsoup 2.0.
Modified:
trunk/ChangeLog
trunk/components/html-editor/ChangeLog
trunk/components/html-editor/Makefile.am
trunk/configure.in
trunk/gtkhtml/ChangeLog
trunk/gtkhtml/testgtkhtml.c
Modified: trunk/components/html-editor/Makefile.am
==============================================================================
--- trunk/components/html-editor/Makefile.am (original)
+++ trunk/components/html-editor/Makefile.am Thu Jan 17 14:58:57 2008
@@ -16,7 +16,6 @@
-I$(srcdir) \
-I$(includedir) \
$(GTKHTML_CFLAGS) \
- $(SOUP_CFLAGS) \
$(EDITOR_I18N_CFLAGS) \
-DG_LOG_DOMAIN=\"gtkhtml\" \
-DSRCDIR=\"$(srcdir)\" \
Modified: trunk/configure.in
==============================================================================
--- trunk/configure.in (original)
+++ trunk/configure.in Thu Jan 17 14:58:57 2008
@@ -102,12 +102,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: trunk/gtkhtml/testgtkhtml.c
==============================================================================
--- trunk/gtkhtml/testgtkhtml.c (original)
+++ trunk/gtkhtml/testgtkhtml.c Thu Jan 17 14:58:57 2008
@@ -89,13 +89,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 +510,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 +657,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 +667,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 +681,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 +833,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 +1038,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]