+Version 0.3.3 (Jan 31, 2007):
+ - bugfix: upon loading a new file, zoom is set to default startup zoom
+ - config option to allow input from a mouse or other core pointer device
+ - config file entry to specify a default location for open/save
+ (patch contributed by Andy Neitzke)
+ - config file entries to customize visibility and position of toolbars
+ - icon (thanks to Michele Codutti)
+
Version 0.3.2 (Nov 25, 2006):
- preferences file and Save Preferences command
- extra customization (via preferences file)
-Version 0.3.2 (November 25, 2006)
+Version 0.3.3 (January 31, 2007)
Installation: see INSTALL
User's manual: see html-doc/manual.html
-Updates: see http://math.mit.edu/~auroux/software/xournal/
+Updates: see http://xournal.sourceforge.net/
+ or http://math.mit.edu/~auroux/software/xournal/
+
See also: http://sourceforge.net/projects/xournal
-Version 0.3.2 (November 25, 2006)
+Version 0.3.3 (January 31, 2007)
Installation: see INSTALL
User's manual: see html-doc/manual.html
-Updates: see http://math.mit.edu/~auroux/software/xournal/
+Updates: see http://xournal.sourceforge.net/
+ or http://math.mit.edu/~auroux/software/xournal/
+
See also: http://sourceforge.net/projects/xournal
dnl Process this file with autoconf to produce a configure script.
AC_INIT(configure.in)
-AM_INIT_AUTOMAKE(xournal, 0.3.2)
+AM_INIT_AUTOMAKE(xournal, 0.3.3)
AM_CONFIG_HEADER(config.h)
AM_MAINTAINER_MODE
Xournal User's Manual
</h2>
<p style="font-size: 0.95em; text-align: center; color: rgb(0,0,0)">
- Version 0.3.2
+ Version 0.3.3
</p>
<hr />
<p>
</p>
<p>
Xournal can be downloaded at
+<a href="http://xournal.sourceforge.net/">http://xournal.sourceforge.net/</a> or
<a href="http://math.mit.edu/~auroux/software/xournal/">http://math.mit.edu/~auroux/software/xournal/</a>
</p>
<p>
options which cannot be set from the user interface, such as: the
display resolution in pixels per inch, the step increment in zoom factors,
the tool selected at startup, the thickness of the various drawing tools,
-...
+the default directory for opening and saving files, the visibility and
+position of the menu and toolbars, ...
</p>
<hr />
<a name="author"></a>
<a name="changelog"></a>
<h2 class="subtitle">Version history</h2>
<p>
+Version 0.3.3 (January 31, 2007):
+<ul>
+ <li>bugfix: upon loading a new file, zoom is set to default startup zoom</li>
+ <li>config option to allow input from a mouse or other core pointer device</li>
+ <li>config file entry to specify a default location for open/save
+ (patch contributed by Andy Neitzke)</li>
+ <li>config file entries to customize visibility and position of toolbars</li>
+ <li>icon (thanks to Michele Codutti)</li>
+</ul>
+</p>
+<p>
Version 0.3.2 (November 25, 2006):
<ul>
<li>preferences file and Save Preferences command</li>
use USB instead; the BottomX and BottomY values correspond to the physical
resolution of the tablet and will vary from one model to another.
</p>
+<p>
+For historical reasons, most X servers do not allow the input device
+designated as the "core pointer" in the X server's configuration file
+to be used as an XInput extension device. Thus, your tablet input devices
+should <b>not</b> be designated as the core pointer device. Instead, they
+should be configured with the "SendCoreEvents" option, which enables them
+to simultaneously generate XInput extension events and move the cursor on
+the screen. Since high-resolution coordinates cannot be obtained for the
+core pointer device, it is disabled in Xournal by default.
+Starting with version 0.3.3,
+it is possible to have core events processed alongside with extension
+events (uncheck "Discard Core Events" in the Options menu); however, in
+some rare cases this may lead to a loss of resolution on all devices.
+</p>
<h3 class="subsub">The cursor doesn't appear in the right place...</h3>
<p>
If the mouse pointer does not follow accurately the position of the stylus,
This patch fixes rotation and calibration issues with the linuxwacom driver
version 0.7.0.
<ul>
-<li>The <a href="http://math.mit.edu/~auroux/software/xournal/linuxwacom-0.7.0-rotate-patch">patch
+<li>The <a href="http://xournal.sourceforge.net/linuxwacom-0.7.0-rotate-patch">patch
file</a> for the linuxwacom source code (also included with the Xournal
distribution).</li>
-<li>The <a href="http://math.mit.edu/~auroux/software/xournal/linuxwacom-rotate-patch.tar.gz">patched
+<li>The <a href="http://xournal.sourceforge.net/linuxwacom-rotate-patch.tar.gz">patched
binaries</a> for the X.org X server.</li>
</ul>
This patch has been included in version 0.7.6 of the linuxwacom driver,
- recalibration upon screen resize / compensation for miscalibration
- find a better behavior for vertical space tool across page boundaries ?
- key mappings (pgup/dn for full page, up/dn for scroll)
+ (customize secondary mappings for tablet button use ?)
- copy/paste of an entire page (beware if PDF bg is not compatible!)
- simple drawing tools: rectangles, ellipses
- option to save all annotated files within the .xoj
- non-antialiased version for handhelds
- customize autogenerated save file names
+- optimize speed in hand tool (process groups of motion events)?
+ (setting 1 pixel min threshold doesn't help -- look at GTK+ scrollbar code?)
+- layer dialog box to set visibility status of each layer regardless of
+ which layer is being edited
+- display corruption on scroll down when bottom of window is obscured??
+ (probably a gnomecanvas or X bug -- expose event generated for wrong
+ region, or not processed?)
+- bitmap preview for document icon in desktop environments?
gtk_toggle_tool_button_set_active(
GTK_TOGGLE_TOOL_BUTTON(GET_COMPONENT("buttonFullscreen")), TRUE);
gtk_window_fullscreen(GTK_WINDOW(winMain));
- gtk_widget_hide(GET_COMPONENT("menubar"));
- gtk_widget_hide(GET_COMPONENT("hbox1"));
}
dev_list = gdk_devices_list();
while (dev_list != NULL) {
device = (GdkDevice *)dev_list->data;
- if (device->source != GDK_SOURCE_MOUSE) {
+ if (device != gdk_device_get_core_pointer()) {
/* 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)
update_undo_redo_enabled();
update_copy_paste_enabled();
+ update_vbox_order(ui.vertical_order[ui.fullscreen?1:0]);
// show everything...
winMain = create_winMain ();
init_stuff (argc, argv);
+ gtk_window_set_icon(GTK_WINDOW(winMain), create_pixbuf("xournal.png"));
gtk_main ();
{
if (close_journal()) {
new_journal();
- ui.zoom = DEFAULT_ZOOM;
+ ui.zoom = ui.startup_zoom;
update_page_stuff();
gtk_adjustment_set_value(gtk_layout_get_vadjustment(GTK_LAYOUT(canvas)), 0);
gnome_canvas_set_pixels_per_unit(canvas, ui.zoom);
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filt_pdf);
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filt_all);
+ if (ui.default_path!=NULL) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (dialog), ui.default_path);
+
attach_opt = gtk_check_button_new_with_label("Attach file to the journal");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(attach_opt), FALSE);
gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER (dialog), attach_opt);
gtk_main_iteration();
}
new_journal();
- ui.zoom = DEFAULT_ZOOM;
+ ui.zoom = ui.startup_zoom;
gnome_canvas_set_pixels_per_unit(canvas, ui.zoom);
update_page_stuff();
success = init_bgpdf(filename, TRUE, file_domain);
gtk_file_filter_add_pattern(filt_xoj, "*.xoj");
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filt_xoj);
gtk_file_chooser_add_filter(GTK_FILE_CHOOSER (dialog), filt_all);
-
+
+ if (ui.default_path!=NULL) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (dialog), ui.default_path);
+
if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_OK) {
gtk_widget_destroy(dialog);
return;
else {
curtime = time(NULL);
strftime(stime, 30, "%F-Note-%H-%M.xoj", localtime(&curtime));
+ if (ui.default_path!=NULL)
+ gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (dialog), ui.default_path);
gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER (dialog), stime);
}
} else {
curtime = time(NULL);
strftime(stime, 30, "%F-Note-%H-%M.pdf", localtime(&curtime));
+ if (ui.default_path!=NULL)
+ gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (dialog), ui.default_path);
gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER (dialog), stime);
in_fn = NULL;
}
dialog = gtk_file_chooser_dialog_new("Open Background", GTK_WINDOW (winMain),
GTK_FILE_CHOOSER_ACTION_OPEN, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
GTK_STOCK_OPEN, GTK_RESPONSE_OK, NULL);
-
+
filt_all = gtk_file_filter_new();
gtk_file_filter_set_name(filt_all, "All files");
gtk_file_filter_add_pattern(filt_all, "*");
attach_opt = gtk_check_button_new_with_label("Attach file to the journal");
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(attach_opt), FALSE);
gtk_file_chooser_set_extra_widget(GTK_FILE_CHOOSER (dialog), attach_opt);
+
+ if (ui.default_path!=NULL) gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER (dialog), ui.default_path);
if (gtk_dialog_run(GTK_DIALOG(dialog)) != GTK_RESPONSE_OK) {
gtk_widget_destroy(dialog);
struct Page *tmppage;
GtkWidget *dialog;
int mapping;
-
+ gboolean is_core;
+
if (ui.cur_item_type != ITEM_NONE) return FALSE; // we're already doing something
if (event->button > 3) return FALSE; // no painting with the mouse wheel!
- if (ui.use_xinput) {
- if (event->device->source == GDK_SOURCE_MOUSE) return FALSE;
+ is_core = (event->device == gdk_device_get_core_pointer());
+ if (!ui.use_xinput && !is_core) return FALSE;
+ if (ui.use_xinput && is_core && ui.discard_corepointer) return FALSE;
+ if (!is_core) {
// re-get the axis values since Synaptics sends bogus ones
gdk_device_get_state(event->device, event->window, event->axes, NULL);
fix_xinput_coords((GdkEvent *)event);
}
- else if (event->device->source != GDK_SOURCE_MOUSE) return FALSE;
+ ui.is_corestroke = is_core;
if (ui.use_erasertip && event->device->source == GDK_SOURCE_ERASER)
mapping = NUM_BUTTONS;
GdkEventButton *event,
gpointer user_data)
{
+ gboolean is_core;
+
if (ui.cur_item_type == ITEM_NONE) return FALSE; // not doing anything
if (event->button != ui.which_mouse_button) return FALSE; // ignore
- if (ui.use_xinput) {
- if (event->device->source == GDK_SOURCE_MOUSE) return FALSE;
- fix_xinput_coords((GdkEvent *)event);
- }
- else if (event->device->source != GDK_SOURCE_MOUSE) return FALSE;
+ is_core = (event->device == gdk_device_get_core_pointer());
+ if (!ui.use_xinput && !is_core) return FALSE;
+ if (ui.use_xinput && is_core && !ui.is_corestroke) return FALSE;
+ if (!is_core) fix_xinput_coords((GdkEvent *)event);
if (ui.cur_item_type == ITEM_STROKE) {
finalize_stroke();
GdkEventMotion *event,
gpointer user_data)
{
- gboolean looks_wrong;
+ gboolean looks_wrong, is_core;
double pt[2];
if (ui.cur_item_type == ITEM_NONE) return FALSE; // we don't care
- if (ui.use_xinput) {
- if (event->device->source == GDK_SOURCE_MOUSE) return FALSE;
- fix_xinput_coords((GdkEvent *)event);
- }
- else if (event->device->source != GDK_SOURCE_MOUSE) return FALSE;
+ is_core = (event->device == gdk_device_get_core_pointer());
+ if (!ui.use_xinput && !is_core) return FALSE;
+ if (ui.use_xinput && is_core && !ui.is_corestroke) return FALSE;
+ if (!is_core) fix_xinput_coords((GdkEvent *)event);
looks_wrong = !(event->state & (1<<(7+ui.which_mouse_button)));
{
ui.allow_xinput = ui.use_xinput =
gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM (menuitem));
+ update_mappings_menu();
}
void
gtk_toggle_tool_button_set_active(
GTK_TOGGLE_TOOL_BUTTON(GET_COMPONENT("buttonFullscreen")), ui.fullscreen);
- if (ui.fullscreen) {
- gtk_window_fullscreen(GTK_WINDOW(winMain));
- gtk_widget_hide(GET_COMPONENT("menubar"));
- gtk_widget_hide(GET_COMPONENT("hbox1"));
- }
- else {
- gtk_window_unfullscreen(GTK_WINDOW(winMain));
- gtk_widget_show(GET_COMPONENT("menubar"));
- gtk_widget_show(GET_COMPONENT("hbox1"));
- }
+ if (ui.fullscreen) gtk_window_fullscreen(GTK_WINDOW(winMain));
+ else gtk_window_unfullscreen(GTK_WINDOW(winMain));
+
+ update_vbox_order(ui.vertical_order[ui.fullscreen?1:0]);
}
ui.print_ruling = gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM (menuitem));
}
+void
+on_optionsDiscardCore_activate (GtkMenuItem *menuitem,
+ gpointer user_data)
+{
+ ui.discard_corepointer =
+ gtk_check_menu_item_get_active(GTK_CHECK_MENU_ITEM (menuitem));
+ update_mappings_menu();
+}
void
on_optionsPrintRuling_activate (GtkMenuItem *menuitem,
gpointer user_data);
+
+void
+on_optionsDiscardCore_activate (GtkMenuItem *menuitem,
+ gpointer user_data);
close_journal();
while (bgpdf.status != STATUS_NOT_INIT) gtk_main_iteration();
new_journal();
- ui.zoom = DEFAULT_ZOOM;
+ ui.zoom = ui.startup_zoom;
gnome_canvas_set_pixels_per_unit(canvas, ui.zoom);
update_page_stuff();
return init_bgpdf(filename, TRUE, DOMAIN_ABSOLUTE);
ui.layerno = ui.cur_page->nlayers-1;
ui.cur_layer = (struct Layer *)(g_list_last(ui.cur_page->layers)->data);
ui.saved = TRUE;
- ui.zoom = DEFAULT_ZOOM;
+ ui.zoom = ui.startup_zoom;
update_file_name(g_strdup(filename));
gnome_canvas_set_pixels_per_unit(canvas, ui.zoom);
make_canvas_items();
bgpdf.requests = NULL;
bgpdf.create_pages = create_pages;
bgpdf.has_failed = FALSE;
- add_bgpdf_request(-1, DEFAULT_ZOOM, FALSE); // request all pages
+ add_bgpdf_request(-1, ui.startup_zoom, FALSE); // request all pages
return TRUE;
}
bg->filename = refstring_ref(bgpdf.filename);
bg->file_domain = bgpdf.file_domain;
bg->file_page_seq = pageno;
- bg->pixbuf_scale = DEFAULT_ZOOM;
+ bg->pixbuf_scale = ui.startup_zoom;
bg->pixbuf_dpi = bgpg->dpi;
if (journal.npages < pageno) {
int i, j;
DEFAULT_ZOOM = DISPLAY_DPI_DEFAULT/72.0;
- ui.zoom = 1.0*DEFAULT_ZOOM;
+ ui.zoom = ui.startup_zoom = 1.0*DEFAULT_ZOOM;
ui.default_page.height = 792.0;
ui.default_page.width = 612.0;
ui.default_page.bg->type = BG_SOLID;
ui.default_page.bg->ruling = RULING_LINED;
ui.view_continuous = TRUE;
ui.allow_xinput = TRUE;
+ ui.discard_corepointer = TRUE;
ui.bg_apply_all_pages = FALSE;
ui.use_erasertip = FALSE;
ui.window_default_width = 720;
ui.progressive_bg = TRUE;
ui.print_ruling = TRUE;
ui.default_unit = UNIT_CM;
+ ui.default_path = NULL;
+
+ // the default UI vertical order
+ ui.vertical_order[0][0] = 1;
+ ui.vertical_order[0][1] = 2;
+ ui.vertical_order[0][2] = 3;
+ ui.vertical_order[0][3] = 0;
+ ui.vertical_order[0][4] = 4;
+ ui.vertical_order[1][0] = 2;
+ ui.vertical_order[1][1] = 3;
+ ui.vertical_order[1][2] = 0;
+ ui.vertical_order[1][3] = ui.vertical_order[1][4] = -1;
ui.toolno[0] = ui.startuptool = TOOL_PEN;
ui.ruler[0] = ui.startupruler = FALSE;
g_memmove(&(ui.brushes[j][i]), &(ui.brushes[0][i]), sizeof(struct Brush));
// predef_thickness is already initialized as a global variable
-
GS_BITMAP_DPI = 144;
PDFTOPPM_PRINTING_DPI = 150;
}
#endif
+const char *vorder_usernames[VBOX_MAIN_NITEMS+1] =
+ {"drawarea", "menu", "main_toolbar", "pen_toolbar", "statusbar", NULL};
+
+gchar *verbose_vertical_order(int *order)
+{
+ gchar buf[80], *p; // longer than needed
+ int i;
+
+ p = buf;
+ for (i=0; i<VBOX_MAIN_NITEMS; i++) {
+ if (order[i]<0 || order[i]>=VBOX_MAIN_NITEMS) continue;
+ if (p!=buf) *(p++) = ' ';
+ p = g_stpcpy(p, vorder_usernames[order[i]]);
+ }
+ return g_strdup(buf);
+}
+
void save_config_to_file(void)
{
gchar *buf;
update_keyval("general", "use_xinput",
" use XInput extensions (true/false)",
g_strdup(ui.allow_xinput?"true":"false"));
+ update_keyval("general", "discard_corepointer",
+ " discard Core Pointer events in XInput mode (true/false)",
+ g_strdup(ui.discard_corepointer?"true":"false"));
update_keyval("general", "use_erasertip",
" always map eraser tip to eraser (true/false)",
g_strdup(ui.use_erasertip?"true":"false"));
+ update_keyval("general", "default_path",
+ " default path for open/save (leave blank for current directory)",
+ g_strdup((ui.default_path!=NULL)?ui.default_path:""));
+ update_keyval("general", "interface_order",
+ " interface components from top to bottom\n valid values: drawarea menu main_toolbar pen_toolbar statusbar",
+ verbose_vertical_order(ui.vertical_order[0]));
+ update_keyval("general", "interface_fullscreen",
+ " interface components in fullscreen mode, from top to bottom",
+ verbose_vertical_order(ui.vertical_order[1]));
update_keyval("paper", "width",
" the default page width, in points (1/72 in)",
return FALSE;
}
+gboolean parse_keyval_string(const gchar *group, const gchar *key, gchar **val)
+{
+ gchar *ret;
+
+ ret = g_key_file_get_value(ui.config_data, group, key, NULL);
+ if (ret==NULL) return FALSE;
+ if (strlen(ret) == 0) {
+ *val = NULL;
+ g_free(ret);
+ }
+ else *val = ret;
+ return TRUE;
+}
+
+gboolean parse_keyval_vorderlist(const gchar *group, const gchar *key, int *order)
+{
+ gchar *ret, *p;
+ int tmp[VBOX_MAIN_NITEMS];
+ int i, n, found, l;
+
+ ret = g_key_file_get_value(ui.config_data, group, key, NULL);
+ if (ret==NULL) return FALSE;
+
+ for (i=0; i<VBOX_MAIN_NITEMS; i++) tmp[i] = -1;
+ n = 0; p = ret;
+ while (*p==' ') p++;
+ while (*p!=0) {
+ if (n>VBOX_MAIN_NITEMS) return FALSE; // too many items
+ for (i=0; i<VBOX_MAIN_NITEMS; i++) {
+ if (!g_str_has_prefix(p, vorder_usernames[i])) continue;
+ l = strlen(vorder_usernames[i]);
+ if (p[l]==' '||p[l]==0) { p+=l; break; }
+ }
+ if (i>=VBOX_MAIN_NITEMS) { g_free(ret); return FALSE; } // parse error
+ // we found item #i
+ tmp[n++] = i;
+ while (*p==' ') p++;
+ }
+
+ for (n=0; n<VBOX_MAIN_NITEMS; n++) order[n] = tmp[n];
+ g_free(ret);
+ return TRUE;
+}
+
#endif
void load_config_from_file(void)
DEFAULT_ZOOM = f/72.0;
if (parse_keyval_float("general", "initial_zoom", &f,
MIN_ZOOM*100/DEFAULT_ZOOM, MAX_ZOOM*100/DEFAULT_ZOOM))
- ui.zoom = DEFAULT_ZOOM*f/100.0;
+ ui.zoom = ui.startup_zoom = DEFAULT_ZOOM*f/100.0;
parse_keyval_boolean("general", "window_maximize", &ui.maximize_at_start);
parse_keyval_boolean("general", "window_fullscreen", &ui.fullscreen);
parse_keyval_int("general", "window_width", &ui.window_default_width, 10, 5000);
parse_keyval_float("general", "zoom_step_factor", &ui.zoom_step_factor, 1., 5.);
parse_keyval_boolean("general", "view_continuous", &ui.view_continuous);
parse_keyval_boolean("general", "use_xinput", &ui.allow_xinput);
+ parse_keyval_boolean("general", "discard_corepointer", &ui.discard_corepointer);
parse_keyval_boolean("general", "use_erasertip", &ui.use_erasertip);
-
+ parse_keyval_string("general", "default_path", &ui.default_path);
+ parse_keyval_vorderlist("general", "interface_order", ui.vertical_order[0]);
+ parse_keyval_vorderlist("general", "interface_fullscreen", ui.vertical_order[1]);
+
parse_keyval_float("paper", "width", &ui.default_page.width, 1., 5000.);
parse_keyval_float("paper", "height", &ui.default_page.height, 1., 5000.);
parse_keyval_enum("paper", "color", &(ui.default_page.bg->color_no), bgcolor_names, COLOR_MAX);
GtkWidget *menuOptions;
GtkWidget *menuOptions_menu;
GtkWidget *optionsUseXInput;
+ GtkWidget *optionsDiscardCoreEvents;
GtkWidget *optionsButtonMappings;
GtkWidget *button2_mapping;
GtkWidget *button2_mapping_menu;
gtk_widget_show (optionsUseXInput);
gtk_container_add (GTK_CONTAINER (menuOptions_menu), optionsUseXInput);
+ optionsDiscardCoreEvents = gtk_check_menu_item_new_with_mnemonic ("Discard Core Events");
+ gtk_widget_show (optionsDiscardCoreEvents);
+ gtk_container_add (GTK_CONTAINER (menuOptions_menu), optionsDiscardCoreEvents);
+
optionsButtonMappings = gtk_check_menu_item_new_with_mnemonic ("Eraser Tip");
gtk_widget_show (optionsButtonMappings);
gtk_container_add (GTK_CONTAINER (menuOptions_menu), optionsButtonMappings);
g_signal_connect ((gpointer) optionsUseXInput, "toggled",
G_CALLBACK (on_optionsUseXInput_activate),
NULL);
+ g_signal_connect ((gpointer) optionsDiscardCoreEvents, "toggled",
+ G_CALLBACK (on_optionsDiscardCore_activate),
+ NULL);
g_signal_connect ((gpointer) optionsButtonMappings, "activate",
G_CALLBACK (on_optionsButtonMappings_activate),
NULL);
GLADE_HOOKUP_OBJECT (winMain, menuOptions, "menuOptions");
GLADE_HOOKUP_OBJECT (winMain, menuOptions_menu, "menuOptions_menu");
GLADE_HOOKUP_OBJECT (winMain, optionsUseXInput, "optionsUseXInput");
+ GLADE_HOOKUP_OBJECT (winMain, optionsDiscardCoreEvents, "optionsDiscardCoreEvents");
GLADE_HOOKUP_OBJECT (winMain, optionsButtonMappings, "optionsButtonMappings");
GLADE_HOOKUP_OBJECT (winMain, button2_mapping, "button2_mapping");
GLADE_HOOKUP_OBJECT (winMain, button2_mapping_menu, "button2_mapping_menu");
dialog_vbox2 = GTK_DIALOG (aboutDialog)->vbox;
gtk_widget_show (dialog_vbox2);
- image387 = create_pixmap (aboutDialog, "notepad.png");
+ image387 = create_pixmap (aboutDialog, "xournal.png");
gtk_widget_show (image387);
gtk_box_pack_start (GTK_BOX (dialog_vbox2), image387, FALSE, TRUE, 12);
gtk_box_pack_start (GTK_BOX (dialog_vbox2), labelTitle, FALSE, FALSE, 3);
gtk_label_set_justify (GTK_LABEL (labelTitle), GTK_JUSTIFY_CENTER);
- labelInfo = gtk_label_new ("Written by Denis Auroux\nhttp://math.mit.edu/~auroux/software/xournal/");
+ labelInfo = gtk_label_new ("Written by Denis Auroux\n http://xournal.sourceforge.net/ ");
gtk_widget_show (labelInfo);
gtk_box_pack_start (GTK_BOX (dialog_vbox2), labelInfo, FALSE, FALSE, 0);
gtk_label_set_justify (GTK_LABEL (labelInfo), GTK_JUSTIFY_CENTER);
// in progressive mode we scale only visible pages
if (ui.progressive_bg && !is_visible(pg)) continue;
- if (pg->bg->type == BG_PIXMAP) { // do the rescaling ourselves
+ if (pg->bg->type == BG_PIXMAP && pg->bg->canvas_item!=NULL) { // do the rescaling ourselves
if (ui.antialias_bg) {
if (pg->bg->pixbuf_scale == ui.zoom) continue;
set_cursor_busy(TRUE);
void update_mappings_menu(void)
{
+ gtk_widget_set_sensitive(GET_COMPONENT("optionsButtonMappings"), ui.use_xinput);
+ gtk_widget_set_sensitive(GET_COMPONENT("optionsDiscardCoreEvents"), ui.use_xinput);
gtk_check_menu_item_set_active(
GTK_CHECK_MENU_ITEM(GET_COMPONENT("optionsButtonMappings")), ui.use_erasertip);
+ gtk_check_menu_item_set_active(
+ GTK_CHECK_MENU_ITEM(GET_COMPONENT("optionsDiscardCoreEvents")), ui.discard_corepointer);
switch(ui.toolno[1]) {
case TOOL_PEN:
update_mappings_menu_linkings();
}
}
+
+// update the ordering of components in the main vbox
+
+const char *vbox_component_names[VBOX_MAIN_NITEMS]=
+ {"scrolledwindowMain", "menubar", "toolbarMain", "toolbarPen", "hbox1"};
+
+void update_vbox_order(int *order)
+{
+ int i, j;
+ GtkWidget *child;
+ GtkBox *vboxMain = GTK_BOX(GET_COMPONENT("vboxMain"));
+ gboolean present[VBOX_MAIN_NITEMS];
+
+ for (i=0; i<VBOX_MAIN_NITEMS; i++) present[i] = FALSE;
+ j=0;
+ for (i=0; i<VBOX_MAIN_NITEMS; i++) {
+ if (order[i]<0 || order[i]>=VBOX_MAIN_NITEMS) continue;
+ present[order[i]] = TRUE;
+ child = GET_COMPONENT(vbox_component_names[order[i]]);
+ gtk_box_reorder_child(vboxMain, child, j++);
+ gtk_widget_show(child);
+ }
+ for (i=1; i<VBOX_MAIN_NITEMS; i++) // hide others, but not the drawing area!
+ if (!present[i]) gtk_widget_hide(GET_COMPONENT(vbox_component_names[i]));
+}
+
void update_file_name(char *filename);
void update_undo_redo_enabled(void);
void update_copy_paste_enabled(void);
+void update_vbox_order(int *order);
void update_mapping_linkings(int toolno);
void do_switch_page(int pg, gboolean rescroll, gboolean refresh_all);
void switch_mapping(int m);
void process_mapping_activate(GtkMenuItem *menuitem, int m, int tool);
+
// defines for paper rulings
#define RULING_MARGIN_COLOR 0xff0080ff
#define DISPLAY_DPI_DEFAULT 96.0
#define MIN_ZOOM 0.2
+#define VBOX_MAIN_NITEMS 5 // number of interface items in vboxMain
+
/* a string (+ aux data) that maintains a refcount */
typedef struct Refstring {
double zoom; // zoom factor, in pixels per pt
gboolean use_xinput; // use input devices instead of core pointer
gboolean allow_xinput; // allow use of xinput ?
+ gboolean discard_corepointer; // discard core pointer events in XInput mode
+ gboolean is_corestroke; // this stroke is painted with core pointer
int screen_width, screen_height; // initial screen size, for XInput events
double hand_refpt[2];
char *filename;
+ gchar *default_path; // default path for new notes
gboolean view_continuous, fullscreen, maximize_at_start;
gboolean in_update_page_stuff; // semaphore to avoid scrollbar retroaction
struct Selection *selection;
gboolean startupruler;
int zoom_step_increment; // the increment in the zoom dialog box
double zoom_step_factor; // the multiplicative factor in zoom in/out
+ double startup_zoom;
#if GLIB_CHECK_VERSION(2,6,0)
GKeyFile *config_data;
#endif
+ int vertical_order[2][VBOX_MAIN_NITEMS]; // the order of interface components
} UIData;
#define BRUSH_LINKED 0
</widget>
</child>
+ <child>
+ <widget class="GtkCheckMenuItem" id="optionsDiscardCoreEvents">
+ <property name="visible">True</property>
+ <property name="label" translatable="yes">Discard Core Events</property>
+ <property name="use_underline">True</property>
+ <property name="active">False</property>
+ <signal name="toggled" handler="on_optionsDiscardCore_activate" last_modification_time="Wed, 07 Dec 2005 22:54:39 GMT"/>
+ </widget>
+ </child>
+
<child>
<widget class="GtkCheckMenuItem" id="optionsButtonMappings">
<property name="visible">True</property>
<child>
<widget class="GtkImage" id="image387">
<property name="visible">True</property>
- <property name="pixbuf">notepad.png</property>
+ <property name="pixbuf">xournal.png</property>
<property name="xalign">0.5</property>
<property name="yalign">0.5</property>
<property name="xpad">0</property>
<widget class="GtkLabel" id="labelInfo">
<property name="visible">True</property>
<property name="label" translatable="yes">Written by Denis Auroux
-http://math.mit.edu/~auroux/software/xournal/</property>
+ http://xournal.sourceforge.net/ </property>
<property name="use_underline">False</property>
<property name="use_markup">False</property>
<property name="justify">GTK_JUSTIFY_CENTER</property>