From: Nickolay V. Shmyrev Date: Sun, 28 Jan 2007 20:48:21 +0000 (+0000) Subject: Don't use markup, just set pango attribute X-Git-Tag: EVINCE_0_7_2~56 X-Git-Url: https://www.fi.muni.cz/~kas/git//home/kas/public_html/git/?a=commitdiff_plain;h=ce6aa52294383602f93b658c5aaca550351120df;p=evince.git Don't use markup, just set pango attribute svn path=/trunk/; revision=2265 --- diff --git a/shell/ev-sidebar-links.c b/shell/ev-sidebar-links.c index 8017f7c6..5d346954 100644 --- a/shell/ev-sidebar-links.c +++ b/shell/ev-sidebar-links.c @@ -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 ("%s", 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; diff --git a/shell/ev-window.c b/shell/ev-window.c index 1680b421..2094b868 100644 --- a/shell/ev-window.c +++ b/shell/ev-window.c @@ -665,7 +665,7 @@ ev_window_find_chapter (GtkTreeModel *tree_model, if (!page_string) return FALSE; - if (!strncmp (page_string + strlen (""), 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);