~ubuntu-desktop/evince/ubuntu

« back to all changes in this revision

Viewing changes to debian/patches/git_sidebar_label.patch

  • Committer: Jeremy Bicha
  • Date: 2016-08-07 22:26:40 UTC
  • Revision ID: jbicha@ubuntu.com-20160807222640-r56bbj5k0na1mz2o
* Merge with Debian 3.20.1-1
* Build-depend on dh-translations and run dh --with translations
* Don't break/replace apparmor-profiles-extra << 1.7.
  Ubuntu's version didn't ship the evince profile but more importantly,
  apparmor-profiles-extra 1.7 isn't in Ubuntu yet
* debian/patches/traditional_menu_bar.patch:
  - Refreshed and re-enabled F1 keyboard shortcut for help (LP: #1610742)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
From f48fcaf6af09ebd24e325b78758f875e381c86db Mon Sep 17 00:00:00 2001
2
 
From: =?UTF-8?q?Germ=C3=A1n=20Poo-Caama=C3=B1o?= <gpoo@gnome.org>
3
 
Date: Fri, 16 Oct 2015 08:24:38 -0700
4
 
Subject: find-sidebar: show the page label instead of page number. Fixes
5
 
 756683
6
 
 
7
 
---
8
 
 shell/ev-find-sidebar.c | 10 ++++++++--
9
 
 1 file changed, 8 insertions(+), 2 deletions(-)
10
 
 
11
 
diff --git a/shell/ev-find-sidebar.c b/shell/ev-find-sidebar.c
12
 
index b700e06..cc18fb1 100644
13
 
--- a/shell/ev-find-sidebar.c
14
 
+++ b/shell/ev-find-sidebar.c
15
 
@@ -43,6 +43,7 @@ struct _EvFindSidebarPrivate {
16
 
 
17
 
 enum {
18
 
         TEXT_COLUMN,
19
 
+       PAGE_LABEL_COLUMN,
20
 
         PAGE_COLUMN,
21
 
         RESULT_COLUMN,
22
 
 
23
 
@@ -174,7 +175,7 @@ ev_find_sidebar_reset_model (EvFindSidebar *sidebar)
24
 
 {
25
 
         GtkListStore *model;
26
 
 
27
 
-        model = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT);
28
 
+        model = gtk_list_store_new (N_COLUMNS, G_TYPE_STRING, G_TYPE_STRING, G_TYPE_INT, G_TYPE_INT);
29
 
         gtk_tree_view_set_model (GTK_TREE_VIEW (sidebar->priv->tree_view),
30
 
                                  GTK_TREE_MODEL (model));
31
 
         g_object_unref (model);
32
 
@@ -223,7 +224,7 @@ ev_find_sidebar_init (EvFindSidebar *sidebar)
33
 
         renderer = gtk_cell_renderer_text_new ();
34
 
         gtk_tree_view_column_pack_end (GTK_TREE_VIEW_COLUMN (column), renderer, FALSE);
35
 
         gtk_tree_view_column_set_attributes (GTK_TREE_VIEW_COLUMN (column), renderer,
36
 
-                                             "text", PAGE_COLUMN,
37
 
+                                             "text", PAGE_LABEL_COLUMN,
38
 
                                              NULL);
39
 
         g_object_set (G_OBJECT (renderer), "style", PANGO_STYLE_ITALIC, NULL);
40
 
 
41
 
@@ -458,6 +459,7 @@ process_matches_idle (EvFindSidebar *sidebar)
42
 
                 GList        *matches, *l;
43
 
                 EvPage       *page;
44
 
                 gint          result;
45
 
+                gchar        *page_label;
46
 
                 gchar        *page_text;
47
 
                 EvRectangle  *areas = NULL;
48
 
                 guint         n_areas;
49
 
@@ -473,6 +475,7 @@ process_matches_idle (EvFindSidebar *sidebar)
50
 
                         continue;
51
 
 
52
 
                 page = ev_document_get_page (document, current_page);
53
 
+               page_label = ev_document_get_page_label (document, current_page);
54
 
                 page_text = get_page_text (document, page, &areas, &n_areas);
55
 
                 g_object_unref (page);
56
 
                 if (!page_text)
57
 
@@ -513,14 +516,17 @@ process_matches_idle (EvFindSidebar *sidebar)
58
 
                                                               text_log_attrs,
59
 
                                                               text_log_attrs_length,
60
 
                                                               offset);
61
 
+
62
 
                         gtk_list_store_set (GTK_LIST_STORE (model), &iter,
63
 
                                             TEXT_COLUMN, markup,
64
 
+                                           PAGE_LABEL_COLUMN, page_label,
65
 
                                             PAGE_COLUMN, current_page + 1,
66
 
                                             RESULT_COLUMN, result,
67
 
                                             -1);
68
 
                         g_free (markup);
69
 
                 }
70
 
 
71
 
+                g_free (page_label);
72
 
                 g_free (page_text);
73
 
                 g_free (text_log_attrs);
74
 
                 g_free (areas);
75
 
cgit v0.11.2
76