~ubuntu-branches/ubuntu/quantal/texmacs/quantal

« back to all changes in this revision

Viewing changes to src/Edit/Editor/edit_main.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Atsuhito KOHDA, Kamaraju Kusumanchi, kohda
  • Date: 2009-04-26 19:35:14 UTC
  • mfrom: (1.1.10 upstream) (4.1.4 squeeze)
  • Revision ID: james.westby@ubuntu.com-20090426193514-9yo3oggdslgdls4b
Tags: 1:1.0.7.2-1
[Kamaraju Kusumanchi <kamaraju@gmail.com>]
* New upstream release
* texmacs crashes if /usr/share/texmacs/TeXmacs/misc/pixmaps/unknown.ps
  is not present. Do not remove it. (Closes: #484073, #497021)
* update patches 03_mupad.dpatch, 04_axiom.dpatch, 11-desktop-file.dpatch
* fix the mime problem in gnome. Thanks to Andrea Gamba for the fix.
[kohda]
* Refined a fix for the mime problem in gnome a bit.
* Try to fix /bin/sh problem (debian/fixsh) but it is not complete fix yet.
* Try to fix hard coded settings for ipa fonts(patches/09_ipa.dpatch), 
  especially for Debian where no ipa fonts exist yet.
* Fixed obsolete Build-Depends: changed libltdl3-dev to 
  libltdl-dev | libltdl7-dev (the latter for Ubuntu?)

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
* DESCRIPTION: routines for the editor
5
5
* COPYRIGHT  : (C) 1999  Joris van der Hoeven
6
6
*******************************************************************************
7
 
* This software falls under the GNU general public license and comes WITHOUT
8
 
* ANY WARRANTY WHATSOEVER. See the file $TEXMACS_PATH/LICENSE for more details.
9
 
* If you don't have this file, write to the Free Software Foundation, Inc.,
10
 
* 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 
7
* This software falls under the GNU general public license version 3 or later.
 
8
* It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
 
9
* in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
11
10
******************************************************************************/
12
11
 
13
12
#include "edit_main.hpp"
36
35
  et (the_et), rp (buf2->rp) {}
37
36
 
38
37
edit_main_rep::edit_main_rep (server_rep* sv, tm_buffer buf):
39
 
  editor_rep (sv, buf), props (UNKNOWN)
 
38
  editor_rep (sv, buf), props (UNKNOWN), ed_obs (edit_observer (this))
40
39
{
 
40
  attach_observer (subtree (et, rp), ed_obs);
41
41
  notify_change (THE_TREE);
42
42
  tp= correct_cursor (et, rp * 0);
43
43
}
44
44
 
45
45
edit_main_rep::~edit_main_rep () {
 
46
  detach_observer (subtree (et, rp), ed_obs);
46
47
#ifdef EXPERIMENTAL
47
48
  mem= memorizer ();
48
49
#endif
50
51
 
51
52
editor
52
53
new_editor (server_rep* sv, tm_buffer buf) {
53
 
  return new edit_main_rep (sv, buf);
 
54
  return tm_new<edit_main_rep> (sv, buf);
54
55
}
55
56
 
56
57
/******************************************************************************
204
205
    the_box[0][i]->redraw (ren, path (0), rs);
205
206
    if (i<end-1) ren->next_page ();
206
207
  }
207
 
  delete ren;
 
208
  tm_delete (ren);
208
209
 
209
210
  if (pdf) {
210
211
    ps2pdf (name, orig);
235
236
  bool ps= suffix (name) == "ps" || suffix (name) == "eps";
236
237
  typeset_prepare ();
237
238
  int dpi= as_int (printing_dpi);
238
 
  if (!ps) t= tree (WITH, MAGNIFICATION, "2", PAGE_WIDTH, "40cm", t);
 
239
  //if (!ps) t= tree (WITH, MAGNIFICATION, "2", PAGE_WIDTH, "40cm", t);
 
240
  if (!ps) t= tree (WITH, MAGNIFICATION, "1.6", PAGE_WIDTH, "40cm", t);
239
241
  box b= typeset_as_box (env, t, path ());
240
242
  if (b->x4 - b->x3 >= 5*PIXEL && b->y4 - b->y3 >= 5*PIXEL) {
241
243
    if (ps) make_eps (name, b, dpi);