(no commit message)
authorJean-Philippe Orsini <jeanfi@gmail.com>
Sun, 28 Apr 2013 11:41:27 +0000 (11:41 +0000)
committerJean-Philippe Orsini <jeanfi@gmail.com>
Sun, 28 Apr 2013 11:41:27 +0000 (11:41 +0000)
src/glade/prss.glade
src/log.c
src/main.c

index 6bbbd31..525ffdc 100644 (file)
@@ -5,7 +5,7 @@
     <property name="label" translatable="yes">Refresh</property>
     <property name="stock_id">gtk-refresh</property>
   </object>
-  <object class="GtkListStore" id="headline_store">
+  <object class="GtkListStore" id="feed_store">
     <columns>
       <!-- column-name gchararray1 -->
       <column type="gchararray"/>
@@ -13,7 +13,7 @@
       <column type="gint"/>
     </columns>
   </object>
-  <object class="GtkListStore" id="feed_store">
+  <object class="GtkListStore" id="headline_store">
     <columns>
       <!-- column-name gchararray1 -->
       <column type="gchararray"/>
                   </packing>
                 </child>
                 <child>
-                  <object class="GtkScrolledWindow" id="webkit_window">
+                  <object class="GtkBox" id="box2">
                     <property name="visible">True</property>
-                    <property name="can_focus">True</property>
-                    <property name="shadow_type">in</property>
+                    <property name="can_focus">False</property>
+                    <property name="orientation">vertical</property>
                     <child>
-                      <placeholder/>
+                      <object class="GtkGrid" id="grid3">
+                        <property name="visible">True</property>
+                        <property name="can_focus">False</property>
+                        <child>
+                          <object class="GtkLabel" id="headline_title">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="xalign">0</property>
+                            <property name="label" translatable="yes">BBBBBBBB</property>
+                            <property name="single_line_mode">True</property>
+                            <attributes>
+                              <attribute name="weight" value="bold"/>
+                              <attribute name="scale" value="1.5"/>
+                            </attributes>
+                          </object>
+                          <packing>
+                            <property name="left_attach">0</property>
+                            <property name="top_attach">0</property>
+                            <property name="width">1</property>
+                            <property name="height">1</property>
+                          </packing>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">False</property>
+                        <property name="fill">True</property>
+                        <property name="position">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkScrolledWindow" id="webkit_window">
+                        <property name="visible">True</property>
+                        <property name="can_focus">True</property>
+                        <property name="shadow_type">in</property>
+                        <child>
+                          <placeholder/>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="expand">True</property>
+                        <property name="fill">True</property>
+                        <property name="position">1</property>
+                      </packing>
                     </child>
                   </object>
                   <packing>
index f5185d3..b4cd3c2 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -48,7 +48,7 @@ void log_close()
 }
 
 
-#define LOG_BUFFER 128
+#define LOG_BUFFER 512
 static void vlogf(int lvl, const char *fmt, va_list ap)
 {
        struct timeval tv;
index bb67679..67ea46b 100644 (file)
@@ -39,6 +39,7 @@ static const char *program_name;
 static GSettings *settings;
 
 static GtkPaned *w_panel;
+static GtkLabel *w_headline_title;
 
 static int model_state;
 
@@ -326,7 +327,7 @@ int headline_cursor_changed_cbk(GtkTreeView *treeview, gpointer data)
        GtkTreeIter iter;
        GtkTreeModel *model;
        struct headline *headline;
-       char *str, *tmp;
+       char *str;
 
        log_debug("headline_cursor_changed_cbk()");
 
@@ -336,17 +337,13 @@ int headline_cursor_changed_cbk(GtkTreeView *treeview, gpointer data)
        headline = get_selected_headline(&iter);
 
        if (headline) {
-               tmp = ttrss_get_headline_content(headline);
+               gtk_label_set_text(w_headline_title, headline->title);
 
-               if (tmp) {
-                       str = g_strdup_printf("<h1><a href='%s'>%s</a></h1>%s",
-                                             headline->url,
-                                             headline->title,
-                                             tmp);
-                       free(tmp);
+               str = ttrss_get_headline_content(headline);
 
+               if (str) {
                        web_load(str);
-                       g_free(str);
+                       free(str);
                } else {
                        web_load("");
                }
@@ -359,7 +356,7 @@ int headline_cursor_changed_cbk(GtkTreeView *treeview, gpointer data)
                model = gtk_tree_view_get_model(w_headlinetree);
                gtk_list_store_set(GTK_LIST_STORE(model),
                                   &iter,
-                                  0, headline->title,
+                                  COL_HEADLINE_TITLE, headline->title,
                                   -1);
        } else {
                log_debug("headline not found");
@@ -527,6 +524,8 @@ int main(int argc, char **argv)
                                                              "headline_tree"));
 
        w_panel = GTK_PANED(gtk_builder_get_object(builder, "paned2"));
+       w_headline_title
+               = GTK_LABEL(gtk_builder_get_object(builder, "headline_title"));
 
        gtk_builder_connect_signals(builder, NULL);