evolution-rss r180 - in trunk: . m4 pixmaps src



Author: lucilanga
Date: Fri Feb 29 06:14:38 2008
New Revision: 180
URL: http://svn.gnome.org/viewvc/evolution-rss?rev=180&view=rev

Log:
cancel soup sess

Modified:
   trunk/ChangeLog
   trunk/Makefile.in
   trunk/configure.ac
   trunk/m4/gecko.m4
   trunk/pixmaps/Makefile.in
   trunk/src/Makefile.in
   trunk/src/network-soup.c
   trunk/src/rss.c

Modified: trunk/Makefile.in
==============================================================================
--- trunk/Makefile.in	(original)
+++ trunk/Makefile.in	Fri Feb 29 06:14:38 2008
@@ -126,6 +126,7 @@
 GECKO_LIBS = @GECKO_LIBS@
 GECKO_PREFIX = @GECKO_PREFIX@
 GECKO_RPATH = @GECKO_RPATH@
+GECKO_XPCOM = @GECKO_XPCOM@
 GETTEXT = @GETTEXT@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GMOFILES = @GMOFILES@

Modified: trunk/configure.ac
==============================================================================
--- trunk/configure.ac	(original)
+++ trunk/configure.ac	Fri Feb 29 06:14:38 2008
@@ -151,6 +151,7 @@
 AC_SUBST([GECKO_HOME])
 AC_SUBST([GECKO_PREFIX])
 AC_SUBST([GECKO_EXTRA_LIBS])
+AC_SUBST([GECKO_XPCOM])
 
 case "$GECKO" in
 mozilla) gecko_min_version=1.7 ;;
@@ -158,6 +159,7 @@
 *firefox) gecko_min_version=1.0 ;;
 *thunderbird) gecko_min_version=1.0 ;;
 xulrunner) gecko_min_version=1.8 ;;
+libxul*) gecko_min_version=1.9 ;;
 esac
 
 AC_MSG_CHECKING([whether to include Gecko support])
@@ -168,7 +170,7 @@
 
 if test "$enable_gecko" = "yes"; then
 	if test "x$have_gecko" != "xno"; then
-	PKG_CHECK_MODULES([GECKO],[$GECKO_EXTRA_PKG_DEPENDENCIES $GECKO-xpcom >= $gecko_min_version], [], [have_gecko=no])
+	PKG_CHECK_MODULES([GECKO],[$GECKO_EXTRA_PKG_DEPENDENCIES $GECKO_XPCOM >= $gecko_min_version], [], [have_gecko=no])
 	AC_SUBST([GECKO_CFLAGS])
 	AC_SUBST([GECKO_LIBS])
 

Modified: trunk/m4/gecko.m4
==============================================================================
--- trunk/m4/gecko.m4	(original)
+++ trunk/m4/gecko.m4	Fri Feb 29 06:14:38 2008
@@ -51,22 +51,32 @@
 AC_MSG_CHECKING([which gecko to use])
 
 AC_ARG_WITH([gecko],
-	AS_HELP_STRING([--with-gecko@<:@=mozilla|firefox|seamonkey|xulrunner@:>@],
+	AS_HELP_STRING([--with-gecko@<:@=mozilla|firefox|seamonkey|xulrunner|libxul@:>@],
 		       [Which gecko engine to use (autodetected by default)]))
 
 # Backward compat
 AC_ARG_WITH([mozilla],[],[with_gecko=$withval],[])
 
 gecko_cv_gecko=$with_gecko
+if $PKG_CONFIG --exists $with_gecko-xpcom; then
+	gecko_cv_gecko_xpcom=$with_gecko-xpcom
+else
+	gecko_cv_gecko_xpcom=$with_gecko
+fi
 
 # Autodetect gecko
-_geckos="xulrunner firefox mozilla-firefox seamonkey mozilla"
+_geckos="xulrunner firefox mozilla-firefox seamonkey mozilla libxul"
 if test -z "$gecko_cv_gecko"; then
 	for lizard in $_geckos; do
 		if $PKG_CONFIG --exists $lizard-xpcom; then
 			gecko_cv_gecko=$lizard
+			gecko_cv_gecko_xpcom=$lizard-xpcom
 			break;
-		fi
+		elif $PKG_CONFIG --exists $lizard; then
+			gecko_cv_gecko=$lizard
+			gecko_cv_gecko_xpcom=$lizard
+			break;			
+		fi		
 	done
 fi
 
@@ -93,12 +103,13 @@
 seamonkey) gecko_cv_gecko_flavour=mozilla ;;
 *firefox) gecko_cv_gecko_flavour=toolkit ;;
 xulrunner) gecko_cv_gecko_flavour=toolkit ;;
