~ubuntu-branches/ubuntu/trusty/xiphos/trusty

« back to all changes in this revision

Viewing changes to src/backend/sword_main.cc

  • Committer: Package Import Robot
  • Author(s): Dmitrijs Ledkovs, Dmitrijs Ledkovs
  • Date: 2012-03-11 18:43:32 UTC
  • mfrom: (17.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20120311184332-splq3ecpx7tyi87d
Tags: 3.1.5+dfsg-1
[ Dmitrijs Ledkovs <dmitrij.ledkov@ubuntu.com> ]  
* New upstream release.
* Build using webkit backend
* Contains unpacked source for waf binary (Closes: #654511)
* Update debian/copyright to latest specification

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
 * Xiphos Bible Study Tool
3
3
 * sword_main.cc -
4
4
 *
5
 
 * Copyright (C) 2000-2010 Xiphos Developer Team
 
5
 * Copyright (C) 2000-2011 Xiphos Developer Team
6
6
 *
7
7
 * This program is free software; you can redistribute it and/or modify
8
8
 * it under the terms of the GNU General Public License as published by
64
64
 
65
65
BackEnd::BackEnd()
66
66
{
 
67
#ifdef DEBUG
67
68
        GTimer *t;
68
69
        double d;
69
70
        t = g_timer_new();
 
71
#endif
70
72
 
71
73
        main_mgr = new SWMgr(new MarkupFilterMgr(FMT_HTMLHREF));
72
74
 
 
75
#ifdef DEBUG
73
76
        g_timer_stop(t);
74
77
        d = g_timer_elapsed(t, NULL);
75
78
        GS_message(("create main_mgr time is %f", d));
 
79
#endif
76
80
 
77
81
        display_mod = NULL;
78
82
        tree_key = NULL;
649
653
        return -1;
650
654
}
651
655
 
652
 
char *BackEnd::get_entry_attribute(const char *level1, const char *level2, const char *level3)
 
656
char *BackEnd::get_entry_attribute(const char *level1,
 
657
                                   const char *level2,
 
658
                                   const char *level3,
 
659
                                   bool render)
653
660
{
654
661
        UTF8HTML u2html;
655
 
        display_mod->RenderText();
 
662
        if (render)
 
663
                display_mod->RenderText();
656
664
        SWBuf attribute2 = display_mod->getEntryAttributes()[level1][level2][level3].c_str();
657
665
 
658
666
        u2html.processText(attribute2);