]> www.fi.muni.cz Git - evince.git/commitdiff
Don't use markup, just set pango attribute
authorNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sun, 28 Jan 2007 20:48:21 +0000 (20:48 +0000)
committerNickolay V. Shmyrev <nshmyrev@src.gnome.org>
Sun, 28 Jan 2007 20:48:21 +0000 (20:48 +0000)
svn path=/trunk/; revision=2265

shell/ev-sidebar-links.c
shell/ev-window.c

index 8017f7c605b071aae21054bdf59c7d5bf2d5c240..5d3469543e12bb49030165b8c7a76a6208c60c50 100644 (file)
@@ -437,8 +437,9 @@ ev_sidebar_links_construct (EvSidebarLinks *ev_sidebar_links)
        renderer = gtk_cell_renderer_text_new ();
        gtk_tree_view_column_pack_end (GTK_TREE_VIEW_COLUMN (column), renderer, FALSE);
        gtk_tree_view_column_set_attributes (GTK_TREE_VIEW_COLUMN (column), renderer,
-                                            "markup", EV_DOCUMENT_LINKS_COLUMN_PAGE_LABEL,
+                                            "text", EV_DOCUMENT_LINKS_COLUMN_PAGE_LABEL,
                                             NULL);
+       g_object_set (G_OBJECT (renderer), "style", PANGO_STYLE_ITALIC, NULL);
 
        g_signal_connect (GTK_TREE_VIEW (priv->tree_view),
                          "button_press_event",
@@ -467,8 +468,6 @@ fill_page_labels (GtkTreeModel *tree_model,
        EvLink *link;
        gint page;
        gchar *page_label;
-       gchar *page_string;
-
 
        gtk_tree_model_get (tree_model, iter,
                            EV_DOCUMENT_LINKS_COLUMN_LINK, &link,
@@ -484,14 +483,11 @@ fill_page_labels (GtkTreeModel *tree_model,
        
        page_label = ev_page_cache_get_page_label (sidebar_links->priv->page_cache,
                                                   page);
-       page_string = g_markup_printf_escaped ("<i>%s</i>", page_label);
-               
        gtk_tree_store_set (GTK_TREE_STORE (tree_model), iter,
-                           EV_DOCUMENT_LINKS_COLUMN_PAGE_LABEL, page_string
-                             -1);
+                           EV_DOCUMENT_LINKS_COLUMN_PAGE_LABEL, page_label
+                           -1);
 
        g_free (page_label);
-       g_free (page_string);
 
        g_object_unref (link);
        return FALSE;
index 1680b4218932747079d2823b1d6e41a98ef3dfc1..2094b868757d94abf6ee3e4061b52ce5233b6d98 100644 (file)
@@ -665,7 +665,7 @@ ev_window_find_chapter (GtkTreeModel *tree_model,
     if (!page_string)
            return FALSE;
            
-    if (!strncmp (page_string + strlen ("<i>"), task->page_label, strlen (task->page_label))) {
+    if (!strcmp (page_string, task->page_label)) {
            gtk_tree_model_get (tree_model, iter,
                                EV_DOCUMENT_LINKS_COLUMN_MARKUP, &task->chapter, 
                                -1);