[pan2/rss: 2/2] intermediate



commit d4960287145825803904f5454d2a482641d7ebfe
Author: Heinrich Müller <henmull src gnome org>
Date:   Sat Jun 1 21:49:23 2013 +0200

    intermediate

 configure.in         |    6 +++++-
 pan/gui/Makefile.am  |    4 ++--
 pan/gui/task-pane.cc |   25 +++++++++++++++++++++++++
 3 files changed, 32 insertions(+), 3 deletions(-)
---
diff --git a/configure.in b/configure.in
index 6b038f0..c4ad573 100644
--- a/configure.in
+++ b/configure.in
@@ -54,6 +54,8 @@ GNUTLS_REQUIRED=3.0.0
 LIBNOTIFY_REQUIRED=0.4.1
 LIBGKR_REQUIRED=3.2.0
 WEBKIT_REQUIRED=1.8.1
+LIBGRSS_REQUIRED=0.5.0
+AC_SUBST(LIBGRSS_REQUIRED)
 AC_SUBST(GLIB_REQUIRED)
 AC_SUBST(GLIB_REQUIRED_FOR_DBUS)
 AC_SUBST(GMIME_REQUIRED)
@@ -91,6 +93,9 @@ PKG_CHECK_MODULES([ZLIB], [zlib >= 1.2.0],AC_DEFINE(HAVE_ZLIB,[1],[Zlib for xzve
 AC_SUBST(ZLIB_CFLAGS)
 AC_SUBST(ZLIB_LIBS)
 
+dnl rss feed support for nzbindex
+PKG_CHECK_MODULES([GRSS],[libgrss-0.5 >= $LIBGRSS_REQUIRED],[AC_DEFINE(HAVE_RSS,[1],[RSS 
support])],[AC_MSG_RESULT(no)])
+
 dnl D-Bus support
 AC_ARG_WITH(dbus, AS_HELP_STRING([--with-dbus],[enable D-Bus support (normally: no)]), [want_dbus=$withval], 
[want_dbus=no])
 if test "x$want_dbus" = "xyes" ; then
@@ -308,5 +313,4 @@ Configuration:
         With GtkSpell:          ${gtkspell_msg}
         With GTK+ 3             ${gtk_msg}
         With GnuTLS:            ${gnutls_msg}
-
 "
diff --git a/pan/gui/Makefile.am b/pan/gui/Makefile.am
index 135a075..72f0fd8 100644
--- a/pan/gui/Makefile.am
+++ b/pan/gui/Makefile.am
@@ -1,5 +1,5 @@
 AM_CPPFLAGS = -I top_srcdir@ @GTKSPELL_CFLAGS@ @ENCHANT_CFLAGS@ @GTK_CFLAGS@ @GMIME_CFLAGS@ @GLIB_CFLAGS@ \
-       @GNUTLS_CFLAGS@ @LIBNOTIFY_CFLAGS@ @LIBGNOME_KEYRING_1_CFLAGS@ @WEBKITGTK_CFLAGS 
-DPANLOCALEDIR=\""$(panlocaledir)"\" @ZLIB_CFLAGS@
+       @GNUTLS_CFLAGS@ @LIBNOTIFY_CFLAGS@ @LIBGNOME_KEYRING_1_CFLAGS@ @WEBKITGTK_CFLAGS 
-DPANLOCALEDIR=\""$(panlocaledir)"\" @ZLIB_CFLAGS@ @GRSS_CFLAGS@
 
 noinst_LIBRARIES = libpangui.a
 
@@ -106,7 +106,7 @@ endif
 
 pan_SOURCES = gui.cc pan.cc $(WINRC)
 pan_LDADD = ./libpangui.a $(WINRCOBJ) ../data-impl/libpandata.a ../tasks/libtasks.a ../data/libdata.a 
../usenet-utils/libusenetutils.a ../general/libgeneralutils.a ../../uulib/libuu.a \
-               @GTKSPELL_LIBS@ @ENCHANT_LIBS@ @GTK_LIBS@ @GMIME_LIBS@ @GLIB_LIBS@ @GNUTLS_LIBS@ 
@LIBNOTIFY_LIBS@ @LIBGNOME_KEYRING_1_LIBS@ @WEBKITGTK_LIBS@ @ZLIB_LIBS@
+               @GTKSPELL_LIBS@ @ENCHANT_LIBS@ @GTK_LIBS@ @GMIME_LIBS@ @GLIB_LIBS@ @GNUTLS_LIBS@ 
@LIBNOTIFY_LIBS@ @LIBGNOME_KEYRING_1_LIBS@ @WEBKITGTK_LIBS@ @ZLIB_LIBS@ @GRSS_LIBS@
 if HAVE_WIN32
 pan_LDFLAGS = -mwindows
 endif
diff --git a/pan/gui/task-pane.cc b/pan/gui/task-pane.cc
index b2550d3..c8ab299 100644
--- a/pan/gui/task-pane.cc
+++ b/pan/gui/task-pane.cc
@@ -36,6 +36,8 @@ extern "C" {
 #include "task-pane.h"
 #include "taskpane.ui.h"
 
+#include <libgrss.h>
+
 enum
 {
   COL_TASK_POINTER,
@@ -43,6 +45,25 @@ enum
   NUM_COLS
 };
 
+namespace
+{
+  GrssFeedChannel *feed(0);
+
+  void init_feed()
+  {
+    feed = grss_feed_channel_new();
+    grss_feed_channel_set_update_interval (feed, 3);
+    GList* list = grss_feed_channel_fetch_all (feed, 0);
+
+    GList *iter;
+    for (iter = list; iter; iter = g_list_next (iter))
+    {
+        std::cerr<<"list entry "<<iter->data<<"\n";
+    }
+
+  }
+}
+
 /**
 ***  Internal Utility
 **/
@@ -50,6 +71,7 @@ enum
 void
 TaskPane :: get_selected_tasks_foreach (GtkTreeModel *model, GtkTreePath *, GtkTreeIter *iter, gpointer 
list_g)
 {
+
   Task * task (0);
   gtk_tree_model_get (model, iter, COL_TASK_POINTER, &task, -1);
   static_cast<tasks_t*>(list_g)->push_back (task);
@@ -1015,6 +1037,9 @@ TaskPane :: TaskPane (Queue& queue, Prefs& prefs): _queue(queue), _prefs(prefs)
 {
   _root = gtk_window_new (GTK_WINDOW_TOPLEVEL);
 
+  //DBG!!
+  init_feed();
+
   GtkWidget * w;
 
   GtkWidget * vbox = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);


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