~ubuntu-branches/ubuntu/oneiric/evince/oneiric-updates

« back to all changes in this revision

Viewing changes to libdocument/ev-render-context.c

  • Committer: Bazaar Package Importer
  • Author(s): Josselin Mouette, Josselin Mouette, Marc 'HE' Brockschmidt
  • Date: 2008-12-31 16:41:58 UTC
  • mfrom: (1.1.36 upstream)
  • mto: (1.5.1 sid)
  • mto: This revision was merged to the branch mainline in revision 109.
  • Revision ID: james.westby@ubuntu.com-20081231164158-xnobl1sokvvc6ho8
Tags: 2.24.2-1
[ Josselin Mouette ]
* README.Debian: document that you need to install poppler-data.
  Closes: #506836.

[ Marc 'HE' Brockschmidt ]
* debian/control: Make the Gnome team maintainer. I'm not doing the job
   anyway.

[ Josselin Mouette ]
* New upstream release.
* Require nautilus 2.22 to build the extension for the correct 
  version.

Show diffs side-by-side

added added

removed removed

Lines of Context:
35
35
 
36
36
        rc = (EvRenderContext *) object;
37
37
 
38
 
        if (rc->destroy) {
39
 
                (*rc->destroy) (rc->data);
40
 
                rc->destroy = NULL;
 
38
        if (rc->page) {
 
39
                g_object_unref (rc->page);
 
40
                rc->page = NULL;
41
41
        }
42
42
 
43
43
        (* G_OBJECT_CLASS (ev_render_context_parent_class)->dispose) (object);
53
53
        oclass->dispose = ev_render_context_dispose;
54
54
}
55
55
 
56
 
 
57
56
EvRenderContext *
58
 
ev_render_context_new (int           rotation,
59
 
                       gint          page,
60
 
                       gdouble       scale)
 
57
ev_render_context_new (EvPage *page,
 
58
                       gint    rotation,
 
59
                       gdouble scale)
61
60
{
62
61
        EvRenderContext *rc;
63
62
 
64
63
        rc = (EvRenderContext *) g_object_new (EV_TYPE_RENDER_CONTEXT, NULL);
65
64
 
 
65
        rc->page = page ? g_object_ref (page) : NULL;
66
66
        rc->rotation = rotation;
67
 
        rc->page = page;
68
67
        rc->scale = scale;
69
68
 
70
69
        return rc;
72
71
 
73
72
void
74
73
ev_render_context_set_page (EvRenderContext *rc,
75
 
                            gint             page)
 
74
                            EvPage          *page)
76
75
{
77
76
        g_return_if_fail (rc != NULL);
 
77
        g_return_if_fail (EV_IS_PAGE (page));
78
78
 
79
 
        rc->page = page;
 
79
        if (rc->page)
 
80
                g_object_unref (rc->page);
 
81
        rc->page = g_object_ref (page);
80
82
}
81
83
 
82
84
void