+libxul*) gecko_cv_gecko_flavour=toolkit ;;
 esac
 
-_GECKO_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir ${gecko_cv_gecko}-xpcom`"
-_GECKO_LIBDIR="`$PKG_CONFIG --variable=libdir ${gecko_cv_gecko}-xpcom`"
-_GECKO_HOME="`$PKG_CONFIG --variable=libdir ${gecko_cv_gecko}-xpcom`"
-_GECKO_PREFIX="`$PKG_CONFIG --variable=prefix ${gecko_cv_gecko}-xpcom`"
+_GECKO_INCLUDE_ROOT="`$PKG_CONFIG --variable=includedir ${gecko_cv_gecko_xpcom}`"
+_GECKO_LIBDIR="`$PKG_CONFIG --variable=libdir ${gecko_cv_gecko_xpcom}`"
+_GECKO_HOME="`$PKG_CONFIG --variable=libdir ${gecko_cv_gecko_xpcom}`"
+_GECKO_PREFIX="`$PKG_CONFIG --variable=prefix ${gecko_cv_gecko_xpcom}`"
 
 fi # if gecko_cv_have_gecko
 
@@ -114,6 +125,7 @@
 $1[]_LIBDIR=$_GECKO_LIBDIR
 $1[]_HOME=$_GECKO_HOME
 $1[]_PREFIX=$_GECKO_PREFIX
+$1[]_XPCOM=$gecko_cv_gecko_xpcom
 
 # **************************************************************
 # This is really gcc-only
@@ -359,10 +371,10 @@
 _SAVE_CXXFLAGS="$CXXFLAGS"
 _SAVE_LDFLAGS="$LDFLAGS"
 _SAVE_LIBS="$LIBS"
-CPPFLAGS="$CPPFLAGS $_GECKO_EXTRA_CPPFLAGS -I$_GECKO_INCLUDE_ROOT $($PKG_CONFIG --cflags-only-I ${gecko_cv_gecko}-xpcom)"
-CXXFLAGS="$CXXFLAGS $_GECKO_EXTRA_CXXFLAGS $($PKG_CONFIG --cflags-only-other ${gecko_cv_gecko}-xpcom)"
+CPPFLAGS="$CPPFLAGS $_GECKO_EXTRA_CPPFLAGS -I$_GECKO_INCLUDE_ROOT $($PKG_CONFIG --cflags-only-I ${gecko_cv_gecko_xpcom})"
+CXXFLAGS="$CXXFLAGS $_GECKO_EXTRA_CXXFLAGS $($PKG_CONFIG --cflags-only-other ${gecko_cv_gecko_xpcom})"
 LDFLAGS="$LDFLAGS $_GECKO_EXTRA_LDFLAGS -Wl,--rpath=$_GECKO_HOME"
-LIBS="$LIBS $($PKG_CONFIG --libs ${gecko_cv_gecko}-xpcom)"
+LIBS="$LIBS $($PKG_CONFIG --libs ${gecko_cv_gecko_xpcom})"
 
 _GECKO_DISPATCH_INCLUDEDIRS="$2"
 
@@ -595,11 +607,11 @@
 AC_DEFUN([GECKO_XPIDL],
 [AC_REQUIRE([GECKO_INIT])dnl
 
-_GECKO_LIBDIR="`$PKG_CONFIG --variable=libdir ${gecko_cv_gecko}-xpcom`"
+_GECKO_LIBDIR="`$PKG_CONFIG --variable=libdir ${gecko_cv_gecko_xpcom}`"
 
 AC_PATH_PROG([XPIDL],[xpidl],[no],[$_GECKO_LIBDIR:$PATH])
 
-XPIDL_IDLDIR="`$PKG_CONFIG --variable=idldir ${gecko_cv_gecko}-xpcom`"
+XPIDL_IDLDIR="`$PKG_CONFIG --variable=idldir ${gecko_cv_gecko_xpcom}`"
 
 # Older geckos don't have this variable, see
 # https://bugzilla.mozilla.org/show_bug.cgi?id=240473

Modified: trunk/pixmaps/Makefile.in
==============================================================================
--- trunk/pixmaps/Makefile.in	(original)
+++ trunk/pixmaps/Makefile.in	Fri Feb 29 06:14:38 2008
@@ -108,6 +108,7 @@
 GECKO_LIBS = @GECKO_LIBS@
 GECKO_PREFIX = @GECKO_PREFIX@
 GECKO_RPATH = @GECKO_RPATH@
+GECKO_XPCOM = @GECKO_XPCOM@
 GETTEXT = @GETTEXT@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GMOFILES = @GMOFILES@

Modified: trunk/src/Makefile.in
==============================================================================
--- trunk/src/Makefile.in	(original)
+++ trunk/src/Makefile.in	Fri Feb 29 06:14:38 2008
@@ -153,6 +153,7 @@
 GECKO_LIBS = @GECKO_LIBS@
 GECKO_PREFIX = @GECKO_PREFIX@
 GECKO_RPATH = @GECKO_RPATH@
+GECKO_XPCOM = @GECKO_XPCOM@
 GETTEXT = @GETTEXT@
 GETTEXT_PACKAGE = @GETTEXT_PACKAGE@
 GMOFILES = @GMOFILES@

Modified: trunk/src/network-soup.c
==============================================================================
--- trunk/src/network-soup.c	(original)
+++ trunk/src/network-soup.c	Fri Feb 29 06:14:38 2008
@@ -153,14 +153,13 @@
 static void
 unblock_free (gpointer user_data, GObject *ex_msg)
 {
-	g_print("weak ref - trying to free object\n");
 #ifdef RSS_DEBUG
 	g_print("weak ref - trying to free object\n");
 #endif
 	g_hash_table_remove(rf->session, user_data);
-//	g_hash_table_destroy(rf->abort_session);
-//	rf->abort_session = g_hash_table_new(g_direct_hash, g_direct_equal);
-//	g_hash_table_foreach(rf->session, construct_abort, NULL);
+	g_hash_table_destroy(rf->abort_session);
+	rf->abort_session = g_hash_table_new(g_direct_hash, g_direct_equal);
+	g_hash_table_foreach(rf->session, construct_abort, NULL);
 	g_hash_table_find(rf->key_session,
 		remove_if_match,
 		user_data);
@@ -427,7 +426,7 @@
 		return -1;
 	}
 	g_hash_table_insert(rf->session, soup_sess, msg);
-//	g_hash_table_insert(rf->abort_session, soup_sess, msg);
+	g_hash_table_insert(rf->abort_session, soup_sess, msg);
 	g_hash_table_insert(rf->key_session, data, soup_sess);
 
 	gchar *agstr = g_strdup_printf("Evolution/%s; Evolution-RSS/%s",
@@ -448,7 +447,7 @@
            cb2, cbdata2);
 
 ////	g_object_add_weak_pointer (G_OBJECT(msg), (gpointer)info);
-////	g_object_weak_ref (G_OBJECT(msg), unblock_free, soup_sess);
+	g_object_weak_ref (G_OBJECT(msg), unblock_free, soup_sess);
 //	g_object_weak_ref (G_OBJECT(soup_sess), unblock_free, soup_sess);
 //	GMainLoop *mainloop = g_main_loop_new (g_main_context_default (), FALSE);
   //	g_timeout_add (10 * 1000, &conn_mainloop_quit, mainloop);

Modified: trunk/src/rss.c
==============================================================================
--- trunk/src/rss.c	(original)
+++ trunk/src/rss.c	Fri Feb 29 06:14:38 2008
@@ -418,7 +418,7 @@
         	else
                         tmsg = g_strdup_printf("Fetching %s: %s", 
                         type, data);
-/*cancel*/	taskbar_op_set_progress(data, tmsg, (gdouble)fraction);
+		taskbar_op_set_progress(data, tmsg, (gdouble)fraction);
 		g_free(tmsg);
         }
         break;
@@ -604,7 +604,7 @@
                 	remove_if_match,
                 	user_data);
 	}
-	return FALSE;
+	return TRUE;
 }
 void
 remove_weak(gpointer key, gpointer value, gpointer user_data)
@@ -616,17 +616,14 @@
 abort_all_soup(void)
 {
 	//abort all session
-//	if (rf->abort_session)
-//	{
-//		g_hash_table_foreach(rf->abort_session, remove_weak, NULL);
-//		g_hash_table_foreach_remove(rf->abort_session, cancel_soup_sess, NULL);
+	if (rf->abort_session)
+	{
+		g_hash_table_foreach(rf->abort_session, remove_weak, NULL);
+		g_hash_table_foreach_remove(rf->abort_session, cancel_soup_sess, NULL);
 //		g_hash_table_foreach(rf->abort_session, cancel_soup_sess, NULL);
-		g_hash_table_foreach(rf->session, cancel_soup_sess, NULL);
 		g_hash_table_destroy(rf->session);
                 rf->session = g_hash_table_new(g_direct_hash, g_direct_equal);
-		g_print("purdup\n");
-		return;
-//	}
+	}
 	if (rf->progress_bar)
 	{
 		gtk_progress_bar_set_fraction((GtkProgressBar *)rf->progress_bar, 1);
@@ -679,7 +676,6 @@
                 gtk_widget_set_sensitive(info->cancel_button, FALSE);
 
 //	abort_all_soup();
-	g_print("\nCancel reading feeds\n");
 }
 
 gchar *
@@ -2236,6 +2232,8 @@
 finish_feed (SoupSession *soup_sess, SoupMessage *msg, gpointer user_data)
 #endif
 {
+	g_print("key:%s\n", user_data);
+	g_print("key:%p\n", user_data);
 	GError *err = NULL;
 	gchar *chn_name = NULL;
 	//FIXME user_data might be out of bounds here
@@ -2289,6 +2287,7 @@
         	goto out;
     	}
 
+	g_print("here1\n");
 	if (rf->cancel)
 	{
 #ifdef EVOLUTION_2_12
@@ -2422,7 +2421,9 @@
 	if (user_data)
 	{
 //		taskbar_op_finish(user_data);
-//		g_free(user_data);
+		g_print("g_free(%s)", user_data);
+		g_free(user_data);
+		g_print("g_free(%p)\n", user_data);
 	}
 	return;
 }
@@ -2468,13 +2469,13 @@
 
 		g_free(tmsg);
 		g_hash_table_insert(rf->activity, key, GUINT_TO_POINTER(activity_id));
-
+		g_print("fetch key:%s\n", key);
 		net_get_unblocking(
 				g_hash_table_lookup(rf->hr, lookup_key(key)),
 				user_data,
 				key,
 				(gpointer)finish_feed,
-				g_strdup(key),		// we need to dupe key here
+				g_strdup(key),	// we need to dupe key here
 				&err);			// because we might lose it if
 							// feed gets deleted
 		if (err)
@@ -4187,9 +4188,3 @@
 fail:	g_free(real_name);
 }
 
-void
-check_feed_age(void)
-{
-//	g_hash_table_foreach(rf->hrname, get_feed_age);	
-}
-



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