+Version ?:
+ - can specify on command line a PDF file to annotate
+ - fixed a bug in XInput initialization (thanks to Luca de Cicco)
+
Version 0.2 (Jan 29, 2006):
- PDF file annotation using xpdf's pdftoppm
(PDF backgrounds updated asynchronously at all resolutions)
- option to antialias and filter bitmap backgrounds when zooming
- option to emulate eraser tip with right mouse button
- binary installer allows non-root installation without compiling
- - full-screen mode
+ - full-screen mode (patch contributed by Luca De Cicco)
Version 0.1.1 (Jan 5, 2006):
- two bugfixes
dnl Process this file with autoconf to produce a configure script.
AC_INIT(configure.in)
-AM_INIT_AUTOMAKE(xournal, 0.2)
+AM_INIT_AUTOMAKE(xournal, 0.2.1)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
Xournal aims to provide superior graphical quality (subpixel resolution) and overall
functionality; however it lacks the collaborative features of Jarnal.
Since Xournal is still in its early development stages, it may not
- be fully stable, and some features have not been implemented yet
- (in particular, freeform selection and PDF backgrounds are missing).
+ be fully stable, and some features have not been implemented yet.
</p>
<h2 class="subtitle">Table of contents</h2>
<p>
<li>option to antialias and filter bitmap backgrounds when zooming</li>
<li>option to emulate eraser tip with right mouse button</li>
<li>binary installer allows non-root installation without compiling</li>
- <li>full-screen mode</li>
+ <li>full-screen mode (patch contributed by Luca De Cicco)</li>
</ul>
</p>
<p>
+- non-attached annotation => suggest a derived filename for save-as
- lasso selection tool
- prefs file, save prefs
- recent files list
- flatten (incl undo/redo...) - enabled only if nlayers>1
- bg: apply to all pages
- recolor selection
+- resize selection
- move selection to another page by drag-drop
(should apply to vertspacer when origin moves to another page,
but in the up direction only do so when all the stuff fits on prev page)
- text tool, font chooser, default font
-- color chooser (papercolor, pen color)
+- color chooser (papercolor, pen color); maybe more default colors
- printing: print-to-PDF? (with & without pdf background to merge)
opacity issue for highlighter strokes (maybe print them below ?)
save gnome printer settings (throughout a session, and on disk)
- file print-options, own print-to-ps/pdf
- help index
- pressure sensitivity
+- insert images (screen capture or from file), not as full-page backgrounds
+- more pen/highlighter shapes (chisel)
- convert to/from Jarnal format
+- recalibration upon screen resize / compensation for miscalibration
dev_list = gdk_devices_list();
while (dev_list != NULL) {
device = (GdkDevice *)dev_list->data;
- if (device->source == GDK_SOURCE_PEN || device->source == GDK_SOURCE_ERASER) {
+ if (device->source != GDK_SOURCE_MOUSE) {
/* get around a GDK bug: map the valuator range CORRECTLY to [0,1] */
#if ENABLE_XINPUT_BUGFIX
gdk_device_set_axis_use(device, 0, GDK_AXIS_IGNORE);
gdk_device_set_mode(device, GDK_MODE_SCREEN);
can_xinput = TRUE;
}
+ else gdk_device_set_mode(device, GDK_MODE_DISABLED);
dev_list = dev_list->next;
}
if (!can_xinput)
set_cursor_busy(TRUE);
success = open_journal(filename);
set_cursor_busy(FALSE);
- if (success) return;
+ if (success) { g_free(filename); return; }
/* open failed */
dialog = gtk_message_dialog_new(GTK_WINDOW (winMain), GTK_DIALOG_DESTROY_WITH_PARENT,
char buffer[1000];
int len;
gchar *tmpfn;
+ gboolean maybe_pdf;
f = gzopen(filename, "r");
if (f==NULL) return FALSE;
tmpFilename = filename;
error = NULL;
tmpBg_pdf = NULL;
+ maybe_pdf = TRUE;
while (valid && !gzeof(f)) {
len = gzread(f, buffer, 1000);
if (len<0) valid = FALSE;
+ if (maybe_pdf && len>=4 && !strncmp(buffer, "%PDF", 4))
+ { valid = FALSE; break; } // most likely pdf
+ else maybe_pdf = FALSE;
if (len<=0) break;
valid = g_markup_parse_context_parse(context, buffer, len, &error);
}
if (valid) valid = g_markup_parse_context_end_parse(context, &error);
if (tmpJournal.npages == 0) valid = FALSE;
g_markup_parse_context_free(context);
+
if (!valid) {
delete_journal(&tmpJournal);
- return FALSE;
+ if (!maybe_pdf) return FALSE;
+ // essentially same as on_fileNewBackground from here on
+ ui.saved = TRUE;
+ close_journal();
+ while (bgpdf.status != STATUS_NOT_INIT) gtk_main_iteration();
+ new_journal();
+ ui.zoom = DEFAULT_ZOOM;
+ gnome_canvas_set_pixels_per_unit(canvas, ui.zoom);
+ update_page_stuff();
+ return init_bgpdf(filename, TRUE, DOMAIN_ABSOLUTE);
}
ui.saved = TRUE; // force close_journal() to do its job
ui.cur_layer = (struct Layer *)(g_list_last(ui.cur_page->layers)->data);
ui.saved = TRUE;
ui.zoom = DEFAULT_ZOOM;
- update_file_name(filename);
+ update_file_name(g_strdup(filename));
gnome_canvas_set_pixels_per_unit(canvas, ui.zoom);
make_canvas_items();
update_page_stuff();
void end_bgpdf_shutdown(void)
{
if (bgpdf.tmpdir!=NULL) {
- g_unlink(bgpdf.tmpfile_copy);
- g_free(bgpdf.tmpfile_copy);
+ if (bgpdf.tmpfile_copy!=NULL) {
+ g_unlink(bgpdf.tmpfile_copy);
+ g_free(bgpdf.tmpfile_copy);
+ bgpdf.tmpfile_copy = NULL;
+ }
g_rmdir(bgpdf.tmpdir);
g_free(bgpdf.tmpdir);
bgpdf.tmpdir = NULL;
gsize filelen;
if (bgpdf.status != STATUS_NOT_INIT) return FALSE;
+ bgpdf.tmpfile_copy = NULL;
bgpdf.tmpdir = mkdtemp(g_strdup(TMPDIR_TEMPLATE));
if (!bgpdf.tmpdir) return FALSE;
// make a local copy and check if it's a PDF
- if (!g_file_get_contents(pdfname, &filebuf, &filelen, NULL)) return FALSE;
+ if (!g_file_get_contents(pdfname, &filebuf, &filelen, NULL))
+ { end_bgpdf_shutdown(); return FALSE; }
if (filelen < 4 || strncmp(filebuf, "%PDF", 4))
- { g_free(filebuf); return FALSE; }
+ { g_free(filebuf); end_bgpdf_shutdown(); return FALSE; }
bgpdf.tmpfile_copy = g_strdup_printf("%s/bg.pdf", bgpdf.tmpdir);
f = fopen(bgpdf.tmpfile_copy, "w");
if (f == NULL || fwrite(filebuf, 1, filelen, f) != filelen)
- { g_free(filebuf); return FALSE; }
+ { g_free(filebuf); end_bgpdf_shutdown(); return FALSE; }
fclose(f);
g_free(filebuf);
bgpdf.status = STATUS_IDLE;